Update VMware Tools without reboot

Using the vSphere Client

Probably the most known, and easiest method, to update VMware Tools is via the vSphere Client. It?s simple and straightforward.

  1. Right click on a VM in the vSphere Client
  2. Choose Guest
  3. Choose Install/Upgrade VMware Tools


You will be prompted to choose how you would like the upgrade to take place, either Interactively or Automatically. Along with the Automatic option comes the ability to enter some arguments, listed as ?advanced options? in the GUI, that will be passed to the install.

vmtools2 Also, the official VMware documentation seems to ignore any recommended values for the advanced options box. A former colleague of mine asked what to put in the box, so I did some digging with procmon to see exactly what the advanced options box does.

Behold! The string that I have found to work is as follows:

/s /v/qn ADDLOCAL=ALL REBOOT=ReallySuppress

I?ve tested this on ESXi 4.1 and ESXi 5.0 with the same results ? the VM is updated without a reboot. I will caution that you shouldn?t fully take my word for it, as perhaps some newer or older version of tools will not respond to this exact phrasing as planned. Test it out first to make sure it will go as planned. I won?t take responsibility;)


Using a PowerCLI Script

The second method is a little more difficult, but not by much. It requires that you have installed PowerCLI onto your workstation or server.

You can read the documentation on the cmdlet here, or you can see some further examples on VMware?s KB site or on ICT-FREAK?s page of PowerCLI one-liners, but the basic code is:

Get-VM "Name Of VM" | Update-Tools -NoReboot

You can get as fancy as you want with the Get-VM portion by using the –Location argument. In this example, I?ve nested 3 Get cmdlets to specify a datacenter, cluster, and folder to search. The script will update every VM it finds in that location.

Get-VM -Location (Get-Datacenter Foo | Get-Cluster Bar | Get-Folder Blah) | Update-Tools -NoReboot -RunAsync

Note that in this case I?ve added the -RunAsync argument to avoid having to wait for each VM?s tools to start updating. Also, it?s important to know that the Update-Tools command does not accept -WhatIf or -Confirm.

The first one-liner will return all Powered on VM?s with Windows selected as guest OS and perform a VMware Tools upgrade without a reboot at the end.

Get-VM | Where {$_.PowerState -eq "PoweredOn" -and $_.Guest.OSFullName -match "Win*"} | % {Update-Tools -VM $_ -NoReboot}