Statistics
| Branch: | Revision:

root / qmp-commands.hx @ 7db2145a

History | View | Annotate | Download (66 kB)

1 82a56f0d Luiz Capitulino
HXCOMM QMP dispatch table and documentation
2 82a56f0d Luiz Capitulino
HXCOMM Text between SQMP and EQMP is copied to the QMP documention file and
3 82a56f0d Luiz Capitulino
HXCOMM does not show up in the other formats.
4 82a56f0d Luiz Capitulino
5 82a56f0d Luiz Capitulino
SQMP
6 82a56f0d Luiz Capitulino
                        QMP Supported Commands
7 82a56f0d Luiz Capitulino
                        ----------------------
8 82a56f0d Luiz Capitulino
9 82a56f0d Luiz Capitulino
This document describes all commands currently supported by QMP.
10 82a56f0d Luiz Capitulino
11 82a56f0d Luiz Capitulino
Most of the time their usage is exactly the same as in the user Monitor, this
12 82a56f0d Luiz Capitulino
means that any other document which also describe commands (the manpage,
13 82a56f0d Luiz Capitulino
QEMU's manual, etc) can and should be consulted.
14 82a56f0d Luiz Capitulino
15 82a56f0d Luiz Capitulino
QMP has two types of commands: regular and query commands. Regular commands
16 82a56f0d Luiz Capitulino
usually change the Virtual Machine's state someway, while query commands just
17 82a56f0d Luiz Capitulino
return information. The sections below are divided accordingly.
18 82a56f0d Luiz Capitulino
19 82a56f0d Luiz Capitulino
It's important to observe that all communication examples are formatted in
20 82a56f0d Luiz Capitulino
a reader-friendly way, so that they're easier to understand. However, in real
21 82a56f0d Luiz Capitulino
protocol usage, they're emitted as a single line.
22 82a56f0d Luiz Capitulino
23 82a56f0d Luiz Capitulino
Also, the following notation is used to denote data flow:
24 82a56f0d Luiz Capitulino
25 82a56f0d Luiz Capitulino
-> data issued by the Client
26 82a56f0d Luiz Capitulino
<- Server data response
27 82a56f0d Luiz Capitulino
28 82a56f0d Luiz Capitulino
Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
29 82a56f0d Luiz Capitulino
information on the Server command and response formats.
30 82a56f0d Luiz Capitulino
31 82a56f0d Luiz Capitulino
NOTE: This document is temporary and will be replaced soon.
32 82a56f0d Luiz Capitulino
33 82a56f0d Luiz Capitulino
1. Stability Considerations
34 82a56f0d Luiz Capitulino
===========================
35 82a56f0d Luiz Capitulino
36 82a56f0d Luiz Capitulino
The current QMP command set (described in this file) may be useful for a
37 82a56f0d Luiz Capitulino
number of use cases, however it's limited and several commands have bad
38 82a56f0d Luiz Capitulino
defined semantics, specially with regard to command completion.
39 82a56f0d Luiz Capitulino
40 82a56f0d Luiz Capitulino
These problems are going to be solved incrementally in the next QEMU releases
41 82a56f0d Luiz Capitulino
and we're going to establish a deprecation policy for badly defined commands.
42 82a56f0d Luiz Capitulino
43 82a56f0d Luiz Capitulino
If you're planning to adopt QMP, please observe the following:
44 82a56f0d Luiz Capitulino
45 c20cdf8b Zhi Yong Wu
    1. The deprecation policy will take effect and be documented soon, please
46 82a56f0d Luiz Capitulino
       check the documentation of each used command as soon as a new release of
47 82a56f0d Luiz Capitulino
       QEMU is available
48 82a56f0d Luiz Capitulino
49 82a56f0d Luiz Capitulino
    2. DO NOT rely on anything which is not explicit documented
50 82a56f0d Luiz Capitulino
51 82a56f0d Luiz Capitulino
    3. Errors, in special, are not documented. Applications should NOT check
52 82a56f0d Luiz Capitulino
       for specific errors classes or data (it's strongly recommended to only
53 82a56f0d Luiz Capitulino
       check for the "error" key)
54 82a56f0d Luiz Capitulino
55 82a56f0d Luiz Capitulino
2. Regular Commands
56 82a56f0d Luiz Capitulino
===================
57 82a56f0d Luiz Capitulino
58 82a56f0d Luiz Capitulino
Server's responses in the examples below are always a success response, please
59 82a56f0d Luiz Capitulino
refer to the QMP specification for more details on error responses.
60 82a56f0d Luiz Capitulino
61 82a56f0d Luiz Capitulino
EQMP
62 82a56f0d Luiz Capitulino
63 82a56f0d Luiz Capitulino
    {
64 82a56f0d Luiz Capitulino
        .name       = "quit",
65 82a56f0d Luiz Capitulino
        .args_type  = "",
66 7a7f325e Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_quit,
67 82a56f0d Luiz Capitulino
    },
68 82a56f0d Luiz Capitulino
69 82a56f0d Luiz Capitulino
SQMP
70 82a56f0d Luiz Capitulino
quit
71 82a56f0d Luiz Capitulino
----
72 82a56f0d Luiz Capitulino
73 82a56f0d Luiz Capitulino
Quit the emulator.
74 82a56f0d Luiz Capitulino
75 82a56f0d Luiz Capitulino
Arguments: None.
76 82a56f0d Luiz Capitulino
77 82a56f0d Luiz Capitulino
Example:
78 82a56f0d Luiz Capitulino
79 82a56f0d Luiz Capitulino
-> { "execute": "quit" }
80 82a56f0d Luiz Capitulino
<- { "return": {} }
81 82a56f0d Luiz Capitulino
82 82a56f0d Luiz Capitulino
EQMP
83 82a56f0d Luiz Capitulino
84 82a56f0d Luiz Capitulino
    {
85 82a56f0d Luiz Capitulino
        .name       = "eject",
86 82a56f0d Luiz Capitulino
        .args_type  = "force:-f,device:B",
87 c245b6a3 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_eject,
88 82a56f0d Luiz Capitulino
    },
89 82a56f0d Luiz Capitulino
90 82a56f0d Luiz Capitulino
SQMP
91 82a56f0d Luiz Capitulino
eject
92 82a56f0d Luiz Capitulino
-----
93 82a56f0d Luiz Capitulino
94 82a56f0d Luiz Capitulino
Eject a removable medium.
95 82a56f0d Luiz Capitulino
96 82a56f0d Luiz Capitulino
Arguments: 
97 82a56f0d Luiz Capitulino
98 82a56f0d Luiz Capitulino
- force: force ejection (json-bool, optional)
99 82a56f0d Luiz Capitulino
- device: device name (json-string)
100 82a56f0d Luiz Capitulino
101 82a56f0d Luiz Capitulino
Example:
102 82a56f0d Luiz Capitulino
103 82a56f0d Luiz Capitulino
-> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
104 82a56f0d Luiz Capitulino
<- { "return": {} }
105 82a56f0d Luiz Capitulino
106 82a56f0d Luiz Capitulino
Note: The "force" argument defaults to false.
107 82a56f0d Luiz Capitulino
108 82a56f0d Luiz Capitulino
EQMP
109 82a56f0d Luiz Capitulino
110 82a56f0d Luiz Capitulino
    {
111 82a56f0d Luiz Capitulino
        .name       = "change",
112 82a56f0d Luiz Capitulino
        .args_type  = "device:B,target:F,arg:s?",
113 333a96ec Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_change,
114 82a56f0d Luiz Capitulino
    },
115 82a56f0d Luiz Capitulino
116 82a56f0d Luiz Capitulino
SQMP
117 82a56f0d Luiz Capitulino
change
118 82a56f0d Luiz Capitulino
------
119 82a56f0d Luiz Capitulino
120 82a56f0d Luiz Capitulino
Change a removable medium or VNC configuration.
121 82a56f0d Luiz Capitulino
122 82a56f0d Luiz Capitulino
Arguments:
123 82a56f0d Luiz Capitulino
124 82a56f0d Luiz Capitulino
- "device": device name (json-string)
125 82a56f0d Luiz Capitulino
- "target": filename or item (json-string)
126 82a56f0d Luiz Capitulino
- "arg": additional argument (json-string, optional)
127 82a56f0d Luiz Capitulino
128 82a56f0d Luiz Capitulino
Examples:
129 82a56f0d Luiz Capitulino
130 82a56f0d Luiz Capitulino
1. Change a removable medium
131 82a56f0d Luiz Capitulino
132 82a56f0d Luiz Capitulino
-> { "execute": "change",
133 82a56f0d Luiz Capitulino
             "arguments": { "device": "ide1-cd0",
134 82a56f0d Luiz Capitulino
                            "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
135 82a56f0d Luiz Capitulino
<- { "return": {} }
136 82a56f0d Luiz Capitulino
137 82a56f0d Luiz Capitulino
2. Change VNC password
138 82a56f0d Luiz Capitulino
139 82a56f0d Luiz Capitulino
-> { "execute": "change",
140 82a56f0d Luiz Capitulino
             "arguments": { "device": "vnc", "target": "password",
141 82a56f0d Luiz Capitulino
                            "arg": "foobar1" } }
142 82a56f0d Luiz Capitulino
<- { "return": {} }
143 82a56f0d Luiz Capitulino
144 82a56f0d Luiz Capitulino
EQMP
145 82a56f0d Luiz Capitulino
146 82a56f0d Luiz Capitulino
    {
147 82a56f0d Luiz Capitulino
        .name       = "screendump",
148 82a56f0d Luiz Capitulino
        .args_type  = "filename:F",
149 ad39cf6d Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_screendump,
150 82a56f0d Luiz Capitulino
    },
151 82a56f0d Luiz Capitulino
152 82a56f0d Luiz Capitulino
SQMP
153 82a56f0d Luiz Capitulino
screendump
154 82a56f0d Luiz Capitulino
----------
155 82a56f0d Luiz Capitulino
156 82a56f0d Luiz Capitulino
Save screen into PPM image.
157 82a56f0d Luiz Capitulino
158 82a56f0d Luiz Capitulino
Arguments:
159 82a56f0d Luiz Capitulino
160 82a56f0d Luiz Capitulino
- "filename": file path (json-string)
161 82a56f0d Luiz Capitulino
162 82a56f0d Luiz Capitulino
Example:
163 82a56f0d Luiz Capitulino
164 82a56f0d Luiz Capitulino
-> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
165 82a56f0d Luiz Capitulino
<- { "return": {} }
166 82a56f0d Luiz Capitulino
167 82a56f0d Luiz Capitulino
EQMP
168 82a56f0d Luiz Capitulino
169 82a56f0d Luiz Capitulino
    {
170 82a56f0d Luiz Capitulino
        .name       = "stop",
171 82a56f0d Luiz Capitulino
        .args_type  = "",
172 5f158f21 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_stop,
173 82a56f0d Luiz Capitulino
    },
174 82a56f0d Luiz Capitulino
175 82a56f0d Luiz Capitulino
SQMP
176 82a56f0d Luiz Capitulino
stop
177 82a56f0d Luiz Capitulino
----
178 82a56f0d Luiz Capitulino
179 82a56f0d Luiz Capitulino
Stop the emulator.
180 82a56f0d Luiz Capitulino
181 82a56f0d Luiz Capitulino
Arguments: None.
182 82a56f0d Luiz Capitulino
183 82a56f0d Luiz Capitulino
Example:
184 82a56f0d Luiz Capitulino
185 82a56f0d Luiz Capitulino
-> { "execute": "stop" }
186 82a56f0d Luiz Capitulino
<- { "return": {} }
187 82a56f0d Luiz Capitulino
188 82a56f0d Luiz Capitulino
EQMP
189 82a56f0d Luiz Capitulino
190 82a56f0d Luiz Capitulino
    {
191 82a56f0d Luiz Capitulino
        .name       = "cont",
192 82a56f0d Luiz Capitulino
        .args_type  = "",
193 e42e818b Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_cont,
194 82a56f0d Luiz Capitulino
    },
195 82a56f0d Luiz Capitulino
196 82a56f0d Luiz Capitulino
SQMP
197 82a56f0d Luiz Capitulino
cont
198 82a56f0d Luiz Capitulino
----
199 82a56f0d Luiz Capitulino
200 82a56f0d Luiz Capitulino
Resume emulation.
201 82a56f0d Luiz Capitulino
202 82a56f0d Luiz Capitulino
Arguments: None.
203 82a56f0d Luiz Capitulino
204 82a56f0d Luiz Capitulino
Example:
205 82a56f0d Luiz Capitulino
206 82a56f0d Luiz Capitulino
-> { "execute": "cont" }
207 82a56f0d Luiz Capitulino
<- { "return": {} }
208 9b9df25a Gerd Hoffmann
209 9b9df25a Gerd Hoffmann
EQMP
210 9b9df25a Gerd Hoffmann
211 9b9df25a Gerd Hoffmann
    {
212 9b9df25a Gerd Hoffmann
        .name       = "system_wakeup",
213 9b9df25a Gerd Hoffmann
        .args_type  = "",
214 9b9df25a Gerd Hoffmann
        .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
215 9b9df25a Gerd Hoffmann
    },
216 9b9df25a Gerd Hoffmann
217 9b9df25a Gerd Hoffmann
SQMP
218 9b9df25a Gerd Hoffmann
system_wakeup
219 9b9df25a Gerd Hoffmann
-------------
220 9b9df25a Gerd Hoffmann
221 9b9df25a Gerd Hoffmann
Wakeup guest from suspend.
222 9b9df25a Gerd Hoffmann
223 9b9df25a Gerd Hoffmann
Arguments: None.
224 9b9df25a Gerd Hoffmann
225 9b9df25a Gerd Hoffmann
Example:
226 9b9df25a Gerd Hoffmann
227 9b9df25a Gerd Hoffmann
-> { "execute": "system_wakeup" }
228 9b9df25a Gerd Hoffmann
<- { "return": {} }
229 82a56f0d Luiz Capitulino
230 82a56f0d Luiz Capitulino
EQMP
231 82a56f0d Luiz Capitulino
232 82a56f0d Luiz Capitulino
    {
233 82a56f0d Luiz Capitulino
        .name       = "system_reset",
234 82a56f0d Luiz Capitulino
        .args_type  = "",
235 38d22653 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_system_reset,
236 82a56f0d Luiz Capitulino
    },
237 82a56f0d Luiz Capitulino
238 82a56f0d Luiz Capitulino
SQMP
239 82a56f0d Luiz Capitulino
system_reset
240 82a56f0d Luiz Capitulino
------------
241 82a56f0d Luiz Capitulino
242 82a56f0d Luiz Capitulino
Reset the system.
243 82a56f0d Luiz Capitulino
244 82a56f0d Luiz Capitulino
Arguments: None.
245 82a56f0d Luiz Capitulino
246 82a56f0d Luiz Capitulino
Example:
247 82a56f0d Luiz Capitulino
248 82a56f0d Luiz Capitulino
-> { "execute": "system_reset" }
249 82a56f0d Luiz Capitulino
<- { "return": {} }
250 82a56f0d Luiz Capitulino
251 82a56f0d Luiz Capitulino
EQMP
252 82a56f0d Luiz Capitulino
253 82a56f0d Luiz Capitulino
    {
254 82a56f0d Luiz Capitulino
        .name       = "system_powerdown",
255 82a56f0d Luiz Capitulino
        .args_type  = "",
256 22e1bb9c Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
257 82a56f0d Luiz Capitulino
    },
258 82a56f0d Luiz Capitulino
259 82a56f0d Luiz Capitulino
SQMP
260 82a56f0d Luiz Capitulino
system_powerdown
261 82a56f0d Luiz Capitulino
----------------
262 82a56f0d Luiz Capitulino
263 82a56f0d Luiz Capitulino
Send system power down event.
264 82a56f0d Luiz Capitulino
265 82a56f0d Luiz Capitulino
Arguments: None.
266 82a56f0d Luiz Capitulino
267 82a56f0d Luiz Capitulino
Example:
268 82a56f0d Luiz Capitulino
269 82a56f0d Luiz Capitulino
-> { "execute": "system_powerdown" }
270 82a56f0d Luiz Capitulino
<- { "return": {} }
271 82a56f0d Luiz Capitulino
272 82a56f0d Luiz Capitulino
EQMP
273 82a56f0d Luiz Capitulino
274 82a56f0d Luiz Capitulino
    {
275 82a56f0d Luiz Capitulino
        .name       = "device_add",
276 82a56f0d Luiz Capitulino
        .args_type  = "device:O",
277 82a56f0d Luiz Capitulino
        .params     = "driver[,prop=value][,...]",
278 82a56f0d Luiz Capitulino
        .help       = "add device, like -device on the command line",
279 82a56f0d Luiz Capitulino
        .user_print = monitor_user_noop,
280 82a56f0d Luiz Capitulino
        .mhandler.cmd_new = do_device_add,
281 82a56f0d Luiz Capitulino
    },
282 82a56f0d Luiz Capitulino
283 82a56f0d Luiz Capitulino
SQMP
284 82a56f0d Luiz Capitulino
device_add
285 82a56f0d Luiz Capitulino
----------
286 82a56f0d Luiz Capitulino
287 82a56f0d Luiz Capitulino
Add a device.
288 82a56f0d Luiz Capitulino
289 82a56f0d Luiz Capitulino
Arguments:
290 82a56f0d Luiz Capitulino
291 82a56f0d Luiz Capitulino
- "driver": the name of the new device's driver (json-string)
292 82a56f0d Luiz Capitulino
- "bus": the device's parent bus (device tree path, json-string, optional)
293 82a56f0d Luiz Capitulino
- "id": the device's ID, must be unique (json-string)
294 82a56f0d Luiz Capitulino
- device properties
295 82a56f0d Luiz Capitulino
296 82a56f0d Luiz Capitulino
Example:
297 82a56f0d Luiz Capitulino
298 82a56f0d Luiz Capitulino
-> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
299 82a56f0d Luiz Capitulino
<- { "return": {} }
300 82a56f0d Luiz Capitulino
301 82a56f0d Luiz Capitulino
Notes:
302 82a56f0d Luiz Capitulino
303 82a56f0d Luiz Capitulino
(1) For detailed information about this command, please refer to the
304 82a56f0d Luiz Capitulino
    'docs/qdev-device-use.txt' file.
305 82a56f0d Luiz Capitulino
306 82a56f0d Luiz Capitulino
(2) It's possible to list device properties by running QEMU with the
307 82a56f0d Luiz Capitulino
    "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
308 82a56f0d Luiz Capitulino
309 82a56f0d Luiz Capitulino
EQMP
310 82a56f0d Luiz Capitulino
311 82a56f0d Luiz Capitulino
    {
312 82a56f0d Luiz Capitulino
        .name       = "device_del",
313 82a56f0d Luiz Capitulino
        .args_type  = "id:s",
314 a15fef21 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_device_del,
315 82a56f0d Luiz Capitulino
    },
316 82a56f0d Luiz Capitulino
317 82a56f0d Luiz Capitulino
SQMP
318 82a56f0d Luiz Capitulino
device_del
319 82a56f0d Luiz Capitulino
----------
320 82a56f0d Luiz Capitulino
321 82a56f0d Luiz Capitulino
Remove a device.
322 82a56f0d Luiz Capitulino
323 82a56f0d Luiz Capitulino
Arguments:
324 82a56f0d Luiz Capitulino
325 82a56f0d Luiz Capitulino
- "id": the device's ID (json-string)
326 82a56f0d Luiz Capitulino
327 82a56f0d Luiz Capitulino
Example:
328 82a56f0d Luiz Capitulino
329 82a56f0d Luiz Capitulino
-> { "execute": "device_del", "arguments": { "id": "net1" } }
330 82a56f0d Luiz Capitulino
<- { "return": {} }
331 82a56f0d Luiz Capitulino
332 82a56f0d Luiz Capitulino
EQMP
333 82a56f0d Luiz Capitulino
334 82a56f0d Luiz Capitulino
    {
335 e4c8f004 Amos Kong
        .name       = "send-key",
336 e4c8f004 Amos Kong
        .args_type  = "keys:O,hold-time:i?",
337 e4c8f004 Amos Kong
        .mhandler.cmd_new = qmp_marshal_input_send_key,
338 e4c8f004 Amos Kong
    },
339 e4c8f004 Amos Kong
340 e4c8f004 Amos Kong
SQMP
341 e4c8f004 Amos Kong
send-key
342 e4c8f004 Amos Kong
----------
343 e4c8f004 Amos Kong
344 e4c8f004 Amos Kong
Send keys to VM.
345 e4c8f004 Amos Kong
346 e4c8f004 Amos Kong
Arguments:
347 e4c8f004 Amos Kong
348 e4c8f004 Amos Kong
keys array:
349 e4c8f004 Amos Kong
    - "key": key sequence (a json-array of key enum values)
350 e4c8f004 Amos Kong
351 e4c8f004 Amos Kong
- hold-time: time to delay key up events, milliseconds. Defaults to 100
352 e4c8f004 Amos Kong
             (json-int, optional)
353 e4c8f004 Amos Kong
354 e4c8f004 Amos Kong
Example:
355 e4c8f004 Amos Kong
356 e4c8f004 Amos Kong
-> { "execute": "send-key",
357 e4c8f004 Amos Kong
     "arguments": { 'keys': [ 'ctrl', 'alt', 'delete' ] } }
358 e4c8f004 Amos Kong
<- { "return": {} }
359 e4c8f004 Amos Kong
360 e4c8f004 Amos Kong
EQMP
361 e4c8f004 Amos Kong
362 e4c8f004 Amos Kong
    {
363 82a56f0d Luiz Capitulino
        .name       = "cpu",
364 82a56f0d Luiz Capitulino
        .args_type  = "index:i",
365 755f1968 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_cpu,
366 82a56f0d Luiz Capitulino
    },
367 82a56f0d Luiz Capitulino
368 82a56f0d Luiz Capitulino
SQMP
369 82a56f0d Luiz Capitulino
cpu
370 82a56f0d Luiz Capitulino
---
371 82a56f0d Luiz Capitulino
372 82a56f0d Luiz Capitulino
Set the default CPU.
373 82a56f0d Luiz Capitulino
374 82a56f0d Luiz Capitulino
Arguments:
375 82a56f0d Luiz Capitulino
376 82a56f0d Luiz Capitulino
- "index": the CPU's index (json-int)
377 82a56f0d Luiz Capitulino
378 82a56f0d Luiz Capitulino
Example:
379 82a56f0d Luiz Capitulino
380 82a56f0d Luiz Capitulino
-> { "execute": "cpu", "arguments": { "index": 0 } }
381 82a56f0d Luiz Capitulino
<- { "return": {} }
382 82a56f0d Luiz Capitulino
383 82a56f0d Luiz Capitulino
Note: CPUs' indexes are obtained with the 'query-cpus' command.
384 82a56f0d Luiz Capitulino
385 82a56f0d Luiz Capitulino
EQMP
386 82a56f0d Luiz Capitulino
387 82a56f0d Luiz Capitulino
    {
388 82a56f0d Luiz Capitulino
        .name       = "memsave",
389 0cfd6a9a Luiz Capitulino
        .args_type  = "val:l,size:i,filename:s,cpu:i?",
390 0cfd6a9a Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_memsave,
391 82a56f0d Luiz Capitulino
    },
392 82a56f0d Luiz Capitulino
393 82a56f0d Luiz Capitulino
SQMP
394 82a56f0d Luiz Capitulino
memsave
395 82a56f0d Luiz Capitulino
-------
396 82a56f0d Luiz Capitulino
397 82a56f0d Luiz Capitulino
Save to disk virtual memory dump starting at 'val' of size 'size'.
398 82a56f0d Luiz Capitulino
399 82a56f0d Luiz Capitulino
Arguments:
400 82a56f0d Luiz Capitulino
401 82a56f0d Luiz Capitulino
- "val": the starting address (json-int)
402 82a56f0d Luiz Capitulino
- "size": the memory size, in bytes (json-int)
403 82a56f0d Luiz Capitulino
- "filename": file path (json-string)
404 0cfd6a9a Luiz Capitulino
- "cpu": virtual CPU index (json-int, optional)
405 82a56f0d Luiz Capitulino
406 82a56f0d Luiz Capitulino
Example:
407 82a56f0d Luiz Capitulino
408 82a56f0d Luiz Capitulino
-> { "execute": "memsave",
409 82a56f0d Luiz Capitulino
             "arguments": { "val": 10,
410 82a56f0d Luiz Capitulino
                            "size": 100,
411 82a56f0d Luiz Capitulino
                            "filename": "/tmp/virtual-mem-dump" } }
412 82a56f0d Luiz Capitulino
<- { "return": {} }
413 82a56f0d Luiz Capitulino
414 82a56f0d Luiz Capitulino
EQMP
415 82a56f0d Luiz Capitulino
416 82a56f0d Luiz Capitulino
    {
417 82a56f0d Luiz Capitulino
        .name       = "pmemsave",
418 82a56f0d Luiz Capitulino
        .args_type  = "val:l,size:i,filename:s",
419 6d3962bf Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_pmemsave,
420 82a56f0d Luiz Capitulino
    },
421 82a56f0d Luiz Capitulino
422 82a56f0d Luiz Capitulino
SQMP
423 82a56f0d Luiz Capitulino
pmemsave
424 82a56f0d Luiz Capitulino
--------
425 82a56f0d Luiz Capitulino
426 82a56f0d Luiz Capitulino
Save to disk physical memory dump starting at 'val' of size 'size'.
427 82a56f0d Luiz Capitulino
428 82a56f0d Luiz Capitulino
Arguments:
429 82a56f0d Luiz Capitulino
430 82a56f0d Luiz Capitulino
- "val": the starting address (json-int)
431 82a56f0d Luiz Capitulino
- "size": the memory size, in bytes (json-int)
432 82a56f0d Luiz Capitulino
- "filename": file path (json-string)
433 82a56f0d Luiz Capitulino
434 82a56f0d Luiz Capitulino
Example:
435 82a56f0d Luiz Capitulino
436 82a56f0d Luiz Capitulino
-> { "execute": "pmemsave",
437 82a56f0d Luiz Capitulino
             "arguments": { "val": 10,
438 82a56f0d Luiz Capitulino
                            "size": 100,
439 82a56f0d Luiz Capitulino
                            "filename": "/tmp/physical-mem-dump" } }
440 82a56f0d Luiz Capitulino
<- { "return": {} }
441 82a56f0d Luiz Capitulino
442 82a56f0d Luiz Capitulino
EQMP
443 82a56f0d Luiz Capitulino
444 82a56f0d Luiz Capitulino
    {
445 a4046664 Lai Jiangshan
        .name       = "inject-nmi",
446 a4046664 Lai Jiangshan
        .args_type  = "",
447 ab49ab5c Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
448 a4046664 Lai Jiangshan
    },
449 a4046664 Lai Jiangshan
450 a4046664 Lai Jiangshan
SQMP
451 a4046664 Lai Jiangshan
inject-nmi
452 a4046664 Lai Jiangshan
----------
453 a4046664 Lai Jiangshan
454 a4046664 Lai Jiangshan
Inject an NMI on guest's CPUs.
455 a4046664 Lai Jiangshan
456 a4046664 Lai Jiangshan
Arguments: None.
457 a4046664 Lai Jiangshan
458 a4046664 Lai Jiangshan
Example:
459 a4046664 Lai Jiangshan
460 a4046664 Lai Jiangshan
-> { "execute": "inject-nmi" }
461 a4046664 Lai Jiangshan
<- { "return": {} }
462 a4046664 Lai Jiangshan
463 de253f14 Luiz Capitulino
Note: inject-nmi fails when the guest doesn't support injecting.
464 de253f14 Luiz Capitulino
      Currently, only x86 guests do.
465 a4046664 Lai Jiangshan
466 a4046664 Lai Jiangshan
EQMP
467 a4046664 Lai Jiangshan
468 a4046664 Lai Jiangshan
    {
469 a7ae8355 Stefano Stabellini
        .name       = "xen-save-devices-state",
470 a7ae8355 Stefano Stabellini
        .args_type  = "filename:F",
471 a7ae8355 Stefano Stabellini
    .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
472 a7ae8355 Stefano Stabellini
    },
473 a7ae8355 Stefano Stabellini
474 a7ae8355 Stefano Stabellini
SQMP
475 a7ae8355 Stefano Stabellini
xen-save-devices-state
476 a7ae8355 Stefano Stabellini
-------
477 a7ae8355 Stefano Stabellini
478 a7ae8355 Stefano Stabellini
Save the state of all devices to file. The RAM and the block devices
479 a7ae8355 Stefano Stabellini
of the VM are not saved by this command.
480 a7ae8355 Stefano Stabellini
481 a7ae8355 Stefano Stabellini
Arguments:
482 a7ae8355 Stefano Stabellini
483 a7ae8355 Stefano Stabellini
- "filename": the file to save the state of the devices to as binary
484 a7ae8355 Stefano Stabellini
data. See xen-save-devices-state.txt for a description of the binary
485 a7ae8355 Stefano Stabellini
format.
486 a7ae8355 Stefano Stabellini
487 a7ae8355 Stefano Stabellini
Example:
488 a7ae8355 Stefano Stabellini
489 a7ae8355 Stefano Stabellini
-> { "execute": "xen-save-devices-state",
490 a7ae8355 Stefano Stabellini
     "arguments": { "filename": "/tmp/save" } }
491 a7ae8355 Stefano Stabellini
<- { "return": {} }
492 a7ae8355 Stefano Stabellini
493 a7ae8355 Stefano Stabellini
EQMP
494 a7ae8355 Stefano Stabellini
495 a7ae8355 Stefano Stabellini
    {
496 39f42439 Anthony PERARD
        .name       = "xen-set-global-dirty-log",
497 39f42439 Anthony PERARD
        .args_type  = "enable:b",
498 39f42439 Anthony PERARD
        .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
499 39f42439 Anthony PERARD
    },
500 39f42439 Anthony PERARD
501 39f42439 Anthony PERARD
SQMP
502 39f42439 Anthony PERARD
xen-set-global-dirty-log
503 39f42439 Anthony PERARD
-------
504 39f42439 Anthony PERARD
505 39f42439 Anthony PERARD
Enable or disable the global dirty log mode.
506 39f42439 Anthony PERARD
507 39f42439 Anthony PERARD
Arguments:
508 39f42439 Anthony PERARD
509 39f42439 Anthony PERARD
- "enable": Enable it or disable it.
510 39f42439 Anthony PERARD
511 39f42439 Anthony PERARD
Example:
512 39f42439 Anthony PERARD
513 39f42439 Anthony PERARD
-> { "execute": "xen-set-global-dirty-log",
514 39f42439 Anthony PERARD
     "arguments": { "enable": true } }
515 39f42439 Anthony PERARD
<- { "return": {} }
516 39f42439 Anthony PERARD
517 39f42439 Anthony PERARD
EQMP
518 39f42439 Anthony PERARD
519 39f42439 Anthony PERARD
    {
520 82a56f0d Luiz Capitulino
        .name       = "migrate",
521 82a56f0d Luiz Capitulino
        .args_type  = "detach:-d,blk:-b,inc:-i,uri:s",
522 e1c37d0e Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_migrate,
523 82a56f0d Luiz Capitulino
    },
524 82a56f0d Luiz Capitulino
525 82a56f0d Luiz Capitulino
SQMP
526 82a56f0d Luiz Capitulino
migrate
527 82a56f0d Luiz Capitulino
-------
528 82a56f0d Luiz Capitulino
529 82a56f0d Luiz Capitulino
Migrate to URI.
530 82a56f0d Luiz Capitulino
531 82a56f0d Luiz Capitulino
Arguments:
532 82a56f0d Luiz Capitulino
533 82a56f0d Luiz Capitulino
- "blk": block migration, full disk copy (json-bool, optional)
534 82a56f0d Luiz Capitulino
- "inc": incremental disk copy (json-bool, optional)
535 82a56f0d Luiz Capitulino
- "uri": Destination URI (json-string)
536 82a56f0d Luiz Capitulino
537 82a56f0d Luiz Capitulino
Example:
538 82a56f0d Luiz Capitulino
539 82a56f0d Luiz Capitulino
-> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
540 82a56f0d Luiz Capitulino
<- { "return": {} }
541 82a56f0d Luiz Capitulino
542 82a56f0d Luiz Capitulino
Notes:
543 82a56f0d Luiz Capitulino
544 82a56f0d Luiz Capitulino
(1) The 'query-migrate' command should be used to check migration's progress
545 82a56f0d Luiz Capitulino
    and final result (this information is provided by the 'status' member)
546 82a56f0d Luiz Capitulino
(2) All boolean arguments default to false
547 82a56f0d Luiz Capitulino
(3) The user Monitor's "detach" argument is invalid in QMP and should not
548 82a56f0d Luiz Capitulino
    be used
549 82a56f0d Luiz Capitulino
550 82a56f0d Luiz Capitulino
EQMP
551 82a56f0d Luiz Capitulino
552 82a56f0d Luiz Capitulino
    {
553 82a56f0d Luiz Capitulino
        .name       = "migrate_cancel",
554 82a56f0d Luiz Capitulino
        .args_type  = "",
555 6cdedb07 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
556 82a56f0d Luiz Capitulino
    },
557 82a56f0d Luiz Capitulino
558 82a56f0d Luiz Capitulino
SQMP
559 82a56f0d Luiz Capitulino
migrate_cancel
560 82a56f0d Luiz Capitulino
--------------
561 82a56f0d Luiz Capitulino
562 82a56f0d Luiz Capitulino
Cancel the current migration.
563 82a56f0d Luiz Capitulino
564 82a56f0d Luiz Capitulino
Arguments: None.
565 82a56f0d Luiz Capitulino
566 82a56f0d Luiz Capitulino
Example:
567 82a56f0d Luiz Capitulino
568 82a56f0d Luiz Capitulino
-> { "execute": "migrate_cancel" }
569 82a56f0d Luiz Capitulino
<- { "return": {} }
570 82a56f0d Luiz Capitulino
571 82a56f0d Luiz Capitulino
EQMP
572 9e1ba4cc Orit Wasserman
{
573 9e1ba4cc Orit Wasserman
        .name       = "migrate-set-cache-size",
574 9e1ba4cc Orit Wasserman
        .args_type  = "value:o",
575 9e1ba4cc Orit Wasserman
        .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
576 9e1ba4cc Orit Wasserman
    },
577 9e1ba4cc Orit Wasserman
578 9e1ba4cc Orit Wasserman
SQMP
579 9e1ba4cc Orit Wasserman
migrate-set-cache-size
580 9e1ba4cc Orit Wasserman
---------------------
581 9e1ba4cc Orit Wasserman
582 9e1ba4cc Orit Wasserman
Set cache size to be used by XBZRLE migration, the cache size will be rounded
583 9e1ba4cc Orit Wasserman
down to the nearest power of 2
584 9e1ba4cc Orit Wasserman
585 9e1ba4cc Orit Wasserman
Arguments:
586 9e1ba4cc Orit Wasserman
587 9e1ba4cc Orit Wasserman
- "value": cache size in bytes (json-int)
588 9e1ba4cc Orit Wasserman
589 9e1ba4cc Orit Wasserman
Example:
590 9e1ba4cc Orit Wasserman
591 9e1ba4cc Orit Wasserman
-> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
592 9e1ba4cc Orit Wasserman
<- { "return": {} }
593 9e1ba4cc Orit Wasserman
594 9e1ba4cc Orit Wasserman
EQMP
595 9e1ba4cc Orit Wasserman
    {
596 9e1ba4cc Orit Wasserman
        .name       = "query-migrate-cache-size",
597 9e1ba4cc Orit Wasserman
        .args_type  = "",
598 9e1ba4cc Orit Wasserman
        .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
599 9e1ba4cc Orit Wasserman
    },
600 9e1ba4cc Orit Wasserman
601 9e1ba4cc Orit Wasserman
SQMP
602 9e1ba4cc Orit Wasserman
query-migrate-cache-size
603 9e1ba4cc Orit Wasserman
---------------------
604 9e1ba4cc Orit Wasserman
605 9e1ba4cc Orit Wasserman
Show cache size to be used by XBZRLE migration
606 9e1ba4cc Orit Wasserman
607 9e1ba4cc Orit Wasserman
returns a json-object with the following information:
608 9e1ba4cc Orit Wasserman
- "size" : json-int
609 9e1ba4cc Orit Wasserman
610 9e1ba4cc Orit Wasserman
Example:
611 9e1ba4cc Orit Wasserman
612 9e1ba4cc Orit Wasserman
-> { "execute": "query-migrate-cache-size" }
613 9e1ba4cc Orit Wasserman
<- { "return": 67108864 }
614 9e1ba4cc Orit Wasserman
615 9e1ba4cc Orit Wasserman
EQMP
616 82a56f0d Luiz Capitulino
617 82a56f0d Luiz Capitulino
    {
618 82a56f0d Luiz Capitulino
        .name       = "migrate_set_speed",
619 3a019b6e Wen Congyang
        .args_type  = "value:o",
620 3dc85383 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
621 82a56f0d Luiz Capitulino
    },
622 82a56f0d Luiz Capitulino
623 82a56f0d Luiz Capitulino
SQMP
624 ff73edf5 Jes Sorensen
migrate_set_speed
625 ff73edf5 Jes Sorensen
-----------------
626 e866e239 Gerd Hoffmann
627 ff73edf5 Jes Sorensen
Set maximum speed for migrations.
628 e866e239 Gerd Hoffmann
629 e866e239 Gerd Hoffmann
Arguments:
630 e866e239 Gerd Hoffmann
631 ff73edf5 Jes Sorensen
- "value": maximum speed, in bytes per second (json-int)
632 e866e239 Gerd Hoffmann
633 e866e239 Gerd Hoffmann
Example:
634 e866e239 Gerd Hoffmann
635 ff73edf5 Jes Sorensen
-> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
636 e866e239 Gerd Hoffmann
<- { "return": {} }
637 e866e239 Gerd Hoffmann
638 e866e239 Gerd Hoffmann
EQMP
639 e866e239 Gerd Hoffmann
640 e866e239 Gerd Hoffmann
    {
641 ff73edf5 Jes Sorensen
        .name       = "migrate_set_downtime",
642 ff73edf5 Jes Sorensen
        .args_type  = "value:T",
643 4f0a993b Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
644 e866e239 Gerd Hoffmann
    },
645 e866e239 Gerd Hoffmann
646 e866e239 Gerd Hoffmann
SQMP
647 ff73edf5 Jes Sorensen
migrate_set_downtime
648 ff73edf5 Jes Sorensen
--------------------
649 82a56f0d Luiz Capitulino
650 ff73edf5 Jes Sorensen
Set maximum tolerated downtime (in seconds) for migrations.
651 82a56f0d Luiz Capitulino
652 82a56f0d Luiz Capitulino
Arguments:
653 82a56f0d Luiz Capitulino
654 ff73edf5 Jes Sorensen
- "value": maximum downtime (json-number)
655 82a56f0d Luiz Capitulino
656 82a56f0d Luiz Capitulino
Example:
657 82a56f0d Luiz Capitulino
658 ff73edf5 Jes Sorensen
-> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
659 82a56f0d Luiz Capitulino
<- { "return": {} }
660 82a56f0d Luiz Capitulino
661 82a56f0d Luiz Capitulino
EQMP
662 82a56f0d Luiz Capitulino
663 82a56f0d Luiz Capitulino
    {
664 ff73edf5 Jes Sorensen
        .name       = "client_migrate_info",
665 ff73edf5 Jes Sorensen
        .args_type  = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
666 ff73edf5 Jes Sorensen
        .params     = "protocol hostname port tls-port cert-subject",
667 ff73edf5 Jes Sorensen
        .help       = "send migration info to spice/vnc client",
668 82a56f0d Luiz Capitulino
        .user_print = monitor_user_noop,
669 edc5cb1a Yonit Halperin
        .mhandler.cmd_async = client_migrate_info,
670 edc5cb1a Yonit Halperin
        .flags      = MONITOR_CMD_ASYNC,
671 82a56f0d Luiz Capitulino
    },
672 82a56f0d Luiz Capitulino
673 82a56f0d Luiz Capitulino
SQMP
674 ff73edf5 Jes Sorensen
client_migrate_info
675 ff73edf5 Jes Sorensen
------------------
676 82a56f0d Luiz Capitulino
677 ff73edf5 Jes Sorensen
Set the spice/vnc connection info for the migration target.  The spice/vnc
678 ff73edf5 Jes Sorensen
server will ask the spice/vnc client to automatically reconnect using the
679 ff73edf5 Jes Sorensen
new parameters (if specified) once the vm migration finished successfully.
680 82a56f0d Luiz Capitulino
681 82a56f0d Luiz Capitulino
Arguments:
682 82a56f0d Luiz Capitulino
683 ff73edf5 Jes Sorensen
- "protocol":     protocol: "spice" or "vnc" (json-string)
684 ff73edf5 Jes Sorensen
- "hostname":     migration target hostname (json-string)
685 ff73edf5 Jes Sorensen
- "port":         spice/vnc tcp port for plaintext channels (json-int, optional)
686 ff73edf5 Jes Sorensen
- "tls-port":     spice tcp port for tls-secured channels (json-int, optional)
687 ff73edf5 Jes Sorensen
- "cert-subject": server certificate subject (json-string, optional)
688 82a56f0d Luiz Capitulino
689 82a56f0d Luiz Capitulino
Example:
690 82a56f0d Luiz Capitulino
691 ff73edf5 Jes Sorensen
-> { "execute": "client_migrate_info",
692 ff73edf5 Jes Sorensen
     "arguments": { "protocol": "spice",
693 ff73edf5 Jes Sorensen
                    "hostname": "virt42.lab.kraxel.org",
694 ff73edf5 Jes Sorensen
                    "port": 1234 } }
695 82a56f0d Luiz Capitulino
<- { "return": {} }
696 82a56f0d Luiz Capitulino
697 82a56f0d Luiz Capitulino
EQMP
698 82a56f0d Luiz Capitulino
699 82a56f0d Luiz Capitulino
    {
700 783e9b48 Wen Congyang
        .name       = "dump-guest-memory",
701 783e9b48 Wen Congyang
        .args_type  = "paging:b,protocol:s,begin:i?,end:i?",
702 783e9b48 Wen Congyang
        .params     = "-p protocol [begin] [length]",
703 783e9b48 Wen Congyang
        .help       = "dump guest memory to file",
704 783e9b48 Wen Congyang
        .user_print = monitor_user_noop,
705 783e9b48 Wen Congyang
        .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
706 783e9b48 Wen Congyang
    },
707 783e9b48 Wen Congyang
708 783e9b48 Wen Congyang
SQMP
709 783e9b48 Wen Congyang
dump
710 783e9b48 Wen Congyang
711 783e9b48 Wen Congyang
712 783e9b48 Wen Congyang
Dump guest memory to file. The file can be processed with crash or gdb.
713 783e9b48 Wen Congyang
714 783e9b48 Wen Congyang
Arguments:
715 783e9b48 Wen Congyang
716 783e9b48 Wen Congyang
- "paging": do paging to get guest's memory mapping (json-bool)
717 783e9b48 Wen Congyang
- "protocol": destination file(started with "file:") or destination file
718 783e9b48 Wen Congyang
              descriptor (started with "fd:") (json-string)
719 783e9b48 Wen Congyang
- "begin": the starting physical address. It's optional, and should be specified
720 783e9b48 Wen Congyang
           with length together (json-int)
721 783e9b48 Wen Congyang
- "length": the memory size, in bytes. It's optional, and should be specified
722 783e9b48 Wen Congyang
            with begin together (json-int)
723 783e9b48 Wen Congyang
724 783e9b48 Wen Congyang
Example:
725 783e9b48 Wen Congyang
726 783e9b48 Wen Congyang
-> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
727 783e9b48 Wen Congyang
<- { "return": {} }
728 783e9b48 Wen Congyang
729 783e9b48 Wen Congyang
Notes:
730 783e9b48 Wen Congyang
731 783e9b48 Wen Congyang
(1) All boolean arguments default to false
732 783e9b48 Wen Congyang
733 783e9b48 Wen Congyang
EQMP
734 783e9b48 Wen Congyang
735 783e9b48 Wen Congyang
    {
736 82a56f0d Luiz Capitulino
        .name       = "netdev_add",
737 82a56f0d Luiz Capitulino
        .args_type  = "netdev:O",
738 928059a3 Luiz Capitulino
        .mhandler.cmd_new = qmp_netdev_add,
739 82a56f0d Luiz Capitulino
    },
740 82a56f0d Luiz Capitulino
741 82a56f0d Luiz Capitulino
SQMP
742 82a56f0d Luiz Capitulino
netdev_add
743 82a56f0d Luiz Capitulino
----------
744 82a56f0d Luiz Capitulino
745 82a56f0d Luiz Capitulino
Add host network device.
746 82a56f0d Luiz Capitulino
747 82a56f0d Luiz Capitulino
Arguments:
748 82a56f0d Luiz Capitulino
749 82a56f0d Luiz Capitulino
- "type": the device type, "tap", "user", ... (json-string)
750 82a56f0d Luiz Capitulino
- "id": the device's ID, must be unique (json-string)
751 82a56f0d Luiz Capitulino
- device options
752 82a56f0d Luiz Capitulino
753 82a56f0d Luiz Capitulino
Example:
754 82a56f0d Luiz Capitulino
755 82a56f0d Luiz Capitulino
-> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
756 82a56f0d Luiz Capitulino
<- { "return": {} }
757 82a56f0d Luiz Capitulino
758 82a56f0d Luiz Capitulino
Note: The supported device options are the same ones supported by the '-net'
759 82a56f0d Luiz Capitulino
      command-line argument, which are listed in the '-help' output or QEMU's
760 82a56f0d Luiz Capitulino
      manual
761 82a56f0d Luiz Capitulino
762 82a56f0d Luiz Capitulino
EQMP
763 82a56f0d Luiz Capitulino
764 82a56f0d Luiz Capitulino
    {
765 82a56f0d Luiz Capitulino
        .name       = "netdev_del",
766 82a56f0d Luiz Capitulino
        .args_type  = "id:s",
767 5f964155 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_netdev_del,
768 82a56f0d Luiz Capitulino
    },
769 82a56f0d Luiz Capitulino
770 82a56f0d Luiz Capitulino
SQMP
771 82a56f0d Luiz Capitulino
netdev_del
772 82a56f0d Luiz Capitulino
----------
773 82a56f0d Luiz Capitulino
774 82a56f0d Luiz Capitulino
Remove host network device.
775 82a56f0d Luiz Capitulino
776 82a56f0d Luiz Capitulino
Arguments:
777 82a56f0d Luiz Capitulino
778 82a56f0d Luiz Capitulino
- "id": the device's ID, must be unique (json-string)
779 82a56f0d Luiz Capitulino
780 82a56f0d Luiz Capitulino
Example:
781 82a56f0d Luiz Capitulino
782 82a56f0d Luiz Capitulino
-> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
783 82a56f0d Luiz Capitulino
<- { "return": {} }
784 82a56f0d Luiz Capitulino
785 6d4a2b3a Christoph Hellwig
786 6d4a2b3a Christoph Hellwig
EQMP
787 6d4a2b3a Christoph Hellwig
788 6d4a2b3a Christoph Hellwig
    {
789 6d4a2b3a Christoph Hellwig
        .name       = "block_resize",
790 6d4a2b3a Christoph Hellwig
        .args_type  = "device:B,size:o",
791 5e7caacb Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_block_resize,
792 6d4a2b3a Christoph Hellwig
    },
793 6d4a2b3a Christoph Hellwig
794 6d4a2b3a Christoph Hellwig
SQMP
795 6d4a2b3a Christoph Hellwig
block_resize
796 6d4a2b3a Christoph Hellwig
------------
797 6d4a2b3a Christoph Hellwig
798 6d4a2b3a Christoph Hellwig
Resize a block image while a guest is running.
799 6d4a2b3a Christoph Hellwig
800 6d4a2b3a Christoph Hellwig
Arguments:
801 6d4a2b3a Christoph Hellwig
802 6d4a2b3a Christoph Hellwig
- "device": the device's ID, must be unique (json-string)
803 6d4a2b3a Christoph Hellwig
- "size": new size
804 6d4a2b3a Christoph Hellwig
805 6d4a2b3a Christoph Hellwig
Example:
806 6d4a2b3a Christoph Hellwig
807 6d4a2b3a Christoph Hellwig
-> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
808 6d4a2b3a Christoph Hellwig
<- { "return": {} }
809 6d4a2b3a Christoph Hellwig
810 82a56f0d Luiz Capitulino
EQMP
811 82a56f0d Luiz Capitulino
812 82a56f0d Luiz Capitulino
    {
813 db58f9c0 Stefan Hajnoczi
        .name       = "block-stream",
814 1d809098 Paolo Bonzini
        .args_type  = "device:B,base:s?,speed:o?,on-error:s?",
815 12bd451f Stefan Hajnoczi
        .mhandler.cmd_new = qmp_marshal_input_block_stream,
816 12bd451f Stefan Hajnoczi
    },
817 12bd451f Stefan Hajnoczi
818 12bd451f Stefan Hajnoczi
    {
819 ed61fc10 Jeff Cody
        .name       = "block-commit",
820 ed61fc10 Jeff Cody
        .args_type  = "device:B,base:s?,top:s,speed:o?",
821 ed61fc10 Jeff Cody
        .mhandler.cmd_new = qmp_marshal_input_block_commit,
822 ed61fc10 Jeff Cody
    },
823 ed61fc10 Jeff Cody
824 ed61fc10 Jeff Cody
    {
825 db58f9c0 Stefan Hajnoczi
        .name       = "block-job-set-speed",
826 882ec7ce Stefan Hajnoczi
        .args_type  = "device:B,speed:o",
827 2d47c6e9 Stefan Hajnoczi
        .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
828 2d47c6e9 Stefan Hajnoczi
    },
829 2d47c6e9 Stefan Hajnoczi
830 2d47c6e9 Stefan Hajnoczi
    {
831 db58f9c0 Stefan Hajnoczi
        .name       = "block-job-cancel",
832 6e37fb81 Paolo Bonzini
        .args_type  = "device:B,force:b?",
833 370521a1 Stefan Hajnoczi
        .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
834 370521a1 Stefan Hajnoczi
    },
835 c186402c Jeff Cody
    {
836 6e37fb81 Paolo Bonzini
        .name       = "block-job-pause",
837 6e37fb81 Paolo Bonzini
        .args_type  = "device:B",
838 6e37fb81 Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
839 6e37fb81 Paolo Bonzini
    },
840 6e37fb81 Paolo Bonzini
    {
841 6e37fb81 Paolo Bonzini
        .name       = "block-job-resume",
842 6e37fb81 Paolo Bonzini
        .args_type  = "device:B",
843 6e37fb81 Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
844 6e37fb81 Paolo Bonzini
    },
845 6e37fb81 Paolo Bonzini
    {
846 aeae883b Paolo Bonzini
        .name       = "block-job-complete",
847 aeae883b Paolo Bonzini
        .args_type  = "device:B",
848 aeae883b Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
849 aeae883b Paolo Bonzini
    },
850 aeae883b Paolo Bonzini
    {
851 52e7c241 Paolo Bonzini
        .name       = "transaction",
852 b9f8978c Paolo Bonzini
        .args_type  = "actions:q",
853 52e7c241 Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_transaction,
854 c186402c Jeff Cody
    },
855 c186402c Jeff Cody
856 c186402c Jeff Cody
SQMP
857 52e7c241 Paolo Bonzini
transaction
858 52e7c241 Paolo Bonzini
-----------
859 c186402c Jeff Cody
860 52e7c241 Paolo Bonzini
Atomically operate on one or more block devices.  The only supported
861 52e7c241 Paolo Bonzini
operation for now is snapshotting.  If there is any failure performing
862 52e7c241 Paolo Bonzini
any of the operations, all snapshots for the group are abandoned, and
863 52e7c241 Paolo Bonzini
the original disks pre-snapshot attempt are used.
864 c186402c Jeff Cody
865 52e7c241 Paolo Bonzini
A list of dictionaries is accepted, that contains the actions to be performed.
866 52e7c241 Paolo Bonzini
For snapshots this is the device, the file to use for the new snapshot,
867 52e7c241 Paolo Bonzini
and the format.  The default format, if not specified, is qcow2.
868 c186402c Jeff Cody
869 bc8b094f Paolo Bonzini
Each new snapshot defaults to being created by QEMU (wiping any
870 bc8b094f Paolo Bonzini
contents if the file already exists), but it is also possible to reuse
871 bc8b094f Paolo Bonzini
an externally-created file.  In the latter case, you should ensure that
872 bc8b094f Paolo Bonzini
the new image file has the same contents as the current one; QEMU cannot
873 bc8b094f Paolo Bonzini
perform any meaningful check.  Typically this is achieved by using the
874 bc8b094f Paolo Bonzini
current image file as the backing file for the new image.
875 bc8b094f Paolo Bonzini
876 c186402c Jeff Cody
Arguments:
877 c186402c Jeff Cody
878 52e7c241 Paolo Bonzini
actions array:
879 52e7c241 Paolo Bonzini
    - "type": the operation to perform.  The only supported
880 52e7c241 Paolo Bonzini
      value is "blockdev-snapshot-sync". (json-string)
881 52e7c241 Paolo Bonzini
    - "data": a dictionary.  The contents depend on the value
882 52e7c241 Paolo Bonzini
      of "type".  When "type" is "blockdev-snapshot-sync":
883 52e7c241 Paolo Bonzini
      - "device": device name to snapshot (json-string)
884 52e7c241 Paolo Bonzini
      - "snapshot-file": name of new image file (json-string)
885 52e7c241 Paolo Bonzini
      - "format": format of new image (json-string, optional)
886 bc8b094f Paolo Bonzini
      - "mode": whether and how QEMU should create the snapshot file
887 bc8b094f Paolo Bonzini
        (NewImageMode, optional, default "absolute-paths")
888 c186402c Jeff Cody
889 c186402c Jeff Cody
Example:
890 c186402c Jeff Cody
891 52e7c241 Paolo Bonzini
-> { "execute": "transaction",
892 52e7c241 Paolo Bonzini
     "arguments": { "actions": [
893 52e7c241 Paolo Bonzini
         { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
894 52e7c241 Paolo Bonzini
                                         "snapshot-file": "/some/place/my-image",
895 52e7c241 Paolo Bonzini
                                         "format": "qcow2" } },
896 52e7c241 Paolo Bonzini
         { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
897 52e7c241 Paolo Bonzini
                                         "snapshot-file": "/some/place/my-image2",
898 bc8b094f Paolo Bonzini
                                         "mode": "existing",
899 52e7c241 Paolo Bonzini
                                         "format": "qcow2" } } ] } }
900 c186402c Jeff Cody
<- { "return": {} }
901 c186402c Jeff Cody
902 c186402c Jeff Cody
EQMP
903 370521a1 Stefan Hajnoczi
904 370521a1 Stefan Hajnoczi
    {
905 d967b2f1 Jes Sorensen
        .name       = "blockdev-snapshot-sync",
906 31155b9b Paolo Bonzini
        .args_type  = "device:B,snapshot-file:s,format:s?,mode:s?",
907 6106e249 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
908 d967b2f1 Jes Sorensen
    },
909 d967b2f1 Jes Sorensen
910 d967b2f1 Jes Sorensen
SQMP
911 d967b2f1 Jes Sorensen
blockdev-snapshot-sync
912 d967b2f1 Jes Sorensen
----------------------
913 d967b2f1 Jes Sorensen
914 d967b2f1 Jes Sorensen
Synchronous snapshot of a block device. snapshot-file specifies the
915 d967b2f1 Jes Sorensen
target of the new image. If the file exists, or if it is a device, the
916 d967b2f1 Jes Sorensen
snapshot will be created in the existing file/device. If does not
917 d967b2f1 Jes Sorensen
exist, a new file will be created. format specifies the format of the
918 d967b2f1 Jes Sorensen
snapshot image, default is qcow2.
919 d967b2f1 Jes Sorensen
920 d967b2f1 Jes Sorensen
Arguments:
921 d967b2f1 Jes Sorensen
922 d967b2f1 Jes Sorensen
- "device": device name to snapshot (json-string)
923 d967b2f1 Jes Sorensen
- "snapshot-file": name of new image file (json-string)
924 6cc2a415 Paolo Bonzini
- "mode": whether and how QEMU should create the snapshot file
925 6cc2a415 Paolo Bonzini
  (NewImageMode, optional, default "absolute-paths")
926 d967b2f1 Jes Sorensen
- "format": format of new image (json-string, optional)
927 d967b2f1 Jes Sorensen
928 d967b2f1 Jes Sorensen
Example:
929 d967b2f1 Jes Sorensen
930 7f3850c2 Luiz Capitulino
-> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
931 7f3850c2 Luiz Capitulino
                                                         "snapshot-file":
932 7f3850c2 Luiz Capitulino
                                                        "/some/place/my-image",
933 7f3850c2 Luiz Capitulino
                                                        "format": "qcow2" } }
934 d967b2f1 Jes Sorensen
<- { "return": {} }
935 d967b2f1 Jes Sorensen
936 d967b2f1 Jes Sorensen
EQMP
937 d967b2f1 Jes Sorensen
938 d967b2f1 Jes Sorensen
    {
939 d9b902db Paolo Bonzini
        .name       = "drive-mirror",
940 b952b558 Paolo Bonzini
        .args_type  = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
941 b952b558 Paolo Bonzini
                      "on-source-error:s?,on-target-error:s?",
942 d9b902db Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
943 d9b902db Paolo Bonzini
    },
944 d9b902db Paolo Bonzini
945 d9b902db Paolo Bonzini
SQMP
946 d9b902db Paolo Bonzini
drive-mirror
947 d9b902db Paolo Bonzini
------------
948 d9b902db Paolo Bonzini
949 d9b902db Paolo Bonzini
Start mirroring a block device's writes to a new destination. target
950 d9b902db Paolo Bonzini
specifies the target of the new image. If the file exists, or if it is
951 d9b902db Paolo Bonzini
a device, it will be used as the new destination for writes. If it does not
952 d9b902db Paolo Bonzini
exist, a new file will be created. format specifies the format of the
953 d9b902db Paolo Bonzini
mirror image, default is to probe if mode='existing', else the format
954 d9b902db Paolo Bonzini
of the source.
955 d9b902db Paolo Bonzini
956 d9b902db Paolo Bonzini
Arguments:
957 d9b902db Paolo Bonzini
958 d9b902db Paolo Bonzini
- "device": device name to operate on (json-string)
959 d9b902db Paolo Bonzini
- "target": name of new image file (json-string)
960 d9b902db Paolo Bonzini
- "format": format of new image (json-string, optional)
961 d9b902db Paolo Bonzini
- "mode": how an image file should be created into the target
962 d9b902db Paolo Bonzini
  file/device (NewImageMode, optional, default 'absolute-paths')
963 d9b902db Paolo Bonzini
- "speed": maximum speed of the streaming job, in bytes per second
964 d9b902db Paolo Bonzini
  (json-int)
965 d9b902db Paolo Bonzini
- "sync": what parts of the disk image should be copied to the destination;
966 d9b902db Paolo Bonzini
  possibilities include "full" for all the disk, "top" for only the sectors
967 d9b902db Paolo Bonzini
  allocated in the topmost image, or "none" to only replicate new I/O
968 d9b902db Paolo Bonzini
  (MirrorSyncMode).
969 b952b558 Paolo Bonzini
- "on-source-error": the action to take on an error on the source
970 b952b558 Paolo Bonzini
  (BlockdevOnError, default 'report')
971 b952b558 Paolo Bonzini
- "on-target-error": the action to take on an error on the target
972 b952b558 Paolo Bonzini
  (BlockdevOnError, default 'report')
973 b952b558 Paolo Bonzini
974 d9b902db Paolo Bonzini
975 d9b902db Paolo Bonzini
976 d9b902db Paolo Bonzini
Example:
977 d9b902db Paolo Bonzini
978 d9b902db Paolo Bonzini
-> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
979 d9b902db Paolo Bonzini
                                               "target": "/some/place/my-image",
980 d9b902db Paolo Bonzini
                                               "sync": "full",
981 d9b902db Paolo Bonzini
                                               "format": "qcow2" } }
982 d9b902db Paolo Bonzini
<- { "return": {} }
983 d9b902db Paolo Bonzini
984 d9b902db Paolo Bonzini
EQMP
985 d9b902db Paolo Bonzini
986 d9b902db Paolo Bonzini
    {
987 82a56f0d Luiz Capitulino
        .name       = "balloon",
988 82a56f0d Luiz Capitulino
        .args_type  = "value:M",
989 d72f3264 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_balloon,
990 82a56f0d Luiz Capitulino
    },
991 82a56f0d Luiz Capitulino
992 82a56f0d Luiz Capitulino
SQMP
993 82a56f0d Luiz Capitulino
balloon
994 82a56f0d Luiz Capitulino
-------
995 82a56f0d Luiz Capitulino
996 82a56f0d Luiz Capitulino
Request VM to change its memory allocation (in bytes).
997 82a56f0d Luiz Capitulino
998 82a56f0d Luiz Capitulino
Arguments:
999 82a56f0d Luiz Capitulino
1000 82a56f0d Luiz Capitulino
- "value": New memory allocation (json-int)
1001 82a56f0d Luiz Capitulino
1002 82a56f0d Luiz Capitulino
Example:
1003 82a56f0d Luiz Capitulino
1004 82a56f0d Luiz Capitulino
-> { "execute": "balloon", "arguments": { "value": 536870912 } }
1005 82a56f0d Luiz Capitulino
<- { "return": {} }
1006 82a56f0d Luiz Capitulino
1007 82a56f0d Luiz Capitulino
EQMP
1008 82a56f0d Luiz Capitulino
1009 82a56f0d Luiz Capitulino
    {
1010 82a56f0d Luiz Capitulino
        .name       = "set_link",
1011 82a56f0d Luiz Capitulino
        .args_type  = "name:s,up:b",
1012 4b37156c Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_set_link,
1013 82a56f0d Luiz Capitulino
    },
1014 82a56f0d Luiz Capitulino
1015 82a56f0d Luiz Capitulino
SQMP
1016 82a56f0d Luiz Capitulino
set_link
1017 82a56f0d Luiz Capitulino
--------
1018 82a56f0d Luiz Capitulino
1019 82a56f0d Luiz Capitulino
Change the link status of a network adapter.
1020 82a56f0d Luiz Capitulino
1021 82a56f0d Luiz Capitulino
Arguments:
1022 82a56f0d Luiz Capitulino
1023 82a56f0d Luiz Capitulino
- "name": network device name (json-string)
1024 82a56f0d Luiz Capitulino
- "up": status is up (json-bool)
1025 82a56f0d Luiz Capitulino
1026 82a56f0d Luiz Capitulino
Example:
1027 82a56f0d Luiz Capitulino
1028 82a56f0d Luiz Capitulino
-> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1029 82a56f0d Luiz Capitulino
<- { "return": {} }
1030 82a56f0d Luiz Capitulino
1031 82a56f0d Luiz Capitulino
EQMP
1032 82a56f0d Luiz Capitulino
1033 82a56f0d Luiz Capitulino
    {
1034 82a56f0d Luiz Capitulino
        .name       = "getfd",
1035 82a56f0d Luiz Capitulino
        .args_type  = "fdname:s",
1036 82a56f0d Luiz Capitulino
        .params     = "getfd name",
1037 82a56f0d Luiz Capitulino
        .help       = "receive a file descriptor via SCM rights and assign it a name",
1038 208c9d1b Corey Bryant
        .mhandler.cmd_new = qmp_marshal_input_getfd,
1039 82a56f0d Luiz Capitulino
    },
1040 82a56f0d Luiz Capitulino
1041 82a56f0d Luiz Capitulino
SQMP
1042 82a56f0d Luiz Capitulino
getfd
1043 82a56f0d Luiz Capitulino
-----
1044 82a56f0d Luiz Capitulino
1045 82a56f0d Luiz Capitulino
Receive a file descriptor via SCM rights and assign it a name.
1046 82a56f0d Luiz Capitulino
1047 82a56f0d Luiz Capitulino
Arguments:
1048 82a56f0d Luiz Capitulino
1049 82a56f0d Luiz Capitulino
- "fdname": file descriptor name (json-string)
1050 82a56f0d Luiz Capitulino
1051 82a56f0d Luiz Capitulino
Example:
1052 82a56f0d Luiz Capitulino
1053 82a56f0d Luiz Capitulino
-> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1054 82a56f0d Luiz Capitulino
<- { "return": {} }
1055 82a56f0d Luiz Capitulino
1056 208c9d1b Corey Bryant
Notes:
1057 208c9d1b Corey Bryant
1058 208c9d1b Corey Bryant
(1) If the name specified by the "fdname" argument already exists,
1059 208c9d1b Corey Bryant
    the file descriptor assigned to it will be closed and replaced
1060 208c9d1b Corey Bryant
    by the received file descriptor.
1061 208c9d1b Corey Bryant
(2) The 'closefd' command can be used to explicitly close the file
1062 208c9d1b Corey Bryant
    descriptor when it is no longer needed.
1063 208c9d1b Corey Bryant
1064 82a56f0d Luiz Capitulino
EQMP
1065 82a56f0d Luiz Capitulino
1066 82a56f0d Luiz Capitulino
    {
1067 82a56f0d Luiz Capitulino
        .name       = "closefd",
1068 82a56f0d Luiz Capitulino
        .args_type  = "fdname:s",
1069 82a56f0d Luiz Capitulino
        .params     = "closefd name",
1070 82a56f0d Luiz Capitulino
        .help       = "close a file descriptor previously passed via SCM rights",
1071 208c9d1b Corey Bryant
        .mhandler.cmd_new = qmp_marshal_input_closefd,
1072 82a56f0d Luiz Capitulino
    },
1073 82a56f0d Luiz Capitulino
1074 82a56f0d Luiz Capitulino
SQMP
1075 82a56f0d Luiz Capitulino
closefd
1076 82a56f0d Luiz Capitulino
-------
1077 82a56f0d Luiz Capitulino
1078 82a56f0d Luiz Capitulino
Close a file descriptor previously passed via SCM rights.
1079 82a56f0d Luiz Capitulino
1080 82a56f0d Luiz Capitulino
Arguments:
1081 82a56f0d Luiz Capitulino
1082 82a56f0d Luiz Capitulino
- "fdname": file descriptor name (json-string)
1083 82a56f0d Luiz Capitulino
1084 82a56f0d Luiz Capitulino
Example:
1085 82a56f0d Luiz Capitulino
1086 82a56f0d Luiz Capitulino
-> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1087 82a56f0d Luiz Capitulino
<- { "return": {} }
1088 82a56f0d Luiz Capitulino
1089 82a56f0d Luiz Capitulino
EQMP
1090 82a56f0d Luiz Capitulino
1091 ba1c048a Corey Bryant
     {
1092 ba1c048a Corey Bryant
        .name       = "add-fd",
1093 ba1c048a Corey Bryant
        .args_type  = "fdset-id:i?,opaque:s?",
1094 ba1c048a Corey Bryant
        .params     = "add-fd fdset-id opaque",
1095 ba1c048a Corey Bryant
        .help       = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1096 ba1c048a Corey Bryant
        .mhandler.cmd_new = qmp_marshal_input_add_fd,
1097 ba1c048a Corey Bryant
    },
1098 ba1c048a Corey Bryant
1099 ba1c048a Corey Bryant
SQMP
1100 ba1c048a Corey Bryant
add-fd
1101 ba1c048a Corey Bryant
-------
1102 ba1c048a Corey Bryant
1103 ba1c048a Corey Bryant
Add a file descriptor, that was passed via SCM rights, to an fd set.
1104 ba1c048a Corey Bryant
1105 ba1c048a Corey Bryant
Arguments:
1106 ba1c048a Corey Bryant
1107 ba1c048a Corey Bryant
- "fdset-id": The ID of the fd set to add the file descriptor to.
1108 ba1c048a Corey Bryant
              (json-int, optional)
1109 ba1c048a Corey Bryant
- "opaque": A free-form string that can be used to describe the fd.
1110 ba1c048a Corey Bryant
            (json-string, optional)
1111 ba1c048a Corey Bryant
1112 ba1c048a Corey Bryant
Return a json-object with the following information:
1113 ba1c048a Corey Bryant
1114 ba1c048a Corey Bryant
- "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1115 ba1c048a Corey Bryant
- "fd": The file descriptor that was received via SCM rights and added to the
1116 ba1c048a Corey Bryant
        fd set. (json-int)
1117 ba1c048a Corey Bryant
1118 ba1c048a Corey Bryant
Example:
1119 ba1c048a Corey Bryant
1120 ba1c048a Corey Bryant
-> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1121 ba1c048a Corey Bryant
<- { "return": { "fdset-id": 1, "fd": 3 } }
1122 ba1c048a Corey Bryant
1123 ba1c048a Corey Bryant
Notes:
1124 ba1c048a Corey Bryant
1125 ba1c048a Corey Bryant
(1) The list of fd sets is shared by all monitor connections.
1126 ba1c048a Corey Bryant
(2) If "fdset-id" is not specified, a new fd set will be created.
1127 ba1c048a Corey Bryant
1128 ba1c048a Corey Bryant
EQMP
1129 ba1c048a Corey Bryant
1130 ba1c048a Corey Bryant
     {
1131 ba1c048a Corey Bryant
        .name       = "remove-fd",
1132 ba1c048a Corey Bryant
        .args_type  = "fdset-id:i,fd:i?",
1133 ba1c048a Corey Bryant
        .params     = "remove-fd fdset-id fd",
1134 ba1c048a Corey Bryant
        .help       = "Remove a file descriptor from an fd set",
1135 ba1c048a Corey Bryant
        .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1136 ba1c048a Corey Bryant
    },
1137 ba1c048a Corey Bryant
1138 ba1c048a Corey Bryant
SQMP
1139 ba1c048a Corey Bryant
remove-fd
1140 ba1c048a Corey Bryant
---------
1141 ba1c048a Corey Bryant
1142 ba1c048a Corey Bryant
Remove a file descriptor from an fd set.
1143 ba1c048a Corey Bryant
1144 ba1c048a Corey Bryant
Arguments:
1145 ba1c048a Corey Bryant
1146 ba1c048a Corey Bryant
- "fdset-id": The ID of the fd set that the file descriptor belongs to.
1147 ba1c048a Corey Bryant
              (json-int)
1148 ba1c048a Corey Bryant
- "fd": The file descriptor that is to be removed. (json-int, optional)
1149 ba1c048a Corey Bryant
1150 ba1c048a Corey Bryant
Example:
1151 ba1c048a Corey Bryant
1152 ba1c048a Corey Bryant
-> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1153 ba1c048a Corey Bryant
<- { "return": {} }
1154 ba1c048a Corey Bryant
1155 ba1c048a Corey Bryant
Notes:
1156 ba1c048a Corey Bryant
1157 ba1c048a Corey Bryant
(1) The list of fd sets is shared by all monitor connections.
1158 ba1c048a Corey Bryant
(2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1159 ba1c048a Corey Bryant
    removed.
1160 ba1c048a Corey Bryant
1161 ba1c048a Corey Bryant
EQMP
1162 ba1c048a Corey Bryant
1163 ba1c048a Corey Bryant
    {
1164 ba1c048a Corey Bryant
        .name       = "query-fdsets",
1165 ba1c048a Corey Bryant
        .args_type  = "",
1166 ba1c048a Corey Bryant
        .help       = "Return information describing all fd sets",
1167 ba1c048a Corey Bryant
        .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1168 ba1c048a Corey Bryant
    },
1169 ba1c048a Corey Bryant
1170 ba1c048a Corey Bryant
SQMP
1171 ba1c048a Corey Bryant
query-fdsets
1172 ba1c048a Corey Bryant
-------------
1173 ba1c048a Corey Bryant
1174 ba1c048a Corey Bryant
Return information describing all fd sets.
1175 ba1c048a Corey Bryant
1176 ba1c048a Corey Bryant
Arguments: None
1177 ba1c048a Corey Bryant
1178 ba1c048a Corey Bryant
Example:
1179 ba1c048a Corey Bryant
1180 ba1c048a Corey Bryant
-> { "execute": "query-fdsets" }
1181 ba1c048a Corey Bryant
<- { "return": [
1182 ba1c048a Corey Bryant
       {
1183 ba1c048a Corey Bryant
         "fds": [
1184 ba1c048a Corey Bryant
           {
1185 ba1c048a Corey Bryant
             "fd": 30,
1186 ba1c048a Corey Bryant
             "opaque": "rdonly:/path/to/file"
1187 ba1c048a Corey Bryant
           },
1188 ba1c048a Corey Bryant
           {
1189 ba1c048a Corey Bryant
             "fd": 24,
1190 ba1c048a Corey Bryant
             "opaque": "rdwr:/path/to/file"
1191 ba1c048a Corey Bryant
           }
1192 ba1c048a Corey Bryant
         ],
1193 ba1c048a Corey Bryant
         "fdset-id": 1
1194 ba1c048a Corey Bryant
       },
1195 ba1c048a Corey Bryant
       {
1196 ba1c048a Corey Bryant
         "fds": [
1197 ba1c048a Corey Bryant
           {
1198 ba1c048a Corey Bryant
             "fd": 28
1199 ba1c048a Corey Bryant
           },
1200 ba1c048a Corey Bryant
           {
1201 ba1c048a Corey Bryant
             "fd": 29
1202 ba1c048a Corey Bryant
           }
1203 ba1c048a Corey Bryant
         ],
1204 ba1c048a Corey Bryant
         "fdset-id": 0
1205 ba1c048a Corey Bryant
       }
1206 ba1c048a Corey Bryant
     ]
1207 ba1c048a Corey Bryant
   }
1208 ba1c048a Corey Bryant
1209 ba1c048a Corey Bryant
Note: The list of fd sets is shared by all monitor connections.
1210 ba1c048a Corey Bryant
1211 ba1c048a Corey Bryant
EQMP
1212 ba1c048a Corey Bryant
1213 82a56f0d Luiz Capitulino
    {
1214 82a56f0d Luiz Capitulino
        .name       = "block_passwd",
1215 82a56f0d Luiz Capitulino
        .args_type  = "device:B,password:s",
1216 a4dea8a9 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1217 82a56f0d Luiz Capitulino
    },
1218 82a56f0d Luiz Capitulino
1219 82a56f0d Luiz Capitulino
SQMP
1220 82a56f0d Luiz Capitulino
block_passwd
1221 82a56f0d Luiz Capitulino
------------
1222 82a56f0d Luiz Capitulino
1223 82a56f0d Luiz Capitulino
Set the password of encrypted block devices.
1224 82a56f0d Luiz Capitulino
1225 82a56f0d Luiz Capitulino
Arguments:
1226 82a56f0d Luiz Capitulino
1227 82a56f0d Luiz Capitulino
- "device": device name (json-string)
1228 82a56f0d Luiz Capitulino
- "password": password (json-string)
1229 82a56f0d Luiz Capitulino
1230 82a56f0d Luiz Capitulino
Example:
1231 82a56f0d Luiz Capitulino
1232 82a56f0d Luiz Capitulino
-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1233 82a56f0d Luiz Capitulino
                                               "password": "12345" } }
1234 82a56f0d Luiz Capitulino
<- { "return": {} }
1235 82a56f0d Luiz Capitulino
1236 82a56f0d Luiz Capitulino
EQMP
1237 82a56f0d Luiz Capitulino
1238 82a56f0d Luiz Capitulino
    {
1239 727f005e Zhi Yong Wu
        .name       = "block_set_io_throttle",
1240 727f005e Zhi Yong Wu
        .args_type  = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1241 80047da5 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1242 727f005e Zhi Yong Wu
    },
1243 727f005e Zhi Yong Wu
1244 727f005e Zhi Yong Wu
SQMP
1245 727f005e Zhi Yong Wu
block_set_io_throttle
1246 727f005e Zhi Yong Wu
------------
1247 727f005e Zhi Yong Wu
1248 727f005e Zhi Yong Wu
Change I/O throttle limits for a block drive.
1249 727f005e Zhi Yong Wu
1250 727f005e Zhi Yong Wu
Arguments:
1251 727f005e Zhi Yong Wu
1252 727f005e Zhi Yong Wu
- "device": device name (json-string)
1253 727f005e Zhi Yong Wu
- "bps":  total throughput limit in bytes per second(json-int)
1254 727f005e Zhi Yong Wu
- "bps_rd":  read throughput limit in bytes per second(json-int)
1255 727f005e Zhi Yong Wu
- "bps_wr":  read throughput limit in bytes per second(json-int)
1256 727f005e Zhi Yong Wu
- "iops":  total I/O operations per second(json-int)
1257 727f005e Zhi Yong Wu
- "iops_rd":  read I/O operations per second(json-int)
1258 727f005e Zhi Yong Wu
- "iops_wr":  write I/O operations per second(json-int)
1259 727f005e Zhi Yong Wu
1260 727f005e Zhi Yong Wu
Example:
1261 727f005e Zhi Yong Wu
1262 727f005e Zhi Yong Wu
-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1263 727f005e Zhi Yong Wu
                                               "bps": "1000000",
1264 727f005e Zhi Yong Wu
                                               "bps_rd": "0",
1265 727f005e Zhi Yong Wu
                                               "bps_wr": "0",
1266 727f005e Zhi Yong Wu
                                               "iops": "0",
1267 727f005e Zhi Yong Wu
                                               "iops_rd": "0",
1268 727f005e Zhi Yong Wu
                                               "iops_wr": "0" } }
1269 727f005e Zhi Yong Wu
<- { "return": {} }
1270 727f005e Zhi Yong Wu
1271 727f005e Zhi Yong Wu
EQMP
1272 727f005e Zhi Yong Wu
1273 727f005e Zhi Yong Wu
    {
1274 7572150c Gerd Hoffmann
        .name       = "set_password",
1275 7572150c Gerd Hoffmann
        .args_type  = "protocol:s,password:s,connected:s?",
1276 fbf796fd Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_set_password,
1277 7572150c Gerd Hoffmann
    },
1278 7572150c Gerd Hoffmann
1279 7572150c Gerd Hoffmann
SQMP
1280 7572150c Gerd Hoffmann
set_password
1281 7572150c Gerd Hoffmann
------------
1282 7572150c Gerd Hoffmann
1283 7572150c Gerd Hoffmann
Set the password for vnc/spice protocols.
1284 7572150c Gerd Hoffmann
1285 7572150c Gerd Hoffmann
Arguments:
1286 7572150c Gerd Hoffmann
1287 7572150c Gerd Hoffmann
- "protocol": protocol name (json-string)
1288 7572150c Gerd Hoffmann
- "password": password (json-string)
1289 7572150c Gerd Hoffmann
- "connected": [ keep | disconnect | fail ] (josn-string, optional)
1290 7572150c Gerd Hoffmann
1291 7572150c Gerd Hoffmann
Example:
1292 7572150c Gerd Hoffmann
1293 7572150c Gerd Hoffmann
-> { "execute": "set_password", "arguments": { "protocol": "vnc",
1294 7572150c Gerd Hoffmann
                                               "password": "secret" } }
1295 7572150c Gerd Hoffmann
<- { "return": {} }
1296 7572150c Gerd Hoffmann
1297 7572150c Gerd Hoffmann
EQMP
1298 7572150c Gerd Hoffmann
1299 7572150c Gerd Hoffmann
    {
1300 7572150c Gerd Hoffmann
        .name       = "expire_password",
1301 7572150c Gerd Hoffmann
        .args_type  = "protocol:s,time:s",
1302 9ad5372d Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_expire_password,
1303 7572150c Gerd Hoffmann
    },
1304 7572150c Gerd Hoffmann
1305 7572150c Gerd Hoffmann
SQMP
1306 7572150c Gerd Hoffmann
expire_password
1307 7572150c Gerd Hoffmann
---------------
1308 7572150c Gerd Hoffmann
1309 7572150c Gerd Hoffmann
Set the password expire time for vnc/spice protocols.
1310 7572150c Gerd Hoffmann
1311 7572150c Gerd Hoffmann
Arguments:
1312 7572150c Gerd Hoffmann
1313 7572150c Gerd Hoffmann
- "protocol": protocol name (json-string)
1314 7572150c Gerd Hoffmann
- "time": [ now | never | +secs | secs ] (json-string)
1315 7572150c Gerd Hoffmann
1316 7572150c Gerd Hoffmann
Example:
1317 7572150c Gerd Hoffmann
1318 7572150c Gerd Hoffmann
-> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1319 7572150c Gerd Hoffmann
                                                  "time": "+60" } }
1320 7572150c Gerd Hoffmann
<- { "return": {} }
1321 7572150c Gerd Hoffmann
1322 7572150c Gerd Hoffmann
EQMP
1323 7572150c Gerd Hoffmann
1324 7572150c Gerd Hoffmann
    {
1325 13661089 Daniel P. Berrange
        .name       = "add_client",
1326 f1f5f407 Daniel P. Berrange
        .args_type  = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1327 b224e5e2 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_add_client,
1328 13661089 Daniel P. Berrange
    },
1329 13661089 Daniel P. Berrange
1330 13661089 Daniel P. Berrange
SQMP
1331 13661089 Daniel P. Berrange
add_client
1332 13661089 Daniel P. Berrange
----------
1333 13661089 Daniel P. Berrange
1334 13661089 Daniel P. Berrange
Add a graphics client
1335 13661089 Daniel P. Berrange
1336 13661089 Daniel P. Berrange
Arguments:
1337 13661089 Daniel P. Berrange
1338 13661089 Daniel P. Berrange
- "protocol": protocol name (json-string)
1339 13661089 Daniel P. Berrange
- "fdname": file descriptor name (json-string)
1340 f1f5f407 Daniel P. Berrange
- "skipauth": whether to skip authentication (json-bool, optional)
1341 f1f5f407 Daniel P. Berrange
- "tls": whether to perform TLS (json-bool, optional)
1342 13661089 Daniel P. Berrange
1343 13661089 Daniel P. Berrange
Example:
1344 13661089 Daniel P. Berrange
1345 13661089 Daniel P. Berrange
-> { "execute": "add_client", "arguments": { "protocol": "vnc",
1346 13661089 Daniel P. Berrange
                                             "fdname": "myclient" } }
1347 13661089 Daniel P. Berrange
<- { "return": {} }
1348 13661089 Daniel P. Berrange
1349 13661089 Daniel P. Berrange
EQMP
1350 13661089 Daniel P. Berrange
    {
1351 82a56f0d Luiz Capitulino
        .name       = "qmp_capabilities",
1352 82a56f0d Luiz Capitulino
        .args_type  = "",
1353 82a56f0d Luiz Capitulino
        .params     = "",
1354 82a56f0d Luiz Capitulino
        .help       = "enable QMP capabilities",
1355 82a56f0d Luiz Capitulino
        .user_print = monitor_user_noop,
1356 82a56f0d Luiz Capitulino
        .mhandler.cmd_new = do_qmp_capabilities,
1357 82a56f0d Luiz Capitulino
    },
1358 82a56f0d Luiz Capitulino
1359 82a56f0d Luiz Capitulino
SQMP
1360 82a56f0d Luiz Capitulino
qmp_capabilities
1361 82a56f0d Luiz Capitulino
----------------
1362 82a56f0d Luiz Capitulino
1363 82a56f0d Luiz Capitulino
Enable QMP capabilities.
1364 82a56f0d Luiz Capitulino
1365 82a56f0d Luiz Capitulino
Arguments: None.
1366 82a56f0d Luiz Capitulino
1367 82a56f0d Luiz Capitulino
Example:
1368 82a56f0d Luiz Capitulino
1369 82a56f0d Luiz Capitulino
-> { "execute": "qmp_capabilities" }
1370 82a56f0d Luiz Capitulino
<- { "return": {} }
1371 82a56f0d Luiz Capitulino
1372 82a56f0d Luiz Capitulino
Note: This command must be issued before issuing any other command.
1373 82a56f0d Luiz Capitulino
1374 0268d97c Luiz Capitulino
EQMP
1375 0268d97c Luiz Capitulino
1376 0268d97c Luiz Capitulino
    {
1377 0268d97c Luiz Capitulino
        .name       = "human-monitor-command",
1378 0268d97c Luiz Capitulino
        .args_type  = "command-line:s,cpu-index:i?",
1379 d51a67b4 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
1380 0268d97c Luiz Capitulino
    },
1381 0268d97c Luiz Capitulino
1382 0268d97c Luiz Capitulino
SQMP
1383 0268d97c Luiz Capitulino
human-monitor-command
1384 0268d97c Luiz Capitulino
---------------------
1385 0268d97c Luiz Capitulino
1386 0268d97c Luiz Capitulino
Execute a Human Monitor command.
1387 0268d97c Luiz Capitulino
1388 0268d97c Luiz Capitulino
Arguments: 
1389 0268d97c Luiz Capitulino
1390 0268d97c Luiz Capitulino
- command-line: the command name and its arguments, just like the
1391 0268d97c Luiz Capitulino
                Human Monitor's shell (json-string)
1392 0268d97c Luiz Capitulino
- cpu-index: select the CPU number to be used by commands which access CPU
1393 0268d97c Luiz Capitulino
             data, like 'info registers'. The Monitor selects CPU 0 if this
1394 0268d97c Luiz Capitulino
             argument is not provided (json-int, optional)
1395 0268d97c Luiz Capitulino
1396 0268d97c Luiz Capitulino
Example:
1397 0268d97c Luiz Capitulino
1398 0268d97c Luiz Capitulino
-> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1399 0268d97c Luiz Capitulino
<- { "return": "kvm support: enabled\r\n" }
1400 0268d97c Luiz Capitulino
1401 0268d97c Luiz Capitulino
Notes:
1402 0268d97c Luiz Capitulino
1403 0268d97c Luiz Capitulino
(1) The Human Monitor is NOT an stable interface, this means that command
1404 0268d97c Luiz Capitulino
    names, arguments and responses can change or be removed at ANY time.
1405 0268d97c Luiz Capitulino
    Applications that rely on long term stability guarantees should NOT
1406 0268d97c Luiz Capitulino
    use this command
1407 0268d97c Luiz Capitulino
1408 0268d97c Luiz Capitulino
(2) Limitations:
1409 0268d97c Luiz Capitulino
1410 0268d97c Luiz Capitulino
    o This command is stateless, this means that commands that depend
1411 0268d97c Luiz Capitulino
      on state information (such as getfd) might not work
1412 0268d97c Luiz Capitulino
1413 0268d97c Luiz Capitulino
    o Commands that prompt the user for data (eg. 'cont' when the block
1414 0268d97c Luiz Capitulino
      device is encrypted) don't currently work
1415 0268d97c Luiz Capitulino
1416 82a56f0d Luiz Capitulino
3. Query Commands
1417 82a56f0d Luiz Capitulino
=================
1418 82a56f0d Luiz Capitulino
1419 82a56f0d Luiz Capitulino
HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1420 82a56f0d Luiz Capitulino
HXCOMM this! We will possibly move query commands definitions inside those
1421 82a56f0d Luiz Capitulino
HXCOMM sections, just like regular commands.
1422 82a56f0d Luiz Capitulino
1423 82a56f0d Luiz Capitulino
EQMP
1424 82a56f0d Luiz Capitulino
1425 82a56f0d Luiz Capitulino
SQMP
1426 82a56f0d Luiz Capitulino
query-version
1427 82a56f0d Luiz Capitulino
-------------
1428 82a56f0d Luiz Capitulino
1429 82a56f0d Luiz Capitulino
Show QEMU version.
1430 82a56f0d Luiz Capitulino
1431 82a56f0d Luiz Capitulino
Return a json-object with the following information:
1432 82a56f0d Luiz Capitulino
1433 82a56f0d Luiz Capitulino
- "qemu": A json-object containing three integer values:
1434 82a56f0d Luiz Capitulino
    - "major": QEMU's major version (json-int)
1435 82a56f0d Luiz Capitulino
    - "minor": QEMU's minor version (json-int)
1436 82a56f0d Luiz Capitulino
    - "micro": QEMU's micro version (json-int)
1437 82a56f0d Luiz Capitulino
- "package": package's version (json-string)
1438 82a56f0d Luiz Capitulino
1439 82a56f0d Luiz Capitulino
Example:
1440 82a56f0d Luiz Capitulino
1441 82a56f0d Luiz Capitulino
-> { "execute": "query-version" }
1442 82a56f0d Luiz Capitulino
<- {
1443 82a56f0d Luiz Capitulino
      "return":{
1444 82a56f0d Luiz Capitulino
         "qemu":{
1445 82a56f0d Luiz Capitulino
            "major":0,
1446 82a56f0d Luiz Capitulino
            "minor":11,
1447 82a56f0d Luiz Capitulino
            "micro":5
1448 82a56f0d Luiz Capitulino
         },
1449 82a56f0d Luiz Capitulino
         "package":""
1450 82a56f0d Luiz Capitulino
      }
1451 82a56f0d Luiz Capitulino
   }
1452 82a56f0d Luiz Capitulino
1453 82a56f0d Luiz Capitulino
EQMP
1454 82a56f0d Luiz Capitulino
1455 b9c15f16 Luiz Capitulino
    {
1456 b9c15f16 Luiz Capitulino
        .name       = "query-version",
1457 b9c15f16 Luiz Capitulino
        .args_type  = "",
1458 b9c15f16 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_version,
1459 b9c15f16 Luiz Capitulino
    },
1460 b9c15f16 Luiz Capitulino
1461 82a56f0d Luiz Capitulino
SQMP
1462 82a56f0d Luiz Capitulino
query-commands
1463 82a56f0d Luiz Capitulino
--------------
1464 82a56f0d Luiz Capitulino
1465 82a56f0d Luiz Capitulino
List QMP available commands.
1466 82a56f0d Luiz Capitulino
1467 82a56f0d Luiz Capitulino
Each command is represented by a json-object, the returned value is a json-array
1468 82a56f0d Luiz Capitulino
of all commands.
1469 82a56f0d Luiz Capitulino
1470 82a56f0d Luiz Capitulino
Each json-object contain:
1471 82a56f0d Luiz Capitulino
1472 82a56f0d Luiz Capitulino
- "name": command's name (json-string)
1473 82a56f0d Luiz Capitulino
1474 82a56f0d Luiz Capitulino
Example:
1475 82a56f0d Luiz Capitulino
1476 82a56f0d Luiz Capitulino
-> { "execute": "query-commands" }
1477 82a56f0d Luiz Capitulino
<- {
1478 82a56f0d Luiz Capitulino
      "return":[
1479 82a56f0d Luiz Capitulino
         {
1480 82a56f0d Luiz Capitulino
            "name":"query-balloon"
1481 82a56f0d Luiz Capitulino
         },
1482 82a56f0d Luiz Capitulino
         {
1483 82a56f0d Luiz Capitulino
            "name":"system_powerdown"
1484 82a56f0d Luiz Capitulino
         }
1485 82a56f0d Luiz Capitulino
      ]
1486 82a56f0d Luiz Capitulino
   }
1487 82a56f0d Luiz Capitulino
1488 82a56f0d Luiz Capitulino
Note: This example has been shortened as the real response is too long.
1489 82a56f0d Luiz Capitulino
1490 82a56f0d Luiz Capitulino
EQMP
1491 82a56f0d Luiz Capitulino
1492 aa9b79bc Luiz Capitulino
    {
1493 aa9b79bc Luiz Capitulino
        .name       = "query-commands",
1494 aa9b79bc Luiz Capitulino
        .args_type  = "",
1495 aa9b79bc Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_commands,
1496 aa9b79bc Luiz Capitulino
    },
1497 aa9b79bc Luiz Capitulino
1498 82a56f0d Luiz Capitulino
SQMP
1499 4860853d Daniel P. Berrange
query-events
1500 4860853d Daniel P. Berrange
--------------
1501 4860853d Daniel P. Berrange
1502 4860853d Daniel P. Berrange
List QMP available events.
1503 4860853d Daniel P. Berrange
1504 4860853d Daniel P. Berrange
Each event is represented by a json-object, the returned value is a json-array
1505 4860853d Daniel P. Berrange
of all events.
1506 4860853d Daniel P. Berrange
1507 4860853d Daniel P. Berrange
Each json-object contains:
1508 4860853d Daniel P. Berrange
1509 4860853d Daniel P. Berrange
- "name": event's name (json-string)
1510 4860853d Daniel P. Berrange
1511 4860853d Daniel P. Berrange
Example:
1512 4860853d Daniel P. Berrange
1513 4860853d Daniel P. Berrange
-> { "execute": "query-events" }
1514 4860853d Daniel P. Berrange
<- {
1515 4860853d Daniel P. Berrange
      "return":[
1516 4860853d Daniel P. Berrange
         {
1517 4860853d Daniel P. Berrange
            "name":"SHUTDOWN"
1518 4860853d Daniel P. Berrange
         },
1519 4860853d Daniel P. Berrange
         {
1520 4860853d Daniel P. Berrange
            "name":"RESET"
1521 4860853d Daniel P. Berrange
         }
1522 4860853d Daniel P. Berrange
      ]
1523 4860853d Daniel P. Berrange
   }
1524 4860853d Daniel P. Berrange
1525 4860853d Daniel P. Berrange
Note: This example has been shortened as the real response is too long.
1526 4860853d Daniel P. Berrange
1527 4860853d Daniel P. Berrange
EQMP
1528 4860853d Daniel P. Berrange
1529 4860853d Daniel P. Berrange
    {
1530 4860853d Daniel P. Berrange
        .name       = "query-events",
1531 4860853d Daniel P. Berrange
        .args_type  = "",
1532 4860853d Daniel P. Berrange
        .mhandler.cmd_new = qmp_marshal_input_query_events,
1533 4860853d Daniel P. Berrange
    },
1534 4860853d Daniel P. Berrange
1535 4860853d Daniel P. Berrange
SQMP
1536 82a56f0d Luiz Capitulino
query-chardev
1537 82a56f0d Luiz Capitulino
-------------
1538 82a56f0d Luiz Capitulino
1539 82a56f0d Luiz Capitulino
Each device is represented by a json-object. The returned value is a json-array
1540 82a56f0d Luiz Capitulino
of all devices.
1541 82a56f0d Luiz Capitulino
1542 82a56f0d Luiz Capitulino
Each json-object contain the following:
1543 82a56f0d Luiz Capitulino
1544 82a56f0d Luiz Capitulino
- "label": device's label (json-string)
1545 82a56f0d Luiz Capitulino
- "filename": device's file (json-string)
1546 82a56f0d Luiz Capitulino
1547 82a56f0d Luiz Capitulino
Example:
1548 82a56f0d Luiz Capitulino
1549 82a56f0d Luiz Capitulino
-> { "execute": "query-chardev" }
1550 82a56f0d Luiz Capitulino
<- {
1551 82a56f0d Luiz Capitulino
      "return":[
1552 82a56f0d Luiz Capitulino
         {
1553 82a56f0d Luiz Capitulino
            "label":"monitor",
1554 82a56f0d Luiz Capitulino
            "filename":"stdio"
1555 82a56f0d Luiz Capitulino
         },
1556 82a56f0d Luiz Capitulino
         {
1557 82a56f0d Luiz Capitulino
            "label":"serial0",
1558 82a56f0d Luiz Capitulino
            "filename":"vc"
1559 82a56f0d Luiz Capitulino
         }
1560 82a56f0d Luiz Capitulino
      ]
1561 82a56f0d Luiz Capitulino
   }
1562 82a56f0d Luiz Capitulino
1563 82a56f0d Luiz Capitulino
EQMP
1564 82a56f0d Luiz Capitulino
1565 c5a415a0 Luiz Capitulino
    {
1566 c5a415a0 Luiz Capitulino
        .name       = "query-chardev",
1567 c5a415a0 Luiz Capitulino
        .args_type  = "",
1568 c5a415a0 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_chardev,
1569 c5a415a0 Luiz Capitulino
    },
1570 c5a415a0 Luiz Capitulino
1571 82a56f0d Luiz Capitulino
SQMP
1572 82a56f0d Luiz Capitulino
query-block
1573 82a56f0d Luiz Capitulino
-----------
1574 82a56f0d Luiz Capitulino
1575 82a56f0d Luiz Capitulino
Show the block devices.
1576 82a56f0d Luiz Capitulino
1577 82a56f0d Luiz Capitulino
Each block device information is stored in a json-object and the returned value
1578 82a56f0d Luiz Capitulino
is a json-array of all devices.
1579 82a56f0d Luiz Capitulino
1580 82a56f0d Luiz Capitulino
Each json-object contain the following:
1581 82a56f0d Luiz Capitulino
1582 82a56f0d Luiz Capitulino
- "device": device name (json-string)
1583 82a56f0d Luiz Capitulino
- "type": device type (json-string)
1584 d8aeeb31 Markus Armbruster
         - deprecated, retained for backward compatibility
1585 d8aeeb31 Markus Armbruster
         - Possible values: "unknown"
1586 82a56f0d Luiz Capitulino
- "removable": true if the device is removable, false otherwise (json-bool)
1587 82a56f0d Luiz Capitulino
- "locked": true if the device is locked, false otherwise (json-bool)
1588 e4def80b Markus Armbruster
- "tray-open": only present if removable, true if the device has a tray,
1589 e4def80b Markus Armbruster
               and it is open (json-bool)
1590 82a56f0d Luiz Capitulino
- "inserted": only present if the device is inserted, it is a json-object
1591 82a56f0d Luiz Capitulino
   containing the following:
1592 82a56f0d Luiz Capitulino
         - "file": device file name (json-string)
1593 82a56f0d Luiz Capitulino
         - "ro": true if read-only, false otherwise (json-bool)
1594 82a56f0d Luiz Capitulino
         - "drv": driver format name (json-string)
1595 82a56f0d Luiz Capitulino
             - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1596 82a56f0d Luiz Capitulino
                                "file", "file", "ftp", "ftps", "host_cdrom",
1597 82a56f0d Luiz Capitulino
                                "host_device", "host_floppy", "http", "https",
1598 82a56f0d Luiz Capitulino
                                "nbd", "parallels", "qcow", "qcow2", "raw",
1599 82a56f0d Luiz Capitulino
                                "tftp", "vdi", "vmdk", "vpc", "vvfat"
1600 82a56f0d Luiz Capitulino
         - "backing_file": backing file name (json-string, optional)
1601 2e3e3317 Benoรฎt Canet
         - "backing_file_depth": number of files in the backing file chain (json-int)
1602 82a56f0d Luiz Capitulino
         - "encrypted": true if encrypted, false otherwise (json-bool)
1603 727f005e Zhi Yong Wu
         - "bps": limit total bytes per second (json-int)
1604 727f005e Zhi Yong Wu
         - "bps_rd": limit read bytes per second (json-int)
1605 727f005e Zhi Yong Wu
         - "bps_wr": limit write bytes per second (json-int)
1606 727f005e Zhi Yong Wu
         - "iops": limit total I/O operations per second (json-int)
1607 727f005e Zhi Yong Wu
         - "iops_rd": limit read operations per second (json-int)
1608 727f005e Zhi Yong Wu
         - "iops_wr": limit write operations per second (json-int)
1609 727f005e Zhi Yong Wu
1610 f04ef601 Luiz Capitulino
- "io-status": I/O operation status, only present if the device supports it
1611 f04ef601 Luiz Capitulino
               and the VM is configured to stop on errors. It's always reset
1612 f04ef601 Luiz Capitulino
               to "ok" when the "cont" command is issued (json_string, optional)
1613 f04ef601 Luiz Capitulino
             - Possible values: "ok", "failed", "nospace"
1614 82a56f0d Luiz Capitulino
1615 82a56f0d Luiz Capitulino
Example:
1616 82a56f0d Luiz Capitulino
1617 82a56f0d Luiz Capitulino
-> { "execute": "query-block" }
1618 82a56f0d Luiz Capitulino
<- {
1619 82a56f0d Luiz Capitulino
      "return":[
1620 82a56f0d Luiz Capitulino
         {
1621 f04ef601 Luiz Capitulino
            "io-status": "ok",
1622 82a56f0d Luiz Capitulino
            "device":"ide0-hd0",
1623 82a56f0d Luiz Capitulino
            "locked":false,
1624 82a56f0d Luiz Capitulino
            "removable":false,
1625 82a56f0d Luiz Capitulino
            "inserted":{
1626 82a56f0d Luiz Capitulino
               "ro":false,
1627 82a56f0d Luiz Capitulino
               "drv":"qcow2",
1628 82a56f0d Luiz Capitulino
               "encrypted":false,
1629 727f005e Zhi Yong Wu
               "file":"disks/test.img",
1630 2e3e3317 Benoรฎt Canet
               "backing_file_depth":0,
1631 727f005e Zhi Yong Wu
               "bps":1000000,
1632 727f005e Zhi Yong Wu
               "bps_rd":0,
1633 727f005e Zhi Yong Wu
               "bps_wr":0,
1634 727f005e Zhi Yong Wu
               "iops":1000000,
1635 727f005e Zhi Yong Wu
               "iops_rd":0,
1636 727f005e Zhi Yong Wu
               "iops_wr":0,
1637 82a56f0d Luiz Capitulino
            },
1638 d8aeeb31 Markus Armbruster
            "type":"unknown"
1639 82a56f0d Luiz Capitulino
         },
1640 82a56f0d Luiz Capitulino
         {
1641 f04ef601 Luiz Capitulino
            "io-status": "ok",
1642 82a56f0d Luiz Capitulino
            "device":"ide1-cd0",
1643 82a56f0d Luiz Capitulino
            "locked":false,
1644 82a56f0d Luiz Capitulino
            "removable":true,
1645 d8aeeb31 Markus Armbruster
            "type":"unknown"
1646 82a56f0d Luiz Capitulino
         },
1647 82a56f0d Luiz Capitulino
         {
1648 82a56f0d Luiz Capitulino
            "device":"floppy0",
1649 82a56f0d Luiz Capitulino
            "locked":false,
1650 82a56f0d Luiz Capitulino
            "removable":true,
1651 d8aeeb31 Markus Armbruster
            "type":"unknown"
1652 82a56f0d Luiz Capitulino
         },
1653 82a56f0d Luiz Capitulino
         {
1654 82a56f0d Luiz Capitulino
            "device":"sd0",
1655 82a56f0d Luiz Capitulino
            "locked":false,
1656 82a56f0d Luiz Capitulino
            "removable":true,
1657 d8aeeb31 Markus Armbruster
            "type":"unknown"
1658 82a56f0d Luiz Capitulino
         }
1659 82a56f0d Luiz Capitulino
      ]
1660 82a56f0d Luiz Capitulino
   }
1661 82a56f0d Luiz Capitulino
1662 82a56f0d Luiz Capitulino
EQMP
1663 82a56f0d Luiz Capitulino
1664 b2023818 Luiz Capitulino
    {
1665 b2023818 Luiz Capitulino
        .name       = "query-block",
1666 b2023818 Luiz Capitulino
        .args_type  = "",
1667 b2023818 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_block,
1668 b2023818 Luiz Capitulino
    },
1669 b2023818 Luiz Capitulino
1670 82a56f0d Luiz Capitulino
SQMP
1671 82a56f0d Luiz Capitulino
query-blockstats
1672 82a56f0d Luiz Capitulino
----------------
1673 82a56f0d Luiz Capitulino
1674 82a56f0d Luiz Capitulino
Show block device statistics.
1675 82a56f0d Luiz Capitulino
1676 82a56f0d Luiz Capitulino
Each device statistic information is stored in a json-object and the returned
1677 82a56f0d Luiz Capitulino
value is a json-array of all devices.
1678 82a56f0d Luiz Capitulino
1679 82a56f0d Luiz Capitulino
Each json-object contain the following:
1680 82a56f0d Luiz Capitulino
1681 82a56f0d Luiz Capitulino
- "device": device name (json-string)
1682 82a56f0d Luiz Capitulino
- "stats": A json-object with the statistics information, it contains:
1683 82a56f0d Luiz Capitulino
    - "rd_bytes": bytes read (json-int)
1684 82a56f0d Luiz Capitulino
    - "wr_bytes": bytes written (json-int)
1685 82a56f0d Luiz Capitulino
    - "rd_operations": read operations (json-int)
1686 82a56f0d Luiz Capitulino
    - "wr_operations": write operations (json-int)
1687 e8045d67 Christoph Hellwig
    - "flush_operations": cache flush operations (json-int)
1688 c488c7f6 Christoph Hellwig
    - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
1689 c488c7f6 Christoph Hellwig
    - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
1690 c488c7f6 Christoph Hellwig
    - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
1691 82a56f0d Luiz Capitulino
    - "wr_highest_offset": Highest offset of a sector written since the
1692 82a56f0d Luiz Capitulino
                           BlockDriverState has been opened (json-int)
1693 82a56f0d Luiz Capitulino
- "parent": Contains recursively the statistics of the underlying
1694 82a56f0d Luiz Capitulino
            protocol (e.g. the host file for a qcow2 image). If there is
1695 82a56f0d Luiz Capitulino
            no underlying protocol, this field is omitted
1696 82a56f0d Luiz Capitulino
            (json-object, optional)
1697 82a56f0d Luiz Capitulino
1698 82a56f0d Luiz Capitulino
Example:
1699 82a56f0d Luiz Capitulino
1700 82a56f0d Luiz Capitulino
-> { "execute": "query-blockstats" }
1701 82a56f0d Luiz Capitulino
<- {
1702 82a56f0d Luiz Capitulino
      "return":[
1703 82a56f0d Luiz Capitulino
         {
1704 82a56f0d Luiz Capitulino
            "device":"ide0-hd0",
1705 82a56f0d Luiz Capitulino
            "parent":{
1706 82a56f0d Luiz Capitulino
               "stats":{
1707 82a56f0d Luiz Capitulino
                  "wr_highest_offset":3686448128,
1708 82a56f0d Luiz Capitulino
                  "wr_bytes":9786368,
1709 82a56f0d Luiz Capitulino
                  "wr_operations":751,
1710 82a56f0d Luiz Capitulino
                  "rd_bytes":122567168,
1711 82a56f0d Luiz Capitulino
                  "rd_operations":36772
1712 c488c7f6 Christoph Hellwig
                  "wr_total_times_ns":313253456
1713 c488c7f6 Christoph Hellwig
                  "rd_total_times_ns":3465673657
1714 c488c7f6 Christoph Hellwig
                  "flush_total_times_ns":49653
1715 e8045d67 Christoph Hellwig
                  "flush_operations":61,
1716 82a56f0d Luiz Capitulino
               }
1717 82a56f0d Luiz Capitulino
            },
1718 82a56f0d Luiz Capitulino
            "stats":{
1719 82a56f0d Luiz Capitulino
               "wr_highest_offset":2821110784,
1720 82a56f0d Luiz Capitulino
               "wr_bytes":9786368,
1721 82a56f0d Luiz Capitulino
               "wr_operations":692,
1722 82a56f0d Luiz Capitulino
               "rd_bytes":122739200,
1723 82a56f0d Luiz Capitulino
               "rd_operations":36604
1724 e8045d67 Christoph Hellwig
               "flush_operations":51,
1725 c488c7f6 Christoph Hellwig
               "wr_total_times_ns":313253456
1726 c488c7f6 Christoph Hellwig
               "rd_total_times_ns":3465673657
1727 c488c7f6 Christoph Hellwig
               "flush_total_times_ns":49653
1728 82a56f0d Luiz Capitulino
            }
1729 82a56f0d Luiz Capitulino
         },
1730 82a56f0d Luiz Capitulino
         {
1731 82a56f0d Luiz Capitulino
            "device":"ide1-cd0",
1732 82a56f0d Luiz Capitulino
            "stats":{
1733 82a56f0d Luiz Capitulino
               "wr_highest_offset":0,
1734 82a56f0d Luiz Capitulino
               "wr_bytes":0,
1735 82a56f0d Luiz Capitulino
               "wr_operations":0,
1736 82a56f0d Luiz Capitulino
               "rd_bytes":0,
1737 82a56f0d Luiz Capitulino
               "rd_operations":0
1738 e8045d67 Christoph Hellwig
               "flush_operations":0,
1739 c488c7f6 Christoph Hellwig
               "wr_total_times_ns":0
1740 c488c7f6 Christoph Hellwig
               "rd_total_times_ns":0
1741 c488c7f6 Christoph Hellwig
               "flush_total_times_ns":0
1742 82a56f0d Luiz Capitulino
            }
1743 82a56f0d Luiz Capitulino
         },
1744 82a56f0d Luiz Capitulino
         {
1745 82a56f0d Luiz Capitulino
            "device":"floppy0",
1746 82a56f0d Luiz Capitulino
            "stats":{
1747 82a56f0d Luiz Capitulino
               "wr_highest_offset":0,
1748 82a56f0d Luiz Capitulino
               "wr_bytes":0,
1749 82a56f0d Luiz Capitulino
               "wr_operations":0,
1750 82a56f0d Luiz Capitulino
               "rd_bytes":0,
1751 82a56f0d Luiz Capitulino
               "rd_operations":0
1752 e8045d67 Christoph Hellwig
               "flush_operations":0,
1753 c488c7f6 Christoph Hellwig
               "wr_total_times_ns":0
1754 c488c7f6 Christoph Hellwig
               "rd_total_times_ns":0
1755 c488c7f6 Christoph Hellwig
               "flush_total_times_ns":0
1756 82a56f0d Luiz Capitulino
            }
1757 82a56f0d Luiz Capitulino
         },
1758 82a56f0d Luiz Capitulino
         {
1759 82a56f0d Luiz Capitulino
            "device":"sd0",
1760 82a56f0d Luiz Capitulino
            "stats":{
1761 82a56f0d Luiz Capitulino
               "wr_highest_offset":0,
1762 82a56f0d Luiz Capitulino
               "wr_bytes":0,
1763 82a56f0d Luiz Capitulino
               "wr_operations":0,
1764 82a56f0d Luiz Capitulino
               "rd_bytes":0,
1765 82a56f0d Luiz Capitulino
               "rd_operations":0
1766 e8045d67 Christoph Hellwig
               "flush_operations":0,
1767 c488c7f6 Christoph Hellwig
               "wr_total_times_ns":0
1768 c488c7f6 Christoph Hellwig
               "rd_total_times_ns":0
1769 c488c7f6 Christoph Hellwig
               "flush_total_times_ns":0
1770 82a56f0d Luiz Capitulino
            }
1771 82a56f0d Luiz Capitulino
         }
1772 82a56f0d Luiz Capitulino
      ]
1773 82a56f0d Luiz Capitulino
   }
1774 82a56f0d Luiz Capitulino
1775 82a56f0d Luiz Capitulino
EQMP
1776 82a56f0d Luiz Capitulino
1777 f11f57e4 Luiz Capitulino
    {
1778 f11f57e4 Luiz Capitulino
        .name       = "query-blockstats",
1779 f11f57e4 Luiz Capitulino
        .args_type  = "",
1780 f11f57e4 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
1781 f11f57e4 Luiz Capitulino
    },
1782 f11f57e4 Luiz Capitulino
1783 82a56f0d Luiz Capitulino
SQMP
1784 82a56f0d Luiz Capitulino
query-cpus
1785 82a56f0d Luiz Capitulino
----------
1786 82a56f0d Luiz Capitulino
1787 82a56f0d Luiz Capitulino
Show CPU information.
1788 82a56f0d Luiz Capitulino
1789 82a56f0d Luiz Capitulino
Return a json-array. Each CPU is represented by a json-object, which contains:
1790 82a56f0d Luiz Capitulino
1791 82a56f0d Luiz Capitulino
- "CPU": CPU index (json-int)
1792 82a56f0d Luiz Capitulino
- "current": true if this is the current CPU, false otherwise (json-bool)
1793 82a56f0d Luiz Capitulino
- "halted": true if the cpu is halted, false otherwise (json-bool)
1794 82a56f0d Luiz Capitulino
- Current program counter. The key's name depends on the architecture:
1795 82a56f0d Luiz Capitulino
     "pc": i386/x86_64 (json-int)
1796 82a56f0d Luiz Capitulino
     "nip": PPC (json-int)
1797 82a56f0d Luiz Capitulino
     "pc" and "npc": sparc (json-int)
1798 82a56f0d Luiz Capitulino
     "PC": mips (json-int)
1799 dc7a09cf Jan Kiszka
- "thread_id": ID of the underlying host thread (json-int)
1800 82a56f0d Luiz Capitulino
1801 82a56f0d Luiz Capitulino
Example:
1802 82a56f0d Luiz Capitulino
1803 82a56f0d Luiz Capitulino
-> { "execute": "query-cpus" }
1804 82a56f0d Luiz Capitulino
<- {
1805 82a56f0d Luiz Capitulino
      "return":[
1806 82a56f0d Luiz Capitulino
         {
1807 82a56f0d Luiz Capitulino
            "CPU":0,
1808 82a56f0d Luiz Capitulino
            "current":true,
1809 82a56f0d Luiz Capitulino
            "halted":false,
1810 82a56f0d Luiz Capitulino
            "pc":3227107138
1811 dc7a09cf Jan Kiszka
            "thread_id":3134
1812 82a56f0d Luiz Capitulino
         },
1813 82a56f0d Luiz Capitulino
         {
1814 82a56f0d Luiz Capitulino
            "CPU":1,
1815 82a56f0d Luiz Capitulino
            "current":false,
1816 82a56f0d Luiz Capitulino
            "halted":true,
1817 82a56f0d Luiz Capitulino
            "pc":7108165
1818 dc7a09cf Jan Kiszka
            "thread_id":3135
1819 82a56f0d Luiz Capitulino
         }
1820 82a56f0d Luiz Capitulino
      ]
1821 82a56f0d Luiz Capitulino
   }
1822 82a56f0d Luiz Capitulino
1823 82a56f0d Luiz Capitulino
EQMP
1824 82a56f0d Luiz Capitulino
1825 de0b36b6 Luiz Capitulino
    {
1826 de0b36b6 Luiz Capitulino
        .name       = "query-cpus",
1827 de0b36b6 Luiz Capitulino
        .args_type  = "",
1828 de0b36b6 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_cpus,
1829 de0b36b6 Luiz Capitulino
    },
1830 de0b36b6 Luiz Capitulino
1831 82a56f0d Luiz Capitulino
SQMP
1832 82a56f0d Luiz Capitulino
query-pci
1833 82a56f0d Luiz Capitulino
---------
1834 82a56f0d Luiz Capitulino
1835 82a56f0d Luiz Capitulino
PCI buses and devices information.
1836 82a56f0d Luiz Capitulino
1837 82a56f0d Luiz Capitulino
The returned value is a json-array of all buses. Each bus is represented by
1838 82a56f0d Luiz Capitulino
a json-object, which has a key with a json-array of all PCI devices attached
1839 82a56f0d Luiz Capitulino
to it. Each device is represented by a json-object.
1840 82a56f0d Luiz Capitulino
1841 82a56f0d Luiz Capitulino
The bus json-object contains the following:
1842 82a56f0d Luiz Capitulino
1843 82a56f0d Luiz Capitulino
- "bus": bus number (json-int)
1844 82a56f0d Luiz Capitulino
- "devices": a json-array of json-objects, each json-object represents a
1845 82a56f0d Luiz Capitulino
             PCI device
1846 82a56f0d Luiz Capitulino
1847 82a56f0d Luiz Capitulino
The PCI device json-object contains the following:
1848 82a56f0d Luiz Capitulino
1849 82a56f0d Luiz Capitulino
- "bus": identical to the parent's bus number (json-int)
1850 82a56f0d Luiz Capitulino
- "slot": slot number (json-int)
1851 82a56f0d Luiz Capitulino
- "function": function number (json-int)
1852 82a56f0d Luiz Capitulino
- "class_info": a json-object containing:
1853 82a56f0d Luiz Capitulino
     - "desc": device class description (json-string, optional)
1854 82a56f0d Luiz Capitulino
     - "class": device class number (json-int)
1855 82a56f0d Luiz Capitulino
- "id": a json-object containing:
1856 82a56f0d Luiz Capitulino
     - "device": device ID (json-int)
1857 82a56f0d Luiz Capitulino
     - "vendor": vendor ID (json-int)
1858 82a56f0d Luiz Capitulino
- "irq": device's IRQ if assigned (json-int, optional)
1859 82a56f0d Luiz Capitulino
- "qdev_id": qdev id string (json-string)
1860 82a56f0d Luiz Capitulino
- "pci_bridge": It's a json-object, only present if this device is a
1861 82a56f0d Luiz Capitulino
                PCI bridge, contains:
1862 82a56f0d Luiz Capitulino
     - "bus": bus number (json-int)
1863 82a56f0d Luiz Capitulino
     - "secondary": secondary bus number (json-int)
1864 82a56f0d Luiz Capitulino
     - "subordinate": subordinate bus number (json-int)
1865 82a56f0d Luiz Capitulino
     - "io_range": I/O memory range information, a json-object with the
1866 82a56f0d Luiz Capitulino
                   following members:
1867 82a56f0d Luiz Capitulino
                 - "base": base address, in bytes (json-int)
1868 82a56f0d Luiz Capitulino
                 - "limit": limit address, in bytes (json-int)
1869 82a56f0d Luiz Capitulino
     - "memory_range": memory range information, a json-object with the
1870 82a56f0d Luiz Capitulino
                       following members:
1871 82a56f0d Luiz Capitulino
                 - "base": base address, in bytes (json-int)
1872 82a56f0d Luiz Capitulino
                 - "limit": limit address, in bytes (json-int)
1873 82a56f0d Luiz Capitulino
     - "prefetchable_range": Prefetchable memory range information, a
1874 82a56f0d Luiz Capitulino
                             json-object with the following members:
1875 82a56f0d Luiz Capitulino
                 - "base": base address, in bytes (json-int)
1876 82a56f0d Luiz Capitulino
                 - "limit": limit address, in bytes (json-int)
1877 82a56f0d Luiz Capitulino
     - "devices": a json-array of PCI devices if there's any attached, each
1878 82a56f0d Luiz Capitulino
                  each element is represented by a json-object, which contains
1879 82a56f0d Luiz Capitulino
                  the same members of the 'PCI device json-object' described
1880 82a56f0d Luiz Capitulino
                  above (optional)
1881 82a56f0d Luiz Capitulino
- "regions": a json-array of json-objects, each json-object represents a
1882 82a56f0d Luiz Capitulino
             memory region of this device
1883 82a56f0d Luiz Capitulino
1884 82a56f0d Luiz Capitulino
The memory range json-object contains the following:
1885 82a56f0d Luiz Capitulino
1886 82a56f0d Luiz Capitulino
- "base": base memory address (json-int)
1887 82a56f0d Luiz Capitulino
- "limit": limit value (json-int)
1888 82a56f0d Luiz Capitulino
1889 82a56f0d Luiz Capitulino
The region json-object can be an I/O region or a memory region, an I/O region
1890 82a56f0d Luiz Capitulino
json-object contains the following:
1891 82a56f0d Luiz Capitulino
1892 82a56f0d Luiz Capitulino
- "type": "io" (json-string, fixed)
1893 82a56f0d Luiz Capitulino
- "bar": BAR number (json-int)
1894 82a56f0d Luiz Capitulino
- "address": memory address (json-int)
1895 82a56f0d Luiz Capitulino
- "size": memory size (json-int)
1896 82a56f0d Luiz Capitulino
1897 82a56f0d Luiz Capitulino
A memory region json-object contains the following:
1898 82a56f0d Luiz Capitulino
1899 82a56f0d Luiz Capitulino
- "type": "memory" (json-string, fixed)
1900 82a56f0d Luiz Capitulino
- "bar": BAR number (json-int)
1901 82a56f0d Luiz Capitulino
- "address": memory address (json-int)
1902 82a56f0d Luiz Capitulino
- "size": memory size (json-int)
1903 82a56f0d Luiz Capitulino
- "mem_type_64": true or false (json-bool)
1904 82a56f0d Luiz Capitulino
- "prefetch": true or false (json-bool)
1905 82a56f0d Luiz Capitulino
1906 82a56f0d Luiz Capitulino
Example:
1907 82a56f0d Luiz Capitulino
1908 82a56f0d Luiz Capitulino
-> { "execute": "query-pci" }
1909 82a56f0d Luiz Capitulino
<- {
1910 82a56f0d Luiz Capitulino
      "return":[
1911 82a56f0d Luiz Capitulino
         {
1912 82a56f0d Luiz Capitulino
            "bus":0,
1913 82a56f0d Luiz Capitulino
            "devices":[
1914 82a56f0d Luiz Capitulino
               {
1915 82a56f0d Luiz Capitulino
                  "bus":0,
1916 82a56f0d Luiz Capitulino
                  "qdev_id":"",
1917 82a56f0d Luiz Capitulino
                  "slot":0,
1918 82a56f0d Luiz Capitulino
                  "class_info":{
1919 82a56f0d Luiz Capitulino
                     "class":1536,
1920 82a56f0d Luiz Capitulino
                     "desc":"Host bridge"
1921 82a56f0d Luiz Capitulino
                  },
1922 82a56f0d Luiz Capitulino
                  "id":{
1923 82a56f0d Luiz Capitulino
                     "device":32902,
1924 82a56f0d Luiz Capitulino
                     "vendor":4663
1925 82a56f0d Luiz Capitulino
                  },
1926 82a56f0d Luiz Capitulino
                  "function":0,
1927 82a56f0d Luiz Capitulino
                  "regions":[
1928 82a56f0d Luiz Capitulino
   
1929 82a56f0d Luiz Capitulino
                  ]
1930 82a56f0d Luiz Capitulino
               },
1931 82a56f0d Luiz Capitulino
               {
1932 82a56f0d Luiz Capitulino
                  "bus":0,
1933 82a56f0d Luiz Capitulino
                  "qdev_id":"",
1934 82a56f0d Luiz Capitulino
                  "slot":1,
1935 82a56f0d Luiz Capitulino
                  "class_info":{
1936 82a56f0d Luiz Capitulino
                     "class":1537,
1937 82a56f0d Luiz Capitulino
                     "desc":"ISA bridge"
1938 82a56f0d Luiz Capitulino
                  },
1939 82a56f0d Luiz Capitulino
                  "id":{
1940 82a56f0d Luiz Capitulino
                     "device":32902,
1941 82a56f0d Luiz Capitulino
                     "vendor":28672
1942 82a56f0d Luiz Capitulino
                  },
1943 82a56f0d Luiz Capitulino
                  "function":0,
1944 82a56f0d Luiz Capitulino
                  "regions":[
1945 82a56f0d Luiz Capitulino
   
1946 82a56f0d Luiz Capitulino
                  ]
1947 82a56f0d Luiz Capitulino
               },
1948 82a56f0d Luiz Capitulino
               {
1949 82a56f0d Luiz Capitulino
                  "bus":0,
1950 82a56f0d Luiz Capitulino
                  "qdev_id":"",
1951 82a56f0d Luiz Capitulino
                  "slot":1,
1952 82a56f0d Luiz Capitulino
                  "class_info":{
1953 82a56f0d Luiz Capitulino
                     "class":257,
1954 82a56f0d Luiz Capitulino
                     "desc":"IDE controller"
1955 82a56f0d Luiz Capitulino
                  },
1956 82a56f0d Luiz Capitulino
                  "id":{
1957 82a56f0d Luiz Capitulino
                     "device":32902,
1958 82a56f0d Luiz Capitulino
                     "vendor":28688
1959 82a56f0d Luiz Capitulino
                  },
1960 82a56f0d Luiz Capitulino
                  "function":1,
1961 82a56f0d Luiz Capitulino
                  "regions":[
1962 82a56f0d Luiz Capitulino
                     {
1963 82a56f0d Luiz Capitulino
                        "bar":4,
1964 82a56f0d Luiz Capitulino
                        "size":16,
1965 82a56f0d Luiz Capitulino
                        "address":49152,
1966 82a56f0d Luiz Capitulino
                        "type":"io"
1967 82a56f0d Luiz Capitulino
                     }
1968 82a56f0d Luiz Capitulino
                  ]
1969 82a56f0d Luiz Capitulino
               },
1970 82a56f0d Luiz Capitulino
               {
1971 82a56f0d Luiz Capitulino
                  "bus":0,
1972 82a56f0d Luiz Capitulino
                  "qdev_id":"",
1973 82a56f0d Luiz Capitulino
                  "slot":2,
1974 82a56f0d Luiz Capitulino
                  "class_info":{
1975 82a56f0d Luiz Capitulino
                     "class":768,
1976 82a56f0d Luiz Capitulino
                     "desc":"VGA controller"
1977 82a56f0d Luiz Capitulino
                  },
1978 82a56f0d Luiz Capitulino
                  "id":{
1979 82a56f0d Luiz Capitulino
                     "device":4115,
1980 82a56f0d Luiz Capitulino
                     "vendor":184
1981 82a56f0d Luiz Capitulino
                  },
1982 82a56f0d Luiz Capitulino
                  "function":0,
1983 82a56f0d Luiz Capitulino
                  "regions":[
1984 82a56f0d Luiz Capitulino
                     {
1985 82a56f0d Luiz Capitulino
                        "prefetch":true,
1986 82a56f0d Luiz Capitulino
                        "mem_type_64":false,
1987 82a56f0d Luiz Capitulino
                        "bar":0,
1988 82a56f0d Luiz Capitulino
                        "size":33554432,
1989 82a56f0d Luiz Capitulino
                        "address":4026531840,
1990 82a56f0d Luiz Capitulino
                        "type":"memory"
1991 82a56f0d Luiz Capitulino
                     },
1992 82a56f0d Luiz Capitulino
                     {
1993 82a56f0d Luiz Capitulino
                        "prefetch":false,
1994 82a56f0d Luiz Capitulino
                        "mem_type_64":false,
1995 82a56f0d Luiz Capitulino
                        "bar":1,
1996 82a56f0d Luiz Capitulino
                        "size":4096,
1997 82a56f0d Luiz Capitulino
                        "address":4060086272,
1998 82a56f0d Luiz Capitulino
                        "type":"memory"
1999 82a56f0d Luiz Capitulino
                     },
2000 82a56f0d Luiz Capitulino
                     {
2001 82a56f0d Luiz Capitulino
                        "prefetch":false,
2002 82a56f0d Luiz Capitulino
                        "mem_type_64":false,
2003 82a56f0d Luiz Capitulino
                        "bar":6,
2004 82a56f0d Luiz Capitulino
                        "size":65536,
2005 82a56f0d Luiz Capitulino
                        "address":-1,
2006 82a56f0d Luiz Capitulino
                        "type":"memory"
2007 82a56f0d Luiz Capitulino
                     }
2008 82a56f0d Luiz Capitulino
                  ]
2009 82a56f0d Luiz Capitulino
               },
2010 82a56f0d Luiz Capitulino
               {
2011 82a56f0d Luiz Capitulino
                  "bus":0,
2012 82a56f0d Luiz Capitulino
                  "qdev_id":"",
2013 82a56f0d Luiz Capitulino
                  "irq":11,
2014 82a56f0d Luiz Capitulino
                  "slot":4,
2015 82a56f0d Luiz Capitulino
                  "class_info":{
2016 82a56f0d Luiz Capitulino
                     "class":1280,
2017 82a56f0d Luiz Capitulino
                     "desc":"RAM controller"
2018 82a56f0d Luiz Capitulino
                  },
2019 82a56f0d Luiz Capitulino
                  "id":{
2020 82a56f0d Luiz Capitulino
                     "device":6900,
2021 82a56f0d Luiz Capitulino
                     "vendor":4098
2022 82a56f0d Luiz Capitulino
                  },
2023 82a56f0d Luiz Capitulino
                  "function":0,
2024 82a56f0d Luiz Capitulino
                  "regions":[
2025 82a56f0d Luiz Capitulino
                     {
2026 82a56f0d Luiz Capitulino
                        "bar":0,
2027 82a56f0d Luiz Capitulino
                        "size":32,
2028 82a56f0d Luiz Capitulino
                        "address":49280,
2029 82a56f0d Luiz Capitulino
                        "type":"io"
2030 82a56f0d Luiz Capitulino
                     }
2031 82a56f0d Luiz Capitulino
                  ]
2032 82a56f0d Luiz Capitulino
               }
2033 82a56f0d Luiz Capitulino
            ]
2034 82a56f0d Luiz Capitulino
         }
2035 82a56f0d Luiz Capitulino
      ]
2036 82a56f0d Luiz Capitulino
   }
2037 82a56f0d Luiz Capitulino
2038 82a56f0d Luiz Capitulino
Note: This example has been shortened as the real response is too long.
2039 82a56f0d Luiz Capitulino
2040 82a56f0d Luiz Capitulino
EQMP
2041 82a56f0d Luiz Capitulino
2042 79627472 Luiz Capitulino
    {
2043 79627472 Luiz Capitulino
        .name       = "query-pci",
2044 79627472 Luiz Capitulino
        .args_type  = "",
2045 79627472 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_pci,
2046 79627472 Luiz Capitulino
    },
2047 79627472 Luiz Capitulino
2048 82a56f0d Luiz Capitulino
SQMP
2049 82a56f0d Luiz Capitulino
query-kvm
2050 82a56f0d Luiz Capitulino
---------
2051 82a56f0d Luiz Capitulino
2052 82a56f0d Luiz Capitulino
Show KVM information.
2053 82a56f0d Luiz Capitulino
2054 82a56f0d Luiz Capitulino
Return a json-object with the following information:
2055 82a56f0d Luiz Capitulino
2056 82a56f0d Luiz Capitulino
- "enabled": true if KVM support is enabled, false otherwise (json-bool)
2057 82a56f0d Luiz Capitulino
- "present": true if QEMU has KVM support, false otherwise (json-bool)
2058 82a56f0d Luiz Capitulino
2059 82a56f0d Luiz Capitulino
Example:
2060 82a56f0d Luiz Capitulino
2061 82a56f0d Luiz Capitulino
-> { "execute": "query-kvm" }
2062 82a56f0d Luiz Capitulino
<- { "return": { "enabled": true, "present": true } }
2063 82a56f0d Luiz Capitulino
2064 82a56f0d Luiz Capitulino
EQMP
2065 82a56f0d Luiz Capitulino
2066 292a2602 Luiz Capitulino
    {
2067 292a2602 Luiz Capitulino
        .name       = "query-kvm",
2068 292a2602 Luiz Capitulino
        .args_type  = "",
2069 292a2602 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2070 292a2602 Luiz Capitulino
    },
2071 292a2602 Luiz Capitulino
2072 82a56f0d Luiz Capitulino
SQMP
2073 82a56f0d Luiz Capitulino
query-status
2074 82a56f0d Luiz Capitulino
------------
2075 82a56f0d Luiz Capitulino
2076 82a56f0d Luiz Capitulino
Return a json-object with the following information:
2077 82a56f0d Luiz Capitulino
2078 82a56f0d Luiz Capitulino
- "running": true if the VM is running, or false if it is paused (json-bool)
2079 82a56f0d Luiz Capitulino
- "singlestep": true if the VM is in single step mode,
2080 82a56f0d Luiz Capitulino
                false otherwise (json-bool)
2081 9e37b9dc Luiz Capitulino
- "status": one of the following values (json-string)
2082 9e37b9dc Luiz Capitulino
    "debug" - QEMU is running on a debugger
2083 9e37b9dc Luiz Capitulino
    "inmigrate" - guest is paused waiting for an incoming migration
2084 9e37b9dc Luiz Capitulino
    "internal-error" - An internal error that prevents further guest
2085 9e37b9dc Luiz Capitulino
    execution has occurred
2086 9e37b9dc Luiz Capitulino
    "io-error" - the last IOP has failed and the device is configured
2087 9e37b9dc Luiz Capitulino
    to pause on I/O errors
2088 9e37b9dc Luiz Capitulino
    "paused" - guest has been paused via the 'stop' command
2089 9e37b9dc Luiz Capitulino
    "postmigrate" - guest is paused following a successful 'migrate'
2090 9e37b9dc Luiz Capitulino
    "prelaunch" - QEMU was started with -S and guest has not started
2091 9e37b9dc Luiz Capitulino
    "finish-migrate" - guest is paused to finish the migration process
2092 9e37b9dc Luiz Capitulino
    "restore-vm" - guest is paused to restore VM state
2093 9e37b9dc Luiz Capitulino
    "running" - guest is actively running
2094 9e37b9dc Luiz Capitulino
    "save-vm" - guest is paused to save the VM state
2095 9e37b9dc Luiz Capitulino
    "shutdown" - guest is shut down (and -no-shutdown is in use)
2096 9e37b9dc Luiz Capitulino
    "watchdog" - the watchdog action is configured to pause and
2097 9e37b9dc Luiz Capitulino
     has been triggered
2098 82a56f0d Luiz Capitulino
2099 82a56f0d Luiz Capitulino
Example:
2100 82a56f0d Luiz Capitulino
2101 82a56f0d Luiz Capitulino
-> { "execute": "query-status" }
2102 9e37b9dc Luiz Capitulino
<- { "return": { "running": true, "singlestep": false, "status": "running" } }
2103 82a56f0d Luiz Capitulino
2104 82a56f0d Luiz Capitulino
EQMP
2105 1fa9a5e4 Luiz Capitulino
    
2106 1fa9a5e4 Luiz Capitulino
    {
2107 1fa9a5e4 Luiz Capitulino
        .name       = "query-status",
2108 1fa9a5e4 Luiz Capitulino
        .args_type  = "",
2109 1fa9a5e4 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_status,
2110 1fa9a5e4 Luiz Capitulino
    },
2111 82a56f0d Luiz Capitulino
2112 82a56f0d Luiz Capitulino
SQMP
2113 82a56f0d Luiz Capitulino
query-mice
2114 82a56f0d Luiz Capitulino
----------
2115 82a56f0d Luiz Capitulino
2116 82a56f0d Luiz Capitulino
Show VM mice information.
2117 82a56f0d Luiz Capitulino
2118 82a56f0d Luiz Capitulino
Each mouse is represented by a json-object, the returned value is a json-array
2119 82a56f0d Luiz Capitulino
of all mice.
2120 82a56f0d Luiz Capitulino
2121 82a56f0d Luiz Capitulino
The mouse json-object contains the following:
2122 82a56f0d Luiz Capitulino
2123 82a56f0d Luiz Capitulino
- "name": mouse's name (json-string)
2124 82a56f0d Luiz Capitulino
- "index": mouse's index (json-int)
2125 82a56f0d Luiz Capitulino
- "current": true if this mouse is receiving events, false otherwise (json-bool)
2126 82a56f0d Luiz Capitulino
- "absolute": true if the mouse generates absolute input events (json-bool)
2127 82a56f0d Luiz Capitulino
2128 82a56f0d Luiz Capitulino
Example:
2129 82a56f0d Luiz Capitulino
2130 82a56f0d Luiz Capitulino
-> { "execute": "query-mice" }
2131 82a56f0d Luiz Capitulino
<- {
2132 82a56f0d Luiz Capitulino
      "return":[
2133 82a56f0d Luiz Capitulino
         {
2134 82a56f0d Luiz Capitulino
            "name":"QEMU Microsoft Mouse",
2135 82a56f0d Luiz Capitulino
            "index":0,
2136 82a56f0d Luiz Capitulino
            "current":false,
2137 82a56f0d Luiz Capitulino
            "absolute":false
2138 82a56f0d Luiz Capitulino
         },
2139 82a56f0d Luiz Capitulino
         {
2140 82a56f0d Luiz Capitulino
            "name":"QEMU PS/2 Mouse",
2141 82a56f0d Luiz Capitulino
            "index":1,
2142 82a56f0d Luiz Capitulino
            "current":true,
2143 82a56f0d Luiz Capitulino
            "absolute":true
2144 82a56f0d Luiz Capitulino
         }
2145 82a56f0d Luiz Capitulino
      ]
2146 82a56f0d Luiz Capitulino
   }
2147 82a56f0d Luiz Capitulino
2148 82a56f0d Luiz Capitulino
EQMP
2149 82a56f0d Luiz Capitulino
2150 e235cec3 Luiz Capitulino
    {
2151 e235cec3 Luiz Capitulino
        .name       = "query-mice",
2152 e235cec3 Luiz Capitulino
        .args_type  = "",
2153 e235cec3 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_mice,
2154 e235cec3 Luiz Capitulino
    },
2155 e235cec3 Luiz Capitulino
2156 82a56f0d Luiz Capitulino
SQMP
2157 82a56f0d Luiz Capitulino
query-vnc
2158 82a56f0d Luiz Capitulino
---------
2159 82a56f0d Luiz Capitulino
2160 82a56f0d Luiz Capitulino
Show VNC server information.
2161 82a56f0d Luiz Capitulino
2162 82a56f0d Luiz Capitulino
Return a json-object with server information. Connected clients are returned
2163 82a56f0d Luiz Capitulino
as a json-array of json-objects.
2164 82a56f0d Luiz Capitulino
2165 82a56f0d Luiz Capitulino
The main json-object contains the following:
2166 82a56f0d Luiz Capitulino
2167 82a56f0d Luiz Capitulino
- "enabled": true or false (json-bool)
2168 82a56f0d Luiz Capitulino
- "host": server's IP address (json-string)
2169 82a56f0d Luiz Capitulino
- "family": address family (json-string)
2170 82a56f0d Luiz Capitulino
         - Possible values: "ipv4", "ipv6", "unix", "unknown"
2171 82a56f0d Luiz Capitulino
- "service": server's port number (json-string)
2172 82a56f0d Luiz Capitulino
- "auth": authentication method (json-string)
2173 82a56f0d Luiz Capitulino
         - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2174 82a56f0d Luiz Capitulino
                            "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2175 82a56f0d Luiz Capitulino
                            "vencrypt+plain", "vencrypt+tls+none",
2176 82a56f0d Luiz Capitulino
                            "vencrypt+tls+plain", "vencrypt+tls+sasl",
2177 82a56f0d Luiz Capitulino
                            "vencrypt+tls+vnc", "vencrypt+x509+none",
2178 82a56f0d Luiz Capitulino
                            "vencrypt+x509+plain", "vencrypt+x509+sasl",
2179 82a56f0d Luiz Capitulino
                            "vencrypt+x509+vnc", "vnc"
2180 82a56f0d Luiz Capitulino
- "clients": a json-array of all connected clients
2181 82a56f0d Luiz Capitulino
2182 82a56f0d Luiz Capitulino
Clients are described by a json-object, each one contain the following:
2183 82a56f0d Luiz Capitulino
2184 82a56f0d Luiz Capitulino
- "host": client's IP address (json-string)
2185 82a56f0d Luiz Capitulino
- "family": address family (json-string)
2186 82a56f0d Luiz Capitulino
         - Possible values: "ipv4", "ipv6", "unix", "unknown"
2187 82a56f0d Luiz Capitulino
- "service": client's port number (json-string)
2188 82a56f0d Luiz Capitulino
- "x509_dname": TLS dname (json-string, optional)
2189 82a56f0d Luiz Capitulino
- "sasl_username": SASL username (json-string, optional)
2190 82a56f0d Luiz Capitulino
2191 82a56f0d Luiz Capitulino
Example:
2192 82a56f0d Luiz Capitulino
2193 82a56f0d Luiz Capitulino
-> { "execute": "query-vnc" }
2194 82a56f0d Luiz Capitulino
<- {
2195 82a56f0d Luiz Capitulino
      "return":{
2196 82a56f0d Luiz Capitulino
         "enabled":true,
2197 82a56f0d Luiz Capitulino
         "host":"0.0.0.0",
2198 82a56f0d Luiz Capitulino
         "service":"50402",
2199 82a56f0d Luiz Capitulino
         "auth":"vnc",
2200 82a56f0d Luiz Capitulino
         "family":"ipv4",
2201 82a56f0d Luiz Capitulino
         "clients":[
2202 82a56f0d Luiz Capitulino
            {
2203 82a56f0d Luiz Capitulino
               "host":"127.0.0.1",
2204 82a56f0d Luiz Capitulino
               "service":"50401",
2205 82a56f0d Luiz Capitulino
               "family":"ipv4"
2206 82a56f0d Luiz Capitulino
            }
2207 82a56f0d Luiz Capitulino
         ]
2208 82a56f0d Luiz Capitulino
      }
2209 82a56f0d Luiz Capitulino
   }
2210 82a56f0d Luiz Capitulino
2211 82a56f0d Luiz Capitulino
EQMP
2212 82a56f0d Luiz Capitulino
2213 2b54aa87 Luiz Capitulino
    {
2214 2b54aa87 Luiz Capitulino
        .name       = "query-vnc",
2215 2b54aa87 Luiz Capitulino
        .args_type  = "",
2216 2b54aa87 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2217 2b54aa87 Luiz Capitulino
    },
2218 2b54aa87 Luiz Capitulino
2219 82a56f0d Luiz Capitulino
SQMP
2220 cb42a870 Gerd Hoffmann
query-spice
2221 cb42a870 Gerd Hoffmann
-----------
2222 cb42a870 Gerd Hoffmann
2223 cb42a870 Gerd Hoffmann
Show SPICE server information.
2224 cb42a870 Gerd Hoffmann
2225 cb42a870 Gerd Hoffmann
Return a json-object with server information. Connected clients are returned
2226 cb42a870 Gerd Hoffmann
as a json-array of json-objects.
2227 cb42a870 Gerd Hoffmann
2228 cb42a870 Gerd Hoffmann
The main json-object contains the following:
2229 cb42a870 Gerd Hoffmann
2230 cb42a870 Gerd Hoffmann
- "enabled": true or false (json-bool)
2231 cb42a870 Gerd Hoffmann
- "host": server's IP address (json-string)
2232 cb42a870 Gerd Hoffmann
- "port": server's port number (json-int, optional)
2233 cb42a870 Gerd Hoffmann
- "tls-port": server's port number (json-int, optional)
2234 cb42a870 Gerd Hoffmann
- "auth": authentication method (json-string)
2235 cb42a870 Gerd Hoffmann
         - Possible values: "none", "spice"
2236 cb42a870 Gerd Hoffmann
- "channels": a json-array of all active channels clients
2237 cb42a870 Gerd Hoffmann
2238 cb42a870 Gerd Hoffmann
Channels are described by a json-object, each one contain the following:
2239 cb42a870 Gerd Hoffmann
2240 cb42a870 Gerd Hoffmann
- "host": client's IP address (json-string)
2241 cb42a870 Gerd Hoffmann
- "family": address family (json-string)
2242 cb42a870 Gerd Hoffmann
         - Possible values: "ipv4", "ipv6", "unix", "unknown"
2243 cb42a870 Gerd Hoffmann
- "port": client's port number (json-string)
2244 cb42a870 Gerd Hoffmann
- "connection-id": spice connection id.  All channels with the same id
2245 cb42a870 Gerd Hoffmann
                   belong to the same spice session (json-int)
2246 cb42a870 Gerd Hoffmann
- "channel-type": channel type.  "1" is the main control channel, filter for
2247 cb42a870 Gerd Hoffmann
                  this one if you want track spice sessions only (json-int)
2248 cb42a870 Gerd Hoffmann
- "channel-id": channel id.  Usually "0", might be different needed when
2249 cb42a870 Gerd Hoffmann
                multiple channels of the same type exist, such as multiple
2250 cb42a870 Gerd Hoffmann
                display channels in a multihead setup (json-int)
2251 cb42a870 Gerd Hoffmann
- "tls": whevener the channel is encrypted (json-bool)
2252 cb42a870 Gerd Hoffmann
2253 cb42a870 Gerd Hoffmann
Example:
2254 cb42a870 Gerd Hoffmann
2255 cb42a870 Gerd Hoffmann
-> { "execute": "query-spice" }
2256 cb42a870 Gerd Hoffmann
<- {
2257 cb42a870 Gerd Hoffmann
      "return": {
2258 cb42a870 Gerd Hoffmann
         "enabled": true,
2259 cb42a870 Gerd Hoffmann
         "auth": "spice",
2260 cb42a870 Gerd Hoffmann
         "port": 5920,
2261 cb42a870 Gerd Hoffmann
         "tls-port": 5921,
2262 cb42a870 Gerd Hoffmann
         "host": "0.0.0.0",
2263 cb42a870 Gerd Hoffmann
         "channels": [
2264 cb42a870 Gerd Hoffmann
            {
2265 cb42a870 Gerd Hoffmann
               "port": "54924",
2266 cb42a870 Gerd Hoffmann
               "family": "ipv4",
2267 cb42a870 Gerd Hoffmann
               "channel-type": 1,
2268 cb42a870 Gerd Hoffmann
               "connection-id": 1804289383,
2269 cb42a870 Gerd Hoffmann
               "host": "127.0.0.1",
2270 cb42a870 Gerd Hoffmann
               "channel-id": 0,
2271 cb42a870 Gerd Hoffmann
               "tls": true
2272 cb42a870 Gerd Hoffmann
            },
2273 cb42a870 Gerd Hoffmann
            {
2274 cb42a870 Gerd Hoffmann
               "port": "36710",
2275 cb42a870 Gerd Hoffmann
               "family": "ipv4",
2276 cb42a870 Gerd Hoffmann
               "channel-type": 4,
2277 cb42a870 Gerd Hoffmann
               "connection-id": 1804289383,
2278 cb42a870 Gerd Hoffmann
               "host": "127.0.0.1",
2279 cb42a870 Gerd Hoffmann
               "channel-id": 0,
2280 cb42a870 Gerd Hoffmann
               "tls": false
2281 cb42a870 Gerd Hoffmann
            },
2282 cb42a870 Gerd Hoffmann
            [ ... more channels follow ... ]
2283 cb42a870 Gerd Hoffmann
         ]
2284 cb42a870 Gerd Hoffmann
      }
2285 cb42a870 Gerd Hoffmann
   }
2286 cb42a870 Gerd Hoffmann
2287 cb42a870 Gerd Hoffmann
EQMP
2288 cb42a870 Gerd Hoffmann
2289 d1f29646 Luiz Capitulino
#if defined(CONFIG_SPICE)
2290 d1f29646 Luiz Capitulino
    {
2291 d1f29646 Luiz Capitulino
        .name       = "query-spice",
2292 d1f29646 Luiz Capitulino
        .args_type  = "",
2293 d1f29646 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_spice,
2294 d1f29646 Luiz Capitulino
    },
2295 d1f29646 Luiz Capitulino
#endif
2296 d1f29646 Luiz Capitulino
2297 cb42a870 Gerd Hoffmann
SQMP
2298 82a56f0d Luiz Capitulino
query-name
2299 82a56f0d Luiz Capitulino
----------
2300 82a56f0d Luiz Capitulino
2301 82a56f0d Luiz Capitulino
Show VM name.
2302 82a56f0d Luiz Capitulino
2303 82a56f0d Luiz Capitulino
Return a json-object with the following information:
2304 82a56f0d Luiz Capitulino
2305 82a56f0d Luiz Capitulino
- "name": VM's name (json-string, optional)
2306 82a56f0d Luiz Capitulino
2307 82a56f0d Luiz Capitulino
Example:
2308 82a56f0d Luiz Capitulino
2309 82a56f0d Luiz Capitulino
-> { "execute": "query-name" }
2310 82a56f0d Luiz Capitulino
<- { "return": { "name": "qemu-name" } }
2311 82a56f0d Luiz Capitulino
2312 82a56f0d Luiz Capitulino
EQMP
2313 82a56f0d Luiz Capitulino
2314 48a32bed Anthony Liguori
    {
2315 48a32bed Anthony Liguori
        .name       = "query-name",
2316 48a32bed Anthony Liguori
        .args_type  = "",
2317 48a32bed Anthony Liguori
        .mhandler.cmd_new = qmp_marshal_input_query_name,
2318 48a32bed Anthony Liguori
    },
2319 48a32bed Anthony Liguori
2320 82a56f0d Luiz Capitulino
SQMP
2321 82a56f0d Luiz Capitulino
query-uuid
2322 82a56f0d Luiz Capitulino
----------
2323 82a56f0d Luiz Capitulino
2324 82a56f0d Luiz Capitulino
Show VM UUID.
2325 82a56f0d Luiz Capitulino
2326 82a56f0d Luiz Capitulino
Return a json-object with the following information:
2327 82a56f0d Luiz Capitulino
2328 82a56f0d Luiz Capitulino
- "UUID": Universally Unique Identifier (json-string)
2329 82a56f0d Luiz Capitulino
2330 82a56f0d Luiz Capitulino
Example:
2331 82a56f0d Luiz Capitulino
2332 82a56f0d Luiz Capitulino
-> { "execute": "query-uuid" }
2333 82a56f0d Luiz Capitulino
<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2334 82a56f0d Luiz Capitulino
2335 82a56f0d Luiz Capitulino
EQMP
2336 82a56f0d Luiz Capitulino
2337 efab767e Luiz Capitulino
    {
2338 efab767e Luiz Capitulino
        .name       = "query-uuid",
2339 efab767e Luiz Capitulino
        .args_type  = "",
2340 efab767e Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_uuid,
2341 efab767e Luiz Capitulino
    },
2342 efab767e Luiz Capitulino
2343 82a56f0d Luiz Capitulino
SQMP
2344 82a56f0d Luiz Capitulino
query-migrate
2345 82a56f0d Luiz Capitulino
-------------
2346 82a56f0d Luiz Capitulino
2347 82a56f0d Luiz Capitulino
Migration status.
2348 82a56f0d Luiz Capitulino
2349 82a56f0d Luiz Capitulino
Return a json-object. If migration is active there will be another json-object
2350 82a56f0d Luiz Capitulino
with RAM migration status and if block migration is active another one with
2351 82a56f0d Luiz Capitulino
block migration status.
2352 82a56f0d Luiz Capitulino
2353 82a56f0d Luiz Capitulino
The main json-object contains the following:
2354 82a56f0d Luiz Capitulino
2355 82a56f0d Luiz Capitulino
- "status": migration status (json-string)
2356 82a56f0d Luiz Capitulino
     - Possible values: "active", "completed", "failed", "cancelled"
2357 7aa939af Juan Quintela
- "total-time": total amount of ms since migration started.  If
2358 7aa939af Juan Quintela
                migration has ended, it returns the total migration
2359 7aa939af Juan Quintela
		 time (json-int)
2360 9c5a9fcf Juan Quintela
- "downtime": only present when migration has finished correctly
2361 9c5a9fcf Juan Quintela
              total amount in ms for downtime that happened (json-int)
2362 2c52ddf1 Juan Quintela
- "expected-downtime": only present while migration is active
2363 2c52ddf1 Juan Quintela
                total amount in ms for downtime that was calculated on
2364 2c52ddf1 Juan Quintela
		the last bitmap round (json-int)
2365 82a56f0d Luiz Capitulino
- "ram": only present if "status" is "active", it is a json-object with the
2366 82a56f0d Luiz Capitulino
  following RAM information (in bytes):
2367 82a56f0d Luiz Capitulino
         - "transferred": amount transferred (json-int)
2368 82a56f0d Luiz Capitulino
         - "remaining": amount remaining (json-int)
2369 82a56f0d Luiz Capitulino
         - "total": total (json-int)
2370 004d4c10 Orit Wasserman
         - "duplicate": number of duplicated pages (json-int)
2371 004d4c10 Orit Wasserman
         - "normal" : number of normal pages transferred (json-int)
2372 004d4c10 Orit Wasserman
         - "normal-bytes" : number of normal bytes transferred (json-int)
2373 82a56f0d Luiz Capitulino
- "disk": only present if "status" is "active" and it is a block migration,
2374 82a56f0d Luiz Capitulino
  it is a json-object with the following disk information (in bytes):
2375 82a56f0d Luiz Capitulino
         - "transferred": amount transferred (json-int)
2376 82a56f0d Luiz Capitulino
         - "remaining": amount remaining (json-int)
2377 82a56f0d Luiz Capitulino
         - "total": total (json-int)
2378 f36d55af Orit Wasserman
- "xbzrle-cache": only present if XBZRLE is active.
2379 f36d55af Orit Wasserman
  It is a json-object with the following XBZRLE information:
2380 f36d55af Orit Wasserman
         - "cache-size": XBZRLE cache size
2381 f36d55af Orit Wasserman
         - "bytes": total XBZRLE bytes transferred
2382 f36d55af Orit Wasserman
         - "pages": number of XBZRLE compressed pages
2383 f36d55af Orit Wasserman
         - "cache-miss": number of cache misses
2384 f36d55af Orit Wasserman
         - "overflow": number of XBZRLE overflows
2385 82a56f0d Luiz Capitulino
Examples:
2386 82a56f0d Luiz Capitulino
2387 82a56f0d Luiz Capitulino
1. Before the first migration
2388 82a56f0d Luiz Capitulino
2389 82a56f0d Luiz Capitulino
-> { "execute": "query-migrate" }
2390 82a56f0d Luiz Capitulino
<- { "return": {} }
2391 82a56f0d Luiz Capitulino
2392 82a56f0d Luiz Capitulino
2. Migration is done and has succeeded
2393 82a56f0d Luiz Capitulino
2394 82a56f0d Luiz Capitulino
-> { "execute": "query-migrate" }
2395 004d4c10 Orit Wasserman
<- { "return": {
2396 004d4c10 Orit Wasserman
        "status": "completed",
2397 004d4c10 Orit Wasserman
        "ram":{
2398 004d4c10 Orit Wasserman
          "transferred":123,
2399 004d4c10 Orit Wasserman
          "remaining":123,
2400 004d4c10 Orit Wasserman
          "total":246,
2401 004d4c10 Orit Wasserman
          "total-time":12345,
2402 9c5a9fcf Juan Quintela
          "downtime":12345,
2403 004d4c10 Orit Wasserman
          "duplicate":123,
2404 004d4c10 Orit Wasserman
          "normal":123,
2405 004d4c10 Orit Wasserman
          "normal-bytes":123456
2406 004d4c10 Orit Wasserman
        }
2407 004d4c10 Orit Wasserman
     }
2408 004d4c10 Orit Wasserman
   }
2409 82a56f0d Luiz Capitulino
2410 82a56f0d Luiz Capitulino
3. Migration is done and has failed
2411 82a56f0d Luiz Capitulino
2412 82a56f0d Luiz Capitulino
-> { "execute": "query-migrate" }
2413 82a56f0d Luiz Capitulino
<- { "return": { "status": "failed" } }
2414 82a56f0d Luiz Capitulino
2415 82a56f0d Luiz Capitulino
4. Migration is being performed and is not a block migration:
2416 82a56f0d Luiz Capitulino
2417 82a56f0d Luiz Capitulino
-> { "execute": "query-migrate" }
2418 82a56f0d Luiz Capitulino
<- {
2419 82a56f0d Luiz Capitulino
      "return":{
2420 82a56f0d Luiz Capitulino
         "status":"active",
2421 82a56f0d Luiz Capitulino
         "ram":{
2422 82a56f0d Luiz Capitulino
            "transferred":123,
2423 82a56f0d Luiz Capitulino
            "remaining":123,
2424 62d4e3fe Orit Wasserman
            "total":246,
2425 004d4c10 Orit Wasserman
            "total-time":12345,
2426 2c52ddf1 Juan Quintela
            "expected-downtime":12345,
2427 004d4c10 Orit Wasserman
            "duplicate":123,
2428 004d4c10 Orit Wasserman
            "normal":123,
2429 004d4c10 Orit Wasserman
            "normal-bytes":123456
2430 82a56f0d Luiz Capitulino
         }
2431 82a56f0d Luiz Capitulino
      }
2432 82a56f0d Luiz Capitulino
   }
2433 82a56f0d Luiz Capitulino
2434 82a56f0d Luiz Capitulino
5. Migration is being performed and is a block migration:
2435 82a56f0d Luiz Capitulino
2436 82a56f0d Luiz Capitulino
-> { "execute": "query-migrate" }
2437 82a56f0d Luiz Capitulino
<- {
2438 82a56f0d Luiz Capitulino
      "return":{
2439 82a56f0d Luiz Capitulino
         "status":"active",
2440 82a56f0d Luiz Capitulino
         "ram":{
2441 82a56f0d Luiz Capitulino
            "total":1057024,
2442 82a56f0d Luiz Capitulino
            "remaining":1053304,
2443 62d4e3fe Orit Wasserman
            "transferred":3720,
2444 004d4c10 Orit Wasserman
            "total-time":12345,
2445 2c52ddf1 Juan Quintela
            "expected-downtime":12345,
2446 004d4c10 Orit Wasserman
            "duplicate":123,
2447 004d4c10 Orit Wasserman
            "normal":123,
2448 004d4c10 Orit Wasserman
            "normal-bytes":123456
2449 82a56f0d Luiz Capitulino
         },
2450 82a56f0d Luiz Capitulino
         "disk":{
2451 82a56f0d Luiz Capitulino
            "total":20971520,
2452 82a56f0d Luiz Capitulino
            "remaining":20880384,
2453 82a56f0d Luiz Capitulino
            "transferred":91136
2454 82a56f0d Luiz Capitulino
         }
2455 82a56f0d Luiz Capitulino
      }
2456 82a56f0d Luiz Capitulino
   }
2457 82a56f0d Luiz Capitulino
2458 f36d55af Orit Wasserman
6. Migration is being performed and XBZRLE is active:
2459 f36d55af Orit Wasserman
2460 f36d55af Orit Wasserman
-> { "execute": "query-migrate" }
2461 f36d55af Orit Wasserman
<- {
2462 f36d55af Orit Wasserman
      "return":{
2463 f36d55af Orit Wasserman
         "status":"active",
2464 f36d55af Orit Wasserman
         "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
2465 f36d55af Orit Wasserman
         "ram":{
2466 f36d55af Orit Wasserman
            "total":1057024,
2467 f36d55af Orit Wasserman
            "remaining":1053304,
2468 f36d55af Orit Wasserman
            "transferred":3720,
2469 f36d55af Orit Wasserman
            "total-time":12345,
2470 2c52ddf1 Juan Quintela
            "expected-downtime":12345,
2471 f36d55af Orit Wasserman
            "duplicate":10,
2472 f36d55af Orit Wasserman
            "normal":3333,
2473 f36d55af Orit Wasserman
            "normal-bytes":3412992
2474 f36d55af Orit Wasserman
         },
2475 f36d55af Orit Wasserman
         "xbzrle-cache":{
2476 f36d55af Orit Wasserman
            "cache-size":67108864,
2477 f36d55af Orit Wasserman
            "bytes":20971520,
2478 f36d55af Orit Wasserman
            "pages":2444343,
2479 f36d55af Orit Wasserman
            "cache-miss":2244,
2480 f36d55af Orit Wasserman
            "overflow":34434
2481 f36d55af Orit Wasserman
         }
2482 f36d55af Orit Wasserman
      }
2483 f36d55af Orit Wasserman
   }
2484 f36d55af Orit Wasserman
2485 82a56f0d Luiz Capitulino
EQMP
2486 82a56f0d Luiz Capitulino
2487 791e7c82 Luiz Capitulino
    {
2488 791e7c82 Luiz Capitulino
        .name       = "query-migrate",
2489 791e7c82 Luiz Capitulino
        .args_type  = "",
2490 791e7c82 Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_migrate,
2491 791e7c82 Luiz Capitulino
    },
2492 791e7c82 Luiz Capitulino
2493 82a56f0d Luiz Capitulino
SQMP
2494 00458433 Orit Wasserman
migrate-set-capabilities
2495 00458433 Orit Wasserman
-------
2496 00458433 Orit Wasserman
2497 00458433 Orit Wasserman
Enable/Disable migration capabilities
2498 00458433 Orit Wasserman
2499 00458433 Orit Wasserman
- "xbzrle": xbzrle support
2500 00458433 Orit Wasserman
2501 00458433 Orit Wasserman
Arguments:
2502 00458433 Orit Wasserman
2503 00458433 Orit Wasserman
Example:
2504 00458433 Orit Wasserman
2505 00458433 Orit Wasserman
-> { "execute": "migrate-set-capabilities" , "arguments":
2506 00458433 Orit Wasserman
     { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
2507 00458433 Orit Wasserman
2508 00458433 Orit Wasserman
EQMP
2509 00458433 Orit Wasserman
2510 00458433 Orit Wasserman
    {
2511 00458433 Orit Wasserman
        .name       = "migrate-set-capabilities",
2512 00458433 Orit Wasserman
        .args_type  = "capabilities:O",
2513 00458433 Orit Wasserman
        .params     = "capability:s,state:b",
2514 00458433 Orit Wasserman
	.mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
2515 00458433 Orit Wasserman
    },
2516 00458433 Orit Wasserman
SQMP
2517 bbf6da32 Orit Wasserman
query-migrate-capabilities
2518 bbf6da32 Orit Wasserman
-------
2519 bbf6da32 Orit Wasserman
2520 bbf6da32 Orit Wasserman
Query current migration capabilities
2521 bbf6da32 Orit Wasserman
2522 bbf6da32 Orit Wasserman
- "capabilities": migration capabilities state
2523 bbf6da32 Orit Wasserman
         - "xbzrle" : XBZRLE state (json-bool)
2524 bbf6da32 Orit Wasserman
2525 bbf6da32 Orit Wasserman
Arguments:
2526 bbf6da32 Orit Wasserman
2527 bbf6da32 Orit Wasserman
Example:
2528 bbf6da32 Orit Wasserman
2529 bbf6da32 Orit Wasserman
-> { "execute": "query-migrate-capabilities" }
2530 bbf6da32 Orit Wasserman
<- { "return": {
2531 bbf6da32 Orit Wasserman
        "capabilities" :  [ { "capability" : "xbzrle", "state" : false } ]
2532 bbf6da32 Orit Wasserman
     }
2533 bbf6da32 Orit Wasserman
   }
2534 bbf6da32 Orit Wasserman
EQMP
2535 bbf6da32 Orit Wasserman
2536 bbf6da32 Orit Wasserman
    {
2537 bbf6da32 Orit Wasserman
        .name       = "query-migrate-capabilities",
2538 bbf6da32 Orit Wasserman
        .args_type  = "",
2539 bbf6da32 Orit Wasserman
        .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
2540 bbf6da32 Orit Wasserman
    },
2541 bbf6da32 Orit Wasserman
2542 bbf6da32 Orit Wasserman
SQMP
2543 82a56f0d Luiz Capitulino
query-balloon
2544 82a56f0d Luiz Capitulino
-------------
2545 82a56f0d Luiz Capitulino
2546 82a56f0d Luiz Capitulino
Show balloon information.
2547 82a56f0d Luiz Capitulino
2548 82a56f0d Luiz Capitulino
Make an asynchronous request for balloon info. When the request completes a
2549 82a56f0d Luiz Capitulino
json-object will be returned containing the following data:
2550 82a56f0d Luiz Capitulino
2551 82a56f0d Luiz Capitulino
- "actual": current balloon value in bytes (json-int)
2552 82a56f0d Luiz Capitulino
- "mem_swapped_in": Amount of memory swapped in bytes (json-int, optional)
2553 82a56f0d Luiz Capitulino
- "mem_swapped_out": Amount of memory swapped out in bytes (json-int, optional)
2554 82a56f0d Luiz Capitulino
- "major_page_faults": Number of major faults (json-int, optional)
2555 82a56f0d Luiz Capitulino
- "minor_page_faults": Number of minor faults (json-int, optional)
2556 82a56f0d Luiz Capitulino
- "free_mem": Total amount of free and unused memory in
2557 82a56f0d Luiz Capitulino
              bytes (json-int, optional)
2558 82a56f0d Luiz Capitulino
- "total_mem": Total amount of available memory in bytes (json-int, optional)
2559 82a56f0d Luiz Capitulino
2560 82a56f0d Luiz Capitulino
Example:
2561 82a56f0d Luiz Capitulino
2562 82a56f0d Luiz Capitulino
-> { "execute": "query-balloon" }
2563 82a56f0d Luiz Capitulino
<- {
2564 82a56f0d Luiz Capitulino
      "return":{
2565 82a56f0d Luiz Capitulino
         "actual":1073741824,
2566 82a56f0d Luiz Capitulino
         "mem_swapped_in":0,
2567 82a56f0d Luiz Capitulino
         "mem_swapped_out":0,
2568 82a56f0d Luiz Capitulino
         "major_page_faults":142,
2569 82a56f0d Luiz Capitulino
         "minor_page_faults":239245,
2570 82a56f0d Luiz Capitulino
         "free_mem":1014185984,
2571 82a56f0d Luiz Capitulino
         "total_mem":1044668416
2572 82a56f0d Luiz Capitulino
      }
2573 82a56f0d Luiz Capitulino
   }
2574 82a56f0d Luiz Capitulino
2575 82a56f0d Luiz Capitulino
EQMP
2576 82a56f0d Luiz Capitulino
2577 96637bcd Luiz Capitulino
    {
2578 96637bcd Luiz Capitulino
        .name       = "query-balloon",
2579 96637bcd Luiz Capitulino
        .args_type  = "",
2580 96637bcd Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_query_balloon,
2581 96637bcd Luiz Capitulino
    },
2582 b4b12c62 Anthony Liguori
2583 b4b12c62 Anthony Liguori
    {
2584 fb5458cd Stefan Hajnoczi
        .name       = "query-block-jobs",
2585 fb5458cd Stefan Hajnoczi
        .args_type  = "",
2586 fb5458cd Stefan Hajnoczi
        .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
2587 fb5458cd Stefan Hajnoczi
    },
2588 fb5458cd Stefan Hajnoczi
2589 fb5458cd Stefan Hajnoczi
    {
2590 b4b12c62 Anthony Liguori
        .name       = "qom-list",
2591 b4b12c62 Anthony Liguori
        .args_type  = "path:s",
2592 b4b12c62 Anthony Liguori
        .mhandler.cmd_new = qmp_marshal_input_qom_list,
2593 b4b12c62 Anthony Liguori
    },
2594 eb6e8ea5 Anthony Liguori
2595 eb6e8ea5 Anthony Liguori
    {
2596 eb6e8ea5 Anthony Liguori
        .name       = "qom-set",
2597 b9f8978c Paolo Bonzini
	.args_type  = "path:s,property:s,value:q",
2598 eb6e8ea5 Anthony Liguori
	.mhandler.cmd_new = qmp_qom_set,
2599 eb6e8ea5 Anthony Liguori
    },
2600 eb6e8ea5 Anthony Liguori
2601 eb6e8ea5 Anthony Liguori
    {
2602 eb6e8ea5 Anthony Liguori
        .name       = "qom-get",
2603 eb6e8ea5 Anthony Liguori
	.args_type  = "path:s,property:s",
2604 eb6e8ea5 Anthony Liguori
	.mhandler.cmd_new = qmp_qom_get,
2605 eb6e8ea5 Anthony Liguori
    },
2606 270b243f Luiz Capitulino
2607 270b243f Luiz Capitulino
    {
2608 6dd844db Paolo Bonzini
        .name       = "nbd-server-start",
2609 6dd844db Paolo Bonzini
        .args_type  = "addr:q",
2610 6dd844db Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
2611 6dd844db Paolo Bonzini
    },
2612 6dd844db Paolo Bonzini
    {
2613 6dd844db Paolo Bonzini
        .name       = "nbd-server-add",
2614 6dd844db Paolo Bonzini
        .args_type  = "device:B,writable:b?",
2615 6dd844db Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
2616 6dd844db Paolo Bonzini
    },
2617 6dd844db Paolo Bonzini
    {
2618 6dd844db Paolo Bonzini
        .name       = "nbd-server-stop",
2619 6dd844db Paolo Bonzini
        .args_type  = "",
2620 6dd844db Paolo Bonzini
        .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
2621 6dd844db Paolo Bonzini
    },
2622 6dd844db Paolo Bonzini
2623 6dd844db Paolo Bonzini
    {
2624 270b243f Luiz Capitulino
        .name       = "change-vnc-password",
2625 270b243f Luiz Capitulino
        .args_type  = "password:s",
2626 270b243f Luiz Capitulino
        .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
2627 270b243f Luiz Capitulino
    },
2628 5eeee3fa Anthony Liguori
    {
2629 5eeee3fa Anthony Liguori
        .name       = "qom-list-types",
2630 5eeee3fa Anthony Liguori
        .args_type  = "implements:s?,abstract:b?",
2631 5eeee3fa Anthony Liguori
        .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
2632 5eeee3fa Anthony Liguori
    },
2633 1daa31b9 Anthony Liguori
2634 1daa31b9 Anthony Liguori
    {
2635 1daa31b9 Anthony Liguori
        .name       = "device-list-properties",
2636 1daa31b9 Anthony Liguori
        .args_type  = "typename:s",
2637 1daa31b9 Anthony Liguori
        .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
2638 1daa31b9 Anthony Liguori
    },
2639 1daa31b9 Anthony Liguori
2640 01d3c80d Anthony Liguori
    {
2641 01d3c80d Anthony Liguori
        .name       = "query-machines",
2642 01d3c80d Anthony Liguori
        .args_type  = "",
2643 01d3c80d Anthony Liguori
        .mhandler.cmd_new = qmp_marshal_input_query_machines,
2644 01d3c80d Anthony Liguori
    },
2645 01d3c80d Anthony Liguori
2646 e4e31c63 Anthony Liguori
    {
2647 e4e31c63 Anthony Liguori
        .name       = "query-cpu-definitions",
2648 e4e31c63 Anthony Liguori
        .args_type  = "",
2649 e4e31c63 Anthony Liguori
        .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
2650 e4e31c63 Anthony Liguori
    },
2651 e4e31c63 Anthony Liguori
2652 99afc91d Daniel P. Berrange
    {
2653 99afc91d Daniel P. Berrange
        .name       = "query-target",
2654 99afc91d Daniel P. Berrange
        .args_type  = "",
2655 99afc91d Daniel P. Berrange
        .mhandler.cmd_new = qmp_marshal_input_query_target,
2656 99afc91d Daniel P. Berrange
    },