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 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: vboxdrv, vboxnetflt, and vboxnetadp.

Let’s begin to install VirtualBox 6.1 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
wget https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
sudo mv virtualbox.repo /etc/yum.repos.d/

Import Oracle public key:

wget -q https://www.virtualbox.org/download/oracle_vbox.asc
sudo rpm --import oracle_vbox.asc

We also need to add EPEL repository:

sudo dnf -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

Step 2: Install VirtualBox on RHEL 8 / CentOS 8

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 6.1 by running the command:

sudo dnf install -y VirtualBox-6.1

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/vboxdrv.sh setup

Step 3: Starting VirtualBox on CentOS 8 / RHEL 8 Linux

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

$ VirtualBox

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

install virtualbox ubuntu 18.04 debian 9 01 min 1

Download Extension Pack:

cd ~/
wget https://download.virtualbox.org/virtualbox/6.1.22/Oracle_VM_VirtualBox_Extension_Pack-6.1.22.vbox-extpack

Click the file to install it.

Other Virtualization related articles for RHEL / CentOS 8:

Install FreeBSD on VirtualBox

How To Add RHEL 8 qcow2 Image To OpenStack Glance

Complete Installation of RHEL 8 with Screenshots

How to install KVM on RHEL 8 / CentOS 8

How to extend/increase KVM Virtual Machine (VM) disk size

How to Create CentOS / Fedora / RHEL VM Templates on KVM

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!


As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.

LEAVE A REPLY

Please enter your comment!
Please enter your name here