[libvirt] on shutdown

Hi all, virsh(1) has this to say about virsh shutdown: "The exact behavior of a domain when it shuts down is set by the on_shutdown parameter in the domain's XML definition." on_shutdown isn't documented in https://libvirt.org/formatdomain.html Is the virsh(1) manpage wrong? Kind regards, Ruben Kerkhof

On Thu, Oct 20, 2016 at 11:26:09AM +0200, Ruben Kerkhof wrote:
Hi all,
virsh(1) has this to say about virsh shutdown: "The exact behavior of a domain when it shuts down is set by the on_shutdown parameter in the domain's XML definition."
on_shutdown isn't documented in https://libvirt.org/formatdomain.html
Is the virsh(1) manpage wrong?
Yes, it most certainly is. The element is called <on_poweroff/> [1] Patches welcome O:-) Martin [1] https://libvirt.org/formatdomain.html#elementsEvents
Kind regards,
Ruben Kerkhof
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Thu, Oct 20, 2016 at 7:53 PM, Martin Kletzander <mkletzan@redhat.com> wrote:
On Thu, Oct 20, 2016 at 11:26:09AM +0200, Ruben Kerkhof wrote:
Hi all,
virsh(1) has this to say about virsh shutdown: "The exact behavior of a domain when it shuts down is set by the on_shutdown parameter in the domain's XML definition."
on_shutdown isn't documented in https://libvirt.org/formatdomain.html
Is the virsh(1) manpage wrong?
Yes, it most certainly is. The element is called <on_poweroff/> [1]
Thanks for your reply Martin. Interestingly, I checked some of my xml, and they had <on_shutdown/> in there next to <on_poweroff/> These vms have been running for years and I might have even migrated them from Xen's xm configs to libvirt / kvm at one point. virsh dumpxml confirms that this element is just ignored, so no harm done.
Patches welcome O:-)
Will do :)
Martin
Kind regards, Ruben

On Wed, Oct 26, 2016 at 04:40:12PM +0200, Ruben Kerkhof wrote:
On Thu, Oct 20, 2016 at 7:53 PM, Martin Kletzander <mkletzan@redhat.com> wrote:
On Thu, Oct 20, 2016 at 11:26:09AM +0200, Ruben Kerkhof wrote:
Hi all,
virsh(1) has this to say about virsh shutdown: "The exact behavior of a domain when it shuts down is set by the on_shutdown parameter in the domain's XML definition."
on_shutdown isn't documented in https://libvirt.org/formatdomain.html
Is the virsh(1) manpage wrong?
Yes, it most certainly is. The element is called <on_poweroff/> [1]
Thanks for your reply Martin. Interestingly, I checked some of my xml, and they had <on_shutdown/> in there next to <on_poweroff/> These vms have been running for years and I might have even migrated them from Xen's xm configs to libvirt / kvm at one point.
virsh dumpxml confirms that this element is just ignored, so no harm done.
Or have you possibly edited the on-disk saved state of libvirt some time back instead of using virsh edit? =)
Patches welcome O:-)
Will do :)
Great!
Martin
Kind regards,
Ruben
-- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list

On Wed, Oct 26, 2016 at 5:04 PM, Martin Kletzander <mkletzan@redhat.com> wrote:
Or have you possibly edited the on-disk saved state of libvirt some time back instead of using virsh edit? =)
That could have been it, but no, we have this all automated and never touch the on-disk xml after a domain has been defined. My git logs show that I've added <on_shutdown/> somewhere in 2010, and indeed, it seems to be a leftover from our migration from Xen's xmdomain.cfg. Then I found https://bugzilla.redhat.com/651710 and it turns out it never had any effect for Xen either :) Kind regards, Ruben
participants (2)
-
Martin Kletzander
-
Ruben Kerkhof