If you are doing a hardware update from the GUI you have the option to select to upgrade on reboot. What this is doing is looking for a reboot to exectute and then instead it powers it down, upgrades, and powers it up. Is there a way to tie into this so I can use this process for something else. Basically I want it to monitor for a reboot, then power off, run my custom instance, then power back on. This way I can tie an update to a scheduled reboot for patches.
And when the alarm is triggered, you could run a script of your own.
When running a VCSA vs a vCenter on Windows, it is more complicated to run scripts on the firing of an alarm (although not impossible)
You'll be competing with the power off for the HW upgrade. And I have no clue, nor tested, if this in the end doesn't cause 2 power off/power on actions. The alternative is that your script would also handle the HW upgrade.