How To Install VirtualBox on Rocky Linux 8

In this guide, we want to teach you to Install Oracle VM VirtualBox on Rocky Linux 8.

Oracle VM VirtualBox is a free, open-source, cross-platform application for creating, managing, and running virtual machines (VMs). Virtual machines are computers whose hardware components are emulated by the host computer.

Oracle VirtualBox enables you to set up one or more virtual machines (VMs) on a single physical machine, and use them simultaneously, along with the actual machine. Each virtual machine can execute its own operating system, including Microsoft Windows, Linux, BSD, and MS-DOS versions. You can install and run as many virtual machines as you like – the only practical limits are disk space and memory.

Install Oracle VM VirtualBox on Rocky Linux 8

To install VirtualBox, you must log in to your server as a non-root user with sudo privileges. To do this, you can follow our guide the Initial Server Setup with Rocky Linux 8.

Also, to run 64bit virtual machine’s operating systems, make sure your system processor supports hardware virtualization (VT) and is enabled in BIOS. And the host operating system must be 64bit as well. You can check this by running the command below:

egrep -c '(vmx|svm)' /proc/cpuinfo

Your output must be a non-zero result.

Install VirtualBox on Rocky Linux 8

By default, VirtualBox packages aren’t available in the default Rocky Linux repository. So you need to add it manually to your server. To do this, you can use the following command:

sudo dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
Output
Adding repo from: https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo

Then, update your local package index with the following command:

sudo dnf update -y
Output
Oracle Linux / RHEL / CentOS-8 / x86_64 - Virtu 372  B/s | 181  B     00:00
Oracle Linux / RHEL / CentOS-8 / x86_64 - Virtu 2.5 kB/s | 1.7 kB     00:00
Importing GPG key 0x98AB5139:
 Userid     : "Oracle Corporation (VirtualBox archive signing key) <[email protected]>"
 Fingerprint: 7B0F AB3A 13B9 0743 5925 D9C9 5442 2A4B 98AB 5139
 From       : https://www.virtualbox.org/download/oracle_vbox.asc
Oracle Linux / RHEL / CentOS-8 / x86_64 - Virtu 537 kB/s | 254 kB     00:00
Last metadata expiration check: 0:00:01 ago on Sun 12 Mar 2023 03:58:55 AM EDT.
Dependencies resolved.
Nothing to do.
Complete!

List Available Versions of VirtualBox

At this point, you can list available versions of VirtualBox on Rocky Linux 8 by running the command below:

sudo dnf search virtualbox
Output
====================== Name & Summary Matched: virtualbox ======================
VirtualBox-5.2.x86_64 : Oracle VM VirtualBox
VirtualBox-6.0.x86_64 : Oracle VM VirtualBox
VirtualBox-6.1.x86_64 : Oracle VM VirtualBox
VirtualBox-7.0.x86_64 : Oracle VM VirtualBox

As you can see the latest available version of VirtualBox is 7.0. To install it on your server, run the command below:

sudo dnf install VirtualBox-7.0 -y

Install VirtualBox Extension Pack

At this point, you can add a VirtualBox Extension pack to have support for various VirtualBox functions.

To do this, Visit the VirtualBox Downloads page, Scroll down, and find the Extension pack.

VirtualBox Extension pack
VirtualBox Extension pack

Click on All Supported Platforms to download it.

Then, from your command terminal, switch to your downloads directory:

cd Downloads

Finally, use the VBoxManage tool for the installation of the Extension Pack:

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack

Accept the License, when it prompts for the same.

Launch Oracle VM VirtualBox

At this point, you can start your VirtualBox application on Rocky Linux 8. To do this, go to Activities, click on “show Applications” and then click the icon of this open-source virtualization platform. 

Also, you can launch VirtualBox from the command line. Simply type the following command:

virtualbox

That’s it. You are done.

Conclusion

At this point, you learn to Install Oracle VM VirtualBox on Rocky Linux 8.

Hope you enjoy it. You may be like these articles:

Set up OpenCV on Rocky Linux 8

Install and Configure Nagios on Rocky Linux 8

Newsletter Updates

Enter your email address below and subscribe to our newsletter

Stay informed and not overwhelmed, subscribe now!