VirtualBox 7.0, Oracle’s latest release, brings many enhancements and features to virtualization. For those looking to install VirtualBox 7.0 on Ubuntu 22.04 Jammy Jellyfish or its older stable release of Ubuntu 20.04 Focal Fossa, this introduction provides a comprehensive overview of its standout attributes.
Key Features of VirtualBox 7.0:
- Enhanced Security: VirtualBox 7.0 offers full VM encryption beyond hard drives. This encompasses VM configuration logs and saved states, ensuring heightened security for critical applications.
- Audio Improvements: The software now uses Vorbis as the default format for WebM containers, replacing Opus. A new “default” host driver type optimizes audio backend selection based on the platform.
- Device Support: With the introduction of 3D support based on DirectX 11 and DXVK for non-Windows hosts, VirtualBox 7.0 also supports virtual IOMMU devices and virtual TPM 1.2 and 2.0 devices.
- User-Friendly Interface: The GUI has significantly improved, including a new VM wizard, an enhanced help viewer, and a unified notification center. Theme support has also seen notable enhancements across platforms.
- Resource Monitoring: A new utility provides real-time performance statistics for active guests, such as CPU and RAM usage and disk I/O rates.
- Cloud Integration: The Virtual Machine Manager integrates seamlessly with Oracle Cloud Infrastructure (OCI) virtual machines. The Network Manager tool can directly configure OCI cloud networks.
- Guest Control and EFI Support: VirtualBox 7.0 introduces initial support for automatic Guest Addition updates for Linux guests and supports Secure Boot, verifying the integrity of bootable images.
VirtualBox 7.0 is a monumental upgrade, offering a range of features catering to individual developers and enterprise needs. The subsequent guide will detail the steps to install VirtualBox 7.0 on Ubuntu 22.04 Jammy Jellyfish or Ubuntu 20.04 Focal Fossa, ensuring a smooth virtualization experience for users.
Table of Contents
Import VirtualBox 7.0 APT Repository on Ubuntu 22.04 or 20.04
Step 1: Update Ubuntu Before VirtualBox 7.0 Installation
Before the installation of VirtualBox 7.0, it’s paramount that your Ubuntu system is up-to-date. Having the most recent version of all packages ensures a seamless installation process, eliminating potential conflicts arising from outdated software components.
Updating the package list on your Ubuntu system is the first step. This ensures that your system is aware of the latest available versions of each package. You can do this by running the following command in your terminal:
sudo apt update
Upon updating the package list, the next step involves upgrading the packages. The upgrade process will replace any outdated packages with their latest versions. Achieve this by executing the following command:
sudo apt upgrade
Step 2: Install Initial Packages Required For VirtualBox 7.0
Specific prerequisite packages must be present on your system to successfully install VirtualBox. Although most of these packages would typically already exist on your Ubuntu system, verifying their installation is prudent.
Execute the following command to ensure that all the required dependencies are in place:
sudo apt install dirmngr ca-certificates software-properties-common apt-transport-https curl -y
If installation issues arise in subsequent steps, consider revisiting this step and re-executing the command.
Step 3: Import VirtualBox 7.0 GPG Key on Ubuntu
To ensure the authenticity and integrity of the packages you install, you need a GPG (GNU Privacy Guard) key. This GPG key, part of a public key cryptography system, verifies that the packages come directly from the official VirtualBox repository.
To import the GPG key, run the following command:
curl -fSsL https://www.virtualbox.org/download/oracle_vbox_2016.asc | gpg --dearmor | sudo tee /usr/share/keyrings/virtualbox.gpg > /dev/null
Step 4: Inclusion of the VirtualBox Repository
After incorporating the GPG key, add the official VirtualBox repository to your system. Use the following command that will work for Ubuntu distributions.
echo "deb [arch=$( dpkg --print-architecture ) signed-by=/usr/share/keyrings/virtualbox.gpg] http://download.virtualbox.org/virtualbox/debian $(lsb_release -cs) contrib" | sudo tee /etc/apt/sources.list.d/virtualbox-7.list
Linux Mint and similar distributions do not support this command. It’s designed to display the Ubuntu system version and works with current Ubuntu versions that VirtualBox recognizes, such as 20.04 and 22.04. For guidance on non-Ubuntu systems installations with Virtualbox 7.0, please refer to my other guides.
Having added the VirtualBox repository, the final step is to update your system’s repository list. This ensures that your system recognizes the newly incorporated VirtualBox repository. Achieve this by executing the following command:
sudo apt update
Install VirtualBox 7.0 on Ubuntu 22.04 or 20.04 via APT
Having completed the import of the VirtualBox repository, we’ll now proceed to establish VirtualBox 7.0 on your Ubuntu system.
Step 1: Install VirtualBox 7.0 and Ubuntu Headers
Our initial task is to install VirtualBox 7.0. This operation will simultaneously install the pertinent Ubuntu headers corresponding to your kernel version. This is a prerequisite for VirtualBox to operate correctly. Execute the command below:
sudo apt install virtualbox-7.0 linux-headers-$(uname -r) -y
This command prompts Ubuntu to fetch and install VirtualBox 7.0 and the appropriate Linux headers from the repository for your specific kernel version.
Step 2: Confirming the Installation
Use the apt-cache policy command to ensure the VirtualBox installation came directly from the repository we added earlier. This command details the package’s priority, version number, and originating repository.
apt-cache policy virtualbox-7.0
Upon executing the command, you’ll receive an output similar to the following:
Evaluate the output carefully. Ensure the version number matches VirtualBox 7.0 and confirm that the repository is the official VirtualBox repository we imported earlier.
Step 3: Confirm VirtualBox 7.0 Service Status on Ubuntu
With the installation confirmed, we need to assess the present status of the vboxdrv
service. This service governs the management of VirtualBox kernel modules. We do this by executing the following command:
systemctl status vboxdrv
This command presents you with the service’s status, detailing whether it’s active and running. Here’s an example of what you might see:
You should observe an output reflecting the active service, indicating a successful installation.
Step 4: Enable VirtualBox 7.0 Service (If Required) on Ubuntu
In some instances, the vboxdrv
service may not be activated by default post-installation. To launch the service and facilitate it to run automatically at system boot, utilize the following command:
sudo systemctl enable vboxdrv --now
When you execute this command, ensure the VirtualBox service operates correctly and prep your system for VirtualBox 7.0 usage. This ends the installation phase, and you have now equipped your Ubuntu system with VirtualBox 7.0, making it ready for use.
Initiating VirtualBox 7.0 on Ubuntu 22.04 or 20.04
We can now initialize the application with VirtualBox 7.0 successfully installed, and the essential service is confirmed operational. This enables us to begin creating and managing our virtual machines on Ubuntu.
CLI Method to Launch VirtualBox 7.0 on Ubuntu
You can launch VirtualBox using a simple command if you like working directly from the terminal. Enter the following command in your terminal:
virtualbox
GUI Method to Launch VirtualBox 7.0 on Ubuntu
Launching VirtualBox from the desktop environment offers a more intuitive experience for users who prefer a graphical interface. To do this, follow these steps:
- Locate the Activities option at the top of your screen and click on it.
- Choose Show Applications from the dropdown menu.
- Find and select Oracle VM Virtualbox from the list of applications.
Install VirtualBox Extension Pack on Ubuntu 22.04 or 20.04
The VirtualBox Extension Pack, while not necessary, is a highly beneficial add-on that can significantly enhance your VirtualBox experience by providing several advantageous features. Here’s a step-by-step guide on how to install it.
Step 1: Download VirtualBox 7.0 Extension Pack on Ubuntu
Ensure you download the Extension Pack version that matches the VirtualBox version on your Ubuntu system. To find out your VirtualBox version, run this command:
vboxmanage -v | cut -dr -f1
This command will return the version number in a format similar to ‘7.0.x’. With this information, you can proceed to download the appropriate Extension Pack using the wget
command:
wget https://download.virtualbox.org/virtualbox/7.0.x/Oracle_VM_VirtualBox_Extension_Pack-7.0.x.vbox-extpack
Replace each instance of ‘7.0.x’ in the URL with your specific VirtualBox version.
Step 2: Install VirtualBox 7.0 Extension Pack on Ubuntu
To install the Extension Pack that you just downloaded, employ the vboxmanage
command:
sudo vboxmanage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.x.vbox-extpack
Oracle will ask you to agree to its license terms and conditions during installation. Simply type “y” and press Enter to confirm your agreement.
Step 3: Confirm the Version of the Installed Extension Pack
To validate the version of the Extension Pack that you installed, use the following command:
vboxmanage list extpacks
This command will display vital information about the installed Extension Packs, including their version numbers.
Step 4: Add User into the vboxusers Group
To use VirtualBox, add your user account to the vboxusers group. Achieve this by running:
sudo usermod -a -G vboxusers $USER
You’ll need to reboot your system for these changes to take effect. After logging back in, verify that your user account has been successfully added to the vboxusers
group by using:
groups $USER
This command lists the groups with which your user account associates. Ensure that “vboxusers” appears on this list. After following these steps, you can fully utilize the advanced features of the VirtualBox Extension Pack.
Additional VirtualBox 7.0 Commands on Ubuntu 22.04 or 20.04
This section sheds light on various supplementary commands and strategies that can streamline the management of VirtualBox on your Ubuntu system.
Update VirtualBox 7.0 on Ubuntu 22.04 or 20.04
Use the terminal to check and apply updates to ensure your VirtualBox 7.0 installation stays updated. Enter the following command to do this:
sudo apt update && sudo apt upgrade
Remove VirtualBox 7.0 From Ubuntu 22.04 or 20.04
If at any point you decide to remove VirtualBox from your system entirely, the following command allows you to do so:
sudo apt remove virtualbox-7.0
Remove VirtualBox 7.0 APT Repository From Ubuntu
If you wish to remove the repository sources file, you can accomplish this by executing the following command:
sudo rm /etc/apt/sources.list.d/virtualbox.list
Remove VirtualBox 7.0 GPG Key From Ubuntu
If you decide to delete the GPG key, use the command below:
sudo rm /usr/share/keyrings/virtualbox.gpg
Final Thoughts
In conclusion, this guide has walked you through importing the VirtualBox GPG key and repository and installing the latest version and its extension pack. With these capabilities, VirtualBox 7.0 is an indispensable tool in the Ubuntu Linux environment, streamlining the creation and management of virtual machines effectively.