To share a folder between the host and the guest in VBox...
1. Go to Settings/Devices > Shared Folders > Add a new Machine Folder
(Recommended) If you would like to auto-mount this shared folder, click on Auto-mount and Make Permanent
2. At this point restart the VM for the shared folder to get auto-mounted:
[oracle@localhost ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 10504124 2387488 7574444 24% /
/dev/hdb1 12184796 7522868 4032988 66% /home
tmpfs 1815936 290720 1525216 17% /dev/shm
/dev/mapper/vg00-apps--fs
9805144 153084 9153988 2% /u01
Shared_VM_ODI12c 224776188 147399704 77376484 66% /media/sf_Shared_VM_ODI12c
3. On the Guest, login as root, and add 'oracle' user to the vboxsf group so that the user has access to the shared file system:
root# /usr/sbin/usermod -G vboxsf -a oracle
4. Now restart the VM to inherit the vboxsf group privs, and you should be able to cd into the shared folder:
[oracle@localhost sf_temp_share]$ id
uid=500(oracle) gid=500(oracle) groups=500(oracle),54323(davfs2),54324(vboxsf)
[oracle@localhost ~]$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda1 10504124 2387488 7574444 24% /
/dev/hdb1 12184796 7522868 4032988 66% /home
tmpfs 1815936 290720 1525216 17% /dev/shm
/dev/mapper/vg00-apps--fs
9805144 153084 9153988 2% /u01
Shared_VM_ODI12c 224776188 147399704 77376484 66% /media/sf_Shared_VM_ODI12c
3. On the Guest, login as root, and add 'oracle' user to the vboxsf group so that the user has access to the shared file system:
root# /usr/sbin/usermod -G vboxsf -a oracle
4. Now restart the VM to inherit the vboxsf group privs, and you should be able to cd into the shared folder:
[oracle@localhost sf_temp_share]$ id
uid=500(oracle) gid=500(oracle) groups=500(oracle),54323(davfs2),54324(vboxsf)
THERE IS NO NEED TO DO 'mount -t vboxsf shared_folder /shared_folder' -since we auto-mounted the file system.
No comments:
Post a Comment