Bug 766303

Summary: [RFE] Resume VM from s3 as a response for monitor/keyboard/mouse action
Product: Red Hat Enterprise Linux 6 Reporter: Dor Laor <dlaor>
Component: qemu-kvmAssignee: Gerd Hoffmann <kraxel>
Status: CLOSED ERRATA QA Contact: Virtualization Bugs <virt-bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 6.2CC: acathrow, bsarathy, dallan, juzhang, michen, minovotn, mkenneth, mzhan, qzhang, rhod, rwu, shu, tburke, virt-maint, vrozenfe, zpeng
Target Milestone: rcKeywords: FutureFeature
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: qemu-kvm-0.12.1.2-2.246.el6 Doc Type: Enhancement
Doc Text:
No Documentation Needed
Story Points: ---
Clone Of:
: 767473 789327 (view as bug list) Environment:
Last Closed: 2012-06-20 11:37:31 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 766958, 767473, 789327    

Description Dor Laor 2011-12-11 14:47:22 UTC
Description of problem:
Since we enable s3 for WHQL, it allows VMs to use a policy of auto suspend to ram when there is not activity. Win7 does it by default every 30 minutes.

We like to keep this ability and pause the VM and only resume it on monitor command (new one, or -re-use the 'cont' command) and input from keyboard/mouse through vnc/spice channels.

Comment 2 Dave Allan 2012-02-10 13:26:17 UTC
Gerd, if you end up re-using the cont command it would make the libvirt aspect of this work go away, which would be a nice efficiency, but if that approach doesn't work for you, there are a couple of other ways we could do the libvirt piece.

Comment 3 Dave Allan 2012-02-10 13:40:24 UTC
Err, sorry, I just read https://bugzilla.redhat.com/show_bug.cgi?id=789327#c1  That works for us.

Comment 11 Qunfang Zhang 2012-03-21 07:42:02 UTC
I'm verifying this bug with the following packages and scenarios:
Packages:
kernel-2.6.32-251.el6.x86_64
qemu-kvm-0.12.1.2-2.250.el6.x86_64
seabios-0.6.1.2-13.el6.x86_64

Scenarios:

1. suspend guest to mem and wakeup it with monitor command "system_wakeup".
==> pass
2. suspend guest to mem and wakeup it by clicking keyboard. 
==> pass
3. suspend guest to mem and wakeup it by clicking ps/2 mouse.
==> pass.
4. suspend guest to mem, guest with virtio serial attached. wakeup by sending some characters from host to guest.
==> Failed. new bug 805401
5. suspend guest to mem and using rtc alarm to wake up guest.
rhel guest ==> pass
windows guest ==> failed. bug 804933
6. suspend guest to mem and using acpi timer to wakeup guest.
==> TODO.
Gerd, how to do it? 

7. suspend guest and wakeup guest, check the qmp event. there should be 2 new events "SUSPEND" and "WAKEUP".
==> pass.  
8. suspend guest to mem, and migrate it to another host. migration should finish successfully, and the guest status in dst host is running (for rhel6.3).
==> pass.

Hi, Gerd
Could you help have a look at item 4 and 6?  For item 6, how to wakeup  guest with acpi timer? 


Thanks,
Qunfang

Comment 12 Qunfang Zhang 2012-03-21 08:38:54 UTC
For item 4, I closed the bug 805401 as it works for isa-serial.

Comment 13 Gerd Hoffmann 2012-03-21 13:00:56 UTC
item 4 - is resolved meanwhile.
item 5 - needs a seabios fix, gleb works on it.
item 6 - no idea, rtc wakeup seems to be much more common,
         I've tried to find out and found only stuff on rtc wakeup ...

Comment 14 Qunfang Zhang 2012-03-22 02:10:17 UTC
OK, then this bug can be verified. item 5 will be tracked by bug 804933. Thanks.

Comment 16 Michal Novotny 2012-05-04 09:25:15 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 17 errata-xmlrpc 2012-06-20 11:37:31 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