[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[libvirt] [PATCH 0/4] Add support for QEMU guest agent control



====
These patches are taken from here:
https://www.redhat.com/archives/libvir-list/2011-October/msg00135.html

I've just rebased and polished them.
====

The QEMU guest agent "/usr/bin/qemu-ga" has some handy functions
for controlling the guest, not least, shutdown/reboot and filesystem
freeze/thaw.

In Fedora 15/16 the semantics of the ACPI power button have been
changed to suspend-to-RAM which breaks our current shutdown
implementation.

By adding support for the agent we gain a more predictable way
to shutdown / reboot guests.

NB: the code currently has the same "flaw" as the monitor, in
so much as we wait forever for a guest agent reply. We need to
add a timeout ability to the agent code

Daniel P. Berrange (4):
  QEMU guest agent support
  Add new virDomainShutdownFlags API
  Wire up QEMU agent to reboot/shutdown APIs
  Allow choice of shutdown method via virsh

 include/libvirt/libvirt.h.in |   15 +
 po/POTFILES.in               |    1 +
 src/Makefile.am              |    1 +
 src/driver.h                 |    5 +
 src/esx/esx_driver.c         |   11 +-
 src/libvirt.c                |   65 +++-
 src/libvirt_public.syms      |    4 +
 src/libxl/libxl_driver.c     |   12 +-
 src/openvz/openvz_driver.c   |    1 +
 src/qemu/qemu_agent.c        | 1151 ++++++++++++++++++++++++++++++++++++++++++
 src/qemu/qemu_agent.h        |   69 +++
 src/qemu/qemu_domain.c       |   97 ++++
 src/qemu/qemu_domain.h       |   22 +
 src/qemu/qemu_driver.c       |  107 ++++-
 src/qemu/qemu_monitor_json.c |    2 +-
 src/qemu/qemu_process.c      |  188 +++++++
 src/remote/remote_driver.c   |    1 +
 src/remote/remote_protocol.x |    8 +-
 src/remote_protocol-structs  |    5 +
 src/test/test_driver.c       |   11 +-
 src/uml/uml_driver.c         |   11 +-
 src/vbox/vbox_tmpl.c         |   11 +-
 src/vmware/vmware_driver.c   |    1 +
 src/xen/xen_driver.c         |   14 +-
 src/xenapi/xenapi_driver.c   |   12 +-
 tools/virsh.c                |   47 ++-
 tools/virsh.pod              |   24 +-
 27 files changed, 1854 insertions(+), 42 deletions(-)
 create mode 100644 src/qemu/qemu_agent.c
 create mode 100644 src/qemu/qemu_agent.h

-- 
1.7.3.4


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]