diff --git a/cli/create.go b/cli/create.go index 6de000900..5635633f0 100644 --- a/cli/create.go +++ b/cli/create.go @@ -126,7 +126,7 @@ func create(containerID, bundlePath, console, pidFilePath string, detach bool, kataLog.WithError(err).Warn("create vm factory failed") } } - if err != nil { + if err == nil { vci.SetFactory(f) } }