Page 1 of 3 123 LastLast
Results 1 to 10 of 23

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

  1. #1
    Join Date
    Nov 2006
    Beans
    20

    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:
    Code:
    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:
      Code:
      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:
      Code:
      cd /tmp
    5. expand the VMware Tools:
      Code:
      tar zxvf /media/cdrom/VMwareTools-6.0.4-93057.tar.gz
    6. expand the vmhgfs source code also in the current temp directory using:
      Code:
      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:
      Code:
      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.
      Code:
      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:
      Code:
      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)
      Code:
      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.
      Code:
      cd vmware-tools-distrib
      sudo ./vmware-install.pl


    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)

  2. #2
    Join Date
    Jun 2006
    Beans
    Hidden!

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

    Great job on the patch! It worked perfectly. Thanks!

  3. #3
    Join Date
    Nov 2006
    Beans
    20

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

    Quote Originally Posted by Zenyatta13 View Post
    Great job on the patch! It worked perfectly. Thanks!
    Glad to be of help!

    I found that the existing solutions posted around the net didn't fit what I wanted to do -- all the other solutions involve using non-vmware open tools, and the any-any patch. I've never used those, nor do I feel I really need them, so I instead just patched up VMware's existing tools.

  4. #4
    Join Date
    Aug 2007
    Location
    California, USA
    Beans
    10
    Distro
    Ubuntu

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

    Quote Originally Posted by Keithel View Post
    NOTE: This will only apply to the tools package included with Workstation 6.0.4 build 93057. YMMV with other VMware products and versions.
    The patches also worked with Vmware Server 1.0.6 build-91891, although I couldn't apply them directly because Server doesn't have the following files:

    cpNameLite.c
    kernelStubs.h

    I just applied the patches for the files it DOES have manually, although you could probably edit the patch file to remove the non-applicable patches and run it through patch.

    Also, I had to set the files to be writable before I made the changes:
    Code:
    chmod a+w vmware-tools-distrib/lib/modules/source/vmhgfs.tar
    and
    Code:
    chmod a+w vmhgfs-only/*
    Finally
    Code:
    tar uvf vmware-tools-distrib/lib/modules/source/vmhgfs.tar vmhgfs-only/
    will update the existing tar file with just the changes, rather than replacing the entire file.

    Many thanks to Keithel for this thread. I would never have figured out how to get vmhgfs compiled on my own.

  5. #5
    Join Date
    Jul 2008
    Beans
    1

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

    Thank you! Your solution worked perfectly too for the version 6.0.3, build 80004, of Vmware Workstation, except that the "sources" directory in the tar path is actually called source. Regards!

  6. #6
    Join Date
    Jul 2008
    Beans
    1

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

    You da man (or wo-man)!

    Thanks a million for making the effort to put together this solution for us!

    Storkman

  7. #7
    Join Date
    Nov 2006
    Beans
    3

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

    @Keithel, this is great! If you would just modify your OP to include the advice from evanb to make the necessary files writable, it would be perfect!

    Thanks a million!

  8. #8
    Join Date
    Nov 2006
    Beans
    20

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

    Ahh! I missed that. Thanks Stumpy and evanb -- I overlooked that.
    I have fixed the permissions problem with my instructions now -- it should work good now.

    If more people find this useful, I'll try to find some time to fix up the post so it's in a nicer HowTo format with sections and better formatting of steps.

  9. #9
    Join Date
    Jul 2008
    Beans
    1
    Distro
    Ubuntu 8.04 Hardy Heron

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

    COOL! You're such a crack! Worked like a charm. Thanks!

  10. #10
    Join Date
    Jul 2007
    Beans
    68

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

    why is it telling me that it cannot find the command "patch" I am stock at step 8, somebody please help the noob!!

    I tried sudo apt-get install patch, and it says there is not such app.

Page 1 of 3 123 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

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