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.
- 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.
- From the next window we can assign a memory size for the VM. Then click next.
- This window will allow us to create a disk space. Then click Create.
- I’m installing OS from an .iso, so I’m choosing the disk image option.
- Keep the Dynamically Allocated on the next window and hit next.
- Here you can create a virtual hard disk for your VM. Select a size and hit Create.
- After clicking Create, following UI will appear. On the left hand side we can see our newly created VM.
- Right click on app1 and select settings.
- Go to the storage tab.
- Select the ‘Empty‘, go to the ‘Attributes‘. From Optical Drive choose your .iso file location.
- Then go to network tab.
- 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.
- Finally click OK to finish the settings window.
- Now we can run the VM using the ‘Start‘ icon.
- From here on we can install the OS. I’m installing redhat 6.
- After a successful OS installation we can login to the VM by giving user name and password.
- 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.
- Then do the same changes to /etc/sysconfig/network-scripts/ifcfg-eth1 as well.
- Next restart the network service.
- Using ifconfig command we can find the IP address of the VM.
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!