How to fix no shared folders in vmware player 7

A quick note for those that have seen shared folder support and copy-to-clipboard issues when running a ubuntu 14.04 virtual machine in VMWare Player / VMWare Workstation.

Ubuntu has recently just bumped its kernel version to 3.13.0-46-generic i.e. run uname -a to see what kernel you are running.

The default vmware tools that comes with VMWare Player 7 now does not compile correctly.  When you run vmware-install.pl in the extracted vmware-tools package you see the following error:


from /tmp/modconfig-ABCdEFgH/vmhgfs-only/inode.c:29:
include/linux/kernel.h:793:27: error: ‘struct dentry’ has no member named ‘d_alias’
const typeof( ((type *)0)->member ) *__mptr = (ptr); \

The hint I found to fix this was here – however the instructions were not clear how to apply this.


From the VMWare Player menu choose Virtual Machine – Reinstall VMWare Tools.

Click Install on the dialog to mount the virtual disc

Copy the VMWareTools-9.9.2-2496486.tar.gz file displayed in Nautilus to your ~/Downloads folder.

Dip into your terminal:

cd ~/Downloads
tar -xvf VMWareTools-9.9.2-2496486.tar.gz
cd vmware-tools-distrib/lib/modules/source/
tar -xvf vmhgfs.tar
cd vmhgfs-only

then copy and paste the following as a file called inode.patch

1924a1925
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) 
1925a1927,1929 
> #else
>              d_u.d_alias) {
> #endif
1977a1982
> #if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0) 
1978a1984,1987 
> #else
>          struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
> #endif
> 

Run the following to fix the errant file the cannot be compiled:

patch inode.c < inode.patch

This will complain about the file being read-only – but will patch the file never-the-less.

Finally – recompress the sources you’ve modified back as a tar file and re-run the vmware-tools installer:


cd ..
mv vmhgfs.tar vmhgfs.tar.orig
tar cvf vmhgfs.tar vmhgfs-only
cd ~/Downloads/vmware-tools-distrib
sudo ./vmware-install.pl

Advertisements

One thought on “How to fix no shared folders in vmware player 7

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s