Updating VM tools without rebooting

Whenever the ESX hosts in a cluster are upgraded, a newer version of VMware Tools becomes available which should be applied to each VM in the cluster. The Tools are updated drivers and services that enable the VM OS to run more efficiently in a virtualized environment. A normal “automatic” tools upgrade via the vCenter client will cause the VM to reboot when the tools upgrade is finished. If this is OK, then go for it. Otherwise, use this process to suppress the reboot and let things take effect during the next scheduled reboot.

Note: most things to take effect after the update, such as newer services, and drivers that can be safely unloaded/loaded without requiring a reboot.

Note: the NIC driver may be updated causing a brief drop in traffic.

To upgrade the VMware Tools on a Windows guest without rebooting, use this bit of PowerShell code with the vSphere PowerCLI.

First run this to set things up (connects to the specific vCenter server using your current Windows credentials and sets the installation parameters to pass to the installer):

Connect-VIServer
$insParm = '/S /v"/qn REBOOT=ReallySuppress"'

Then run this for each VM, changing with the name of the VM to update tools on, without rebooting:

$vmView = Get-VM | Get-View; $vmView.UpgradeTools_Task($insParm)

Example:

$vmView = Get-VM Babyruth | Get-View; $vmView.UpgradeTools_Task($insParm)

A task will start in vCenter and the tools should be updated on the VM. It takes about 2-3 minutes. If it seems to be taking longer than that to complete, check the VM console to make sure no errors have popped up that require attention, and also check if setup.exe and one or more msiexec.exe processes are running.

The task should finish successfully and the VMware Tools Status for the VM should change to “OK”

There is plenty of discussion online about various ways to accomplish this (“How to install VMware tools without a reboot?“), but what I described above is what works for me. It is definitely possible to write a PowerShell script to traverse through a folder or cluster and upgrade Tools on all the VMs contained within, but I prefer to take it one at a time so the process doesn’t get out of hand. Tools upgardes are generally painless but sometimes there are issues.