How to Install VirtualBox on Rocky Linux 8 (Step by Step)

VirtualBox is a free and open-source virtualization tool and typically used at desktop level for building the test environment. It is developed and managed by Oracle corporation, that’s why it is known as Oracle VM VirtualBox. VirtualBox is a type-2 hypervisor for x86 and AMD64/Intel64 systems.

In this post, we will learn how to install VirtualBox on Rocky Linux 8 step by step. Following are the minimum system requirement for VirtualBox,

  • Rocky Linux 8 Installation with GUI
  • Minimum 4 GB RAM
  • Intel and AMD processor
  • User with sudo privileges
  • Stable Internet Connection

Let’s dive into VirtualBox Installation steps.

Step 1) Verify Virtualization is Enabled or not

Login to Rocky Linux and open the terminal, run following grep command to verify whether virtualization is enabled at processor level or not.

$ grep  -E -c '(vmx|svm)' /proc/cpuinfo
2
$

Output of above command should be non-zero. If the output is zero, then it means virtualization is not enabled at processor. So, to enable it, reboot your system, go to bios settings and enable VT technology.

Step 2) Update System and Install development tools

Run beneath command to install all updates on rocky linux (optional)

$ sudo dnf update -y

Install following development tools which are used during VirtualBox installation. run beneath command

$ sudo dnf install -y kernel-devel kernel-headers gcc make perl elfutils-libelf-devel wget

Once all the packages are installed, reboot your system once using bneath reboot command.

$ sudo reboot

Step 3) Configure VirtualBox Package Repository

To install latest and stable version of virtualbox, run following commands to configure VirtualBox repository.

$ wget https://www.virtualbox.org/download/oracle_vbox.asc

$ sudo rpm --import oracle_vbox.asc

$  sudo wget http://download.virtualbox.org/virtualbox/rpm/el/virtualbox.repo -O /etc/yum.repos.d/virtualbox.repo

Step 4) Install VirtualBox 

At the time of writing this article, VirtualBox-6.1 is available , so run below command to install it

 $ sudo dnf install -y virtualBox-6.1

Install-VirtualBox-6-Rocky-Linux

Once the virtualbox is installed verify it’s service status using following command,

$ sudo systemctl status vboxdrv

vboxdrv-service-status-rockylinux

Prefect, above output confirms that virtualbox is installed successfully.

Step 5) Access VirtualBox

To access the virtualbox, go to Activities and search virtualbox,

Access-VirtualBox--Rocky-Linux

click on virtualbox icon

VirtualBox-Dash-Rocky-Linux

 Step 6) Install Oracle VM Virtualbox Extension Pack

Extension pack provides additional functionality to virtualbox like USB 2.0/3.0, Virtual Remote Desktop Protocol (VRDP) support, Disk encryption and Intel PXE boot etc. To install extension pack, first download it’s file using below wget command.

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

Run beneath command to install extension pack

$ sudo VBoxManage extpack install Oracle_VM_VirtualBox_Extension_Pack-6.1.32.vbox-extpack

You will be prompted to accept the license terms and condition, press ‘y’ and then hit enter

Extension-Pack-RockyLinux

Above output confirms that extension pack has been installed successfully. Now you can start creating virtual machines and build your test environment.

That’s all from this guide, I hope you have found it informative. Please do share your queries and comments in below comments section.

1 thought on “How to Install VirtualBox on Rocky Linux 8 (Step by Step)”

Leave a Comment

15 − one =