This is an old revision of the document!


VirtualBox VM

Guest Additions

  • To upgrade the Guest Additions after upgrading the VirtualBox version, download the guest additions pack, shut down all virtual machines then start VirtualBox as root
    sudo virtualbox
  • After installing the Guest Additions, close VirtualBox and restart it under your user account

Install Guest Additions on a Debian 11 host

  1. The following steps need to be taken inside the VM
  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