On 19/10/2014 10:51, Григорий Пташко wrote:


2014-10-17 23:32 GMT+04:00 Andrew Cooper <andrew.cooper3@citrix.com>:
On 17/10/2014 19:17, Григорий Пташко wrote:

So the questions are:

1. How can I make crash dumps of the hypervisor and the dom0?

Kexec of domains inside themselves is not supported.  Effort is being made to make it work, but there are some architectural challenges.

The correct method is method 2, by providing a crash region in Xen for dom0 to load into.  I suspect your problem is that systemd doesn't understand that it is running in dom0, and is attempting to load a normal crash kernel.

An up-to-date kexec-tools  and running `kexek` manually ought to do the right thing.


OK. I've tried it again. Here's my cmdline:

APPEND xen.gz console=com1 com1=115200,8n1 crashkernel=256M iommu=1 --- bzImage ignore_loglevel serial console=ttyS1,115200n8 ...

ttyS1 is the second serial console, not the first.  Xen should be using com2 not com1 on the command line.

Linux should be configured to use hvc0 which will then be muxed by Xen onto the serial.

This should now get you the Xen console ring on the serial as well.


Here's what I see in dom0:

[root@kvmxen-centos7-test1-nb admin]# xl dmesg | grep crash
(XEN) Command line: console=com1 com1=115200,8n1 crashkernel=256M iommu=1

[root@kvmxen-centos7-test1-nb admin]# kexec -p /boot/bzImage 
Memory for crashkernel is not reserved
Please reserve memory by passing "crashkernel=X@Y" parameter to the kernel
Then try loading kdump kernel

Here's the kexec's version (I built it from source rpm):

[root@kvmxen-centos7-test1-nb admin]# kexec --version
kexec-tools 2.0.4 released 17 October 2014

I don't know when that date is from, but kexec-tools 2.0.4 is much older than that.  You want 2.0.5 or newer, which contains the Xen support.

~Andrew