minikube: Minikube fails to start on Hyper-V

Minikube version: v0.21.0

Environment:

  • OS: Windows 10
  • VM Driver: hyperv
  • ISO version: minikube-v0.23.0.iso
  • Install tools: ?

What happened: I did once successfully run minikube start --vm-driver=hyperv. I shut it down, restarted, and even once had to safe-boot and delete .minikube but to no avail: it’s never worked again.

Now I get this:

Microsoft Windows [Version 10.0.15063]
(c) 2017 Microsoft Corporation. All rights reserved.

C:\WINDOWS\system32>minikube start --vm-driver=hyperv
Starting local Kubernetes v1.7.0 cluster...
Starting VM...
Downloading Minikube ISO
 97.80 MB / 97.80 MB [==============================================] 100.00% 0s
E0805 22:14:37.098639    9904 start.go:129] Error starting host: Error creating host: Error executing step: Creating VM.
: exit status 1.

 Retrying.
E0805 22:14:37.102237    9904 start.go:135] Error starting host:  Error creating host: Error executing step: Creating VM.
: exit status 1
================================================================================
An error has occurred. Would you like to opt in to sending anonymized crash
information to minikube to help prevent future errors?
To opt out of these messages, run the command:
        minikube config set WantReportErrorPrompt false
================================================================================
Please enter your response [Y/n]:

What you expected to happen: I expected the cluster to come up.

How to reproduce it (as minimally and precisely as possible): On Windows 10, follow the install instructions and run Minikube. It should work the first time. After that, shut it down. If you try to run it again, and you’re unlucky like me, it might not work ever again.

Anything else do we need to know: I’m running Babun and once tried minikube start from a bash prompt. Not sure whether that’s relevant.

I’m also running Docker for Windows, but I don’t think that’s the problem because it did work once even with Docker for Windows running.

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Reactions: 1
  • Comments: 18 (3 by maintainers)

Most upvoted comments

Hi @prdoyle you may have missed a step for Hyper-V:

https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperv-driver

You need to create an ‘External address’ ‘Virtual Switch’ in Hyper-V:

https://docs.docker.com/machine/drivers/hyper-v/

and then name that when you first start your minikube:

minikube start --vm-driver hyperv ----hyperv-virtual-switch "Primary Virtual Switch"

I suggest you create the switch, and then delete and start minikube with the switch setting:

minikube delete
minikube start --vm-driver hyperv ----hyperv-virtual-switch "Primary Virtual Switch"

Running Docker for Windows at the same time is no problem. Using minikube.exe from the bash/WSL prompt is no problem.

@whereisaaron - Thanks for the newbie help on Hyper-V! I cleaned up the orphaned VMs, deleted .minikube again, and this time minikube start worked!

( I went against your advice and deleted .minikube because minikube stop and minikube delete gave errors for me.)

Same BS here! minikube wouldn’t move forward nor backward. No stop, no delete, no start, nothing worked! ALL commands just gave the dreaded "? Errors occurred <whatever command I tried...>: exit status 1 Only after deleting .minikube I finally got going again!

Thanks for the hint!

@whereisaaron - Thanks for the newbie help on Hyper-V! I cleaned up the orphaned VMs, deleted .minikube again, and this time minikube start worked!

( I went against your advice and deleted .minikube because minikube stop and minikube delete gave errors for me.)

Hi @prdoyle you may have missed a step for Hyper-V:

https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#hyperv-driver

You need to create an ‘External address’ ‘Virtual Switch’ in Hyper-V:

https://docs.docker.com/machine/drivers/hyper-v/

and then name that when you first start your minikube:

minikube start --vm-driver hyperv ----hyperv-virtual-switch "Primary Virtual Switch"

I suggest you create the switch, and then delete and start minikube with the switch setting:

minikube delete
minikube start --vm-driver hyperv ----hyperv-virtual-switch "Primary Virtual Switch"

Running Docker for Windows at the same time is no problem. Using minikube.exe from the bash/WSL prompt is no problem.

It worked for me. Thanks!

can you verify if you have enough diskspace? also, try to increase the verbosity of the output. Usually the cause of a failure during the “Creating VM” process is a lack of resources or missing resources, like the Virtual Switch name (case sensitive).