minikube: hyperv: Error starting stopped host: exit status 1 (no IP)

Is this a BUG REPORT or FEATURE REQUEST? (choose one):

Bug

Please provide the following details:

Environment:

Minikube version (use minikube version): v0.22.1

  • OS : Windows 10 64bit Pro
  • VM Driver : hyperv
  • ISO version : v0.23.3
  • Install tools: download from the link

What happened:

PS C:\Users\tw0517tw> minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch" --v=0
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
E0915 14:57:49.889147   17168 start.go:143] Error starting host: Error starting stopped host: exit status 1.

 Retrying.
E0915 14:57:49.892146   17168 start.go:149] Error starting host:  Error starting stopped host: exit status 1
PS C:\Users\tw0517tw> minikube stop
Stopping local Kubernetes cluster...
Error stopping machine:  Error stopping host: minikube: exit status 1
PS C:\Users\tw0517tw> minikube delete
Deleting local Kubernetes cluster...
Errors occurred deleting machine:  exit status 1
PS C:\Users\tw0517tw> minikube start --vm-driver hyperv --hyperv-virtual-switch "Primary Virtual Switch" --v=0
Starting local Kubernetes v1.7.5 cluster...
Starting VM...
E0915 14:58:16.971930   16436 start.go:143] Error starting host: Error creating host: Error executing step: Creating VM.
: exit status 1.

 Retrying.
E0915 14:58:16.977940   16436 start.go:149] Error starting host:  Error creating host: Error executing step: Creating VM.
: exit status 1

What you expected to happen:

Start minikube cluster

How to reproduce it (as minimally and precisely as possible):

Follow install instructions, including setup virtual switch.

Anything else do we need to know:

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 11
  • Comments: 37 (5 by maintainers)

Most upvoted comments

@ohdihe

  1. Create a “minikube” external Hyper-V virtual switch.
  2. Put minikube.exe into a folder on a disk (e.g. k:\minikube).
  3. Add the folder to PATH.
  4. Create a folder on the same logical disk as the minikube.exe’s folder (e.g. k:\minikube_home).
  5. Set MINIKUBE_HOME env var to the folder in p. 4
  6. CD to the minikube.exe’s folder.
  7. minikube start --vm-driver="hyperv" --memory=4096 --cpus=4 --hyperv-virtual-switch="minikube" --v=7 --alsologtostderr

@vasily-kirichenko tks very much!

The p. 4 is important!

and exec minukube delete .

Same error on win 10:

$ minikube start --vm-driver "hyperv" -v5
Starting local Kubernetes v1.9.0 cluster...
Starting VM...
E0203 07:11:50.162252    6008 start.go:159] Error starting host: Error starting stopped host: exit status 1.

 Retrying.
E0203 07:11:50.164254    6008 start.go:165] Error starting host:  Error starting stopped host: exit status 1

Have you tried with an elevated command?

@madisonleavo your observation was right on. Thanks!

So I created two vswitches - primary (for LAN line) and one wireless-vswitch for wireless.

minikube start --vm-driver hyperv --hyperv-virtual-switch “Primary Virtual Switch” or minikube start --vm-driver hyperv --hyperv-virtual-switch “Wireless Virtual Switch”

minikube-primary-vlan

minikube-wireless-vlan

ok I think it’s #1945 now. closing.

What worked for me was this. (similar to 007souvikdas answer). I didn’t manually create a .minikube directory at but installed minikube using chocolatey.

Make sure you have an Virtual Switch set up as mentioned here before and your command line runs as Administrator

  1. Stop and delete Virtual Macine
  2. run ‘minikube delete’ in command line (it exits with an error but thats ok, if you installed via chocolatey like i did also delete the .minikube folder from C:\Users\YourUserName)
  3. run ‘minikube start --vm-driver=“hyperv” --hyperv-virtual-switch=“nameofyourswitch”’

after that. Give it time. It took 5 minutes to go through the complete process for me

Got it to work. Rolled back to 0.27 and reinstalled kubectl Steps:

  1. Stop and delete VM minikube in hyperv.
  2. Delete .minikube directory
  3. re-install --force minikube 0.27 (4. re-install --force kubectl.)

Maybe you all notice better than me, but mine ended up being I bound my virtual switch to wifi instead of ethernet.

Confirmed. Need to run Powershell as administrator so that minikube can create a .minikube directory in the default MINIKUBE_HOME directory ($HOME). For me that was c:\users\stealthfox\

Had the same issue in minikube version 0.28.2. Here’s what worked for me. I started the minikube without specifying the virtual switch. $ minikube start --vm-driver hyperv Also I edited the settings for VM in Hyper-V manager e.g. allocating explicitly 1024 MB memory and disabling the dynamic memory. I think enabled dynamic memory is creating issues. Not sure though. capture

Had the same issue in minikube version: v0.28.2. Fixed by explicitly adding –memory=2048 parameter to “minikube.exe start --vm-driver=hyperv --hyperv-virtual-switch=<switch_name>” command (together with all previous tricks like setting MINIKUBE_HOME env variable, etc. )