Skip to content

qemu-guest-agent: linux suspend fallback does not work

When linux guest has no systemd or pm-utils, QGA has an option to suspend a linux VM, by writing "mem" or "disk" to /sys/power/state. However, it does not work, because QGA uses g_file_set_contents() which creates a temp file (/sys/power/foobar) and renames it to the final destination, which never worked for files in sysfs.

https://gitlab.com/qemu-project/qemu/-/blob/2048129625bdca60bc76d3b8c3ee51c08aacedc2/qga/commands-linux.c#L1412

This is broken since version 9.1 (commit 20481296).

Edited by Michael Tokarev
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information