VirtualBox is an open-source, cross-platform virtualization platform. It supports a number of guest operating systems, including Linux and Windows, and allows you to run multiple virtual machines simultaneously.

In this tutorial, we will explain how to install VirtualBox on CentOS 8.

Installing VirtualBox on CentOS 8

Perform the steps below as root or user with sudo privileges to install VirtualBox on CentOS 8:

  1. Enable the Oracle’s VirtualBox repository:
    sudo dnf config-manager --add-repo=https://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo
  2. At the time of writing this article, the latest stable version of VirtualBox is version 6.0.x. Run the following command to install the VirtualBox-6.0 package:
    sudo yum install VirtualBox-6.0

    During the installation, you will be prompted to import repository the GPG key. Type y and hit Enter.

That’s it. At this point, VirtualBox has been installed on your CentOS 8 system.

Installing VirtualBox Extension Pack

The VirtualBox Extension Pack provides several useful functionalities for guest machines such as virtual USB 2.0 and 3.0 devices, support for RDP, image encryption, and more.

Use wget to download the extension pack from the VirtualBox download page:

wget https://download.virtualbox.org/virtualbox/6.0.14/Oracle_VM_VirtualBox_Extension_Pack-6.0.14.vbox-extpack

Once the file is downloaded, import it using the following command:

sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.0.14.vbox-extpack

You will be presented with the Oracle license and prompted to accept the terms and conditions.

Do you agree to these license terms and conditions (y/n)?

Type y and hit Enter. When the installation is complete, you’ll see the following output:

0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Successfully installed "Oracle VM VirtualBox Extension Pack".

Starting VirtualBox

Now that VirtualBox has been installed on your CentOS machine, you can start it either from the command line by typing VirtualBox or by clicking on the VirtualBox icon (Activities -> Oracle VM VirtualBox).

When the VirtualBox is started for the first time, a window like the following should appear:

From here, you can start creating your Windows and Linux virtual machines.

Conclusion

Installing VirtualBox on CentOS 8 is a straightforward task. All you need to do is to enable the Oracle repository and install the VirtualBox package with dnf.

For more information about VirtualBox visit the official VirtualBox documentation page.

If you hit a problem or have feedback, leave a comment below.