VMware Cloud Community
jesse_cohen
Enthusiast
Enthusiast

power off / on on reboot

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.
0 Kudos
1 Reply
LucD
Leadership
Leadership

Afaik you can't piggy-back on that mechanism.

But you could create an alarm for the VMware.Vim.VmGuestRebootEvent event.

And when the alarm is triggered, you could run a script of your own.

But

  1. 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)
  2. 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.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos