How to use the latest VMware Tools with older vSphere versions

With vSphere 5.0 VMware made an important change regarding the compatibility and supportability of the VMware Tools: The Tools that come with vSphere 5.0 (and newer releases) can also be used with earlier vSphere releases (down to vSphere 4.0). For e.g. the latest VMware Tools of ESXi 5.1 the VMware Product Interoperability Matrix shows the following:

VMware Tools of ESXi 5.1 interoperability
There are at least two good reasons why you would want to use the latest VMware Tools with earlier vSphere releases:
  • If you plan to later update your vSphere environment to a newer release then you will already have the newer and compatible VMware Tools in place, and you save the effort of updating them again.
  • For some guest OSs (Windows Vista and newer) the VMware Tools of vSphere 5.1 can be updated without a reboot. This should work for recent Windows versions (starting with Vista) and also when running the Tools 5.1 on earlier releases of ESX(i)!

Great! But the big question now is:

How do you update the VMware Tools without updating vSphere/ESXi?

The key to the answer is in KB2004018: VMware Tools for hosts provisioned with Auto Deploy. It describes a method for setting up a shared VMware Tools repository for multiple hosts (instead of installing the Tools on each of the hosts). This is primarily meant for hosts that are provisioned through Auto Deploy: When using Auto Deploy the hosts use PXE boot to load the complete ESXi system via the network from a  boot server. Leaving out the VMware Tools from this boot process saves a lot of network traffic and significantly reduces the time to boot.

However, a shared VMware Tools repository can be configured and used independently from Auto Deploy! In the following I will outline the required steps:

1. Extract the VMware Tools files from the latest ESXi 5.1 patch bundle

Download the latest ESXi 5.1 patch bundles from the VMware Patch download portal. As of now this is ESXi510-201212001.zip. Open the zip file in 7-zip and navigate into the included directory vib20\tools-light:
tools-light VIBs included in a ESXi 5.x patch bundle
Here you will find exactly one or two versions of the tools-light VIB file. If there are two versions (like in this example) that means that one of them (the one with the lower build number) only includes the latest security fixes and the other one (with the higher build number) includes both security and bug fixes.

Double click on the one with the higher build number (914609 in this example), then open the included tools file and further drill down until you finally find the directory structure that you need for the VMware Tools shared repository:

VMware Tools repository included in a ESXi 5.x patch bundle
Now create a new empty directory (I will call it vmware-tools in our example) on your hard disk and extract all three directories shown here into this directory.

2. Upload the VMware Tools files to a shared datastore

In your vSphere environment choose a datastore that is accessible to all hosts. I recommend utilizing an NFS datastore for this, because it does not have any of the sharing and file locking limits of VMFS (on FC or iSCSI). An NFS datastore can be safely shared among all hosts of all clusters or even multiple vSphere datacenters.

Upload the directory that you created in step 1 to this datastore using the vSphere Client's datastore browser:

VMware Tools upload
The directory structure on the datastore should finally look like this:

VMware Tools Shared Repository on a datastore
This is now your VMware Tools Shared Repository.

3. Configure your hosts to use the shared VMware Tools repository

To configure your hosts to use the shared VMware Tools repository you need to change the advanced configuration setting UserVars.ProductLockerLocation. There are many ways to do this. The easiest and most obvious way is via the vSphere Client in the Host Configuration / Advanced Settings menu:

Configure the ESXi ProductLockerLocation
If you are using Host Profiles to configure your hosts you should just add this setting there. Finally, in KB1038578 you can learn about ways to automate and industrialize this change through PowerCLI or esxcli.

The default value for this variable is /locker/packages/<ESXi-Version> (ESXi-Version = 5.1.0, 5.0.0, 4.1.0 or 4.0.0). Change it to the shared datastore directory that you created in step 2. In our example this would be /vmfs/volumes/FalconStor01/vmware-tools (with FalconStor01 being the name of the datastore).

Just changing this option won't have an immediate effect. In the root of the ESXi system directories there is a symbolic link named /productLocker that is created at boot time and points to the shared directory. You can either reboot each host to re-create this link with the new value, re-create it manually in an ESXi shell with commands like

  rm /productLocker
  ln -s /vmfs/volumes/FalconStor01/vmware-tools /productLocker

or manually call the commands that are used by the system at boot time to (re-)create the links. For ESXi 4.1 this is

  /sbin/configLocker

and for ESXi 5.x it is

  jumpstart --plugin=libconfigure-locker.so


Now, how does this work?

Once you have completed these steps ESXi will connect the ISO files from the new location to a VM whenever you choose the Install/Upgrade VMware Tools option from its console's menu. This also applies to other and more automated methods to deploy VMware Tools like Update Manager or PowerCLI (see KB2004754 for details).

I personally think that using a shared repository is a great way to handle the VMware Tools deployment, even if you do not want to stay on an earlier vSphere release while using the latest available Tools. If you ever want to update the Tools later then you just need to repeat steps 1 and 2, and you have the job done for all your hosts at once without touching any of them!


4 comments:

  1. THANK YOU! This is exactly the information I needed.

    ReplyDelete
  2. WOW fantastic write up! For some reason my /locker/packages/5.1.0 folder was missing, which was causing vmtools installs to fail. This ended up being a perfect workaround. Thank you so much!

    ReplyDelete
  3. VMWare has its own rpm repository for Linux based vms here:
    http://packages.vmware.com/tools/esx/index.html
    So you can have latest tools without fiddling with the tools from the esxi install.

    ReplyDelete
  4. Just installed VMware tools version 10 on a shared Datastore and followed the instructions to point all my Hypervisors to the share and it works great. I am now able to upgrade all my Virtual Machines. Thanks

    ReplyDelete

***** All comments will be moderated! *****
- Please post only comments or questions that are related to this post's contents!
- Advertising and link spamming will not be tolerated!