Search This Blog

Friday, March 5, 2010

How do I automount my virtual box shared folder in an Ubuntu guest?

I'm a big fan of VirtualBox and I run a whole bunch of virtual machines based on Ubuntu.  One of vbox's features is to allow the virtual machine access to the host's file system.  I always forget how to do it and have to troll the web for a solution.  I've done this enough times that I figured I should save myself some time and outline the steps here:
  • mkdir share
  • sudo mount -t vboxsf -o uid=1000,gid=1000 sharename mountpoint The user id and group id should be adjusted to match your account's numbers.
  • put into /etc/rc.local this line:  mount -t vboxsf -o uid=1000,gid=1000 .  This will remount the share during boot up. Notice how we didn't have to specify sudo in this case.
Replaced the user and group ids to match your account's ids. Many thanks to this blog post which gave me most of the information I needed.

No comments:

Post a Comment