Hi Luc,
can you suggest the easisest way of upgrading vmware tools on multiple machine through powercli.
most of machines are on esxi6.5 .
You can schedule the VMware Tools upgrade at the next restart of the VM.
$do.Tools = New-Object VMware.Vim.ToolsConfigInfo
$do.Tools.ToolsUpgradePolicy = "UpgradeAtPowerCycle"
Get-VM |
ForEach-Object -Process {
$_.ExtensionData.ReconfigVM_Task($do)
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
You can schedule the VMware Tools upgrade at the next restart of the VM.
$do.Tools = New-Object VMware.Vim.ToolsConfigInfo
$do.Tools.ToolsUpgradePolicy = "UpgradeAtPowerCycle"
Get-VM |
ForEach-Object -Process {
$_.ExtensionData.ReconfigVM_Task($do)
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
this is something when vmwaretools are provided by esxi image .is that correct?
is there any change in process or requirment why we will go for downloading .iso for vmware tools from vmware.com .
The ISO files containing the VMware Tools installation files, for different types of guest OS, live on the ESXi nodes (in folder /vmimages/tools-isoimages).
You can download newer versions of the ISO from the VMware download site, and then copy the file to the ESXi folder.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc.
However iam not tempted to download vmware tools from vmware.com and want to use whatever live on the ESXi nodes (in folder /vmimages/tools-isoimages).
i think that should be the best option .
once i run your code it will be displayed as current in webclient but actual upgrade will hapen when we next reboot .
I think you should only upgrade the ISO files in rare exceptions.
These ISO files are often updated when you patch your ESXi nodes.
That way you are also sure they correspond with the ESXi version and build.Web Client it will still show Update needed, but
No, afaik the status will only show "current" when the upgrade actually took place.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
thnaks iam going to run yur code .just think if we could have incorporated whatif switch .
What would that WhatIf switch need to do?
We are calling an API method, not a cmdlet I'm afraid.
That is also why Update-Tools does not have a WhatIf switch.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
ok .
Hi Luc ,
i tested your code on one of the vms.
$vms="vm1"
$do = New-Object -TypeName VMware.Vim.VirtualMachineConfigSpec
$do.Tools = New-Object VMware.Vim.ToolsConfigInfo
$do.Tools.ToolsUpgradePolicy = "UpgradeAtPowerCycle"
Get-VM $vms |
ForEach-Object -Process {
$_.ExtensionData.ReconfigVM_Task($do)
}
after that i run
Restart-VMGuest -VM $vms
it worked fine however there was messageon console to reboot system for upgrade to take place .i belive that came from restart-vmguest command not from the reconfiguration task