How to install VirtualBox hypervisor on Rocky Linux 8

Opensource Virtualbox is one of the best ways to create and run virtual machines on Linux, Windows, and macOS. Thus, if you are using Rocky Linux 8 and want to set up VirtualBox on it then here are the commands and steps to install it.

Steps to install VirtualBox software on Rocky Linux 8

The commands given here can also be used for AlmaLinux including CentOS 8/7 and RHEL Linux distros.

1. Add VirtualBox Repository on Rocky Linux

Virtualbox is not available to install from the official repository, to set it up we have to add its repository manually. Here is the command-

sudo dnf config-manager --add-repo=


2. Run system update

To rebuild the system cache and included the Oracle GPG key into our system that will help it to verify the package we will get for the VirtualBox installation on our Rocky Linux system.

sudo dnf update


3. Command to download & install VirtualBox

As there are multiple versions are available of VirtualBox to set up on Rocky Linux, thus first find what are those?

dnf search virtualbox

Search for VirtualBox version on Rocky Linux 8

Right now, when we are performing this tutorial, there were three versions available to install. The latest one was- VirtualBox-6.1, hence we will install the same with the following command-

sudo dnf install VirtualBox-6.1

VirtualBox installation on Rocky Linux


4. Installing VirtualBox Extension Pack

To have the support for various VirtualBox functions such as using USB 2.0 and USB 3.0 devices, VirtualBox RDP, disk encryption, NVMe, and PXE boot for Intel cards, we need to add its Extension pack that is available to download from its website.

Therefore, go to the official website of VirtualBox.

  • Scroll down and find the Extention pack.
  • Click on All Supported Platforms to download it.VirtualBox Extension pack install via command line
  • Now, go to the command terminal.
  • As whatever we get from the browser go to the Downloads directory, thus switch to that first.
    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 License, when it prompts for the same.


5. Run Virtualization platform

Click on Activities and select the VirtualBox icon to start and creating virtual machines.

VirtualBox hypervisor on Rocky Linux 8


Other Articles:



Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.