VirtualBox offers its own Guest Additions for improved integration between guest and host, particularly mouse-capture and more video resolutions. The guest-additions are installed to the guest, not the host. It is an essential for best performance.
The current VirtualBox (220.127.116.11) includes a multi-platform cd-iso image for Guest Additions. For Windows guests you only need mount the iso to your virtual CD drive and the autorun.inf starts the installer for you. On Linux however…
My example was needed to get the best out of Lubuntu, but applies to any Linux VM. Start your ubuntu guest and login. In theory, choosing:
Devices > Install Guest Additions...
from the VirtualBox menu in your running Ubuntu guests should do the same. But it doesn’t always.
In the first instance, look for the bundled iso-image under:
If its missing, you can go to http://download.virtualbox.org/virtualbox/ and find the folder for your version number (x.x.x) of virtualbox and download the appropriate VBoxGuestAdditions_x.x.x.iso
You will need to deposit it in the /usr/share/virtualbox/ folder or map your iso image and path as storage in your guest settings. From the menu in your ubuntu guest window, select
devices > mount CD/DVD Rom
Now select option “CD/DVD Rom image” and choose the VBoxGuestAdditions iso file.
You may need to manually mount the iso image using:
sudo mount -t iso9660 /dev/scd0 /mnt/cdrom (your specific mount point)
If the Guest Additions install still doesn’t work, you’re probably missing the Dynamic Kernel Module Support Framework, to quote:
"DKMS is a framework designed to allow individual kernel modules to be upgraded without changing the whole kernel. It is also very easy to rebuild modules as you upgrade kernels."
If not already installed, install the package dkms.
You should have it in the repositories from Canonical or you can manually:
sudo apt-get install dkms
There is a number of dependent packages which should be identified to install with it (17 for my Lubuntu), for kernel headers and the like, so that VirtBox can dynamically build the required modules in the guest.
Reboot the lubuntu guest to load the new modules.
Try the Guest Additions install again. If nothing happens, you may need to manually kick it off.
In a terminal shell, navigate to your mounted iso image:
cd /mnt/cdrom0 (your specific mount point)
sudo sh ./VBoxLinuxAdditions-x86.run
Which should then run to completion. To activate the improved guest capabilities, restart your Ubuntu guest machine. RC
This how-to is indebted to the commenters of the article at Ubuntu-tutorials for outlining the variations on this process through 2007-2009: