[ovirt-users] Emergency shutdown script

Doug Ingham dougti at gmail.com
Tue Apr 24 01:06:28 UTC 2018


I've plugged this into our monitoring.

When the UPS' are at 50%, it puts the general cluster into global
maintenance & then triggers a shutdown action on all of the VMs in the
cluster's service group via the monitoring agent (you could use an SNMP
trap if you use agentless monitoring). Once all of the VMs are down, it
then continues with the hosts.

At 20%, it does the same with our "core" cluster.

This method means that the HE can be shutdown, and it works whether the HE
is up or not.

For emergencies when the monitoring is offline, I've also hacked up a bash
script which parses the output of vdsClient & uses a loop to send a
shutdown signal to all of the VMs on each host.

Doug

On Mon, 23 Apr 2018, 14:14 Simon Vincent, <sv at srvincent.co.uk> wrote:

> Does anyone have a way of shutting down oVirt automatically in the case of
> a power outage?
>
> Ideally I would like a script that can be automatically run when the UPS
> reaches a certain level. I had a look at the python SDK but I could only
> find functions for shutting down VMs and not hosts. Also I suspect this
> wont let me shutdown the hosted engine VM.
>
> Any ideas?
>
> Regards
> _______________________________________________
> Users mailing list
> Users at ovirt.org
> http://lists.ovirt.org/mailman/listinfo/users
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ovirt.org/pipermail/users/attachments/20180424/414e2064/attachment.html>


More information about the Users mailing list