Bug 1395658 - Document "virsh dump --memory-only"+"--format" and "/usr/share/qemu-kvm/dump-guest-memory.py"
Summary: Document "virsh dump --memory-only"+"--format" and "/usr/share/qemu-kvm/dump...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: doc-Virtualization_Deployment_and_Administration_Guide
Version: 7.4
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Yehuda Zimmerman
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 1425467
TreeView+ depends on / blocked
 
Reported: 2016-11-16 11:10 UTC by Jiri Herrmann
Modified: 2019-03-06 01:11 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-03-29 17:11:26 UTC
Target Upstream Version:


Attachments (Terms of Use)

Comment 2 Laszlo Ersek 2016-11-16 16:50:00 UTC
* As basis for documenting --format, I recommend the "virsh" manual:

> --format /string/ is used to specify the format of 'memory-only' dump, and
> /string/ can be one of them: /elf/, /kdump-zlib/ (kdump-compressed format with
> zlib-compressed), /kdump-lzo/ (kdump-compressed format with
> lzo-compressed), /kdump-snappy/ (kdump-compressed format with
> snappy-compressed).

* For documenting "dump-guest-memory.py", I recommend two sources as basis:

(1) The commit message of the patch that introduced the script:

  http://git.qemu.org/?p=qemu.git;a=commitdiff;h=3e16d14fd93c

(2) The current built-in help text from the script:

  http://git.qemu.org/?p=qemu.git;a=blob;f=scripts/dump-guest-memory.py

Namely:

> Extract guest vmcore from qemu process coredump.
> 
> The two required arguments are FILE and ARCH:
> FILE identifies the target file to write the guest vmcore to.
> ARCH specifies the architecture for which the core will be generated.
> 
> This GDB command reimplements the dump-guest-memory QMP command in
> python, using the representation of guest memory as captured in the qemu
> coredump. The qemu process that has been dumped must have had the
> command line option "-machine dump-guest-core=on" which is the default.
> 
> For simplicity, the "paging", "begin" and "end" parameters of the QMP
> command are not supported -- no attempt is made to get the guest's
> internal paging structures (ie. paging=false is hard-wired), and guest
> memory is always fully dumped.
> 
> Currently aarch64-be, aarch64-le, X86_64, 386, s390, ppc64-be,
> ppc64-le guests are supported.
> 
> The CORE/NT_PRSTATUS and QEMU notes (that is, the VCPUs' statuses) are
> not written to the vmcore. Preparing these would require context that is
> only present in the KVM host kernel module when the guest is alive. A
> fake ELF note is written instead, only to keep the ELF parser of "crash"
> happy.
> 
> Dependent on how busted the qemu process was at the time of the
> coredump, this command might produce unpredictable results. If qemu
> deliberately called abort(), or it was dumped in response to a signal at
> a halfway fortunate point, then its coredump should be in reasonable
> shape and this command should mostly work.

Thanks!


Note You need to log in before you can comment on or make changes to this bug.