Skip to content

Commit

Permalink
Use a built-in version of the vmware driver
Browse files Browse the repository at this point in the history
  • Loading branch information
afbjorklund committed Jun 12, 2023
1 parent 7032e51 commit 596776a
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions pkg/minikube/registry/drvs/vmware/vmware.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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 {
Expand All @@ -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
Expand All @@ -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/"}
}
Expand Down

0 comments on commit 596776a

Please sign in to comment.