Information
When hypervisor is enabled at boot of computer, only Type 1 Hypervisors like Hyper-V can run virtual machines. To run virtual machines on Type 2 Hypervisors like VirtualBox or VMware, hardware Hypervisor must be turned off.
Microsoft Hyper-V is a Type 1 Hypervisor. When a Type 1 Hypervisor is enabled, Type 2 Hypervisors (VMware Workstation, VirtualBox etc.) virtual machines cannot run. Virtual machines can be created and their settings edited both in Virtual Box and VMware Workstation, but their virtual machines can't be run. When tried, an error message tells that VM cannot be started.
Error message in VirtualBox:
Error message in VMware Workstation
Both VirtualBox and VMware error messages are quite confusing, not clearly telling what the problem is.
The same is true the other way around. When hardware Hypervisor is disabled, VirtualBox and VMware virtual machines can be started, but running a Hyper-V VM shows an error message. Contrary to messages from Virtual Box and VMware it clearly tells the cause:
This is because of the difference between Type 1 (native) Hypervisors and Type 2 (hosted) Hypervisors. Type 1 must be enabled even before operating system is loaded. When enabled, even the physical Windows installation on the host computer runs on hypervisor. Type 2, hosted Hypervisors run on top of the OS. Windows is loaded first, and hypervisor only thereafter.
An image from Wikipedia article Hypervisor shows the difference better than I could ever explain:
Problem is that because Type 1 Hypervisor needs to be enabled or disabled at boot before the OS starts loading, it can't be toggled ON / OFF live when Windows is running. It always requires a restart.
This tutorial will show how to setup your Windows 10 computer to run virtual machines regardless which hypervisor is enabled and virtualization software used.
Method One: Turn Hypervisor ON or OFF as required Method Two: Create Boot Menu entries to select Hypervisor
1.1) Open an elevated Command Prompt (tutorial), run the following command:
bcdedit
1.2) This shows a list of boot entries on your computer. On the list, find your current OS with identifier {current}, and check if it has hardware Hypervisor turned ON or OFF:
(Click / tap screenshots to enlarge.)
- hypervisorlaunchtype AUTO, Hypervisor is ON and enabled
- hypervisorlaunchtype OFF, Hypervisor is OFF and disabled
1.3) If Hypervisor is ON, you can run Hyper-V virtual machines, but to run virtual machines in VirtualBox or VMware Workstation, you must turn Hypervisor OFF with following command:
bcdedit /set {current} hypervisorlaunchtype off
1.4) Restart the computer. You can now run VirtualBox and VMware Workstation virtual machines, while Hyper-V virtual machines cannot be started. To again run Hyper-V virtual machines, enter the following command and restart computer:
bcdedit /set {current} hypervisorlaunchtype auto
1.5) If your current OS has Hypervisor turned OFF, you can run VirtualBox and VMware Workstation virtual machines. To run Hyper-V virtual machines, run command shown in step 1.4 and restart, and command shown in step 1.3 when you want again run VirtualBox or VMware Workstation virtual machines.
1.6) Important to remember is that to toggle Hypervisor ON or OFF, it always requires a restart.
2.1) Check if Hypervisor is ON or OFF as told in steps 1.1 & 1.2.
2.2) Copy the current OS boot entry to a new one:
- If Hypervisor in current OS is ON, use following command (#1 in next screenshot):
bcdedit /copy {current} /d "W10 No Hypervisor"
- If Hypervisor in current OS is OFF use following command:
bcdedit /copy {current} /d "W10 With Hypervisor"
2.3) The new boot entry will be added last to list. Note its identifier (#2 in next screenshot). In my example case now, my current OS has Hypervisor ON. To edit the new boot entry to turn HyperVisor OFF, I enter the following command (#3 in next screenshot):
bcdedit /set {identifier of new entry} hypervisorlaunchtype off
2.4) If Hypervisor on your current OS is turned OFF, turn it ON in new boot entry with following command:
bcdedit /set {identifier of new entry} hypervisorlaunchtype auto
2.5) Restart the computer. In this example case now, as my default OS has Hypervisor ON allowing Hyper-V virtual machines to run (#1 in next screenshot), selecting No Hypervisor option (#2) allows me to boot to Windows 10 with hypervisor OFF to run VirtualBox or VMware virtual machines:
If your default OS has Hypervisor OFF, you could select option 2 to run Windows 10 with Hypervisor, allowing you to run Hyper-V virtual machines.
That's it, geeks. Easy and fast to turn Hypervisor ON or OFF, depending on which virtualization software you want to use to run virtual machines.
Kari+