Install VirtualBox 6 on CentOS 8

29/12/2020
VirtualBox is an open source Type-II hypervisor from Oracle. It can be a great free alternative to VMware Workstation Pro.  In this article, I am going to show you how to install VirtualBox 6 on CentOS 8. So, let’s get started.

Enabling Hardware Virtualization Extension:

In order to install any type of hypervisor, you must enable hardware virtualization feature of your processor from the BIOS of your motherboard. Otherwise, your virtual machines will be very laggy and won’t perform as expected.

If you’re using an Intel processor, then the hardware virtualization feature is called VT-x or VT-d.

If you’re using an AMD processor, then the hardware virtualization feature is called AMD-v.

Once you enable hardware virtualization from the BIOS, start CentOS 8 and run the following command to confirm it.

$ grep –color –perl-regexp ‘vmx|svm’ /proc/cpuinfo

As you can see, svm (for AMD) is available as a CPU feature in my case. I am using an AMD processor.

If you’re using an Intel processor, then the CPU feature will be called vmx.

Installing Required Tools for Building VirtualBox Kernel Modules:

Your CentOS 8 machine must have all the required tools installed in order to build VirtualBox kernel modules. Otherwise, VirtualBox won’t work.

First, do a system update with the following command:

$ sudo yum update

To confirm the installation, press Y and then press <Enter>.

YUM will download and install all the required packages from the internet. It may take a while to complete.

At this point, the system update should be complete.

Now, reboot your CentOS 8 machine with the following command:

$ sudo reboot

Once your CentOS 8 machine starts, install ELF utils and kernel development libraries with the following command:

$ sudo yum install elfutils-libelf-devel kernel-devel-$(uname -r)

Press Y and then press <Enter> to confirm the installation.

ELF utils and kernel development libraries should be installed.

Downloading VirtualBox 6:

VirtualBox is not available in the official package repository of CentOS 8. But, you can easily download it from the official website of VirtualBox.

First, visit the official Linux download page of VirtualBox. Now, click on Oracle Linux 8 / Red Hat Enterprise Linux 8 / CentOS 8 link as marked in the screenshot below.

Your browser should prompt you to save the VirtualBox RPM package file. Select Save File and click on OK.

Your browser should start downloading VirtualBox RPM package file. It may take a while to complete.

Downloading VirtualBox 6 Extension Pack:

You should also download VirtualBox 8 Extension Pack.

First visit the official downloads page of VirtualBox. Then, click on All supported platforms link from the Oracle VM VirtualBox Extension Pack section as marked in the screenshot below.

Your browser should prompt you to save the file. Click on Save File.

Your browser should start downloading VirtualBox Extension Pack file. It may take a while to complete.

Installing VirtualBox 6:

Once the download is complete, navigate to the ~/Downloads directory as follows:

$ cd ~/Downloads

You should find the VirtualBox-6.0-6.0.14_133895_el8-1.x86_64.rpm and Oracle_VM_VirtualBox_Extension_Pack-6.0.14.vbox-extpack file in this directory as you can see in the screenshot below.

$ ls -lh

Now, install VirtualBox RPM package using YUM package manager as follows:

$ sudo yum localinstall VirtualBox-6.0-6.0.14_133895_el8-1.x86_64.rpm

To confirm the installation, press Y and then press <Enter>.

YUM package manager will automatically download all the required dependency packages and install VirtualBox. It may take a while to complete.

At this point, VirtualBox should be installed.

Now, to check whether VirtualBox is working correctly, run the following command:

$ VBoxManage –version

As you can see, I am using VirtualBox 6.0.14. So, it’s working just fine.

Fixing Error Building Kernel Module:

If you did not install all the required tools to build VirtualBox kernel modules, then you may see the following WARNING message when you try to run VBoxManage –version command.

To solve this, make sure you install all the required tools to build VirtualBox kernel modules (as shown in the Installing Required Tools for Building VirtualBox Kernel Modules section of this article) and then run the following command to manually build the VirtualBox kernel modules.

$ sudo /sbin/vboxconfig

The VirtualBox kernel modules should rebuilt.

Starting VirtualBox 6:

Now, you can find VirtualBox in the Application Menu of CentOS 8. Click on the VirtualBox icon.

VirtualBox 6 should start.

Installing VirtualBox 6 Extension Pack:

VirtualBox Extension Pack adds some new functionalities to VirtualBox. i.e,

  • USB 2.0 and USB 3.0 support
  • Access host webcam
  • VirtualBox RDP (Remote Desktop Protocol) server for accessing VMs over RDP.
  • PXE boot ROM
  • Disk encryption
  • NVMe virtual SSD

To install VirtualBox Extension Pack, go to File > Preferences…

Then, go to Extensions and click on the + icon as marked in the screenshot below.

Then, select VirtualBox Extension Pack file that you’ve downloaded and click on Open.

Now, click on Install.

Scroll down all the way and click on I Agree.

Type in your login password and click on Authenticate.

VirtualBox Extension Pack should be installed. Click on OK.

Now, click on OK.

That’s how you install VirtualBox 6 on CentOS 8. Thanks for reading this article.

ONET IDC thành lập vào năm 2012, là công ty chuyên nghiệp tại Việt Nam trong lĩnh vực cung cấp dịch vụ Hosting, VPS, máy chủ vật lý, dịch vụ Firewall Anti DDoS, SSL… Với 10 năm xây dựng và phát triển, ứng dụng nhiều công nghệ hiện đại, ONET IDC đã giúp hàng ngàn khách hàng tin tưởng lựa chọn, mang lại sự ổn định tuyệt đối cho website của khách hàng để thúc đẩy việc kinh doanh đạt được hiệu quả và thành công.
Bài viết liên quan

Install VirtualBox Guest Additions on Ubuntu VirtualBox VM

If you’re using VirtualBox for virtualization, then VirtualBox Guest Additions is a must have tool for you. VirtualBox...
29/12/2020

How to SSH into your VirtualBox Guest

There are times when you want to have a remote access to your VM. Maybe, it’s just a server operating system running...
29/12/2020

How to Install VirtualBox 6 on Debian 10

This tutorial shows how to setup VirtualBox 6.1 on Debian 10 Buster, it is also useful for previous versions of Debian...
29/12/2020
Bài Viết

Bài Viết Mới Cập Nhật

Reliable IPv4 and IPv6 Subnet Rental Services: The Perfect Solution for Global Businesses
23/12/2024

Tìm Hiểu Về Thuê Proxy US – Lợi Ích và Cách Sử Dụng Hiệu Quả
11/12/2024

Mua Proxy V6 Nuôi Facebook Spam Hiệu Quả Tại Onetcomvn
03/06/2024

Hướng dẫn cách sử dụng ProxyDroid để duyệt web ẩn danh
03/06/2024

Mua proxy Onet uy tín tại Onet.com.vn
03/06/2024