MonitorProtocol: Difference between revisions
No edit summary |
No edit summary |
||
Line 122: | Line 122: | ||
|do_balloon() | |do_balloon() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 132: | Line 132: | ||
|do_change() | |do_change() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
|do_closefd() | |do_closefd() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 147: | Line 147: | ||
|do_cont() | |do_cont() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
Line 172: | Line 172: | ||
|do_eject() | |do_eject() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 182: | Line 182: | ||
|do_getfd() | |do_getfd() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 192: | Line 192: | ||
|do_info() | |do_info() | ||
|merged | |merged | ||
|0. | |0.12 | ||
|as 'query-' commands | |as 'query-' commands | ||
|- | |- | ||
Line 237: | Line 237: | ||
|do_memory_save() | |do_memory_save() | ||
|partial | |partial | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
|do_migrate() | |do_migrate() | ||
|partial | |partial | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
|do_migrate_cancel() | |do_migrate_cancel() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
Line 257: | Line 257: | ||
|do_migrate_set_speed() | |do_migrate_set_speed() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 277: | Line 277: | ||
|do_pci_device_hot_remove() | |do_pci_device_hot_remove() | ||
|partial | |partial | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 287: | Line 287: | ||
|do_physical_memory_save() | |do_physical_memory_save() | ||
|partial | |partial | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 297: | Line 297: | ||
|do_quit() | |do_quit() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 327: | Line 327: | ||
|do_stop() | |do_stop() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 342: | Line 342: | ||
|do_system_powerdown() | |do_system_powerdown() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
|do_system_reset() | |do_system_reset() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
Line 397: | Line 397: | ||
|pci_device_hot_add() | |pci_device_hot_add() | ||
|partial | |partial | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 412: | Line 412: | ||
|bdrv_info() | |bdrv_info() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
|bdrv_info_stats() | |bdrv_info_stats() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
|do_info_balloon() | |do_info_balloon() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 432: | Line 432: | ||
|do_info_cpus() | |do_info_cpus() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 447: | Line 447: | ||
|do_info_hpet() | |do_info_hpet() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 457: | Line 457: | ||
|do_info_kvm() | |do_info_kvm() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
|do_info_mice() | |do_info_mice() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- style="background-color:yellow;" | |- style="background-color:yellow;" | ||
|do_info_migrate() | |do_info_migrate() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
|do_info_name() | |do_info_name() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 517: | Line 517: | ||
|do_info_status() | |do_info_status() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 527: | Line 527: | ||
|do_info_uuid() | |do_info_uuid() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
|do_info_version() | |do_info_version() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
|do_info_vnc() | |do_info_vnc() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- | ||
Line 567: | Line 567: | ||
|qemu_chr_info() | |qemu_chr_info() | ||
|merged | |merged | ||
|0. | |0.12 | ||
| | | | ||
|- | |- |
Revision as of 14:31, 18 December 2009
QEMU Monitor Protocol
The QEMU Monitor Protocol (QMP) allows applications to communicate with QEMU's Monitor.
QMP is JSON-based, its main features are:
- Lightweight
- Text-based, easy to parse data format
- Asynchronous events support
The README file explains how to use it and its full specification can be found here.
General Status
A preview version of QMP is available in QEMU version 0.12.
However, QMP is under heavy development being still considered unstable and incomplete. For more information about converted handlers, please check #Conversion Status.
Examples
In the following examples, 'C' stands for 'Client' and 'S' stands for 'Server'.
Server Greeting
S: {"QMP": {"capabilities": []}}
Query version
C: { "execute": "query-version" } S: {"return": {"qemu": "0.11.50", "package": ""}}
Eject a device
C: { "execute": "eject", "arguments": { "device": "ide1-cd0" } } S: {"return": "OK"}
Development
Primary contact is Luiz Capitulino, but most QMP-related discussions happen on the qemu-devel mailing list.
Next features, hot fixes and other patches are stored in the QMP unstable repository:
http://repo.or.cz/w/qemu/qmp-unstable.git
NOTE: all branches in this repository are constantly rebased.
TODO
- High-level documentation
- Convert all commands
- Proper error handling support
- Asynchronous commands support
- Better QObjects and QMP debug support
- Libqmp
Conversion Status
UPDATED: 2009-12-16
Command | Info | |
Handlers | 62 | 36 |
Converted | 19 | 15 |
Percentage | 30% | 41% |
The following tables have a per-function status. There is one table for command handlers and another one for info handlers.
Status can be:
- merged: already merged upstream
- converted: converted but not merged yet
- partial: merged, but error handling is incomplete
NOTE: Handlers used by Libvirt are marked with yellow.
Command handlers
Handler name | Status | Version | Comments |
do_acl_add() | |||
do_acl_policy() | |||
do_acl_remove() | |||
do_acl_reset() | |||
do_acl_show() | |||
do_balloon() | merged | 0.12 | |
do_boot_set() | |||
do_change() | merged | 0.12 | |
do_closefd() | merged | 0.12 | |
do_commit() | |||
do_cont() | merged | 0.12 | |
do_cpu_set() | |||
do_delvm() | |||
do_device_add() | |||
do_device_del() | |||
do_eject() | merged | 0.12 | |
do_gdbserver() | |||
do_getfd() | merged | 0.12 | |
do_help_cmd() | |||
do_info() | merged | 0.12 | as 'query-' commands |
do_inject_mce() | |||
do_inject_nmi() | |||
do_ioport_read() | |||
do_ioport_write() | |||
do_loadvm() | |||
do_log() | |||
do_logfile() | |||
do_memory_dump() | |||
do_memory_save() | partial | 0.12 | |
do_migrate() | partial | 0.12 | |
do_migrate_cancel() | merged | 0.12 | |
do_migrate_set_downtime() | |||
do_migrate_set_speed() | merged | 0.12 | |
do_mouse_button() | |||
do_mouse_move() | |||
do_mouse_set() | |||
do_pci_device_hot_remove() | partial | 0.12 | |
do_physical_memory_dump() | |||
do_physical_memory_save() | partial | 0.12 | |
do_print() | |||
do_quit() | merged | 0.12 | |
do_savevm() | |||
do_screen_dump() | |||
do_sendkey() | |||
do_set_link() | |||
do_singlestep() | |||
do_stop() | merged | 0.12 | |
do_stop_capture() | |||
do_sum() | |||
do_system_powerdown() | merged | 0.12 | |
do_system_reset() | merged | 0.12 | |
do_usb_add() | |||
do_usb_del() | |||
do_watchdog_action() | |||
do_wav_capture() | |||
drive_hot_add() | |||
net_host_device_add() | |||
net_host_device_remove() | |||
net_slirp_hostfwd_add() | |||
net_slirp_hostfwd_remove() | |||
pci_device_hot_add() | partial | 0.12 |
Info handlers
Handler name | Status | Version | Comments |
bdrv_info() | merged | 0.12 | |
bdrv_info_stats() | merged | 0.12 | |
do_info_balloon() | merged | 0.12 | |
do_info_capture() | |||
do_info_cpus() | merged | 0.12 | |
do_info_cpu_stats() | |||
do_info_history() | |||
do_info_hpet() | merged | 0.12 | |
do_info_jit() | |||
do_info_kvm() | merged | 0.12 | |
do_info_mice() | merged | 0.12 | |
do_info_migrate() | merged | 0.12 | |
do_info_name() | merged | 0.12 | |
do_info_network() | |||
do_info_numa() | |||
do_info_profile() | |||
do_info_qdm() | |||
do_info_qtree() | |||
do_info_registers() | |||
do_info_roms() | |||
do_info_snapshots() | |||
do_info_status() | merged | 0.12 | |
do_info_usernet() | |||
do_info_uuid() | merged | 0.12 | |
do_info_version() | merged | 0.12 | |
do_info_vnc() | merged | 0.12 | |
irq_info() | |||
mem_info() | |||
pci_info() | |||
pcmcia_info() | |||
pic_info() | |||
qemu_chr_info() | merged | 0.12 | |
tlb_info() | |||
usb_host_info() | |||
usb_info() |
History
This was the fourth proposal for a Monitor protocol, past discussions can be found in the following links: