VMware tools for Ubuntu made simple
November 27th, 2008
Yes, there are thousands of pages about VMware tools and Ubuntu as guest OS… well, but nobody ever wrote what do you do if the tools do not have precompiled modules for your kernel and want to distribute your pre-compiled VMware tools to many VMs!
Nah, I don’t really want to recompile the tools on every machine!
We should all know the typical way of installing the tools on Ubuntu:
mount /media/cdrom
cd /tmp
tar -zxf /media/cdrom/VMware-x.x.tar.gz
cd vmware-tools-distrib
sudo ./vmware-install.pl
Now, if you have the latest tools you’ll probably manage to install them under Ubuntu 8.04 without compiling a single line of code.
What happens with a newer kernel? Well you get asked if you want to compile the module and where is the GCC compiler… and all that stuff.
Ok, suppose you’ll have to do this on a lot of VMs and suppose you can’t install the build-essential, what do you do?
Ok,
- first do a
uname -rand write down the version of the target kernel - second, go to one Ubuntu machine with the build-essential installed, or run
sudo apt-get install build-essential - Now retreive the kernel headers for the target kernel version (even if that’s not what is installed on the compiling machine) with
sudo apt-get install linux-headers-`uname -r`
Remember to change the `uname -r` with the target VM kernel version.
For example I upgraded my 7.10 servers to 8.04 and got 2.6.24-21-server - now go to vmware-tools-distrib/lib/modules/source and untar each of the tar files
- run in each directory a
make VM_UNAME=x.y.z-twhere x.y.z-t is the target kernel version (make VM_UNAME=2.6.24-21-serverin my case) - after compiling all the modules, you’ll get the .o files in the vmware-tools-distrib/lib/modules/source directory, make a subfolder under vmware-tools-distrib/lib/modules/binary with name bld-
(I used bld-2.6.24-21-server-Ubuntu8.04.1) and a subfolder of that bld- called objects, then copy the .o files in there - create a new file properties under vmware-tools-distrib/lib/modules/binary/bld-custom and copy the contents from another one in a different folder. It looks like:
UtsRelease 2.6.24-21-server
UtsVersion #1 SMP Wed Jun 18 14:43:41 UTC 2008
UtsMachine i386
ModVersion yes
SMP yes
PageOffset C0000000
Comment Ubuntu8.04, 2.6.24-21, i386, server
Remember to change the values according to your kernel version!
- re-tar the vmware-tools-distrib tree (you may clean the /lib/source folder if you like)
- copy the tar to your target machine or make an NFS/SMB share
- untar in the target VM(s) and run the sudo ./vmware-install.pl command: it should install the modules without asking for a compiler
- Repeat the above step for all the VM(s)
Well, one final note: please make sure you have the latest VMware tools, before compiling all that stuff: I read in the VMware forums that someone found a bug in the older versions (I’m currently using VMwareTools-6.5.0-118166.tar.gz and found no probs under Ubuntu 8.04)
So… have a very happy VMing!
Related posts
Related External Links
Rating
My Dream Laptop?
November 3rd, 2008
On wepc.com, Asus is trying to get the best out of the ideas of it’s customers (and non customers).
I then came up with my ideal Transformers Laptop, which is pretty nice (well, don’t look at the drawing!
) for a all-purpose laptop.
3 parts, 3 CPUs, multiple uses:
- detachable multimedia LCD
- home server harddrive
- main book (works without the other pieces), fully featured when needed
Well, go there and spit your idea!

(No Ratings Yet)
