VirtualBox very slow on Windows 10

Posted

I found that Oracle VM VirtualBox 6.1 was running very slowly on my brand new Windows 10 PC.

Initially I thought it was to do with VirtualBox, e.g. insufficient cores or memory, the display controller (VBoxSVGA), insufficient video memory, etc. And then I thought it might be an AMD thing, so had a look at BIOS, e.g. nested AMD-V, etc.

The Problem

Only much later, did I discover the problem was that I had the Windows Subsystem for Linux 2 (WSL2) installed, and WSL2 requires the Windows Hypervisor Platform, which in turn does not play nice with VirtualBox.

The Solution

The solution is to turn off Hyper-V when not required, e.g. for gaming or when using VirtualBox. You can’t have it both ways and have Hyper-V and VirtualBox running simultaneously.

The usual warnings and disclaimers apply! Don’t trust me, but verify everything, thanks!

The best way to do this was to create two Windows boot entry - one with and one without Hyper-V, based on this guide - Use Windows 10 bootmanager to enable Hyper-V and Other Virtual Devices in Same Computer.

Since Hyper-V was running at the time, I did this:

  1. Open the Command Prompt as Administrator, i.e. from the start menu, Windows System > right-click Command Prompt > expand More and select Run as administrator.
  2. Next, create a new boot entry with Hyper-V enabled:
    bcdedit /copy {current} /d "Windows 10 with Hyper-V"
  3. Then, edit the current (default) boot entry to disable Hyper-V:
    bcdedit /set {current} hypervisorlaunchtype off

You’ll get success messages after each command if all goes well. Reboot, and now, before Windows starts, you’ll be greeted with a blue screen (not the blue screen) to ”Choose an operating system” with both options. Now when I select the first option (without Hyper-V), VirtualBox works like a charm.

Bonus tip - to reduce the timeout before the default option is selected automatically,

bcdedit /timeout 5

Good luck.