Options for installing VMware Tools into Linux VMs

There are two versions of VMware Tools – the full commercial package shipped with VMware products, and an open source version based on development snapshots of the commercial packages, called the Open VM Tools. The latter are not supported by VMware, but are available in some distributions’ default repositories (e.g. Ubuntu and OpenSuSE) as the ‘open-vm-tools’ package.

However, VMware also provide the commercial VMTools as Operating System Specific Packages (OSPs) – which are packaged versions (.deb or .rpm) of the commercial VMware Tools. These are fully supported and can be installed using standard Linux package management systems (e.g. apt or yum).

The OSPs and the Open VM Tools are named similarly and therefore fairly easily confused with each other. However, mostly because they are unsupported development snapshots, we do not recommend installing the Open VM Tools.

To install the commercial VMware Tools, there are three options:

  • Install from vCenter
  • Upload and install from a .tgz or .iso
  • Install from the VMware Operating System Specific Packages (OSP) repositories

The last of these integrates with the guest’s package management system and so may be preferable for some Linux administrators.

Installing VMware Tools from vCenter

Follow the instructions at http://www.oucs.ox.ac.uk/sis/cloud/using/installVMTools.xml (only covers Debian-based systems but should be easy enough to extrapolate for others). This is the standard (and recommended) approach. However, note that this is not an option on Debian 7.0 systems with kernel version 3.2.35-2 (the latest as at the time of writing) – there appears to be a bug in this version of the kernel that causes a VM to lock whenever a virtual CD drive is mounted. So for Debian 7 the next option is favourite.

Installing from a compressed tarball / ISO

The VMware Tools are stored on ESXi servers as an ISO file, which is generally presented via the vSphere client or vCD portal to the VM as a virtual CD. However there is nothing to stop you downloading the ISO from the ESXi host and extracting the compressed tarball from it. Each ESXi host stores its VMware Tools ISOs in the /usr/lib/vmware/isoimages directory. The file required is linux.iso.

Another option is to upload the ISO to your VM and mount it via the loopback device:

mount -o loop -t iso9660 /tmp/linux.iso /mnt

For ESXi 5.0 Update 2, the compressed tarball is file VMwareTools-8.6.10-913593.tar.gz

Once uploaded and mounted, follow the instructions at http://www.oucs.ox.ac.uk/sis/cloud/using/installVMTools.xml to install.

Installing from the OSP repository

RHEL / CentOS / Scientific Linux

1. Obtain and import the VMware Packaging Public GPG key:

wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

2. Import the key:

rpm --import VMWARE-PACKAGING-GPG-RSA-KEY.pub

3. Add the repository by creating the file /etc/yum.repos.d/vmware-tools.repo and adding the following:

[vmware-tools]
name=VMware Tools for CentOS (or OEL) $releasever - $basearch
baseurl=http://packages.vmware.com/tools/esx/5.0u2/rhel6/x86_64
enabled=1
gpgcheck=1
gpgkey=file:///srv/crypto/VMWARE-PACKAGING-GPG-RSA-KEY.pub

Edit the gpgkey line for wherever you stored the public key. Edit the baseurl line for appropriate version of ESXi, distribution and architecture.

4. Install the VMware Tools

yum install vmware-tools-esx

or, for no graphical support:

yum install vmware-tools-esx-nox

Ubuntu

1. Obtain and import the VMware Packaging Public GPG key:

wget http://packages.vmware.com/tools/keys/VMWARE-PACKAGING-GPG-RSA-KEY.pub

2. Import the key:

apt-key add VMWARE-PACKAGING-GPG-RSA-KEY.pub

3. Add the repository by editing the file /etc/apt/sources.lst and adding the following:

deb http://packages.vmware.com/tools/esx/5.0u2/ubuntu precise main

Make sure you customise this line for your distribution – this example is for Ubuntu 12.04 LTS (Precise Pangolin).

4. Refresh the local cache and then install kernel modules

apt-get update
apt-get install vmware-tools-esx-kmods-kernel_release

kernel_release will be one of “generic“, “server“, “virtual” or “generic-pae” based on your kernel type. Check which by runningĀ uname -r.

5. Install remaining components

apt-get install vmware-tools-esx

or, for no graphical support:

apt-get install vmware-tools-esx-nox

Debian

There are no OSPs for Debian. While in theory you could use the Ubuntu repositories, the safest option is to use one of the previous methods – install from vCenter or install from a .tgz/ISO. Follow the instructions at http://www.oucs.ox.ac.uk/sis/cloud/using/installVMTools.xml as described previously.

Posted in Uncategorized | 2 Comments

2 Responses to “Options for installing VMware Tools into Linux VMs”

  1. Andrew Haith says:

    N.B. for ubuntu 14 ‘trusty tahr’, the suggested apt-get method will not work.

    Installing open-vm-tools as described here will work however.
    http://partnerweb.vmware.com/GOSIG/Ubuntu_14_04.html

Leave a Reply