Permanent Shared Folder

Discussions about using Linux guests in VirtualBox.
Post Reply
wikisb
Posts: 19
Joined: 9. May 2011, 18:25
Primary OS: Linux other
VBox Version: OSE other
Guest OSses: CENTOS

Permanent Shared Folder

Post 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
Sasquatch
Volunteer
Posts: 17798
Joined: 17. Mar 2008, 13:41
Primary OS: Debian other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Windows XP, Windows 7, Linux
Location: /dev/random

Re: Permanent Shared Folder

Post 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.
Read the Forum Posting Guide before opening a topic.
VirtualBox FAQ: Check this before asking questions.
Online User Manual: A must read if you want to know what we're talking about.
Howto: Install Linux Guest Additions
Howto: Use Shared Folders on Linux Guest
See the Tutorials and FAQ section at the top of the Forum for more guides.
Try searching the forums first with Google and add the site filter for this forum.
E.g. install guest additions site:forums.virtualbox.org

Retired from this Forum since OSSO introduction.
Post Reply