In this guide, we will optimize the performance of Debian 9, 10, 11 & 12 virtual machines running on Oracle VM VirtualBox software. When we talk about performance, we will actually install Guest Additions, which are basic needs.
In fact, by installing drivers for the VM, we exploit the full potential of the host hardware in the virtual environment. In particular, you can maximize the capabilities of your Debian virtual machine. So, let’s examine how to install additional packages on a Debian guest machine!
How to Install Guest Additions on Debian 9, 10, 11 & 12
You must install Guest Additions to use your host computer’s USB, webcam, or other hardware in a Debian virtual machine you created with Oracle VM VirtualBox.
Installing guest plugins on your Debian virtual computer will increase performance and use the screen resolution as Full Screen. Also, after installing the hardware drivers, you can exchange files between your physical computer and your VM.
Being aware of the potential problems when using an outdated version of Debian is crucial. This article will examine and provide an overview of those issues to ensure you stay informed and prepared. If you have a new version, such as 11, the driver package for your virtual system can be installed automatically.
How to Build Driver Package for Debian Guest Machine
The installation process for the guest package remains consistent, regardless of your version of Debian. Essential for Linux distributions, the main benefits of this software are:
- Enhanced graphics experience.
- File sharing between host and VM.
- Advanced mouse cursor integration.
- Better compatibility with host computer hardware.
- Ability to use various devices such as audio support.
Step 1
When you make your Debian virtual machine full screen in Oracle virtualization software, you will encounter a problem such as not adapting to full screen, as shown in the image below. This is because guest plugins are not installed on your guest system.
Step 2
Now, click Devices from the VirtualBox menu and click Insert Guest Additions CD image from the drop-down options to install the software that helps to make your Linux VM better.
Step 3
Read the warning displayed in a pop-up window named VBox_GAs and click Run if you trust the software.
Step 4
As in the image below, you may get the error that the CD image of the guest package could not be started automatically after mounting to the system. This error is due to not finding the required autorun program on your system. Click the OK button of the “Error autorunning software” error window.
Step 5
To view the contents of the CD image, open File Manager, click VBox_GAs, and then Right-Click / Open as Root in the directory.
Step 6
Type your Root password and click Authenticate to confirm that the directory is opened with administrator rights.
Step 7
When you view the CDROM as Root, click the correct button again and select Open in Terminal.
Step 8
After opening the terminal, you can confidently use the “ls” command to check all the files currently stored in the media easily and quickly. In /media/cdrom0#, type “sh VBoxLinuxAdditions.run,” and press Enter.
ls
sh VBoxLinuxAdditions.run
Step 9
Based on the image below, some packages are missing from your virtual system, preventing the successful installation of Guest Additions. To proceed with the installation, kindly ensure all necessary packages are installed.
Step 10
Now, on your guest machine, open the terminal in the desktop location.
Step 11
Add the image file to the virtual drive to find and install the necessary packages from the Debian ISO file without an Internet connection.
Step 12
Execute the “su -” command on the terminal, type your Root password, and press Enter. Next, execute the “sudo apt update” command.
su -
sudo apt update
In the image below, you need to attach the ISO image!
Step 13
After executing the “sudo apt upgrade” command, press the Yes (Y) key on the line explaining that additional space is needed for the installation, then press Enter.
sudo apt upgrade
Step 14
Wait while new versions of existing packages are installed from the ISO file.
Step 15
After preparing your system, type the “sudo apt install build-essential module-assistant dkms” command and press Enter.
sudo apt install build-essential module-assistant dkms
Step 16
To continue installing the Linux kernel packages, type Y and press Enter.
Step 17
Be patient and wait while the kernel packages are being installed.
Step 18
And finally, execute the “m-a prepare” command to compile and install the Linux kernel modules.
m-a prepare
Step 19
You can install virtual machine drivers after installing the necessary packages for your virtual system.
Step 20
Display cdrom0 as Root and open the terminal again.
Step 21
Run the “sudo sh VBoxLinuxAdditions.run” command in the terminal to install Debian guest machine drivers.
sudo sh VBoxLinuxAdditions.run
Step 22
After installing and preparing the necessary packages from the CD image, you will see that the Guest Additions have been successfully installed.
Step 23
To ensure that the settings you have made are adequate, execute the “shutdown -r now” command in the terminal to restart your Debian virtual computer.
shutdown -r now
Step 24
After the reboot, you can now change or resize the screen resolution of your Linux virtual operating system as you wish.
Step 25
You can also operate your system as a Full Screen using the View tab from the VirtualBox tool menu.
Video
Conclusion
As a result, you should increase the functionality of your Debian virtual machine running on Oracle VM. To do this, you must install Guest Additions on your Debian PC. So you can start using your host PC’s hardware effectively.
Thanks to all the methods I discussed in our article, you can improve the graphics experience of your Debian VM. As a result, you can enable file sharing between the host and VM. Plus, of course, you get more advanced mouse cursor integration.
Thanks this really helped me to install the guest additions, earlier this procedure used to simpler
I’m glad you fixed your problem.