55

Configuring a VMware Tools Repository in vSphere 6.7U1

 5 years ago
source link: https://www.tuicool.com/articles/hit/qiY3Efj
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

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: this process is explained onKB2129825. A walkthrough of this feature is also locatedhere.

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 .

rE7FVzA.jpg!web

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!

MZNj6ru.jpg!web

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.

36JjqiI.jpg!web

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

7zae6nI.jpg!web

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.

quaeQb2.jpg!web

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

jInYfeY.jpg!web

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.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK