fbpx

VirtualBox Guest Additions: What They Are, How to Install Them on Ubuntu, Windows, and CentOS

You might already know that VirtualBox is an application that allows you to run different operating systems on the same device. While running your VirtualBox, you might have witnessed a prompt asking you to install “Guest Additions”. 

This article will help you to understand all about VirtualBox Guest Additions and how to install them on various operating systems that are currently available.

What is meant By VirtualBox Guest Additions?

VirtualBox Guest Additions are certain drivers and software applications that aim to provide better integration between the guest OS and the host system. Installing these will enhance the overall performance and interactiveness of the guest operating systems.

How are VirtualBox Guest Additions helpful?

As already mentioned, the VirtualBox guest additions allow the installed virtual machines to perform better and become more functional via a couple of drivers and system applications. Keep in mind that the virtual machine experience might not be quite smooth and perfect. 

For instance, Windows has a graphics card to display the required resolutions. But, using Windows guest OS will give you a low-resolution display by default. Such issues can be resolved via the guest additions of a VirtualBox.

These additions perform the following functions:

  • Better mouse pointer integration
  • Better sharing of folders between host and the guest OS
  • Sharing clipboard of the guest OS with the host
  • Drag and drop feature to copy or open files from host to guest and vice-versa via shared clipboard
  • Better video support
  • Easy time synchronization between host and guest

Installing VirtualBox Guest Additions

You might have a couple of different operating systems installed on your VirtualBox. Given below are the installation guides for Ubuntu, CentOS, and Windows guest operating systems. Go through all of them or the one you need.

1. Installing VirtualBox Guest Additions on Ubuntu/Linux Virtual Machine

Step 1: First, you need to update the guest operating system already installed in Ubuntu. For this you need the following commands:

$ sudo apt update
$ sudo apt upgrade

Step 2: After the upgrade is completed, you need to reboot your Ubuntu guest OS for the upgrades to take effect. Then enter the command given below to install a couple of packages required:

$ sudo apt install build-essential dkms linux-headers-$(uname -r)
virtualbox guest additions installation sudo code

Step 3: Now, go to the Ubuntu Virtual Machine menu bar and click on “Devices”. Then, from the drop-down menu, click on “Insert Guest Additions CD image”. This will mount the VirtualBox Guest Additions ISO file in the virtual machine.

Select Insert Guest Additions CD Image

Step 4: Now, a dialog box will pop up and ask you to run the installer. Click on “Run” in order to launch the guest additions.

Click Run on the VBox popup

Step 5: After that, a terminal window will open up which will perform the actual installation procedure of Virtual GuestBox Additions. Once it is done, press the Enter button and that will close this terminal.

VirtualBox Guest Addition Installation

Step 6: Now, turn off the guest OS and go to Settings. Click on “General” and then on “Advanced” from the dropdown menu. Then, you can enable the “Shared Clipboard” and “Drag n’ Drop” functionalities as per your requirements. Click on “OK” to save the changes.

Ubuntu settings

Step 7: Reboot the system and open and login to the Virtual machine to test if the additions are running fine or not with that, you have successfully installed the guest additions on your Ubuntu.

2. Installing VirtualBox Guest Additions on CentOS 8 Virtual Machine

Before beginning the installation procedure you need to mount the ‘VBoxGuestAdditions.iso” file on the guest OS via the VirtualBox GUI manager. This is an ISO file that contains the required installers for these additions. Once done with the same, you can go through the following steps to install VirtualBox guest additions on your CentOS 8 desktop:

Step 1: Go to the VirtualBox GUI Manager and start your guest virtual machine installed in CentOS.

Step 2: Log in to the guest operating system as sudo user or root. Then, install the required packages for kernel modules via the command given below:

$sudo dnf install gcc kernel-devel kernel-headers dkms make bzip2 perl

Step 3: Now click on Devices from the virtual machine menu bar. Then, click on “Insert Guest Additions CD Image” from the dropdown.

Insert Guest Additions CD Image

Step 4: Then, go to the CentOS guest terminal and enter the following commands to mount the ISO file.

$sudo mkdir -p /mnt/cdrom
$sudo mount /dev/cdrom /mnt/cdrom

Step 5: Then, type in or copy-paste the following commands. Through these, you will be able to go to the new directory and start the installation procedure:

$cd /mnt/cdrom
$sudo sh ./VBoxLinuxAdditions.run --nox11

Step 6: Reboot your CentOS guest system for the changes to become effective. 

Step 7: Now, log into the virtual machine again to verify if the installation has been successful or not. The $lsmod command will help you to verify the same and in case you don’t get an output, then it indicates that the kernel module hasn’t loaded.

3. How to Install Guest Additions on Windows Virtual Machine

Step 1: Launch the Windows Guest OS via your VirtualBox

Step 2: Click on “Devices” and then on “Insert Guest Additions CD image”

Insert Guest Additions CD image

Step 3: An AutoPlay window will pop up. You need to click on “Run VBoxWindowsAdditions.exe”

Run VBoxWindowsAdditions.exe

Step 4: Now, the User Account Control screen will come up. Click on “Yes”.

Click on yes

Step 5: The installation wizard will come up and you just need to follow along. You can click on the checkbox next to Direct3D Support as well.

Click on Next

Step 6: Now, when the installation starts, allow the installation of the Sun display adapters as well.

Click on Install

Step 7: Click on reboot for the changes to take effect.  

Conclusion

By now, you must have understood how to install VirtualBox guest additions to your Virtual Machine. These ensure better performance from guest OS and provide several cool features to work with. That was all from our side. Let us know if you have any further queries in the comments below!