VMware Cloud Community
jbloom1
Contributor
Contributor
Jump to solution

Automate Guest OS Power Off Reset to Green

We currently use Veeam to backup a few vm's that need to be powered down prior to being backed up. I have a simple script it runs before and after the backup to power the VM down then power it back up after the backup is complete.  However, I for the life of me cannot figure out how to script it to "reset to green" without having to log into vcetner and manually do that via the gui. Below is my start script I'd like to add in at the end of it something to reset the status back to green.  Has anyone had any experience with this?

 

Connect-VIServer -Server ************** -User ************** -Password **************
Get-VM ************** | Start-VM

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Then whoever defined that Alarm didn't add a condition when it can go back to green.


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

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

"Reset to green" what? An Alarm that was fired?


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

0 Kudos
jbloom1
Contributor
Contributor
Jump to solution

2021-07-07_11-15-51.png

0 Kudos
LucD
Leadership
Leadership
Jump to solution

We had this question before, there is no public API method available to reset a single Alarm to green.
See PowerCLI Command to reset vSphere alarms to green - VMware Technology Network VMTN

But is that Alarm not cleared automatically after the VM is powered on again?


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

0 Kudos
jbloom1
Contributor
Contributor
Jump to solution

No it is not cleared after the vm is powered back on.  

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Then whoever defined that Alarm didn't add a condition when it can go back to green.


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

0 Kudos
jbloom1
Contributor
Contributor
Jump to solution

Simple solution edit the alarm to reset when powered back on. 

0 Kudos