Home » Fix for slow VirtualBox VM performance

Fix for slow VirtualBox VM performance

by Vlad Drumea
0 comments

This is a really short post covering the cause and fix for slow/poor VirtualBox VM performance on Windows hosts.

So in one of my previous posts I’ve enabled a Windows feature knowing that it tends to cause VirtualBox VMs to be extremely sluggish and even freeze and crash when enabled.

Symptoms

In my experience, the main symptoms are VirtualBox VMs being sluggish, freezing and even crashing.

What’s the cause of slow VirtualBox VM performance?

The Windows feature that is the cause for most cases of slow VirtualBox VM performance is “Virtual Machine Platform” and is required for WSL and WSL2.

If you plan on using WSL and VirtualBox VMs, you can, just not at the same time, since WSL absolutely requires Virtual Machine Platform to be enabled, while VirtualBox requires the exact opposite.

Disable Virtual Machine Platform

GUI

If you prefer to use the GUI to do this, just search the Start menu for “Turn Windows features on or off” and press Enter when it’s highlighted.
Alternatively, you can find this menu in Control Panel\All Control Panel Items\Programs and Features, it will be on the left hand side of the window.


Command line

If you’d rather do it from CMD or PowerShell, just open either of them as admin and run the following:

Terminal window showing the output of above command fix slow virtualbox vm performance

When you actually need it enabled

You can just check it in the GUI or run the following command in PS or CMD opened as admin:


Note that you might still have to restart your PC even if the /norestart option is used.

Exclude virtual disk files from AV

To avoid Windows Defender constantly scanning your virtual disk files or, if you’re a Kali Linux user, even wipe files from your VM, you’ll also need to add to the Exclusions list the directory where the virtual disk files reside.

Open PowerShell as administrator and run the following commands after updating them to match your environment.


In my case, all the VirtualBox VMs I have their files in the F:\VirtualBoxVMs directory.

If you use any other AV solution, you’ll need to add the exclusion there as well.

Assign the correct amount of RAM

For example, if you want to give a VM 12GB of RAM, don’t set the value to 12000 in VM Settings>System>Motherboard.
Instead, set it to 12288 MB.

If you need help figuring out the correct value, use a site for GB to MB conversion, like this one, and use the binary value instead of the decimal one.

Conclusion

I find it a bit funny how a feature named “Virtual Machine Platform” ends up causing slow VirtualBox VM performance, but it is what it is 🙂

You may also like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.