Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Hyper-v and VirtualBox conflict in Dockers with Minikube

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?

like image 702
Rking14 Avatar asked Aug 22 '18 18:08

Rking14


People also ask

Is VirtualBox mandatory for minikube?

You can work on Minikube even without installing VirtualBox. Minikube also supports a --driver=none option that runs the Kubernetes components on the host and not in a VM. Using this driver requires Docker and a Linux environment but not a hypervisor. If you're using the none driver in Debian or a derivative, use the .

Does minikube require Hyper V?

Minikube depends on a container or a virtual machine manager to deploy a Kubernetes cluster. Some of the virtual machine managers it supports are Docker, Hyper kit, Hyper-V, KVM, Parallels, Podman, VirtualBox, and VMWare. Since we are using a Windows environment, we can simply use the inbuilt Hyper-V virtualization.

Does minikube use VM?

minikube can be deployed as a VM, a container, or bare-metal.


1 Answers

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.

like image 126
mdaniel Avatar answered Sep 18 '22 12:09

mdaniel