diff --git a/cli/create.go b/cli/create.go index 3bdfa7794..6de000900 100644 --- a/cli/create.go +++ b/cli/create.go @@ -120,8 +120,13 @@ func create(containerID, bundlePath, console, pidFilePath string, detach bool, kataLog.WithField("factory", factoryConfig).Info("load vm factory") f, err := vf.NewFactory(factoryConfig, true) if err != nil { - kataLog.WithError(err).Info("load vm factory failed") - } else { + kataLog.WithError(err).Warn("load vm factory failed, about to create new one") + f, err = vf.NewFactory(factoryConfig, false) + if err != nil { + kataLog.WithError(err).Warn("create vm factory failed") + } + } + if err != nil { vci.SetFactory(f) } }