diff --git a/cmd/minikube/cmd/start.go b/cmd/minikube/cmd/start.go index f56ad75c1e36..cd15bbeea923 100644 --- a/cmd/minikube/cmd/start.go +++ b/cmd/minikube/cmd/start.go @@ -436,12 +436,6 @@ func selectDriver(existing *config.ClusterConfig) registry.DriverState { // Technically unrelated, but important to perform before detection driver.SetLibvirtURI(viper.GetString(kvmQemuURI)) - if viper.GetString("vm-driver") != "" { - ds := driver.Status(viper.GetString("vm-driver")) - out.T(out.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()}) - return ds - } - // By default, the driver is whatever we used last time if existing != nil && existing.Driver != "" { ds := driver.Status(existing.Driver) @@ -449,6 +443,12 @@ func selectDriver(existing *config.ClusterConfig) registry.DriverState { return ds } + if viper.GetString("vm-driver") != "" { + ds := driver.Status(viper.GetString("vm-driver")) + out.T(out.Sparkle, `Using the {{.driver}} driver based on user configuration`, out.V{"driver": ds.String()}) + return ds + } + pick, alts := driver.Suggest(driver.Choices()) if pick.Name == "" { exit.WithCodeT(exit.Config, "Unable to determine a default driver to use. Try specifying --vm-driver, or see https://minikube.sigs.k8s.io/docs/start/")