Forgive me, Reader, for I have sinned. I has been nearly 3 years since my last blog entry. The truth is, I haven't had much to say that was worthy of more than a basic social media post -- until today.
For my current work, I was assigned a new laptop. It's a real powerhouse machine with 14 processor cores and 64 gigs of ram. It should be perfect for running my development environment in a virtual machine, but it wasn't. VirtualBox was barely starting, and no matter how many features I turned off, it could never really run right. Here's what I learned, and some links to helpful articles.
Starting in the most recent updates of Windows 10 and Windows 11, Microsoft seems to turn on their own "Hypervisor" (called Hyper-V) by default to do several things related to security. The problem is, if Hyper-V is enabled, other hypervisors like VMWARE and VirtualBox don't run well at all. My specific issues were with Virtualbox so I'll reference that here the most but the same rules apply to other hypervisors.
When you try to run a 64 bit virtual machine in VirtualBox, if Hyper-V is running, you can't use the usual "DEFAULT" virtualization interface. In the latest versions of VirtualBox you CAN choose Hyper-V as an option, but it runs REALLY badly.
The short answer is that you need to turn off Hyper-V -- but it's not that easy.
NOTE: I'm told that the Microsoft Linux Subsystem 2 also uses Hyper-V so if you follow these directions you may find it incompatible with that tool.
Part 1: How Can you tell?
This was maybe the most frustrating part of the whole process of solving the problem. You can't just look at the services list and turn off "Hyper-V" because that's only part of the configuration. I found the most reliable way to tell is to run "System Information". Look near the bottom of the "System Summary" list for an entry that says "A hypervisor has been detected". If you see that line entry, than something is causing Windows to start with its own virtualization manager running.
This is NOT what you want to see:
What you would RATHER see is this:
If you manage to get your VM started with VirtuaBox, you can also tell by looking at the status bar where the "slow" icon () shows. If VirtualBox is running without Hyper-V enabled, where proper, hardware virtualization is actually available, then the standard virtualization icon () would show.
(Credit to "socratis" on virtualbox.org for that tip).
Part 2: How to turn it off
I tried a lot of things from several articles, and I'll list a few links in the section below -- but here's what I've found actually works:
1. Open a command prompt with Administrator Level privileges.
2. Enter the command:
bcdedit /set hypervisorlaunchtype off
This tells Windows not to load the hypervisor in the boot-loader sequence.
3. Enter the command:
shutdown /p
This immediately does a full shutdown and POWER OFF without warning or timeout. This is important because with modern PCs, especially laptops, just doing a shutdown and reboot doesn't REALLY always clear everything and start fresh. You really want to to make sure you're fully powering down the machine. Maybe unplug the damn thing, and if it's a laptop, remove the battery for a few seconds. I'm not kidding here. Nuke this from orbit.
Part 3: Credit where it's due, and more information
First the credit. There's a person on the VirtualBox forum ( https://forums.virtualbox.org ) with the handle "socratis", and another person who uses the handle "mpack". These people are tireless and relentless in helping troubleshoot, and their work was extremely helpful.
Now some links:
(VB Forum) I have a 64bit host, but can't install 64bit guests
(VB Forum) VirtualBox 6.0.10 fails to load VMs - Win10 64-bit
(Microsoft) A hypervisor has been detected. Features required for Hyper-V will not be displayed.
(Microsoft) Virtualization applications don't work together with Hyper-V, Device Guard, and Credential Guard
Comment Entry |
Please wait while your document is saved.