Page 1 of 1

VERR_CPUM_RAISE_GP_0 with WSL2

Posted: 7. Aug 2020, 17:35
by teks
I have been successfully running Ubuntu 18.04 under VirtualBox 6.1 on Windows 10 Pro for some time. Unfortunately, after installing WSL2 (with Win 10 insider Build 20180), I can no longer run VMs.

In order to support WSL2 with GPU access, I installed Windows 10 Pro Insider Preview (Build 20180.rs_prerelease.200725-1714)
  • I am no longer able to run any VirtualBox VMs. They launch, but then I get a black screen with a flashing cursor.
  • The sessions were run from a full power-off state
  • VBox.log attached
  • In general, I am always seeing the following error in the log:
  • "MsrExit/0: 0010:ffffffff8ce767fa/LM: RDMSR 00000140 -> 00000000 / VERR_CPUM_RAISE_GP_0"
  • I did also try updating to Win 10 Build 20185, but that caused the VirtualBox app itself to trigger a Program Compatibility Assistant. I could then disable "Memory Protection" in order to proceed with running VirtualBox. But again, the VMs gave the same error as above. I have now rolled back my Win 10 to Build 20180.
Other details:
  • VirtualBox 6.1.12 r139181
  • CPU: Intel i7-10750H
  • GPU: GeForce RTX 2060
  • WSL 2, Ubuntu-18.04
  • WSL kernel: Linux msl 4.19.121-microsoft-standard #1 SMP Fri Jun 19 UTC 2020 GNU/Linux
  • Windows features: Sandbox & Hyper-V are not enabled
Any help would be greatly appreciated.

Re: VERR_CPUM_RAISE_GP_0 with WSL2

Posted: 7. Aug 2020, 17:39
by scottgus1
Turning on WSL2 enables Hyper-V, which interferes with Virtualbox in many circumstances.

Your log contains these lines:
{timestamp} HM: HMR3Init: Attempting fall back to NEM: VT-x is not available
{timestamp} NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...

You might notice in the guest window's Status Bar the green turtle: Image The choice of animal is appropriate: Your guest is running, just really slow. Or it might guru-meditate or crash. This is because a service that uses Microsoft Hyper-V is running on your host PC. Normally Hyper-V blocks Virtualbox. But your PC is of the type and OS where Virtualbox can attempt to run the guest using the Hyper-V engine. This arrangement is still being developed and isn't 100% yet.

If VirtualBox is running without Hyper-V enabled, and nothing else is interfering with hardware virtualization (VT-x / AMD-V), then the usual virtualization icon (Image) will be seen in the Status Bar.

To turn Hyper-V off completely, do this:

1. Shut down all programs. You will have to reboot your host.

2. Look into I have a 64bit host, but can't install 64bit guests, 2nd post, points 2 & 3 and ensure that none of these things are running.

3. Find the Command Prompt icon, right click it and choose Run As Administrator.

4. Enter this command:
bcdedit /set hypervisorlaunchtype off
5. Enter this command:
shutdown -s -t 2
6. When the computer turns off, unplug it for 20 seconds. Then plug it in again and boot up Windows 10.

Your Virtualbox should be running now. If the green turtle still appears and the tell-tale lines are in the log, try all the steps again. If you don't get the standard virtualization icon, post back exactly what you did and we'll try to help some more.

For further info, see https://www.tenforums.com/tutorials/139 ... puter.html

Re: VERR_CPUM_RAISE_GP_0 with WSL2

Posted: 7. Aug 2020, 18:11
by teks
Fantastic... thank you VERY much for the fast response and precise details.
This appears to have resolved my issue -- I was thinking this issue may lead me to uninstall WSL2 and the Insider build.

For reference, I had already ensured that the OptionalFeatures (Hyper-V, Sandbox) were disabled, the Device Guard was disabled and the Core Isolation features were disabled.

The missing piece might have been the "Virtual Machine Platform" OptionalFeature. This was enabled.
After disabling this and issuing "bcdedit /set hypervisorlaunchtype off", my VMs no longer show the green turtle.
They now show the VT-x/AMD-V execution engine in use and properly launch my VMs.

Thanks again!

Re: VERR_CPUM_RAISE_GP_0 with WSL2

Posted: 7. Aug 2020, 18:12
by scottgus1
teks wrote:Virtual Machine Platform
That's probably the big cat on campus.

Glad you're up and running!

Re: VERR_CPUM_RAISE_GP_0 with WSL2

Posted: 7. Aug 2020, 19:03
by teks
Sorry, it looks like I may have spoken a little too soon...

Upon trying to re-launch WSL2, I see that it now fails as the Virtual Machine Platform is not enabled.

Does this mean that one would need to manually swap in/out the Windows feature every time they wanted to switch between VirtualBox and WSL2? ie. is it possible to run both concurrently given your comments above regarding Hyper-V?

Out of interest, I did try re-enabling VMP, but I still encountered the same error in WSL. Looks like I may need to undo the disables applied above (eg. hypervisorlaunchtype).

thanks

Re: VERR_CPUM_RAISE_GP_0 with WSL2

Posted: 7. Aug 2020, 19:09
by scottgus1
teks wrote:is it possible to run both concurrently
Maybe one day, and with somebody's PC, but not now on yours. :lol:

You can look over the VirtualBox 6.0 and Hyper-V to see the unfolding saga. Sometimes Virtualbox can run under Hyper-V in some circumstances on some folks' PCs. Others fail. FWIW we usually only hear of the failures.

The tenforum link in my post above shows a during-boot click switch that can turn Hyper-V on and off before Windows 10 boots. You can then choose to run Hyper-V or Virtualbox.

Re: VERR_CPUM_RAISE_GP_0 with WSL2

Posted: 9. Aug 2020, 05:22
by teks
Thank you very much, scottgus1 for the reality check -- that is quite the saga! I had read some inconsistent reports regarding Hyper-V so I thought I should double-check on the current status before wiping my Windows 10 Insider build -- VirtualBox is more important to me than WSL2 + GPU passthrough. The boot option could be an interesting solution. Thanks again for your help!