Bug 839661 - libvirt: support QMP event for S4
libvirt: support QMP event for S4
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: libvirt (Show other bugs)
6.4
Unspecified Unspecified
unspecified Severity unspecified
: rc
: ---
Assigned To: Martin Kletzander
Virtualization Bugs
:
Depends On: 827499
Blocks: 761491 804821 808463
  Show dependency treegraph
 
Reported: 2012-07-12 10:02 EDT by Luiz Capitulino
Modified: 2013-02-21 02:19 EST (History)
14 users (show)

See Also:
Fixed In Version: libvirt-0.10.2-4.el6
Doc Type: Bug Fix
Doc Text:
Cause: S4 event was not supported by libvirt on QEMU domains. Consequence: Management applications couldn't know whether guest was suspended to disk or powered off. Fix: Support for S4 event was added. Result: Management applications can now request receiving S4 events.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-02-21 02:19:19 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Luiz Capitulino 2012-07-12 10:02:36 EDT
QMP will soon get support to emit an event when the guest suspends to disk (S4). Libvirt should recognize this event.
Comment 3 Ademar Reis 2012-07-30 16:42:04 EDT
Do we already have support for the S3 event in libvirt? Otherwise we should either open a new bug or change this one to include the S3 event as well (the event is there in qemu already).
Comment 4 Martin Kletzander 2012-07-31 04:40:13 EDT
(In reply to comment #3)
Yes, S3 event is already supported in libvirt (since 0.9.11 if I'm right). We are just waiting how the new event will be implemented to modify the code accordingly.
Comment 8 hongming 2012-10-16 06:17:33 EDT
Because the following result. Change its status to ASSIGNED.

# rpm -q libvirt
libvirt-0.10.2-3.el6.x86_64


# python /usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py 
Using uri:qemu:///system
Traceback (most recent call last):
  File "/usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py", line 570, in <module>
    main()
  File "/usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py", line 557, in main
    vc.domainEventRegisterAny(None, libvirt.VIR_DOMAIN_EVENT_ID_PMSUSPEND_DISK, myDomainEventPMSuspendDiskCallback, None)
NameError: global name 'myDomainEventPMSuspendDiskCallback' is not defined
Closing <libvirt.virConnect instance at 0x1704638>
Comment 10 hongming 2012-10-16 23:50:59 EDT
Verify it as follows. The result is expected. So move its status to VERIFIED.

# rpm -q libvirt 
libvirt-0.10.2-4.el6.x86_64


# virsh list --all
 Id    Name                           State
----------------------------------------------------
 1     rhel6.3-new                    running

# virsh dompmsuspend rhel6.3-new --target disk
Domain rhel6.3-new successfully suspended

# virsh list --all
 Id    Name                           State
----------------------------------------------------
 -     rhel6.3-new                    shut off

# virsh start rhel6.3-new
Domain rhel6.3-new started

# python /usr/share/doc/libvirt-python-0.10.2/events-python/event-test.py 
Using uri:qemu:///system
myDomainEventPMSuspendDiskCallback: Domain rhel6.3-new(6) system pmsuspend_disk
myDomainEventCallback1 EVENT: Domain rhel6.3-new(6) PMSuspended Disk
myDomainEventCallback2 EVENT: Domain rhel6.3-new(6) PMSuspended Disk
myDomainEventCallback1 EVENT: Domain rhel6.3-new(6) Shutdown Finished
myDomainEventCallback2 EVENT: Domain rhel6.3-new(6) Shutdown Finished
myDomainEventCallback1 EVENT: Domain rhel6.3-new(6) Stopped Shutdown
myDomainEventCallback2 EVENT: Domain rhel6.3-new(6) Stopped Shutdown
myDomainEventCallback1 EVENT: Domain rhel6.3-new(7) Started Booted
myDomainEventCallback2 EVENT: Domain rhel6.3-new(7) Started Booted
Comment 11 errata-xmlrpc 2013-02-21 02:19:19 EST
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.

http://rhn.redhat.com/errata/RHSA-2013-0276.html

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