qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Luiz Capitulino <lcapitulino@redhat.com>
To: qemu-devel@nongnu.org
Cc: aliguori@us.ibm.com, ehabkost@redhat.com, jan.kiszka@siemens.com,
	dlaor@redhat.com, avi@redhat.com
Subject: [Qemu-devel] [RFC 00/11] QEMU Monitor Protocol
Date: Tue, 23 Jun 2009 01:27:55 -0300	[thread overview]
Message-ID: <20090623012755.7cade792@doriath> (raw)

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

                 reply	other threads:[~2009-06-23  4:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090623012755.7cade792@doriath \
    --to=lcapitulino@redhat.com \
    --cc=aliguori@us.ibm.com \
    --cc=avi@redhat.com \
    --cc=dlaor@redhat.com \
    --cc=ehabkost@redhat.com \
    --cc=jan.kiszka@siemens.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).