Virtual Box

In computing, a virtual machine (VM) is an emulation of a particular computer system. Virtual machines operate based on the computer architecture and functions of a real or hypothetical computer, and their implementations may involve specialized hardware, software, or a combination of both. From this post I’m going to show you how to install Oracle Virtual Box and how to create Virtual Machines using it on Ubuntu.

  • You can install Virtual Box from following command.

sudo sh -c “echo ‘deb http://download.virtualbox.org/virtualbox/debian
‘$(lsb_release -cs)’ contrib non-free’ > /etc/apt/sources.list.d/
virtualbox.list” && wget -q http://download.virtualbox.org/virtualbox/
debian/oracle_vbox.asc -O- | sudo apt-key add – && sudo apt-get update &&
sudo apt-get install virtualbox-5.0

  • Then search for ‘Virtual Box‘. Following UI will appear.

1.png

  • Click the ‘New‘ icon to create a new VM. Give a Name, OS type and a version to install on your VM. Then click next.

3.png

  • From the next window we can assign a memory size for the VM. Then click next.

4.png

  • This window will allow us to create a disk space. Then click Create.

5

  • I’m installing OS from an .iso, so I’m choosing the disk image option.

6.png

  • Keep the Dynamically Allocated on the next window and hit next.

7

  • Here you can create a virtual hard disk for your VM. Select a size and hit Create.

8.png

  • After clicking Create, following UI will appear. On the left hand side we can see our newly created VM.

9.png

  • Right click on app1 and select settings.

11.png

  • Go to the storage tab.

12.png

  • Select the ‘Empty‘,  go to the ‘Attributes‘. From Optical Drive choose your .iso file location.

13

14

15

  • Then go to network tab.

16.png

  • From here we can add network interfaces. Adapter 1 is already activated. We can assign more Adapters as well. Go to the Adapter2. Tick enable, select Host-only from drop down and select a name from the Name drop down.

18.png

  • Finally click OK to finish the settings window.
  • Now we can run the VM using the ‘Start‘ icon.

20.png

  • From here on we can install the OS. I’m installing redhat 6.

21.png

22.png

  • After a successful OS installation we can login to the VM by giving user name and password.

30.png

  • Though we have finish installing the OS still we have to do some configurations.
  • Go to /etc/sysconfig/network-scripts/ifcfg-eth0 and do the following changes.

1

  • Then do the same changes to /etc/sysconfig/network-scripts/ifcfg-eth1 as well.
  • Next restart the network service.

2

  • Using ifconfig command we can find the IP address of the VM.

3

Hope now you have a clear idea on how to install Virtual Box on Ubuntu and how to create a VM. See you soon with another important topic. Thank You!

Advertisements

4 thoughts on “Virtual Box

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s