Minikube: Minikube not starting with Hyperv

Created on 19 Feb 2020  路  26Comments  路  Source: kubernetes/minikube

I had 1.5.2 and today only I uninstalled and then downloaded and installed 1.7.2. I have hyper-v installed and enabled on my machine. I executed same command that I was running on 1.5.2 but it is complaining that I don't have Hyper-V installed. I am able to run vagrant and it is able to create virtual machines in HyperV. Please let me know if you need any other information.

H:\Minikube>minikube.exe start --memory=8192 --vm-driver=hyperv
minikube v1.7.2 on Microsoft Windows 10 Enterprise 10.0.18363 Build 18363
Using the hyperv driver based on user configuration

! 'hyperv' driver reported an issue: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online failed:

X hyperv does not appear to be installed

H:\Minikube>C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe Get-WindowsOptionalFeature -FeatureName Microsoft-Hyper-V-All -Online

FeatureName : Microsoft-Hyper-V-All
DisplayName : Hyper-V
Description : Provides services and management tools for creating and running virtual machines and their
resources.
RestartRequired : Possible
State : Enabled
CustomProperties :

chyperv kinbug owindows prioritimportant-soon

Most helpful comment

Confirm, 1.7.x doesn't work
"choco install minikube --version 1.6.2 --allow-downgrade" saved the day

All 26 comments

I have same issue on Windows Server 2019. I had several minikubes running fine with1.6.2. The issue in my case is that there is no optional feature "Microsoft-Hyper-V-All". It seems the check should just be for "Microsoft-Hyper-V" feature.

I have attached output of "Get-WindowsOptionalFeature -Online -FeatureName Hyper-V".
hyperv.txt

Thought to put more information I observed. I tried 1.7.3, 1.7.2, 1.7.0 and all are broken. They are not working with Hyper-V on Windows 10. Moreover whenever I downloaded release (minikube-windows-amd64.exe), Chrome and Edge complained that this file is dangerous and chrome has blocked it. Not sure if that is related with any signature issue.
I downloaded version 1.6.2 just now and it is working perfectly fine with my hyperv. Above mentioned "Download blocking issue" didn't happen with 1.6.2.

Confirm, 1.7.x doesn't work
"choco install minikube --version 1.6.2 --allow-downgrade" saved the day

I have same issue on Windows Server 2019. I had several minikubes running fine with1.6.2. The issue in my case is that there is no optional feature "Microsoft-Hyper-V-All". It seems the check should just be for "Microsoft-Hyper-V" feature.

I run Windows 10 and also running 1.7.x all fail, while 1.6.2 works fine.

I confirm: 1.7.x fails while 1.6.2 work

I just merged #6701 which may fix this issue. Could you please try with minikube.exe built at that PR? The binaries should be available from the github action of that PR here

Please comment here if that does or doesn't resolve the bug.

I just merged #6701 which may fix this issue. Could you please try with minikube.exe built at that PR? The binaries should be available from the github action of that PR here

Please comment here if that does or doesn't resolve the bug.

This fixes only the timeout case. The hyperv feature name check needs to be modified too since on Windows Server 2019 there is no feature "Microsoft-Hyper-V-All" - I don't see it in the list of features even though I have hyper-v enabled and running fine.

I just merged #6701 which may fix this issue. Could you please try with minikube.exe built at that PR? The binaries should be available from the github action of that PR here

Please comment here if that does or doesn't resolve the bug.

Hi @priyawadhwa, I downloaded binaries you linked with PR and think those are for Linux. I am not able to see minikube.exe file. I am probably missing something on my end but please guide me on how I can test that fix on my Windows 10 machine. Thanks!

image

I'm having the same issue.

Not sure if this helps but here are my optional dependencies. All enabled and minikube still thinks hyper-v is not running:

image

minikube output:

image

Following the comments above, I tried version 1.6.2. I can get the VM to run but minikube start just hangs forever.

image

image

I just merged #6701 which may fix this issue. Could you please try with minikube.exe built at that PR? The binaries should be available from the github action of that PR here
Please comment here if that does or doesn't resolve the bug.

Hi @priyawadhwa, I downloaded binaries you linked with PR and think those are for Linux. I am not able to see minikube.exe file. I am probably missing something on my end but please guide me on how I can test that fix on my Windows 10 machine. Thanks!

image

Sorry about that @uc-msft, the executable you want is at https://storage.googleapis.com/minikube-builds/6701/minikube-windows-amd64.exe

@sharifelgamal I downloaded given file. Same issue that I discovered earlier is happening in chrome/Edge.
image

It looks like I am getting different error now after running it -
image

Please let me know if you need any other information. I can see that the machine was created in HyperV.

I hit this issue on Windows 10 (1909) today too. For the last few days, re-running minikube start would eventually get it started, but today it never got past go. Both 1.7.3 and 1.8.1 didn't work, though running the same powershell command yielded %ERRORLEVEL% of 0. Switching to 1.6.2 started up just fine.

Hi, We hit this issue today too on windows 10. Switching to 1.6.2 resolved the issue as mentionned before, any news on a 1.7 fix ?

@robrich What sort of error were you getting running minikube 1.8.1?

@sharifelgamal: rerunning I see my error message in 1.8.1 is very different. Is this a new issue?

C:\>minikube-1.8.1.exe start --hyperv-virtual-switch External
* minikube v1.8.1 on Microsoft Windows 10 Pro 10.0.18363 Build 18363
* Using the hyperv driver based on user configuration
*
X Error getting primary cp: could not find master node
*
* minikube is exiting due to an error. If the above message is not useful, open an issue:
  - https://github.com/kubernetes/minikube/issues/new/choose

... and the silly thing: 1.7.3 just worked, though it didn't 2 days ago. I blame either windows update or the reboot afterwards.

yeah, this is a different regression in 1.8.1 that's getting fixed soon. the workaround for that error is just to minikube delete and delete your .minikube directory.

1.8.2 solved it for me.

Excellent, I'm going to go ahead and close this bug. If anyone has another issue with hyper-v, feel free to open a new bug.

Confirmed the latest minikube version is not able to detect the hyper v.

I'm also having this issue with 1.9.2

Excellent, I'm going to go ahead and close this bug. If anyone has another issue with hyper-v, feel free to open a new bug.

What was the fix as I am having this issue with the later version

  • minikube v1.11.0 on Microsoft Windows 10 Pro 10.0.18362 Build 18362
  • Unable to pick a default driver. Here is what was considered, in preference order:

    • docker: Not healthy: docker container type is windows

    • hyperv: Not installed: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe @(Get-Wmiobject Win32_ComputerSystem).HypervisorPresent returned "Get-Wmiobject : The specified service does not exist as an installed service.\r\nAt line:1 char:3\r\n+ @(Get-Wmiobject Win32_ComputerSystem).HypervisorPresent\r\n+ ~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException\r\n + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand\r\n \r\n"

    • podman: Not installed: exec: "podman": executable file not found in %PATH%

    • virtualbox: Not installed: unable to find VBoxManage in $PATH

    • vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in %PATH%

    • Try specifying a --driver, or see https://minikube.sigs.k8s.io/docs/start/

I fixed mine by reconfiguring the networking in Hyper-V.

  1. In Hyper-V manager go to Virtual Switches and create a virtual switch.
    1a. I called it "External" For connection type - match the type that your computer is connected to.
    if I set it to my LAN card, then have my computer switch over to WiFi, this does not automatically change and I'll get the same error in minikube, so this must match what your computer is using to talk on the network.
    1b. set "Allow management operating system to share this network adapter". Not sure this matters but it works so I'm including it here.
  2. Delete your existing minikube "minikube delete"
  3. When that's complete (I verify this by watching whats going on in the Hyper-V manager). then
    create your new minikube by
    minikube start _--hyperv-virtual-switch=External
    (replace "External" with your switch name from step 1)
    In HyperV when minikube has finished starting if under networking on the minikube vm you should see a DHCP network address. If you don't then it probably won't work - check to make sure your using the virtual switch you created above._

What was the fix as I am having this issue with the later version

  • minikube v1.11.0 on Microsoft Windows 10 Pro 10.0.18362 Build 18362
  • Unable to pick a default driver. Here is what was considered, in preference order:

    • docker: Not healthy: docker container type is windows
    • hyperv: Not installed: C:\WINDOWS\System32\WindowsPowerShell\v1.0\powershell.exe @(Get-Wmiobject Win32_ComputerSystem).HypervisorPresent returned "Get-Wmiobject : The specified service does not exist as an installed service.\r\nAt line:1 char:3\r\n+ @(Get-Wmiobject Win32_ComputerSystem).HypervisorPresent\r\n+ ~~~~~~~~~~\r\n + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException\r\n + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand\r\n \r\n"
    • podman: Not installed: exec: "podman": executable file not found in %PATH%
    • virtualbox: Not installed: unable to find VBoxManage in $PATH
    • vmware: Not installed: exec: "docker-machine-driver-vmware": executable file not found in %PATH%
    • Try specifying a --driver, or see https://minikube.sigs.k8s.io/docs/start/

I did that now I get a new error after entering "minikube start --vm-driver hyperv --hyperv-virtual-switch "Minikube":

  • minikube v1.11.0 on Microsoft Windows 10 Pro 10.0.18362 Build 18362
  • Using the hyperv driver based on existing profile
  • Starting control plane node minikube in cluster minikube
  • Updating the running hyperv "minikube" VM ...
    ! StartHost failed, but will try again: provision: IP not found
  • Updating the running hyperv "minikube" VM ...
  • Failed to start hyperv VM. "minikube start" may fix it: provision: IP not found
    *
    X error provisioning host: Failed to start host: provision: IP not found
    *
  • minikube is exiting due to an error. If the above message is not useful, open an issue:

If you open Hyper-V manager, select the Minikube vm, then in the bottom portion select "Network". Do you see an IP address? Are you running DHCP?

I was having a similar problem as reported above. I followed in the Answer at https://stackoverflow.com/questions/60447586/hyperv-does-not-appear-to-be-installed and minikube started with no issues. Check it out.

Was this page helpful?
0 / 5 - 0 ratings