How to Install VirtualBox on RHEL 9 Step-by-Step

In this post, we will cover how to install VirtulaBox on RHEL 9 step-by-step.

As we know that VirtualBox is a free cross-platform virtualization tool for x86 and Intel64/AMD64 hardware. Using VirtualBox, we can run multiple operating systems simultaneously and help users to setup their test environment on their desktop or laptops. It is generally used as desktop level and provides a graphical user interface for managing virtual machines.

Basic terminology used for VirtualBox

  • Host OS: It is the operating of your physical system on which VirtualBox is installed.
  • Guest OS: It is the operating system which is running inside the virtual machine.
  • VM (Virtual Machine): It is a virtual environment created by virtualbox for running the OS.
  • Guest Additions: These are special software designed to install inside the VM to improve guest OS performance.


  • Pre-Installed RHEL 9 with desktop environment
  • Sudo User with admin privileges
  • Red Hat Subscription or locally configure Yum Repo
  • Internet Connectivity

Without any delay, let’s deep dive into VirtualBox Installation Steps on RHEL 9

1) Enable VirtualBox and EPEL Repository

Login to your RHELL 9 system and open the terminal and run following dnf command to enable official virtualbox package repository.

$ sudo dnf config-manager --add-repo=

Import VirtualBox public key, run

$ sudo rpm --import

Run following to enable EPEL repository

$ sudo dnf install -y

2) Install VirtualBox Dependencies

Install following virtualbox dependencies with the help of beneath dnf command,

$ sudo dnf install binutils kernel-devel kernel-headers libgomp make patch gcc glibc-headers glibc-devel dkms -y

Once all the dependencies are installed successfully then reboot the system once with beneath command,

$ sudo reboot

3) Install VirtualBox 7 / 6

Before start installing the virtualbox, first verify what exact version of VirtualBox is available in the repository, run

$ sudo dnf search virtualbox


As we can see we have VirtualBox-7.0 and 6.1 available in repository, so to install virtualbox 7, run beneath command.

$ sudo dnf install VirtualBox-7.0 -y



In case, you are interested to install virtualbox 6.1, then run

$ sudo dnf install VirtualBox-6.1 -y

Once VirtualBox is installed, add your local user to vboxuser group so that it can perform all the operations on virtualbox,

$ sudo usermod -aG vboxusers $USER
$ newgrp vboxusers

4) Launch VirtualBox GUI

Search virtualbox from Activity menu and click on its icon


We will get following VirtualBox GUI when we click on its icon,


Above screen confirms that VirtualBox-7.0 is installed successfully.

To add following additional functionality to the VirtualBox, you must install extension pack.

  • USB 2.0/3.0 support
  • Virtual RDP
  • Disk Encryption
  • Pxe Boot

5) Install VirtualBox Extension Pack

Use following wget command to download extension pack file.

$ wget

Once it is downloaded, first build the kernel module and run following VBoxManage command to install

$ sudo /sbin/vboxconfig
$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-7.0.2.vbox-extpack

Press ‘y’ to accept license terms and conditions,


To verify VirtualBox Extension Pack Installation,

Head to VirtualBox GUI, File –> Tools –> Extension-Pack-Manager


Perfect, above confirms that extension packages are installed successfully.

That’s all from this post, I hope you have found this post useful and able to install virtualbox on your RHEL 9 system.

Share on:

I am a Cloud Consultant with over 15 years of experience in Linux, Kubernetes, cloud technologies (AWS, Azure, OpenStack), automation (Ansible, Terraform), and DevOps. I hold certifications like RHCA, CKA, CKAD, CKS, AWS, and Azure.

Leave a Comment