-
1. Re: vmware tools upgrade_powercli
LucD Mar 4, 2019 3:40 AM (in response to jvm2016)You can schedule the VMware Tools upgrade at the next restart of the VM.
$do = New-Object -TypeName VMware.Vim.VirtualMachineConfigSpec$do.Tools = New-Object VMware.Vim.ToolsConfigInfo
$do.Tools.ToolsUpgradePolicy = "UpgradeAtPowerCycle"
Get-VM |
ForEach-Object -Process {
$_.ExtensionData.ReconfigVM_Task($do)
}
-
2. Re: vmware tools upgrade_powercli
jvm2016 Mar 4, 2019 4:15 AM (in response to LucD)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 .
-
3. Re: vmware tools upgrade_powercli
LucD Mar 4, 2019 4:48 AM (in response to jvm2016)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.
-
4. Re: vmware tools upgrade_powercli
jvm2016 Mar 4, 2019 5:16 AM (in response to LucD)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 .
-
5. Re: vmware tools upgrade_powercli
LucD Mar 4, 2019 5:21 AM (in response to jvm2016)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.
-
6. Re: vmware tools upgrade_powercli
jvm2016 Mar 4, 2019 5:40 AM (in response to LucD)thnaks iam going to run yur code .just think if we could have incorporated whatif switch .
-
7. Re: vmware tools upgrade_powercli
LucD Mar 4, 2019 5:42 AM (in response to jvm2016)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. -
-
9. Re: vmware tools upgrade_powercli
jvm2016 Apr 18, 2019 10:55 PM (in response to LucD)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