Tuesday, April 7, 2015

How to install VitrualBox Guest Addition (VBoxGuestAdditions.iso) on Linux (Ubuntu)?

Honestly, I have to say that I never ever spent this long trying to install a simple ISO file before. I went through so many self-help forums and websites still couldn't get the Guest Addition installed, but there is obviously a simple solution, which I overlooked. The reason I wanted to install guest addition to my VirtualBox was because my virtual machine wouldn't go fullscreen but acted like it was only 1078x768 or something.

Here are the steps in installing Virtual guest addition (VBoxGuestAdditions.iso) on Linux (Ubuntu). I am using VirtualBox 4.3.10 for Linux.

  1. Before you begin, you must have already created a virtual machine using an operating system of your choice as shown below. I installed Linux Elementary OS.
    Snapshot of Virtual Machine
    Snapshot of Virtual Machine
  2. Start your virtual machine(VM) by clicking on the start button. Once it is up and running click on the Devices pull down menu on your VM. In the bottom of that pull down menu, you will see an option "Insert Guest Additions CD Image..." Click on it.                                                                 
  3. At this point, VM will either tell you that you don't have Guest Additions Image and if you want to download it now. Just go ahead and click on the download button, but if you still have problem, then you need to download Guest Additions ISO image yourself. Then, follow this step. If everything went well you probably won't see anything or even a confirmation saying that Guest Additions is installed. What that means is that it didn't install guest addition yet but you have only mounted the ISO file. Now, if you were like me who ran into "Can't mount Guest Additions Image," then you probably already have Guest Addition Image opened or linked to your VM. Then, you should move on to the next step, but make sure VBoxGuestAdditions.iso is linked to your VM by going to VM->Settings->Storage->Store Tree Listbox. Another way to verify that you have successfully mounted your Guest Additions ISO file to your virtual machine is by opening the VM folder and file explorer like dolphin. Once it is opened, you should see VBoxGuestAdditions.iso listed on the left hand side. Don't close the dolphin file and folder explorer yet. Leave it open for you will be using it in the next step.
  4. Now, click on the VBoxGuestAdditions.iso mounted image listed in the left-hand side in the Dolphin files and folders explorer in your VM. When you do that, on the right-hand side Dolphin will display all the files and folders within VBoxGuestAdditions.iso. You will see bunch of .exe files and linux related files. If you are like me running Linux on your VM, then you should look for VBoxLinuxAdditions.run in the list.
  5. Now, VBoxLinuxAdditions.run is the file you need to run to install Guest Additions ISO image for your VM. To run the file, first you need to find its absolute path to the file. So, right click on the file and click on properties. Just copy the direct path shown on that popup window. Then, open a terminal window. There type in the following after the prompt sudo ./your-direct-path-to-the-file/VBoxLinuxAdditions.run. Then, hit enter. At this point, it will ask you to enter the password. After that, it will run through the installation.
  6. After installing VBoxGuestAdditions.iso, you will need to shutdown and restart your VM for Guest Additions to be applied to your VM. That's all. Now you should see your VM fullscreen.