Hi,
the script /usr/lib/libvirt/libvirt-guests.sh is used to shut down or
suspend domains when the host goes down. This works like a charm.
However, currently, KVM has the issue that the host going to _sleep_
sometimes affects the running domains: It sometimes happens that the
domains become unresponsive CPU-hogs. I think that it might help to
suspend the KVM domains before the host sleeps. systemd provides a
mechanism to do that by means of /lib/systemd/system-sleep/.
/usr/lib/libvirt/libvirt-guests.sh contains most of the code needed to
suspend all running domains, but it doesn't expose those mechanisms to
the public.
Please consider adding a "suspend" and a "resume" option to
/usr/lib/libvirt/libvirt-guests.sh that applies the respective
operation to all domains even if the selected shutdown operation is
"shutdown".
I am willing to provide a patch if you indicate that you would accept
it.
Thanks for your consideration.
Greetings
Marc