‘Twas a mystery to me until I read this post which describes how to mount the filesystem automatically at boot time. The VirtualBox guide says install Guest Additions, add a shared folder, boot the guest machine and enter:
sudo mount -t vboxsf -o uid=1000,gid=1000 share ~/host

To mount automatically, the VirtualBox guide continues…

“Using /etc/fstab has little effect, because that file is processed before the SF module is loaded and will fail to mount the share. Sometimes, the share does get mounted because the GA check for it when they are loaded upon boot, but it’s very flaky, meaning it doesn’t work most of the time. You’re better of with the first option.
When you put the mount command in /etc/rc.local, so it’s mounted at startup, you can’t use the short notation for your home folder. During startup, everything is done through the root user, so using ~ for home, means it’s the home folder of Root (/root). Change it to the full path.”

Here’s what I did

  • Go to the folder /etc
  • Use your favorite editor to open the file etc/modules
  • After the last line you write now vboxvfs and in the next line vboxadd. Then save save and close this file.
  • Now edit etc/fstab
  • after the last line write share ~/host vboxsf defaults 0 0

reboot the guest machine after adding the share – if you add a new share the guest will not see it until it is restarted. Having read all that I thought I’d just mount the share when it was needed, so I’ll just hang onto this post for reference.