when i Turn on Windows Subsystem for Linux option in Windows features on or off
VirtualBox out an error every time i run a vm
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}
is there a way to fix the VirtualBox error without turn off wsl
Will I be able to run WSL 2 and other 3rd party virtualization tools such as VMware, or VirtualBox? Some 3rd party applications cannot work when Hyper-V is in use, which means they will not be able to run when WSL 2 is enabled, such as VMware and VirtualBox.
Yes, that's correct.
Private network—allows a virtual machine to communicate only with another virtual machine on the host. Internal network—sets up communication between the host system and the virtual machines on it. External network—connects virtual machines and the host physical network.
I found it! After much research, and trial and error, here is what enabled me to run VMs in VirtualBox on Windows 10 with Windows Subsystem for Linux installed:
In an elevated (admin) cmd.exe
or PowerShell, do:
bcdedit /set hypervisorlaunchtype off
and make sure Hyper-V and Windows Sandbox are disabled in Windows Features (which you can get to by entering OptionalFeatures.exe
at a command prompt, or via the Control Panel).
Also, Virtualisation options should be enabled in the BIOS, and I think (I don't have time to test right now) that "Virtual Machine Platform" and "Windows Hypervisor Platform" should be enabled.
VirtualBox 6.0.14, Windows Version 10.0.18362.356.
It's possible to have VirtualBox and WSL2 running at the same time on Windows 10 as well as on Windows 11! Please note that when running both in parallel, VirtualBox is then only capable of running in its slower software virtualization mode.
To setup both systems, make sure that the virtualization options are enabled in your BIOS!
wsl --install
in an elevated PowerShell or CMD (official docs)Installing WSL via the command line should automatically turn on the following Windows features:
WSL uses the Hyper-V architecture underneath but the actual Hyper-V features doesn't need to be enabled. In other words: WSL uses the Hyper-V architecture but not the Hyper-V feature (thanks @Cito).
You can find and edit the Windows features via:
OptionalFeatures.exe
into a CMD or PowerShell terminalIf you are running Windows Home, some features might not be installed on your machine. To manually add those virtualization features follow this tutorial.
If you already had WSL installed and made changes to Windows features, WSL might have stopped working all together. Especially when WSL was installed via one of the old methods (not via the wsl --install
command line). To repair the WSL installation, you can do the following:
wsl --install
If you see this green turtle symbol in the guest window's status bar, VirtualBox is running in software virtualization mode (which is really slow!). The hardware virtualization mode would be displayed with this blue symbol .
When running in software mode, the reason is most probably an active WSL setup, which relies on the Hyper-V architecture. Another reason could be the Hyper-V features to be turned on. To get back to hardware virtualization mode, make sure that the following features are turned off:
and that the hypervisorlaunchtype
is set to off
in the Windows Boot Configuration Data (BCD) store. To do so, run the following commands from an elevated command line:
bcdedit /set hypervisorlaunchtype off
After changing the BCD, a reboot is required.
For more information on:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With