Statistics
| Branch: | Revision:

root / QMP @ ff667e2e

# Date Author Comment
9eb80ead 10/24/2012 11:26 am Paolo Bonzini

qmp: add pull_event function

This function is unlike get_events in that it makes it easy to process
one event at a time. This is useful in the mirroring test cases, where
we want to process just one event (BLOCK_JOB_ERROR) and leave the others
to a helper function....

a66a2a36 10/24/2012 11:26 am Paolo Bonzini

block: introduce BLOCK_JOB_READY event

Even for jobs that need to be manually completed, management may want
to take care itself of the completion, not requiring the user to issue
a command to terminate the job. In this case we want to avoid that
they poll us continuously, waiting for completion to become available....

b3d0380e 10/24/2012 11:26 am Jeff Cody

qmp: fix __accept() in qmp.py

In QEMUMonitorProtocol, commit e9d17b6 removed the __sockfile creation
from __negotiate_capabilities(), which breaks _accept(). This causes
failures in qemu-io python based tests (i.e. tests 030 and 040).

This patch creates the sockfile in __accept() as well....

05d4f2f2 10/05/2012 03:53 am Anthony Liguori

Merge remote-tracking branch 'kwolf/for-anthony' into staging

  • kwolf/for-anthony: (30 commits)
    qemu-iotests: add tests for streaming error handling
    qemu-iotests: map underscore to dash in QMP argument names
    blkdebug: process all set_state rules in the old state...
32c81a4a 09/28/2012 08:40 pm Paolo Bonzini

block: introduce block job error

The following behaviors are possible:

'report': The behavior is the same as in 1.1. An I/O error,
respectively during a read or a write, will complete the job immediately
with an error code.

'ignore': An I/O error, respectively during a read or a write, will be...

ed61fc10 09/28/2012 07:23 pm Jeff Cody

QAPI: add command for live block commit, 'block-commit'

The command for live block commit is added, which has the following
arguments:

device: the block device to perform the commit on (mandatory)
base: the base image to commit into; optional (if not specified,...

e9d17b68 09/26/2012 04:45 pm Ryota Ozaki

Make negotiation optional in QEMUMonitorProtocol

This is a preparation for qemu-ga-client which uses
QEMUMonitorProtocol class. The class tries to
negotiate capabilities on connect, however, qemu-ga
doesn't suppose it and fails.

This change makes the negotiation optional, though...

e37b350a 09/26/2012 04:45 pm Ryota Ozaki

Support settimeout in QEMUMonitorProtocol

This method is used in the following qemu-ga-client script
to implement non-blocking operations.

Signed-off-by: Ryota Ozaki <>
Signed-off-by: Luiz Capitulino <>

f513cbf7 09/26/2012 04:45 pm Ryota Ozaki

Add qemu-ga-client script

This is an easy-to-use QEMU guest agent client written in
Python. It simply provides commands to call guest agent
functions like ping, fsfreeze and shutdown. Additionally,
it provides extra useful commands, e.g, cat, ifconfig and...

fa779b65 09/05/2012 09:48 pm Daniel P. Berrange

Add support for pretty-printing response in qmp-shell

Add a '-p' arg to the QMP/qmp-shell test program, which uses
the python pprint module to pretty-print the dictionary
returned from a command

$ qmp-shell -p /tmp/qemu
Welcome to the QMP low-level shell!...
17c8660b 08/13/2012 10:10 pm Luiz Capitulino

qmp: emit the WAKEUP event when the guest is put to run

Today, the WAKEUP event is emitted when a wakeup request is made.
This could be the system_wakeup command, for example.

A better semantic would be to emit the event when the guest is
already running, as that's what matters in the end. This commit does...

cb8900fe 08/13/2012 10:10 pm Luiz Capitulino

qmp: qmp-events.txt: put events in alphabetical order

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>
Acked-by: Gerd Hoffmann <>

67e3cf26 08/13/2012 10:10 pm Luiz Capitulino

qmp: qmp-events.txt: add missing doc for the SUSPEND event

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Eric Blake <>
Acked-by: Gerd Hoffmann <>

25df49f6 08/13/2012 10:10 pm Luiz Capitulino

qmp: add SUSPEND_DISK event

Emitted when the guest makes a request to enter S4 state.

There are three possible ways of having this event, as described here:

http://lists.gnu.org/archive/html/qemu-devel/2012-07/msg02307.html

I've decided to add a new event and make it indepedent of SHUTDOWN....

de253f14 08/13/2012 08:17 pm Luiz Capitulino

qmp: switch to the new error format on the wire

IMPORTANT: this BREAKS QMP's compatibility for the error response.

This commit changes QMP's wire protocol to make use of the simpler
error format introduced by previous commits.

There are two important (and mostly incompatible) changes:...

973603a8 06/15/2012 07:34 pm Daniel P. Berrange

Add event notification for guest balloon changes

After setting a balloon target value, applications have to
continually poll 'query-balloon' to determine whether the
guest has reacted to this request. The virtio-balloon backend
knows exactly when the guest has reacted though, and thus it...

5ade7674 04/26/2012 09:14 pm Anthony Liguori

qom: quick and dirty QOM filesystem based on FUSE

Here's an example session:

anthony@titi:~/git/qemu/QMP$ QMP_SERVER=/tmp/server.sock ./qom-fuse tmp
anthony@titi:~/git/qemu/QMP$ ls tmp
machine sysbus type
anthony@titi:~/git/qemu/QMP$ ls tmp/machine
i440fx peripheral peripheral-anon type unattached...

1829851c 03/27/2012 03:15 pm Paolo Bonzini

qmp: document strict parsing

Signed-off-by: Paolo Bonzini <>
Signed-off-by: Luiz Capitulino <>

6f382ed2 02/22/2012 09:23 pm Luiz Capitulino

qmp: add DEVICE_TRAY_MOVED event

It's emitted whenever the tray is moved by the guest or by HMP/QMP
commands.

Signed-off-by: Luiz Capitulino <>
Reviewed-by: Markus Armbruster <>
Acked-by: Kevin Wolf <>

9f68f7fb 02/22/2012 08:18 pm Anthony Liguori

qmp: make qmp.py easier to use

Signed-off-by: Anthony Liguori <>
Signed-off-by: Michael Roth <>
Signed-off-by: Anthony Liguori <>

235fe3bf 02/22/2012 08:18 pm Anthony Liguori

qom: add test tools

Tested-by: Andreas F=E4rber <>
Signed-off-by: Anthony Liguori <>
Signed-off-by: Michael Roth <>
Signed-off-by: Anthony Liguori <>

370521a1 01/26/2012 03:49 pm Stefan Hajnoczi

qmp: add block_job_cancel command

Add block_job_cancel, which stops an active block streaming operation.
When the operation has been cancelled the new BLOCK_JOB_CANCELLED event
is emitted.

Signed-off-by: Stefan Hajnoczi <>
Acked-by: Luiz Capitulino <>...

12bd451f 01/26/2012 03:49 pm Stefan Hajnoczi

qmp: add block_stream command

Add the block_stream command, which starts copy backing file contents
into the image file. Also add the BLOCK_JOB_COMPLETED QMP event which
is emitted when image streaming completes. Later patches add control
over the background copy speed, cancelation, and querying running...

1c1d46cc 12/06/2011 03:40 pm Mark Wu

qmp: add test tool for QMP

Anthony wrote this quickly to aid in testing. It's similar to qmp-shell with
a few important differences:

1) It is not interactive. That makes it useful for scripting.

2) qmp-shell:

(QEMU) set_password protocol=vnc password=foo...

dee3bffc 12/02/2011 12:50 pm Dong Xu Wang

fix spelling in QMP sub directory

Cc: Markus Armbruster <>
Acked-by: Luiz Capitulino <>
Signed-off-by: Dong Xu Wang <>
Signed-off-by: Stefan Hajnoczi <>

91b8eddf 06/01/2011 05:43 pm Stefan Hajnoczi

QMP: add get_events(wait=True) option

The get_events() function polls for new QMP events and then returns. It
can be useful to wait for the next QMP event so add the boolean 'wait'
keyword argument.

Signed-off-by: Stefan Hajnoczi <>...

37628f11 06/01/2011 05:43 pm Stefan Hajnoczi

QMP: add server mode to QEMUMonitorProtocol

QEMU supports socket chardevs that establish connections like a server
or a client. The QEMUMonitorProtocol class only supports connecting as
a client. It is not possible to connect race-free when launching QEMU...

6f8c63fb 12/09/2010 03:23 pm Gerd Hoffmann

spice: connection events.

This patch adds support for connection events to spice. The events are
quite simliar to the vnc events. Unlike vnc spice uses multiple tcp
channels though. qemu will report every single tcp connection (aka
spice channel). If you want track spice sessions only you can filter...

11217a75 11/17/2010 01:52 pm Luiz Capitulino

QMP/qmp-shell: Introduce HMP mode

In which qmp-shell will exclusively use the HMP passthrough feature,
this is useful for testing.

Example:

  1. ./qmp-shell -H qmp-sock
    Welcome to the HMP shell!
    Connected to QEMU 0.13.50
(QEMU) info network...
1d00a07d 11/17/2010 01:51 pm Luiz Capitulino

QMP: Revamp the Python class example

This commit simplifies and fixes a number of problems in the Python
QEMUMonitorProtocol example class.

It's almost a rewrite and it DOES BREAK the qmp-shell script (which
is going to be fixed in the next commit).

However, I'm not going to split this in different commits because it...

9bed0d0d 11/17/2010 01:51 pm Luiz Capitulino

QMP: Revamp the qmp-shell script

This commit updates the qmp-shell script to use the new interface
introduced by the last commit.

Additionally, the following fixes/features are also introduced:

o TCP sockets support
o Update/add documentation
o Simple command-line completion...
4cdbc094 11/17/2010 01:51 pm Luiz Capitulino

QMP: Drop vm-info example script

It's broken and not really useful, let's just drop it.

Signed-off-by: Luiz Capitulino <>

7af72c24 10/22/2010 03:08 pm Hidetoshi Seto

Trivial fix for QMP/qmp-events.txt

Fix example of STOP event that was just copy-and-pasted.

Signed-off-by: Hidetoshi Seto <>
Signed-off-by: Luiz Capitulino <>

a18b2ce2 10/01/2010 04:20 pm Luiz Capitulino

QMP/README: Update QMP homepage address

Signed-off-by: Luiz Capitulino <>

82a56f0d 10/01/2010 04:20 pm Luiz Capitulino

Monitor: Introduce the qmp-commands.hx file

This file contains a copy of the following information from the
qemu-monitor.hx file:

o QObject handlers entries
o QMP documentation (all SQMP/EQMP sections)

Right now it's only used to generate the QMP docs in QMP/, but...

d29f3196 08/23/2010 01:11 am Luiz Capitulino

QMP: Update README file

A number of changes I prefer to do in one shot:

- Fix example
- Small clarifications
- Add multiple monitors example
- Add 'Development Process' section

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

8d7e8457 07/01/2010 08:27 pm Jan Kiszka

QMP: Teach basic capability negotiation to python example

As sending "qmp_capabilities" on session start became mandatory, both
python examples were broken.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Luiz Capitulino <>

bbafc7a8 07/01/2010 08:27 pm Jan Kiszka

QMP: Fix python helper /wrt long return strings

Remove the arbitrary limitation of 1024 characters per return string and
read complete lines instead. Required for device_show.

Signed-off-by: Jan Kiszka <>
Signed-off-by: Luiz Capitulino <>

ea4e78e5 06/13/2010 03:33 pm Jan Kiszka

monitor/QMP: Drop info hpet / query-hpet

This command was of minimal use before, now it is useless as the hpet
become a qdev device and is thus easily discoverable. We should
definitely not set query-hpet in QMP's stone, and there is also no good
reason to keep it for the interactive monitor....

b40292e7 06/01/2010 09:48 pm Jan Kiszka

QMP: Introduce commands documentation

One of the most important missing feature in QMP today is its
supported commands documentation.

The plan is to make it part of self-description support, however
self-description is a big task we have been postponing for a...

b3e5e3e6 05/19/2010 06:04 pm Markus Armbruster

QMP: Add "Downstream extension of QMP" to spec

Signed-off-by: Markus Armbruster <>

6ed2c484 05/03/2010 08:39 pm Luiz Capitulino

QMP: Introduce RESUME event

It's emitted when the Virtual Machine resumes execution.

We currently have the STOP event but don't have the matching
RESUME one, this means that clients are notified when the VM
is stopped but don't get anything when it resumes....

db11571f 04/19/2010 12:55 am Luiz Capitulino

QMP: Improve RTC_CHANGE event description

Some people might think that this event is emitted whenever the
time changes, be more specific.

Signed-off-by: Luiz Capitulino <>

9eedeb3b 03/09/2010 04:47 pm Luiz Capitulino

QMP: Introduce WATCHDOG event

It's emitted whenever the watchdog device's timer expires. The action
taken is provided in the 'data' member.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

80cd3478 03/08/2010 07:30 pm Luiz Capitulino

QMP: Introduce RTC_CHANGE event

Emitted whenever the RTC time changes.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

51a3bd71 03/08/2010 07:30 pm Luiz Capitulino

QMP: Drop DEBUG event

This event has been introduced in the first round of QMP commits,
turns out that it's based on the usage of the EXCP_DEBUG macro,
which has discussable semantics when exposed through QMP.

As libvirt doesn't use this, let's just drop it....

d74c7dfd 03/08/2010 07:30 pm Luiz Capitulino

QMP: Revamp the qmp-events.txt file

Now we can say it's useful, the following changes have been made:

- Put events in alphabetical order
- Add examples to all events
- Document all 'data' members
- Small corrections and cleanups

Signed-off-by: Luiz Capitulino <>...

ca9567e2 02/10/2010 08:46 pm Luiz Capitulino

QMP: Add QEMU's version to the greeting message

With capability negotiation support clients will only have a chance
to check QEMU's version (ie. issue 'query-version') after the
negotiation procedure is done.

It might be useful to clients to check QEMU's version before...

5307d7d3 02/10/2010 08:46 pm Luiz Capitulino

QMP: spec: Capability negotiation updates

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

aa1db6ed 02/10/2010 07:57 pm Luiz Capitulino

QMP: BLOCK_IO_ERROR event handling

This commit adds the basic definitions for the BLOCK_IO_ERROR
event, but actual event emission will be introduced by the
next commits.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

0d2ed46a 01/20/2010 12:31 am Luiz Capitulino

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},...

586153d9 01/20/2010 12:31 am Luiz Capitulino

QMP: Introduce VNC_CONNECTED event

It's emitted when a VNC client connects to QEMU, client's information
such as port and IP address are provided.

Note that this event is emitted right when the connection is
established. This means that it happens before authentication...

0d72f3d3 01/20/2010 12:31 am Luiz Capitulino

QMP: Introduce VNC_DISCONNECTED event

It's emitted when a VNC client disconnects from QEMU, client's
information such as port and IP address are provided.

Event example:

{ "event": "VNC_DISCONNECTED",
"timestamp": { "seconds": 1262976601, "microseconds": 975795 },...

94048982 12/19/2009 04:26 pm Luiz Capitulino

QMP: Update spec file

- Remove "draft" status
- Change default success response to be json-object
- Change error and event data member to be a json-object
- Update examples
- Add new section "Compatibility Considerations"
- Other fixes and clarifications...

052f1b9b 12/19/2009 04:26 pm Luiz Capitulino

QMP: Update README file

- Fix output description
- Fix command-line usage notes
- Minor improvements

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

77e595e7 12/08/2009 12:34 am Markus Armbruster

QMP: add human-readable description to error response

Signed-off-by: Markus Armbruster <>
Signed-off-by: Anthony Liguori <>

cedebdac 12/03/2009 05:41 pm Luiz Capitulino

QMP: Introduce qmp-shell

This is a very simple shell written in Python for demonstration
purposes.

Unfortunately it's a bit awkward right now, as the user has
to specify the arguments names and the printed data can be
a raw dictionary or list, like the following example:...

01f2785e 12/03/2009 05:41 pm Luiz Capitulino

QMP: Introduce vm-info

A Python script which uses qmp.py to print some simple VM info.

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

26d5a1cd 12/03/2009 05:41 pm Luiz Capitulino

QMP: Introduce README file

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

f544d174 12/03/2009 05:41 pm Luiz Capitulino

QMP: Introduce specification

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>

e2419113 12/03/2009 05:41 pm Luiz Capitulino

QMP: Introduce qmp-events.txt

Signed-off-by: Luiz Capitulino <>
Signed-off-by: Anthony Liguori <>