Hide Forgot
description of problem: libvirt cannot recognize guest-panicked status when restart libvirt Version-Release number of selected component (if applicable): libvirt-1.2.8-11.el7.x86_64 How reproducible: 100% Steps to Reproduce: 1.prepare a guest set settings like this: <on_crash>rename-restart</on_crash> <---qemu will do nothing for this type 2.start the guest : # virsh start test3 3.crash guest: IN guest: echo c > /proc/sysrq-trigger 4.check guest status: #virsh list --all # virsh list --all Id Name State ---------------------------------------------------- 22 test3 crashed 5.restart libvirtd and can find log: 2015-01-05 07:56:39.200+0000: 20594: warning : qemuMonitorVMStatusToPausedReason:3577 : Qemu reported unknown VM status: 'guest-panicked' Actual results: libvirt cannot recognize guest-panicked status when restart libvirt Expected results: no warning in this place information: libvirt try to find this 'guest-panic' but it is named 'guest-panicked' now libvirt: 126 VIR_ENUM_IMPL(qemuMonitorVMStatus, 127 QEMU_MONITOR_VM_STATUS_LAST, 128 "debug", "inmigrate", "internal-error", "io-error", "paused", 129 "postmigrate", "prelaunch", "finish-migrate", "restore-vm", 130 "running", "save-vm", "shutdown", "watchdog", "guest-panic") qemu-kvm-rhev: const char *RunState_lookup[] = { "debug", "inmigrate", "internal-error", "io-error", "paused", "postmigrate", "prelaunch", "finish-migrate", "restore-vm", "running", "save-vm", "shutdown", "suspended", "watchdog", "guest-panicked", NULL, }; qemu-kvm(upstream): { 'enum': 'RunState', 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog', 'guest-panicked' ] } Additional info:
Upstream patch: https://www.redhat.com/archives/libvir-list/2015-January/msg00031.html Pushed as: commit 39449f70b9333fb623bed90c2d624792ab38daa7 Author: Luyao Huang <lhuang> AuthorDate: 2015-01-05 17:09:33 +0800 Commit: Eric Blake <eblake> CommitDate: 2015-01-05 16:55:35 -0700 qemu: use a wrong name for guest panic status https://bugzilla.redhat.com/show_bug.cgi?id=1178652 We will get a warning when we have a guest in paused status (caused by kernel panic) and restart libvirtd, warning message like this: Qemu reported unknown VM status: 'guest-panicked' and this seems because we set a wrong status name in qemu_monitor.c, and from qemu qapi-schema.json file we know this status should named 'guest-panicked'. Signed-off-by: Luyao Huang <lhuang> Signed-off-by: Eric Blake <eblake> git describe: v1.2.11-104-g39449f7
I can produce this bug with libvirt-1.2.8-11.el7.x86_64 Verify this with libvirt-1.2.15-2.el7.x86_64 Steps: 1. prepare a healthy guest with on_crash setting and panic device as below # virsh dumpxml vm2 ... <on_crash>rename-restart</on_crash> <------ qemu will do nothing after crash guest, so guest will keep with crashed status ... <panic> <address type='isa' iobase='0x505'/> </panic> ... 2. start guest, crash it in guest with guest#systemctl stop kdump #sync #printf '%b' '\x01' | dd of=/dev/port seek=$((16#505)) bs=1 count=1 3. check guest status # virsh list Id Name State ---------------------------------------------------- 75 vm2 crashed 4. restart libvirtd, check libvirtd log, can not find error "Qemu reported unknown VM status: 'guest-panicked'" reported by libvirtd move bug to verified
Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2015-2202.html