Automatically mount a VirtualBox shared folder in an Ubuntu 9.10 guest

I’m using VirtualBox 3.1.4 on an OpenSolaris snv_134 x64 host, with an Ubuntu 9.10 x86 guest (with Guest Additions) installed. I used to manually mount a shared folder by executing a little shell script in the Ubuntu guest (launched from a Gnome Panel) containing the following command:

sudo mount -t vboxsf  VExchange /home/user/Desktop/VExchange

Where VExchange is the VirtualBox shared folder share name, and /home/administrator/Desktop/VExchange is the guest mount point. The following guide describes how to configure a shared folder to mount automagically on boot:

http://forums.virtualbox.org/viewtopic.php?f=3&t=15868.

In summary, I added this to /etc/rc.local, making sure that my guest user account’s (“user” in this example) GID and UID are 1000 respectively:

sudo mount -t vboxsf -o uid=1000,gid=1000 VExchange /home/user/Desktop/VExchange

Reboot and worked fine.

Advertisements

One thought on “Automatically mount a VirtualBox shared folder in an Ubuntu 9.10 guest

  1. Pingback: 2010 in review « Dave Koelmeyer

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