qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [RFC 00/11] QEMU Monitor Protocol
@ 2009-06-23  4:27 Luiz Capitulino
  0 siblings, 0 replies; only message in thread
From: Luiz Capitulino @ 2009-06-23  4:27 UTC (permalink / raw)
  To: qemu-devel; +Cc: aliguori, ehabkost, jan.kiszka, dlaor, avi

Hi there,

It is already known that QEMU does not provide a way for applications to
control it at the "machine level", that is, the current Monitor interface
was designed with human interaction in mind.

This problem has already been discussed at least twice, the last thead
on the topic can be found here:

http://lists.gnu.org/archive/html/qemu-devel/2009-01/msg00655.html

Basically, some people have suggested to export Monitor's functionality
through a C library, while others have suggested a simple text protocol.

This patch series implements a prototype of the text protocol approach,
which I called QEMU Monitor Protocol, or QMP.

I have chosen the text protocol because:

    1. It is easier to implement
    2. If needed, a C library can be built on top of it

QMP has the following features:

    o Easy to be parsed by programs
    o Extensible
    o Asynchronous messages support

With this series I hope to get as much feedback as possible on the protocol
specification and the implementation, and also have a merge plan.

To enable QMP one has to start QEMU with:

$ qemu [...] -monitor control,<device>

For example:

$ qemu [...] -monitor control,tcp:localhost:4444,server

Then the application can open a TCP connection to localhost:4444 and
speak to QEMU using QMP.

A full protocol specification can be found (and discussed) in the first
patch of this series.

Some additional comments:

o Don't take the implementation too serious, it is just a hac^W prototype

o Available commands: quit, cont, stop, system_reset, system_powerdown,
balloon, info balloon, info blockstats

o Available events: reboot, shutdown, powerdown

Luiz Capitulino (11):
  QMP: Introduce specification file
  QMP: Introduce MONITOR_USE_CONTROL flag
  QMP: Introduce protocol print functions
  QMP: Make monitor_handle_command() QMP aware
  QMP: Introduce control mode chardev handling
  QMP: Introduce asynchronous events infrastructure
  QMP: Enable simple commands
  QMP: Port balloon command
  QMP: Port 'info blockstats' command
  QMP: Introduce basic events
  QMP: Command-line flag to enable control mode

 block.c                   |   18 ++--
 monitor-protocol-spec.txt |  180 ++++++++++++++++++++++++++++++++++++++
 monitor.c                 |  211 +++++++++++++++++++++++++++++++++++++++++++-
 monitor.h                 |   14 +++
 qemu-tool.c               |   16 ++++
 vl.c                      |    8 ++-
 6 files changed, 431 insertions(+), 16 deletions(-)
 create mode 100644 monitor-protocol-spec.txt

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-06-23  4:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-23  4:27 [Qemu-devel] [RFC 00/11] QEMU Monitor Protocol Luiz Capitulino

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).