Table of Contents

VirtualBox VM

Guest Additions

Install Guest Additions on a Debian 11 guest operating system

  1. The following steps need to be taken inside the VM after the operating system has been installed
  2. Install the kernel headers, DKMS framework, and build tools
    $ sudo apt update -y && sudo apt upgrade
    sudo apt install dkms linux-headers-$(uname -r) build-essential
  3. Attach the guest addition ISO to the VM and mount it
    $ sudo mount /dev/cdrom /mnt/cd
  4. Install the VirtualBox guest additions
    sudo sh /mnt/cd/VBoxLinuxAdditions.run
  5. Restart your virtual machine in order to reload the kernel modules
    systemctl reboot -i
  6. If you want the VM to automatically switch to full screen upon boot or login, toggle the View option –> Auto-resize Guest Display
  7. Uninstall the guest additions
    sudo sh /mnt/VBoxLinuxAdditions.run uninstall
  8. Repeat steps 3-6 if the kernel or the VirtualBox version changes