On Mon, Nov 18, 2013 at 03:03:18AM +0100, Zbigniew Jędrzejewski-Szmek wrote: > v0lZy reported on IRC that his qemu machines get killed when shutting > down the host. libvirt-guests.service is designed to suspend them > during shutdown, but when it was run, the guests were all already dead. > > And indeed, each qemu is running inside a scope, which is not > connected by any dependencies to either systemd-machine.service, or > libvirt-guests.service. libvirt-guests.service does not depend on > systemd-machine.service either. This means that when shutdown is > ordered, the scopes will stopped in parallel to other > libvirt-guests.service, and depending on timing, qemus will be just > killed with SIGTERM. > > For this whole thing to work correctly, we need to ensure that > scopes are not terminated prematurely. If we introduced a target > like libvirt-ready.target, and made libvirt-guests.service be > After=libvirt-ready.target, and made all the scopes be > Before=libvirt-ready.target, I think the vms would have a chance > to shutdown properly. But that's pretty complicated. > And I'm not even sure how to do that properly. Any better > ideas?
I don't have an answer for you, but just want to ask that you file a bug against libvirt for this problem. This is an unintended regression in libvirt functionality with the switch to systemd scopes. http://libvirt.org/bugs.html Regards, Daniel -- |: http://berrange.com -o- http://www.flickr.com/photos/dberrange/ :| |: http://libvirt.org -o- http://virt-manager.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: http://entangle-photo.org -o- http://live.gnome.org/gtk-vnc :| _______________________________________________ systemd-devel mailing list systemd-devel@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/systemd-devel