How to improve Linux performance in a VirtualBox

Because of the default virtual machine settings, VirtualBox virtual machines are slow. If you use VirtualBox to run Linux, you may realize that performance is lacking and seek ways to increase it.

You can improve the performance of your Linux virtual machine by refining your VirtualBox settings. Follow this guide as we show you how to repair your VirtualBox virtual machine! Are you looking for an alternative to VirtualBox? We have some suggestions.

Install the guest add-ons

The first step is to install the Guest Add-ons on the slow VirtualBox virtual machine. Those? Guest add-ons come with several VirtualBox enhancements, drivers, and enhancements that can significantly improve the speed and responsiveness of your virtual machine.

Install Guest Add-ons, start the virtual machine, and upload it to the operating system installed. Then, press the Right Ctrl key to access the Virtualbox virtual machine controls while the operating system runs.

After pressing the Right Ctrl key, find the “Tools” menu and click on it with the mouse. From here, see and click “Insert Guest Additions CD Image.” Virtualbox automatically downloads the Guest Additions ISO file and inserts it into the virtual machine.

Note: If Virtualbox cannot download the ISO automatically, grab this ISO image and insert it into the virtual machine by clicking the CD icon and selecting the “Select Disk Image” button.

After inserting the Guest Additions ISO file, return to the Virtualbox virtual machine and open the terminal window. To start the Linux terminal window, press the button on the virtual machine to the left Ctrl + Shift + T or Left Ctrl + Alt + T. Then, in an open terminal window, use the CD command below.

cd /media/$USER/VBox_*

Obsession

cd /media/cdrom

Run the “autorun.sh” script in the Guest Additions directory.

sudo sh autorun.sh

Allow the script to install VirtualBox Guest Additions on the virtual machine. When the process is complete, restart the virtual machine.

Grow the seeds on the virtual machine

Users of virtual boxes who have set up a Linux virtual machine would do so with CPU cores in mind. I go with one of the default settings and then wonder why their virtual machine is slow. Change how many cores the virtual machine can use to make it a little faster.

To get started, determine how many cores the host CPU contains. You can find this information by reviewing your computer or CPU manual.

Once you have determined how many cores are on the host, read the list below to determine how many cores are specified by the VirtualBox.

  • 4-core host CPUs must use two cores.
  • 6-core host CPUs must use 2-4 cores.
  • 8-12-core host CPUs must use at least four cores.

Once you have determined how many cores to use, turn off the VirtualBox virtual machine, select it in the VirtualBox user interface, right-click on it, and select “Settings.”

In the “Settings” section, find “System” and click on it with the mouse. Then locate the Processor tab.

Find the “Processor (s)” area and drag the slider to the desired amount of core. Click “OK” to save the settings.

Increase video memory allocation

VirtualBox has a low default video setting. It can only allow about 16 MB of video memory for the guest operating system. If you want to improve the speed of your virtual machine, it is vital to increase your video memory allocation.

To change the video memory allocation in a VirtualBox, do the following. Turn off the virtual machine first. Then right-click on it in the VirtualBox user interface, open the right-click menu, and select “Settings.”

Find “Display” and click on it with your mouse in Settings. Find the “Video Memory” slider and set it to 128 MB. Then click “OK” to apply the changes to the virtual machine.

Increase virtual RAM

The amount of RAM selected by default in VirtualBox is relatively small. Roughly 1024 MB. This amount is enough to run a primary Linux distribution, but if you want to do some serious work, you need to increase RAM.

Close the virtual machine in VirtualBox and turn it off to increase virtual RAM. Then right-click on it in the VBox user interface and right-click on “Settings.”

In the “Settings” window, click “System.” Then find the “Motherboard” tab and click on it. From here, locate “Basic Memory” and drag the slider to the desired amount of RAM (at least 2-3 GB).

After raising the RAM of the virtual machine, click “OK” to make the changes.

Use a light table in the virtual machine.

There are many changes from hardware to VirtualBox, which improves the virtual machine’s performance, and we discussed this in an article today. However, if the Linux virtual machine is running slowly, you should consider the desktop environment.

Most Linux distributions use Gnome Shell or KDE Plasma. These desktops are very heavy and not great for virtualization. Instead, consider installing a lighter desktop environment that requires much fewer system resources and is more responsive in a virtual machine such as LXQt, XFCE4, Mate, or Enlightenment.

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button