Red Hat Bugzilla – Bug 872573
dompmsuspend doesn't work twice
Last modified: 2016-04-26 09:53:39 EDT
Description of problem:
I am following https://fedoraproject.org/wiki/QA:Testcase_Virtualization_Guest_Suspend_Hibernate .
I can do "virsh dompmsuspend Machine1 --target mem" and resume easily, but just once. After I try to do it for the second time, I receive:
# virsh dompmsuspend Machine1 --target mem
error: Domain Machine1 could not be suspended
error: Guest agent is not responding: QEMU guest agent is not available due to an error
Version-Release number of selected component (if applicable):
2 of 2 attempts
I have to power off the guest to get it working again. Rebooting the guest is not enough.
Well, I think this works as expected. If you suspend a guest OS to memory, all you can do with it is resume or power off. You don't expect anything else from your laptop after suspending it to memory, do you?
The only bug I see is that the error message is quite unclear. We should be able to tell that the guest is already suspended.
No, you don't understand.
suspend -> resume # works
suspend -> resume -> suspend # doesn't work
suspend -> resume -> power off -> start -> suspend -> resume # works
Ah, I thought there was no resume between the two suspends. Is the guest otherwise working after resume? Can you ssh to it, for example?
Yes, the guest was working after the resume just fine. I didn't try ssh, but I could use GNOME as usual. But I couldn't suspend it again.
Multiple suspend -> resume -> suspend cycles worked for me when testing this fix:
Author: Ján Tomko <email@example.com>
AuthorDate: 2015-02-26 14:00:47 +0100
Commit: Ján Tomko <firstname.lastname@example.org>
CommitDate: 2015-03-02 08:07:56 +0100
Check if domain is running in qemuDomainAgentIsAvailable
If the domain is not running, the agent will not respond.
Do not even try.
git describe: v1.2.13-20-g7235223
It will be a part of the next upstream release.