Installing VirtualBox Guest Additions on Ubuntu Server 10.04


Because Linux servers do not normally run with a Window Manager like KDE or GNOME, the only benefit of installing guest additions on a VirtualBox VM is so that you can share drives/ folders with the host.

A common misconception is that you can resize the window and being able to copy and paste between host and guest OS. However, you can’t do any of these as you are not running a window manager!

To install Guest Additions, do the following:

Sudo apt-get install dkms

sudo apt-get install build-essential

Reboot the server by entering the command

sudo reboot

Login in to the server.

Go to the Virtualbox Devices entry on the menu bar of the guest OS and select Install Guest Additions… , this will load the Guest Additions ISO CD image.

Change directory to media

cd /media

Create a directory called cdrom, this will become our mount point

sudo mkdir cdrom

Mount the Guest Additions ISO to the mount point

sudo mount /dev/cdrom /media/cdrom

Now change to the cdrom directory

cd /media/cdrom

Display the directory contents i.e. the ISO image

ls

Depending on whether you are running a 32bit or 64bit OS, run the relevant installer. In this case 32bit so enter

sudo ./VBoxLinuxAdditions-x86.run

Note:

You will get an error saying “Could not find X.org or Xfree.86 on the guest system”. This is because we are running the server edition and have not got an window manager e.g. KDE or GNOME installed!

=-=-=-=-=
Powered by Blogilo

About these ads

24 thoughts on “Installing VirtualBox Guest Additions on Ubuntu Server 10.04

  1. Enjoyable blog you have here. One of those well mannered and behaved which serve proper, well formatted information in a benevolent manner.

    I also found http://www.tolaris.com/ to belong to the same cast. Good information.

    Keep up the good job and greetings from Finland!.

    t. jussi

  2. Hi,

    Thanks for the tip! I’d just add this one though:

    sudo apt-get install linux-headers-`uname -r`

    Looks like it needs the headers to build the GA…

    HTH
    Ninnell

  3. Just for the record, I just installed the guest additions in the Ubuntu server 11.04 x86 and there is not VBoxLinuxAdditions-x86.run, just VBoxLinuxAdditions.run. Anyway it seems to be the x86 version.

    And also you have to install the kernel headers as Ninnell pointed out

  4. When I do “sudo mount /dev/cdrom /media/cdrom” I get the following error: “mount: /dev/sr0: unknown device”. Has anyone encountered this before?

    1. I got same error but if you run “sudo mount /dev/cdrom /media/cdrom” twice and then it was mounted for me and it all worked

  5. I know this is kind of late, but I got the same problem as Eric: “When I do “sudo mount /dev/cdrom /media/cdrom” I get the following error: “mount: /dev/sr0: unknown device”.”

    Running the command twice did not help. Can anyone help?

  6. Lukas H. :
    I know this is kind of late, but I got the same problem as Eric: “When I do “sudo mount /dev/cdrom /media/cdrom” I get the following error: “mount: /dev/sr0: unknown device”.”
    Running the command twice did not help. Can anyone help?

    Got a mistake in it: my error actually is mount: “special device /dev/cdrom does not exist”

  7. yes, you should update the title of this blog post, as this worked perfectly on Ubuntu 12.04 server x64!! (and maybe enumerate the steps)

    just a note: when selecting the Install Guest Additions option, I saw an alert asking if I wanted to force the unmounting. I may be the original ubuntu_server.iso but is worth mentioning this.

    Great tutorial!!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s