Automation

 View Only
  • 1.  How to get info about vmTools upgrading process

    Posted Oct 20, 2023 01:14 PM

    Dear all,

    I have problems getting information using powercli automation objects (Get-VM) to see if the VM is doing a tools-upgrade or if it finished. The values in (Get-VM "theVM").ExtensionData.Guest.ToolsVersionStatus2 or ToolsStatus or ToolsRunningStatus give no information about it. One can see "guestToolsNeedUpgrade", or "guestToolsSupportedOld" or "guestToolsRunning", but no information about the upgrading process. In preparation of mass migration with upgrading vmTools I need info whether the script has to defer a VM till the upgrade is complete.

    The vcsa-GUI shows there is an upgrade in progress, but I did not find anything using powercli automation.

    Can you help me with that please?

    Thanks in advance.

    bye



  • 2.  RE: How to get info about vmTools upgrading process

    Posted Oct 20, 2023 01:43 PM

    Use the Get-Task cmdlet to verify if the Task is running.
    Then use Get-VIEvent to retrieve the corresponding TaskEvent to check whether the installation was completed successfully.

    You might also look at (Get-VM "theVM").ExtensionData.Config.Tools.LastInstallInfo



  • 3.  RE: How to get info about vmTools upgrading process

    Posted Oct 23, 2023 07:44 AM

    hi,

     

    thanks, but the task is started by the option to upgrade vmTools on boot of the VM. I found no Task or Event in the GUI for this upgrade process. So I expect get-Task to fail since I have no task-id and I tried Get-VIEvent of one VM which definetly did an vmTools-Upgrade, but tells nothing about it.

    Let me go into detail. During a Migration process, the script enables vmUpgrade at boot on each VM (as one of some more options). After this the machine is powered down, migrated (computing ressources) and switched on again due to CPU-vendor change. Next step is storage vMotion. But Storage Migration is not possible when vmTools are currently upgrading. So the question here is how to find out if vmTools upgrade is in progress or not. Till now I have found nothing using PowerCLI.

    (Get-VM "theVM").ExtensionData.Config.Tools.LastInstallInfo contains a counter? Will this change, when an upgrade is in progress to a string like "upgrading"?

    Thanks



  • 4.  RE: How to get info about vmTools upgrading process

    Posted Oct 23, 2023 09:14 AM

    I find it hard to believe that there is no TaskEvent for the upgrade.
    Can you check with a snippet like I posted in Re: get-vievent - VMware Technology Network VMTN



  • 5.  RE: How to get info about vmTools upgrading process

    Posted Nov 14, 2023 08:01 AM

    Hi,

    sorry for late response. Indeed I checked the output before you suggested to do so. I guess that is a kind of scheduled task by vcsa but not query-able by powercli. The vcsa scheduled tasks are empty at this time.

    I solved it by creating the task and then getting its result (success or fail), when failed I get the error message and this gives me the hint, that vmWare Upgrade is in progress.

    I really found nothing to get info about running upgrade by automated initiation during reboot. So I would recommend vmWare to add this info es enum type in any property of vmWare-Status-Tools. Till then, this post may be closed unsolved.

    Thanks.

    bye