Post

Fixing Virtualbox lag on macOS Monterey ๐Ÿ”ง

Introduction

If you are using Mac and running Linux virtual machines on virtual box, you might have experienced slowness and lags compared to using VMWare Fusion. This blog is a quick fix to this problem.

Why it happens

There are no official statements from virtual box addressing the problem directly. Only bits and pieces of information around the community forums and blogs provide a clue on lack of support for retina 4k display.

How to resolve

After looking around for resolution, I come across a forum post to run Virtualbox in low resolution as per the screenshot below.

Virtualbox forum

Here are the steps to resolution.

  1. Navigate to Apps folder. Choose VirtualBox.app
  2. Right-click on VirtualBox.app, Show Package Contents.
  3. Contents -> Resources -> VirtualBoxVM (right-click -> Get info)
  4. Check the โ€œOpen in Low Resolutionโ€ checkbox.
  5. Run the Virtual Machine in 100% scale mode.

Wait, I canโ€™t find the Open in Low-Resolution option anymore

Indeed, in newer macOS Monterey version 12 and above you will not be able to find that option anymore following the above steps for the solution.

No resolution option

To work around this, you will instead have to edit a variable within the info.plist file instead.

info.plist location

As a sudoer (Admin user), you will need to edit this variable from

1
<key>NSHighResolutionCapable</key> <true/>

to

1
<code>NSHighResolutionCapable</key> <false/>

You can either use vi or vscode to edit this.

To edit from the terminal with vi, run the following command.

1
sudo vi /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Info.plist

To edit using vscode. (You will be prompted for admin password)

1
sudo code /Applications/VirtualBox.app/Contents/Resources/VirtualBoxVM.app/Contents/Info.plist

Search for NSHighResolutionCapable within the XML file and change the value to false. This fix has worked well for me for my labs bringing up and destroying virtual machines with vagrant and Virtualbox.

This post is licensed under CC BY 4.0 by the author.