Jyoti Sensharma

Generally for testing new components, services or products we frequently need VM machines. Specially for testing open source components. Hence we need some kind of virtualbox setup locally to test these things quickly. Oracle VirtualBox is a general-purpose full virtualiser for x86 hardware, targeted at server, desktop and embedded use.

In this article we will see how quickly we can configure the Oracle VirtualBox and create a CentOS 7 VM. The same article can be referred to create any other OS VM like RHEL 6/7, Fedora, Suse etc


Download the Oracle VirtualBox from below link and install:

Download CentOS 7 minimal version from below link:

Global VirtualBox Network Settings

In below steps we will add a new NAT Network and Host-Only Network which will help our VMs to get a public IP Address and they will be able to connect to the world wide network.

Step1: Navigate to VirtualBox >> Preferences >> Network

Step2: Add a new NAT Network.

Step3: Navigate to File >> Host Network Manager

Step4: Add a new Host-Only Network.

VM creation and its network settings

Step5:  Create a new VM in VitualBox with Type Linux for installing CentOS 7.

Step6: Setting 4GB RAM for this VM so that we can run some servers on this VM and test multiple things at a time.

Step7: In this stage we are fixing the memory utilisation of this VM by selecting Fixed Size, so that it should not consume more than the allocated memory.

Step8: Allocating 20GB memory for the hard disk of this VM

Step9:  Configure the network settings for this CentOS 7 Node1 vm as follows:

Step10: Start this node1 and install CentOS 7 in this vm.

Step11: Just in case if you want to make the IP Address Static “” and IPV6 disabled then follow the below steps:

vi /etc/sysconfig/network-scripts/ifcfg-enp0s8


Step12: Restart the network services:

service network restart

Step13: Repeat the above steps of “VM creation and its network setting” to create Node2.

Configure both the host to recognise each other by their hostnames:

Edit the “/etc/hosts” file:

vi /etc/hosts   localhost localhost.localdomain localhost4 localhost4.localdomain4
::1         localhost localhost.localdomain localhost6 localhost6.localdomain6	node1.example.com	node2.example.com

For Configuring passwordless ssh between these nodes refer the below article:

How to configure passwordless ssh between linux hosts

If you enjoyed this post, please consider leaving a comment or subscribing to the RSS feed to have future articles delivered to your feed reader.