How To Install VirtualBox 5.2 on CentOS 7 / RHEL 7

21

VirtualBox is an open-source hypervisor software that helps you create and run multiple guest operating systems (“virtual machines”) on a single hardware machine. VirtualBox can be installed on host operating systems, including Linux, Windows, Solaris, OS X, and OpenSolaris.

From the version 2.0 VirtualBox supports 32 and 64bit host and guest operating systems. If you want to install 64bit guests then your processor must support hardware virtualization and, of course, the host operating system must be 64bit as well.

VirtualBox is released under GPL v2 and Oracle VM VirtualBox extension pack is released under PUEL (Personal Use and Evaluation License).

From VirtualBox 5.1, installers no longer rely on DKMS for module rebuilding.

This tutorial shows how to install VirtualBox 5.2 on CentOS 7 / RHEL 7 via yum repository.

Install VirtualBox 5.2 on CentOS 7 / RHEL 7

Update the system to the latest version.

yum update

Reboot the system.

reboot

Once the system is up, install header and development tools.

yum install -y kernel-devel kernel-headers gcc make perl

Also, install the wget package to download items using the terminal.

yum -y install wget

Download the Oracle public key.

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

Import Oracle public key.

rpm --import oracle_vbox.asc

Download the VirtualBox repository file for CentOS 7 / RHEL 7 and move it into /etc/yum.repos.d/ directory.

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

OR

Create the /etc/yum.repos.d/virtualbox.repo file with the following repository information.

[virtualbox]
name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBox
baseurl=http://download.virtualbox.org/virtualbox/rpm/el/$releasever/$basearch
enabled=1
gpgcheck=1
repo_gpgcheck=1
gpgkey=https://www.virtualbox.org/download/oracle_vbox.asc

Install VirtualBox v5.2 using the yum command.

yum install -y VirtualBox-5.2

Run the below command to check the status of VirtualBox Linux kernel module service.

systemctl status vboxdrv

Output:

 vboxdrv.service - VirtualBox Linux kernel module
   Loaded: loaded (/usr/lib/virtualbox/vboxdrv.sh; enabled; vendor preset: disabled)
   Active: active (exited) since Tue 2018-08-14 01:09:37 EDT; 2min 18s ago
  Process: 26353 ExecStart=/usr/lib/virtualbox/vboxdrv.sh start (code=exited, status=0/SUCCESS)

Aug 14 01:09:37 server.itzgeek.local systemd[1]: Starting VirtualBox Linux kernel module...
Aug 14 01:09:37 server.itzgeek.local vboxdrv.sh[26353]: vboxdrv.sh: Starting VirtualBox services.
Aug 14 01:09:37 server.itzgeek.local systemd[1]: Started VirtualBox Linux kernel module.

Access VirtualBox

Start VirtualBox: Application >> System Tools >> Oracle VM VirtualBox.

Install VirtualBox 5.2 on CentOS 7 - Start VirtualBox on CentOS 7
Install VirtualBox 5.2 on CentOS 7 – Start VirtualBox on CentOS 7

OR

virtualbox

What are you waiting for? just go and create virtual machines.

VirtualBox Running VMs on CentOS 7:

Install VirtualBox 5.2 on CentOS 7 - VirtualBox running on CentOS 7
Install VirtualBox 5.2 on CentOS 7 – VirtualBox running on CentOS 7

That’s All. You have successfully installed VirtualBox on CentOS 7.

Further Reading

You might also like

How To Install VirtualBox 5.2 on CentOS 7 / RHEL 7

21