How to Install Latest VirtualBox 6.0.10 on Debian 10 Buster

This tutorial will be showing you how to install Oracle VirtualBox on Debian 10 Buster. VirtualBox is a free and open-source (GPLv2) virtualization software that can be used in enterprise as well as at home. It can run on Linux, MacOS, Windows and Solaris. The latest VirtualBox 6.0.10 was released on July 16, 2019 by Oracle. Below are some of the highlights in the VirtualBox 6.x series:

  • VirtualBox 6.0 bring a major revamp to the user interface, providing users with a much simpler graphical interface.
  • Implemented support for exporting a virtual machine to Oracle Cloud Infrastructure
  • Support for nested hardware-virtualization on AMD CPUs
  • Greatly improved HiDPI and scaling support, including better detection and per-machine configuration
  • Support for surround speaker setups
  • Support UEFI secure boot driver signing on Ubuntu and Debian hosts
  • Ability to remember the guest screen size after a guest reboot
  • Support Linux 5.0 and 5.1 kernels (Ubuntu 19.04 ships with Linux 5.0 kernel.)
  • Improved performance and reliability of the shared folder feature
  • Basic support for VMSVGA graphics device in virtual machines using EFI
  • USB: modified Linux backends to reset USB devices (previously, most guest attempts to reset USB devices were ignored)

VirtualBox 6.0 dropped support for 32 bit hosts. If you are using a 32 bit machine, you need to use VirtualBox 5.2 instead.

Note that if you have UEFI firmware on your computer, I would recommend disabling Secure Boot, because when installing VirtualBox, there will be some kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) added to the Linux kernel.

Enable sudo for Standard User Account on Debian

Some commands in this tutorial are prefixed with sudo. If your user account isn’t in the sudoer list, you can use the following command to switch to root user, assuming you know the root password.

su -

If you want to add the standard user account into sudoer list, run the following command as root. Replace username with your actual username.

adduser username sudo

Then install sudo utility.

apt install sudo

Log out and log back in for the change to take effect. From now on, the standard user can use sudo to manage the system.

Install Latest VirtualBox 6.0.10 on Debian 10 Buster

VirtualBox isn’t included in the default Debian 10 repository, but you can install it from the upstream Oracle repository. First, create a new source list file for VirtualBox under the /etc/apt/sources.list.d/ directory, with a command line text editor such as Nano.

sudo nano /etc/apt/sources.list.d/oracle-virtualbox.list

Copy the following line and paste it in the file.

deb https://download.virtualbox.org/virtualbox/debian buster contrib

debian 10 buster virtualbox
To save the file in Nano text editor, press Ctrl+O, then press Enter to confirm. Press Ctrl+X to close the file. Next, run the following command to fetch the Oracle GPG public key and import it to your Debian 10 system, so packages downloaded from Oracle repository can be verified.

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

Now all left to do is update local package index and install Virtualbox 6.0.10.

sudo apt update

sudo apt install virtualbox-6.0

If your computer is 32 bit only, then you need to install VirtualBox 5.2 instead.

sudo apt install virtualbox-5.2

Now you can start VirtualBox from the OS applications menu (You might need to re-login for the VirtualBox icon to show up in applications menu), or by issuing the following command in terminal.

virtualbox

install oracle virtualbox on Debian 10

You can check the version number in Help > About VirtualBox.

debian buster virtualbox 6.0

VM Start Failure Troubleshooting

Sometimes you may see the following error when starting a virtual machine.

rtr3initex failed with rc=-1912 (rc=-1912) the VirtualBox kernel modules do not match this version of VirtualBox.

One of the causes is that you had previously installed VirtualBox from another repository and now you install it again from Oracle repository. In that case, you need to completely remove the residual configuration files of the previous VirtualBox. For example, I had installed Virtualbox from stretch-backports repository when the system is still Debian 9. Now the system is upgraded to Debian 10, I need to completely remove the residual configuration file with the following command.

sudo apt purge virtualbox

sudo apt autoremove

Then run the following command to rebuild VirtualBox kernel modules.

sudo /sbin/vboxconfig

If you see the following error,

vboxdrv.sh: failed: Cannot change group vboxusers for device /dev/vboxdrv.

it’s probably because the vboxusers group doesn’t exist. You can add this group with the following command:

sudo addgroup --vboxusers

Then re-run the vboxconfig command.

If the VM still can’t start, then you might have the virtualbox-dkms package installed on your system before upgrading to Debian 10 buster. You need to uninstall this package.

sudo apt purge virtualbox-dkms

And reinstall VirtualBox 6.0

sudo apt purge virtualbox-6.0
sudo apt install virtualbox-6.0

Advice on Using VirtualBox

  • Allocating two or more CPUs to the VM and installing VirtualBox Guest Additions can significantly improve VM performance.
  • When you update to a newer version of VirtualBox, you also need to upgrade VirtualBox Extension Pack and VirtualBox Guest Additions, if you have installed them.

Next Step

I hope this tutorial helped you install VirtualBox on Debian 10 Buster. You may also want to read:

As always, if you found this post useful, then subscribe to our free newsletter to get more tips and tricks. Take care 🙂

Rate this tutorial
[Total: 3 Average: 5]

5 Responses to “How to Install Latest VirtualBox 6.0.10 on Debian 10 Buster

  • Sebastian
    5 years ago

    Thanks, it would worth mentioning that on vagrant boxes the following command needs to be ran “vagrant plugin update” prior to “vagrant up”, at least that was the case for me.

  • IvanRussia
    4 years ago

    You are the best of the best , thx u very much ! Only u can help me !

  • Hi, getting the following right after the last command:

    apt install virtualbox-6.0
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following additional packages will be installed:
      libsdl-ttf2.0-0 linux-compiler-gcc-8-x86 linux-headers-4.19.0-6-amd64 linux-headers-4.19.0-6-common
      linux-headers-amd64 linux-kbuild-4.19
    Recommended packages:
      linux-image
    The following NEW packages will be installed:
      libsdl-ttf2.0-0 linux-compiler-gcc-8-x86 linux-headers-4.19.0-6-amd64 linux-headers-4.19.0-6-common
      linux-headers-amd64 linux-kbuild-4.19 virtualbox-6.0
    0 upgraded, 7 newly installed, 0 to remove and 0 not upgraded.
    Need to get 103 MB/113 MB of archives.
    After this operation, 285 MB of additional disk space will be used.
    Do you want to continue? [Y/n] y
    Media change: please insert the disc labeled
     'Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 DVD Binary-1 20191116-09:57'
    in the drive '/media/cdrom/' and press [Enter]
    

    I have Debian 10.2 Buster DVD-01 on a USB stick, but looks like it doesn’t see it.

    Thanks a lot for any heads up.

    • Xiao Guoan (Admin)
      4 years ago

      Why are you using DVD as the repository? If you have Internet connection, you should use online repositories.

      Open the repository configuration file with a text editor.

      sudo nano /etc/apt/sources.list

      Find the following line

      deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 DVD Binary-1 20191116-09:57]/ buster main

      Comment this line out by add a # character at the beginning of this line.

      #deb cdrom:[Debian GNU/Linux 10.2.0 _Buster_ - Official amd64 DVD Binary-1 20191116-09:57]/ buster main

      Save and close the file. The update repository and install virtualbox.

      sudo apt update
      sudo apt install virtualbox-6.0
      • Osvaldo Schwarz
        4 years ago

        Hi Xiao, thanks so much for the prompt reply!

        Not sure why that line was twice in /etc/apt/sources.list, the first instance commented out… Perhaps because I installed Buster from there?… So I dd’d the active one and :wq…

        Now getting another issue:

        virtualbox
        Qt WARNING: QXcbConnection: Could not connect to display 
        Qt CRITICAL: Could not connect to any X display.
        

        Found this below doing a search online, but not sure it matches my issue:

        https://askubuntu.com/questions/1093995/cannot-run-virtualbox-please-help?noredirect=1&lq=1
        

        Again thanks a lot.

Leave a Comment

  • Comments with links are moderated by admin before published.
  • Your email address will not be published.
  • Use <pre> ... </pre> HTML tag to quote the output from your terminal/console.
  • Please use the community (https://community.linuxbabe.com) for questions unrelated to this article.
  • I don't have time to answer every question. Making a donation would incentivize me to spend more time answering questions.

The maximum upload file size: 2 MB. You can upload: image. Links to YouTube, Facebook, Twitter and other services inserted in the comment text will be automatically embedded. Drop file here