]> git.proxmox.com Git - qemu.git/blob - QMP/README
QMP: Introduce commands documentation
[qemu.git] / QMP / README
1 QEMU Monitor Protocol
2 =====================
3
4 Introduction
5 -------------
6
7 The QEMU Monitor Protocol (QMP) allows applications to communicate with
8 QEMU's Monitor.
9
10 QMP is JSON[1] based and has the following features:
11
12 - Lightweight, text-based, easy to parse data format
13 - Asynchronous events support
14 - Stability
15
16 For more information, please, refer to the following files:
17
18 o qmp-spec.txt QEMU Monitor Protocol current specification
19 o qmp-commands.txt QMP supported commands
20 o qmp-events.txt List of available asynchronous events
21
22 There are also two simple Python scripts available:
23
24 o qmp-shell A shell
25 o vm-info Show some information about the Virtual Machine
26
27 [1] http://www.json.org
28
29 Usage
30 -----
31
32 To enable QMP, QEMU has to be started in "control mode". There are
33 two ways of doing this, the simplest one is using the the '-qmp'
34 command-line option.
35
36 For example:
37
38 $ qemu [...] -qmp tcp:localhost:4444,server
39
40 Will start QEMU in control mode, waiting for a client TCP connection
41 on localhost port 4444.
42
43 It is also possible to use the '-mon' command-line option to have
44 more complex combinations. Please, refer to the QEMU's manpage for
45 more information.
46
47 Simple Testing
48 --------------
49
50 To manually test QMP one can connect with telnet and issue commands:
51
52 $ telnet localhost 4444
53 Trying 127.0.0.1...
54 Connected to localhost.
55 Escape character is '^]'.
56 {"QMP": {"version": {"qemu": "0.12.50", "package": ""}, "capabilities": []}}
57 { "execute": "qmp_capabilities" }
58 {"return": {}}
59 { "execute": "query-version" }
60 {"return": {"qemu": "0.12.50", "package": ""}}
61
62 Contact
63 -------
64
65 http://www.linux-kvm.org/page/MonitorProtocol
66 Luiz Fernando N. Capitulino <lcapitulino@redhat.com>