The latest version of Ubuntu does indeed have some sexy new features, new notifications, eucalyptus cloud support. All around a pretty awesome release. In what I will kindly call a fit of nievete, I decided to upgrade the my VM that I have been using for web development. Although the upgrade from 8.10 to 9.04 went smoothly, the reinstall of VMware tools failed leaving me without any shared folders. So after a little profanity and a lot of googling I thought I would share what got my shared folders back up and running.
First you will want to make sure that you have the headers and other stuff so VMware tools has what it needs to compile everything:
sudo apt-get install linux-headers-`uname -r` build-essential
If you are not running VMware 6.5.2 you will likely be asked where your header files are. 6.5.2 added “experimental” support for Jaunty so it already knows where to look. I was running the server version so my headers were in/lib/modules/2.6.28-11-server/build/include.
If you are running the desktop version you can probably find them here: /lib/modules/2.6.28-11/build/include
What is the location of the directory of C header files that match your running
kernel? [/lib/modules/2.6.28-11-server/build/include]
The first time I tried to install VMware tools, two of the modules failed. I upgraded to version 6.5.2 build 156735 and tried it again and that time only the HGFS module failed with the following error:
CC [M] /tmp/vmware-config3/vmhgfs-only/page.o
/tmp/vmware-config3/vmhgfs-only/page.c: In function âHgfsDoWriteBeginâ:
/tmp/vmware-config3/vmhgfs-only/page.c:763: warning: ISO C90 forbids mixed declarations and code
/tmp/vmware-config3/vmhgfs-only/page.c: In function âHgfsWriteBeginâ:
/tmp/vmware-config3/vmhgfs-only/page.c:867: error: implicit declaration of function â__grab_cache_pageâ
/tmp/vmware-config3/vmhgfs-only/page.c:867: warning: assignment makes pointer from integer without a cast
make[2]: *** [/tmp/vmware-config3/vmhgfs-only/page.o] Error 1
make[1]: *** [_module_/tmp/vmware-config3/vmhgfs-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.28-11-server’
make: *** [vmhgfs.ko] Error 2
make: Leaving directory `/tmp/vmware-config3/vmhgfs-only’
Unable to build the vmhgfs module.
Fortunately some googling turned up this clever fellow who tells you how to fix the problematic line of code. I did it and am happy to report that it works. Just to make everybody’s lives a little easier I thought I would make the patched code available to save people some time and bother. You can see the link to it in the code below. So without further ado, here is what you need to do to fix the HGFS. You will need the vmware-tools-distrib folder. I had it laying around from my previous install attempts.
mike@ubuntu:~$ cd vmware-tools-distrib/lib/modules/source/
mike@ubuntu:~/vmware-tools-distrib/lib/modules/source$ rm vmhgfs.tar
rm: remove write-protected regular file `vmhgfs.tar’? y
mike@ubuntu:~/vmware-tools-distrib/lib/modules/source$ wgethttp://www.dexterchief.com/vmhgfs.tar
–2009-05-03 00:18:25– http://www.dexterchief.com/vmhgfs.tar
Resolving www.dexterchief.com… 67.205.50.232
Connecting to www.dexterchief.com|67.205.50.232|:80… connected.
HTTP request sent, awaiting response… 200 OK
Length: 901120 (880K) [application/x-tar]
Saving to: `vmhgfs.tar’
100%[======================================>] 901,120 176K/s in 5.8s
2009-05-03 00:18:32 (152 KB/s) – `vmhgfs.tar’ saved [901120/901120]
mike@ubuntu:~/vmware-tools-distrib/lib/modules/source$ ls -al vmhgfs.tar
-rw-r–r– 1 mike mike 901120 2009-05-02 23:26 vmhgfs.tar
mike@ubuntu:~/vmware-tools-distrib/lib/modules/source$ chmod 444 vmhgfs.tar
mike@ubuntu:~/vmware-tools-distrib/lib/modules/source$ ls -al vmhgfs.tar
-r–r–r– 1 mike mike 901120 2009-05-02 23:26 vmhgfs.tar
Now that the permissions are set correctly just rerun the install script:
mike@ubuntu:~/vmware-tools-distrib/lib/modules/source$ sudo ./vmware-install.pl
I hope that ends up being useful for somebody.
original posting : http://mikewilliamson.wordpress.com/2009/05/03/vmware-tools-and-shared-folders-in-unbuntu-904-jaunty/
댓글