How to install Virtualbox Guest Additions in Ubuntu

Over the past few weeks I’ve been writing a a guide to installing Ubuntu. The last post in my series wraps up the Virtualbox installation from last month, how to install guest additions. Installing guest additions really completes your virtual XP installation and gives you better display integration (higher screen resolution) and better integration with simple processes like copy and paste, and mouse actions between your two environments. It also allows a “seamless mode” which layers your XP interface over the top of Ubuntu and makes it even easier to switch between the two environments.

How to install guest additions

Once you have your guest Windows operating system installed and running in your Virtualbox console, click Devices>Install Guest Additions

You’ll get this message. Click yes to download the CD image from the internet.

The download takes only a few minutes (depending on your internet connection) and you should see a progress bar down in the bottom right hand corner of your virtualbox console.

Once the image has been downloaded, virtualbox will ask if you’d like to register the cd image on the guest machine’s virtual CD drive. Click mount.

The setup should automatically run. Follow the prompts, and setup will begin.

Agree to the licence agreement and continue.

Seems Microsoft hasn’t passed the Vbox additions graphics driver through it’s compatibility testing… Don’t worry it should work perfectly well. Click continue.

You’re all done. Click finish and restart your machine.

When you restart your virtual machine, go straight to the display properties and sort that screen resolution out!

Guest additions will give you some pretty cool new tricks. For one, you can now run your machine in fullscreen mode. Combined with compiz 3d, you’ll be able to switch between the interfaces very easily.

I have set up full screen mode by pressing my host button (F12) and “F”. You can choose your own host button and it just helps switch between Ubuntu and XP, unless you’re running in seamless mode. Seamless mode can be activated by pressing host>L

Have fun!

34 Responses to “How to install Virtualbox Guest Additions in Ubuntu”

Leave a comment
  1. stuart
    Posted September 13, 2008 at 9:31 pm | Permalink

    When I click install guest additions nothing happens. Also my mouse and keyboard are not working in the virtual machine. What am I doing wrong?

  2. Posted September 16, 2008 at 6:20 pm | Permalink

    Hi Stuart – do you have a USB keyboard / Mouse? That’ll be why (maybe). Take a look at this: http://seogadget.co.uk/enable-usb-support-virtualbox/ – hope that’s useful!

  3. Paul
    Posted October 29, 2008 at 11:12 am | Permalink

    Thanks for this guide. It helped me get through the guest additions piece of this. I run virtualbox (xp pro) inside a ubuntu 8.04 system. The machine is dual boot and I still have most of my files back on my old Windows partition. I can access these just fine in Ubuntu but I can’t mount or figure out how to access these files on my real C: drive. In Ubuntu the location would be: /media/disk

    Can I mount this as a drive somehow or at least as a shared folder in virtualbox?

    pw

  4. Posted October 30, 2008 at 8:34 pm | Permalink

    @Paul, Thanks for the comments, I’ll write a post on sharing drives in Virtualbox in the next day or so and ping you a mail (if you left me your address). Right now I’m installing and testing Intrepid Ibex!

  5. Posted November 4, 2008 at 9:42 am | Permalink

    Yes, i have the same Problem. In VirtualBox 2.0.4 isn’t any possibility to klick “Devices”. So I will install the GA’s manually.

    Heinz

  6. Keith Moseley
    Posted November 8, 2008 at 1:37 am | Permalink

    I’m new to Ubuntu Linux but have successfully used Virtualbox on Mac OS X Leopard. Installation of Windows XP inside VB (running in Ubuntu 8.10) was OK but I ran into trouble with the Guest Additions because the download kept timing out. I solved the problem by following the weblink and manually downloading the Guest Additions disk image. I then used ‘CD/DVD mount’ from Virtualbox’s Devices menu to mount the disk image. When I tried the guest additions installation this time it worked (well, actually it worked on the second attempt so was I just lucky?).

    I earlier extracted the files/folders from the Guest Additions disk image and tried to manually move them to the lib folder where Virtualbox was searching. I was completely fooled by the permissions for this folder that said I was not the owner even though I am the system administrator. Doubtless I’ll find out why as I explore Ubuntu!

  7. Posted November 8, 2008 at 3:52 pm | Permalink

    Hi Keith, sounds like you’re getting on very well! Good luck in your Ubuntu journey!

  8. Posted November 25, 2008 at 8:09 am | Permalink

    Hi, thanks for the tutorial.

    How can I mount the vdi using regular mount command?

  9. pluxon
    Posted November 26, 2008 at 5:13 pm | Permalink

    Hi there. I’m new to linux and this winxp virtual machine sounds cool. What I’d like to know is if the programs running in this virtual machine work as well as in a normal winxp installation. I know winehq is a good solution for running windows applications on linux but the performances aren’t very good and they don’t work as smooth as in windows.
    Thanks.

  10. Posted November 26, 2008 at 9:09 pm | Permalink

    @pluxon IMO, Wine is ok for lighter apps but at the time of writing this post, I needed a perfect Windows XP environment to run my favourite Windows tools. As far as I’m concerned, Vbox is excellent and i’m always amazed at how quickly it runs! If I were you, I’d test both options and make a decision on which is best for you…

  11. Rebecca
    Posted January 7, 2009 at 12:59 am | Permalink

    I’m kind of at a loss of what to do. I could not download the guest additions automatically so I clicked the link and downloaded the image file to my desktop. I moved the image file to .VirtualBox as it would have gone to if it had downloaded automatically. I mounted the image file instead of the cdrom. Windows starts up exactly the same as always. I click on devices > Install Guest Additions. Nothing happens. I really can’t think of what to do next.

  12. Rebecca
    Posted January 7, 2009 at 1:16 am | Permalink

    Solved….

    I read in the user manual http://download.virtualbox.org/virtualbox/2.0.2/UserManual.pdf that if the guest additions don’t begin to install after mounting, then you have to go to the guests CD drive and run them from there.

  13. Scott
    Posted January 11, 2009 at 8:17 pm | Permalink

    I’ve been using Ubuntu for about 6 months now, just recently updated to Ibex. I’ve got a dual boot AMD machine with XP pro and Ibex. I just installed the latest VBox (2.1 I think), and got XP Pro working just fine. I’m in the (long and tediuos) process of updating the virtual Windows. I’ve got guest additions working, it’s great. I had no problem with any of the installs so far. The guest additions was part to the package when I got the VBox software. I’m really happy with how things are working out.

  14. Scott
    Posted January 11, 2009 at 8:19 pm | Permalink

    OH yeah….with Ibex and the latest VBox, the tutorial above doesn’t match what I did for guest additions.

  15. Ap Robert
    Posted January 11, 2009 at 8:32 pm | Permalink

    thanks great advice spot on (XP on xVMVB on ubuntu 8.04)

  16. Posted January 12, 2009 at 12:24 am | Permalink

    @Scott – thanks for the heads up Scott! I’ll take a look at this when I get some time and update the “how to” ready for Ibex.

  17. accura
    Posted February 4, 2009 at 6:57 am | Permalink

    @Keith The download fails because the server cant connect to the Vbox running in 8.10 (Version im using.) You will have to click the blue link in the error message that appears and DL it from there. Good luck

  18. Posted February 22, 2009 at 11:51 pm | Permalink

    Hi there!
    Great News!
    After a great headache about installing Guest Additions for Windows on Linux Virtualbox,
    I figured it out.
    In some cases you will not be prompted with the installer of the Guest Additions.
    But…
    Good Luck, your suffering has gone!
    Do the very same process:

    1 –> Devices
    2 –> Mount CD/DVD ROM
    3 –> CD/DVD ROM
    4 –> Click VBoxGuestAdditions.iso
    5 –> Click Select
    *note: Perhaps an error is prompt, continue clicking ok

    At this point the problem is that nothing happens because the autorunner isn’t working.

    So, let’s do it by keyboard

    6 –> Press Windows + E to open the Explorer or Go to it by clicking Window key than navigate with help of arrows to My Computer.

    *This done, you will see a virtual driver called “Virtual Guest Additions”.

    So go ahead and with help of tab key focus on it and click Enter.

    Now using tab key, Accept the Terms bla bla bla and go on, reboot and after this you will see all the addition s available :D

    Hope You had help with it!

  19. snipercup
    Posted February 26, 2009 at 9:42 pm | Permalink

    Hi,

    i followed the tutorial.
    im running windows xp under virtualbox 2.1.4 on ubuntu.
    after the guest additions were installed succesfully, i still dont get the resolution right. it stays at 800X640 and with 8 bit colors.
    i tried reinstalling the additions but i get the same effect.

    • Posted August 27, 2009 at 8:21 am | Permalink

      Hi snipercup – you should be able to adjust the screen resolution normally via the Windows display properties. Does that work?

  20. Kalbasa
    Posted July 20, 2009 at 5:59 pm | Permalink

    Using Ubuntu 9.04 host and Windows XP sp 2 guest on VBox 3.0.2
    Installed guest additions 3.0.2 and nothing changed.
    I can see only the little box near the clock in XP.
    “Test Direct3D” button in DirectX 9c is stil inactive :(
    How can I activate Direct3D and OpenGL funcions on guest XP?

    • Posted September 7, 2009 at 1:19 pm | Permalink

      Hmm. I don't think Direct X works with the VBox guest additions

  21. Tiago
    Posted August 9, 2009 at 7:37 pm | Permalink

    Thank you so much, you are the hero for beginners in linux

  22. Posted September 7, 2009 at 11:49 am | Permalink

    Thx heaps for these great guides.

    http://seogadget.co.uk/how-to-install-virtualbox/
    http://seogadget.co.uk/how-to-install-virtualbox-...

    they helped me through the lot..

    just wondering, Is it possible(or worth it) to install the drivers under winxp…?
    i wanta install motherboard and graphics card
    oh and another thing if i mount a cd/dvd it shows up in win(virtual) but it doesnt auto play or even install?

    • Posted September 7, 2009 at 1:16 pm | Permalink

      Hi There – guest additions should alleviate the need for you to install the motherboard / video card drivers. Don't forget, you're working on a virtual machine inside Ubuntu. That means that the host OS has already taken care of the hardware drivers – where guest additions allows Windows XP to access those resources as if WinXP had its own hardware.

      As for the CD thing, I'm not sure what you're trying to do? More info please!

      Hope that's useful?

  23. bishal
    Posted October 6, 2009 at 11:37 am | Permalink

    how to make usb drive work in windows running on virtual box?

  24. quimkaos
    Posted November 12, 2009 at 8:19 pm | Permalink

    seems to me that win xp doesn’t access the video resources of the host machine. what it seems to do is, emulate an hardware device: Virtualbox Graphics Adapter. It’s a VGA that also is a VGA. lol…

    tho i activated support for Direct3d and hardware acceleration it doesn’t allow Directx applications to run correctly (games for instance). just hope that VBox can evolve in this area!

    • Posted November 12, 2009 at 8:53 pm | Permalink

      That’s exactly right Quimkaos – hardware emulation through and through. It’s not quite as powerful although I’m sure there are people out there who do a lot of VM gaming.

  25. quimkaos
    Posted November 12, 2009 at 9:25 pm | Permalink

    that’s what i wanted… doing some VM gaming. but the one i was going for crashes due to directx. Tho VM addictions makes my VM faster and smother!

  26. Giovanni
    Posted January 22, 2010 at 2:27 pm | Permalink

    Hi! I have a problem: when i install guest addition windows xp crash when the desktop appear….

    I tryed with 2 different version of windows xp, does anyone else have this problem?

    Thanks

  27. Posted June 6, 2010 at 9:18 pm | Permalink

    I had to install the Virtualbox Guest Additions on my OSX (host) ubuntu (guest) setup. The guest additions come with an auto-run app, which installs the necessary packages, but it doesn’t clearly state that you have to restart the guest OS in order for them to take affect. Keep restarting after each step – you’ll get there in the end :)

  28. Richard Stuart
    Posted June 7, 2010 at 10:33 am | Permalink

    I am new to VirtualBox – I comes with a “Guest Additionas.iso” and I have loaded this.
    Is your product different?? How is it different?
    My main concern is easy adjustable screen size/resolution.
    For example NEW VirtualPC in WIN7 Pro is really seamless – Make any size you like – all tracks// scales. NO side bars to see the “boarder icons” etc. Just can install linux in the new one – tried severl linux distro all the same, shuts down before completion.
    does you Guest Additions address this issue well – differently etc.. etc.

  29. Posted June 12, 2010 at 7:46 am | Permalink

    Thanks for this. Does anyone know what is the easiest way to mount the windows partition to /media/windows so that I can easily exchange files between windows and linux? I am running Virtual box on Windows and running Ubuntu inside Virtual Box. Thanks. – Arunabh Das