How To Install VirtualBox on Debian 10 / Debian 9

0

VirtualBox is a free and open-source hypervisor software, allows you to create and run a guest operating system (“virtual machines”) such as Linux and Windows on top of the host operating system.VirtualBox supports both software-based and Hardware-assisted virtualization.

VirtualBox can be installed on host operating systems, including Linux, Windows, Solaris, OpenSolaris, and OSx86. VirtualBox is released under GPL (GNU General Public License) v2, and Oracle VM VirtualBox Extension Pack is released under “Personal Use and Evaluation License”.

Here, we will see how to install VirtualBox on Debian 10 / Debian 9.

THIS DOCUMENT IS ALSO AVAILABLE FOR

Set up VirtualBox Repository

Use the below command to add the VirtualBox repository to your system.

### Debian 10 ###

echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian buster contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

### Debian 9 ###

echo "deb [arch=amd64] https://download.virtualbox.org/virtualbox/debian stretch contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list

Import the signing key of the Oracle VirtualBox to your system using the following command.

wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -

Update the Debian repository index.

sudo apt update

Install VirtualBox

Install the VirtualBox command.

VirtualBox 6.0

sudo apt install -y virtualbox-6.0

VirtualBox 5.2

sudo apt install -y virtualbox-5.2

Check the VirtualBox Linux kernel module service status using the below command.

sudo systemctl status vboxdrv
VirtualBox Linux kernel module service
VirtualBox Linux kernel module service

Access VirtualBox

Start the VirtualBox: Activities >> Search for Oracle VM VirtualBox.

Start VirtualBox On Debian 10
Start VirtualBox On Debian 10

OR

virtualbox

Fix Error:

If you get an error message like below.

Qt WARNING: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2485, resource id: 65011964, major code: 18 (ChangeProperty), minor code: 0
Qt WARNING: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2486, resource id: 65011964, major code: 18 (ChangeProperty), minor code: 0
Qt WARNING: QXcbConnection: XCB error: 3 (BadWindow), sequence: 2487, resource id: 65011964, major code: 18 (ChangeProperty), minor code: 0

Place the below variables for all users.

sudo cat <<EOF >> /etc/profile.d/virtualbox.sh
export QT_SCREEN_SCALE_FACTORS=1
export QT_SCALE_FACTOR=1
export QT_AUTO_SCREEN_SCALE_FACTOR=0
EOF

CREDIT: VirtualBox Forum

What are you waiting for? Go, create, and have fun with virtual machines.

The following screenshot shows the CentOS 7 installation on VirtualBox.

VirtualBox 6.0 Running VMs on Debian 10
VirtualBox 6.0 Running VMs on Debian 10

Install Oracle VM VirtualBox Extension Pack

Oracle offers an extension pack to add additional functionalities such as USB 2.0/3.0, VirtualBox Remote Desktop Protocol (VRDP) support, Disk encryption, Host webcam passthrough, Intel PXE boot ROM, and PCI passthrough.

Follow the steps mentioned in the below link to install Oracle VM VirtualBox Extension Pack.

READ: How To Install Oracle VM VirtualBox Extension Pack on Debian 10 / Debian 9

Conclusion

That’s All. I hope you have learned how to install VirtualBox on Debian 10 / Debian 9.

You might also like