As you upgrade your vSphere hosts we generally recommend that you also upgrade VMware Tools in your virtual machines. This can get tricky to manage, especially if you have hosts at different versions of ESXi. To help mitigate this we allow you to store the files on a centralised repository and point the hosts to the relevant location: a walkthrough of this feature is located here.

The updateProductLockerPolicy tool which was introduced in vSphere 6.5 Update 1 has been deprecated in vSphere 6.7 Update 1. It has been replaced by a new vSphere API named updateProductLockerLocation, which allows this setting to be applied without requiring that the hosts be placed into maintenance mode or rebooted. This blog post explains how to use this API in order to setup a centralised repository for VMware Tools.

Why use a central repository for VMware Tools?

But first: I always like to start with the why. The latest build of VMware Tools is always available from https://www.vmware.com/go/tools. VMware Tools releases have been decoupled from vSphere release since version 10.0 – you can now standardise on a single release of VMware Tools by configuring a centralised repository. This also allows you to deploy the image of ESXi without VMware Tools integrated. Doing this saves disk space on ESXi hosts and speeds the deployment process.

How to configure the central repository

So that’s the why: now onto the how. First: create a new location to hold the VMware Tools images – in this example I’m creating a new directory on my vSAN Datastore at /vmfs/volumes/vsanDatastore/vmtools .

Next, download the latest VMware Tools bundle from https://www.vmware.com/go/tools and extract it into the newly provisioned location – we need both the “vmtools” and “floppies” directories from the bundle. Make a note of the path that you use to access this location, you’ll need this later!

Once you have extracted the VMware Tools files to the folder in question you need to update the ProductLocker pointer for each host: at present this is done through the Managed Object Browser on your vCenter Server Appliance, which is accessed at https://VCSA_FQDN/mob – be sure to login! When logged in you can browse the MOB by clicking the hyperlinks – follow the path Content > rootFolder > childEntity > hostFolder > host and click through to the host that you wish to update.

At the host level there are 2 API calls possible.

As you might expect, QueryProductLockerLocation shows the current location of the ProductLocker on the host.

This is a directory on a VMFS volume which happens to be local to the host in question. Update this to point it to the new, shared location which you noted earlier. To do this we invoke the UpdateProductLockerLocation_Task method, specifying the path to the new location.

Call the QueryProductLockerLocation method in order to confirm that the change completed successfully.

The output confirms that the ProductLocker location has successfully moved to the new directory on the vSAN datastore. All hosts configured in this manner point to the same installers for guests when upgrading VMware Tools. When you need to push out a new version of VMware Tools you change the files in only one location.