HewlettPackard / POSH-HPEOneView

PowerShell language bindings library for HPE OneView.
http://hewlettpackard.github.io/POSH-HPEOneView/
126 stars 52 forks source link

OneView - Firemware Upgrade Completion Check #571

Closed amitchettri closed 3 years ago

amitchettri commented 3 years ago

Hello Team,

Hope you all are doing good!

This is in regards with the Firmware Upgrade through OneView using iSUT. We are stuck in the last stage where in, we trigger the firmware upgrade and not able to fetch/monitor the completion status through PowerShell.

We tried using Get-OVServerProfileMessage but we got a message which states that this module is obsolete and instead we can use the Get-OVTask.

Your guidance would be much appreciated, if we know how to make use of any of the module to keep monitoring the firmware upgrade completion status and show a progress bar for the same

ChrisLynchHPE commented 3 years ago

Online firmware updates is not performed via a task, as that operation can be completely asyncronous. You need to monitor alerts for the profile. For instance, the following would get you a list of alerts for a profile that you had applied, but firmware installation was Online with Smart Update Tools and the server was powered off (or SUT wasn't in a running state):

$prf1 = Get-OVProfile -Name MyProfile1

Get-OVAlert -InputObject $prf1 -HealthCategory Firmware

Severity Resource Created                  Modified                 State  AssignedToUser Description
-------- -------- -------                  --------                 -----  -------------- -----------
Warning  prf1     Tue 06 Jul 2021 19:50:10 Tue 06 Jul 2021 19:50:11 Active                A new firmware baseline has …
Warning  prf1     Tue 06 Jul 2021 19:50:09 Tue 06 Jul 2021 19:50:09 Locked                A new firmware baseline has …