Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
deb11:virtualboxvm [2022/09/24 11:40] Bernard Condraudeb11:virtualboxvm [2025/03/20 14:09] (current) – [Reboot (dead) vm] Bernard Condrau
Line 4: Line 4:
   * After installing the Guest Additions, close VirtualBox and restart it under your user account   * After installing the Guest Additions, close VirtualBox and restart it under your user account
  
-===== Install Guest Additions on a Debian 11 host ===== +===== Install Guest Additions on a Debian 11 guest operating system ===== 
-  The following steps need to be taken inside the VM +  The following steps need to be taken inside the VM after the operating system has been installed 
-  * Add the following line to /etc/apt/sources.list.d:<code>deb http://ftp.debian.org/debian stretch-backports main contrib</code> +  Install the kernel headers, DKMS framework, and build tools<code>sudo apt update -y && sudo apt upgrade 
-  Install virtualbox-guest-dkms, kernel headers, and, optionally, virtualbox-guest-x11 (for the graphical guest utilities):<code>sudo apt update +sudo apt install dkms linux-headers-$(uname -r) build-essential</code> 
-sudo apt install virtualbox-guest-dkms virtualbox-guest-x11 linux-headers-$(uname -r)</code> +  - Attach the guest addition ISO to the VM and mount it<code>$ sudo mount /dev/cdrom /mnt/cd</code> 
-  * Reboot the guest system+  - Install the VirtualBox guest additions<code>sudo sh /mnt/cd/VBoxLinuxAdditions.run</code> 
-  * More info: [[https://unix.stackexchange.com/questions/286934/how-to-install-virtualbox-guest-additions-in-a-debian-virtual-machine|How to install VirtualBox Guest Additions in a Debian virtual machine]]+  - Restart your virtual machine in order to reload the kernel modules<code>systemctl reboot -i</code> 
 +  - If you want the VM to automatically switch to full screen upon boot or login, toggle the **View option --> Auto-resize Guest Display** 
 +  - Uninstall the guest additions<code>sudo sh /mnt/VBoxLinuxAdditions.run uninstall</code> 
 +  - Repeat steps 3-6 if the kernel or the VirtualBox version changes 
 +  * [[https://kifarunix.com/install-virtualbox-guest-additions-on-debian-11/|Install VirtualBox Guest Additions on Debian 11]] 
 + 
 +===== Reboot (dead) vm ===== 
 +  - ''vboxmanage list runningvms'' 
 +  - ''vboxmanage controlvm <machine> poweroff'' 
 +  - ''vboxmanage startvm <machine> --type=headless''