This patchset adds a new API to put a host to a suspended state
(Suspend-to-RAM, Suspend-to-Disk or Hybrid-Suspend) and setup a timed resume
to get the host back online, from within libvirt.
This uses the RTC wakeup mechanism to set up a timer alarm before suspending
the host, so that in-band resume is facilitated by the firing of the RTC
alarm, which wakes up the host.

The decision to use the RTC Wakeup mechanism to resume the host from
sleep was taken in [1]. An initial API was discussed in [2].
Some design ideas for the asynchronous mechanism implementation was
discussed in [3].

v4:
   * Applies on top of the Hybrid-Suspend patch posted in [4].
   * Incorporated the review comments in [5].

v3:
   * Rebased to libvirt 0.9.7
   * Added a check to see if alarmTime (suspend duration) is within an
     acceptable range.

v2:
   * Added an init function which finds out if S3/S4 is supported by the host,
     upon the first request to suspend/hibernate.
   * Added synchronization/locking to ensure that only one suspend operation
     is active at a time.

v1: http://www.redhat.com/archives/libvir-list/2011-September/msg00830.html
v2: http://comments.gmane.org/gmane.comp.emulators.libvirt/46729

References:
[1]. http://www.redhat.com/archives/libvir-list/2011-August/msg00327.html
[2]. http://www.redhat.com/archives/libvir-list/2011-August/msg00248.html
[3]. http://www.redhat.com/archives/libvir-list/2011-September/msg00438.html
[4]. http://www.redhat.com/archives/libvir-list/2011-November/msg01407.html
[5]. http://thread.gmane.org/gmane.comp.emulators.libvirt/47950

Srivatsa S. Bhat (4):
      Add a public API to invoke suspend/resume on the host
      Add the remote protocol implementation for virNodeSuspendForDuration
      Implement the core API to suspend/resume the host
      Add virsh command to initiate suspend on the host


 include/libvirt/libvirt.h.in |   17 +++
 src/driver.h                 |    6 +
 src/libvirt.c                |   61 ++++++++++
 src/libvirt_private.syms     |    7 +
 src/libvirt_public.syms      |    5 +
 src/nodeinfo.c               |  245 ++++++++++++++++++++++++++++++++++++++++++
 src/nodeinfo.h               |    9 ++
 src/qemu/qemu_driver.c       |    4 +
 src/remote/remote_driver.c   |    1 
 src/remote/remote_protocol.x |   10 ++
 tools/virsh.c                |   64 +++++++++++
 tools/virsh.pod              |    7 +
 12 files changed, 434 insertions(+), 2 deletions(-)


--
libvir-list mailing list
libvir-list@redhat.com
https://www.redhat.com/mailman/listinfo/libvir-list

Reply via email to