Hey!

Back when channels were introduced in libxl (in answer to Michal[0]) I
suggested the idea of integrating qemu guest agent (which currently lives
qemu driver).

This series is an attempt at pulling qemu agent from qemu driver into util in
using it in libxl in subsequent patches. What do folks think of the idea? Note
that this is still all very RFC because 1) there's a lot of code we could
potentially share between qemu and libxl with respect to finding guest agent
config and keeping some of its state (see patch 3); 2) also we need to ignore
"execute" messages to be able to query the agent and see it's returned data
(patch 2). Which despite the commit not being incorrect I am not sure yet why
we need it yet.

As PoC I only implemented domainQemuAgentCommand/domainInterfaceAddresses, but
there's a lot more driver APIs we can potentially introduce after this. Tracing
all driver APIs that might require a guest agent:

* domainFSThaw, domainFSFreeze, domainFSTrim, domainGetFSInfo
* domainSetUserPassword
* domainGetTime, domainSetTime
* domainShutdown (with VIR_DOMAIN_SHUTDOWN_GUEST_AGENT)
* domainReboot (with VIR_DOMAIN_REBOOT_GUEST_AGENT)
* domainGetGuestVcpus
* domainSetGuestVcpus
* domainSetVcpusFlags (with VIR_DOMAIN_VCPU_GUEST)
* domainGetVcpusFlags (with VIR_DOMAIN_VCPU_GUEST)

Comments/Feedback is appreciated :)

Cheers,
Joao

[0] https://www.spinics.net/linux/fedora/libvir/msg136685.html

Joao Martins (4):
  qemu_agent: move agent into util
  qemu_agent: ignore requests echoed back by guest
  libxl: implement qemu-agent-command
  libxl: domainInterfaceAddresses agent support

 po/POTFILES.in               |    2 +-
 src/Makefile.am              |    2 +-
 src/libvirt_private.syms     |   21 +
 src/libxl/libxl_domain.c     |  239 ++++-
 src/libxl/libxl_domain.h     |   16 +
 src/libxl/libxl_driver.c     |   69 ++
 src/qemu/qemu_agent.c        | 2248 -----------------------------------------
 src/qemu/qemu_agent.h        |  123 ---
 src/qemu/qemu_domain.h       |    2 +-
 src/qemu/qemu_driver.c       |    2 +-
 src/util/virqemuagent.c      | 2249 ++++++++++++++++++++++++++++++++++++++++++
 src/util/virqemuagent.h      |  123 +++
 tests/qemuagenttest.c        |    2 +-
 tests/qemumonitortestutils.c |    2 +-
 tests/qemumonitortestutils.h |    2 +-
 15 files changed, 2723 insertions(+), 2379 deletions(-)
 delete mode 100644 src/qemu/qemu_agent.c
 delete mode 100644 src/qemu/qemu_agent.h
 create mode 100644 src/util/virqemuagent.c
 create mode 100644 src/util/virqemuagent.h

-- 
2.1.4

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

Reply via email to