1 2 Previous Next 19 Replies Latest reply on Aug 3, 2009 10:17 AM by MarcioAB

    VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."

    c718333 Lurker

       

      Because vmhgfs did not built correctly during the VMWare tools installation, I am unable to access my VMWare "Shared Folders".

       

       

      I tried to create a new virtual machine in VMWare Fusion 2.0.4 (159196) running Ubuntu 9.04 (Jaunty Jackalope) using the ubuntu-9.04-desktop-i386.iso installer. During the creation of the VM I DID NOT use the "Linux Easy Install".

       

       

      Once the installation was complete I attempted to install the VMWare Tools. Everything was going along fine, until the VMWare tools installer gave the error "Unable to build the vmhgfs module". Now I am unable to access the "Shared Folders" through VMWare.

       

       

      This is the relevant output from the VMWare Tools installation:

       

      Extracting the sources of the vmhgfs module.
      Building the vmhgfs module.
      Using 2.6.x kernel build system.
      make: Entering directory `/tmp/vmware-config0/vmhgfs-only'
      make -C /lib/modules/2.6.28-11-generic/build/include/.. SUBDIRS=$PWD SRCROOT=$PWD/. modules
      make[1]: Entering directory `/usr/src/linux-headers-2.6.28-11-generic'
      CC   /tmp/vmware-config0/vmhgfs-only/backdoor.o
      CC   /tmp/vmware-config0/vmhgfs-only/backdoorGcc32.o
      CC   /tmp/vmware-config0/vmhgfs-only/bdhandler.o
      CC   /tmp/vmware-config0/vmhgfs-only/cpName.o
      CC   /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
      CC   /tmp/vmware-config0/vmhgfs-only/cpNameLite.o
      CC   /tmp/vmware-config0/vmhgfs-only/dentry.o
      CC   /tmp/vmware-config0/vmhgfs-only/dir.o
      CC   /tmp/vmware-config0/vmhgfs-only/file.o
      CC   /tmp/vmware-config0/vmhgfs-only/filesystem.o
      CC   /tmp/vmware-config0/vmhgfs-only/fsutil.o
      CC   /tmp/vmware-config0/vmhgfs-only/hgfsBd.o
      CC   /tmp/vmware-config0/vmhgfs-only/hgfsEscapeLinux.o
      CC   /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
      CC   /tmp/vmware-config0/vmhgfs-only/inode.o
      CC   /tmp/vmware-config0/vmhgfs-only/kernelStubsLinux.o
      CC   /tmp/vmware-config0/vmhgfs-only/link.o
      CC   /tmp/vmware-config0/vmhgfs-only/messageBackdoor.o
      CC   /tmp/vmware-config0/vmhgfs-only/message.o
      CC   /tmp/vmware-config0/vmhgfs-only/module.o
      CC   /tmp/vmware-config0/vmhgfs-only/page.o
      /tmp/vmware-config0/vmhgfs-only/page.c: In function ‘HgfsDoWriteBegin':
      /tmp/vmware-config0/vmhgfs-only/page.c:763: warning: ISO C90 forbids mixed declarations and code
      /tmp/vmware-config0/vmhgfs-only/page.c: In function ‘HgfsWriteBegin':
      /tmp/vmware-config0/vmhgfs-only/page.c:867: error: implicit declaration of function ‘__grab_cache_page'
      /tmp/vmware-config0/vmhgfs-only/page.c:867: warning: assignment makes pointer from integer without a cast
      make[2]: *** /tmp/vmware-config0/vmhgfs-only/page.o Error 1
      make[1]: *** \[_module_/tmp/vmware-config0/vmhgfs-only] Error 2
      make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-11-generic'
      make: *** \[vmhgfs.ko\] Error 2
      make: Leaving directory `/tmp/vmware-config0/vmhgfs-only'
      Unable to build the vmhgfs module.
      The filesystem driver (vmhgfs module) is used only for the shared folder
      feature. The rest of the software provided by VMware Tools is designed to work
      independently of this feature.
      If you wish to have the shared folders feature, you can install the driver by
      running vmware-config-tools.pl again after making sure that gcc, binutils, make
      and the kernel sources for your running kernel are installed on your machine.
      These packages are available on your distribution's installation CD.
      \[ Press Enter key to continue \]

       

      A blog post at http://laptopbisnis.blogspot.com/2009/04/ubuntu-904-beta-in-vmware-fusion.html  addresses this issue, and the solution is to edit a line in the page.c file, re-tar the modified folder, and then re-run the VMWare tools installation. When I try to re-run the VMWare tools installation, however, I get the following error:

       

      The following VMware kernel modules have been found on your system that were
      not installed by the VMware Installer.  Please remove them then run this
      installer again.
      vmxnet
      vmblock
      vmci
      vmmemctl
      I.e. - 'rm /lib/modules/2.6.28-11-generic/misc/<ModuleName>.{o,ko}'
      Execution aborted.

       

       

       

       

      Any help would be appreciated.

       

       

        • 1. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
          cgc Novice

          I did exactly what you did using the same distro and had the exact same error message.  Very interested in how to fix this...

          • 2. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
            smunnings Novice

             

            The blog instructions worked fine to fix the hgfs problems.

             

             

            However, I would suggest the following sequence:

             

             

            a.  Run vmware-uninstall-tools.pl  (so you don't get that other message about the installed modules)

             

             

            b. create the vmware-tools-distrib directory

             

             

            c. Apply the fix as per the blog page

             

             

            d. run  vmware-install.pl

             

             

            If all else fails, follow the suggestion of the  error message to remove the modules "by hand" and then re-run the install

             

             

             

             

             

             

             

             

            • 3. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
              c718333 Lurker

              Thanks, uninstalling VMWare tools, following the instructions in the blog and then reinstalling VMWare tools fixed the issue. I can see my shared folders again. Thanks again.

              • 4. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                vanduenkel Lurker

                 

                Could anyone of those who managed to fix the issue please give some more details where exaclty in file page.c they did the fixes? Was not clear to me reading the blog post.

                 

                 

                 

                 

                 

                Thanks,

                 

                 

                vanduenkel

                 

                 

                • 5. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                  smunnings Novice

                  The blog uses a kind of shorthand (based on patch lines)

                   

                   

                   

                   

                   

                   

                  \- page = __grab_cache_page(mapping, index);

                  + page = grab_cache_page_write_begin(mapping, index, flags);

                   

                  it means:

                   

                   

                  find the line:

                   

                   

                   

                   

                  page = __grab_cache_page(mapping, index);

                   

                   

                   

                   

                  remove it and replace it with the following line:

                   

                   

                   

                   

                  page = grab_cache_page_write_begin(mapping, index, flags);

                   

                   

                   

                   

                   

                   

                   

                   

                   

                   

                   

                   

                   

                   

                   

                   

                  or you could read it as - make changes to the first line to make it look like the second line.

                   

                   

                   

                   

                  So, just search (in an editor) for  "__grab_cache_page"

                   

                   

                   

                   

                  You should then just be able to make the suggested change to the line.

                  • 6. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                    WoodyZ Guru
                    vanduenkel wrote:

                    Could anyone of those who managed to fix the issue please give some more details where exaclty in file page.c they did the fixes? Was not clear to me reading the blog post.

                     

                    I think the directions are self explanatory however maybe the following will make it clearer.

                     

                    It is line 867 in the page.c file that is in the vmhgfs.tar tarball as shown in the attached image that needs to be patched.

                     

                    I have also attached a page.c.patch.zip file that contains a diff patch created under Fusion 2.0.4 and have verified it will work with 2.0.2 and 2.03 and was not applicable to 2.0.1 or 2.0.0.  Note: The is for the page.c file that is in the vmhgfs.tar tarball in the VMwareTools.tar.gz file in the "/Library/Application Support/VMware Fusion/isoimages/linux.iso" file that is the VMware Tools for Linux when installing from the tar.gz installer.

                     

                    The syntax to use the patch is: patch page.c page.c.patch

                     

                    Message was edited by: WoodyZ - Updated the Fusion versions the page.c.patch file works with.

                    • 7. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                      ginswizzle Lurker

                      I think I made the page.c change and did the VMware Tools install/uninstall correctly, but I'm not seeing my shared folders. I've restarted and checked that shared folders are active in the VM settings. how do I fix this? where should the shared folders be showing up in Ubuntu?

                      • 8. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                        WoodyZ Guru
                        ginswizzle wrote:

                        where should the shared folders be showing up in Ubuntu?

                         

                        Look in: /mnt/hgfs

                        • 9. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                          WoodyZ Guru

                          For those looking for an automated solution to installing VMware Tools in Ubuntu 9.04 Desktop Edition which incorporates information found in this thread and additional changes that need to be made have a look at: Installing Ubuntu 9.04 Desktop Edition with full support of VMware Tools - Simplified!

                          • 10. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                            bobcov Novice

                             

                            Woody, slightly off topic, but you may be able to help. I installed 8.0.4 JeOS which started life at about 100 megs. After install, it was about 455 megs. Then I did a minimal install of gnome-core synaptic, firefox and a few other things. This brought it up to 937 meg..Not so ideal, but I could live with that.

                             

                             

                            However, after doing build-essential and get the headers and stuff to load and install vmware-tools, I end up at 1.79 GB!  I was wondering if you can think of any way I can get back down to a lower number. I've tried the deborphan thing, the dead packages thing, etc. I just don't get why everything would bloat by 700 meg just because I took the steps to install vmware tools.

                             

                             

                            Can I get rid of all of the build tools? I don't think they took up that much. The vmware tar was 200 meg. That's gone. I just don't get what happened. This can't be all necessary code.

                             

                             

                             

                             

                             

                            -Bob

                             

                             

                            • 11. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                              Guru

                              The vmware tar was 200 meg. That's gone. I just don't get what happened. This can't be all necessary code.

                               

                              A lot of the space taken up by Linux Tools is for prebuilt kernel modules, most of which you will probably never use. You can probably go through and prune them (though I forget where they end up), or even skip Tools installation entirely, which is what I do on my minimal installs.

                              • 12. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                                bobcov Novice

                                Hi,

                                 

                                All I want is cut and paste between the XP host and the Ubuntu guest  and automatic resizing of the guest when the vm window is resized. Are you saying I can get away with no install or a smaller install of tools? If so, please give me a few tips on how to do that.

                                 

                                 

                                Also, how do you go about removing the unneeded stuff? What are the file suffixes?

                                 

                                 

                                I just also noticed a nasty bug with player: It always stays on top. I built the VM in workstation, so I hadn't seen the problem. I'm guessing the solution is to roll back to an earlier version of vmplayer. I have 2.5.2 right now.

                                • 13. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                                  Guru

                                  This is the Fusion forum, so if you're using Player, that's important to know.

                                   

                                  All I want is cut and paste between the XP host and the Ubuntu guest and automatic resizing of the guest when the vm window is resized.

                                   

                                  Oh, I skimmed your post and based on the JeOS mention assumed that you had a minimal command-line installation (in which case you don't care about things like this because they won't work anyway).

                                   

                                  Also, how do you go about removing the unneeded stuff?

                                   

                                  Just sudo rm them, the tricky part is knowing which files you can get rid of safely. Like I said, I don't recall this off the top of my head.

                                  • 14. Re: VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module."
                                    bobcov Novice

                                     

                                    Whoops! Sorry about being in the Fusion forum!  Yeah, I'm running vmware player on XP, though I got an invite in email to beta fusion so I'll be doing that soon.

                                     

                                     

                                    I did find a HUGE file in my install which I deleted. I think when I did build-essential, the os made a backup copy of some core kernel file which was 400 meg. I deleted that on another build just to be sure nothing bad would happen, then deleted it on my normal system and all was well...until I used fslint to delete things.  Not a good idea. But I had a backup, so I was able to recover from that, too.

                                     

                                     

                                    Biggest problem now: VMware Player 2.5.x has a bug relating to focus. If you click on another window, Player stays in the foreground unless you click on the title bar of the other  window. This is not good.

                                     

                                     

                                     

                                     

                                     

                                    1 2 Previous Next