RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 761439 - Add command to put guest into hibernation to qemu-ga
Summary: Add command to put guest into hibernation to qemu-ga
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: qemu-kvm
Version: 6.3
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Luiz Capitulino
QA Contact: Virtualization Bugs
URL:
Whiteboard:
Depends On: 632771
Blocks: 720669 748534 766958 820481
TreeView+ depends on / blocked
 
Reported: 2011-12-08 10:45 UTC by Amit Shah
Modified: 2013-01-10 00:35 UTC (History)
15 users (show)

Fixed In Version: qemu-kvm-0.12.1.2-2.259.el6
Doc Type: Bug Fix
Doc Text:
No documentation needed.
Clone Of:
Environment:
Last Closed: 2012-06-20 11:37:27 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2012:0746 0 normal SHIPPED_LIVE qemu-kvm bug fix and enhancement update 2012-06-19 19:31:48 UTC

Description Amit Shah 2011-12-08 10:45:16 UTC
Similar to the guest shutdown command, we need a command to put a guest into hibernation state.

For Linux guests,

   echo disk > /sys/power/state

will do it.

Comment 1 Luiz Capitulino 2011-12-08 19:30:29 UTC
Candidate sent to qemu-devel:

http://lists.gnu.org/archive/html/qemu-devel/2011-12/msg01031.html

Comment 2 Luiz Capitulino 2012-01-11 12:02:53 UTC
Time for a progress update on this one.

I've submitted v4 some days ago:

 http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg00435.html

While there are a few things to be addressed in the patch, the main issue now is that we'll need some form of feature advertisement between qemu-ga and qemu, and the guest-suspend command depends on it. This happens because of S3 bugs, although it's likely we would need it anyway.

Please, read the following discussion for detailed information:

 http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg00495.html

Now, it's not clear who's going to work on the feature advertisement implementation. I'll discuss this with Michael Roth soon.

Comment 3 Luiz Capitulino 2012-01-17 13:47:16 UTC
Another update on this one.

I've just submitted v7, which hopefully is going to be the last version:

 http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg02158.html

Patches introducing feature advertisement have also been posted by Michael and we have two solutions for the S3 problems mentioned in the last comment (both solutions also posted as patches upstream):

1. Add a QMP command to wake up from S3 (preferred method, posted by Gerd)
2. Disable S3 advertisement in the BIOS

I believe it's just a matter of around a week to get all this merged upstream.

Comment 4 Luiz Capitulino 2012-02-02 13:10:04 UTC
Last week we found a problem in the way we were handling S3 support/advertisement in qemu-ga, and part of the solution was to split the guest-suspend command into guest-suspend-disk, guest-suspend-ram and guest-suspend-hybrid.

This required me to post V8:

http://lists.gnu.org/archive/html/qemu-devel/2012-01/msg04093.html

Comment 9 Luiz Capitulino 2012-02-17 19:49:35 UTC
Status update. The last available version of my series is still v8, as noted in comment 4. That series is on hold because it depends on two other series that haven't been merged upstream yet, they are:

o Gerd system_wakeup command (http://lists.gnu.org/archive/html/qemu-devel/2012-02/msg01900.html)
o A seabios fix from Gleb

Both are still being reviewed discussed upstream.

Comment 12 Luiz Capitulino 2012-03-13 12:52:13 UTC
This has finally been merged upstream (git log 8d9dde94..95f4f404e).

Comment 24 Qunfang Zhang 2012-03-30 02:20:49 UTC
Test on the qemu-kvm-0.12.1.2-2.265.el6, we have the command "guest-suspend-disk" which can put guest into hibernate and resume successfully.

Cli:
# /usr/libexec/qemu-kvm -M rhel6.3.0 -cpu Conroe -enable-kvm -m 2G -smp 2,sockets=1,cores=2,threads=1 -name rhel6.3 -uuid 26427d77-37e8-4217-ad98-140b16fa18f4 -device virtio-serial-pci,id=virtio-serial0,max_ports=16,bus=pci.0,addr=0x4 -drive file=/dev/vg-qzhang/lv-rhel6.3,if=none,id=drive-virtio-disk0,format=qcow2,cache=none,werror=stop,rerror=stop,aio=native -device virtio-blk-pci,scsi=off,bus=pci.0,addr=0x5,drive=drive-virtio-disk0,id=virtio-disk0 -netdev tap,id=hostnet0,vhost=on,script=/etc/qemu-ifup -device virtio-net-pci,netdev=hostnet0,id=net0,mac=00:1a:2a:15:10:19,bus=pci.0 -drive file=/home/boot.iso,if=none,media=cdrom,id=drive-ide0-1-0,readonly=on,format=raw -device ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0 -chardev socket,path=/tmp/qga.sock,server,nowait,id=qga0 -device virtserialport,chardev=qga0,name=org.qemu.guest_agent.0,bus=virtio-serial0.0 -vnc :10 -usb -device usb-tablet,id=input0 -device virtio-balloon-pci,id=balloon0,addr=0x7 -monitor stdio -boot c -rtc-td-hack -rtc base=localtime -qmp tcp:0:4444,server,nowait

1. Boot guest and installqemu-guest-agent-0.12.1.2-2.265.el6 then start qemu-ga inside guest.
#qemu-ga (default use virtio-serial transport method)

2. On host:
# nc -U /tmp/qga.sock
 {"execute":"guest-suspend-disk"}
 {"return": {}}

As a result, guest can hibernate, and can be resumed successfully. 
So this bug is fixed.

Comment 26 Luiz Capitulino 2012-04-23 18:43:29 UTC
    Technical note added. If any revisions are required, please edit the "Technical Notes" field
    accordingly. All revisions will be proofread by the Engineering Content Services team.
    
    New Contents:
No documentation needed.

Comment 27 errata-xmlrpc 2012-06-20 11:37:27 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.

http://rhn.redhat.com/errata/RHBA-2012-0746.html


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