qemu/QMP
Luiz Capitulino 0d2ed46af4 QMP: Introduce VNC_INITIALIZED event
It's emitted when a VNC client session is activated by QEMU,
client's information such as port, IP and auth ID (if the
session is authenticated) are provided.

Event example:

{ "event": "VNC_INITIALIZED",
    "timestamp": {"seconds": 1263475302, "microseconds": 150772},
    "data": {
        "server": { "auth": "sasl", "family": "ipv4",
                    "service": "5901", "host": "0.0.0.0"},
        "client": { "family": "ipv4", "service": "46089",
                    "host": "127.0.0.1", "sasl_username": "lcapitulino" } } }

Signed-off-by: Luiz Capitulino <lcapitulino@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
2010-01-19 16:31:04 -06:00
..
qmp-events.txt QMP: Introduce VNC_INITIALIZED event 2010-01-19 16:31:04 -06:00
qmp-shell QMP: Introduce qmp-shell 2009-12-03 09:41:25 -06:00
qmp-spec.txt QMP: Update spec file 2009-12-19 08:26:03 -06:00
qmp.py QMP: Introduce qmp-shell 2009-12-03 09:41:25 -06:00
README QMP: Update README file 2009-12-19 08:26:02 -06:00
vm-info QMP: Introduce vm-info 2009-12-03 09:41:25 -06:00

                          QEMU Monitor Protocol
                          =====================

Introduction
-------------

The QEMU Monitor Protocol (QMP) allows applications to communicate with
QEMU's Monitor.

QMP is JSON[1] based and has the following features:

- Lightweight, text-based, easy to parse data format
- Asynchronous events support 
- Stability

For more information, please, refer to the following files:

o qmp-spec.txt    QEMU Monitor Protocol current specification
o qmp-events.txt  List of available asynchronous events

There are also two simple Python scripts available:

o qmp-shell       A shell
o vm-info         Show some information about the Virtual Machine

[1] http://www.json.org

Usage
-----

To enable QMP, QEMU has to be started in "control mode". There are
two ways of doing this, the simplest one is using the the '-qmp'
command-line option.

For example:

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

Will start QEMU in control mode, waiting for a client TCP connection
on localhost port 4444.

It is also possible to use the '-mon' command-line option to have
more complex combinations. Please, refer to the QEMU's manpage for
more information.

Simple Testing
--------------

To manually test QMP one can connect with telnet and issue commands:

$ telnet localhost 4444
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
{"QMP": {"capabilities": []}}
{ "execute": "query-version" }
{"return": {"qemu": "0.11.50", "package": ""}}

Contact
-------

http://www.linux-kvm.org/page/MonitorProtocol
Luiz Fernando N. Capitulino <lcapitulino@redhat.com>