HMR3Init: Attempting fall back to NEM (Hyper-V is active)

Post Reply
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

HMR3Init: Attempting fall back to NEM (Hyper-V is active)

Post by scottgus1 »

If your VM's vbox.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...

or

{timestamp} HM: HMR3Init: Attempting fall back to NEM: AMD-V is not available
{timestamp} NEM: WHvCapabilityCodeHypervisorPresent is TRUE, so this might work...


This is because a service that uses Microsoft Hyper-V is running on your host PC.

Windows Home users:
Hyper-V exists on Home too, and several services can be made to use it. Only the ability to run Hyper-V virtual machines is not available in Home.

About the "Windows Features" box:
Microsoft changes the names of things in their "Windows Features" box at times. You may not specifically see a "Hyper-V" checkbox, but anything based on the underlying Hyper-V hypervisor will turn on Hyper-V and cause trouble. Generally, trying to disable Hyper-V by unchecking boxes in "Windows Features" often does not disable Hyper-V.

You might notice in the guest window's Status Bar the green turtle: Image This little fellow shows up when host Hyper-V is active. The choice of animal is appropriate: Your guest is running, just really slow. Or it might guru-meditate or crash. Or guest OS's won't properly hash their update files or ISOs.

Normally Hyper-V blocks Virtualbox. Hyper-V is a type-1 hypervisor, which accesses the hardware first before any OS runs, and therefore interferes with other programs that need "virtualization technology", like Virtualbox, which is a type-2 Hypervisor.

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 shut down, unplug, and restart 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:
Hypervisor protected Code Integrity (HVCI), also known as Memory Integrity (see fth0's post below)
DeviceGuard (See InfoSecDr's post below)
Memory Integrity (See fth0's post below)
Secure Core (See Mpack's post below)
CredentialGuard
Windows Defender's Core Isolation
Memory Protection (see Stickybit's and UliBär's posts below


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

4. Enter this command:

bcdedit /set hypervisorlaunchtype off

Some report this command was needed also:

DISM /Online /Disable-Feature:Microsoft-Hyper-V

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 again. (Some laptops have built-in unremovable batteries. These devices may have a BIOS switch that can "deactivate" the battery, which could cause the unplug needed for this step.)

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.

If your computer is running in a corporate environment with IT overlords, they may have forced Hyper-V, and none of the above will help. You will have to get IT to turn off Hyper-V so that you can run Virtualbox.

For further info, and a method to switch Hyper-V on or off at boot so you can run Hyper-V or Virtualbox (not both at the same time), see https://www.tenforums.com/tutorials/139 ... puter.html. Also see https://petri.com/how-to-disable-hyper- ... windows-10, found by user "B1tm4p75".
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: HMR3Init: Attempting fall back to NEM (Hyper-V is active)

Post by scottgus1 »

User "InfoSecDr" reports that further disabling of one of Windows' "DeviceGuard" settings in the registry might be necessary to get Hyper-V to disable:
viewtopic.php?f=6&t=105887&p=517076#p517076
InfoSecDr wrote:Computer\HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\DeviceGuard\Scenarios\SystemGuard

I set the Enabled REG_DWORD value to 0 and rebooted the machine.
User "massimo-ecs" reports this key as another place to disable on Windows 11:
viewtopic.php?p=544347#p544347
massimo-ecs wrote:Computer -> HKEY_local_machine -> system -> CurrentControlSet -> Control -> DeviceGuard
-> EnableVirtualizationBaseSecurity -> put to 0
This one may need to be re-added to the registry at each host boot. A registry batch file may be usable to make the registry change at each host start-up.

Disabling DeviceGuard is one of the things called for above to disable Hyper-V.
fth0
Volunteer
Posts: 5661
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: PUEL
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: HMR3Init: Attempting fall back to NEM (Hyper-V is active)

Post by fth0 »

TL;DR: In new Windows 11 (and perhaps also Windows 10) installations, you have to disable Memory Integrity to get rid of Hyper-V, in addition to using the bcdedit /set hypervisorlaunchtype off command.

A few annotations regarding the Windows security feature known as Memory Integrity:

In new Windows 11 installations, Hypervisor protected Code Integrity (HVCI), also known as Memory Integrity, is enabled by default (see Hypervisor-protected Code Integrity enablement). HVCI is a Virtualization Based Security (VBS) feature that leverages the Windows Hypervisor (Hyper-V).

While many uses of the Windows Hypervisor (Hyper-V) can be prevented with the bcdedit /set hypervisorlaunchtype off command, this does not hold true for the VBS features.

To turn off the Windows Memory Integrity security feature, on the Windows host navigate to Start > Settings > Update & Security > Windows Security > Device security > Core isolation > Memory integrity. Alternatively, you can disable VBS completely in the Group Policy Editor under Computer Configuration > Administrative Templates > System > Device Guard > Turn On Virtualization Based Security.
mpack
Site Moderator
Posts: 39156
Joined: 4. Sep 2008, 17:09
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Mostly XP

Re: HMR3Init: Attempting fall back to NEM (Hyper-V is active)

Post by mpack »

As they always have, Microsoft have a new way to mess with us.

Now it comes in the form of a new BIOS option called "Secured core". This effectively enables Hyper-v at BIOS level.

Like the other BIOS level security mechanism discussed above, this feature needs to be turned off if you want your PC to belong to you and not to Microsoft.
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: HMR3Init: Attempting fall back to NEM (Hyper-V is active)

Post by scottgus1 »

User "Stickybit" reports a BIOS setting on at least Lenovo PCs called "Memory Protection" which forces Hyper-V.
viewtopic.php?p=544464#p544464

This may be similar to Mpack's post above about BIOS-controlled "Secured Core".
scottgus1
Site Moderator
Posts: 20965
Joined: 30. Dec 2009, 20:14
Primary OS: MS Windows 10
VBox Version: PUEL
Guest OSses: Windows, Linux

Re: HMR3Init: Attempting fall back to NEM (Hyper-V is active)

Post by scottgus1 »

User "UliBär" reports here viewtopic.php?p=546063#p546063 that Memory Protection may be turned off by issuing this command in a Run-As-Administrator command prompt:

bcdedit /set vsmlaunchtype Off

Note that this command is different than the bcdedit command in the first post in this topic.
Post Reply