Oct
13
As promised in my previous post on installing VirtualBox Open Source Edititon today I’ll be going over installing the Guest Addition tools for better integration between host and guest. These steps have not been tested on other Linux distributions but I’m sure they’ll work about the same way. I tested these on Kubuntu 7.04 running atop Kubuntu 7.10 beta as the host.
Installing Linux Guest Additions in VirtualBox
VirtualBox has made it pretty easy to install the Guest Additions for improved integration between guest and host. Some of these benefits are mouse-capture improvements and improved video resolution. The mouse capture improvements now allow you to control your virtual machine when the mouse is over the window, and seamlessly return to your host when it is not. Improved video resolution should allow you to customize a better resolution for your guests.
What we need to do to install the Guest Additions is select the option from the VirtualBox menu. You’ll want to do this after your guest is running (the guest-additions are installed to the guest, not the host). Select:
Devices > Install Guest Additions...
This sometimes takes a minute so don’t worry if you don’t see anything right away. This should then prompt you and say something along the lines of:
The Guest Additions image is not found on your host. Would you like to download this image now?
We’ll select YES and let it download the image. The image is downloaded to the host machine and then mounted within the guest. This way it can be shared with future guests without needing to download multiple times. It should also prompt you whether or not you’d like to mount the image. Again, select YES.
At this point you should see a disk image mounted on your desktop. What we’ll do here is run a script that will generate the proper modules to allow for guest additions. In my preferred method we’ll do this:
- Open a terminal by pressing ALT-F2 and enter “gnome-terminal” on gnome or “konsole” on KDE.
- cd /media/cdrom
- sudo bash ./VBoxLinux*
This will grind away at generating the proper modules and then prompt you to restart your guest machine. Once this has finished and you’ve rebooted your guest operating system you should have the guest improvements ready to go. No additional configuration for the mouse integration should be needed, but you may have to manually update to a better resolution as wanted.
Hopefully I’ll have the tutorial for building proper network bridging soon as well. Until then, enjoy your virtualization with VirtualBox!
If this site has been useful, please consider participating in the Fundraiser.
Other Points of Interest
Comments
41 Responses to “Installing Guest Additions For Ubuntu Guests in VirtualBox”
Leave a Comment
thanks I wanted to fix my available screen resolutions - this works great!
(Ubuntu 7.1RC1 guest on WinXP)
Thanks for the tip. I couldn’t make sense of it at first because the guest additions ISO was mounted funny. Now everything is running so seamlessly I had to laugh.
nothing comes up when i click install guest edditions
Thanks, I didn’t know how to do it, but I succeeded thanks to this tutorial.
That crap ruined my box. How can I uninstall it? Thanks.
Thanks, instruction seem clear enough, but I get an error message:
bash: ./VboxLinux*: No such file or directory
I’ve got Dapper Drake installed in Virtualbox on Windows XP. The file I have on the guest desktop is called VBOXADDITIONS_1.5.2_25433 and has picture of a CD for an icon.
Any further tips???
I got here after following this http://ubuntuforums.org/showthread.php?t=433359&highlight=xp+virtualbox guide, I had disabled the windows desktop, so i didn’t see the iso file as promised. I had to navigate to the desktop folder with explorer to find it. Anyways, just thought I’d share
Great tip - thanks for the help. Worked perfectly. Just one slight typo:
sudo bash ./VBoxLinux*
Note the uppercase B.
CJ
Any update on your the tutorial for building proper network bridging?
@Nathaniel - thank you for pointing that out. I’ve updated the post.
@David - I’ve been tinkering with it off and on without real repeatable success yet. It is on my list however..
When I select Devices > Install Guest Additions nothing happens not even an error message. The image is nowhere on my host system, how can I get it?
Ditto the above commenter. Nothing happens when the you click “Install Guest Additions”. I’ve waiting 5 minutes already.
@ Peter —Try this: Go to Devices and Unmount CD/DVD Rom — Then try install guess addition, it should come up in the desktop.
My Problem is, i can’t change the refresh rate — when i set it to the highest, i can’t see the screen because it’s blurry — anyone?
Hey! Peter and Piet! JayWalker1 was right.
Just unmount as he says, and it’ll show up. Chances are that you already have the image, so it should begin immediately.
Thank you, Ubuntu Tutorials and Jaywalker.
Btw, Jaywalker, I’m not experiencing any blurriness.
I heard something about messing around with a system file on your host, but you gotta look around.
Regarding the command to type in the terminal, I had the same problem as Mikkel (posted Nov. 3, 2007). I overcame it by typing the commands given in the tutorial, but in step 3 I typed sudo sh ./VBoxLinuxAdditions.run The author was installing a Kubuntu guest on a Kubuntu host, but Mikkel and I are both installing Ubuntu on Windows xp and that seems to require the alternative command in step 3.
[...] we’ll need to install the VirtualBox Guest Additions. I haven’t yet blogged about how to do this on Windows guests, but you might refer to my [...]
I tried it on Ubuntu 7.10, and make my machine crash!
it doesn’t want to go to the main menu,
what’s wrong?
after installed guest addition, I restarted my Ubuntu guest system, and it happened; I can’t go to main menu!
This does not work with ubuntu 8.04. Any ideas how to get it working?
I was able to get the guest additions installed on ubuntu 8.04 following the instructions in the VirtualBox User Manual, but when I add the alternate video modes in I don’t get any more options in Screen Resolution. Thoughts?
Very helpful! Thank you so much!
Awesome, thanks.
I was pulling my hair out trying to get the guest window to a suitable size.
Keep the faith.
Very nice!
Thanx A lot.
thanks, nice tutorial for newbies:)
Have Hardy Heron running in Vbox on a Vaio Laptop. Have installed Guest Additions, but it will only manage 800×600 resolution. Native Resolution for the Vaio is 1280×800. Have tried uninstalling and reinstalling to no avail. Everything worked fine until I upgraded from Gutsy Gibbon.
I’m gonna start saying a big chocolate flavored cherry on top Thanks, since every bump in my road until now has been solved by u guys.
And now we get to my current issue…
My lovely virtualbox is working perfectly, I even managed to install the Guest Additions (after coming here and reading the “unmount yr cd/dvd rom”)
Still I’m having issues in getting the shared folders working.
My host is the cute Ubuntu Hardy Heron 8.04, totally up to date.
at the vbox i’m running a xp.
I did create the folder first at the host, but this damn windows never “sees” it.
i even tried trough the command prompt.
Anyhows, help!!!
Ps: pardon any english mistakes, not my maind language.
Thank you. Just what I needed.
Hi.
Not that I read all the article and the posts, so if you find this addition before my post, then please, forgive me.
When you try to mount the VBoxGuestAdditions.iso, whatch out that you don’t have already mount an actual cd currently in your drive.
If that is the case, then first umount your cd and then mount the iso file.
I am assuming by the instructions that I should have Ubuntu running in its Vbox window.
So far, regardless of whether Ubuntu is running or not, I have not been able to find anything on any Vbox menu which will allow me to enter the Install command cited above. I also can’t find anything that looks like a command line to enter the command.
What am I missing?
Thanks.
I found the menu and was able to fix the problem.
I’m working on some kernel builds and am having what seems like (to me) and odd problem. What tutorial or forum page is likely to be able to best answer a .config question?
Thanks.
Oh dear: “VirtualBox has made it pretty easy… ALT-F2 … gnome-terminal … … sudo bash … …”
Imagine the outcry from the linux fanboys if you had to do stuff like that to install Windows.
If you don’t see ANYTHING happen when you click | Install Guest Additions | look IN YOUR GUEST OS CD ROM DRIVE in MY COMPUTER. You may just have AUTORUN disabled.
Jack
My own guest additions routine for kubuntu HH:
Load the guest additions in the guest’s virtual drive via vbox’s devices menu.
Run konsole.
Install GKSU with: sudo apt-get gksu
Type: gksudo dolphin
From the file explorer whitch has root priviledges, go to root/media/cdrom(0,1?)
Doubleclick guestadditions (i386 or x64)
To this step, it should work like a charm and guest additions should render to perfection.
En français: Ma propre routine pour installer les guest additions de virtualbox dans kubuntu HH, suffit d’installer gksu avec konsole en tappant: sudo apt-get gksu
Ensuite il faut tapper gksudo dolphin
À partir de Dolphin, qui a tous les droits et privilèges de root, il faut aller dans le dossier root, ensuitemedia, cdrom(0,1?) et lancer guestadditionslinux(i386 ou x64)
À partir de là, tout devrait bien aller, l’intégration du pointeur, le redimentionnement à l’échelle, les dossiers de partage host-to-guest-to-host.
Voilà
oh.. in fact, i’m quite unsure about the ability to share folders from guest to host and invertly… The rest works fine but where is it that i find that famous vboxsharefolder//// withins all the system file three?
(i’ll take the answer from my e-mail (sympatico.ca) or i’ll come back and see okay?
)
thanks a ton..this works perfect.
Hi, I have troble in installing guest additions. I ‘ve got Ubuntu 8.04 running on virtual box. The host is Windows XP SP2.
I used to have them installed but after a new actualizaction I need to reinstall guest additions but I don’t know how to proced after mounting the CD with the guest additions.
I would preciate any help. Thanks
Maria Eugenia
Thanks a zillion! You saved my life twice! Once when I first installed it, and another time when the additions got disabled because of an update.
I am trying to install Ubuntu 8.10 using Virtualbox but unfornately it doesn’t work. This HOWTO must be VERY old because I get an error message, unsupported system detected and installing the guest software fails.
Slight change for step 3 on new version of VirtualBox for Windows Hosts. there are different versions of the additions for x86 and amd64 platforms. between setps 2 and 3 you can type ‘ls’ and see what the exact name of the additions are for your platform, then do “sudo bash ./VBoxAdditions-###.run”, replacing the ### with x86 or amd64.
even after insert .iso file (by the menu ‘Install Guest Additions’), I couldn’t access to the directory /mnt (actually I could, but it was just an empty directory.)
so, I really MOUNTed, using following command,
[….$ sudo mount /dev/sr0 /mnt
after that, I was able to see the file VBoxLinuxAdditions-x86.run in /mnt
It was the problem that I actually didn’t MOUNT the .iso image fully to the guest OS (Ubuntu 8.10 server)
I alone pulled out a handful of my hair cuz of this? T_T
I’ve the instructions above but got this message on the terminal -
“VirtualBox 2.0.6 Guest Additions installation
Detected unsupported x86 environment.”
Sun xVM VirtualBox
Host: WinXP Home SP3
Guest: Ubuntu 8.10
Any Suggestions?
Ooops…disregard my first post
just miss the comment of Wes…Job all done! Thanks!