VMware

This Question is Answered

2 "helpful" answers available (6 pts)
1 2 Previous Next 19 Replies Last post: Aug 3, 2009 10:17 AM by MarcioAB  

VMWare Tools/Ubuntu 9.04 issue - "Unable to build the vmhgfs module." posted: Apr 24, 2009 6:50 AM

Click to view c718333's profile Lurker 2 posts since
Apr 24, 2009

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 [M] /tmp/vmware-config0/vmhgfs-only/backdoor.o
CC [M] /tmp/vmware-config0/vmhgfs-only/backdoorGcc32.o
CC [M] /tmp/vmware-config0/vmhgfs-only/bdhandler.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpName.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLinux.o
CC [M] /tmp/vmware-config0/vmhgfs-only/cpNameLite.o
CC [M] /tmp/vmware-config0/vmhgfs-only/dentry.o
CC [M] /tmp/vmware-config0/vmhgfs-only/dir.o
CC [M] /tmp/vmware-config0/vmhgfs-only/file.o
CC [M] /tmp/vmware-config0/vmhgfs-only/filesystem.o
CC [M] /tmp/vmware-config0/vmhgfs-only/fsutil.o
CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsBd.o
CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsEscapeLinux.o
CC [M] /tmp/vmware-config0/vmhgfs-only/hgfsUtil.o
CC [M] /tmp/vmware-config0/vmhgfs-only/inode.o
CC [M] /tmp/vmware-config0/vmhgfs-only/kernelStubsLinux.o
CC [M] /tmp/vmware-config0/vmhgfs-only/link.o
CC [M] /tmp/vmware-config0/vmhgfs-only/messageBackdoor.o
CC [M] /tmp/vmware-config0/vmhgfs-only/message.o
CC [M] /tmp/vmware-config0/vmhgfs-only/module.o
CC [M] /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.

Click to view cgc's profile Novice 8 posts since
Jul 6, 2007
I did exactly what you did using the same distro and had the exact same error message. Very interested in how to fix this...
Click to view smunnings's profile Novice 2 posts since
Apr 24, 2009

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


Click to view vanduenkel's profile Lurker 1 posts since
May 1, 2009

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

Click to view smunnings's profile Novice 2 posts since
Apr 24, 2009
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.

Click to view WoodyZ's profile Guru 10,142 posts since
Apr 22, 2004
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<xxxxxx>.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.
Attachments:
Click to view ginswizzle's profile Lurker 4 posts since
May 8, 2008
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?
Click to view WoodyZ's profile Guru 10,142 posts since
Apr 22, 2004
ginswizzle wrote: where should the shared folders be showing up in Ubuntu?

Look in: /mnt/hgfs
Click to view WoodyZ's profile Guru 10,142 posts since
Apr 22, 2004
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!
Click to view bobcov's profile Novice 9 posts since
May 19, 2009

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

Click to view etung's profile Guru 11,094 posts since
Oct 15, 2006
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.
Click to view bobcov's profile Novice 9 posts since
May 19, 2009
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.

Click to view etung's profile Guru 11,094 posts since
Oct 15, 2006
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.
Click to view bobcov's profile Novice 9 posts since
May 19, 2009

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.


VMware Developer

SDKs, APIs, Videos, Learn and much more in the Developer community.

Learn More

Developer Sample Code

Increase your developer productivity with VMware API sample code.

Learn More

VMworld Sessions & Labs

Online access to the latest VMworld Sessions & Labs and online services.

Learn more

Purchase PSO Credits Online

Purchase credits to redeem training and consulting services online.

Buy Now

Community Hardware Software

View reported configurations or report your own.

Learn More

VMware vSphere

Come witness the next giant leap in virtualization.

Register Today

Communities