MonitorProtocol: Difference between revisions

From KVM
No edit summary
No edit summary
Line 19: Line 19:
== Project status (2009-10-20) ==
== Project status (2009-10-20) ==


Most of the infrastructure has been merged, a JSON encoder/decoder should be merged in the next days. The only important missing part is error handling.
Most of the infrastructure has been merged, a JSON encoder/decoder should be merged in the next days. The only important missing part is error infrastructure.


Some conversions are taking place in parallel, but some depend on not merged work.
Additionally, all command handlers need to be converted to use ''QObjects''. This work is in progress, but some handlers depend on the JSON encoder/decoder.


=== Main building blocks ===
=== Main building blocks ===
Line 42: Line 42:
http://repo.or.cz/w/qemu/qmp-unstable.git
http://repo.or.cz/w/qemu/qmp-unstable.git


All branches in this repository are '''constantly rebased''', the ''master'' one contains a functional QMP implementation for emission only (includes asynchronous messages).
'''All''' branches in this repository are '''constantly rebased''', the ''master'' one contains a functional QMP implementation for emission only (includes asynchronous messages).


The current protocol specification draft and other documentation can be found in the [http://repo.or.cz/w/qemu/qmp-unstable.git?a=tree;f=QMP;h=290262119cc6c9e07a6ef7a078384ef12c491e51;hb=HEAD QMP] directory of the ''master'' branch.
The current protocol specification draft and other documentation can be found in the [http://repo.or.cz/w/qemu/qmp-unstable.git?a=tree;f=QMP;h=290262119cc6c9e07a6ef7a078384ef12c491e51;hb=HEAD QMP] directory of the ''master'' branch.

Revision as of 14:07, 20 October 2009

Monitor Protocol

This is the page of the QEMU Monitor Protocol (QMP) project, which aims to implement a JSON based protocol for QEMU.

Problem

QEMU does not provide a way for applications to control it at the "machine level", that is, the current existing interface (called Monitor) was designed for human interaction only.

This is very problematic for applications, for the following reasons:

  • It is needed to parse output meant to be read by humans
  • It is not reliable, because it is not always possible to know whether a command has been successfully executed or not
  • It lacks support for asynchronous events

Solution

Improve QEMU's Monitor to support a JSON based protocol.

Project status (2009-10-20)

Most of the infrastructure has been merged, a JSON encoder/decoder should be merged in the next days. The only important missing part is error infrastructure.

Additionally, all command handlers need to be converted to use QObjects. This work is in progress, but some handlers depend on the JSON encoder/decoder.

Main building blocks

  • QObject Layer (merged)
  • QObject Monitor infrastructure (merged)
  • JSON encoder/decoder (under review)
  • Error handling (under discussion)

Command handlers Conversion work

  • Input through QDict (merged)
  • Output in QObject style (in progress)
  • Error handling (not started yet)

Development

The development takes place in the QMP unstable tree:

http://repo.or.cz/w/qemu/qmp-unstable.git

All branches in this repository are constantly rebased, the master one contains a functional QMP implementation for emission only (includes asynchronous messages).

The current protocol specification draft and other documentation can be found in the QMP directory of the master branch.

History

This is the fourth proposal for a machine protocol, past discussions can be found in the following links: