Fix VMware Shared Folder vmhgfs Module Compilation Error
Today my ubuntu 14 updated its kernel to 3.16 then VMware shared folder disappeared in /mnt/hgfs. I tried to recompile vmhgfs modules with vmware-config-tools.pl and reinstall vmware-tools, but both failed with error messages:
from /tmp/modconfig-qqjwHn/vmhgfs-only/inode.c:29: /tmp/modconfig-qqjwHn/vmhgfs-only/inode.c: In function ‘HgfsPermission’: include/linux/kernel.h:793:27: error: ‘struct dentry’ has no member named ‘d_alias’
This bug has already been reported to VMware. Before VMware release official patch, we can manually fix this problem.
-
Uncompress your VMwareTools-*\**-*****.tar.gz (eg. VMwareTools-9.9.2-2496486.tar.gz)
-
cd YOURPATH/vmware-tools-distrib/lib/modules/source/
-
tar xvf vmhgfs.tar
-
cd vmhgfs-only
-
substitute d_alias with d_u.d_alias in inode.c
-
tar cvf vmhgfs.tar vmhgfs-only
Then re-run ./vmware-install.pl, everything should be fine now.