Install vSphere 5 VMware Tools on Ubuntu 12.04/Fedora

When trying to install VMware Tools from ESXi 5.0 on Ubuntu 12.04 64 bit, I ran into the below compilation errors even though I had build-essential and kernel headers installed.

make[1]: Entering directory `/usr/src/linux-headers-3.2.0-33-generic'
  CC [M]  /tmp/vmware-root/modules/vsock-only/linux/af_vsock.o
/tmp/vmware-root/modules/vsock-only/linux/af_vsock.c:105:28: fatal error: linux/smp_lock.h: No such file or directory
compilation terminated.
make[2]: *** [/tmp/vmware-root/modules/vsock-only/linux/af_vsock.o] Error 1
make[1]: *** [_module_/tmp/vmware-root/modules/vsock-only] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.2.0-33-generic'
make: *** [vsock.ko] Error 2
make: Leaving directory `/tmp/vmware-root/modules/vsock-only'

The VM communication interface socket family is used in conjunction with the VM communication interface to provide a new communication path among guests and host.  The rest of this software provided by VMware Tools is designed to work independently of this feature.  If you wish to have the VSOCK 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 the Enter key to continue.]

If I continued, two or three of the other modules failed as well with similar errors. Normally I wouldn’t be too concerned if some of the components didn’t build correctly, as the VM was working just fine. But for the particular VM I was building, I wanted to make sure I had all the appropriate drivers functioning correctly. I came across this post with someone experiencing the same issue with a Fedora VM: http://communities.vmware.com/message/2063817. The third post has a link to patched files that resolved the multiple Tools compilation issues. I’ve mirrored the patch here in case it is taken down or archived from the VMware forum.

Here is the process to follow to incorporate the patch and successfully install VMwareTools-8.6.0-425873 on Ubuntu 12.04/Fedora.

  1. Make sure you have build-essential and linux-headers-`uname -r` installed.
  2. Initiate the Tools installer from the ESXi console as normal.
  3. In the VM, mount the CDROM and copy the tar file to /tmp
    sudo mount /dev/cdrom /mnt
    cp /mnt/VMwareTools-8.6.0-425873.tar.gz /tmp; cd /tmp
  4. Extract the archive.
    tar zxf VMwareTools-8.6.0-425873.tar.gz
  5. Change to the source directory, download the patch and extract it.
    cd vmware-tools-distrib/lib/modules/source/
    wget https://www.makethenmakeinstall.com/wp-content/uploads/2012/11/patched-esxi-vmware-tools-8.4.0-425873.tgz
    tar zxf patched-esxi-vmware-tools-8.4.0-425873.tgz
  6. Change back to the root of the tools installer directory and install the tools as normal. You will not receive any errors when the tools are configured.
    cd /tmp/vmware-tools-distrib/; sudo ./vmware-install.pl
  7. Then reboot and you’re done.

Thanks cache51 on the VMware Community Forums for the patch!

References

ESXi 5 + VM with Fedora 16 + VMWare tools – VMware Community Forums

2 thoughts on “Install vSphere 5 VMware Tools on Ubuntu 12.04/Fedora”

Leave a Reply

Your email address will not be published. Required fields are marked *