Distinguishing between host and guest initiated VM shutdown
Daniel P. Berrange
dan at berrange.com
Thu Aug 27 07:43:49 UTC 2020
On Wed, Aug 26, 2020 at 10:35:22PM +0200, Milan Zamazal wrote:
> Hi,
>
> we have a problem in oVirt that highly available VMs don't restart after
> host poweroff because Vdsm identifies the case as a user initiated
> shutdown (https://bugzilla.redhat.com/1800966).
>
> When poweroff is run on the host, libvirt-guests service takes an
> action.
If oVirt is initiating a graceful host shutdown, then surely it already
knows what VMs it has running on the host at that time, and so has enough
info to restart them later.
> `virsh shutdown' is run on the VM, the guest OS is shut down
> cleanly and libvirt reports a shutdown event with
> VIR_DOMAIN_EVENT_SHUTDOWN_GUEST detail. Although it is a host initiated
> shutdown actually.
>
> Does libvirt provide any means to distinguish this case from a regular
> user shutdown?
A "virsh shutdown" merely triggers a request to the guest OS to start
a guest initiated shutdown. As such it is indistinguishable from an
administrator initiating the same thing inside the guest.
Regards,
Daniel
--
|: https://berrange.com -o- https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org -o- https://fstop138.berrange.com :|
|: https://entangle-photo.org -o- https://www.instagram.com/dberrange :|
More information about the libvirt-users
mailing list