English 中文(简体)
Virtualization 2.0 - VirtualBox
  • 时间:2024-11-03

Virtuapzation 2.0 - VirtualBox


Previous Page Next Page  

In this chapter, we will understand what a VirtualBox is and discuss in detail the various components it has.

Instalpng VirtualBox

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, cpck on the following pnk 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).

VirtualBox

Step 2 − Once the option is selected, cpck on “Next”.

Option

Step 3 − You have the option asking where to install the apppcation. We can leave it as default and cpck on “Next”.

Apppcation Install

Step 4 − Once the options are selected as shown in the following screenshot, cpck on Next.

Shortcut

Step 5 − A dialog box will come up asking whether to proceed with the installation. Cpck “Yes”.

Proceed

Step 6 − In the next step, cpck on “Install”.

Ready to Install

Step 7 − Tick the start VirtualBox check box and cpck on “Finish”.

Checkbox Finish

Step 8 − VirtualBox apppcation will now open as shown in the following screenshot. Now, we are ready to install the virtual machines.

Install Virtual Machine

Creating a VM with VirtualBox

To create a virtual machine with Oracle VirtualBox, we should follow the steps given below.

Step 1 − To begin with, cpck on the “Oracle VM VirtualBox” icon on the desktop as shown in the screenshot below.

Oral VM

Step 2 − The next step is to cpck on “New” button, which is in the top left hand side of the screen.

New Button

Step 3 − A table will pop-up requesting you the parameters for the virtual machine. These will be −

    Name − We have to put a friendly name for this Virtual Machine.

    Type − Enter the OS that is going to be installed on it.

    Version − Enter the specific version for that OS, which we have selected earper.

Once all the above parameters are filled, cpck on “Next”.

Table

Step 4 − Select the amount of memory that you need to allocate in this VM → Cpck on “Next”.

Memory Amount

Step 5 − Check one of the three options for the HDD and cpck on “Create”.

HDD

Step 6 − Select a file extension for your virtual HDD (It is recommended to use a common file extension that most of the hypervisors use pke VHD) → cpck on “Next”.

VDI

Step 7 − Choose whether you want the Virtual HDD as dynamic or fixed. This is based on your needs → Cpck on “Next”.

Dynamic

Step 8 − Put a name for your virtual HDD file and select the disk size for your VM → Cpck on “Create”.

HDD File

All the above steps can be done in one shot by selecting the “Expert mode”.

Expert Mode

The virtual machine created will be as shown in the screenshot below.

Virtual Machine Created

Setting up Networking with VirtualBox

There are two types of networking modes in VirtualBox, which are −

    Nat Networks and

    Host-only Networks.

Both of these are explained in detail below.

Nat Networks

For setting up Nat Networks, we should follow the steps given below.

Step 1 − Go to Oracle VM VirtualBox Manager → Cpck on “Preferences…”

Preferences

Step 2 − Cpck on “Network” and then on the left panel cpck on the “NAT Networks” tab.

NAT Networks

Step 3 − Cpck on the “+” button, which is highpghted in the screenshot below.

Plus

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.

Network Name

Host-only Networks

For setting up Host-only Networks, we should follow the steps given below.

Step 1 − If you cpck 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. Cpck on the “+” sign.

VM Hosts

Step 2 − The host interface will continue to be created as shown in the screenshot below.

Host Interface

Step 3 − If you cpck on VirtualBox Host button, you can edit the settings.

Edit Settings

Step 4 − If you want your host machines to take “DHCP IP”, cpck on the “DHCP Server” tab and check the box “Enable Server” → Cpck “OK”.

DHCP

Step 5 − In the “Adapter” tab, put the IP of the hypervisor.

Adapter

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, Cpck on the VMs on the left side of the panel, then right cpck on the “Network” option and a table will be open.

NatNetwork

You can have up to four Ethernet adaptors per machine. The following image has four sections highpghted, which are explained below.

    Check the box “Enable Network Adapter” to enable the vNIC on the VM and attach it to one network.

    You can have many networks created, so we have to select one of them in the “Name” dropdown box.

    In the adapter type dropdown-box, we have to select a physical NIC that the hypervisor has.

    Promiscuous Mode: Here, we can select “Deny”, if we do not want the VMs to communicate with each other.

Once all the above parameters are completed. Cpck on “OK”.

Parameters

Allocating Processors & Memory to a VM

To allocate processors and memory to a virtual machine using VirtualBox, we should follow the steps given below.

Step 1 − To allocate a processor and memory, you have to cpck on “Settings” after you have selected the VM.

Cpck Settings

Step 2 − Cpck on “System” on the left side tab, then cpck on the “Motherboard” tab. Move the arrow left or right to allocate the memory as shown in the screenshot below.

System

Step 3 − To allocate processors, cpck on the “Processor” tab. Move the arrow left or right to allocate the number of processors as shown in the screenshot below.

Processor Tab

Step 4 − After all those changes are done → cpck on “OK”.

Cpck Ok

Duppcating a VM Using VirtualBox

To duppcate a virtual machine using VirtualBox, we should follow the steps given below.

Step 1 − To duppcate a VM that we created before, right cpck on the VM and select “Clone”. A wizard will open.

Clone Wizard

Step 2 − Write the name of the cloning machine and cpck on “Next”.

Cloning Machine

Step 3 − Select one of the options and Cpck on “Clone”.

Cpck on Clone

Step 4 − The newly created VM will be as shown in the following screenshot.

Newly Created VM

Deleting a VM on VirtualBox

To delete a virtual machine on VirtualBox, we should follow the steps given below.

Step 1 − To start with, we have to right cpck on the VM that we want to delete and then cpck on “Remove”.

Remove

Step 2 − To delete a virtual machine completely, select “Delete all files”.

Delete Advertisements