Posted
26 April 2008 @ 12am

Tagged
Uncategorized

How to Install VMware Tools on Ubuntu Hardy 8.04 under VMware Fusion

Ubuntu Hardy under VMware Fusion

The latest version of Ubuntu (8.04 a.k.a. Ubuntu Hardy - the world’s most popular Linux distribution) came out yesterday on April 24th. I downloaded it right away to play with on VMware Fusion, my Mac virtualization tool of choice (though I’ve now been told this works in VMware Workstation and VMware Player on the PC too!). It worked pretty well out of the box, with even seamless mouse support working right away, but I needed, of course, to install VMware Tools too, as any good VMware user would do. From there, things turned sour, and I was bombarded with error messages similar to:

In file included from /tmp/vmware-config8/vmblock-only/linux/os.h:35,
from /tmp/vmware-config8/vmblock-only/linux/block.c:26:
/tmp/vmware-config8/vmblock-only/./include/compat_wait.h:78: error: conflicting types for ‘poll_initwait’
include/linux/poll.h:65: error: previous declaration of ‘poll_initwait’ was here
In file included from /tmp/vmware-config8/vmblock-only/linux/vmblockInt.h:40,
from /tmp/vmware-config8/vmblock-only/linux/block.c:29:
/tmp/vmware-config8/vmblock-only/./include/vm_basic_types.h:184: error: conflicting types for ‘uintptr_t’
include/linux/types.h:40: error: previous declaration of ‘uintptr_t’ was here
make[2]: *** [/tmp/vmware-config8/vmblock-only/linux/block.o] Error 1
make[1]: *** [_module_/tmp/vmware-config8/vmblock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-16-generic’
make: *** [vmblock.ko] Error 2
make: Leaving directory `/tmp/vmware-config8/vmblock-only’
Unable to build the vmblock module.

After banging my head against the wall for a while, trying a “vmware-any-any” patch that didn’t quite do the trick, and scouring the VMWare Fusion and Ubuntu Forums, I eventually came across a link to a page that described how to solve the problem. The credit for this solution rests entirely on the guy who wrote that page and a guy called Mufassa who posted a shorter explanation to the VMware Fusion forums.

I wanted to write this up into a proper blog post though for two reasons. Firstly, I wanted to show how to fix the problem in a more, direct line by line way (just in case you’re a novice or would rather follow some command line instructions). Secondly, I know posts on this blog appear in Google very quickly, so I want people Googling for “vmware fusion” and “ubuntu hardy” (like I was earlier) to find this page and have their problem solved! So, credit to those other guys, but..

Steps To Getting VMware Tools installed on Ubuntu Hardy under VMware Fusion:

Use the “Install VMware Tools” option in VMWare Fusion, and drag the .tar file (not the RPM!) to the Ubuntu desktop.

Open a Terminal (Applications menu -> Accessories -> Terminal). We’ll do all the work from the Terminal. First, we need to install some dependencies:

sudo apt-get install build-essential libgtk2.0-dev
sudo apt-get install libproc-dev libdumbnet-dev xorg-dev
cd Desktop/

wget http://mesh.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-2008.04.14-87182.tar.gz

Next, we need to unpack the tar files we have at hand:

tar xzvf VMware*.gz
tar xzvf open-vm-tools*.gz

Next, we’ll build the open-vm-tools:

cd open-vm-tools-2008.04.14-87182/
./configure && make
cd modules/linux/

In the modules/linux folder we have the vmblock, vmhgfs, vmmemctl, vmsync and vmxnet modules that we need to tar up and place into the official VMware tools tarball:

for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
cd ../../..

mv -f open-vm-tools-2008.04.14-87182/modules/linux/*.tar vmware-tools-distrib/lib/modules/source/

Now we can run the regular VMware tools installer:

cd vmware-tools-distrib/
sudo ./vmware-install.pl

Once this is done, the best tactic is to restart Ubuntu entirely. Once you boot back up, things should seem a bit smoother. The resolution of the VM will stick to the size of the VM, etc, and you can now drag files directly into Ubuntu Hardy from your Mac desktop!

Note: A few of the lines of code you need to use above are single lines of code but spread over multiple lines on your screen when viewing this blog. Either make your browser wider, or copy and paste them into a text editor before continuing.


50 Comments

[…] was having problems installing VMware Tools on Ubuntu Hardy (8.04) under VMware Fusion but got to the bottom of […]


Posted by
Andrew Blossom
26 April 2008 @ 3am

Just an FYI for everyone out there: This process also works well with VMWare Workstation 6.x for windows.


Posted by
Arthur
26 April 2008 @ 8am

I had similar problems yesterday, tried to patch things with vmware-any-any* and nothing worked.
Just tried your howto and everything worked flawlessly! Thank you very much.


Posted by
ziple
26 April 2008 @ 10am

Thanks for this howto!


Posted by
Joe
26 April 2008 @ 12pm

Thanks! Works like a charm!
By the way, is there a way to enable mouse scroll? Thanks :)


Posted by
João
26 April 2008 @ 2pm

Very straight forward. Worked perfectly! Thanks


Posted by
Michael Bangert
26 April 2008 @ 2pm

Saved me a ton of time, thanks man.


Posted by
pabtro
26 April 2008 @ 4pm

Many thanks; your very clear procedure worked flawlessly.


Posted by
JP
26 April 2008 @ 4pm

Great HowTo! It fixed my shared folders on Windows VMware Workstation 6.0.3 with Kubuntu 08.04


Posted by
Lee
26 April 2008 @ 8pm

Thank you very much!


Posted by
Elliot Murphy
27 April 2008 @ 4am

Thanks very much for this.


Posted by
zsafwan
27 April 2008 @ 5am

Thank You

I just updated VMware fusion to 1.1.2
do I need to reinstall the tools again and is there newer tools file?.

Regards,


Posted by
Chris
27 April 2008 @ 11am

I followed this and it seemed to install ok but the config fails part way through with a messahe “the kernel defined by this directory of header files does not have the same address space size as your running kernel”

… it then asks me for the location of the directory of C header files that match my running kernel

I tried pointing it at /usr/src/linux-headers-2.6.24-16/include but no joy


Posted by
Peter Cooper
27 April 2008 @ 1pm

Chris: Are you running the 64 bit version of Ubuntu, perhaps? Or some non i386 architecture?


Posted by
Les
27 April 2008 @ 2pm

How did you manage to keep the scrolling function of the Mighty Mouse?

Mine is gone, has been since Gutsy. Main reason I don’t seem to use Ubuntu on the mac much anymore.

Thanks for the direction. Works. VMware tools install fine. But no scroll button use.


Posted by
tung
28 April 2008 @ 7am

This method also works with VMware Server
Thanks! ^_^


Posted by
johngnub
28 April 2008 @ 4pm

Nice script, well done steps.


Posted by
Even
28 April 2008 @ 5pm

Thank you, worked like a charm on Ubuntu 8.04 64-bit inside VMware Fusion.


Posted by
ErrieR
28 April 2008 @ 6pm

Wow, this howto works really well! Thumbs up!


Posted by
blackAngel
28 April 2008 @ 6pm

How did you guys get it to work? i can’t find the right location of the kernels source files, it always says it’s not the kernel directory, or the directory seem to be a kernel’s source directory, but the linux/version.h is missing


Posted by
Peter Cooper
28 April 2008 @ 8pm

blackAngel: The headers should all be installed and configured properly with a stock install of Ubuntu 8.04 desktop. I don’t know about the server version though..

In any case, this should fix the issue:

sudo apt-get install linux-headers-`uname -r`

If it complains about a lack of compiler, etc:

sudo apt-get install build-essential


Posted by
Brad Weaver
28 April 2008 @ 9pm

This works great for me as well! Thanks so much. I couldn’t believe how quickly I was able to get a complete desktop with Office products up and running and connected to all our network shares and even our shared printers. Great job Ubuntu!


Posted by
Israel Diaz
29 April 2008 @ 12am

Hi there, thanks a lot, it works for me as well with edubuntu.

One think I woud like to comment it out:
If you are UPGRADING from 7.10 to 8.04 “UNINSTALL VMWARE TOOLS after upgrade and follow above procedure” :D


Posted by
Tom
29 April 2008 @ 4am

This worked perfectly with VMware Workstation 6.0.3 under Vista with Ubuntu 8.04 as the guest. Thanks!


Posted by
David Jensen
29 April 2008 @ 7am

As of 4/27/2008, if you download the 8.04 desktop from VMWare, the version of VMWare Tools is old. In this case you’ll need to modify how you follow the above steps.

After you download everything but before extract the tarballs, take a snapshot (in case something messes up) and then run the vmware uninstall script: vmware-uninstall-tools.pl

Then follow the remaining instructions and it works great.


Posted by
David Jensen
29 April 2008 @ 7am

A quick suggestion, since you are moderating your comments anyway, let your comments get a little back for giving a little. How? Don’t make links “nofollow,” spread some of the page rank to your contributors. Cheers!

(feel free to moderate away this message, thanks)


Posted by
John Smith
29 April 2008 @ 8am

I followed the instructions, however while compiling the openvm tools I get this error:

Making all in lib
make[1]: Entering directory `/home/nick/Desktop/open-vm-tools-2008.04.14-87182/lib’
Making all in auth
make[2]: Entering directory `/home/nick/Desktop/open-vm-tools-2008.04.14-87182/lib/auth’
gcc -DPACKAGE_NAME=\”open-vm-tools\” -DPACKAGE_TARNAME=\”open-vm-tools\” -DPACKAGE_VERSION=\”2008.04.14-87182\” -DPACKAGE_STRING=\”open-vm-tools\ 2008.04.14-87182\” -DPACKAGE_BUGREPORT=\”open-vm-tools-devel@lists.sourceforge.net\” -DPACKAGE=\”open-vm-tools\” -DVERSION=\”2008.04.14-87182\” -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_DLFCN_H=1 -DHAVE_ECVT=1 -DHAVE_FCVT=1 -DDNET_IS_DUMBNET=1 -DHAVE_CRYPT_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_WCHAR_H=1 -DHAVE_SYS_IO_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_SYSINFO_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_USER_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_UNWIND_H=1 -DHAVE__BOOL=1 -DHAVE_STDBOOL_H=1 -DHAVE_STRUCT_STAT_ST_RDEV=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_LSEEK=1 -I. -Wall -Werror -Wno-pointer-sign -Wno-unused-value -fno-strict-aliasing -Wno-unknown-pragmas -Wno-uninitialized -DVMX86_TOOLS -I/home/nick/Desktop/open-vm-tools-2008.04.14-87182/lib/include -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE -D_XOPEN_SOURCE=500 -D_BSD_SOURCE -D_SVID_SOURCE -DGLIBC_VERSION_22 -DUSING_AUTOCONF=1 -MT authPosix.o -MD -MP -MF .deps/authPosix.Tpo -c -o authPosix.o authPosix.c
authPosix.c:323: fatal error: opening dependency file .deps/authPosix.Tpo: Permission denied
compilation terminated.
make[2]: *** [authPosix.o] Error 1
make[2]: Leaving directory `/home/nick/Desktop/open-vm-tools-2008.04.14-87182/lib/auth’
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/nick/Desktop/open-vm-tools-2008.04.14-87182/lib’
make: *** [all-recursive] Error 1

Any hints?


Posted by
Peter Cooper
29 April 2008 @ 11am

John Smith: I see “fatal error: opening dependency file .deps/authPosix.Tpo: Permission denied”

Are you using sudo (that is, running as root)?


Posted by
Andre Somerhausen
29 April 2008 @ 1pm

It works as well with VMWare ESX 3.5 Tools on Ubuntu 8.04 Server :)

Thanks,
Andre


Posted by
cozmo
29 April 2008 @ 1pm

Thanx a lot, saved my day @work and works like a charm :-)


Posted by
Peter Cooper
29 April 2008 @ 4pm

David Jensen: Moderating comments “away”? I don’t think I’ve deleted any here, and moderating comments is the standard nowadays (necessary because of spam). The nofollows are, I guess, also quite standard, at least with this WordPress template. I might remove that though since, as you say, I am already moderating the comments, but I wasn’t even aware it was on in the first place.


Posted by
chen
29 April 2008 @ 4pm

god !! someone help to fix this:
chen@chen-laptop:~/open-vm-tools-2008.04.14-87182$ ./configure && make
./configure: 53: cannot create conf17969.sh: Permission denied
./configure: 53: cannot create conf17969.sh: Permission denied
chmod: cannot access `conf17969.sh’: No such file or directory
./configure: line 44: conf17969.sh: Permission denied
./configure: line 45: conf17969.sh: Permission denied
chmod: cannot access `conf17969.sh’: No such file or directory
mkdir: cannot create directory `conf17969.dir’: Permission denied
./configure: line 499: conf17969.file: Permission denied
./configure: line 1627: config.log: Permission denied
./configure: line 1637: config.log: Permission denied

run several times but still happen.


Posted by
Peter Cooper
29 April 2008 @ 4pm

chen: Try sudo ./configure && sudo make


Posted by
guille
29 April 2008 @ 5pm

sweet! thank you very much, works like a charm for ubuntu 8.04 64-bit desktop


Posted by
shawn
30 April 2008 @ 2am

thank you soooo much, i havent tried this yet but i downgraded to 7.10 and even then had to scour the internet trying to get THAT to work. this will really help me


Posted by
shawn
30 April 2008 @ 2am

hopefully this works for host too, but that is less likely


Posted by
Luis
30 April 2008 @ 10am

Thanks so much guys (including the original posters in the praise). It worked with vmware server 1.0.3 too.

by the way, i had to change one line slightly:

mv -f open-vm-tools-2008.04.14-87182/modules/linux/*.tar vmware-tools-distrib/lib/modules/source/

to

mv -f open-vm-tools-2008.04.14-87182/modules-only/linux/*.tar vmware-tools-distrib/lib/modules/source/


Posted by
Reader
30 April 2008 @ 11am

Hi,

vmware 5.5.6 using XP Prof 32 Bit host and ubuntu 8.04 32 Bit as guest.
With your howto everything compiles fine and I get no errors at all during the vmware-tool installation process, but I am unable to drag and drop files from host to guest and vice-versa. There comes no error, you just get the special mouse-cursor which tells you that you cannot drop the dragged object here.

How can I track down the problem?
Which kernel modules must be loaded?

Thank you!

Reader


Posted by
mickkael
30 April 2008 @ 1pm

Works perfectly on JeOS Hardy, Vmware ESX 3.5 Update 1
thanks !


Posted by
Robert
30 April 2008 @ 10pm

Great stuff. However, I wonder if there are also working X drivers available? I still have laggy windows etc. because the vmware-tools installer doesn’t recognize the X version correctly. Any hints?


Posted by
Petteri Hietavirta
1 May 2008 @ 7pm

Thanks for the guide. I updated my Ubuntu from 7 to 8.04 with automatic updater and VMware Tools were not working afterwards. I run that on VMPlayer and I managed to get all the VMware Tools features working again.


Posted by
Deepak
2 May 2008 @ 1pm

Thanks, that worked like a charm on ESX 3.5 with update 1 applied. I upgraded my Ubuntu 6.06 LTS to 8.04 and had this vmware tools problem, your instructions showed how to fix it.


Posted by
udo heinold
2 May 2008 @ 4pm

thanks a lot. works fine for me!


[…] Ubuntu Hardy 8.04 installieren Mai 2, 2008 — heinold Vielen Dank Peter Cooper Ihr Blogeintrag hat mir sehr […]


Posted by
Amos
2 May 2008 @ 5pm

Many thanks for posting such an explicit guide!


Posted by
Me or You :-)
2 May 2008 @ 5pm

The step of building the open-vm-tools is not necessary. Just pack the sources for each module together as described and run the intaller of VMWareTOols.


Posted by
Amos
2 May 2008 @ 5pm

Oh… And in case people haven’t seen it, this knowledge base article is about Ubuntu 64-bit SMP guest OSes stalling and how to fix it.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004384


Posted by
dixon1e
3 May 2008 @ 5am

I’m just a little confused. Got everything done except…when I run the vmware-install.pl, at the end it wants to run vmware-config-tools.pl.

However, this last script says “I can’t find a vmware tool for your kernel, shall I build one?

What is the right answer here?


Posted by
dixon1e
3 May 2008 @ 5am

I retract previous, and provide many, many kudos to Peter for explaining this. I just needed the one more step and all is well. Amazing.


Posted by
mhc2001
3 May 2008 @ 9am

Many thanks! Works great - Workstation 6.02 Windows.


Leave a Comment

Liberation Mono - Ultimate Coding / Source Code Font How To Enable Mouse Wheel Scrolling in Ubuntu Hardy on VMware Fusion