https://help.ubuntu.com/community/VirtualBox/GuestAdditions


VirtualBox/GuestAdditions


Setting up VirtualBox Guest Additions

Guest Additions provide additional capability to a guest virtual machine, including file sharing. Guest Additions means:

  • software installed on a guest virtual machine
  • software from a third party (Oracle), not open source and not installed in the usual fashion for the guest OS

Guest Additions are distributed on their own CD image (.iso file) named VBoxGuestAdditions.iso. How you get that file to the guest can depend on the OS of the guest - see below.

After installing Guest Additions, on some, older guests you might need to restart the guest.

For recent guest OSs

In the guest virtual machine, choose Devices -> Install Guest Additions from the menubar of VirtualBox.

VirtualBox will look for the needed file. Failing to find it, it may give you an opportunity to download the file from the internet.

If all that fails, follow one of the steps below.

Ubuntu or similar

Getting VBoxGuestAdditions.iso

You have several choices. On the host (not the guest):

Some, recent versions of VirtualBox will now be able to find the file on the host when you choose Device -> Install Guest Additions on theVirtualBox running a guest. Continue with instructions for setting up file sharing.

For other, older versions of guest OS's and VirtualBox, the .iso file is on the host, but the guest needs to see it (and file sharing is not yet enabled.) Follow the next two steps for mounting the .iso file and executing the scripts in the .iso file. 

Making VBoxGuestAdditions.iso visible to the guest

Just as you mounted a .iso CD image for your guest OS when installing it on the guest, now mount VBoxGuestAdditions.iso as a CD on the guest. For example, in the VirtualBox window, choose the Storage section under Details, and so forth.

Note that recent versions of VirtualBox have changed the method of mounting .iso files.

Now start the guest.

Executing install script for Guest Additions on older Linux guests

Make sure you have the image, for example VBoxGuestAdditions.iso or VBOXADDITIONS, mounted as CDROM.

If you are running a Linux guest, open a terminal and type:

cd /cdrom

in for instance Ubuntu Lucid, the CD image should mount at /media/<cd name> so that would be

cd /media/<cd name>

then run:

sudo sh ./VBoxLinuxAdditions.run

Alternatively simply run

./autorun.sh

If you would like to uninstall the Guest Additions, run:

sudo sh ./VBoxLinuxAdditions.run uninstall

References