With a little side of applesauce...

Thursday, February 1, 2007

VMWare Shared Folders are not mounted after reboot

I have just installed Fedora Core 4 in VMWare on an Ubuntu Dapper Drake host, and found that my “shared folders” were not being mounted into /mnt/hgfs/. After some searching, I came across the following thread with two possible fixes:

1. Posted by chrisbatemen:

1) Check if you have installed selinux-policy-targeted-sources package

rpm -q selinux-policy-targeted-sources

2) If you have not installed selinux-policy-targeted-sources, you have to add it.

yum install selinux-policy-targeted-sources

3) Edit /etc/selinux/targeted/src/policy/domains/program/initrc.te

Comment out the following line

allow initrc_t fs_type:filesystem mount_fs_perms;

Add a line to allow unlabeled_t type to be mounted.

#allow initrc_t fs_type:filesystem mount_fs_perms;
allow initrc_t { fs_type unlabeled_t }:filesystem mount_fs_perms;

File context for vmware-hgfs is unlabeled_t, because any context is not
given currently. The above line allows vmware-hgfs during initrc process.

4) Go to /etc/selinux/targeted/src/policy, run "make install" and "make reload".

Then, SElinux will allow the vmware-hgfs mount operation for the next reboot.

2. posted by alvinmz:

The solution is to disable your selinux.

in your /boot/grub/grub.conf

add "selinux=0" to it. And it will look like:

title Fedora Core (2.6.xxx_FC4)
root (hd0,0)
kernel /vmlinuz-2.6.xxx_FC4 ro selinux=0 root=/dev/VolGroup00/....

Then, reboot, and you will see your shared folders under your /mnt/hgfs/..

I have verified that the first solution worked for me, _but_, as this appears to be associated with SELinux, I would imagine that the second would work as well.
Here is a link to the thread (with a great explanation of the problem by chrisbatemen):

VMTN Discussion Forums: Shared Folders disappeared after reboot …

No comments: