Red Hat Bugzilla – Bug 846639
Should forbid suspend&resume operate when guest in pmsuspend status.
Last modified: 2013-02-21 02:21:28 EST
Description of problem: when guest in pmsuspend status, should forbid suspend&resume guest. Version-Release number of selected component (if applicable): libvirt-0.10.0-0rc0.el6.x86_64 qemu-kvm-0.12.1.2-2.295.el6.x86_64 How reproducible: always Steps to Reproduce: 1. install qemu-ga in the domain [qemu-guest-agent] and add xml into domain <channel type='unix'> <source mode='bind' path='/var/lib/libvirt/qemu/tests3.agent'/> <target type='virtio' name='org.qemu.guest_agent.0'/> <alias name='channel0'/> <address type='virtio-serial' controller='0' bus='0' port='1'/> </channel> 2. start domain and login domain , run qemu-ga -d in the domain #qemu-ga -d # 3.in the host run pmsuspend #virsh dompmsuspend $domain --target mem check domain status #virsh domstate $domain pmsuspended 4.suspend& resume $domain #virsh suspend $domain Domain tests3 suspended #virsh resume $domain Domain tests3 resumed #virsh state $domain running use virt-viewer to check guest, seem in pmsuspend status. Actual results: see step 4 Expected results: when guest in s3 , should not do suspend&resume Additional info:
Patch proposed upstream: https://www.redhat.com/archives/libvir-list/2012-August/msg01637.html
Moving to POST: commit 385ee0e982080d03ce0d11eab32396c0d7057961 Author: Michal Privoznik <mprivozn@redhat.com> AuthorDate: Thu Aug 23 15:26:20 2012 +0200 Commit: Michal Privoznik <mprivozn@redhat.com> CommitDate: Thu Aug 23 17:48:44 2012 +0200 qemu: forbid suspend if already pmsuspended If a domain is pmsuspended then virsh suspend will succeed. Beside obvious flaw, virsh resume will report success and change domain state to running which is another mistake. Therefore we must forbid any attempts for suspend and resume when pmsuspended. v0.10.0-rc1-16-g385ee0e
Test with: libvirt-0.10.0-1.el6.x86_64 qemu-kvm-0.12.1.2-2.307.el6.x86_64 Steps: virsh # dompmsuspend rhel63 --target mem Domain rhel63 successfully suspended virsh # domstate rhel63 pmsuspended virsh # suspend rhel63 error: Failed to suspend domain rhel63 error: Requested operation is not valid: domain is pmsuspended virsh # resume rhel63 error: Failed to resume domain rhel63 error: Requested operation is not valid: domain is pmsuspended virsh # dompmwakeup rhel63 Domain rhel63 successfully woken up virsh # domstate rhel63 running virsh # suspend rhel63 Domain rhel63 suspended virsh # domstate rhel63 paused virsh # resume rhel63 Domain rhel63 resumed virsh # domstate rhel63 running So change status 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. http://rhn.redhat.com/errata/RHSA-2013-0276.html