vmplayer-change-mount-dir

Change vmware-tools script

/etc/init.d/vmware-tools
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Mount all hgfs filesystems
vmware_mount_vmhgfs() {
if [ "`is_vmhgfs_mounted`" = "no" ]; then
if [ "`vmware_vmhgfs_use_fuse`" = "yes" ]; then
#mkdir -p $vmhgfs_mnt
#vmware_exec_selinux "$vmdb_answer_BINDIR/vmhgfs-fuse \
# -o subtype=vmhgfs-fuse,allow_other $vmhgfs_mnt"
for shared_name in `vmware-hgfsclient`; do
mkdir -p /mnt/${shared_name}
vmware_exec_selinux "vmhgfs-fuse -o nonempty -o allow_other -o umask=2 .host:/${shared_name} /mnt/${shared_name}"
done
else
vmware_exec_selinux "mount -t vmhgfs .host:/ $vmhgfs_mnt"
fi
fi
}

Reboot

reboot system to take effect

After this changed, /mnt/hgfs can be removed.

For CentOS 7, you should install open-vm-tools first: sudo yum -y install open-vm-tools

Mount

/etc/fstab
1
.host:/share    /mnt/share    fuse.vmhgfs-fuse    allow_other,nonempty,defaults    0    0
1
sudo vmhgfs-fuse -o nonempty -o allow_other .host:/share /mnt/share

.host:/share is device name, and can be seen by command: vmware-hgfsclient