Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add new VMware unified driver to supported list #2 #3534

Merged
merged 2 commits into from
Jan 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 59 additions & 1 deletion Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

23 changes: 23 additions & 0 deletions docs/drivers.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ the host PATH:
* [Hyperkit](#hyperkit-driver)
* [xhyve](#xhyve-driver)
* [HyperV](#hyperv-driver)
* [VMware](#vmware-unified-driver)

#### KVM2 driver

Expand Down Expand Up @@ -126,3 +127,25 @@ sudo chmod u+s $(brew --prefix)/opt/docker-machine-driver-xhyve/bin/docker-machi
Hyper-v users may need to create a new external network switch as described [here](https://docs.docker.com/machine/drivers/hyper-v/). This step may prevent a problem in which `minikube start` hangs indefinitely, unable to ssh into the minikube virtual machine. In this add, add the `--hyperv-virtual-switch=switch-name` argument to the `minikube start` command.

On some machines, having **dynamic memory management** turned on for the minikube VM can cause problems of unexpected and random restarts which manifests itself in simply losing the connection to the cluster, after which `minikube status` would simply state `stopped`. Machine restarts are caused due to following Hyper-V error: `The dynamic memory balancer could not add memory to the virtual machine 'minikube' because its configured maximum has been reached`. **Solution**: turned the dynamic memory management in hyper-v settings off (and allocate a fixed amount of memory to the machine).

#### VMware unified driver

The VMware unified driver will eventually replace the existing vmwarefusion driver.
The new unified driver supports both VMware Fusion (on macOS) and VMware Workstation (on Linux and Windows)

To install the vmware unified driver, head over at https://github.com/machine-drivers/docker-machine-driver-vmware/releases and download the release for your operating system.

The driver must be:

1. Stored in `$PATH`
2. Named `docker-machine-driver-vmware`
3. Executable (`chmod +x` on UNIX based platforms)

If you're running on macOS with Fusion, this is an easy way install the driver:

```shell
export LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/machine-drivers/docker-machine-driver-vmware/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/') \
&& curl -L -o docker-machine-driver-vmware https://github.com/machine-drivers/docker-machine-driver-vmware/releases/download/$LATEST_VERSION/docker-machine-driver-vmware_darwin_amd64 \
&& chmod +x docker-machine-driver-vmware \
&& mv docker-machine-driver-vmware /usr/local/bin/
```
7 changes: 7 additions & 0 deletions pkg/minikube/cluster/cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,6 +199,13 @@ Please consider switching to the hyperkit driver, which is intended to replace t
See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperkit-driver for more information.
To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]`)
}
case "vmwarefusion":
if viper.GetBool(cfg.ShowDriverDeprecationNotification) {
fmt.Fprintln(os.Stderr, `WARNING: The vmwarefusion driver is now deprecated and support for it will be removed in a future release.
Please consider switching to the new vmware unified driver, which is intended to replace the vmwarefusion driver.
See https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#vmware-unified-driver for more information.
To disable this message, run [minikube config set WantShowDriverDeprecationNotification false]`)
}
}

return nil
Expand Down
1 change: 1 addition & 0 deletions pkg/minikube/cluster/default_drivers.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import (
_ "k8s.io/minikube/pkg/minikube/drivers/kvm2"
_ "k8s.io/minikube/pkg/minikube/drivers/none"
_ "k8s.io/minikube/pkg/minikube/drivers/virtualbox"
_ "k8s.io/minikube/pkg/minikube/drivers/vmware"
_ "k8s.io/minikube/pkg/minikube/drivers/vmwarefusion"
_ "k8s.io/minikube/pkg/minikube/drivers/xhyve"
)
1 change: 1 addition & 0 deletions pkg/minikube/constants/constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ var SupportedVMDrivers = [...]string{
"hyperv",
"hyperkit",
"kvm2",
"vmware",
"none",
}

Expand Down
17 changes: 17 additions & 0 deletions pkg/minikube/drivers/vmware/doc.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Copyright 2018 The Kubernetes Authors All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package vmware
45 changes: 45 additions & 0 deletions pkg/minikube/drivers/vmware/driver.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Copyright 2018 The Kubernetes Authors All rights reserved.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/

package vmware

import (
vmwcfg "github.com/machine-drivers/docker-machine-driver-vmware/pkg/drivers/vmware/config"
cfg "k8s.io/minikube/pkg/minikube/config"
"k8s.io/minikube/pkg/minikube/constants"
"k8s.io/minikube/pkg/minikube/registry"
)

func init() {
registry.Register(registry.DriverDef{
Name: "vmware",
Builtin: false,
ConfigCreator: createVMwareHost,
})
}

func createVMwareHost(config cfg.MachineConfig) interface{} {
d := vmwcfg.NewConfig(cfg.GetMachineName(), constants.GetMinipath())
d.Boot2DockerURL = config.Downloader.GetISOFileURI(config.MinikubeISO)
d.Memory = config.Memory
d.CPU = config.CPUs
d.DiskSize = config.DiskSize

// TODO(frapposelli): push these defaults upstream to fixup this driver
d.SSHPort = 22
d.ISO = d.ResolveStorePath("boot2docker.iso")
return d
}
Loading