How to Install VMware Tools on Ubuntu Server 8.10

While installing VMware Tools (3.5.0-123630) on an ESX virtual machine running Ubuntu Server 8.10 (kernel 2.6.27 x64), I ran into a wall trying to compile the vmmemctl and vmhgfs kernel modules. The vmware-config-tools.pl script would throw errors at me when running make:

CC [M] /tmp/vmware-config0/vmmemctl-only/os.o
/tmp/vmware-config0/vmmemctl-only/os.c: In function ‘os_init’:
/tmp/vmware-config0/vmmemctl-only/os.c:590: error: ‘struct proc_dir_entry’ has no member named ‘get_info’
make[1]: *** [module/tmp/vmware-config0/vmmemctl-only] Error 2
Unable to build the vmmemctl module.

I finally got it working using alternative module sources. Here’s how:

Getting it working

  1. In e.g. VMware Infrastructure Client, right-click the virtual machine and select “Install VMware Tools”, then extract the VMware tools installation package inside the VM:
    mkdir ~/vmtools
    cd ~/vmtools
    sudo mount /media/cdrom
    tar xfz /media/cdrom/VMwareTools-*.tar.gz

  2. Now, grab the latest version of Open Virtual Machine Tools, extract it, and copy over its working kernel module sources. Note that the wget command below may not point to the latest version.
    wget http://dfn.dl.sourceforge.net/sourceforge/open-vm-tools/open-vm-tools-2009.03.18-154848.tar.gz
    tar xfz open-vm-tools-*.tar.gz
    cd open-vm-tools-*/modules/linux
    for i in *; do mv ${i} ${i}-only; tar -cf ${i}.tar ${i}-only; done
    mv -f *.tar ~/vmtools/vmware-tools-distrib/lib/modules/source/
    

  3. Finally, grab some dependencies needed for the compilation, and then run the VMware tools installer as you normally would:
    sudo apt-get install build-essential linux-headers-`uname -r`
    cd ~/vmtools/vmware-tools-distrib
    sudo ./vmware-install.pl

The installation should now finish without any problems! When you’re done, you can go ahead and do rm -rf ~/vmtools, or keep the files for deployment on other machines.