Besides the use of VMware ESXi installer and VMware vSphere Update Manager (VUM) or VMware vSphere Lifecycle Manager (vLCM) to manage the version of VMware Tools ISO image bundle available on VMware ESXi hosts, VMware Tools ISO images files can be installed and updated manually.
For more information about upgrading VMware Tools using Update Manager on vSphere 6.7, see Upgrade VMware Tools for Virtual Machines
For more information about upgrading VMware Tools using vSphere Lifecycle Manager on vSphere 7.0, see Upgrade the VMware Tools Version of Virtual Machines
This article provides:
This article also helps in resolving the errors or issues:
VMware vSphere ESXi 7.0.x
VMware vSphere ESXi 6.0
VMware vSphere ESXi 6.5
VMware vSphere ESXi 6.7
The following approaches are supported to install and upgrade to the latest version of VMware Tools independently of the VMware ESXi version.
The VMware ESXi installer, VUM, and vLCM always install VMware Tools ISO image files in the default /locker partition location (/locker/packages/vmtoolsRepo) and are not covered by this article.
It is not recommended to manually update the content of the default VMware Tools ISO image files repository found in the /locker partition (/locker/packages/vmtoolsRepo). Doing so will conflict with the VMware ESXi installer, VUM, and vCLM operations managing the content.
Note:
The ProductLocker location (/productLocker symbolic link) is controlled by the UserVars.ProductLockerLocation setting. The setting can be found on the ESXi Host’s Web UI: host -> manage -> Advanced Settings, or on VMware vCenter Web UI: Host -> Configure -> Advanced System Settings; then search for UserVars.ProductLockerLocation. If not set, the /productLocker symbolic link normally points to /locker/packages/vmtoolsRepo, and VMware Tools ISO image files from that location are in use for VMware Tools installation and upgrade. The /productLocker symbolic link can point to /tools when the ramdisk cache is in use.
Issue:
After installing or updating the VMware Tools repository on the VMware ESXi hosts, the VMware Tools version status of the existing virtual machines does not indicate a new version of VMware Tools is available for install or upgrade.
Note:
The interval at which the VMware Tools repository is monitored for updates is controlled by the Config.HostAgent.plugins.vmsvc.productLockerWatchInterval (in seconds). The settings defaults to 300s; and is accessible through the Web UI’s host “Advanced Settings” (VMware ESXi) or “Advanced System Setting” (VMware vCenter) lists.
If the issue persists past the VMware Tools monitoring interval, this might be due to the VMware ESXi host caching the VMware Tools repository in a RAM disk (/tools ramdisk)
# ls -l /productLocker
# rm -rf /tools/*
# cp -r /locker/packages/vmtoolsRepo/* /tools/
When using a datastore path, ProductLocker should be configured before powering on VMs on the host. Installing or upgrading VMware Tools might fail for VMs powered on before configuring ProductLocker. For more information, see Installing or upgrading VMware Tools might fail for VMs powered on before configuring ProductLocker (2147383).
# mkdir /vmfs/volumes/<datastore-name-or-volume-id>/<vmtools-repository-name>
# chmod 700 /vmfs/volumes/<datastore-name-or-volume-id>/<vmtools-repository-name>
This datastore location is assumed to be present and configured as above later.
Find the current ProductLocker location:
From ESXi shell:
# ls -l /productLocker
# readlink /productLocker
The output of the 2nd command is the absolute path to the current VMware Tools ISO image repository. The 1st command is there for diagnosis and can be of use later.
vmtools/isoimages_manifest.txt
vmtools/isoimages_manifest.txt.sig
vmtools/windows.iso
vmtools/windows.iso.sha
vmtools/windows.iso.sig
vmtools/windows_avr_manifest.txt
vmtools/windows_avr_manifest.txt.sig
floppies/pvscsi-Windows8.flp
floppies/pvscsi-Windows2008.flp
floppies/pvscsi-WindowsVista.flp
If you want to provide VMware Tools for legacy Linux guest operating systems as well, additionally take the following files from the (latest) VMware-Tools-core zip and put them into the "vmtools" folder.
vmtools/linux.iso
vmtools/linux.iso.sha
vmtools/linux.iso.sig
vmtools/linux_avr_manifest.txt
vmtools/linux_avr_manifest.txt.sig
# chmod -R 700 /vmfs/volumes/<datastore-name-or-volume-id>/vmtools-repository-name>/*
Note: All steps hereon (step 5 and following) are for first time setup of the vmtools repository on a shared datastore or when the location of the vmtools repository changes.
Note: Using this approach is not recommended for ESXi hosts that are provisioned using Auto Deploy. For more information on configuring host profile for hosts provisioned with Auto Deploy, see VMware Tools for hosts provisioned with Auto Deploy (2004018).
vSphere 6.7 Update 1 or later
In vSphere 6.7 Update 1, updateProductLockerPolicy tool has been deprecated by the updateProductLockerLocation vSphere API, for more information, see UpdateProductLocker in Configuring a VMware Tools Repository in vSphere 6.7U1
Example:
Invoking updateProductLockerLocation vSphere API with /vmfs/volumes/<datastore-name-or-volume-id>/vmtools-repository-name> as the argument, updates the /productLocker symlink
To invoke the API, you can use the vCenter Managed Object Browser. You can access the MOB at https://vcenter_fqdn/mob (replace vcenter_fqdn with actual FQDN or IP of your vCenter Server). Login with the [email protected] account, then browse to [content > rootFolder > childEntity > hostFolder]. Follow the path under childEntity until you arrive at the host.
Alternatively you can open the API directly using the Host ID. For this, select the host in vSphere Client. The URL will include the ID as shown in the picture below:
Use this ID to open the following URL:
https://vcenter_fqdn/mob/?moid=<ID>&method=updateProductLockerLocation
In the example this would be:
https://vcenter_fqdn/mob/?moid=host-18022&method=updateProductLockerLocation
Paste the path to the new directory in "Path", then click on "Invoke Method" to apply the setting:
vSphere 6.5 Update 1 or later
For the hosts running ESXi 6.5 Update 1 or later, either use maintenance mode as described above for ESXi 6.5 or use a new tool 'updateProductLockerPolicy'.
# secpolicytools -d | grep $(basename $(readlink /productLocker)) | cut -d' ' -f2 | head -n1
# updateProductLockerPolicy <old-symlink-target-retrieved-from-step1> /vmfs/volumes/<volumeName>/<extracted directory>
# rm /productLocker
# ln -s /vmfs/volumes/<volumeName>/<extracted directory> /productLocker
# mv /usr/lib/vmware/isoimages.tmp /usr/lib/vmware/isoimages
vSphere 6.5 pre-Update 1
For the hosts running ESXi 6.5 or later but with patches earlier than ESXi 6.5 Update 1, maintenance mode is required to avoid failure of VMs due to the host security policy restricting VMs from suddenly accessing the new /productLocker symlink.
# esxcli system maintenanceMode set --enable true
# rm /productLocker
# ln -s /vmfs/volumes/<volumeName>/<extracted directory> /productLocker
# esxcli system maintenanceMode set --enable false
vSphere 6.0, 5.x, 4.x
For the hosts running ESXi versions earlier than 6.5, remove the existing symlink and create new one.
# rm /productLocker
# ln -s /vmfs/volumes/<volumeName>/<extracted directory> /productLocker
After performing the preceding operations, the ESXi host is ready for installation or upgrade of VMware Tools in the virtual machines. In vSphere Web client, right click on the running Virtual Machine object and choose Install or Upgrade VMware Tools option. To install or upgrade VMware Tools, see Installing and upgrading VMware Tools in vSphere
Note:
Currently running VMs on the host will need to be vMotion’d to a different host and back, or shutdown (reset will not work) and powered on again for the updated VMware Tools repository to be accessible.
Following VMware ESXi host reboot, the entry for the productLocker in the VMware ESXi security policies will be updated to the new path. This update can fail if the datastore becomes accessible later than expected in the VMware ESXi host boot process. As a result, VMs security policies do not have the updated productLocker location and the VMware Tools repository is not accessible to the running VMs.
To detect the issue, Inspect the security policies:
# secpolicytools -d | grep $(basename $(readlink /productLocker)) | cut -d' ' -f2 | head -n1
-r <absolute-path-to-vmtoolsRepo-on-datastore> r
If not, you are experiencing this issue.
The workaround here is to reload the security policies:
# secpolicytools -p
Note: The datastore being slow to become accessible during VMware ESXi host reboot should be investigated, it could be linked to a storage or other resource issues in the environment.