VirtualBox Guest Additions is a set of tools designed to improve the integration between the host system and a virtual machine (VM) running on VirtualBox. For an Ubuntu VM, these additions enable features such as improved video performance, seamless mouse movement between the host and guest, dynamic screen resizing, shared folders, and shared clipboard functionality. Installing Guest Additions is essential for optimizing the performance and user experience when using an Ubuntu VM in VirtualBox.
The installation process involves inserting the Guest Additions CD Image, installing the necessary software packages, and running the provided installation script. These steps ensure that the guest operating system can communicate effectively with the VirtualBox environment and take full advantage of the additional features. Without the installation of these tools, the user may face limited integration between the host and guest systems.
Whether you are using Ubuntu Desktop or Ubuntu Server, the steps for installing Guest Additions are straightforward. This guide will cover how to install them using both the graphical interface and command-line interface (CLI), ensuring compatibility and improved usability for your virtual machine environment.
Steps to install VirtualBox Guest Additions on Ubuntu VM:
- Start the Ubuntu VM in VirtualBox.
- Ensure the VM is up to date.
$ sudo apt update $ sudo apt upgrade -y
- Install the required build tools for compiling the Guest Additions modules.
$ sudo apt install build-essential dkms linux-headers-$(uname -r) -y
- In the VirtualBox window, go to the top menu and click Devices, then select Insert Guest Additions CD Image.
- Mount the Guest Additions ISO.
$ sudo mkdir /media/guestadditions $ sudo mount /dev/cdrom /media/guestadditions
- Run the Guest Additions installation script.
$ sudo /media/guestadditions/VBoxLinuxAdditions.run
If you encounter an error related to missing packages, ensure you have installed the required dependencies using the command:
$ sudo apt install gcc make perl -y
- After installation, reboot the VM to apply the changes.
$ sudo reboot
- Verify that the Guest Additions are installed by checking if features like shared clipboard and dynamic resolution resizing are working or from the command line.
$ lsmod | grep vboxguest
This guide is tested on Ubuntu:
Version | Code Name |
---|---|
22.04 LTS | Jammy Jellyfish |
23.10 | Mantic Minotaur |
24.04 LTS | Noble Numbat |
Mohd Shakir Zakaria is an experienced cloud architect with a strong development and open-source advocacy background. He boasts multiple certifications in AWS, Red Hat, VMware, ITIL, and Linux, underscoring his expertise in cloud architecture and system administration.
Comment anonymously. Login not required.