Results 1 to 10 of 23

Thread: VMware Tools for VMware Workstation 6.0.4 build 93057 on Ubuntu 8.04 guest

Threaded View

  1. #1
    Join Date
    Nov 2006

    Post VMware Tools for VMware Workstation 6.0.4 build 93057 on Ubuntu 8.04 guest

    So, you've gone and upgraded to or installed Ubuntu 8.04 Hardy Heron to a VMware virtual machine, but you find that the guest-host directory sharing doesn't work, amongst other things.

    You've gone on to do the usual VMware tools install/upgrade via the VM->Install VMware Tools... feature in VMware Workstation, but you run into the following error when compiling the vmhgfs module:
    make -C /lib/modules/2.6.24-19-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
    make[1]: Entering directory `/usr/src/linux-headers-2.6.24-19-generic'
      CC [M]  /tmp/tmp/vmhgfs-only/backdoor.o
      CC [M]  /tmp/tmp/vmhgfs-only/backdoorGcc32.o
      CC [M]  /tmp/tmp/vmhgfs-only/bdhandler.o
      CC [M]  /tmp/tmp/vmhgfs-only/cpName.o
    In file included from include/linux/string.h:11,
                     from /tmp/tmp/vmhgfs-only/cpName.h:18,
                     from /tmp/tmp/vmhgfs-only/cpName.c:18:
    include/linux/types.h:40: error: conflicting types for ‘uintptr_t’
    /tmp/tmp/vmhgfs-only/vm_basic_types.h:170: error: previous declaration of ‘uintptr_t’ was here
    make[2]: *** [/tmp/tmp/vmhgfs-only/cpName.o] Error 1
    make[1]: *** [_module_/tmp/tmp/vmhgfs-only] Error 2
    make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-19-generic'
    make: *** [vmhgfs.ko] Error 2
    Below paragraph is some technical info that most users can skip over:
    Well, it seems that VMware has not updated their tools to work well with Linux kernel 2.6.24, and the Linux kernel team threw in a definition of uintptr_t outside the usual place it's defined -- in stdint.h. This may mean that they determined that inclusion of stdint.h is not safe to include in kernel code.

    Here are the steps to fixing this:
    1. Perform the VM->Install VMware Tools... action in VMware to get the VMware Tools virtual CD mounted in Ubuntu.
    2. Bring up a terminal window, existing user is fine (does not have to be root).
    3. Make sure build-essential package, and the patch package are installed using:
      sudo aptitude install build-essential
      sudo aptitude install patch
      (I put them separately so you could more easily tell if one or the other failed)
    4. Change to a temporary directory:
      cd /tmp
    5. expand the VMware Tools:
      tar zxvf /media/cdrom/VMwareTools-6.0.4-93057.tar.gz
    6. expand the vmhgfs source code also in the current temp directory using:
      tar xvf vmware-tools-distrib/lib/modules/source/vmhgfs.tar
      You should now have a directory called vmhgfs-only which was expanded from the vmhgfs.tar file.
    7. Now, download the patch file I have put together and attached to this post. This patch file fixes the vmhgfs module sources so they properly compile for kernel 2.6.24.

      NOTE: This will only apply to the tools package included with Workstation 6.0.4 build 93057. YMMV with other VMware products and versions.
    8. Apply the patch file to the sources we just expanded. From the directory where vmhgfs-only resides, execute:
      patch -p1 < /path/to/vmhgfs_6.0.4-93057__linux-2.6.24_fix.patch.txt
    9. Force remove the old vmhgfs.tar file from the extracted tools install files, as the permissions on this file are read-only.
      rm -f vmware-tools-distrib/lib/modules/source/vmhgfs.tar
    10. Package the modified sources up back into a tar file, replacing the original removed vmhgfs.tar file in vmware-tools-distrib:
      tar cvf vmware-tools-distrib/lib/modules/source/vmhgfs.tar vmhgfs-only
    11. Make the permissions of the vmhgfs.tar file the same as the original one -- which I see as being -r--r--r-- (444 octal) (this is optional)
      chmod 444 vmware-tools-distrib/lib/modules/source/vmhgfs.tar
    12. Now all that is left to do is execute the VMware tools installer from the vmware-tools-distrib directory, just like you would normally when installing VMware tools. This time, however, the vmhgfs module should compile successfully when configuring.
      cd vmware-tools-distrib
      sudo ./

    NOTE: The patch file has been named with a .txt extension so that it will properly upload to the Ubuntu forums. This should have no effect on the way the patch file applies.
    Attached Files Attached Files
    Last edited by Keithel; August 13th, 2008 at 04:50 PM. Reason: Fix line installing build-essential package (was incorrectly indicated as build-essentials)

Tags for this Thread


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts