I have been working with Debian 11 and running docker on it to host a few applications at home. As per best practice, I setup a virtual machine to test configs and updates first before deploying it to my production infrastructure.
In this article I will show you how to install the Virtual Box Guest Additions on a Debian 11 virtual machine.
The Virtual Box Guest Additions makes features such as copying and pasting between the host OS and virtual machine as well as running the virtual machine in full screen. This article has a good write up on what the Guest Additions provide you.
- Open your terminal in Debian 11
- Update the OS: sudo apt update or from root apt update
- if there are updates then upgrade: sudo apt upgrade or from root apt upgrade
- Install the needed dependencies: sudo apt install dkms linux-headers-$(uname -r) build-essential
- Insert the Guest Additions CD: From the top bar of your virtual machine click on devices then Insert Guest Additions CD Image
- Open files and click on the CD, you should be able to view the CD Image contents
- Mount the CDROM from the terminal: sudo mount /dev/cdrom /mnt
- Check CDROM listing: ls /mnt this will also show you the CD contents
- Install the Guest Additions: sudo ./VBoxLinuxAdditions.run
- After installation, reboot your virtual machine: sudo reboot now
- You should now be able to set the cop/paste, shared folders, fulle screen and other options from the virtual machine’s menu
The below video shows the above steps being implemented: