VirtualBox: Install Guest Additions

VirtualBox: Install Guest Additions

When setting up a VM in VirtualBox one the first things you should do is install the guest additions. This post will show you exactly how to do that using an Xubuntu VM.

Guest Additions?

So what are these Guest Additions? It’s a set of extensions that make your VM perform better as well as offer additional functionality. The details of everything that is included with these are listed on the VirtualBox manual here: https://www.virtualbox.org/manual/ch04.html

Basically it allows you to share a clipboard for copy/pasting between host and guest(or guest to guest), share folders, sync the time, better video support etc. It makes the experience of any VM much more enjoyable even if you don’t use all of the features that are enabled.

How to Install

Installation is pretty straight forward and only takes a few minutes. This example will be using Xubuntu 16.04. For Windows it’s even simpler as you just need to insert the CD as shown and then use it as you are most likely already familiar. (It should autoplay and run with no user action required). For Linux though there is some manual effort. So let’s get started.

  1. Start up the VM and log in to the desktop

    The desktop
    The desktop
  2. Insert the Guest Additions CD by clicking Devices in the VirtualBox container window and then select ‘Insert Guest Additions CD Image’.

    Guest Additions is under the VirtualBox Device menu
    Guest Additions is under the VirtualBox Device menu
  3. Now the CD will show on the desktop but not be mounted.
    Image of desktop with unmounted ISO icon.
    After inserting the CD will show on the desktop. Depending on your specific configuration it may or may not automount.

    You can then double click to mount it.

    Guest Additions CD mounted and contents shown in File Manager
    Guest Additions CD mounted and contents shown in File Manager
  4. Now open a terminal and navigate to the folder path shown in the open, mounted guest additions CD.

    Image showing right click 'Open Terminal Here' option.
    Your configuration may allow you to right click and ‘Open Terminal Here’. If it’s not available just note the path shown in File Manager. /media/trevor/…
  5. Once the terminal is in the same folder run the following command:
    • ./autorun.sh
      This command will run the autorun.sh shell script that will prompt you through installing the Guest Additions. It will ask for your password/root to run though as it will need to make system modifications.

      The ./ allows it to have execute permissions and we are executing the shell script (they end in .sh). Autorun is the script that should run to kick off the entire installation process.

      Showing the autorun.sh script running from the addon iso.
      Running the autorun.sh script

      After a few moments you should see that it has installed and you can press Return (Enter) to exit.

      autorun.sh shown complete with terminal window notification.
      autorun.sh run complete
  6. All that is left now is to reboot so the changes are available to your session. You could just restart your window manager, however rebooting is easy too.

That’s it. Once you run the autorun.sh script you can now start to use some of the other features in VirtualBox. However for other features such as sharing a folder from the Host to the Guest, you will need some additional configuration(adding a user to the sfvbox group). This will be covered in detail in my next article. So stay tuned to add it to your bookmarks for future reference.

Comments are closed.