In most cases VMware Tools are available as part of ESXi installation. When updating an ESXi host, the VMware Tools could be updated, but most of the time not to the latest version. In this post I’ll show you how ESXi hosts can updated to the latest available version, when they contain critical bug or security fixes.
This post is not about getting VMware Tools up-to-date within your VM’s . The scope is to install the latest Tools version on your ESXi hosts so they can be made installed using your preferred deploy method.
Methods of updating the Tools
GuestStore is one of the newer methods of distributing and updating VMware Tools at scale in your environment amongst other features. From the documentation:
The GuestStore feature provides a simple and flexible mechanism to distribute VMware specific or custom content from a GuestStore repository to multiple guests simultaneously.
GuestStore is a feature of vSphere 7 U2 and VMware Tools v11.2.5 and later. It was initially released for Windows. As of vSphere 7 U3 and open-vm-tools v11.3.0 it’s available for Linux also.
VIB (manual) method
The more classic (manual) VIB method of updating Tools on an ESXi host relates to my previous post about: Manually updating ESXi Hosts. For readability I separated them. Basically updating the Tools on your hosts not different from updating a VIB.
By default the VMware Tools is a part of the ESXi install. Depending on the Image Profile selected, that can differ. As part of updating or upgrading a host, the Tools could be updated. Often ESXi updates contain an older Tools version because of their different release cycle compared to vSphere.
By default the Tools on a ESXi host can be found in ‘/locker/packages/vmtoolsRepo/‘ which is called the ‘ProductLocker‘ location. The host checks the locker location every 300 seconds for newer packages and compares that to the running Tools version in the VM’s. The settings are controlled by the advanced ESXi parameters:
If newer Tools are found, the all too common message ‘Upgrade available‘ is shown in vCenter.
In recent ESXi version the Tools can be loaded into Ramdisk to reduce SD card wearing. This can be controlled via the advanced ESXi parameter:
When set to “1”, the Tools are loaded into Ramdisk (after a reboot) to reduce the wear on SD card or USB stick boot media. When enabled this can lead to an issue that the Ramdisk is not refreshed when newer Tools are installed. When that happens VM’s don’t see the newer Tools.
Perform these actions to fix:
[root@host:~]rm -rf /tools/* [root@host:~]cp -r /locker/packages/vmtoolsRepo/* /tools/
Within 5 minutes the VM’s running on the host should pick up the newer Tools version and show that in the vCenter UI.
Updating Tools on ESXi
VMware Tools can be independently installed from ESXi patches. The Tools VIB can be found on the vSphere download page on the VMware Customer Connect site (requires a Customer Connect login)
Check current Tools version
[root@host:~] esxcli software vib list | grep tools Name Version Vendor Acceptance Level Install Date ----------------------------- ------------------------------------- ------ tools-light 220.127.116.1104755-20491463 VMware
When you have determined that an update is needed, get started by uploading the Tools offline depot in zip format to the datastore of the host(s) to be updated. In this example “VMware-Tools-12.1.5-core-offline-depot-ESXi-all-20735119.zip”.
scp VMware-Tools-12.1.5-core-offline-depot-ESXi-all-20735119.zip firstname.lastname@example.org:/vmfs/volumes/<datastore>
Hosts do not need to be put in maintenance mode. Updating Tools works fine with running VM’s and HA enabled. You can check however if a certain VIB or Image Profiles requires a reboot or maintenance mode.
[root@host:~] esxcli software sources vib get --depot=file:///vmfs/volumes/<datastore>/VMware-Tools-12.1.5-core -offline-depot-ESXi-all-20735119.zip VMware_locker_tools-light_18.104.22.16835119-20735876 Name: tools-light Version: 22.214.171.12435119-20735876 Type: locker Vendor: VMware Acceptance Level: VMwareCertified Summary: VMware Tools VIB for Windows and Linux guests (generated by vmtoolspkg build 20735876) Description: This package contains cdrom and floppy images used to install the VMware Tools inside virtual machines. ReferenceURLs: Creation Date: 2022-11-03 Depends: esx-version >= 6.6.0 Conflicts: Replaces: Provides: Maintenance Mode Required: False Hardware Platforms Required: Live Install Allowed: True Live Remove Allowed: True Stateless Ready: True Overlay: False Tags: Payloads: tools
Updating the Tools
Now it’s checked that a reboot or maintenance mode is not needed, the Tools VIB can be installed:
[root@host:~] esxcli software vib install --depot=file:///vmfs/volumes/<datastore>/VMware-Tools-12.1.5-core-off line-depot-ESXi-all-20735119.zip Installation Result Message: Operation finished successfully. Reboot Required: false VIBs Installed: VMware_locker_tools-light_126.96.36.19935119-20735876 VIBs Removed: VIBs Skipped:
That’s it. All that remain is updating the Tools on the VM’s. The Tools on Linux are often ‘open-vm-tools‘ based are are distributed and updated via the distro tools. Commonly only older Linux VM’s and Windows VM’s would use the Tools provided by ESXi. Of course installing Tools on Windows can be done via everyone’s favorite method of distributing patches and differs from company to company.
When newer VMware Tools versions are released that have critical bug or security fixes, you may not want to wait for the next ESXi patch release but want them sooner than later. This way you can update the VMware Tools directly when they arrive.