(arm64) suspend to ram from inside a virt KVM guest hangs
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
qemu (Ubuntu) |
Won't Fix
|
Low
|
Unassigned |
Bug Description
[ Impact ]
On ARM64, VM's can not wakeup after a dompmsuspend is issued.
[Test Case]
Configure a system with Xenial, install qemu from cloud-archive:pike
Install: qemu-efi virt-manager libvirt-bin qemu-guest-agent qemu-system-aarch64
qemu-system-
Installed: 1:2.10+
Candidate: 1:2.10+
libvirt-bin:
Installed: 3.6.0-1ubuntu5~
Candidate: 3.6.0-1ubuntu5~
On the test system:
1. create a virtual machine that runs fine (in this example Ubuntu 17.10)
2. Install qemu-guest-agent on the VM
qemu-guest-agent:
Installed: 1:2.10+
Candidate: 1:2.10+
3. Power off the VM and edit the xml to enable qemu-guest-agent:
<channel type='unix'>
<target type='virtio' name='org.
<address type='virtio-
</channel>
4. suspend it
$ sudo virsh dompmsuspend ubuntu1710 --target mem
Console will report:
$ sudo virsh dompmsuspend ubuntu1710 --target mem
Domain ubuntu1710 successfully suspended
5. confirm that the VM suspends
virsh-list will still identify the VM as running however the VM is now inaccessible via console. We appear to be suspended. But no logs can be found actually confirming this is happening.
3. wake it up
$ sudo virsh dompmwakeup ubuntu1710
Domain ubuntu1710 successfully woken up
Observed Result:
The VM will never wakeup, the console will not respond to keystrokes, the VM must be reset in order to recover it.
Expected Result:
The VM wakesup as expected and is fully functional
summary: |
- (arm64) unable to dompmwakeup a domain after being suspended + (arm64) unable to dompmwakeup a vm after being suspended |
Changed in qemu (Ubuntu): | |
status: | Confirmed → Won't Fix |
Thanks for splitting this issue out of our former work Sean.
I must admit I mostly use save/restore but less so suspend to ram - and even if so I don#t use the guest agent to do so, but all of that is worth testing.
I started with a repro of said case.
Usual updating to the latest versions of all packages - running on artful in host and guest.
Machine is a
Just like you I added the xml and installed the pkg qemu-guest-agent qemu.guest_ agent.0' />
<channel type='unix'>
<target type='virtio' name='org.
</channel>
Note: I never specify the target to get the defaults of libvirt also if you want you can hot-attach such a channel (for the sake of staying with the case I did like you did with shutdown and in the static guest xml).
As guest agent is not strictly required (unless you have custom freezing/thaw operations) I did one guest to test with it and one without.
For better debugging in regard to the case I added "debug no_console_suspend" and removed "quiet splash" kernel options in /etc/default/grub and ran update-grub in the guests. ARGS="- -verbose --logfile= /var/log/ qemu-ga. log"' | sudo tee /etc/default/ qemu-guest- agent
Also set the guest agent to verbose via:
$ echo 'DAEMON_
Tested the guest agent prior to the actual suspend/resume tests. uvt-test- agent '{"execute" :"guest- ping"}' uvt-test- agent '{"execute" :"guest- info"}' :true," name":" guest-suspend- ram","success- response" :false}
Agent is active in the guest and happy also guest ping works:
$ sudo virsh qemu-agent-command artful-
Also guest-info confirms that at least the agent "thinks" pm suspend should be supported:
$ sudo virsh qemu-agent-command artful-
[...]
{"enabled"
Also have to differ the suspend options on the two guest types I test. dompmwakeup - goes through guest agent to call ACPI states - S3 for mem
There is:
- virsh suspend/resume - the host will do the suspend to memory
(this is what is used mostly as the guest doesn't need anything to know about it)
- virsh dompmsuspend/
(less common in general as more setup is required)
As I assumed the outer suspend/resume - which is like a lock in time for the guest worked quite well. Reached paused state and woke up - no issues.
But as guests don't like that if you do this for a longer period of time I understand the need for dompmsuspend so lets get to that.
Note: you said you don't see it reaching a non running state - it should reach "pmsuspended" state in your case if suspending correctly - so I'd assume it failing on the suspend already.
Tracking on all kind of logs while doing suspend and resume now.
- host journal
- host dmesg
- host guest libvirt/qemu log
- guest console
- guest journal
- guest qemu-agent log
I get a success response from virsh (which only knows that it submitted the cmd - see response false in the general agent command). uvt-test- agent --target mem uvt-test- agent successfully suspended
$ virsh dompmsuspend artful-
Domain artful-
But just like you it stays in state "running" so something is incomplete.
The guest is dead thou so some freeze happened.
No other log even moved - the only thing is the guest agent, that says:
1513156829.72735: debug: read data, count: 59, data: {"execute" :"guest- sync", "a...