Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Error installing vmware-tools 9.9 after upgrade to linux-image-3.13.0-46

After having upgraded my guest ubuntu to linux-image-3.13.0-46 I got an error install vmware-tools and I cannot share folders any more.

I ran vmware player 7.0.0 build-2305329 both in Windows 8 and Ubuntu 14.04 LTS host machine and during the installation I got the following error log out:

                 from /tmp/modconfig-NVbKuD/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); \
                           ^

Is there any workaround about this issue?

Thanks

like image 249
marcom Avatar asked Feb 18 '15 08:02

marcom


People also ask

Why is VMware tools not installing?

Since VMware Tools cannot be installed without a CD-ROM drive, the incorrect network driver is also assigned to the NIC. To resolve this issue, you must assign the correct driver. To assign the correct driver: Select the VM in the inventory.

Is it possible to install VMware tools in Linux VM?

For Linux virtual machines, you manually install VMware Tools from the command line. For later Linux distributions, use the integrated open-vm-tools version.


2 Answers

vmware-tools-distrib-9.9.2-2496486:

I have fixed the problem by going to the directory where vmhgfs.tar is located (in my case /usr/lib/vmware-tools/modules/source), unpack the tar and manually edit inode.c.

At line 1925(just search for "d_alias" to find the exact line) you need to add an if. In the end looks like that:

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
                           d_alias) {
#else
                           d_u.d_alias) {
#endif

Then again around line 1983 (search again for "d_alias"):

#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 13, 0)
         struct dentry *dentry = list_entry(pos, struct dentry, d_alias);
#else
         struct dentry *dentry = list_entry(pos, struct dentry, d_u.d_alias);
#endif

Caveat: Not sure on the kernel version but I have put there 3,13,0 though my Ubuntu reports:

# uname -a
Linux md-ubuntu 3.13.0-46-generic #76-Ubuntu SMP Thu Feb 26 18:52:13 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

And this was working fine with 3.13.0-45.

So probably if you downgrade the kernel the above hack will not work properly.

Then you need to pack again the tar archive (just move the old one out of the way:

# mv vmhgfs.tar vmhgfs.tar.orig

and pack again the directory:

# tar cvf vmhgfs.tar vmhgfs-only

)

Hope it helps.

like image 166
Mircea Damian Avatar answered Sep 19 '22 07:09

Mircea Damian


This patch should fix the problem.

Edit Working Gist patch

Instructions for use:

cd vmware-tools-distrib/lib/modules/source/
tar -xvf vmhgfs.tar
cd vmhgfs-only
patch inode.c < inode.patch
cd ..
mv vmhgfs.tar vmhgfs.tar.orig
tar cvf vmhgfs.tar vmhgfs-only
cd vmware-tools-distrib
sudo ./vmware-install.pl
like image 28
iwlagn Avatar answered Sep 23 '22 07:09

iwlagn