Hyper-v and VirtualBox conflict in Dockers with Minikube

8/22/2018

I'm trying to scale my docker containers with Minikube on Windows 10 Enterprise Edition. However, I'm running into a few conflicts with Hyper-V and VirtualBox. I know Dockers require Hyper-V to run properly while Minikube requires VirtualBox to run (shows an error if Hyper-V is enabled)

C:\WINDOWS\system32>minikube start
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
Downloading Minikube ISO
160.27 MB / 160.27 MB [============================================] 100.00% 
0s
E0822 11:42:07.898412   13028 start.go:174] Error starting host: Error 
creating host: Error executing step: Running precreate checks.
: This computer is running Hyper-V. VirtualBox won't boot a 64bits VM when 
Hyper-V is activated. Either use Hyper-V as a driver, or disable the Hyper-V 
hypervisor. (To skip this check, use --virtualbox-no-vtx-check).

If I disable, Hyper-V, I'm able to start minikube properly but Dockers does not work and shows an error to enable Hyper-V.

I also tried running minikube with Hyper-V driver, but also get this error:

C:\WINDOWS\system32>minikube start --vm-driver hyperv
Starting local Kubernetes v1.10.0 cluster...
Starting VM...
E0822 11:44:32.323877   13120 start.go:174] Error starting host: Error 
creating host: Error executing step: Running precreate checks.
: no External vswitch found. A valid vswitch must be available for this 
command to run. Check https://docs.docker.com/machine/drivers/hyper-v/.

Any solution to this?

-- Rking14
docker
hyper-v
kubernetes
minikube
virtualbox

2 Answers

9/4/2019

Next steps solved my problem:

> minikube start --vm-driver=hyperv -v 9999

If there is another error such

Error: [HYPERV_NO_VSWITCH] create: precreate: no External vswitch found. A valid vswitch must be available for this command to run

Just create a switch manually.

enter image description here

-- Phi
Source: StackOverflow

8/23/2018

I also tried running minikube with Hyper-V driver, but also get this error:

There is an explicit warning about that HyperV and vswitch situation in their docs: https://github.com/kubernetes/minikube/blob/v0.28.2/docs/drivers.md#hyperv-driver

Although in minikube's defense, it also does say right at the end the URL one should go to in order to read about the --hyperv-virtual-switch flag one should provide in addition to --vm-driver=hyperv.

Navigating to that linked docker page, it even provides a step-by-step with screenshots example of how to accomplish that.

-- mdaniel
Source: StackOverflow