From 596776a1d63bf5ec7b6e15149339dbb39750af41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Anders=20F=20Bj=C3=B6rklund?= Date: Mon, 12 Jun 2023 21:01:52 +0200 Subject: [PATCH] Use a built-in version of the vmware driver --- pkg/minikube/registry/drvs/vmware/vmware.go | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) diff --git a/pkg/minikube/registry/drvs/vmware/vmware.go b/pkg/minikube/registry/drvs/vmware/vmware.go index ac852467aaba..513652dea260 100644 --- a/pkg/minikube/registry/drvs/vmware/vmware.go +++ b/pkg/minikube/registry/drvs/vmware/vmware.go @@ -20,7 +20,8 @@ import ( "fmt" "os/exec" - vmwcfg "github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/config" + vmware "github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware" + "github.com/docker/machine/libmachine/drivers" "k8s.io/minikube/pkg/minikube/config" "k8s.io/minikube/pkg/minikube/download" "k8s.io/minikube/pkg/minikube/driver" @@ -34,6 +35,7 @@ func init() { Config: configure, Default: false, Priority: registry.Deprecated, + Init: func() drivers.Driver { return vmware.NewDriver("", "") }, Status: status, }) if err != nil { @@ -42,7 +44,7 @@ func init() { } func configure(cc config.ClusterConfig, n config.Node) (interface{}, error) { - d := vmwcfg.NewConfig(config.MachineName(cc, n), localpath.MiniPath()) + d := vmware.NewDriver(config.MachineName(cc, n), localpath.MiniPath()).(*vmware.Driver) d.Boot2DockerURL = download.LocalISOResource(cc.MinikubeISO) d.Memory = cc.Memory d.CPU = cc.CPUs @@ -55,11 +57,7 @@ func configure(cc config.ClusterConfig, n config.Node) (interface{}, error) { } func status() registry.State { - _, err := exec.LookPath("docker-machine-driver-vmware") - if err != nil { - return registry.State{Error: err, Fix: "Install docker-machine-driver-vmware", Doc: "https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/"} - } - _, err = exec.LookPath("vmrun") + _, err := exec.LookPath("vmrun") if err != nil { return registry.State{Error: err, Fix: "Install vmrun", Doc: "https://minikube.sigs.k8s.io/docs/reference/drivers/vmware/"} }