Home > linux > Fixing vmware-tools vmhgfs on newer Linux kernels (probably anything >= 2.6.36)

Fixing vmware-tools vmhgfs on newer Linux kernels (probably anything >= 2.6.36)

If you’re trying to install vmware-tools inside a linux guest and get the dreaded
super.c:73: error: unknown field ‘clear_inode’ specified in initializer
error while compiling vmhgfs for shared folder support (which I use a lot), this will help (thanks to Anjo from German VMWare Forums):

  • unpack /usr/lib/vmware-tools/modules/source/vmhgfs.tar to somewhere
  • open vmhgfs-only/super.c in your favorite text editor
  • edit from
    #ifndef VMW_USE_IGET_LOCKED
     .read_inode       = HgfsReadInode,
     #endif
     .clear_inode      = HgfsClearInode,
     .put_super        = HgfsPutSuper,
     .statfs              = HgfsStatfs,
     };
    

    to (note .clear_inode -> .evict_inode)

    #ifndef VMW_USE_IGET_LOCKED
       .read_inode    = HgfsReadInode,
    #endif
       .evict_inode   = HgfsClearInode,
       .put_super     = HgfsPutSuper,
       .statfs           = HgfsStatfs,
    };
    
  • repack vmhgfs.tar including edited super.c
  • execute vmware-config-tools.pl
  • profit
Advertisements
Categories: linux Tags: , ,
  1. dejuren
    February 9, 2011 at 6:09 pm

    Thank you for sharing this, now vmhgfs is working for me and 2.6.37.

    • Gordon Schulz
      February 10, 2011 at 9:38 am

      Glad it worked for you. 🙂

  2. Senethril
    March 9, 2011 at 7:33 pm

    Error messsage desappeared but in the end i have the message ‘unable to start vmware services’ and i can’t find an issue for 2.6.36,same problem with vsock and vmci,for which i found a solution here: http://blog.breadncup.com/2011/02/26/vmware-tool-patch-for-linux-kernel-2-6-3738/

    That does not works

    Before i had all messages ‘done’, nothing works better,is it because i have not already mkinitrd or update-initramfs tools ?

    • March 10, 2011 at 12:59 pm

      probably not… have you tried manually rmmod‘ing and modprobe‘ing the modules? Maybe they spit out some more information during initialisation. Apart from that advice… I am kinda lost here, since it worked for me everytime.

  3. May 23, 2011 at 5:53 am

    Thanks Anjo and Gordon

  4. June 19, 2011 at 1:37 pm

    Thanks a lot. This worked for me too.

  5. Eran
    June 21, 2011 at 7:34 am

    Yup, fixed it for me too. Thanks!

  6. August 4, 2011 at 12:40 am

    Now it is working! Thanks!

  7. Tomas Liubinas
    August 18, 2011 at 4:45 pm

    Works for me. Thanks!

  8. Anna
    September 21, 2011 at 1:01 pm

    Sweet! Thank you a million!

  9. haha
    May 23, 2012 at 3:06 pm

    it really works for me.Thanks a lot .

  10. Michele Gubian
    October 29, 2012 at 4:55 pm

    this was very useful, thank you!! now I can share files!
    However, there appear to be other bugs in the code that is compiled by vmware-config-tools.pl. Make complains also here:

    /tmp/vmware-root/modules/vmci-only/vmci_drv.c:96:4: error: unknown field ‘ioctl’ specified in initializer
    /tmp/vmware-root/modules/vmci-only/vmci_drv.c:96:4: warning: initialization from incompatible pointer type
    /tmp/vmware-root/modules/vmci-only/vmci_drv.c: In function ‘vmci_init’:
    /tmp/vmware-root/modules/vmci-only/vmci_drv.c:156:4: error: implicit declaration of function ‘init_MUTEX’
    make[2]: *** [/tmp/vmware-root/modules/vmci-only/vmci_drv.o] Error 1
    make[1]: *** [_module_/tmp/vmware-root/modules/vmci-only] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.38-16-generic’
    make: *** [vmci.ko] Error 2
    make: Leaving directory `/tmp/vmware-root/modules/vmci-only’

    and here:

    /tmp/vmware-root/modules/vmci-only/vmci_drv.c:96:4: error: unknown field ‘ioctl’ specified in initializer
    /tmp/vmware-root/modules/vmci-only/vmci_drv.c:96:4: warning: initialization from incompatible pointer type
    /tmp/vmware-root/modules/vmci-only/vmci_drv.c: In function ‘vmci_init’:
    /tmp/vmware-root/modules/vmci-only/vmci_drv.c:156:4: error: implicit declaration of function ‘init_MUTEX’
    make[2]: *** [/tmp/vmware-root/modules/vmci-only/vmci_drv.o] Error 1
    make[1]: *** [_module_/tmp/vmware-root/modules/vmci-only] Error 2

  11. Michele Gubian
    October 29, 2012 at 6:19 pm

    well actually it does not work, because I see files in my Windows host shared folder from the guest Ubuntu 11.4, but if I try to mv a file from guest to host I get segmentation fault 😦

  1. May 11, 2011 at 1:17 am
  2. October 6, 2011 at 12:38 am

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

%d bloggers like this: