In most cases VMware Tools are available as part of the ESXi installation. When updating or upgrading vSphere on 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 installed using your preferred deploy method.
Methods of updating the Tools
GuestStore method
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.
vLCM method
Check out Al Rasheed his post “Updating VMware Tools in vSphere 8” on how to update the VMware Tools package on ESXi hosts using vLCM.
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.
Background
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.
ProductLocker
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:
- Config.HostAgent.plugins.vmsvc.productLockerWatchInterval
- UserVars.ProductLockerLocation
If newer Tools are found, the all too common message ‘Upgrade available‘ is shown in vCenter.
ToolsRamdisk
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:
- UserVars/ToolsRamdisk
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 12.0.6.20104755-20491463 VMware
Preparations
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 root@x.x.x.x:/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_12.1.5.20735119-20735876 Name: tools-light Version: 12.1.5.20735119-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_12.1.5.20735119-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.
To conclude
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 for your favorite vSphere version directly when they arrive.
Useful links
VIB method
vSphere KB2129825 – Installing and upgrading the latest version of VMware Tools on existing hosts
vSphere KB83782 – ToolsRamdisk option is not available with ESXi 7.0.x releases
GuestStore method
VMware Tools Documentation – Use GuestStore
vSphere Core blog – vSphere’s Internal CDN System – VMware Tools Guest Store
4 SysOps blog – vSphere GuestStore: Deploy VMware Tools, config files, and agents to VMs
0 Comments