The following how-to is from this VMware KB — http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1010048
Before you begin
Before you perform the steps in this article, ensure that you have applied these prerequisite patches:
Note: Ensure to choose the patch for the product you are running.
- VMware ESX 3.5 Patch ESX350-200811401-SG
- VMware ESXi 3.5 Patch ESXe350-200811401-T-BG
The steps in this article require these components:
- Windows PowerShell 1.0. This version of Windows PowerShell is installed as Microsoft KB926139-v2.
For more information, see http://www.microsoft.com/windowsserver2003/technologies/management/powershell/default.mspx.
Note: The preceding link was correct as of July 23, 2008. If you find the link is broken, please provide feedback and a VMware employee will update the link. -
VI Toolkit. For more information, see http://vmware.com/download/download.do?downloadGroup=VI-WT-15.
Note: VMware recommends that you install NET 2.0 SP1 to avoid slow operations.
Setting all virtual machines to automatically upgrade VMware Tools
To use VI Toolkit and PowerShell to set all virtual machines to automatically upgrade VMware Tools:
- Start VI Toolkit from Start > Programs > VMware > VMware VI Toolkit > VMware VI Toolkit.
- Connect to the VirtualCenter Server with the command: connect-viserver -server <VirtualCenter Server IP address> -user <VirtualCenter User> -password <VirtualCenter password>
- Copy the following command into the Windows VI Toolkit window:
Foreach ($v in (get-vm)) {
$vm = $v | Get-View
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.Tools = New-Object VMware.Vim.ToolsConfigInfo
$vmConfigSpec.Tools.ToolsUpgradePolicy = “UpgradeAtPowerCycle”
$vm.ReconfigVM($vmConfigSpec)
}
The VI Toolkit window does not display any output until the command has completed for each virtual machine. When the command is done running, a reconfigure task displays in VirtualCenter for every virtual machine.
Note: To disable this setting, follow steps 1 and 2, then copy this command into the VI Toolkit window:
Foreach ($v in (get-vm)) {
$vm = $v | Get-View
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.Tools = New-Object VMware.Vim.ToolsConfigInfo
$vmConfigSpec.Tools.ToolsUpgradePolicy = “manual”
$vm.ReconfigVM($vmConfigSpec)
}
$vm = $v | Get-View
$vmConfigSpec = New-Object VMware.Vim.VirtualMachineConfigSpec
$vmConfigSpec.Tools = New-Object VMware.Vim.ToolsConfigInfo
$vmConfigSpec.Tools.ToolsUpgradePolicy = “manual”
$vm.ReconfigVM($vmConfigSpec)
}
Pingback: Upgrade VMtools on reboot on all VMS « Intervirt's Blog
Pingback: links for 2010-01-05 | benway.net
Pingback: links for 2010-01-05 | Savage Nomads
This saved me a lot of time!
Thanks…
Xanderphillips