Thursday, February 01, 2024

Speeding up VirtualBox Windows clients -- disable nested virtualisation

I previously used Hyper-V to run Windows clients on a Windows host. That worked well until a networking setup that I needed stopped working. After a lot of trying to get Hyper-V to work as I needed it to, I finally gave up and tried to use VirtualBox (without the extensions). The networking setup I needed was straightforward but the Windows client was painfully slow. After many hours of trying many things, it turns out all I needed to do was disable Nested virtualization. Now that that's not enabled (I don't need virtual machines to run inside the Windows client), VirtualBox is about as fast as Hyper-V was. Much more usable now and I think maybe even less memory hungry than Hyper-V used to be. But I maybe wrong about the memory. I gave Hyper-V up to (through dynamic memory allocation) 6GB of RAM and it was fine. I don't see how to get the VirtualBox VM to use memory dynamically so I've given it 2GB of RAM. It's running my automated tests very well. I'm going to have to try giving it fewer CPUs (maybe just 2 or 3) and then run two or three VMs :-). The things we do for fun :-).