]> git.proxmox.com Git - mirror_qemu.git/commit
qga: systemd hibernate/suspend/hybrid-sleep support
authorDaniel Henrique Barboza <danielhb413@gmail.com>
Thu, 21 Jun 2018 10:21:52 +0000 (07:21 -0300)
committerMichael Roth <mdroth@linux.vnet.ibm.com>
Tue, 3 Jul 2018 20:20:51 +0000 (15:20 -0500)
commit067927d62e097a8a3624a926e792756ce7a353ed
treebff66bf64b5116b77fa43f7cf319dd53dcdc1a7d
parent8b020b5eb708091e723518907184e609350f6d41
qga: systemd hibernate/suspend/hybrid-sleep support

pmutils isn't being supported by newer OSes like Fedora 27
or Mint. This means that the only suspend option QGA offers
for these guests are writing directly into the Linux sys state
file. This also means that QGA also loses the ability to do
hybrid suspend in those guests - this suspend mode is only
available when using pmutils.

Newer guests can use systemd facilities to do all the suspend
types QGA supports. The mapping in comparison with pmutils is:

- pm-hibernate -> systemctl hibernate
- pm-suspend -> systemctl suspend
- pm-suspend-hybrid -> systemctl hybrid-sleep

To discover whether systemd supports these functions, we inspect
the status of the services that implements them.

With this patch, we can offer hybrid suspend again for newer
guests that do not have pmutils support anymore.

Signed-off-by: Daniel Henrique Barboza <danielhb413@gmail.com>
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
qga/commands-posix.c