How To Install VirtualBox 7.0 on CentOS 8 / RHEL 8

Posted on 72 views

How can I install VirtualBox on CentOS 8 / RHEL 8 Linux?. In this blog post, We will discuss how to install VirtualBox on CentOS 8 / RHEL 8. Oracle VM VirtualBox 7.0 is a free to use type 2 hypervisor. This means Oracle VM VirtualBox requires an existing OS to be installed and thus run alongside existing applications on that host. The installation should be straightforward on any Linux system with Linux kernel 2.6 or 3.x.

Starting with Oracle VM VirtualBox version 5.2, the SSE2 CPU extension is required. The installer with automatically builds and installs the Oracle VM VirtualBox kernel modules: vboxdrvvboxnetflt, and vboxnetadp.

Let’s begin to install VirtualBox 7.0 on CentOS 8 / RHEL 8 Linux system.

Step 1: Add VirtualBox / EPEL repository

Add the VirtualBox repository to the local system by downloading virtualbox.repo file and placing it under /etc/yum.repos.d directory.

sudo dnf -y install wget
sudo mv virtualbox.repo /etc/yum.repos.d/

Import Oracle public key:

wget -q
sudo rpm --import oracle_vbox.asc

We also need to add EPEL repository:

sudo dnf -y install

Once the repository is added update and reboot the system.

sudo dnf -y update
sudo systemctl reboot

Step 2: Install VirtualBox on RHEL 8 / CentOS 8

Login back to the system after the reboot and download required build tools for VirtualBox.

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

Then proceed to install the latest version of VirtualBox 7.0 by running the command:

sudo dnf install -y VirtualBox-7.0

The installation command will build kernel modules and automatically create vboxusers group. Any system user who is going to use USB devices from Oracle VM VirtualBox guests must be a member of that group.

To manually add VirtualBox user must to be a member of the group.

sudo usermod -aG vboxusers $USER

To rebuild Kernel modules, run:

sudo /usr/lib/virtualbox/ setup

Step 3: Starting VirtualBox on CentOS 8 / RHEL 8

You have the flexibility of starting Oracle VM VirtualBox program by running the program of your choice (VirtualBoxVBoxManage, or VBoxHeadless) from a terminal.

$ VirtualBox

Alternatively start VirtualBox 7.0 on RHEL 8 / CentOS 8 from GUI by navigating to Application >> System Tools >> Oracle VM VirtualBox.


Download Extension Pack:

cd ~/
wget wget

Now build the kernel modules using the command:

$ sudo /sbin/vboxconfig Stopping VirtualBox services. Starting VirtualBox services. Building VirtualBox kernel modules.

Once downloaded, navigate to the location of the file and install it with the command:

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-*.vbox-extpack

Installation progress:

Do you agree to these license terms and conditions (y/n)? y
License accepted. For batch installation add
to the VBoxManage command line.

Successfully installed "Oracle VM VirtualBox Extension Pack".



Gravatar Image
A systems engineer with excellent skills in systems administration, cloud computing, systems deployment, virtualization, containers, and a certified ethical hacker.