Popular Posts

Wednesday 16 March 2016

Oracle Virtual Box installation and configuration

Oracle virtual box overview:



Virtual Box is a cross-platform virtualization application. It extends the capabilities of your existing computer
so that it can run multiple operating systems (inside multiple virtual machines) at the  same time. So, for 
example, you can run Windows and Linux on your Mac, run Windows Server 2008 on your Linux server, run 
Linux on your Windows PC, and so on.


Download oracle virtual box from https://www.virtualbox.org/. And download virtual box extension pack also.
  • Oracle_VM_VirtualBox_Extension_Pack-4.2.16.vbox-extpack
  • VirtualBox-4.2.16-86992-Win.exe
Once you done downloading, start installing oracle virtual box.
Please don’t forgot to enable Intel’s VT-x or AMD's AMD-V option in your laptop/Desktop.


Step1: Install virtual box.



Choose Next.
Choose Next.
Choose Next.
Click Yes.
Click install


Click install to create network interface which will be used by Virtual box.


Click Finish. Now we successfully installed oracle virtual box. After installation start Virtual box.




Step2:  Configuring Virtual box.



We need to add extension pack for the virtual box. Extension pack add new capabilities to virtual box like USB
controller and Virtual Box Remote Desktop Protocol


Open Oracle virtual box.
Go to File → Preferences → Extensions
Click add package button to add extensions.
Choose the extension file you downloaded from virtual box site.




Click ‘Install’.


Click ‘I Agree’






Click ‘OK’.
Go to CMD.
Type ipconfig and enter.




You will find the above entry in command line.
It indicates that virtual box network adapter is installed and enabled.


Step3: Adding Network adapter



Please follow below instructions, if you want one more network adapter needs to be installed.
Go to File→Preferences → Network and click button.
It will create one more adapter.






Select newly created network adapter and click  to change IP settings.
Add Below specified entries




Click ‘OK’. Click again OK to save the settings.
Confirm the settings are applied or not via command line.




Now we successfully configured the another network adapter.
We will see how to ‘Create Virtual machine in Virtual box’ on next post.














Creating Virtual machine in Virtual box

We can install Windows or Linux based OS in virtual box.

Let us see how to install Fedora Linux 20 in virtual box. Please download Fedora 20 ISO file from Fedora site https://getfedora.org/.


Open Virtual box.


Step2: Click New button.




Type Name for virtual machine, OS type, Version and click next.




Choose RAM size for your virtual machine. Don’t allocate more than 60% of Ram to your virtual machine.
It will slow down your host machine.




Choose ‘Create a virtual hard drive now’
And click ‘Create’.




Choose hard drive file type.
Choose VDI or VMDK, this formats are supported by other virtualization software.
Click Next.




Choose ‘Dynamically allocated’, this one will allocate memory when virtual machine is utilizing the space.
Fixed size will allocate all memory at the time of virtual machine creation.
Click Next.




Choose Disk location and Disk size of virtual machine.
Click create.




Click Settings → Network. We are going to set network settings for the virtual machine.
So that virtual machine can access internet and we can connect to the virtual machine using SSH utility.


Click ‘Port Forwarding’.


Click Add new rule button   .
Enter 22 in host and guest port. And click ‘OK’.


Now we will attach Fedora CD drive to the virtual machine.
Click Storage button in Settings window.




Click   button to add CD.


Click ‘Choose Disk’ and select your Fedora ISO File.


Click Ok Now. Click Start Button to start the virtual machine.


Click Install to Hard Drive.




Choose the language.




Click Begin Installation








Now Fedora was installed in virtual machine.
Remove the ISO file from virtual machine.




Now start the virtual machine.
Let’s do some post installation checks.
Check the IP address of the virtual machine.




Try to connect internet from your virtual machine.




Try to connect your virtual machine from Host using SSH.


From virtual machine:



Check SSHD status. If it is not up, bring it up.




From Host:



Download any SSH client for windows. For example putty.
You can connect to your virtual machine using your virtual box network adapter. In our case we have two adapter (192.168.56.1 and 192.168.57.1)
You can use both adapter to access the machine.
Remember we added port forwarding rule, that one should be mandatory.




Now we finished Fedora 20 installation and we are able to connect virtual machine from host.
We will see more about virtual box networking in my next post ‘Virtual Networking’.