DWIM(.nl) - The Hypervisor Conundrum

DWIM(.nl)

Do What I Mean

June 21st, 2022

The Hypervisor Conundrum

Windows 11 Pro came pre-installed with a set of virtualization features:

  • Microsoft's own hypervisor: Hyper-V
    • Hyper-V Managament Tools
      • Hyper-V GUI Management Tools
      • Hyper-V Module for Windows PowerShell
    • Hyper-V Platform
      • Hyper-V Hypervisor (We'll come back to this one later)
      • Hyper-V Services
  • Virtual Machine Platform
  • Windows Hypervisor Platform
  • Windows Sandbox
  • Windows Subsystem for Linux

Despite my misgivings about Hyper-V itself, I was pleasantly surprised that WSL now included graphical abilities. It also turned out that Docker used WSL, which in retrospect was a sign of what was to come.

Last week I decided to experiment with pen-testing. The industry standard for a pen-testing lab seemed to be Kali Linux on VirtualBox. So, winget install virtualbox and I'd be ready to go. Or so I thought.

Modern computers come with hardware support for virtualization. The thing is that only one application can use this support at any one time. And on Windows that is Hyper-V, so when Hyper-V is running, other hypervisors need to access the virtualization hardware support through Hyper-V. Which makes VirtualBox painfully slow: I had ample time to admire the frames in the animated Kali-logo.

To disable all virtualization features, you need to perform some arcane magic. And with Hyper-V disabled, WSL and Docker also go out the Window (sic), so I would have to switch on a regular basis. This is highly simplified by HyperVSwitch (be careful: it reboots your machine without warning), but I would still need to restart my system every time...

Internet posts kept telling me it's possible to have WSL and VirtualBox running simultaneously, because WSL uses the Hyper-V architecture but not the Hyper-V feature. After completely uninstalling WSL (and turning of all virtualization features, and rebooting) and then wsl --install (and rebooting) only the features Virtual Machine Platform and Windows Subsystem for Linux were back on again. WSL was now running fine, but VirtualBox was crawling in software virtualization mode.

Running bcdedit /set hypervisorlaunchtype off (and rebooting) allowed VirtualBox to run in hardware virtualization mode, but now WSL stopped working: Please enable the Virtual Machine Platform Windows feature and ensure virtualization is enabled in the BIOS.

So, with hypervisorlaunchtype off, VirtualBox is fine, but WSL is not. And with hypervisorlaunchtype auto, WSL is fine, but VirtualBox is painfully slow in software virtualization mode. And switching requires a reboot. Every time.

So, after three weeks of using Windows, I am considering moving back to Linux again...

tags: windows

 WSL GUI 
 Scoop 
Loading script...