kubernetes / minikube

Run Kubernetes locally
https://minikube.sigs.k8s.io/
Apache License 2.0
29.15k stars 4.87k forks source link

Document work arround for "VirtualBox/Hyper-V conflict: WHvSetupPartition failed - VERR_NEM_VM_CREATE_FAILED" #4587

Open xyombo opened 5 years ago

xyombo commented 5 years ago
tstromberg commented 5 years ago

This appears to be due to VirtualBox attempting to use HyperV as a backend, but failing for some reason: https://forums.virtualbox.org/viewtopic.php?f=6&t=92260

I had no idea that this was even possible with HyperV. I wonder if anyone else has gotten this configuration to work?

tstromberg commented 5 years ago

你使用的是什么版本的virtualbox?

0rtem commented 5 years ago

hi, try next article https://www.windows-commandline.com/run-command-windows-features-turn-on-off/

versusversus commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

AdamSEY commented 5 years ago

bcdedit /set hypervisorlaunchtype off works for me

avant-rs6 commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

果然关闭hyper-v就可以了 不是说virtualBox6.0+可以直接运行的吗

rickgode commented 5 years ago

bcdedit /set hypervisorlaunchtype off works for me

This worked for me as well!

Ricky

pvlad98 commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Thx a lot,it fixed everything!

CristianTrejo commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

This worked for me. Thanks!

SLKTH commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

This works.

georgeraveen commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

This works. thanks a lot

medyagh commented 5 years ago

now that there is a solution ! I suggest this be added to the solution message !

dubiza commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Anyone using WSL2 after running this commmand? Does WSL2 still work?

Enoxime commented 5 years ago

Anyone using WSL2 after running this commmand? Does WSL2 still work?

Works for me with Ubuntu even when installing Debian.

rlabrecque commented 5 years ago

WSL2 doesn't seem to work for me anymore after doing so. :/

thinszx commented 5 years ago

WSL2 doesn't seem to work for me anymore after doing so. :/

WSL 2 is now using virtualization technology (based on Hyper-V) so it won't work as well after shutting down hyper-v support😟

bhavanikp84 commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

This works.

Thanks, This worked!!

TomLewis commented 5 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Thanks this worked!

heiniovason commented 5 years ago

Even though I deactivated Hyper-v in "Turn on/off windows features" I still had to run "bcdedit /set hypervisorlaunchtype off" in CMD. Thank god I found this discussion, or I'd have to setup my dev env all over again ...

PocketWatchr commented 5 years ago

So, when I put in the bcdedit /set hypervisorlaunchtype off thing, I get "The boot configuration data store could not be opened. Access is denied."

ericchansen commented 5 years ago

@TheDarkestPlays Same issue here.

kalhua commented 5 years ago

So, when I put in the bcdedit /set hypervisorlaunchtype off thing, I get "The boot configuration data store could not be opened. Access is denied."

You have to run CMD as administrator (right click, Run as administrator)

anjia0532 commented 5 years ago

@TheDarkestPlays @ericchansen Win+R -> cmd -> Ctrl+Shift+Enter -> bcdedit /set hypervisorlaunchtype off -> reboot your system -> startup your vbox vms

ShivaKumar-Varikuppala commented 5 years ago

bcdedit /set hypervisorlaunchtype off works for me

then how to off?

tag commented 5 years ago

For posterity's sake: I had a student experiencing the "vbox: WHvSetupPartition failed" error. She should have been running via Hypervisor, but may have been experiencing a conflict between Docker Desktop and Docker Toolbox. Uninstalling VirtualBox and all things Docker via Windows Add/Remove programs may have been what fixed her issue.

In my meddling, I had run the command above (bcdedit /set hypervisorlaunchtype off), which caused Docker Desktop to not start. Even though virtualization was enabled in BIOS, and all the windows settings pointed to hypervisor being enabled, Docker still wasn't working.

I had to undo my mistake with bcdedit /deletevalue hypervisorlaunchtype, and restart, then everything began to work as expected.

Also, FYI to future searchers who land on this page, bcdedit /enum lists current settings.

michael-golden commented 4 years ago

bcdedit /set hypervisorlaunchtype off works for me

This worked for me. Thanks!

Okaada commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Works for me

shvi0888 commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Thanks works for me!!

inigopascall commented 4 years ago

In my case this was because I had Windows Sandbox enabled. Disabling this in 'Turn Windows features on or off' and restarting my machine solved the issue.

Stanley-Yao commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Thank god,it wooooorks for me, what happened here?

ericjhl commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Thanks a lot, it works for me.

kalhua commented 4 years ago

The bcedit thing did not work for me. Actually it was due to the core isolation security. I disabled it and Virtualbox now works like a charm.

Windows Defender Security Center> Device Security> Core isolation > Memory integrity : off

https://forums.virtualbox.org/viewtopic.php?p=417512&sid=dab40dbc19d96086d6009ffae8554b92#p417512

diegolsr commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

This worked for me. Thanks!

sensesnet commented 4 years ago

Thank you so much!!!!

messy80 commented 4 years ago

CMD > bcdedit /set hypervisorlaunchtype off

did NOT work for me :( (it def ran successfully).

I have Windows 10 enterprise, 1903, build 18362.418

In windows features there is nothing even remotely related to VM's enabled yet i still get;

Call to WHvSetupPartition failed: ERROR_SUCCESS (Last=0xc000000d/87) (VERR_NEM_VM_CREATE_FAILED). Result Code: E_FAIL (0x80004005)
Component: ConsoleWrap
Interface: IConsole {872da645-4a9b-1727-bee2-5585105b9eed}

Please help!

pawankaushal commented 4 years ago

running the VirtualBox installation again in repair mode will fix it again. I had success results with VirtualBox 6.

messy80 commented 4 years ago

running the VirtualBox installation again in repair mode will fix it again. I had success results with VirtualBox 6.

that worked thanks!

MiguelAtTweddle commented 4 years ago

What worked for me: I uninstalled the hyperV feature first and rebooted. Then I noticed the 'Call to WHvSetupPartition failed'. On reboot; I disabled everything in BIOS concerning Virtualization, but on startup windows 10 froze. Hard shutdown and enabled the Virtualization back on again in BIOS. After startup I could install a linux OS in VMBox.

MiguelAtTweddle commented 4 years ago

What worked for me: I uninstalled the hyperV feature first and rebooted. Then I noticed the 'Call to WHvSetupPartition failed'. On reboot; I disabled everything in BIOS concerning Virtualization, but on startup windows 10 froze. Hard shutdown and enabled the Virtualization back on again in BIOS. After startup I could install a linux OS in VMBox. I wouldn't recommend on using hyperV to anyone, because it has some stupid limitations I didn't know about.

devlimon commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

it solved my windows 10 problem

stimpy77 commented 4 years ago

There are a ton of people saying regarding disabling Hyper-V #MeToo "that worked" "fixed it" "this is the solution" etc. This is a lot of unnecessary spam.

But the incompatibility of Hyper-V is an ongoing issue. The fact that VirtualBox recently began supporting creating and running VMs while Hyper-V is enabled should clue all of you in that this is a fixable problem, and they haven't gotten this far yet.

As such, turning off Hyper-V is not a solution. It is a workaround, and apparently the only option available for now, since the solution is outside of the scope of kubernetes / minkube but rather between Microsoft and Oracle (Windows Hyper-V and VirtualBox).

julius-hipolito commented 4 years ago

The solution of executing in CMD (Admin) bcdedit /set hypervisorlaunchtype off did not help me.

But after reading @tag's response, I decided to do the following steps that got me running VB VMs

  1. CMD (Admin) > bcdedit /deletevalue hypervisorlaunchtype
  2. Uninstall Docker
  3. Windows Feature > Disable 'Containers'
  4. Windows Feature > Disable 'Hyper-V'
  5. Restart
  6. Attempt to start VB VMs.
nakulvr commented 4 years ago

As per the Virtualbox changelog (VirtualBox 6.0.0 onwards): Added support for using Hyper-V as the fallback execution core on Windows host, to avoid inability to run VMs at the price of reduced performance https://www.virtualbox.org/wiki/Changelog-6.0

And looking at the official documentation: Oracle VM VirtualBox can be used on a Windows host where Hyper-V is running. This is an experimental feature. No configuration is required. Oracle VM VirtualBox detects Hyper-V automatically and uses Hyper-V as the virtualization engine for the host system. The CPU icon in the VM window status bar indicates that Hyper-V is being used. https://docs.oracle.com/cd/E97728_01/F12469/html/hyperv-support.html

Has anyone had success booting a VM in VirtualBox which internally uses Hyper-V as virtualization engine?

zawmoehtike commented 4 years ago

It work for me RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

ubaid4j commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine.

Its work

broomerr commented 4 years ago

You could run VirtualBox on top of Hyper-V. But some additional actions needed.

  1. need to enable "Windows Hypervisor Platform" in OptionalFeatures.exe
  2. set "VBoxInternal/NEM/UseRing0Runloop" for virtual machine. See here how: https://superuser.com/questions/1480214/virtualbox-6-doesnt-run-with-hyper-v-enabled-on-windows-10-1903

But seams minikube not able to create new VM! Only reuse.

ghost commented 4 years ago

bcdedit /set hypervisorlaunchtype off works for me. Thanks :+1:

9ofe commented 4 years ago

RUN > CMD > bcdedit /set hypervisorlaunchtype off then reboot host machine. did not work for me :(( C:\WINDOWS\system32>bcdedit /set hypervisorlaunchtype off The boot configuration data store could not be opened. The system cannot find the file specified.

semiautomatix commented 4 years ago

Thanks for the help all.

//Disable hyper-V in Powershell PS> Disable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-All

//This has to also be set! RUN > CMD > bcdedit /set hypervisorlaunchtype off

Reboot.

Edit: don't know why the thumbs down. I just had to do it again now after a Windows update. And again it worked.

And yes, run as administrator - always run system changes as administrator!

TahseenAlaa commented 4 years ago

RUN> CMD> Right Click> Run as Administrator> bcdedit /set hypervisorlaunchtype off

then reboot host machine.