HomeLinux Administration

Oracle Virtual Box Installation on RHEL/CentOS 7 & Creating VM’s using CLI

Oracle Virtual Box Installation on RHEL/CentOS 7 & Creating VM’s using CLI
Like Tweet Pin it Share Share Email
1x1.trans - Oracle Virtual Box Installation on RHEL/CentOS 7 & Creating VM's using CLI

This article helps you to create your own Virtual Lab setup in Linux using Oracle Virtual Box.  In this quick guide, you will find out the installation steps and the VM creation from CLI.  Check out the Video for More details and find the steps to setup the Virtual Lab.

Virtual Box

Virtual Box is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop, and embedded use.  This product currently being developed by Oracle Corporation.


  • Virtual Box is cross-platform capable, VM created on one host can easily run on another using OVF format.
  • Supports remote folder sharing.
  • Supports Snapshots.
  • Free and Open source.
  • Virtual Box disks support encryption with VirtualBox extension packs installed.
  • Supports USB 3.0 devices with extension pack.
  • Support limiting network bandwidth for the guest VMs.

LAB Details  and Pre-Req’s 

In this session, I am going to demonstrate Virtual Box Installation on a Linux machine. Details are:

Host   :  CentOS 7.3 x86_64

Host Platform:  VMware Workstation 12

Hardware Virtualization:  AMD-v/Intel VT-x

Host Network:   VM have 02 vNICs

VNIC1: Host Only (Host Only Connectivity)

vNIC2 : Bridged  (Internet Connectivity)

VirtualBox Version   :   5.1.x86_64

In this lab, we are going to install VirtualBox and going to create an RHEL 7 VM.

Also, check out the below video for More details:

1x1.trans - Oracle Virtual Box Installation on RHEL/CentOS 7 & Creating VM's using CLI

Update the system and install the pre-requisite packages for Virtual Box to work.


Not mandatory, but let’s install “X Windows” for an easy look into the Virtual Box issues if any.


Take a reboot of the system.


Installation of VirtualBox

Step 1: Download the latest available versions of Virtual Box software from the download page of the product.


Step 2: Once software installers downloaded (they are rpm’s generally), transfer those to the machine going to be configured.

Step 3: Install the Virtualbox RPM.

“vboxconfig” will install, configure the virtual box modules and start the service.

Validate the Installation


vboxmanage is the CLI provided by the Virtual Box package.

Steps to Create a VM:

Set the Path of Virtual Machine


Create a VM Container and register it.


Create a vDisk for the VM. This file will be presented to the VM as a virtual disk.


In this example, disk size will be 6G and disk type will be vdi.

List OS types supported by installed Virtual Box software.


Configure the compute, networking and container operating system support.


Create Storage IDE controller and attach to the VM.


Attached the vDisk and the ISO image for the operating system installation.

Start VirtualBox VM from the command line

To display the information about Machine.

To take a snapshot of the VM.

Revert back to a particular snapshot

Power off the VM

Delete the VM

Pre-built VirtualBox VMs

If you want to use pre-built VM’s, can download those from Oracle Technology Site.


Comments (2)

Leave a Reply to Vamsi Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.