
The following tutorial is intended to explain the procedure for deploying VirtualBox on a System running CentOS 7.
Oracle VM VirtualBox: is a free and open-source hosted hypervisor for x86 virtualization, developed by Oracle Corporation. VirtualBox runs on Windows, Linux (Including Ubuntu and CentOS), or macOS as its host OS and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8), DOS/Windows 3.x, Linux (2.4, 2.6 and 3.x), Solaris and OpenSolaris, OS/2, and OpenBSD. For more information please visit Oracle VM VirtualBox
Code-Requisites:
- Laptop or Bare metal System running CentOS 7 or later
- Administrative rights to the system
- Basic Understanding of VirtualBox
Step 1) Creating a Repo and Importing VBox Public Keys
Create a VirtualBox repo file under the folder “/etc/yum.repos.d”. Copy and Paste the following command in your terminal.
cat <<EOF > /etc/yum.repos.d/virtualbox.repo[virtualbox]name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBoxbaseurl=http://download.virtualbox.org/virtualbox/rpm/el/\$releasever/\$basearchenabled=1 gpgcheck=1repo_gpgcheck=1gpgkey=https://www.virtualbox.org/download/oracle_vbox.ascEOF
Update yum repositories index using “yum repolist” command and codess “y” to accept VirtualBox repo keys
sudo yum repolist
Step 2) Installing Essential Packages
install the gcc make perl packages from your distribution. This is needed to et your system up to build kernel modules
sudo yum install gcc make perl -y
Step 3) Install Linux-headers
Next install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. You can get the kernel number by running the following command.
[root@centosvm01 vagrant]# uname -r3.10.0-1062.1.2.el7.x86_64
Once you have the kernel number you can search for the distribution containing the headers. If you are unsure, you can run /sbin/vboxconfig, this will attempt to build the kernel module, but fail. In the error message you will find the names of the packages you need to install. To install the linux-headers.
sudo yum install kernel-devel kernel-devel-3.10.0-1062.1.2.el7.x86_64 -y
Step 4) Install VirtualBox 6.0
Now that we have all the code-requisites in place, we can install VirtualBox 6.o by running the following command.
yum install VirtualBox-6.0 -y
Step 5) Building the Kernel Modules and Starting VirtualBox
Next, we'll need to install the VirtualBox Kernel Modules and start the services, You can do this by running the following command.
[root@centosvm01 vagrant]# /sbin/vboxconfigvboxdrv.sh: Stopping VirtualBox services.vboxdrv.sh: Starting VirtualBox services.vboxdrv.sh: Building VirtualBox kernel modules.
VirtualBox is now installed and started. You can check the version with the "vboxmanage" utility
[root@centosvm01 vagrant]# vboxmanage -v6.0.14r133895
Final Thoughts on Installing VirtualBox 6.0 on CentOS 7
If you're a Developer, Operator, Designer or just looking to mess around with Virtualization, then VirtualBox is a great tool to get you started. VirtualBox is among the more renowned and wonderful virtualization management software going around and offers some advanced benefits that make using it worth your time.
- Enable 3D Graphics
- Leverage Virtual Appliances
- Bridge Networks
- Future-proofing using snapshots
- Virtual Machine Cloning
- Drag-n-Drop sharing of files and folders
- phpVirtualBox
- Guest Additions
Related Blogs

Installing VirtualBox 6.0 on CentOS 7
The following tutorial is intended to explain the procedure for deploying VirtualBox on a System running CentOS 7.
Oracle VM VirtualBox: is a free and open-source hosted hypervisor for x86 virtualization, developed by Oracle Corporation. VirtualBox runs on Windows, Linux (Including Ubuntu and CentOS), or macOS as its host OS and supports a large number of guest operating systems including but not limited to Windows (NT 4.0, 2000, XP, Server 2003, Vista, Windows 7, Windows 8), DOS/Windows 3.x, Linux (2.4, 2.6 and 3.x), Solaris and OpenSolaris, OS/2, and OpenBSD. For more information please visit Oracle VM VirtualBox
Code-Requisites:
- Laptop or Bare metal System running CentOS 7 or later
- Administrative rights to the system
- Basic Understanding of VirtualBox
Step 1) Creating a Repo and Importing VBox Public Keys
Create a VirtualBox repo file under the folder “/etc/yum.repos.d”. Copy and Paste the following command in your terminal.
cat <<EOF > /etc/yum.repos.d/virtualbox.repo[virtualbox]name=Oracle Linux / RHEL / CentOS-$releasever / $basearch - VirtualBoxbaseurl=http://download.virtualbox.org/virtualbox/rpm/el/\$releasever/\$basearchenabled=1 gpgcheck=1repo_gpgcheck=1gpgkey=https://www.virtualbox.org/download/oracle_vbox.ascEOF
Update yum repositories index using “yum repolist” command and codess “y” to accept VirtualBox repo keys
sudo yum repolist
Step 2) Installing Essential Packages
install the gcc make perl packages from your distribution. This is needed to et your system up to build kernel modules
sudo yum install gcc make perl -y
Step 3) Install Linux-headers
Next install the Linux kernel "header" files matching the current kernel for adding new hardware support to the system. You can get the kernel number by running the following command.
[root@centosvm01 vagrant]# uname -r3.10.0-1062.1.2.el7.x86_64
Once you have the kernel number you can search for the distribution containing the headers. If you are unsure, you can run /sbin/vboxconfig, this will attempt to build the kernel module, but fail. In the error message you will find the names of the packages you need to install. To install the linux-headers.
sudo yum install kernel-devel kernel-devel-3.10.0-1062.1.2.el7.x86_64 -y
Step 4) Install VirtualBox 6.0
Now that we have all the code-requisites in place, we can install VirtualBox 6.o by running the following command.
yum install VirtualBox-6.0 -y
Step 5) Building the Kernel Modules and Starting VirtualBox
Next, we'll need to install the VirtualBox Kernel Modules and start the services, You can do this by running the following command.
[root@centosvm01 vagrant]# /sbin/vboxconfigvboxdrv.sh: Stopping VirtualBox services.vboxdrv.sh: Starting VirtualBox services.vboxdrv.sh: Building VirtualBox kernel modules.
VirtualBox is now installed and started. You can check the version with the "vboxmanage" utility
[root@centosvm01 vagrant]# vboxmanage -v6.0.14r133895
Final Thoughts on Installing VirtualBox 6.0 on CentOS 7
If you're a Developer, Operator, Designer or just looking to mess around with Virtualization, then VirtualBox is a great tool to get you started. VirtualBox is among the more renowned and wonderful virtualization management software going around and offers some advanced benefits that make using it worth your time.
- Enable 3D Graphics
- Leverage Virtual Appliances
- Bridge Networks
- Future-proofing using snapshots
- Virtual Machine Cloning
- Drag-n-Drop sharing of files and folders
- phpVirtualBox
- Guest Additions