VirtualBox 7 on Linux Mint 21: A Complete Installation Guide

This guide will walk you through each step of installation of VirtualBox 7, a widely-used and popular full virtualizer app, on Linux Mint 21.

VirtualBox 7 is a popular virtualization software that allows users to run multiple operating systems on a single physical host. With its latest release, VirtualBox 7, users can now take advantage of even more features and enhancements.

This guide will show you how to install VirtualBox 7 on Linux Mint, a Ubuntu-based Linux distribution known for its user-friendliness, reliability, and great support. So, whether you are a beginner or an experienced user, this guide will provide the steps to set it up on your Mint system successfully.

VirtualBox is available for installation from the Linux Mint 21 “Vanessa” repositories, but the version is 6.1. However, VirtualBox 7 was recently released, and it offers significant advantages over its predecessor, such as:

  • Full virtual machine encryption support
  • Support for UEFI SecureBoot and TPM 1.2/2.0
  • Enhanced 3D support
  • Automated virtual machine builder
  • Integration with Oracle Cloud Infrastructure (OCI)

Fortunately, there is an effortless way to install VirtualBox 7 on Linux Mint, which we will show you in this guide.

The tutorial will use the sudo command and assuming you have sudo privileges.

Step 1: Import VirtualBox’s Repo GPG Key

VirtualBox 7, as previously stated, is not available in the Linux Mint 21 repositories. So, we’ll add it to our Mint system. But first, import the Oracle VirtualBox GPG keys that sign the software.

Open the terminal and run the following command:

wget -O- https://www.virtualbox.org/download/oracle_vbox_2016.asc | sudo gpg --dearmor --yes --output /usr/share/keyrings/oracle-virtualbox-2016.gpg
Import VirtualBox’s repository GPG Key
Import VirtualBox’s repository GPG Key

We can now proceed to import the official VirtualBox repository.

Step 2: Add Official VirtualBox Repository

After importing the GPG keys, we’ll add the official VirtualBox repository to our Linux Mint system. This implies that the update package will be made available with the rest of your system’s regular updates if a new version is released.

echo "deb [arch=amd64 signed-by=/usr/share/keyrings/oracle-virtualbox-2016.gpg] http://download.virtualbox.org/virtualbox/debian jammy contrib" | sudo tee /etc/apt/sources.list.d/virtualbox.list
Add VirtualBox Repository to Linux Mint 21
Add VirtualBox Repository to Linux Mint 21

Step 3: Run System Update

Before we proceed with VirtualBox installation on our Linux Mint 21 system, we should refresh the packages list to make the system aware of the newly added VirtualBox repository’s packages. So, run the below command to update the APT repositories index.

sudo apt update
Update package list
Update package list

As you can see from the image above, our new VirtualBox repository is now available and ready to be used.

Step 4: Install VirtualBox 7 on Linux Mint 21

Everything is already prepared for the actual installation. Now, to install VirtualBox on Linux Mint 21, run the following commands:

sudo apt install virtualbox-7.0
Install VirtualBox 7 on Linux Mint 21
Install VirtualBox 7 on Linux Mint 21

Wait for the installation to complete. The VirtualBox is now installed and ready to be used on your Linux Mint 21 system.

Step 5: Install VirtualBox Extension Pack

This is an optional step, but I strongly encourage it because it will make working with VirtualBox on your Ubuntu system easier and more convenient. VirtualBox Extension Pack unlocks many great features, such as:

  • Oracle Cloud Infrastructure (OCI) integration
  • VirtualBox Remote Desktop Protocol (VRDP)
  • Host webcam passthrough
  • Disk and full VM encryption

Let’s highlight one peculiarity here. The installed VirtualBox Extension Pack’s version is highly recommended to match the version of VirtualBox installed on your Ubuntu 22.04 system.

So, to verify the exact version of the installed locally VirtualBox, you can use vboxmanage, a build-in VirtualBox’s command:

vboxmanage -v | cut -dr -f1
Checking the VirtualBox version
Checking the VirtualBox version

As you can see, the version of Virtualbox installed is 7.0.4. Therefore, you must then download the Extension Pack with the same version.

However, if your VirtualBox installation version is different, replace both places containing 7.0.4 in the command below with the actual version. In addition, you can also go straight to the downloads page and look at the available versions.

wget https://download.virtualbox.org/virtualbox/7.0.4/Oracle_VM_VirtualBox_Extension_Pack-7.0.4.vbox-extpack

Next, to install the VirtualBox Extension pack, run the vboxmanage command as follows:

sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.4.vbox-extpack

You will be prompted to agree the Oracle’s license terms and conditions. So, type “y” to confirm and press Enter.

Install VirtualBox Extension Pack
Install VirtualBox Extension Pack

Additionally, you can verify installed VirtualBox’s extension pack version by running the following:

vboxmanage list extpacks
Verify the installed VirtualBox Extension Pack version
Verify the installed VirtualBox Extension Pack version

Step 6: Add User to vboxusers Group

Before using VirtualBox, you should add your user account to the vboxusers group. This is quick and simple to accomplish by running:

sudo usermod -a -G vboxusers $USER

Now perform a reboot. After login, check that you are in the vboxusers group with this command:

groups $USER
Check user groups
Check user groups

Step 7: Running VirtualBox on Linux Mint 21

You can start using VirtualBox by launching it from the Linux Mint start menu.

Running VirtualBox on Linux Mint 21
Running VirtualBox on Linux Mint 21
VirtualBox running on Linux Mint 21
VirtualBox running on Linux Mint 21

Conclusion

That concludes our guide on installing VirtualBox on Linux Mint 21. We hope you find this guide helpful. Thanks for your time!

We recommend checking the official documentation for individuals who want to learn more about the features offered by VirtualBox and how to use them effectively.

Finally, you can use VirtualBox in an entirely headless mode to turn your server into a virtualization environment. To learn more about utilizing this VirtualBox feature, check out our guide: “How to Setup and Manage VirtualBox VMs on a Headless Server.”

Thanks for using this tutorial. Your feedback and comments are most welcome.

Bobby Borisov

Bobby Borisov

Bobby, an editor-in-chief at Linuxiac, is a Linux professional with over 20 years of experience. With a strong focus on Linux and open-source software, he has worked as a Senior Linux System Administrator, Software Developer, and DevOps Engineer for small and large multinational companies.

Think You're an Ubuntu Expert? Let's Find Out!

Put your knowledge to the test in our lightning-fast Ubuntu quiz!
Ten questions to challenge yourself to see if you're a Linux legend or just a penguin in the making.

1 / 10

Ubuntu is an ancient African word that means:

2 / 10

Who is the Ubuntu's founder?

3 / 10

What year was the first official Ubuntu release?

4 / 10

What does the Ubuntu logo symbolize?

5 / 10

What package format does Ubuntu use for installing software?

6 / 10

When are Ubuntu's LTS versions released?

7 / 10

What is Unity?

8 / 10

What are Ubuntu versions named after?

9 / 10

What's Ubuntu Core?

10 / 10

Which Ubuntu version is Snap introduced?

The average score is 68%

21 Comments

  1. I recommend using https:// instead of http:// in the repo url that is added to the virtualbox.list file.
    Some people like to claim that package signing is good enough for security, but it’s vulnerable to replay attacks, privacy issues, and it won’t hurt you to use https so why not.

  2. I so much appreciate your article! Thank you very much. I was using 6.1 and ran across your site and followed your directions and they were flawless.

  3. Good article 🙂

    migrate 6.1 to 7.0.6 easily thanks to you.

    Just install extension pack directly from graphic Virtual box application.

  4. I run windows 10 in the VB.
    Unfortunately, the USB support does not work.(USB device cannot be connected)
    Inside the USB Configuration the USB setting is not enabled.(grayed)
    Does anyone have a solution?

  5. This doesn’t work.

    The command “sudo apt install virtualbox-7.0” fails. It says:

    “vboxdrv.sh: failed: Cannot unload module vboxdrv.
    vboxdrv.sh: failed: Cannot unload module vboxdrv.

    There were problems setting up VirtualBox. To re-start the set-up process, run
    /sbin/vboxconfig
    as root. If your system is using EFI Secure Boot you may need to sign the
    kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
    them. Please see your Linux system’s documentation for more information.”

    Running “sudo /dbin/vboxconfig” just reprints the same error.

    My system has secure boot turned off.

    • I was able to get past this error finally by searching for vboxdrv and deleting all files with that name in them. Then rebooting.

      Install worked fine after that.

  6. Hallo Bobby,

    hervorragende Anleitung! Hat wunderbar ohne Fehler funktioniert. Konnte in einigen Minuten von VB 6 auf die aktuelle Version upgraden.

    Gruß Dieter

  7. This has been a fantastic tutorial, and it has helped me as I’ve had to purge and reinstall Virtualbox. It would be wonderful if you would add a section on installing with Secureboot and a section for having Virtualbox installed, then turning secureboot on with the subsequent needed validation.

  8. Thanks, done this and now trying to start a vm:
    “The Vitualbox kernel modules do not match this version of Virutalbox. Executing /sbin/vboxconfig may correct this.”
    vboxconfig executed without problems but problem still persists.
    Any hints?

    • Hi Jan,

      It looks like you you have a mismatched install. So, you must purge the VirtualBox’s repo version before installing the latest official one.

      First, find all packages on your system related to VirtualBox with “sudo dpkg -l | grep virtualbox“. Then uninstall them with “sudo apt purge [package_name_here]” and repeat the guide. I hope this solves the problem.

      Best,
      Bobby

  9. Cannot launch ubuntu because:

    The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing
    ‘/sbin/vboxconfig’
    as root.
    If your system has EFI Secure Boot enabled you may also need to sign the kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load them. Please see your Linux system’s documentation for more information.
    where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) – The support driver is not installed. On linux, open returned ENOENT.

  10. Great and useful article.
    I only needed the steps to install the Extension Pack, which worked perfectly.
    I wish I had’ve found the article prior to faffing around with instructions for installing VB on another nameless site.
    Thank you.

    • Hi Z,

      I’m happy that our tutorial was helpful to you. We always aim to provide the best explained and pre-tested procedure.

      Best,
      Bobby

  11. Thank you for the useful tutorial. All worked flawless. I had 6.1 installed and even after installing the extension pack the usb devices were not detected. Now with 7.0.12 the problem is solved. 🙂

  12. Thanks Bobby for your very clear howto.
    Usually I install things with the Software Manager. But VirtualBox 6.1.xx did not run on a practically new installed Linux Mint. All kind of dependency errors.
    Updated Linux Mint today to Victoria.
    Then tried your instructions and they worked! Nanolinux worked in seconds. 🙂
    Did not do steps 5 & 6. For some reason step 5 is not needed (yet?). Will try later to install a Linux and check if there is a problem.
    Can you explain why the user account should be part of the vboxusers group?
    (Btw nice that this works via email and not logging in on Gmail or that kind of stuff.)
    Thanks again and greetings from Nederland, Martin.

    • Hi Martin,

      Without being part of the vboxusers group, a user may lack the permissions needed for certain VirtualBox functionalities, such as having access to USB devices within the virtual machines. But more importantly, membership to vboxusers ensures the user has the necessary permissions to create, modify, and execute virtual machines without access issues. Greetings to Nederland! 🙂

      Best,
      Bobby

Leave a Reply

Your email address will not be published. Required fields are marked *