The title says it all. Right? Today, we will come to know how to install & configure VirtualBox so that we can install a guest operating system on it. Our guest operating system will be Ubuntu 14.04.3 Linux distribution. For the host operating system, I am using an Apple MacBook Pro ( Model Early 2011) with Yosemite Mac OS X. You can use any hardware that has a CPU with the capacity of virtualization to install VirtualBox. Without this capability, you will not be able to install VirtualBox and even you will not be able to perform any virtualization .
Why we are choosing VirtualBox?
The answer is very simple as it is the most easiest way to make a system virtualize. It has a very simple user interface so that anyone can easily use it. Also, VirtualBox is a general-purpose full virtualizer for x86 hardware, targeted at server, desktop and embedded use. The core package is, since version 4 in December 2010, free software under GNU General Public License version 2 (GPLv2) means it is free to use. For some guest operating systems, a “Guest Additions” package of device drivers and system applications is available which typically improves performance, especially of graphics. Also it has an extension pack for better peripheral device support.
Why we are choosing Ubuntu 14.04.3 LTS?
We choose to install Ubuntu 14.04.3 LTS Linux as this is the latest Long Term Supported Linux distribution till August, 2016. Ubuntu is very easy to work with and has all the beauty that every Linux distribution has.
# STEP 1
Download all the necessary files to install VirtualBox and Download Ubuntu 14.04.3 LTS iso file as well .
First, download VirtualBox according to your host operating system. I am using Yosemite Mac OS X (10.10.5). So, I will download this file. This download link may not be available upon future new release of VirtualBox. Please visit this link for all available download for different operating systems.
Next, download VirtualBox 5.0.4 Oracle VM VirtualBox Extension Pack from this link. This provides supports for USB 2.0 devices, VirtualBox RDP and PXE boot for Intel cards. The Extension Pack binaries are released under the VirtualBox Personal Use and Evaluation License (PUEL).
Lastly, download Guest Edition iso file. Make sure it matches with your version of Oracle VirtualBox. I am downloading from here. Please visit this link for further more information regarding Guest Edition iso file.
# STEP 2
Now, let’s install VirtualBox on your host operating system. As, I am using Yosemite Mac OS X (10.10.5), I am providing screenshots of the same. It’s pretty easy and straight forward process of installing Virtualbox. We will begin by double clicking the VirtualBox-5.0.4-102546-OSX.dmg file which will open a window like below.
Now start installing by double clicking VirtualBox.pkg file which will show something like below image.
Click continue for continue and then click install to install it. Wait till the installation process gets finished. It will show something like below image.
Click close to end the installation process.
# STEP 3
Let’s install the Oracle VM VirtualBox Extension Pack now. To do so, open your VirtualBox application that you have just installed on the previous step.
From the menu, goto VirtualBox and click preferences. This will open a new window like below.
Now click on the Extensions link and click the right down arrow to browse to the location where you had downloaded the Oracle VM VirtualBox Extension Pack earlier.
Once you have select it, click install and then click I Agree. Then it will install the Oracle VM VirtualBox Extension Pack for you. After installing, it will be like following showing the extension pack installed for your VirtualBox.
Note: If you are running behind a proxy server / connection then you may need to insert the hostname / IP address of your proxy server and you can get it by asking to your System Administrator or ISP.
# STEP 4
Let’s create the virtual machine instances for Ubuntu 14.04.3 LTS Linux distribution.
Click new to add a new virtual machine instances as a guest. Type the name of the virtual machine instance and click continue. I typed “Ubuntu 14.04.3 LTS VM” for the virtual machine instance.
Now, put the memory size (RAM) for your new virtual machine. It’s good to allocate a fair amount of actual physical memory (RAM) available to you. Here, I am putting 4096 or 4GB of RAM from my actual 8 GB of memory (RAM). So, I am allocating 50% of my actual memory. Click continue.
Select “Create a virtual hard disk now” for the hard disk section and click Create button.
You can select VDI (VirtualBox Disk Image) or VMDK (Virtual Machine Disk). Here, I am selecting VDI type for Hard disk and click Continue button.
Now select “Dynamically allocated” for the Storage on physical hard disk window and click Continue button.
Now, set the name of the VDI file. Though it it will automatically appear and will have the same name like your virtual machine name. Select your desired hard disk capacity size. I am selecting 40GB. You can select or put the capacity value according to your needs.
We are done with our initial setup for our Ubuntu 14.04.3 LTS virtual machine instance.
# STEP 5
Now let’s configure it a more. To do so, click Settings and select Storage. Click the CDROM icon marked by red rectangle and select the Ubuntu 14.04.3 LTS iso file by selecting “Choose Virtual Optical Disc File from the right hand side”. As this is a Bootable iso image file it will boot our virtual machine with Ubuntu 14.04.3 LTS Linux.
Now select Network and change the “Attached to” to “Bridge Adapter” from NAT. This will give you an IP address of the same subnet mask via DHCP server. So that both host & guest operating system or machine can communicate each other. As I am connecting to internet via my WiFi LAN / NIC card, name is selected to en1: Wi-Fi (Airport). Please change it to En0: Ethernet if you are connected via physical wired LAN / NIC card.
We are done with configuring VirtualBox. Lets start the virtual machine by clicking Start from the VirtualBox main window.
# STEP 6
This will boot into our guest operating system Ubuntu 14.04.3 LTS with our newly created virtual machine. You may encounter some error message while Ubuntu boots but don’t get panicked and stay with Ubuntu. It will not create any problem. You will see something like this below image and you can begin start installing Ubuntu 14.04.3 LTS on your virtual machine. I am skipping the installation part of Ubuntu 14.04.3 LTS as you are already know how to install Ubuntu 14.04.3 LTS. Its not different though you are installing it on a virtual machine.
# STEP 7
I am considering that you have successfully installed Ubuntu 14.04.3 LTS Linux on your virtual box. Now, let’s install Guest Additions CD image. To do so, click Devices and select Insert GuestAdditions CD image form the VirtualBox application menu. Then it will ask for the permission to run a script. Click Run. Then you will see that a terminal is automatically open and it is installing some kernel components. Once it finished , it will tell you to press return to exit from the installer.
We are done.
# STEP 8
Sharing files between two hosts. Goto VirtualBox menu and click Devices and then click Shared Folders. Click the + plus sign on the right hand side and select your desired folder to share with the guest. I am selecting a folder named TRYSHARE.
Now let’s mount this shared folder from Ubuntu. Open a terminal and issue the following command.
sudo mount -t vboxsf TRYSHARE /Myshare
Where t stands for filesystem and TRYSHARE is the folder shared from the host machine which is the Mac OS X and Myshare is the folder on the guest Linux machine where it will be mounted. By this way, both the machine can shared files & folders.
I hope you enjoyed it.