I've been setting up a new development environment using VirtualBox so I can sandbox my services and such in their own VM. It's an Ubuntu-based VM, which loads as a headless instance that I SSH into from the host machine.

What I'd like to do is store all my project files on the host machine and then share them with the guest VM. I can do this easily enough with the following command:

sudo mount -t vboxsf <name> <target_path>

This works perfectly. However, it's a bit of a pain to have to run that command every time I start the VM. It means I have to start it, ssh in, execute command and restart my various services which require access to the data stored on the host machine (postgresql, apache, mongo, etc...).

I figured using fstab would be the best route, so I went about adding the following entry to the list:

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
HostWWW /home/wilhelm/www vboxsf

Easy enough, right? Well, I save and exit, reboot the VM, SSH back in, navigate to the mount point for the shared folder and it's still empty. I do a quick ls -lsa and get nothing. So, I run the following command to see if it's actually been mounted:

mount -v

and I see the following line within the resulting list of mount points:

HostWWW on /home/wilhelm/www type vboxsf (rw)

Now, correct me if I'm wrong, but this should tell me that it actually has been mounted with read/write access. Now, if I REmount the share again with the same command as above, everything works just fine.

Not sure what I'm doing wrong here; how can I fix this?

link|improve this question
feedback

1 Answer

Well, turns out this was easily resolved by adding that command to /etc/rc.local. Would still like to get fstab properly working.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

Not the answer you're looking for? Browse other questions tagged or ask your own question.