Distinguishing between host and guest initiated VM shutdown

Milan Zamazal mzamazal at redhat.com
Thu Aug 27 08:22:31 UTC 2020


Daniel P. Berrangé <berrange at redhat.com> writes:

> On Thu, Aug 27, 2020 at 10:06:25AM +0200, Milan Zamazal wrote:
>> "Daniel P. Berrange" <dan at berrange.com> writes:
>> 
>
>> > 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, 
>> 
>> I meant host shutdown not initiated by oVirt.
>
> Well oVirt still knows at any point in time what VMs are currently
> running on a host, so if it sees the host shutdown, it already
> knows that needs restarting.

libvirt-guests ensures graceful shutdown of the VMs (which is a good
thing) so at the moment when the host gets down, there are no VMs
running there.  We need that info at the moment when a VM is shut down
and I think we can get it by examining some systemd service (if ignoring
some not so important timing issues).

Regards,
Milan





More information about the libvirt-users mailing list