VirtualBox is open-source software for virtualizing the x86 computing architecture. It acts as a hypervisor, creating a VM (virtual machine) in which the user
can run another OS (operating system). The operating system in which VirtualBox runs is called the "host" OS. The operating system running in the VM is
called the "guest" OS. VirtualBox supports Windows, Linux, or macOS as its host OS.
When configuring a virtual machine, the user can specify how many CPU cores, and how much RAM and disk space should be devoted to the VM. When the VM is running, it can be "paused." System execution is frozen at that moment in time, and the user can resume using it later.
To start with, we will download VirtualBox and install it. We should follow the steps given below for the installation.
Step 1 To download VirtualBox, click on the following link https://www.virtualbox.org/wiki/Downloads Now, depending on your OS, select which version to install. In our case, it will be the first one (Windows host).
Step 2 Once the option is selected, click on “Next”.
Step 3 You have the option asking where to install the application. We can leave it as default and click on “Next”.
Step 4Once the options are selected as shown in the following screenshot, click on Next.
Step 5 A dialog box will come up asking whether to proceed with the installation. Click “Yes”.
Step 6 In the next step, click on “Install”.
Step 7Tick the start VirtualBox check box and click on “Finish”.
Step 8 VirtualBox application will now open as shown in the following screenshot. Now, we are ready to install the virtual machines.
To create a virtual machine with Oracle VirtualBox, we should follow the steps given below.Step 1 Click on the “Oracle VM VirtualBox” icon on the desktop as shown in the screenshot below.
There are two types of networking modes in VirtualBox, which are −
1. Nat Networks and
2. Host-only Networks.
Both of these are explained in detail below.
For setting up Nat Networks, we should follow the steps given below.
Step 1 Go to Oracle VM VirtualBox Manager → Click on “Preferences…”
Step 2 Click on “Network” and then on the left panel click on the “NAT Networks” tab.
Step 3 Click on the “+” button, which is highlighted in the screenshot below.
Step 4 Here, we have to put the “Network Name” and the IP range for this network that will be NAT-ed, in order to have access to internet and to other networks.
For setting up Host-only Networks, we should follow the steps given below.
Step 1 If you click on the “Host-only Networks” tab, you can create networks that are isolated from the other networks. However, VM hosts communicate with each other and the Hypervisor machine. Click on the “+” sign.
Step 2The host interface will continue to be created as shown in the screenshot below.
Step 3If you click on VirtualBox Host button, you can edit the settings.
Step 4 Here, we have to put the “Network Name” and the IP range for this network that will be NAT-ed, in order to have access to internet and to other networks. If you want your host machines to take “DHCP IP”, click on the “DHCP Server” tab and check the box “Enable Server” → Click “OK”.
Step 5 In the “Adapter” tab, put the IP of the hypervisor.
After all these preparations for setting up the network modes is complete. It is now time to assign a network to our VMs. To do this, Click on the VMs on the left side of the panel, then right click on the “Network” option and a table will be open.