Features/Guest S4 support

From QEMU
Revision as of 14:15, 11 October 2016 by Paolo Bonzini (talk | contribs) (moved Guest S4 support to Features/Guest S4 support)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

What

Putting guests into 'hibernate' or ACPI S4 state needs guest co-operation, as ACPI doesn't define a standard way via keystrokes or ACPI commands to put a guest into hibernate state. Similar to powerdown and reboot commands, a robust implementation for guest S4 will have to be implemented via commands in the guest agent.

Why

  • Alternative solution to migration to file in cases where guests need to be stopped (e.g., host system going down for maintenance). Migration to file can cause the guest time keeping to go out of sync. S4, on the other hand, is implemented by the guest itself and the guest can and does recover from timekeeping deltas after S4.
  • S4 is a standard operation for desktops, and making sure this functionality works is a good thing to do.

How

  • New guest agent command to put guest into S4 state

Libvirt support

qemu guest agent

ovirt guest agent

Linux guest support

GNOME desktop-specific

KDE desktop-specific

desktop environment agnostic

  • For Linux guests, without worrying about the desktops, it's quite easy to put the guest into S4 state with the following command:
 echo 'disk' > /sys/power/state

Of course, this assumes the guest is setup for handling hibernation and resume from hibernation properly (adequate swap space, etc.).


Windows guest support