Is it possible through some hook or callback mechanism for my script or executable running on the host to learn that libvirt is about to or very recently has sent a command for a guest to shut itself down?
I'm not trying to catch the case that the guest has decided to shut down on its own--I'm trying to catch the case that libvirt has decided to ask a guest to shut itself down.
I'm trying to do this so that my script or executable can automatically send a shutdown command "on the side" via SSH to a couple macOS guests that don't respond to ACPI commands and can't run the libvirt guest agent.
I've found script hook and API callback mechanisms that will inform me after guests have shut down, but can't figure out a trick to be informed of an attempt to shut a guest down.
I'm running libvirt under Slackware, but an answer regarding any host platform might be of value. Thanks!