[libvirt] Making panic great again

Ed Swierk eswierk at skyportsystems.com
Fri Apr 28 18:23:11 UTC 2017


On Thu, Apr 27, 2017 at 11:43 PM, Martin Kletzander <mkletzan at redhat.com> wrote:
> I'm trying to understand the situation.  So you have a guest that
> handles crashes itself (like kdump, let's say), but on_crash options are
> not enough for you:
>
>  - preserve is bad because the guest is not available until someone
>    restarts it
>
>  - restart is bad because it doesn't keep the dump anywhere?
>
>  - coredump-restart is bad because it doesn't keep the internal dump?
>
>
> I have no usage for this, currently, so I'm not the right one to discuss
> this, but I feel like you want the guest-handled crash to be uploaded or
> saved somewhere and then have libvirt just restart it.  Or configure the
> guest not to handle crashes and set on_crash to coredump-restart.
>
> If none of those is working for you and you really need a special case,
> it is doable with a short script atop of libvirt.

Windows all the way back to XP has handled crashes itself by writing a
dump file to disk. This is not a complete coredump but a special
format that can be read by a variety of tools to extract useful
information for diagnosing the crash. A libvirt-generated coredump
would be much less useful for experienced Windows admins.

After writing the dump file, Windows can automatically reboot itself.
This has been the default behavior since at least Windows Server 2003
and Vista, and experienced Windows admins rely on it.

For Windows guests, all I want libvirt to do when it receives a panic
notification from QEMU is resume the guest, so it can write the dump
file and reboot itself automatically. None of the on_crash actions
allow this.

And as a failsafe for guests not configured to automatically reboot
(Windows or otherwise), it would be nice if libvirt had an on_crash
action that resumes the guest immediately, and reboots the guest after
some configurable timeout if the guest doesn't reboot itself first.
I'd settle for implementing this more complicated policy in a script,
but libvirt would at least need to remember the time of the crash and
expose that through its API.

--Ed




More information about the libvir-list mailing list