Monday, October 19, 2009

Installing VirtualBox Guest Additions on Ubuntu 9.04/9.10 Guest, Vista Host

Here are some notes on how I installed the VirtualBox 3.0.8 Guest Additions on a 32-bit Unbuntu Server (9.04 Jaunty Jackalope) guest running on a 32-bit Windows Vista host.

The Ubuntu server is a very bare-bones server install running only sshd, so as you'll see below, we have to install gcc and friends.

This info is adapted from a post in the VirtualBox forums.

  1. Mount VirtualBoxGuestAdditons.iso via Devices > Mount CD/DVD ROM > CD/DVD ROM Image...
  2. The .iso file should be located on the Windows host here: C:\PROGRA~1\Sun\VIRTUA~1\VBoxGuestAdditions.iso
  3. Install the Guest Additions on the Ubuntu guest (adapted from http://forums.virtualbox.org/viewtopic.php?p=29316):
    mount /cdrom; cd /cdrom
    sudo apt-get update
    sudo apt-get install build-essential linux-headers-`uname -r`
    sudo ./VBoxLinuxAdditions-x86.run
    cd ~; umount /cdrom
    
  4. Optional cleanup (I didn't bother since I'm using this box as a development server, and will need gcc et al.)
    sudo apt-get remove build-essential linux-headers-`uname -r`
    sudo apt-get autoremove
    sudo apt-get autoclean
    
  5. reboot the guest (possibly not necessary, but I did it)

The guest additions are now installed and running. Next step would be to actually do something with them. In my case, I wanted to mount the c:\ drive of the host (Vista) machine.

To share the entire Vista c:\ in the directory /mnt/c on the Ubuntu guest:
  1. On the host window, go to Devices > Shared folders...
  2. Add new shared folder: Folder Path = c:\, Folder Name = c, not Read-only, check Make Permanent
  3. Add the following line to /etc/fstab:
    c    /mnt/c    vboxsf    rw,gid=1000,uid=1000,auto    0    0
    
  4. Note: I've mounted this as my main user. If you've only created one user on your Ubuntu server, this should work. If in doubt, run id as the user you want to mount the Windows share as.
  5. Create the mountpoint: sudo mkdir /mnt/c
  6. Mount the share (this will happen automatically in the future): sudo mount /mnt/c

Update 28-Dec-2009: I just used this same procedure on Karmic 9.10 and it also seems to work fine there.

No comments:

Post a Comment