10

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
  • 325
  • 2
  • 5
  • 17

4 Answers4

4

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
  • 31,240
  • 5
  • 55
  • 58
1

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
  • 504
  • 3
  • 13
  • 30
0

I have a similar problem and next command resolve the problem:

minikube delete
izik f
  • 2,387
  • 2
  • 16
  • 17
0

try this..

make sure docker is running

open Hyper-V Manager

go to Hyper Switch Manager

create a new virtual switch for internal use

name it for example switch01 then press apply or ok

enter image description here

then execute the following commands in cmd or power shell

minikube delete

minikube start --hyperv-virtual-switch=switch01

docker-machine create -d hyperv --hyperv-virtual-switch switch01 default

Mahmoud
  • 111
  • 4