Bug 1178652 - libvirt cannot recognize guest-panicked status when restart libvirt
Summary: libvirt cannot recognize guest-panicked status when restart libvirt
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libvirt
Version: 7.1
Hardware: x86_64
OS: Linux
Target Milestone: rc
: ---
Assignee: Ján Tomko
QA Contact: Virtualization Bugs
Depends On:
TreeView+ depends on / blocked
Reported: 2015-01-05 09:08 UTC by Luyao Huang
Modified: 2015-11-19 06:06 UTC (History)
5 users (show)

Fixed In Version: libvirt-1.2.13-1.el7
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-11-19 06:06:08 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2202 0 normal SHIPPED_LIVE libvirt bug fix and enhancement update 2015-11-19 08:17:58 UTC

Description Luyao Huang 2015-01-05 09:08:15 UTC
description of problem:
libvirt cannot recognize guest-panicked status when restart libvirt

Version-Release number of selected component (if applicable):

How reproducible:

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

libvirt try to find this 'guest-panic' but it is named  'guest-panicked' now


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")


const char *RunState_lookup[] = {


{ '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:

Comment 1 Ján Tomko 2015-01-06 08:13:39 UTC
Upstream patch:

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
    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

Comment 5 vivian zhang 2015-05-25 06:47:44 UTC
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

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
      <address type='isa' iobase='0x505'/>

2. start guest, crash it in guest with
guest#systemctl stop kdump
#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

Comment 7 errata-xmlrpc 2015-11-19 06:06:08 UTC
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.


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