How to Install VirtualBox Guest Additions on Debian 10 Linux
Choose a different version or distribution
Introduction
Before we begin talking about how to install VirtualBox Guest Additions on Debian 10 Linux, let's briefly understand – What is VirtualBox?
VirtualBox is a cross-platform, open-source virtualization program that allows you to run multiple guest operating systems (virtual machines) at the same time.
VirtualBox comes with a collection of drivers and applications (VirtualBox Guest Additions) that can be installed in the guest operating system.
The Guest Additions provide many helpful features for guest machines, including improved video support, shared folders, a shared clipboard, mouse pointer integration, and more.
In this tutorial, you will install VirtualBox Guest Additions on Debian 10 Linux. We will also address a few FAQs on how to install VirtualBox Guest Additions on Debian 10 Linux.
Advantages of VirtualBox
- Flexibility: VirtualBox allows users to run multiple operating systems simultaneously, offering flexibility in software testing, running legacy applications, and creating isolated environments for development.
- Portability: With VirtualBox, virtual machines can be easily transported across different host systems, making it convenient for migration, collaboration, or running software on the go.
- Cost savings: By utilizing virtual machines, VirtualBox enables hardware consolidation, reducing the need for physical devices and leading to cost savings in power consumption and equipment maintenance.
- Enhanced security: VirtualBox provides isolated environments, making it safer for testing suspicious software or running potentially risky applications, decreasing the risk of system corruption or infection.
- Extensive compatibility: VirtualBox is compatible with various operating systems, offering support for Windows, macOS, Linux, and Solaris, ensuring versatility and ease of use for a wide range of users.
Installing Guest Additions on Debian Guest
The “VBoxGuestAdditions.iso” image ISO file that comes with VirtualBox has guest addition installers for all supported guest operating systems. The VirtualBox GUI manager can be used to mount this file on the guest machine from the host machine. Once mounted, the additions can be installed on the guest system.
Installing VirtualBox guest additions on a Debian desktop or server guest requires the following steps.
- Navigate to the VirtualBox GUI Manager.
- Launch the Debian guest virtual machine.
- Install the packages required for creating kernel modules by logging in as root or sudo user on the guest machine:
sudo apt update
sudo apt install build-essential dkms linux-headers-$(uname -r)
$(uname -r)
returns the current Kernel version.
4. Click Devices -> “Insert Guest Additions CD Image” from the virtual machine menu, as shown in the example below:
If you receive an error stating that the guest system does not have a CD-ROM, stop the virtual machine and open the machine settings. Navigate to the “Storage” tab and click the plus sign (Adds optical device) to add a new CD-ROM device (Adds optical device). After finishing, reboot the virtual machine.
5. Open the Debian guest terminal, make a new directory, and mount the ISO file:
sudo mkdir -p /mnt/cdrom
sudo mount /dev/cdrom /mnt/cdrom
6. Locate the directory and execute the VBoxLinuxAdditions.run
script to install the Guest Additions:
cd /mnt/cdrom
sudo sh ./VBoxLinuxAdditions.run --nox11
The --nox11
parameter instructs the installer not to launch a xterm window.
The output will seem as follows:
Output
Verifying archive integrity... All good.
Uncompressing VirtualBox 6.0.16 Guest Additions for Linux........
...
...
VirtualBox Guest Additions: Starting.
7. In order for modifications to take effect, restart the Debian guest:
sudo shutdown -r now
8. Once the virtual machine has booted, log into it to confirm that the installation was successful and the kernel module has been loaded using the lsmod
command:
lsmod | grep vboxguest
This is how the output will appear:
Output
vboxguest 348160 2 vboxsf
If the command produces no output, it indicates that the VirtualBox kernel module is not loaded.
All done. You have successfully installed VirtualBox Guest Additions on your Debian guest machine.
The “Storage” tab of the virtual machine settings now allows you to enable Drag'n Drop and Shared clipboard support. You can now enable 3D acceleration on the “Display” tab and create Shared folders, and more.
FAQs to Install VirtualBox Guest Additions on Debian 10 Linux
Can I install Guest Additions without the GUI in Debian 10?
Yes. You can install Guest Additions without a graphical user interface by opening a terminal and running the installation script manually using the command sudo sh /media/cdrom/VBoxLinuxAdditions.run
.
What are the prerequisites for installing Guest Additions on Debian 10?
To install Guest Additions on Debian 10, you need a running Debian virtual machine with administrative privileges and the VirtualBox Guest Additions ISO file available.
Do I need to update my Debian 10 system before installing Guest Additions?
It is generally recommended to update your Debian 10 system before installing Guest Additions to ensure compatibility and obtain the latest package versions.
How can I verify if Guest Additions are installed correctly?
After installation and rebooting the virtual machine, you can check if Guest Additions are installed correctly by ensuring features like seamless mouse integration, shared folders, and improved display resolution are functioning.
Can I access shared folders on the host system after installing Guest Additions?
Yes. After installing Guest Additions, you can access shared folders by selecting the "Devices" menu in VirtualBox, choosing "Shared Folders," and configuring the desired folder to be shared.
Are there any known issues or troubleshooting steps for Guest Additions on Debian 10?
Sometimes, kernel headers or other packages may be required to install Guest Additions. Ensure you have these installed by running sudo apt-get install build-essential
and sudo apt-get install linux-headers-$(uname -r)
.
Where can I find additional documentation and support for Guest Additions?
VirtualBox provides comprehensive documentation for Guest Additions. You can refer to the official VirtualBox documentation or seek assistance from the VirtualBox community forums and support channels.
Conclusion
Installing VirtualBox Guest Additions increases the performance and usability of the virtual machine.
Visit the VirtualBox Guest Additions documentation page to learn more about the Guest Additions.
If you have any queries, feel free to post a comment below, and we'll be happy to answer them.