From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andrew Cooper Subject: Re: kexec+kdump troubles on xen 4.5-unstable, centos 7, x86_64 (need to get a crash dump) Date: Sun, 19 Oct 2014 12:30:28 +0100 Message-ID: <5443A0D4.8070304@citrix.com> References: <54416ED7.2030106@citrix.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============3035757012230219145==" Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: =?UTF-8?B?0JPRgNC40LPQvtGA0LjQuSDQn9GC0LDRiNC60L4=?= Cc: Xen List-Id: xen-devel@lists.xenproject.org This is a multi-part message in MIME format. --===============3035757012230219145== Content-Type: multipart/alternative; boundary="------------050706010505020405020003" This is a multi-part message in MIME format. --------------050706010505020405020003 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 19/10/2014 10:51, =D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=B8=D0=B9 =D0= =9F=D1=82=D0=B0=D1=88=D0=BA=D0=BE wrote: > > > 2014-10-17 23:32 GMT+04:00 Andrew Cooper >: > > On 17/10/2014 19:17, =D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=B8=D0=B9= =D0=9F=D1=82=D0=B0=D1=88=D0=BA=D0=BE 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=3Dcom1 com1=3D115200,8n1 crashkernel=3D256M iommu= =3D1 > --- bzImage ignore_loglevel serial console=3DttyS1,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=3Dcom1 com1=3D115200,8n1 crashkernel=3D256M= iommu=3D1 > > [root@kvmxen-centos7-test1-nb admin]# kexec -p /boot/bzImage=20 > Memory for crashkernel is not reserved > Please reserve memory by passing "crashkernel=3DX@Y" parameter to the k= ernel > 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 --------------050706010505020405020003 Content-Type: text/html; charset=UTF-8 Content-Length: 4813 Content-Transfer-Encoding: quoted-printable
On 19/10/2014 10:51, =D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=B8=D0=B9 =D0=9F=D1=82=D0=B0=D1=88=D0=BA=D0=BE wrote:


2014-10-17 23:32 GMT+04:00 Andrew Cooper <andrew.cooper3@citrix.com>:
On 17/10/2014 19:17, =D0=93=D1=80=D0=B8=D0=B3=D0=BE=D1=80=D0=B8=D0=B9 =D0=9F=D1=82=D0=B0=D1=88=D0=BA=D0=BE wrote:

So the questions are:

1. How can I make crash dumps of the hypervisor and the dom0=3F

Kexec of domains inside themselves is not supported.=C2=A0 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.=C2=A0 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=C2=A0 and running `kexek` manually ought to do the right thing.


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

APPEND xen.gz console=3Dcom1 com1=3D115200,8n1 crashkernel=3D256M iommu=3D1 --- bzImage ignore_loglevel serial console=3DttyS1,115200n8 ...

ttyS1 is the second serial console, not the first.=C2=A0 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=3Dcom1 com1=3D115200,8n1 crashkernel=3D256M iommu=3D1

[root@kvmxen-centos7-test1-nb admin]# kexec -p /boot/bzImage=C2=A0
Memory for crashkernel is not reserved
Please reserve memory by passing "crashkernel=3DX@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.=C2=A0 You want 2.0.5 or newer, which contains the Xen support.

~Andrew
--------------050706010505020405020003-- --===============3035757012230219145== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org http://lists.xen.org/xen-devel --===============3035757012230219145==--