A.2. Creating Dump Files
crash. To fix this, add the
<vmcoreinfo/>element to the
<features>section of the XML configuration files of your guests.
<vmcoreinfo/>fails if the destination host is using an OS that does not support
<vmcoreinfo/>. These include Red Hat Enterprise Linux 7.4 and earlier, as well as Red Hat Enterprise Linux 6.9 and earlier.
A.2.1. Creating virsh Dump Files
virsh dumpcommand sends a request to dump the core of a guest virtual machine to a file so errors in the virtual machine can be diagnosed. Running this command may require you to manually ensure proper permissions on file and path specified by the argument
virsh dumpcommand is similar to a core dump(or the
A.2.2. Saving a Core Dump Using a Python Script
dump-guest-memory.pypython script implements a GNU Debugger (GDB) extension that extracts and saves a guest virtual machine's memory from the core dump after the qemu-kvm process crashes on a host. If the host-side QEMU process crash is related to guest actions, investigating the guest state at the time of the QEMU process crash could be useful.
- Install the qemu-kvm-debuginfo package on the system.
- Launch GDB, opening the core dump file saved for the crashed
/usr/libexec/qemu-kvmbinary. The debug symbols load automatically.
- Load the new command in GDB:
NoteAfter loading the python script, the built-in GDB
helpcommand can provide detailed information about the
- Run the command in GDB. For example:
dump-guest-memory /home/user/extracted-vmcore X86_64
/home/user/extracted-vmcorewith the crash utility for guest kernel analysis.