SolvedWSL Please add the fact that WSL2 is not co-exists with VirtualBox 6.0.x

wsl2-faq Will I be able to run WSL 2 and other 3rd party virtualization tools such as VMware, or VirtualBox? states:

......and versions of VirtualBox before VirtualBox 6 (VirtualBox 6.0.0 released in December 2018 now supports Hyper-V as a fallback execution core on a Windows host!)

This is quite misleading...

according to here and here, WSL2 is still not co-exists with VirtualBox 6.0.x yet.

when WSL2 is running, starting VirtualBox 6.0.x virtual machine will failed:

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}

I'm quite expecting WSL2 and VirtualBox 6.0 can running at the same time, but before that comes true, could you please correct the faq doc?
Thanks!

41 Answers

✔️Accepted Answer

Thanks @Biswa96

Since the WA

goto C:\Program Files\Oracle\VirtualBox
# for one VM
VBoxManage setextradata "<VM Name>" "VBoxInternal/NEM/UseRing0Runloop" 0
or 
# globally
VBoxManage setextradata global "VBoxInternal/NEM/UseRing0Runloop" 0

is working with

  • Win10 Insider 18990 x64 (for WSL2)
  • VirtualBox-6.1.0

I'm closing this ticket.

Other Answers:

this should be reopened. the workarounds only work for some users and even when they do the performance is terrible and the guests are still unstable and prone to crashes. yes, with VB 6.1.16

Source: https://forums.virtualbox.org/viewtopic.php?f=6&t=90853&sid=f20b0f7f51e462005f9b3be80a567617&start=120#p453078

Try this command:

VBoxManage setextradata global "VBoxInternal/NEM/UseRing0Runloop" 0

It works but very slow with type 2 hypervisor because type 1 is already in the chair.

WSL2 is not yet fit for purpose. Wasted best part of a day trying to figure out this one. Winding back to WSL1.

I too am unable to get WSL2 to work with VirtualBox. I'm running Ubuntu on both WSL and VB. When WSL2 is enabled and I start my Ubuntu in VB, I get a blank rectangular screen with a rapidly blinking cursor, which persists indefinitely. Of course, I configured HyperV for the VB VM, and made sure that HyperV was enabled in Windows Features.

What's worse, disabling WSL2 using any of the normal means doesn't restore VB to working state. Fortunately I was able to use Windows Restore to just before I installed WSL2 and it works. I did this twice; the second time I had to restore back to the first installation of WSL2, and this time I also had to reinstall ("Repair") VB.

It would be great to use WSL2, but for now I have to stick to WSL1 because I need VirtualBox; I need its ability to checkpoint.