This is not a complete answer yet, but more like guidelines on 2 approaches you have:
1 - You could edit /etc/fstab
and add this mount there. You would need to translate your mount parameter to fstab syntax. A wild guess would be something like /home/jamesw/host vboxsf myshare,umask=002,uid=<youruser>,gid=plugdev 0 0
. You would need sudo
to edit your fstab, but, once done, it will be auto-mounted on boot. Since this is done before you even log in, you need an absolute path to the mount point (hence /home/jamesw/host), you can not use $HOME
or ~
. Hint: "host" folder don't need to exist. If it is in fstab, mount will create it for you.
2 - You could use fusermount
instead of mount. The syntax is similar (but not identical, so you still need to translate the mount parameters). Fusermount requires your mount point to be somewhere inside your $HOME, but the biggest advantage is that you would not need sudo
. And the mount will be avaliable in Nautilus (as if it was a CD or USB key). After you get the right parameters and test it, you can add it to your ~/.profile
, which runs every time you log in.
EDIT: Im assuming that either Virtualbox dont need the machine to be actually runing for it to share folders, OR that it is up and running before you log in
NAT
toBridged
. You can now "exchange" shares from guest to host (and vice-versa) using Nautilus, Samba, etc... – MestreLion Jul 09 '11 at 08:26