Virtualbox

Fra pc-aid wiki
Sideversjon per 17. mar. 2025 kl. 21:24 av Malinux (diskusjon | bidrag) (Ny side: = 1 Installation of VirtualBox in Debian 12 = === '''1.2 Install virtualbox 7.1 i Debian 12 bookworm''' === Put the repo, signature and install in one command, by copying and pasting into konsole: <code>sudo touch /etc/apt/sources.list.d/virtualbox.list && echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] <nowiki>https://download.virtualbox.org/virtualbox/debian</nowiki> bookworm contrib' | sudo tee /etc/apt/sources.list.d/virtualbox.list && wget -O-…)
(diff) ← Eldre sideversjon | Nåværende sideversjon (diff) | Nyere sideversjon → (diff)

1 Installation of VirtualBox in Debian 12

1.2 Install virtualbox 7.1 i Debian 12 bookworm

Put the repo, signature and install in one command, by copying and pasting into konsole:

sudo touch /etc/apt/sources.list.d/virtualbox.list && echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] https://download.virtualbox.org/virtualbox/debian bookworm contrib' | sudo tee /etc/apt/sources.list.d/virtualbox.list && wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg --dearmor && sudo apt update && sudo apt install virtualbox-7.1

virtualbox 7.1 is now installed in Debian 12

2 Install VBoxGuestAdditions in virtualbox

VBoxGuestAdditions provides the following features:

  • Host/Guest clock synchronization
  • Seamless window support
  • Shared folders
  • Shared clipboard
  • Mouse pointer improvements
  • Improved video support

2.1 On the Host Machine: Download VBoxGuestAdditions.iso

Dowload for the version you are running of Virtualbox. In the example we use VirtualBox7.1 as we installed in section 1. Therefore we download VBoxGuestAdditions_7.1.0.iso with wget to a folder on the host machine, for example:

wget https://download.virtualbox.org/virtualbox/7.1.0/VBoxGuestAdditions_7.1.0.iso

2.2 Start up the relevant virtual machine (Guest) running Debian 12

2.2.1 Mount the iso inside the virtual Debian install

Press Devices -> Optical Drives -> Then press Chose a disk file and scroll to where you downloaded the iso file to, press the iso file

You will get a pop-up message in the bottom right corner:

Press «Mount and open»

2.2.2 Open Terminal

Right-click in the window that pops up and press on "Open terminal here"

2.2.3 Install kernel header and build tools

Install kernel header for running kernel and build tools and press enter -> enter the password and press enter again:

sudo apt install linux-headers-amd64 build-essential -y
2.2.4 Install the VBoxLinuxAdditions

Run the following command to install the virtualbox add-on and press enter:

sudo sh VBoxLinuxAdditions.run

Enter the password of the user and press enter again if prompted.

2.2.5 Log out and in or restart the virtual machine to complete installation

Log out and log in again or:

restart the virtual machine by pressing;

Start button at bottom left -> Exit ->  

Press OK or wait 30 seconds

2.2.6 Enable biderectional clipboard

Once the virtual machine has restarted, in virtualbox press: Devices -> Shared Clipboard -> Bidrectional

Note: With Bidirectional, you can copy to and from the virtual machine 🙂