[libvirt] Executing gdb/gcore as an on_crash action

Sergio Lopez slp at redhat.com
Thu Dec 21 10:22:48 UTC 2017


Hi,

Right now, the actions coredump-[destroy|restart] for on_crash work in
a similar way as "virsh dump", requesting a dump of Guest's memory
contents to QEMU.

I think it'd be nice to have the ability for executing gdb/gcore to
produce a full core dump of QEMU. This would be especially useful for
debugging hard/soft lockups on the Guest.

Of course, this should be implemented in a completely optional way,
checking if the gdb binary is present, to avoid creating a direct
dependency between libvirt and gdb.

I'm willing to work on a patch implementing this feature myself, but
first I'd like to know if this sounds good to you. Also, if it does,
do you think the behavior of coredump-[destroy|restart] should be
changed to use gdb if available, falling back to qemuDomainCoreDump if
it isn't, or just implement another action for on_crash?

-- 
Sergio




More information about the libvir-list mailing list