Jan 4, 2009 - Virtualization    Comments Off on Installing Linux Guest Additions in VirtualBox

Installing Linux Guest Additions in VirtualBox

From http://ubuntu-tutorials.com/2007/10/13/installing-guest-additions-for-ubuntu-guests-in-virtualbox/

VirtualBox has made it pretty easy to install the Guest Additions for improved integration between guest and host. Some of these benefits are mouse-capture improvements and improved video resolution. The mouse capture improvements now allow you to control your virtual machine when the mouse is over the window, and seamlessly return to your host when it is not. Improved video resolution should allow you to customize a better resolution for your guests.

What we need to do to install the Guest Additions is select the option from the VirtualBox menu. You’ll want to do this after your guest is running (the guest-additions are installed to the guest, not the host).

Select Devices > Install Guest Additions…

This sometimes takes a minute so don’t worry if you don’t see anything right away. This should then prompt you and say something along the lines of “The Guest Additions image is not found on your host. Would you like to download this image now?

We’ll select YES and let it download the image. The image is downloaded to the host machine and then mounted within the guest. This way it can be shared with future guests without needing to download multiple times. It should also prompt you whether or not you’d like to mount the image. Again, select YES.

At this point you should see a disk image mounted on your desktop. What we’ll do here is run a script that will generate the proper modules to allow for guest additions. In my preferred method we’ll do this:

Open a terminal by pressing ALT-F2 and enter gnome-terminal on gnome or konsole on KDE:

cd /media/cdrom
sudo bash ./VBoxLinux*

This will grind away at generating the proper modules and then prompt you to restart your guest machine.

Once this has finished and you’ve rebooted your guest operating system, you should have the guest improvements ready to go. No additional configuration for the mouse integration should be needed, but you may have to manually update to a better resolution as wanted.