Description of problem: In order to debug reasons why a node must be fenced in a cluster (or any situation where a domain needs to be killed immediately), it would be beneficial to dump a core of the domain out to disk. https://www.redhat.com/archives/libvir-list/2006-November/msg00000.html There's already one for saving live domains: int virDomainSave(virDomainPtr domain, const char *to); It would be nice to have one which does the equivalent of 'xm dump-core': int virDomainDump(virDomainPtr domain, const char *to, int flags); Create a kernel dump of the domain in the path contained in *to. This API must fail if the domain is not in a panicked/crashed state. Initially (optionally, as well), the only flag which is honored is a bit which causes the domain to be crashed prior to taking the dump (so that, even if the domain is healthy, you can force a dump/panic). The idea is that this would work in the same way as an administrator hitting Alt-SysRq-C and taking a dump afterwards. Implementation discussion is in the above mailing list, which is incorporated herein only by reference.
This request was evaluated by Red Hat Product Management for inclusion in a Red Hat Enterprise Linux major release. Product Management has requested further review of this request by Red Hat Engineering, for potential inclusion in a Red Hat Enterprise Linux Major release. This request is not yet committed for inclusion.
It seems the dump-core support of xend is wired on the XML-RPC back-end that xm uses to communicate XendDomain::domain_dump() in xen/xend/XendDomain.py but not available though the HTTP POST : SrvDomain::op_dump() doesn't exist in server/SrvDomain.py I'm still investigating but I'm afraid this would require either patching our xen package with a non-upstream extension or extend libvirt to add support for that temporary xml-rpc solution in xen-3.0.2 and 3.0.3 , Daniel
The patch needed to extend xend support of the dump option for the HTTP access method is very simple based on other entry points and seems to work, enclosed... Daniel
Created attachment 141791 [details] patch to xend to add dump support for the HTTP interface
patch to xend has been accepted upstream, I will now add support in libvirt http://lists.xensource.com/archives/html/xen-devel/2006-11/msg01121.html Daniel
Created attachment 141920 [details] patch to add core dump capability to libvirt assuming xend has been patched
The patch above has been commited to libvirt upstream, i.e. both patches needed for this functionality are upstream, The new routine is: virDomainCoreDump(virDomainPtr domain, const char *to, int flags); Daniel
Would like to get this interface into RHEL5.0, will greatly help solve customer problems found with clustering of xen guests.
QE ack for RHEL5.
xen-3.0.3-13.el5 and libvirt-0.1.8-5.el5 have been pushed and include the 2 patches, the server side one in xen and the client one in libvirt. There is also a new 'dump' command to virsh allowing to test the feature from the command line (as root and after making sure it's the new xend running): [root@paphio ~]# rm -rf /xen/rhel5.dump [root@paphio ~]# virsh dump rhel5 /xen/rhel5.dump Domain rhel5 dumpd to /xen/rhel5.dump [root@paphio ~]# ls -l /xen/rhel5.dump -rw------- 1 root root 403779584 Dec 7 11:29 /xen/rhel5.dump [root@paphio ~]# the dump takes a few seconds, and the size of the resulting core is a bit larger than the memory size of the domain, Daniel
A package has been built which should help the problem described in this bug report. This report is therefore being closed with a resolution of CURRENTRELEASE. You may reopen this bug report if the solution does not work for you.