Wednesday 11 March 2015

Install virtual box/machine in host and guest operating system(Nested virtual machines)

Today I am going to describe how to install virtual box and creating a virtual machine in host operating system (windows ) as well as guest operating system(operating system installed on virtual machine already).

For nested first we have to install a guest operating system using virtual box. I am demonstrating here for windows as host operating system and Linux mint ( http://www.linuxmint.com/ ) as guest operating system but you can use any os image for guest operating system. Make sure that os image is not corrupted and you have the latest version of virtual box.

1.Download virtual box from the official oracle link. (Make sure you download the latest version)

2. After Downloading is completed go to the installed .exe file (for windows only) and run it. It will install virtual box on windows.(it will take few minutes)

3. After installing virtual box start virtual box click on new to add new guest operating system

Adding New Guest Operating System





Select the type of operating system u want to install as guest. I am installing mint whose base is inux 
so I am selecting Linux and Ubuntu(32 bit). Make sure you are selecting the correct version 32 bit or 64 bit. I am installing a 32 bit version of Linuxmint. Click on Next.

4. Select the RAM you want to give to guest operating system. There will be a recommended memory size on the basis of your total RAM. Give a little more than the recommended memory. Because we are going to install another os in that guest os.

5. Select the radio button which has the option 
Create a virtual hard drive now.

Click on create then again a pop up window will come.

6. Hard drive file type
Select the option  VDI( Virtualbox Disk Image)      then click on Next.

7. Next pop up comes for Storage on physical hard drive . 
Select the option Dynamically allocated

8. Select the file location where u want to install files in hard drive. And also give the size of the virtual hard drive around 20-30 gb (Because we are going to install another os in that host os).

9. Click on create and an virtual machine will be created in the left dialogue box of virtual box.

10. Right click on the newly created virtual machine and go to settings

Selecting the iso image from the hard disk or cd/Dvd.
in settings -> storage -> controller:IDE -> Empty(click) -> Attributes (select IDE Secondary Master) and click on DVD Icon to select the iso file. Choose the iso image file from where u have put that file.( If u don't have an iso for guest operating system. Download Linux mint from the below link.)

NOTE: Select the correct version 32 bit or 64 bit whatever you want to install.

After selecting iso image file click on ok.

11. Again go to that newly created virtual machine. Right click on it and click on start.
     It will start installing mint.
     It will take time ( around 10 - 15 minutes).

12. After that it will ask to set username for your os and password. Set that.
    And if you want , you can restart that guest operating system.

Installing virtual box in the guest LINUX MINT operating system.

1. Go to terminal. (ctrl+alt+t)

2. Make sure internet is working in guest operating system by running sudo apt-get update.

3. Then run following commands
for adding sources from where u can download run this command
sudo sh -c 'echo "deb http://download.virtualbox.org/virtualbox/debian trusty contrib" >> /etc/apt/sources.list'

4. run the command
wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc -O- | sudo apt-key add -

5. then again update
sudo apt-get update

6. install virtual box (whatever latest version is)
sudo apt-get install virtualbox-x.y

where x.y is version of latest virtual box.

7. download the dkms for virtual box
sudo apt-get install virtualbox-dkms


It will install latest virtual box in the mint.

For starting virtual box : Type virtualbox in the terminal. It will start the virtual box.

And for another guest on that guest operating system use this virtual box as the same process as above. First Download an iso in the guest operating system and repeat the above process.


For further detail you can visit this link.


I hope it helps. Feel free to comment. If you have a problem post. I will try to find a solution. Till then enjoy.






No comments:

Post a Comment

Related Posts

Related Posts Plugin for WordPress, Blogger...