Page 1 of 1

Permanent Shared Folder

Posted: 18. May 2011, 11:41
by wikisb
Hi all!!
i use headless host & guests, their OS are CentOS.i want to mount permanently a shared folder. i have tried adding to /etc/fstab this line "shared /mnt/shared vboxsf defaults 0 0" but it doesn't mount the folder permanently.
manually to mount a folder after :
"VBoxManage sharedfolder add "VMname" --name "shared" -hostpath /to/host/share/folder"
& creating a folder to share at guest, i put the following in my guest:
"mount -t vboxsf shared /mount/shared"
"ln -s /mnt/shared /usr/local/SHARED_FOLDER"
then the host & guest can share things in this folder

/mnt/shared --> guest folder to share
/usr/local/src/SHARED_FOLDER --> host folder to share
shared --> name i put at "VBoxManage sharefolder...."
so can somebody tell me what i have to do to make this shared folder permament. its not very smart putting commands "mount ...." & "ln -s ..." everytime you restart a VM.
thanks

Re: Permanent Shared Folder

Posted: 18. May 2011, 20:20
by Sasquatch
Either use rc.local or rc.boot (depending on your distro). But, you can just as well enable auto-mount in the VM settings so the SF is mounted automatically at /media/sf_name. The guest users that need to access the SF needs to be in the vboxsf group. That's it.