blob: 2b52980cfc2f80904a3c7375a382b638e8a51161 [file] [log] [blame]
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001HXCOMM QMP dispatch table and documentation
Alberto Garcia3599d462015-02-26 16:35:07 +02002HXCOMM Text between SQMP and EQMP is copied to the QMP documentation file and
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003HXCOMM does not show up in the other formats.
4
5SQMP
6 QMP Supported Commands
7 ----------------------
8
9This document describes all commands currently supported by QMP.
10
11Most of the time their usage is exactly the same as in the user Monitor, this
12means that any other document which also describe commands (the manpage,
13QEMU's manual, etc) can and should be consulted.
14
15QMP has two types of commands: regular and query commands. Regular commands
16usually change the Virtual Machine's state someway, while query commands just
17return information. The sections below are divided accordingly.
18
19It's important to observe that all communication examples are formatted in
20a reader-friendly way, so that they're easier to understand. However, in real
21protocol usage, they're emitted as a single line.
22
23Also, the following notation is used to denote data flow:
24
25-> data issued by the Client
26<- Server data response
27
28Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
29information on the Server command and response formats.
30
31NOTE: This document is temporary and will be replaced soon.
32
331. Stability Considerations
34===========================
35
36The current QMP command set (described in this file) may be useful for a
37number of use cases, however it's limited and several commands have bad
38defined semantics, specially with regard to command completion.
39
40These problems are going to be solved incrementally in the next QEMU releases
41and we're going to establish a deprecation policy for badly defined commands.
42
43If you're planning to adopt QMP, please observe the following:
44
Zhi Yong Wuc20cdf82011-07-27 14:32:56 +080045 1. The deprecation policy will take effect and be documented soon, please
Luiz Capitulino82a56f02010-09-13 12:26:00 -030046 check the documentation of each used command as soon as a new release of
47 QEMU is available
48
49 2. DO NOT rely on anything which is not explicit documented
50
51 3. Errors, in special, are not documented. Applications should NOT check
52 for specific errors classes or data (it's strongly recommended to only
53 check for the "error" key)
54
552. Regular Commands
56===================
57
58Server's responses in the examples below are always a success response, please
59refer to the QMP specification for more details on error responses.
60
61EQMP
62
63 {
64 .name = "quit",
65 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +020066 .mhandler.cmd_new = qmp_marshal_quit,
Luiz Capitulino82a56f02010-09-13 12:26:00 -030067 },
68
69SQMP
70quit
71----
72
73Quit the emulator.
74
75Arguments: None.
76
77Example:
78
79-> { "execute": "quit" }
80<- { "return": {} }
81
82EQMP
83
84 {
85 .name = "eject",
86 .args_type = "force:-f,device:B",
Markus Armbruster7fad30f2015-09-16 13:06:19 +020087 .mhandler.cmd_new = qmp_marshal_eject,
Luiz Capitulino82a56f02010-09-13 12:26:00 -030088 },
89
90SQMP
91eject
92-----
93
94Eject a removable medium.
95
96Arguments:
97
98- force: force ejection (json-bool, optional)
99- device: device name (json-string)
100
101Example:
102
103-> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
104<- { "return": {} }
105
106Note: The "force" argument defaults to false.
107
108EQMP
109
110 {
111 .name = "change",
112 .args_type = "device:B,target:F,arg:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200113 .mhandler.cmd_new = qmp_marshal_change,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300114 },
115
116SQMP
117change
118------
119
120Change a removable medium or VNC configuration.
121
122Arguments:
123
124- "device": device name (json-string)
125- "target": filename or item (json-string)
126- "arg": additional argument (json-string, optional)
127
128Examples:
129
1301. Change a removable medium
131
132-> { "execute": "change",
133 "arguments": { "device": "ide1-cd0",
134 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
135<- { "return": {} }
136
1372. Change VNC password
138
139-> { "execute": "change",
140 "arguments": { "device": "vnc", "target": "password",
141 "arg": "foobar1" } }
142<- { "return": {} }
143
144EQMP
145
146 {
147 .name = "screendump",
148 .args_type = "filename:F",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200149 .mhandler.cmd_new = qmp_marshal_screendump,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300150 },
151
152SQMP
153screendump
154----------
155
156Save screen into PPM image.
157
158Arguments:
159
160- "filename": file path (json-string)
161
162Example:
163
164-> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
165<- { "return": {} }
166
167EQMP
168
169 {
170 .name = "stop",
171 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200172 .mhandler.cmd_new = qmp_marshal_stop,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300173 },
174
175SQMP
176stop
177----
178
179Stop the emulator.
180
181Arguments: None.
182
183Example:
184
185-> { "execute": "stop" }
186<- { "return": {} }
187
188EQMP
189
190 {
191 .name = "cont",
192 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200193 .mhandler.cmd_new = qmp_marshal_cont,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300194 },
195
196SQMP
197cont
198----
199
200Resume emulation.
201
202Arguments: None.
203
204Example:
205
206-> { "execute": "cont" }
207<- { "return": {} }
208
209EQMP
210
211 {
Gerd Hoffmann9b9df252012-02-23 13:45:21 +0100212 .name = "system_wakeup",
213 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200214 .mhandler.cmd_new = qmp_marshal_system_wakeup,
Gerd Hoffmann9b9df252012-02-23 13:45:21 +0100215 },
216
217SQMP
218system_wakeup
219-------------
220
221Wakeup guest from suspend.
222
223Arguments: None.
224
225Example:
226
227-> { "execute": "system_wakeup" }
228<- { "return": {} }
229
230EQMP
231
232 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300233 .name = "system_reset",
234 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200235 .mhandler.cmd_new = qmp_marshal_system_reset,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300236 },
237
238SQMP
239system_reset
240------------
241
242Reset the system.
243
244Arguments: None.
245
246Example:
247
248-> { "execute": "system_reset" }
249<- { "return": {} }
250
251EQMP
252
253 {
254 .name = "system_powerdown",
255 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200256 .mhandler.cmd_new = qmp_marshal_system_powerdown,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300257 },
258
259SQMP
260system_powerdown
261----------------
262
263Send system power down event.
264
265Arguments: None.
266
267Example:
268
269-> { "execute": "system_powerdown" }
270<- { "return": {} }
271
272EQMP
273
274 {
275 .name = "device_add",
276 .args_type = "device:O",
277 .params = "driver[,prop=value][,...]",
278 .help = "add device, like -device on the command line",
Markus Armbruster485febc2015-03-13 17:25:50 +0100279 .mhandler.cmd_new = qmp_device_add,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300280 },
281
282SQMP
283device_add
284----------
285
286Add a device.
287
288Arguments:
289
290- "driver": the name of the new device's driver (json-string)
291- "bus": the device's parent bus (device tree path, json-string, optional)
292- "id": the device's ID, must be unique (json-string)
293- device properties
294
295Example:
296
297-> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
298<- { "return": {} }
299
300Notes:
301
302(1) For detailed information about this command, please refer to the
303 'docs/qdev-device-use.txt' file.
304
305(2) It's possible to list device properties by running QEMU with the
306 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
307
308EQMP
309
310 {
311 .name = "device_del",
312 .args_type = "id:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200313 .mhandler.cmd_new = qmp_marshal_device_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300314 },
315
316SQMP
317device_del
318----------
319
320Remove a device.
321
322Arguments:
323
Daniel P. Berrange6287d822015-09-11 13:33:56 +0100324- "id": the device's ID or QOM path (json-string)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300325
326Example:
327
328-> { "execute": "device_del", "arguments": { "id": "net1" } }
329<- { "return": {} }
330
Daniel P. Berrange6287d822015-09-11 13:33:56 +0100331Example:
332
333-> { "execute": "device_del", "arguments": { "id": "/machine/peripheral-anon/device[0]" } }
334<- { "return": {} }
335
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300336EQMP
337
338 {
Amos Konge4c8f002012-08-31 10:56:26 +0800339 .name = "send-key",
Paolo Bonzini43d0a2c2015-04-15 13:30:04 +0200340 .args_type = "keys:q,hold-time:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200341 .mhandler.cmd_new = qmp_marshal_send_key,
Amos Konge4c8f002012-08-31 10:56:26 +0800342 },
343
344SQMP
345send-key
346----------
347
348Send keys to VM.
349
350Arguments:
351
352keys array:
Amos Kongf9b1d9b2013-07-16 19:52:14 +0800353 - "key": key sequence (a json-array of key union values,
354 union can be number or qcode enum)
Amos Konge4c8f002012-08-31 10:56:26 +0800355
356- hold-time: time to delay key up events, milliseconds. Defaults to 100
357 (json-int, optional)
358
359Example:
360
361-> { "execute": "send-key",
Amos Kongf9b1d9b2013-07-16 19:52:14 +0800362 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
363 { "type": "qcode", "data": "alt" },
364 { "type": "qcode", "data": "delete" } ] } }
Amos Konge4c8f002012-08-31 10:56:26 +0800365<- { "return": {} }
366
367EQMP
368
369 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300370 .name = "cpu",
371 .args_type = "index:i",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200372 .mhandler.cmd_new = qmp_marshal_cpu,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300373 },
374
375SQMP
376cpu
377---
378
379Set the default CPU.
380
381Arguments:
382
383- "index": the CPU's index (json-int)
384
385Example:
386
387-> { "execute": "cpu", "arguments": { "index": 0 } }
388<- { "return": {} }
389
390Note: CPUs' indexes are obtained with the 'query-cpus' command.
391
392EQMP
393
394 {
Igor Mammedov69ca3ea2013-04-30 15:41:25 +0200395 .name = "cpu-add",
396 .args_type = "id:i",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200397 .mhandler.cmd_new = qmp_marshal_cpu_add,
Igor Mammedov69ca3ea2013-04-30 15:41:25 +0200398 },
399
400SQMP
401cpu-add
402-------
403
404Adds virtual cpu
405
406Arguments:
407
408- "id": cpu id (json-int)
409
410Example:
411
412-> { "execute": "cpu-add", "arguments": { "id": 2 } }
413<- { "return": {} }
414
415EQMP
416
417 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300418 .name = "memsave",
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200419 .args_type = "val:l,size:i,filename:s,cpu:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200420 .mhandler.cmd_new = qmp_marshal_memsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300421 },
422
423SQMP
424memsave
425-------
426
427Save to disk virtual memory dump starting at 'val' of size 'size'.
428
429Arguments:
430
431- "val": the starting address (json-int)
432- "size": the memory size, in bytes (json-int)
433- "filename": file path (json-string)
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200434- "cpu": virtual CPU index (json-int, optional)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300435
436Example:
437
438-> { "execute": "memsave",
439 "arguments": { "val": 10,
440 "size": 100,
441 "filename": "/tmp/virtual-mem-dump" } }
442<- { "return": {} }
443
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300444EQMP
445
446 {
447 .name = "pmemsave",
448 .args_type = "val:l,size:i,filename:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200449 .mhandler.cmd_new = qmp_marshal_pmemsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300450 },
451
452SQMP
453pmemsave
454--------
455
456Save to disk physical memory dump starting at 'val' of size 'size'.
457
458Arguments:
459
460- "val": the starting address (json-int)
461- "size": the memory size, in bytes (json-int)
462- "filename": file path (json-string)
463
464Example:
465
466-> { "execute": "pmemsave",
467 "arguments": { "val": 10,
468 "size": 100,
469 "filename": "/tmp/physical-mem-dump" } }
470<- { "return": {} }
471
472EQMP
473
474 {
Lai Jiangshana4046662011-03-07 17:05:15 +0800475 .name = "inject-nmi",
476 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200477 .mhandler.cmd_new = qmp_marshal_inject_nmi,
Lai Jiangshana4046662011-03-07 17:05:15 +0800478 },
479
480SQMP
481inject-nmi
482----------
483
Alexey Kardashevskiy9cb805f2014-08-20 22:16:33 +1000484Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
Lai Jiangshana4046662011-03-07 17:05:15 +0800485
486Arguments: None.
487
488Example:
489
490-> { "execute": "inject-nmi" }
491<- { "return": {} }
492
Luiz Capitulinode253f12012-07-27 16:18:16 -0300493Note: inject-nmi fails when the guest doesn't support injecting.
Lai Jiangshana4046662011-03-07 17:05:15 +0800494
495EQMP
496
497 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100498 .name = "ringbuf-write",
Markus Armbruster82e59a62013-02-06 21:27:14 +0100499 .args_type = "device:s,data:s,format:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200500 .mhandler.cmd_new = qmp_marshal_ringbuf_write,
Lei Li1f590cf2013-01-25 00:03:20 +0800501 },
502
503SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100504ringbuf-write
Lei Li1f590cf2013-01-25 00:03:20 +0800505-------------
506
Markus Armbruster3949e592013-02-06 21:27:24 +0100507Write to a ring buffer character device.
Lei Li1f590cf2013-01-25 00:03:20 +0800508
509Arguments:
510
Markus Armbruster3949e592013-02-06 21:27:24 +0100511- "device": ring buffer character device name (json-string)
512- "data": data to write (json-string)
513- "format": data format (json-string, optional)
514 - Possible values: "utf8" (default), "base64"
515 Bug: invalid base64 is currently not rejected.
516 Whitespace *is* invalid.
Lei Li1f590cf2013-01-25 00:03:20 +0800517
518Example:
519
Markus Armbruster3949e592013-02-06 21:27:24 +0100520-> { "execute": "ringbuf-write",
521 "arguments": { "device": "foo",
Lei Li1f590cf2013-01-25 00:03:20 +0800522 "data": "abcdefgh",
523 "format": "utf8" } }
524<- { "return": {} }
525
526EQMP
527
528 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100529 .name = "ringbuf-read",
Lei Li49b6d722013-01-25 00:03:21 +0800530 .args_type = "device:s,size:i,format:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200531 .mhandler.cmd_new = qmp_marshal_ringbuf_read,
Lei Li49b6d722013-01-25 00:03:21 +0800532 },
533
534SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100535ringbuf-read
Lei Li49b6d722013-01-25 00:03:21 +0800536-------------
537
Markus Armbruster3949e592013-02-06 21:27:24 +0100538Read from a ring buffer character device.
Lei Li49b6d722013-01-25 00:03:21 +0800539
540Arguments:
541
Markus Armbruster3949e592013-02-06 21:27:24 +0100542- "device": ring buffer character device name (json-string)
543- "size": how many bytes to read at most (json-int)
544 - Number of data bytes, not number of characters in encoded data
545- "format": data format (json-string, optional)
546 - Possible values: "utf8" (default), "base64"
547 - Naturally, format "utf8" works only when the ring buffer
548 contains valid UTF-8 text. Invalid UTF-8 sequences get
549 replaced. Bug: replacement doesn't work. Bug: can screw
550 up on encountering NUL characters, after the ring buffer
551 lost data, and when reading stops because the size limit
552 is reached.
Lei Li49b6d722013-01-25 00:03:21 +0800553
554Example:
555
Markus Armbruster3949e592013-02-06 21:27:24 +0100556-> { "execute": "ringbuf-read",
557 "arguments": { "device": "foo",
Lei Li49b6d722013-01-25 00:03:21 +0800558 "size": 1000,
559 "format": "utf8" } }
Markus Armbruster3ab651f2013-02-06 21:27:15 +0100560<- {"return": "abcdefgh"}
Lei Li49b6d722013-01-25 00:03:21 +0800561
562EQMP
563
564 {
Stefano Stabellinia7ae8352012-01-25 12:24:51 +0000565 .name = "xen-save-devices-state",
566 .args_type = "filename:F",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200567 .mhandler.cmd_new = qmp_marshal_xen_save_devices_state,
Stefano Stabellinia7ae8352012-01-25 12:24:51 +0000568 },
569
570SQMP
571xen-save-devices-state
572-------
573
574Save the state of all devices to file. The RAM and the block devices
575of the VM are not saved by this command.
576
577Arguments:
578
579- "filename": the file to save the state of the devices to as binary
580data. See xen-save-devices-state.txt for a description of the binary
581format.
582
583Example:
584
585-> { "execute": "xen-save-devices-state",
586 "arguments": { "filename": "/tmp/save" } }
587<- { "return": {} }
588
589EQMP
590
591 {
Anthony PERARD39f42432012-10-03 13:48:19 +0000592 .name = "xen-set-global-dirty-log",
593 .args_type = "enable:b",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200594 .mhandler.cmd_new = qmp_marshal_xen_set_global_dirty_log,
Anthony PERARD39f42432012-10-03 13:48:19 +0000595 },
596
597SQMP
598xen-set-global-dirty-log
599-------
600
601Enable or disable the global dirty log mode.
602
603Arguments:
604
605- "enable": Enable it or disable it.
606
607Example:
608
609-> { "execute": "xen-set-global-dirty-log",
610 "arguments": { "enable": true } }
611<- { "return": {} }
612
613EQMP
614
615 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300616 .name = "migrate",
617 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200618 .mhandler.cmd_new = qmp_marshal_migrate,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300619 },
620
621SQMP
622migrate
623-------
624
625Migrate to URI.
626
627Arguments:
628
629- "blk": block migration, full disk copy (json-bool, optional)
630- "inc": incremental disk copy (json-bool, optional)
631- "uri": Destination URI (json-string)
632
633Example:
634
635-> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
636<- { "return": {} }
637
638Notes:
639
640(1) The 'query-migrate' command should be used to check migration's progress
641 and final result (this information is provided by the 'status' member)
642(2) All boolean arguments default to false
643(3) The user Monitor's "detach" argument is invalid in QMP and should not
644 be used
645
646EQMP
647
648 {
649 .name = "migrate_cancel",
650 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200651 .mhandler.cmd_new = qmp_marshal_migrate_cancel,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300652 },
653
654SQMP
655migrate_cancel
656--------------
657
658Cancel the current migration.
659
660Arguments: None.
661
662Example:
663
664-> { "execute": "migrate_cancel" }
665<- { "return": {} }
666
667EQMP
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000668
669 {
670 .name = "migrate-incoming",
671 .args_type = "uri:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200672 .mhandler.cmd_new = qmp_marshal_migrate_incoming,
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000673 },
674
675SQMP
676migrate-incoming
677----------------
678
679Continue an incoming migration
680
681Arguments:
682
683- "uri": Source/listening URI (json-string)
684
685Example:
686
687-> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
688<- { "return": {} }
689
690Notes:
691
692(1) QEMU must be started with -incoming defer to allow migrate-incoming to
693 be used
Dr. David Alan Gilbert4aab6282015-06-03 19:43:56 +0100694(2) The uri format is the same as for -incoming
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000695
696EQMP
697 {
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300698 .name = "migrate-set-cache-size",
699 .args_type = "value:o",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200700 .mhandler.cmd_new = qmp_marshal_migrate_set_cache_size,
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300701 },
702
703SQMP
704migrate-set-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100705----------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300706
707Set cache size to be used by XBZRLE migration, the cache size will be rounded
708down to the nearest power of 2
709
710Arguments:
711
712- "value": cache size in bytes (json-int)
713
714Example:
715
716-> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
717<- { "return": {} }
718
719EQMP
720 {
721 .name = "query-migrate-cache-size",
722 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200723 .mhandler.cmd_new = qmp_marshal_query_migrate_cache_size,
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300724 },
725
726SQMP
727query-migrate-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100728------------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300729
730Show cache size to be used by XBZRLE migration
731
732returns a json-object with the following information:
733- "size" : json-int
734
735Example:
736
737-> { "execute": "query-migrate-cache-size" }
738<- { "return": 67108864 }
739
740EQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300741
742 {
743 .name = "migrate_set_speed",
Wen Congyang3a019b62010-11-25 09:06:05 +0800744 .args_type = "value:o",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200745 .mhandler.cmd_new = qmp_marshal_migrate_set_speed,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300746 },
747
748SQMP
749migrate_set_speed
750-----------------
751
752Set maximum speed for migrations.
753
754Arguments:
755
Luiz Capitulino5569fd72010-12-15 17:56:18 -0200756- "value": maximum speed, in bytes per second (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300757
758Example:
759
760-> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
761<- { "return": {} }
762
763EQMP
764
765 {
766 .name = "migrate_set_downtime",
767 .args_type = "value:T",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200768 .mhandler.cmd_new = qmp_marshal_migrate_set_downtime,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300769 },
770
771SQMP
772migrate_set_downtime
773--------------------
774
775Set maximum tolerated downtime (in seconds) for migrations.
776
777Arguments:
778
779- "value": maximum downtime (json-number)
780
781Example:
782
783-> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
784<- { "return": {} }
785
786EQMP
787
788 {
Jes Sorensenff73edf2011-03-09 14:31:06 +0100789 .name = "client_migrate_info",
790 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
791 .params = "protocol hostname port tls-port cert-subject",
Markus Armbruster13cadef2015-03-05 19:16:58 +0100792 .help = "set migration information for remote display",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200793 .mhandler.cmd_new = qmp_marshal_client_migrate_info,
Jes Sorensenff73edf2011-03-09 14:31:06 +0100794 },
795
796SQMP
797client_migrate_info
Markus Armbruster13cadef2015-03-05 19:16:58 +0100798-------------------
Jes Sorensenff73edf2011-03-09 14:31:06 +0100799
Markus Armbruster13cadef2015-03-05 19:16:58 +0100800Set migration information for remote display. This makes the server
801ask the client to automatically reconnect using the new parameters
802once migration finished successfully. Only implemented for SPICE.
Jes Sorensenff73edf2011-03-09 14:31:06 +0100803
804Arguments:
805
Markus Armbruster13cadef2015-03-05 19:16:58 +0100806- "protocol": must be "spice" (json-string)
Jes Sorensenff73edf2011-03-09 14:31:06 +0100807- "hostname": migration target hostname (json-string)
Markus Armbruster13cadef2015-03-05 19:16:58 +0100808- "port": spice tcp port for plaintext channels (json-int, optional)
Jes Sorensenff73edf2011-03-09 14:31:06 +0100809- "tls-port": spice tcp port for tls-secured channels (json-int, optional)
810- "cert-subject": server certificate subject (json-string, optional)
811
812Example:
813
814-> { "execute": "client_migrate_info",
815 "arguments": { "protocol": "spice",
816 "hostname": "virt42.lab.kraxel.org",
817 "port": 1234 } }
818<- { "return": {} }
819
820EQMP
821
822 {
Wen Congyang783e9b42012-05-07 12:10:47 +0800823 .name = "dump-guest-memory",
qiaonuohanb53ccc32014-02-18 14:11:36 +0800824 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
825 .params = "-p protocol [begin] [length] [format]",
Wen Congyang783e9b42012-05-07 12:10:47 +0800826 .help = "dump guest memory to file",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200827 .mhandler.cmd_new = qmp_marshal_dump_guest_memory,
Wen Congyang783e9b42012-05-07 12:10:47 +0800828 },
829
830SQMP
831dump
832
833
834Dump guest memory to file. The file can be processed with crash or gdb.
835
836Arguments:
837
838- "paging": do paging to get guest's memory mapping (json-bool)
839- "protocol": destination file(started with "file:") or destination file
840 descriptor (started with "fd:") (json-string)
841- "begin": the starting physical address. It's optional, and should be specified
842 with length together (json-int)
843- "length": the memory size, in bytes. It's optional, and should be specified
844 with begin together (json-int)
qiaonuohanb53ccc32014-02-18 14:11:36 +0800845- "format": the format of guest memory dump. It's optional, and can be
846 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
847 conflict with paging and filter, ie. begin and length (json-string)
Wen Congyang783e9b42012-05-07 12:10:47 +0800848
849Example:
850
851-> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
852<- { "return": {} }
853
854Notes:
855
856(1) All boolean arguments default to false
857
858EQMP
859
860 {
qiaonuohan7d6dc7f2014-02-18 14:11:38 +0800861 .name = "query-dump-guest-memory-capability",
862 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200863 .mhandler.cmd_new = qmp_marshal_query_dump_guest_memory_capability,
qiaonuohan7d6dc7f2014-02-18 14:11:38 +0800864 },
865
866SQMP
867query-dump-guest-memory-capability
868----------
869
870Show available formats for 'dump-guest-memory'
871
872Example:
873
874-> { "execute": "query-dump-guest-memory-capability" }
875<- { "return": { "formats":
876 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
877
878EQMP
879
Jason J. Herne7ee0c3e2015-06-26 14:03:16 -0400880#if defined TARGET_S390X
881 {
882 .name = "dump-skeys",
883 .args_type = "filename:F",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200884 .mhandler.cmd_new = qmp_marshal_dump_skeys,
Jason J. Herne7ee0c3e2015-06-26 14:03:16 -0400885 },
886#endif
887
888SQMP
889dump-skeys
890----------
891
892Save guest storage keys to file.
893
894Arguments:
895
896- "filename": file path (json-string)
897
898Example:
899
900-> { "execute": "dump-skeys", "arguments": { "filename": "/tmp/skeys" } }
901<- { "return": {} }
902
903EQMP
904
qiaonuohan7d6dc7f2014-02-18 14:11:38 +0800905 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300906 .name = "netdev_add",
907 .args_type = "netdev:O",
Luiz Capitulino928059a2012-04-18 17:34:15 -0300908 .mhandler.cmd_new = qmp_netdev_add,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300909 },
910
911SQMP
912netdev_add
913----------
914
915Add host network device.
916
917Arguments:
918
919- "type": the device type, "tap", "user", ... (json-string)
920- "id": the device's ID, must be unique (json-string)
921- device options
922
923Example:
924
Markus Armbrusterb8a98322015-09-16 13:06:26 +0200925-> { "execute": "netdev_add",
926 "arguments": { "type": "user", "id": "netdev1",
927 "dnssearch": "example.org" } }
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300928<- { "return": {} }
929
Markus Armbrusteraf347aa2013-02-22 18:31:51 +0100930Note: The supported device options are the same ones supported by the '-netdev'
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300931 command-line argument, which are listed in the '-help' output or QEMU's
932 manual
933
934EQMP
935
936 {
937 .name = "netdev_del",
938 .args_type = "id:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200939 .mhandler.cmd_new = qmp_marshal_netdev_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300940 },
941
942SQMP
943netdev_del
944----------
945
946Remove host network device.
947
948Arguments:
949
950- "id": the device's ID, must be unique (json-string)
951
952Example:
953
954-> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
955<- { "return": {} }
956
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100957
958EQMP
959
960 {
Paolo Bonzinicff8b2c2013-12-20 23:21:10 +0100961 .name = "object-add",
962 .args_type = "qom-type:s,id:s,props:q?",
Markus Armbruster6eb39372015-09-16 13:06:25 +0200963 .mhandler.cmd_new = qmp_marshal_object_add,
Paolo Bonzinicff8b2c2013-12-20 23:21:10 +0100964 },
965
966SQMP
967object-add
968----------
969
970Create QOM object.
971
972Arguments:
973
974- "qom-type": the object's QOM type, i.e. the class name (json-string)
975- "id": the object's ID, must be unique (json-string)
976- "props": a dictionary of object property values (optional, json-dict)
977
978Example:
979
980-> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
981 "props": { "filename": "/dev/hwrng" } } }
982<- { "return": {} }
983
984EQMP
985
986 {
Paolo Bonziniab2d0532013-12-20 23:21:09 +0100987 .name = "object-del",
988 .args_type = "id:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +0200989 .mhandler.cmd_new = qmp_marshal_object_del,
Paolo Bonziniab2d0532013-12-20 23:21:09 +0100990 },
991
992SQMP
993object-del
994----------
995
996Remove QOM object.
997
998Arguments:
999
1000- "id": the object's ID (json-string)
1001
1002Example:
1003
1004-> { "execute": "object-del", "arguments": { "id": "rng1" } }
1005<- { "return": {} }
1006
1007
1008EQMP
1009
1010
1011 {
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +01001012 .name = "block_resize",
Benoît Canet3b1dbd12014-01-23 21:31:37 +01001013 .args_type = "device:s?,node-name:s?,size:o",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001014 .mhandler.cmd_new = qmp_marshal_block_resize,
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +01001015 },
1016
1017SQMP
1018block_resize
1019------------
1020
1021Resize a block image while a guest is running.
1022
1023Arguments:
1024
1025- "device": the device's ID, must be unique (json-string)
Benoît Canet3b1dbd12014-01-23 21:31:37 +01001026- "node-name": the node name in the block driver state graph (json-string)
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +01001027- "size": new size
1028
1029Example:
1030
1031-> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1032<- { "return": {} }
1033
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001034EQMP
1035
1036 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001037 .name = "block-stream",
Jeff Cody13d8cc52014-06-25 15:40:11 -04001038 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001039 .mhandler.cmd_new = qmp_marshal_block_stream,
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00001040 },
1041
Stefan Hajnocziec683d62015-04-15 11:43:42 +01001042SQMP
1043block-stream
1044------------
1045
1046Copy data from a backing file into a block device.
1047
1048Arguments:
1049
1050- "device": The device's ID, must be unique (json-string)
1051- "base": The file name of the backing image above which copying starts
1052 (json-string, optional)
1053- "backing-file": The backing file string to write into the active layer. This
1054 filename is not validated.
1055
1056 If a pathname string is such that it cannot be resolved by
1057 QEMU, that means that subsequent QMP or HMP commands must use
1058 node-names for the image in question, as filename lookup
1059 methods will fail.
1060
1061 If not specified, QEMU will automatically determine the
1062 backing file string to use, or error out if there is no
1063 obvious choice. Care should be taken when specifying the
1064 string, to specify a valid filename or protocol.
1065 (json-string, optional) (Since 2.1)
1066- "speed": the maximum speed, in bytes per second (json-int, optional)
1067- "on-error": the action to take on an error (default 'report'). 'stop' and
1068 'enospc' can only be used if the block device supports io-status.
1069 (json-string, optional) (Since 2.1)
1070
1071Example:
1072
1073-> { "execute": "block-stream", "arguments": { "device": "virtio0",
1074 "base": "/tmp/master.qcow2" } }
1075<- { "return": {} }
1076
1077EQMP
1078
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00001079 {
Jeff Codyed61fc12012-09-27 13:29:16 -04001080 .name = "block-commit",
Jeff Cody54e26902014-06-25 15:40:10 -04001081 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001082 .mhandler.cmd_new = qmp_marshal_block_commit,
Jeff Codyed61fc12012-09-27 13:29:16 -04001083 },
1084
Jeff Cody37222902014-01-24 09:02:37 -05001085SQMP
1086block-commit
1087------------
1088
1089Live commit of data from overlay image nodes into backing nodes - i.e., writes
1090data between 'top' and 'base' into 'base'.
1091
1092Arguments:
1093
1094- "device": The device's ID, must be unique (json-string)
1095- "base": The file name of the backing image to write data into.
1096 If not specified, this is the deepest backing image
1097 (json-string, optional)
1098- "top": The file name of the backing image within the image chain,
Jeff Cody7676e2c2014-06-30 15:14:15 +02001099 which contains the topmost data to be committed down. If
1100 not specified, this is the active layer. (json-string, optional)
Jeff Cody37222902014-01-24 09:02:37 -05001101
Jeff Cody54e26902014-06-25 15:40:10 -04001102- backing-file: The backing file string to write into the overlay
1103 image of 'top'. If 'top' is the active layer,
1104 specifying a backing file string is an error. This
1105 filename is not validated.
1106
1107 If a pathname string is such that it cannot be
1108 resolved by QEMU, that means that subsequent QMP or
1109 HMP commands must use node-names for the image in
1110 question, as filename lookup methods will fail.
1111
1112 If not specified, QEMU will automatically determine
1113 the backing file string to use, or error out if
1114 there is no obvious choice. Care should be taken
1115 when specifying the string, to specify a valid
1116 filename or protocol.
1117 (json-string, optional) (Since 2.1)
1118
Jeff Cody37222902014-01-24 09:02:37 -05001119 If top == base, that is an error.
1120 If top == active, the job will not be completed by itself,
1121 user needs to complete the job with the block-job-complete
1122 command after getting the ready event. (Since 2.0)
1123
1124 If the base image is smaller than top, then the base image
1125 will be resized to be the same size as top. If top is
1126 smaller than the base image, the base will not be
1127 truncated. If you want the base image size to match the
1128 size of the smaller top, you can safely truncate it
1129 yourself once the commit operation successfully completes.
1130 (json-string)
1131- "speed": the maximum speed, in bytes per second (json-int, optional)
1132
1133
1134Example:
1135
1136-> { "execute": "block-commit", "arguments": { "device": "virtio0",
1137 "top": "/tmp/snap1.qcow2" } }
1138<- { "return": {} }
1139
1140EQMP
1141
Jeff Codyed61fc12012-09-27 13:29:16 -04001142 {
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001143 .name = "drive-backup",
Stefan Hajnoczib53169e2013-06-26 14:11:57 +02001144 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
John Snowd58d8452015-04-17 19:49:58 -04001145 "bitmap:s?,on-source-error:s?,on-target-error:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001146 .mhandler.cmd_new = qmp_marshal_drive_backup,
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001147 },
1148
1149SQMP
1150drive-backup
1151------------
1152
1153Start a point-in-time copy of a block device to a new destination. The
1154status of ongoing drive-backup operations can be checked with
1155query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1156The operation can be stopped before it has completed using the
1157block-job-cancel command.
1158
1159Arguments:
1160
1161- "device": the name of the device which should be copied.
1162 (json-string)
1163- "target": the target of the new image. If the file exists, or if it is a
1164 device, the existing file/device will be used as the new
1165 destination. If it does not exist, a new file will be created.
1166 (json-string)
1167- "format": the format of the new destination, default is to probe if 'mode' is
1168 'existing', else the format of the source
1169 (json-string, optional)
Stefan Hajnoczib53169e2013-06-26 14:11:57 +02001170- "sync": what parts of the disk image should be copied to the destination;
1171 possibilities include "full" for all the disk, "top" for only the sectors
John Snow4b80ab22015-06-04 20:20:34 -04001172 allocated in the topmost image, "incremental" for only the dirty sectors in
John Snowd58d8452015-04-17 19:49:58 -04001173 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
John Snow4b80ab22015-06-04 20:20:34 -04001174- "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
1175 is "incremental", must NOT be present otherwise.
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001176- "mode": whether and how QEMU should create a new image
1177 (NewImageMode, optional, default 'absolute-paths')
1178- "speed": the maximum speed, in bytes per second (json-int, optional)
1179- "on-source-error": the action to take on an error on the source, default
1180 'report'. 'stop' and 'enospc' can only be used
1181 if the block device supports io-status.
1182 (BlockdevOnError, optional)
1183- "on-target-error": the action to take on an error on the target, default
1184 'report' (no limitations, since this applies to
1185 a different block device than device).
1186 (BlockdevOnError, optional)
1187
1188Example:
1189-> { "execute": "drive-backup", "arguments": { "device": "drive0",
Ian Mainfc5d3f82013-07-26 11:39:04 -07001190 "sync": "full",
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001191 "target": "backup.img" } }
1192<- { "return": {} }
Fam Zhengc29c1dd2014-12-18 18:37:05 +08001193
1194EQMP
1195
1196 {
1197 .name = "blockdev-backup",
1198 .args_type = "sync:s,device:B,target:B,speed:i?,"
1199 "on-source-error:s?,on-target-error:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001200 .mhandler.cmd_new = qmp_marshal_blockdev_backup,
Fam Zhengc29c1dd2014-12-18 18:37:05 +08001201 },
1202
1203SQMP
1204blockdev-backup
1205---------------
1206
1207The device version of drive-backup: this command takes an existing named device
1208as backup target.
1209
1210Arguments:
1211
1212- "device": the name of the device which should be copied.
1213 (json-string)
1214- "target": the name of the backup target device. (json-string)
1215- "sync": what parts of the disk image should be copied to the destination;
1216 possibilities include "full" for all the disk, "top" for only the
1217 sectors allocated in the topmost image, or "none" to only replicate
1218 new I/O (MirrorSyncMode).
1219- "speed": the maximum speed, in bytes per second (json-int, optional)
1220- "on-source-error": the action to take on an error on the source, default
1221 'report'. 'stop' and 'enospc' can only be used
1222 if the block device supports io-status.
1223 (BlockdevOnError, optional)
1224- "on-target-error": the action to take on an error on the target, default
1225 'report' (no limitations, since this applies to
1226 a different block device than device).
1227 (BlockdevOnError, optional)
1228
1229Example:
1230-> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1231 "sync": "full",
1232 "target": "tgt-id" } }
1233<- { "return": {} }
1234
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001235EQMP
1236
1237 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001238 .name = "block-job-set-speed",
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +01001239 .args_type = "device:B,speed:o",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001240 .mhandler.cmd_new = qmp_marshal_block_job_set_speed,
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +00001241 },
1242
1243 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001244 .name = "block-job-cancel",
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001245 .args_type = "device:B,force:b?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001246 .mhandler.cmd_new = qmp_marshal_block_job_cancel,
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00001247 },
Jeff Codyc1864022012-02-28 15:54:07 -05001248 {
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001249 .name = "block-job-pause",
1250 .args_type = "device:B",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001251 .mhandler.cmd_new = qmp_marshal_block_job_pause,
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001252 },
1253 {
1254 .name = "block-job-resume",
1255 .args_type = "device:B",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001256 .mhandler.cmd_new = qmp_marshal_block_job_resume,
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001257 },
1258 {
Paolo Bonziniaeae8832012-10-18 16:49:21 +02001259 .name = "block-job-complete",
1260 .args_type = "device:B",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001261 .mhandler.cmd_new = qmp_marshal_block_job_complete,
Paolo Bonziniaeae8832012-10-18 16:49:21 +02001262 },
1263 {
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001264 .name = "transaction",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01001265 .args_type = "actions:q",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001266 .mhandler.cmd_new = qmp_marshal_transaction,
Jeff Codyc1864022012-02-28 15:54:07 -05001267 },
1268
1269SQMP
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001270transaction
1271-----------
Jeff Codyc1864022012-02-28 15:54:07 -05001272
Kashyap Chamarthya9105232015-10-02 14:12:34 +02001273Atomically operate on one or more block devices. Operations that are
1274currently supported:
1275
1276 - drive-backup
1277 - blockdev-backup
1278 - blockdev-snapshot-sync
1279 - blockdev-snapshot-internal-sync
1280 - abort
1281 - block-dirty-bitmap-add
1282 - block-dirty-bitmap-clear
1283
1284Refer to the qemu/qapi-schema.json file for minimum required QEMU
1285versions for these operations. A list of dictionaries is accepted,
1286that contains the actions to be performed. If there is any failure
1287performing any of the operations, all operations for the group are
1288abandoned.
Jeff Codyc1864022012-02-28 15:54:07 -05001289
Wenchao Xiabbe86012013-09-11 14:04:34 +08001290For external snapshots, the dictionary contains the device, the file to use for
1291the new snapshot, and the format. The default format, if not specified, is
1292qcow2.
Jeff Codyc1864022012-02-28 15:54:07 -05001293
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001294Each new snapshot defaults to being created by QEMU (wiping any
1295contents if the file already exists), but it is also possible to reuse
1296an externally-created file. In the latter case, you should ensure that
1297the new image file has the same contents as the current one; QEMU cannot
1298perform any meaningful check. Typically this is achieved by using the
1299current image file as the backing file for the new image.
1300
Wenchao Xiabbe86012013-09-11 14:04:34 +08001301On failure, the original disks pre-snapshot attempt will be used.
1302
1303For internal snapshots, the dictionary contains the device and the snapshot's
1304name. If an internal snapshot matching name already exists, the request will
1305be rejected. Only some image formats support it, for example, qcow2, rbd,
1306and sheepdog.
1307
1308On failure, qemu will try delete the newly created internal snapshot in the
1309transaction. When an I/O error occurs during deletion, the user needs to fix
1310it later with qemu-img or other command.
1311
Jeff Codyc1864022012-02-28 15:54:07 -05001312Arguments:
1313
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001314actions array:
Kashyap Chamarthya9105232015-10-02 14:12:34 +02001315 - "type": the operation to perform (json-string). Possible
1316 values: "drive-backup", "blockdev-backup",
1317 "blockdev-snapshot-sync",
1318 "blockdev-snapshot-internal-sync",
1319 "abort", "block-dirty-bitmap-add",
1320 "block-dirty-bitmap-clear"
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001321 - "data": a dictionary. The contents depend on the value
1322 of "type". When "type" is "blockdev-snapshot-sync":
1323 - "device": device name to snapshot (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001324 - "node-name": graph node name to snapshot (json-string)
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001325 - "snapshot-file": name of new image file (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001326 - "snapshot-node-name": graph node name of the new snapshot (json-string)
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001327 - "format": format of new image (json-string, optional)
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001328 - "mode": whether and how QEMU should create the snapshot file
1329 (NewImageMode, optional, default "absolute-paths")
Wenchao Xiabbe86012013-09-11 14:04:34 +08001330 When "type" is "blockdev-snapshot-internal-sync":
1331 - "device": device name to snapshot (json-string)
1332 - "name": name of the new snapshot (json-string)
Jeff Codyc1864022012-02-28 15:54:07 -05001333
1334Example:
1335
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001336-> { "execute": "transaction",
1337 "arguments": { "actions": [
Eric Blakecd0c5382014-05-06 09:39:03 -06001338 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001339 "snapshot-file": "/some/place/my-image",
1340 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001341 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
Benoît Canet0901f672014-01-23 21:31:38 +01001342 "snapshot-file": "/some/place/my-image2",
1343 "snapshot-node-name": "node3432",
1344 "mode": "existing",
1345 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001346 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001347 "snapshot-file": "/some/place/my-image2",
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001348 "mode": "existing",
Wenchao Xiabbe86012013-09-11 14:04:34 +08001349 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001350 { "type": "blockdev-snapshot-internal-sync", "data" : {
Wenchao Xiabbe86012013-09-11 14:04:34 +08001351 "device": "ide-hd2",
1352 "name": "snapshot0" } } ] } }
Jeff Codyc1864022012-02-28 15:54:07 -05001353<- { "return": {} }
1354
1355EQMP
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00001356
1357 {
John Snow341ebc22015-04-17 19:49:52 -04001358 .name = "block-dirty-bitmap-add",
1359 .args_type = "node:B,name:s,granularity:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001360 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_add,
John Snow341ebc22015-04-17 19:49:52 -04001361 },
1362
1363SQMP
1364
1365block-dirty-bitmap-add
1366----------------------
1367Since 2.4
1368
1369Create a dirty bitmap with a name on the device, and start tracking the writes.
1370
1371Arguments:
1372
1373- "node": device/node on which to create dirty bitmap (json-string)
1374- "name": name of the new dirty bitmap (json-string)
1375- "granularity": granularity to track writes with (int, optional)
1376
1377Example:
1378
1379-> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
1380 "name": "bitmap0" } }
1381<- { "return": {} }
1382
1383EQMP
1384
1385 {
1386 .name = "block-dirty-bitmap-remove",
1387 .args_type = "node:B,name:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001388 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_remove,
John Snow341ebc22015-04-17 19:49:52 -04001389 },
1390
1391SQMP
1392
1393block-dirty-bitmap-remove
1394-------------------------
1395Since 2.4
1396
1397Stop write tracking and remove the dirty bitmap that was created with
1398block-dirty-bitmap-add.
1399
1400Arguments:
1401
1402- "node": device/node on which to remove dirty bitmap (json-string)
1403- "name": name of the dirty bitmap to remove (json-string)
1404
1405Example:
1406
1407-> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
1408 "name": "bitmap0" } }
1409<- { "return": {} }
1410
1411EQMP
1412
1413 {
John Snowe74e6b72015-04-17 19:49:59 -04001414 .name = "block-dirty-bitmap-clear",
1415 .args_type = "node:B,name:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001416 .mhandler.cmd_new = qmp_marshal_block_dirty_bitmap_clear,
John Snowe74e6b72015-04-17 19:49:59 -04001417 },
1418
1419SQMP
1420
1421block-dirty-bitmap-clear
1422------------------------
1423Since 2.4
1424
1425Reset the dirty bitmap associated with a node so that an incremental backup
1426from this point in time forward will only backup clusters modified after this
1427clear operation.
1428
1429Arguments:
1430
1431- "node": device/node on which to remove dirty bitmap (json-string)
1432- "name": name of the dirty bitmap to remove (json-string)
1433
1434Example:
1435
1436-> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
1437 "name": "bitmap0" } }
1438<- { "return": {} }
1439
1440EQMP
1441
1442 {
Jes Sorensend967b2f2011-07-11 20:01:09 +02001443 .name = "blockdev-snapshot-sync",
Benoît Canet0901f672014-01-23 21:31:38 +01001444 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001445 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_sync,
Jes Sorensend967b2f2011-07-11 20:01:09 +02001446 },
1447
1448SQMP
1449blockdev-snapshot-sync
1450----------------------
1451
1452Synchronous snapshot of a block device. snapshot-file specifies the
1453target of the new image. If the file exists, or if it is a device, the
1454snapshot will be created in the existing file/device. If does not
1455exist, a new file will be created. format specifies the format of the
1456snapshot image, default is qcow2.
1457
1458Arguments:
1459
1460- "device": device name to snapshot (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001461- "node-name": graph node name to snapshot (json-string)
Jes Sorensend967b2f2011-07-11 20:01:09 +02001462- "snapshot-file": name of new image file (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001463- "snapshot-node-name": graph node name of the new snapshot (json-string)
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001464- "mode": whether and how QEMU should create the snapshot file
1465 (NewImageMode, optional, default "absolute-paths")
Jes Sorensend967b2f2011-07-11 20:01:09 +02001466- "format": format of new image (json-string, optional)
1467
1468Example:
1469
Luiz Capitulino7f3850c2011-10-10 17:30:08 -03001470-> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1471 "snapshot-file":
1472 "/some/place/my-image",
1473 "format": "qcow2" } }
Jes Sorensend967b2f2011-07-11 20:01:09 +02001474<- { "return": {} }
1475
1476EQMP
1477
1478 {
Wenchao Xiaf323bc92013-09-11 14:04:35 +08001479 .name = "blockdev-snapshot-internal-sync",
1480 .args_type = "device:B,name:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001481 .mhandler.cmd_new = qmp_marshal_blockdev_snapshot_internal_sync,
Wenchao Xiaf323bc92013-09-11 14:04:35 +08001482 },
1483
1484SQMP
1485blockdev-snapshot-internal-sync
1486-------------------------------
1487
1488Synchronously take an internal snapshot of a block device when the format of
1489image used supports it. If the name is an empty string, or a snapshot with
1490name already exists, the operation will fail.
1491
1492Arguments:
1493
1494- "device": device name to snapshot (json-string)
1495- "name": name of the new snapshot (json-string)
1496
1497Example:
1498
1499-> { "execute": "blockdev-snapshot-internal-sync",
1500 "arguments": { "device": "ide-hd0",
1501 "name": "snapshot0" }
1502 }
1503<- { "return": {} }
1504
1505EQMP
1506
1507 {
Wenchao Xia44e3e052013-09-11 14:04:36 +08001508 .name = "blockdev-snapshot-delete-internal-sync",
1509 .args_type = "device:B,id:s?,name:s?",
1510 .mhandler.cmd_new =
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001511 qmp_marshal_blockdev_snapshot_delete_internal_sync,
Wenchao Xia44e3e052013-09-11 14:04:36 +08001512 },
1513
1514SQMP
1515blockdev-snapshot-delete-internal-sync
1516--------------------------------------
1517
1518Synchronously delete an internal snapshot of a block device when the format of
1519image used supports it. The snapshot is identified by name or id or both. One
1520of name or id is required. If the snapshot is not found, the operation will
1521fail.
1522
1523Arguments:
1524
1525- "device": device name (json-string)
1526- "id": ID of the snapshot (json-string, optional)
1527- "name": name of the snapshot (json-string, optional)
1528
1529Example:
1530
1531-> { "execute": "blockdev-snapshot-delete-internal-sync",
1532 "arguments": { "device": "ide-hd0",
1533 "name": "snapshot0" }
1534 }
1535<- { "return": {
1536 "id": "1",
1537 "name": "snapshot0",
1538 "vm-state-size": 0,
1539 "date-sec": 1000012,
1540 "date-nsec": 10,
1541 "vm-clock-sec": 100,
1542 "vm-clock-nsec": 20
1543 }
1544 }
1545
1546EQMP
1547
1548 {
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001549 .name = "drive-mirror",
Paolo Bonzinib952b552012-10-18 16:49:28 +02001550 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Benoît Canet09158f02014-06-27 18:25:25 +02001551 "node-name:s?,replaces:s?,"
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001552 "on-source-error:s?,on-target-error:s?,"
Fam Zheng0fc9f8e2015-06-08 13:56:08 +08001553 "unmap:b?,"
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001554 "granularity:i?,buf-size:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001555 .mhandler.cmd_new = qmp_marshal_drive_mirror,
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001556 },
1557
1558SQMP
1559drive-mirror
1560------------
1561
1562Start mirroring a block device's writes to a new destination. target
1563specifies the target of the new image. If the file exists, or if it is
1564a device, it will be used as the new destination for writes. If it does not
1565exist, a new file will be created. format specifies the format of the
1566mirror image, default is to probe if mode='existing', else the format
1567of the source.
1568
1569Arguments:
1570
1571- "device": device name to operate on (json-string)
1572- "target": name of new image file (json-string)
1573- "format": format of new image (json-string, optional)
Benoît Canet4c828dc2014-06-16 12:00:55 +02001574- "node-name": the name of the new block driver state in the node graph
1575 (json-string, optional)
Benoît Canet09158f02014-06-27 18:25:25 +02001576- "replaces": the block driver node name to replace when finished
1577 (json-string, optional)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001578- "mode": how an image file should be created into the target
1579 file/device (NewImageMode, optional, default 'absolute-paths')
1580- "speed": maximum speed of the streaming job, in bytes per second
1581 (json-int)
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001582- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001583- "buf_size": maximum amount of data in flight from source to target, in bytes
1584 (json-int, default 10M)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001585- "sync": what parts of the disk image should be copied to the destination;
1586 possibilities include "full" for all the disk, "top" for only the sectors
1587 allocated in the topmost image, or "none" to only replicate new I/O
1588 (MirrorSyncMode).
Paolo Bonzinib952b552012-10-18 16:49:28 +02001589- "on-source-error": the action to take on an error on the source
1590 (BlockdevOnError, default 'report')
1591- "on-target-error": the action to take on an error on the target
1592 (BlockdevOnError, default 'report')
Fam Zheng0fc9f8e2015-06-08 13:56:08 +08001593- "unmap": whether the target sectors should be discarded where source has only
1594 zeroes. (json-bool, optional, default true)
Paolo Bonzinib952b552012-10-18 16:49:28 +02001595
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001596The default value of the granularity is the image cluster size clamped
1597between 4096 and 65536, if the image format defines one. If the format
1598does not define a cluster size, the default value of the granularity
1599is 65536.
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001600
1601
1602Example:
1603
1604-> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1605 "target": "/some/place/my-image",
1606 "sync": "full",
1607 "format": "qcow2" } }
1608<- { "return": {} }
1609
1610EQMP
1611
1612 {
Jeff Codyfa40e652014-07-01 09:52:16 +02001613 .name = "change-backing-file",
1614 .args_type = "device:s,image-node-name:s,backing-file:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001615 .mhandler.cmd_new = qmp_marshal_change_backing_file,
Jeff Codyfa40e652014-07-01 09:52:16 +02001616 },
1617
1618SQMP
1619change-backing-file
1620-------------------
1621Since: 2.1
1622
1623Change the backing file in the image file metadata. This does not cause
1624QEMU to reopen the image file to reparse the backing filename (it may,
1625however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1626if needed). The new backing file string is written into the image file
1627metadata, and the QEMU internal strings are updated.
1628
1629Arguments:
1630
1631- "image-node-name": The name of the block driver state node of the
1632 image to modify. The "device" is argument is used to
1633 verify "image-node-name" is in the chain described by
1634 "device".
1635 (json-string, optional)
1636
1637- "device": The name of the device.
1638 (json-string)
1639
1640- "backing-file": The string to write as the backing file. This string is
1641 not validated, so care should be taken when specifying
1642 the string or the image chain may not be able to be
1643 reopened again.
1644 (json-string)
1645
1646Returns: Nothing on success
1647 If "device" does not exist or cannot be determined, DeviceNotFound
1648
1649EQMP
1650
1651 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001652 .name = "balloon",
1653 .args_type = "value:M",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001654 .mhandler.cmd_new = qmp_marshal_balloon,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001655 },
1656
1657SQMP
1658balloon
1659-------
1660
1661Request VM to change its memory allocation (in bytes).
1662
1663Arguments:
1664
1665- "value": New memory allocation (json-int)
1666
1667Example:
1668
1669-> { "execute": "balloon", "arguments": { "value": 536870912 } }
1670<- { "return": {} }
1671
1672EQMP
1673
1674 {
1675 .name = "set_link",
1676 .args_type = "name:s,up:b",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001677 .mhandler.cmd_new = qmp_marshal_set_link,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001678 },
1679
1680SQMP
1681set_link
1682--------
1683
1684Change the link status of a network adapter.
1685
1686Arguments:
1687
1688- "name": network device name (json-string)
1689- "up": status is up (json-bool)
1690
1691Example:
1692
1693-> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1694<- { "return": {} }
1695
1696EQMP
1697
1698 {
1699 .name = "getfd",
1700 .args_type = "fdname:s",
1701 .params = "getfd name",
1702 .help = "receive a file descriptor via SCM rights and assign it a name",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001703 .mhandler.cmd_new = qmp_marshal_getfd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001704 },
1705
1706SQMP
1707getfd
1708-----
1709
1710Receive a file descriptor via SCM rights and assign it a name.
1711
1712Arguments:
1713
1714- "fdname": file descriptor name (json-string)
1715
1716Example:
1717
1718-> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1719<- { "return": {} }
1720
Corey Bryant208c9d12012-06-22 14:36:09 -04001721Notes:
1722
1723(1) If the name specified by the "fdname" argument already exists,
1724 the file descriptor assigned to it will be closed and replaced
1725 by the received file descriptor.
1726(2) The 'closefd' command can be used to explicitly close the file
1727 descriptor when it is no longer needed.
1728
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001729EQMP
1730
1731 {
1732 .name = "closefd",
1733 .args_type = "fdname:s",
1734 .params = "closefd name",
1735 .help = "close a file descriptor previously passed via SCM rights",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001736 .mhandler.cmd_new = qmp_marshal_closefd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001737 },
1738
1739SQMP
1740closefd
1741-------
1742
1743Close a file descriptor previously passed via SCM rights.
1744
1745Arguments:
1746
1747- "fdname": file descriptor name (json-string)
1748
1749Example:
1750
1751-> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1752<- { "return": {} }
1753
1754EQMP
1755
Corey Bryantba1c0482012-08-14 16:43:43 -04001756 {
1757 .name = "add-fd",
1758 .args_type = "fdset-id:i?,opaque:s?",
1759 .params = "add-fd fdset-id opaque",
1760 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001761 .mhandler.cmd_new = qmp_marshal_add_fd,
Corey Bryantba1c0482012-08-14 16:43:43 -04001762 },
1763
1764SQMP
1765add-fd
1766-------
1767
1768Add a file descriptor, that was passed via SCM rights, to an fd set.
1769
1770Arguments:
1771
1772- "fdset-id": The ID of the fd set to add the file descriptor to.
1773 (json-int, optional)
1774- "opaque": A free-form string that can be used to describe the fd.
1775 (json-string, optional)
1776
1777Return a json-object with the following information:
1778
1779- "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1780- "fd": The file descriptor that was received via SCM rights and added to the
1781 fd set. (json-int)
1782
1783Example:
1784
1785-> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1786<- { "return": { "fdset-id": 1, "fd": 3 } }
1787
1788Notes:
1789
1790(1) The list of fd sets is shared by all monitor connections.
1791(2) If "fdset-id" is not specified, a new fd set will be created.
1792
1793EQMP
1794
1795 {
1796 .name = "remove-fd",
1797 .args_type = "fdset-id:i,fd:i?",
1798 .params = "remove-fd fdset-id fd",
1799 .help = "Remove a file descriptor from an fd set",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001800 .mhandler.cmd_new = qmp_marshal_remove_fd,
Corey Bryantba1c0482012-08-14 16:43:43 -04001801 },
1802
1803SQMP
1804remove-fd
1805---------
1806
1807Remove a file descriptor from an fd set.
1808
1809Arguments:
1810
1811- "fdset-id": The ID of the fd set that the file descriptor belongs to.
1812 (json-int)
1813- "fd": The file descriptor that is to be removed. (json-int, optional)
1814
1815Example:
1816
1817-> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1818<- { "return": {} }
1819
1820Notes:
1821
1822(1) The list of fd sets is shared by all monitor connections.
1823(2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1824 removed.
1825
1826EQMP
1827
1828 {
1829 .name = "query-fdsets",
1830 .args_type = "",
1831 .help = "Return information describing all fd sets",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001832 .mhandler.cmd_new = qmp_marshal_query_fdsets,
Corey Bryantba1c0482012-08-14 16:43:43 -04001833 },
1834
1835SQMP
1836query-fdsets
1837-------------
1838
1839Return information describing all fd sets.
1840
1841Arguments: None
1842
1843Example:
1844
1845-> { "execute": "query-fdsets" }
1846<- { "return": [
1847 {
1848 "fds": [
1849 {
1850 "fd": 30,
1851 "opaque": "rdonly:/path/to/file"
1852 },
1853 {
1854 "fd": 24,
1855 "opaque": "rdwr:/path/to/file"
1856 }
1857 ],
1858 "fdset-id": 1
1859 },
1860 {
1861 "fds": [
1862 {
1863 "fd": 28
1864 },
1865 {
1866 "fd": 29
1867 }
1868 ],
1869 "fdset-id": 0
1870 }
1871 ]
1872 }
1873
1874Note: The list of fd sets is shared by all monitor connections.
1875
1876EQMP
1877
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001878 {
1879 .name = "block_passwd",
Benoît Canet12d3ba82014-01-23 21:31:35 +01001880 .args_type = "device:s?,node-name:s?,password:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001881 .mhandler.cmd_new = qmp_marshal_block_passwd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001882 },
1883
1884SQMP
1885block_passwd
1886------------
1887
1888Set the password of encrypted block devices.
1889
1890Arguments:
1891
1892- "device": device name (json-string)
Benoît Canet12d3ba82014-01-23 21:31:35 +01001893- "node-name": name in the block driver state graph (json-string)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001894- "password": password (json-string)
1895
1896Example:
1897
1898-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1899 "password": "12345" } }
1900<- { "return": {} }
1901
1902EQMP
1903
1904 {
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001905 .name = "block_set_io_throttle",
Alberto Garcia76f4afb2015-06-08 18:17:44 +02001906 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,iops_size:l?,group:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001907 .mhandler.cmd_new = qmp_marshal_block_set_io_throttle,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001908 },
1909
1910SQMP
1911block_set_io_throttle
1912------------
1913
1914Change I/O throttle limits for a block drive.
1915
1916Arguments:
1917
1918- "device": device name (json-string)
Eric Blake586b5462013-08-30 14:44:11 -06001919- "bps": total throughput limit in bytes per second (json-int)
1920- "bps_rd": read throughput limit in bytes per second (json-int)
1921- "bps_wr": write throughput limit in bytes per second (json-int)
1922- "iops": total I/O operations per second (json-int)
1923- "iops_rd": read I/O operations per second (json-int)
1924- "iops_wr": write I/O operations per second (json-int)
Benoît Canet3e9fab62013-09-02 14:14:40 +02001925- "bps_max": total max in bytes (json-int)
1926- "bps_rd_max": read max in bytes (json-int)
1927- "bps_wr_max": write max in bytes (json-int)
1928- "iops_max": total I/O operations max (json-int)
1929- "iops_rd_max": read I/O operations max (json-int)
1930- "iops_wr_max": write I/O operations max (json-int)
Benoît Canet2024c1d2013-09-02 14:14:41 +02001931- "iops_size": I/O size in bytes when limiting (json-int)
Alberto Garcia76f4afb2015-06-08 18:17:44 +02001932- "group": throttle group name (json-string)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001933
1934Example:
1935
1936-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
Eric Blake586b5462013-08-30 14:44:11 -06001937 "bps": 1000000,
1938 "bps_rd": 0,
1939 "bps_wr": 0,
1940 "iops": 0,
1941 "iops_rd": 0,
Benoît Canet3e9fab62013-09-02 14:14:40 +02001942 "iops_wr": 0,
1943 "bps_max": 8000000,
1944 "bps_rd_max": 0,
1945 "bps_wr_max": 0,
1946 "iops_max": 0,
1947 "iops_rd_max": 0,
Benoît Canet2024c1d2013-09-02 14:14:41 +02001948 "iops_wr_max": 0,
1949 "iops_size": 0 } }
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001950<- { "return": {} }
1951
1952EQMP
1953
1954 {
Gerd Hoffmann75721502010-10-07 12:22:54 +02001955 .name = "set_password",
1956 .args_type = "protocol:s,password:s,connected:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001957 .mhandler.cmd_new = qmp_marshal_set_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001958 },
1959
1960SQMP
1961set_password
1962------------
1963
1964Set the password for vnc/spice protocols.
1965
1966Arguments:
1967
1968- "protocol": protocol name (json-string)
1969- "password": password (json-string)
Alberto Garcia3599d462015-02-26 16:35:07 +02001970- "connected": [ keep | disconnect | fail ] (json-string, optional)
Gerd Hoffmann75721502010-10-07 12:22:54 +02001971
1972Example:
1973
1974-> { "execute": "set_password", "arguments": { "protocol": "vnc",
1975 "password": "secret" } }
1976<- { "return": {} }
1977
1978EQMP
1979
1980 {
1981 .name = "expire_password",
1982 .args_type = "protocol:s,time:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02001983 .mhandler.cmd_new = qmp_marshal_expire_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001984 },
1985
1986SQMP
1987expire_password
1988---------------
1989
1990Set the password expire time for vnc/spice protocols.
1991
1992Arguments:
1993
1994- "protocol": protocol name (json-string)
1995- "time": [ now | never | +secs | secs ] (json-string)
1996
1997Example:
1998
1999-> { "execute": "expire_password", "arguments": { "protocol": "vnc",
2000 "time": "+60" } }
2001<- { "return": {} }
2002
2003EQMP
2004
2005 {
Daniel P. Berrange13661082011-06-23 13:31:42 +01002006 .name = "add_client",
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00002007 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002008 .mhandler.cmd_new = qmp_marshal_add_client,
Daniel P. Berrange13661082011-06-23 13:31:42 +01002009 },
2010
2011SQMP
2012add_client
2013----------
2014
2015Add a graphics client
2016
2017Arguments:
2018
2019- "protocol": protocol name (json-string)
2020- "fdname": file descriptor name (json-string)
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00002021- "skipauth": whether to skip authentication (json-bool, optional)
2022- "tls": whether to perform TLS (json-bool, optional)
Daniel P. Berrange13661082011-06-23 13:31:42 +01002023
2024Example:
2025
2026-> { "execute": "add_client", "arguments": { "protocol": "vnc",
2027 "fdname": "myclient" } }
2028<- { "return": {} }
2029
2030EQMP
2031 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002032 .name = "qmp_capabilities",
2033 .args_type = "",
2034 .params = "",
2035 .help = "enable QMP capabilities",
Markus Armbruster485febc2015-03-13 17:25:50 +01002036 .mhandler.cmd_new = qmp_capabilities,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002037 },
2038
2039SQMP
2040qmp_capabilities
2041----------------
2042
2043Enable QMP capabilities.
2044
2045Arguments: None.
2046
2047Example:
2048
2049-> { "execute": "qmp_capabilities" }
2050<- { "return": {} }
2051
2052Note: This command must be issued before issuing any other command.
2053
Luiz Capitulino0268d972010-10-22 10:08:02 -02002054EQMP
2055
2056 {
2057 .name = "human-monitor-command",
2058 .args_type = "command-line:s,cpu-index:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002059 .mhandler.cmd_new = qmp_marshal_human_monitor_command,
Luiz Capitulino0268d972010-10-22 10:08:02 -02002060 },
2061
2062SQMP
2063human-monitor-command
2064---------------------
2065
2066Execute a Human Monitor command.
2067
2068Arguments:
2069
2070- command-line: the command name and its arguments, just like the
2071 Human Monitor's shell (json-string)
2072- cpu-index: select the CPU number to be used by commands which access CPU
2073 data, like 'info registers'. The Monitor selects CPU 0 if this
2074 argument is not provided (json-int, optional)
2075
2076Example:
2077
2078-> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
2079<- { "return": "kvm support: enabled\r\n" }
2080
2081Notes:
2082
2083(1) The Human Monitor is NOT an stable interface, this means that command
2084 names, arguments and responses can change or be removed at ANY time.
2085 Applications that rely on long term stability guarantees should NOT
2086 use this command
2087
2088(2) Limitations:
2089
2090 o This command is stateless, this means that commands that depend
2091 on state information (such as getfd) might not work
2092
2093 o Commands that prompt the user for data (eg. 'cont' when the block
2094 device is encrypted) don't currently work
2095
Luiz Capitulino82a56f02010-09-13 12:26:00 -030020963. Query Commands
2097=================
2098
2099HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
2100HXCOMM this! We will possibly move query commands definitions inside those
2101HXCOMM sections, just like regular commands.
2102
2103EQMP
2104
2105SQMP
2106query-version
2107-------------
2108
2109Show QEMU version.
2110
2111Return a json-object with the following information:
2112
2113- "qemu": A json-object containing three integer values:
2114 - "major": QEMU's major version (json-int)
2115 - "minor": QEMU's minor version (json-int)
2116 - "micro": QEMU's micro version (json-int)
2117- "package": package's version (json-string)
2118
2119Example:
2120
2121-> { "execute": "query-version" }
2122<- {
2123 "return":{
2124 "qemu":{
2125 "major":0,
2126 "minor":11,
2127 "micro":5
2128 },
2129 "package":""
2130 }
2131 }
2132
2133EQMP
2134
Luiz Capitulinob9c15f12011-08-26 17:38:13 -03002135 {
2136 .name = "query-version",
2137 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002138 .mhandler.cmd_new = qmp_marshal_query_version,
Luiz Capitulinob9c15f12011-08-26 17:38:13 -03002139 },
2140
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002141SQMP
2142query-commands
2143--------------
2144
2145List QMP available commands.
2146
2147Each command is represented by a json-object, the returned value is a json-array
2148of all commands.
2149
2150Each json-object contain:
2151
2152- "name": command's name (json-string)
2153
2154Example:
2155
2156-> { "execute": "query-commands" }
2157<- {
2158 "return":[
2159 {
2160 "name":"query-balloon"
2161 },
2162 {
2163 "name":"system_powerdown"
2164 }
2165 ]
2166 }
2167
2168Note: This example has been shortened as the real response is too long.
2169
2170EQMP
2171
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -03002172 {
2173 .name = "query-commands",
2174 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002175 .mhandler.cmd_new = qmp_marshal_query_commands,
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -03002176 },
2177
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002178SQMP
Daniel P. Berrange48608532012-05-21 17:59:51 +01002179query-events
2180--------------
2181
2182List QMP available events.
2183
2184Each event is represented by a json-object, the returned value is a json-array
2185of all events.
2186
2187Each json-object contains:
2188
2189- "name": event's name (json-string)
2190
2191Example:
2192
2193-> { "execute": "query-events" }
2194<- {
2195 "return":[
2196 {
2197 "name":"SHUTDOWN"
2198 },
2199 {
2200 "name":"RESET"
2201 }
2202 ]
2203 }
2204
2205Note: This example has been shortened as the real response is too long.
2206
2207EQMP
2208
2209 {
2210 .name = "query-events",
2211 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002212 .mhandler.cmd_new = qmp_marshal_query_events,
Daniel P. Berrange48608532012-05-21 17:59:51 +01002213 },
2214
2215SQMP
Markus Armbruster39a18152015-09-16 13:06:28 +02002216query-qmp-schema
2217----------------
2218
2219Return the QMP wire schema. The returned value is a json-array of
2220named schema entities. Entities are commands, events and various
2221types. See docs/qapi-code-gen.txt for information on their structure
2222and intended use.
2223
2224EQMP
2225
2226 {
2227 .name = "query-qmp-schema",
2228 .args_type = "",
2229 .mhandler.cmd_new = qmp_query_qmp_schema,
2230 },
2231
2232SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002233query-chardev
2234-------------
2235
2236Each device is represented by a json-object. The returned value is a json-array
2237of all devices.
2238
2239Each json-object contain the following:
2240
2241- "label": device's label (json-string)
2242- "filename": device's file (json-string)
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002243- "frontend-open": open/closed state of the frontend device attached to this
2244 backend (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002245
2246Example:
2247
2248-> { "execute": "query-chardev" }
2249<- {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002250 "return": [
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002251 {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002252 "label": "charchannel0",
2253 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2254 "frontend-open": false
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002255 },
2256 {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002257 "label": "charmonitor",
2258 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2259 "frontend-open": true
2260 },
2261 {
2262 "label": "charserial0",
2263 "filename": "pty:/dev/pts/2",
2264 "frontend-open": true
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002265 }
2266 ]
2267 }
2268
2269EQMP
2270
Luiz Capitulinoc5a415a2011-09-14 16:05:49 -03002271 {
2272 .name = "query-chardev",
2273 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002274 .mhandler.cmd_new = qmp_marshal_query_chardev,
Luiz Capitulinoc5a415a2011-09-14 16:05:49 -03002275 },
2276
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002277SQMP
Martin Kletzander77d1c3c2014-02-01 12:52:42 +01002278query-chardev-backends
2279-------------
2280
2281List available character device backends.
2282
2283Each backend is represented by a json-object, the returned value is a json-array
2284of all backends.
2285
2286Each json-object contains:
2287
2288- "name": backend name (json-string)
2289
2290Example:
2291
2292-> { "execute": "query-chardev-backends" }
2293<- {
2294 "return":[
2295 {
2296 "name":"udp"
2297 },
2298 {
2299 "name":"tcp"
2300 },
2301 {
2302 "name":"unix"
2303 },
2304 {
2305 "name":"spiceport"
2306 }
2307 ]
2308 }
2309
2310EQMP
2311
2312 {
2313 .name = "query-chardev-backends",
2314 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002315 .mhandler.cmd_new = qmp_marshal_query_chardev_backends,
Martin Kletzander77d1c3c2014-02-01 12:52:42 +01002316 },
2317
2318SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002319query-block
2320-----------
2321
2322Show the block devices.
2323
2324Each block device information is stored in a json-object and the returned value
2325is a json-array of all devices.
2326
2327Each json-object contain the following:
2328
2329- "device": device name (json-string)
2330- "type": device type (json-string)
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002331 - deprecated, retained for backward compatibility
2332 - Possible values: "unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002333- "removable": true if the device is removable, false otherwise (json-bool)
2334- "locked": true if the device is locked, false otherwise (json-bool)
Michal Privoznik99f42802013-01-29 17:58:41 +01002335- "tray_open": only present if removable, true if the device has a tray,
Markus Armbrustere4def802011-09-06 18:58:53 +02002336 and it is open (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002337- "inserted": only present if the device is inserted, it is a json-object
2338 containing the following:
2339 - "file": device file name (json-string)
2340 - "ro": true if read-only, false otherwise (json-bool)
2341 - "drv": driver format name (json-string)
Stefan Hajnoczi550830f2014-09-16 15:24:24 +01002342 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002343 "file", "file", "ftp", "ftps", "host_cdrom",
Markus Armbruster92a539d2015-03-17 17:02:20 +01002344 "host_device", "http", "https",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002345 "nbd", "parallels", "qcow", "qcow2", "raw",
2346 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2347 - "backing_file": backing file name (json-string, optional)
Benoît Canet2e3e3312012-08-02 10:22:48 +02002348 - "backing_file_depth": number of files in the backing file chain (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002349 - "encrypted": true if encrypted, false otherwise (json-bool)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002350 - "bps": limit total bytes per second (json-int)
2351 - "bps_rd": limit read bytes per second (json-int)
2352 - "bps_wr": limit write bytes per second (json-int)
2353 - "iops": limit total I/O operations per second (json-int)
2354 - "iops_rd": limit read operations per second (json-int)
2355 - "iops_wr": limit write operations per second (json-int)
Benoît Canet3e9fab62013-09-02 14:14:40 +02002356 - "bps_max": total max in bytes (json-int)
2357 - "bps_rd_max": read max in bytes (json-int)
2358 - "bps_wr_max": write max in bytes (json-int)
2359 - "iops_max": total I/O operations max (json-int)
2360 - "iops_rd_max": read I/O operations max (json-int)
2361 - "iops_wr_max": write I/O operations max (json-int)
Benoît Canet2024c1d2013-09-02 14:14:41 +02002362 - "iops_size": I/O size when limiting by iops (json-int)
Peter Lieven465bee12014-05-18 00:58:19 +02002363 - "detect_zeroes": detect and optimize zero writing (json-string)
2364 - Possible values: "off", "on", "unmap"
Francesco Romanie2462112015-01-12 14:11:13 +01002365 - "write_threshold": write offset threshold in bytes, a event will be
2366 emitted if crossed. Zero if disabled (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08002367 - "image": the detail of the image, it is a json-object containing
2368 the following:
2369 - "filename": image file name (json-string)
2370 - "format": image format (json-string)
2371 - "virtual-size": image capacity in bytes (json-int)
2372 - "dirty-flag": true if image is not cleanly closed, not present
2373 means clean (json-bool, optional)
2374 - "actual-size": actual size on disk in bytes of the image, not
2375 present when image does not support thin
2376 provision (json-int, optional)
2377 - "cluster-size": size of a cluster in bytes, not present if image
2378 format does not support it (json-int, optional)
2379 - "encrypted": true if the image is encrypted, not present means
2380 false or the image format does not support
2381 encryption (json-bool, optional)
2382 - "backing_file": backing file name, not present means no backing
2383 file is used or the image format does not
2384 support backing file chain
2385 (json-string, optional)
2386 - "full-backing-filename": full path of the backing file, not
2387 present if it equals backing_file or no
2388 backing file is used
2389 (json-string, optional)
2390 - "backing-filename-format": the format of the backing file, not
2391 present means unknown or no backing
2392 file (json-string, optional)
2393 - "snapshots": the internal snapshot info, it is an optional list
2394 of json-object containing the following:
2395 - "id": unique snapshot id (json-string)
2396 - "name": snapshot name (json-string)
2397 - "vm-state-size": size of the VM state in bytes (json-int)
2398 - "date-sec": UTC date of the snapshot in seconds (json-int)
2399 - "date-nsec": fractional part in nanoseconds to be used with
Eric Blake586b5462013-08-30 14:44:11 -06002400 date-sec (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08002401 - "vm-clock-sec": VM clock relative to boot in seconds
2402 (json-int)
2403 - "vm-clock-nsec": fractional part in nanoseconds to be used
2404 with vm-clock-sec (json-int)
2405 - "backing-image": the detail of the backing image, it is an
2406 optional json-object only present when a
2407 backing image present for this image
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002408
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002409- "io-status": I/O operation status, only present if the device supports it
2410 and the VM is configured to stop on errors. It's always reset
2411 to "ok" when the "cont" command is issued (json_string, optional)
2412 - Possible values: "ok", "failed", "nospace"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002413
2414Example:
2415
2416-> { "execute": "query-block" }
2417<- {
2418 "return":[
2419 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002420 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002421 "device":"ide0-hd0",
2422 "locked":false,
2423 "removable":false,
2424 "inserted":{
2425 "ro":false,
2426 "drv":"qcow2",
2427 "encrypted":false,
Wenchao Xia553a7e82013-06-06 12:27:59 +08002428 "file":"disks/test.qcow2",
2429 "backing_file_depth":1,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002430 "bps":1000000,
2431 "bps_rd":0,
2432 "bps_wr":0,
2433 "iops":1000000,
2434 "iops_rd":0,
2435 "iops_wr":0,
Benoît Canet3e9fab62013-09-02 14:14:40 +02002436 "bps_max": 8000000,
2437 "bps_rd_max": 0,
2438 "bps_wr_max": 0,
2439 "iops_max": 0,
2440 "iops_rd_max": 0,
2441 "iops_wr_max": 0,
Benoît Canet2024c1d2013-09-02 14:14:41 +02002442 "iops_size": 0,
Peter Lieven465bee12014-05-18 00:58:19 +02002443 "detect_zeroes": "on",
Francesco Romanie2462112015-01-12 14:11:13 +01002444 "write_threshold": 0,
Wenchao Xia553a7e82013-06-06 12:27:59 +08002445 "image":{
2446 "filename":"disks/test.qcow2",
2447 "format":"qcow2",
2448 "virtual-size":2048000,
2449 "backing_file":"base.qcow2",
2450 "full-backing-filename":"disks/base.qcow2",
John Snow54034322015-04-28 15:20:41 -04002451 "backing-filename-format":"qcow2",
Wenchao Xia553a7e82013-06-06 12:27:59 +08002452 "snapshots":[
2453 {
2454 "id": "1",
2455 "name": "snapshot1",
2456 "vm-state-size": 0,
2457 "date-sec": 10000200,
2458 "date-nsec": 12,
2459 "vm-clock-sec": 206,
2460 "vm-clock-nsec": 30
2461 }
2462 ],
2463 "backing-image":{
2464 "filename":"disks/base.qcow2",
2465 "format":"qcow2",
2466 "virtual-size":2048000
2467 }
2468 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002469 },
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002470 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002471 },
2472 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002473 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002474 "device":"ide1-cd0",
2475 "locked":false,
2476 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002477 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002478 },
2479 {
2480 "device":"floppy0",
2481 "locked":false,
2482 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002483 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002484 },
2485 {
2486 "device":"sd0",
2487 "locked":false,
2488 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002489 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002490 }
2491 ]
2492 }
2493
2494EQMP
2495
Luiz Capitulinob2023812011-09-21 17:16:47 -03002496 {
2497 .name = "query-block",
2498 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002499 .mhandler.cmd_new = qmp_marshal_query_block,
Luiz Capitulinob2023812011-09-21 17:16:47 -03002500 },
2501
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002502SQMP
2503query-blockstats
2504----------------
2505
2506Show block device statistics.
2507
2508Each device statistic information is stored in a json-object and the returned
2509value is a json-array of all devices.
2510
2511Each json-object contain the following:
2512
2513- "device": device name (json-string)
2514- "stats": A json-object with the statistics information, it contains:
2515 - "rd_bytes": bytes read (json-int)
2516 - "wr_bytes": bytes written (json-int)
2517 - "rd_operations": read operations (json-int)
2518 - "wr_operations": write operations (json-int)
Christoph Hellwige8045d62011-08-22 00:25:58 +02002519 - "flush_operations": cache flush operations (json-int)
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002520 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2521 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2522 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002523 - "wr_highest_offset": Highest offset of a sector written since the
2524 BlockDriverState has been opened (json-int)
Peter Lievenf4564d52015-02-02 14:52:18 +01002525 - "rd_merged": number of read requests that have been merged into
2526 another request (json-int)
2527 - "wr_merged": number of write requests that have been merged into
2528 another request (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002529- "parent": Contains recursively the statistics of the underlying
2530 protocol (e.g. the host file for a qcow2 image). If there is
2531 no underlying protocol, this field is omitted
2532 (json-object, optional)
2533
2534Example:
2535
2536-> { "execute": "query-blockstats" }
2537<- {
2538 "return":[
2539 {
2540 "device":"ide0-hd0",
2541 "parent":{
2542 "stats":{
2543 "wr_highest_offset":3686448128,
2544 "wr_bytes":9786368,
2545 "wr_operations":751,
2546 "rd_bytes":122567168,
2547 "rd_operations":36772
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002548 "wr_total_times_ns":313253456
2549 "rd_total_times_ns":3465673657
2550 "flush_total_times_ns":49653
Christoph Hellwige8045d62011-08-22 00:25:58 +02002551 "flush_operations":61,
Peter Lievenf4564d52015-02-02 14:52:18 +01002552 "rd_merged":0,
2553 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002554 }
2555 },
2556 "stats":{
2557 "wr_highest_offset":2821110784,
2558 "wr_bytes":9786368,
2559 "wr_operations":692,
2560 "rd_bytes":122739200,
2561 "rd_operations":36604
Christoph Hellwige8045d62011-08-22 00:25:58 +02002562 "flush_operations":51,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002563 "wr_total_times_ns":313253456
2564 "rd_total_times_ns":3465673657
Peter Lievenf4564d52015-02-02 14:52:18 +01002565 "flush_total_times_ns":49653,
2566 "rd_merged":0,
2567 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002568 }
2569 },
2570 {
2571 "device":"ide1-cd0",
2572 "stats":{
2573 "wr_highest_offset":0,
2574 "wr_bytes":0,
2575 "wr_operations":0,
2576 "rd_bytes":0,
2577 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002578 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002579 "wr_total_times_ns":0
2580 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002581 "flush_total_times_ns":0,
2582 "rd_merged":0,
2583 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002584 }
2585 },
2586 {
2587 "device":"floppy0",
2588 "stats":{
2589 "wr_highest_offset":0,
2590 "wr_bytes":0,
2591 "wr_operations":0,
2592 "rd_bytes":0,
2593 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002594 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002595 "wr_total_times_ns":0
2596 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002597 "flush_total_times_ns":0,
2598 "rd_merged":0,
2599 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002600 }
2601 },
2602 {
2603 "device":"sd0",
2604 "stats":{
2605 "wr_highest_offset":0,
2606 "wr_bytes":0,
2607 "wr_operations":0,
2608 "rd_bytes":0,
2609 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002610 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002611 "wr_total_times_ns":0
2612 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002613 "flush_total_times_ns":0,
2614 "rd_merged":0,
2615 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002616 }
2617 }
2618 ]
2619 }
2620
2621EQMP
2622
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03002623 {
2624 .name = "query-blockstats",
Fam Zhengf71eaa72014-10-31 11:32:57 +08002625 .args_type = "query-nodes:b?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002626 .mhandler.cmd_new = qmp_marshal_query_blockstats,
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03002627 },
2628
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002629SQMP
2630query-cpus
2631----------
2632
2633Show CPU information.
2634
2635Return a json-array. Each CPU is represented by a json-object, which contains:
2636
2637- "CPU": CPU index (json-int)
2638- "current": true if this is the current CPU, false otherwise (json-bool)
2639- "halted": true if the cpu is halted, false otherwise (json-bool)
Eduardo Habkost58f88d42015-05-08 16:04:22 -03002640- "qom_path": path to the CPU object in the QOM tree (json-str)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002641- Current program counter. The key's name depends on the architecture:
2642 "pc": i386/x86_64 (json-int)
2643 "nip": PPC (json-int)
2644 "pc" and "npc": sparc (json-int)
2645 "PC": mips (json-int)
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002646- "thread_id": ID of the underlying host thread (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002647
2648Example:
2649
2650-> { "execute": "query-cpus" }
2651<- {
2652 "return":[
2653 {
2654 "CPU":0,
2655 "current":true,
2656 "halted":false,
Eduardo Habkost58f88d42015-05-08 16:04:22 -03002657 "qom_path":"/machine/unattached/device[0]",
2658 "pc":3227107138,
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002659 "thread_id":3134
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002660 },
2661 {
2662 "CPU":1,
2663 "current":false,
2664 "halted":true,
Eduardo Habkost58f88d42015-05-08 16:04:22 -03002665 "qom_path":"/machine/unattached/device[2]",
2666 "pc":7108165,
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002667 "thread_id":3135
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002668 }
2669 ]
2670 }
2671
2672EQMP
2673
Luiz Capitulinode0b36b2011-09-21 16:38:35 -03002674 {
2675 .name = "query-cpus",
2676 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002677 .mhandler.cmd_new = qmp_marshal_query_cpus,
Luiz Capitulinode0b36b2011-09-21 16:38:35 -03002678 },
2679
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002680SQMP
Stefan Hajnoczidc3dd0d2014-02-27 11:48:42 +01002681query-iothreads
2682---------------
2683
2684Returns a list of information about each iothread.
2685
2686Note this list excludes the QEMU main loop thread, which is not declared
2687using the -object iothread command-line option. It is always the main thread
2688of the process.
2689
2690Return a json-array. Each iothread is represented by a json-object, which contains:
2691
2692- "id": name of iothread (json-str)
2693- "thread-id": ID of the underlying host thread (json-int)
2694
2695Example:
2696
2697-> { "execute": "query-iothreads" }
2698<- {
2699 "return":[
2700 {
2701 "id":"iothread0",
2702 "thread-id":3134
2703 },
2704 {
2705 "id":"iothread1",
2706 "thread-id":3135
2707 }
2708 ]
2709 }
2710
2711EQMP
2712
2713 {
2714 .name = "query-iothreads",
2715 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002716 .mhandler.cmd_new = qmp_marshal_query_iothreads,
Stefan Hajnoczidc3dd0d2014-02-27 11:48:42 +01002717 },
2718
2719SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002720query-pci
2721---------
2722
2723PCI buses and devices information.
2724
2725The returned value is a json-array of all buses. Each bus is represented by
2726a json-object, which has a key with a json-array of all PCI devices attached
2727to it. Each device is represented by a json-object.
2728
2729The bus json-object contains the following:
2730
2731- "bus": bus number (json-int)
2732- "devices": a json-array of json-objects, each json-object represents a
2733 PCI device
2734
2735The PCI device json-object contains the following:
2736
2737- "bus": identical to the parent's bus number (json-int)
2738- "slot": slot number (json-int)
2739- "function": function number (json-int)
2740- "class_info": a json-object containing:
2741 - "desc": device class description (json-string, optional)
2742 - "class": device class number (json-int)
2743- "id": a json-object containing:
2744 - "device": device ID (json-int)
2745 - "vendor": vendor ID (json-int)
2746- "irq": device's IRQ if assigned (json-int, optional)
2747- "qdev_id": qdev id string (json-string)
2748- "pci_bridge": It's a json-object, only present if this device is a
2749 PCI bridge, contains:
2750 - "bus": bus number (json-int)
2751 - "secondary": secondary bus number (json-int)
2752 - "subordinate": subordinate bus number (json-int)
2753 - "io_range": I/O memory range information, a json-object with the
2754 following members:
2755 - "base": base address, in bytes (json-int)
2756 - "limit": limit address, in bytes (json-int)
2757 - "memory_range": memory range information, a json-object with the
2758 following members:
2759 - "base": base address, in bytes (json-int)
2760 - "limit": limit address, in bytes (json-int)
2761 - "prefetchable_range": Prefetchable memory range information, a
2762 json-object with the following members:
2763 - "base": base address, in bytes (json-int)
2764 - "limit": limit address, in bytes (json-int)
2765 - "devices": a json-array of PCI devices if there's any attached, each
2766 each element is represented by a json-object, which contains
2767 the same members of the 'PCI device json-object' described
2768 above (optional)
2769- "regions": a json-array of json-objects, each json-object represents a
2770 memory region of this device
2771
2772The memory range json-object contains the following:
2773
2774- "base": base memory address (json-int)
2775- "limit": limit value (json-int)
2776
2777The region json-object can be an I/O region or a memory region, an I/O region
2778json-object contains the following:
2779
2780- "type": "io" (json-string, fixed)
2781- "bar": BAR number (json-int)
2782- "address": memory address (json-int)
2783- "size": memory size (json-int)
2784
2785A memory region json-object contains the following:
2786
2787- "type": "memory" (json-string, fixed)
2788- "bar": BAR number (json-int)
2789- "address": memory address (json-int)
2790- "size": memory size (json-int)
2791- "mem_type_64": true or false (json-bool)
2792- "prefetch": true or false (json-bool)
2793
2794Example:
2795
2796-> { "execute": "query-pci" }
2797<- {
2798 "return":[
2799 {
2800 "bus":0,
2801 "devices":[
2802 {
2803 "bus":0,
2804 "qdev_id":"",
2805 "slot":0,
2806 "class_info":{
2807 "class":1536,
2808 "desc":"Host bridge"
2809 },
2810 "id":{
2811 "device":32902,
2812 "vendor":4663
2813 },
2814 "function":0,
2815 "regions":[
2816
2817 ]
2818 },
2819 {
2820 "bus":0,
2821 "qdev_id":"",
2822 "slot":1,
2823 "class_info":{
2824 "class":1537,
2825 "desc":"ISA bridge"
2826 },
2827 "id":{
2828 "device":32902,
2829 "vendor":28672
2830 },
2831 "function":0,
2832 "regions":[
2833
2834 ]
2835 },
2836 {
2837 "bus":0,
2838 "qdev_id":"",
2839 "slot":1,
2840 "class_info":{
2841 "class":257,
2842 "desc":"IDE controller"
2843 },
2844 "id":{
2845 "device":32902,
2846 "vendor":28688
2847 },
2848 "function":1,
2849 "regions":[
2850 {
2851 "bar":4,
2852 "size":16,
2853 "address":49152,
2854 "type":"io"
2855 }
2856 ]
2857 },
2858 {
2859 "bus":0,
2860 "qdev_id":"",
2861 "slot":2,
2862 "class_info":{
2863 "class":768,
2864 "desc":"VGA controller"
2865 },
2866 "id":{
2867 "device":4115,
2868 "vendor":184
2869 },
2870 "function":0,
2871 "regions":[
2872 {
2873 "prefetch":true,
2874 "mem_type_64":false,
2875 "bar":0,
2876 "size":33554432,
2877 "address":4026531840,
2878 "type":"memory"
2879 },
2880 {
2881 "prefetch":false,
2882 "mem_type_64":false,
2883 "bar":1,
2884 "size":4096,
2885 "address":4060086272,
2886 "type":"memory"
2887 },
2888 {
2889 "prefetch":false,
2890 "mem_type_64":false,
2891 "bar":6,
2892 "size":65536,
2893 "address":-1,
2894 "type":"memory"
2895 }
2896 ]
2897 },
2898 {
2899 "bus":0,
2900 "qdev_id":"",
2901 "irq":11,
2902 "slot":4,
2903 "class_info":{
2904 "class":1280,
2905 "desc":"RAM controller"
2906 },
2907 "id":{
2908 "device":6900,
2909 "vendor":4098
2910 },
2911 "function":0,
2912 "regions":[
2913 {
2914 "bar":0,
2915 "size":32,
2916 "address":49280,
2917 "type":"io"
2918 }
2919 ]
2920 }
2921 ]
2922 }
2923 ]
2924 }
2925
2926Note: This example has been shortened as the real response is too long.
2927
2928EQMP
2929
Luiz Capitulino79627472011-10-21 14:15:33 -02002930 {
2931 .name = "query-pci",
2932 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002933 .mhandler.cmd_new = qmp_marshal_query_pci,
Luiz Capitulino79627472011-10-21 14:15:33 -02002934 },
2935
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002936SQMP
2937query-kvm
2938---------
2939
2940Show KVM information.
2941
2942Return a json-object with the following information:
2943
2944- "enabled": true if KVM support is enabled, false otherwise (json-bool)
2945- "present": true if QEMU has KVM support, false otherwise (json-bool)
2946
2947Example:
2948
2949-> { "execute": "query-kvm" }
2950<- { "return": { "enabled": true, "present": true } }
2951
2952EQMP
2953
Luiz Capitulino292a2602011-09-12 15:10:53 -03002954 {
2955 .name = "query-kvm",
2956 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002957 .mhandler.cmd_new = qmp_marshal_query_kvm,
Luiz Capitulino292a2602011-09-12 15:10:53 -03002958 },
2959
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002960SQMP
2961query-status
2962------------
2963
2964Return a json-object with the following information:
2965
2966- "running": true if the VM is running, or false if it is paused (json-bool)
2967- "singlestep": true if the VM is in single step mode,
2968 false otherwise (json-bool)
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002969- "status": one of the following values (json-string)
2970 "debug" - QEMU is running on a debugger
2971 "inmigrate" - guest is paused waiting for an incoming migration
2972 "internal-error" - An internal error that prevents further guest
2973 execution has occurred
2974 "io-error" - the last IOP has failed and the device is configured
2975 to pause on I/O errors
2976 "paused" - guest has been paused via the 'stop' command
2977 "postmigrate" - guest is paused following a successful 'migrate'
2978 "prelaunch" - QEMU was started with -S and guest has not started
2979 "finish-migrate" - guest is paused to finish the migration process
2980 "restore-vm" - guest is paused to restore VM state
2981 "running" - guest is actively running
2982 "save-vm" - guest is paused to save the VM state
2983 "shutdown" - guest is shut down (and -no-shutdown is in use)
2984 "watchdog" - the watchdog action is configured to pause and
2985 has been triggered
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002986
2987Example:
2988
2989-> { "execute": "query-status" }
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002990<- { "return": { "running": true, "singlestep": false, "status": "running" } }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002991
2992EQMP
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -03002993
2994 {
2995 .name = "query-status",
2996 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02002997 .mhandler.cmd_new = qmp_marshal_query_status,
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -03002998 },
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002999
3000SQMP
3001query-mice
3002----------
3003
3004Show VM mice information.
3005
3006Each mouse is represented by a json-object, the returned value is a json-array
3007of all mice.
3008
3009The mouse json-object contains the following:
3010
3011- "name": mouse's name (json-string)
3012- "index": mouse's index (json-int)
3013- "current": true if this mouse is receiving events, false otherwise (json-bool)
3014- "absolute": true if the mouse generates absolute input events (json-bool)
3015
3016Example:
3017
3018-> { "execute": "query-mice" }
3019<- {
3020 "return":[
3021 {
3022 "name":"QEMU Microsoft Mouse",
3023 "index":0,
3024 "current":false,
3025 "absolute":false
3026 },
3027 {
3028 "name":"QEMU PS/2 Mouse",
3029 "index":1,
3030 "current":true,
3031 "absolute":true
3032 }
3033 ]
3034 }
3035
3036EQMP
3037
Luiz Capitulinoe235cec2011-09-21 15:29:55 -03003038 {
3039 .name = "query-mice",
3040 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003041 .mhandler.cmd_new = qmp_marshal_query_mice,
Luiz Capitulinoe235cec2011-09-21 15:29:55 -03003042 },
3043
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003044SQMP
3045query-vnc
3046---------
3047
3048Show VNC server information.
3049
3050Return a json-object with server information. Connected clients are returned
3051as a json-array of json-objects.
3052
3053The main json-object contains the following:
3054
3055- "enabled": true or false (json-bool)
3056- "host": server's IP address (json-string)
3057- "family": address family (json-string)
3058 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3059- "service": server's port number (json-string)
3060- "auth": authentication method (json-string)
3061 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
3062 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
3063 "vencrypt+plain", "vencrypt+tls+none",
3064 "vencrypt+tls+plain", "vencrypt+tls+sasl",
3065 "vencrypt+tls+vnc", "vencrypt+x509+none",
3066 "vencrypt+x509+plain", "vencrypt+x509+sasl",
3067 "vencrypt+x509+vnc", "vnc"
3068- "clients": a json-array of all connected clients
3069
3070Clients are described by a json-object, each one contain the following:
3071
3072- "host": client's IP address (json-string)
3073- "family": address family (json-string)
3074 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3075- "service": client's port number (json-string)
3076- "x509_dname": TLS dname (json-string, optional)
3077- "sasl_username": SASL username (json-string, optional)
3078
3079Example:
3080
3081-> { "execute": "query-vnc" }
3082<- {
3083 "return":{
3084 "enabled":true,
3085 "host":"0.0.0.0",
3086 "service":"50402",
3087 "auth":"vnc",
3088 "family":"ipv4",
3089 "clients":[
3090 {
3091 "host":"127.0.0.1",
3092 "service":"50401",
3093 "family":"ipv4"
3094 }
3095 ]
3096 }
3097 }
3098
3099EQMP
3100
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02003101 {
3102 .name = "query-vnc",
3103 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003104 .mhandler.cmd_new = qmp_marshal_query_vnc,
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02003105 },
Gerd Hoffmanndf887682014-12-17 15:49:44 +01003106 {
3107 .name = "query-vnc-servers",
3108 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003109 .mhandler.cmd_new = qmp_marshal_query_vnc_servers,
Gerd Hoffmanndf887682014-12-17 15:49:44 +01003110 },
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02003111
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003112SQMP
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01003113query-spice
3114-----------
3115
3116Show SPICE server information.
3117
3118Return a json-object with server information. Connected clients are returned
3119as a json-array of json-objects.
3120
3121The main json-object contains the following:
3122
3123- "enabled": true or false (json-bool)
3124- "host": server's IP address (json-string)
3125- "port": server's port number (json-int, optional)
3126- "tls-port": server's port number (json-int, optional)
3127- "auth": authentication method (json-string)
3128 - Possible values: "none", "spice"
3129- "channels": a json-array of all active channels clients
3130
3131Channels are described by a json-object, each one contain the following:
3132
3133- "host": client's IP address (json-string)
3134- "family": address family (json-string)
3135 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3136- "port": client's port number (json-string)
3137- "connection-id": spice connection id. All channels with the same id
3138 belong to the same spice session (json-int)
3139- "channel-type": channel type. "1" is the main control channel, filter for
3140 this one if you want track spice sessions only (json-int)
3141- "channel-id": channel id. Usually "0", might be different needed when
3142 multiple channels of the same type exist, such as multiple
3143 display channels in a multihead setup (json-int)
Alberto Garcia3599d462015-02-26 16:35:07 +02003144- "tls": whether the channel is encrypted (json-bool)
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01003145
3146Example:
3147
3148-> { "execute": "query-spice" }
3149<- {
3150 "return": {
3151 "enabled": true,
3152 "auth": "spice",
3153 "port": 5920,
3154 "tls-port": 5921,
3155 "host": "0.0.0.0",
3156 "channels": [
3157 {
3158 "port": "54924",
3159 "family": "ipv4",
3160 "channel-type": 1,
3161 "connection-id": 1804289383,
3162 "host": "127.0.0.1",
3163 "channel-id": 0,
3164 "tls": true
3165 },
3166 {
3167 "port": "36710",
3168 "family": "ipv4",
3169 "channel-type": 4,
3170 "connection-id": 1804289383,
3171 "host": "127.0.0.1",
3172 "channel-id": 0,
3173 "tls": false
3174 },
3175 [ ... more channels follow ... ]
3176 ]
3177 }
3178 }
3179
3180EQMP
3181
Luiz Capitulinod1f29642011-10-20 17:01:33 -02003182#if defined(CONFIG_SPICE)
3183 {
3184 .name = "query-spice",
3185 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003186 .mhandler.cmd_new = qmp_marshal_query_spice,
Luiz Capitulinod1f29642011-10-20 17:01:33 -02003187 },
3188#endif
3189
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01003190SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003191query-name
3192----------
3193
3194Show VM name.
3195
3196Return a json-object with the following information:
3197
3198- "name": VM's name (json-string, optional)
3199
3200Example:
3201
3202-> { "execute": "query-name" }
3203<- { "return": { "name": "qemu-name" } }
3204
3205EQMP
3206
Anthony Liguori48a32be2011-09-02 12:34:48 -05003207 {
3208 .name = "query-name",
3209 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003210 .mhandler.cmd_new = qmp_marshal_query_name,
Anthony Liguori48a32be2011-09-02 12:34:48 -05003211 },
3212
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003213SQMP
3214query-uuid
3215----------
3216
3217Show VM UUID.
3218
3219Return a json-object with the following information:
3220
3221- "UUID": Universally Unique Identifier (json-string)
3222
3223Example:
3224
3225-> { "execute": "query-uuid" }
3226<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3227
3228EQMP
3229
Luiz Capitulinoefab7672011-09-13 17:16:25 -03003230 {
3231 .name = "query-uuid",
3232 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003233 .mhandler.cmd_new = qmp_marshal_query_uuid,
Luiz Capitulinoefab7672011-09-13 17:16:25 -03003234 },
3235
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003236SQMP
Amos Kong1f8f9872013-04-25 17:50:35 +08003237query-command-line-options
3238--------------------------
3239
3240Show command line option schema.
3241
3242Return a json-array of command line option schema for all options (or for
3243the given option), returning an error if the given option doesn't exist.
3244
3245Each array entry contains the following:
3246
3247- "option": option name (json-string)
3248- "parameters": a json-array describes all parameters of the option:
3249 - "name": parameter name (json-string)
3250 - "type": parameter type (one of 'string', 'boolean', 'number',
3251 or 'size')
3252 - "help": human readable description of the parameter
3253 (json-string, optional)
Chunyan Liue36af942014-06-05 17:20:43 +08003254 - "default": default value string for the parameter
3255 (json-string, optional)
Amos Kong1f8f9872013-04-25 17:50:35 +08003256
3257Example:
3258
3259-> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3260<- { "return": [
3261 {
3262 "parameters": [
3263 {
3264 "name": "romfile",
3265 "type": "string"
3266 },
3267 {
3268 "name": "bootindex",
3269 "type": "number"
3270 }
3271 ],
3272 "option": "option-rom"
3273 }
3274 ]
3275 }
3276
3277EQMP
3278
3279 {
3280 .name = "query-command-line-options",
3281 .args_type = "option:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003282 .mhandler.cmd_new = qmp_marshal_query_command_line_options,
Amos Kong1f8f9872013-04-25 17:50:35 +08003283 },
3284
3285SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003286query-migrate
3287-------------
3288
3289Migration status.
3290
3291Return a json-object. If migration is active there will be another json-object
3292with RAM migration status and if block migration is active another one with
3293block migration status.
3294
3295The main json-object contains the following:
3296
3297- "status": migration status (json-string)
Peter Feiner3b695952014-05-16 10:40:47 -04003298 - Possible values: "setup", "active", "completed", "failed", "cancelled"
Juan Quintela7aa939a2012-08-18 13:17:10 +02003299- "total-time": total amount of ms since migration started. If
3300 migration has ended, it returns the total migration
Juan Quintela817c6042013-02-11 15:11:10 +01003301 time (json-int)
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003302- "setup-time" amount of setup time in milliseconds _before_ the
3303 iterations begin but _after_ the QMP command is issued.
3304 This is designed to provide an accounting of any activities
3305 (such as RDMA pinning) which may be expensive, but do not
3306 actually occur during the iterative migration rounds
3307 themselves. (json-int)
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02003308- "downtime": only present when migration has finished correctly
3309 total amount in ms for downtime that happened (json-int)
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003310- "expected-downtime": only present while migration is active
3311 total amount in ms for downtime that was calculated on
Juan Quintela817c6042013-02-11 15:11:10 +01003312 the last bitmap round (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003313- "ram": only present if "status" is "active", it is a json-object with the
Juan Quintela817c6042013-02-11 15:11:10 +01003314 following RAM information:
3315 - "transferred": amount transferred in bytes (json-int)
3316 - "remaining": amount remaining to transfer in bytes (json-int)
3317 - "total": total amount of memory in bytes (json-int)
3318 - "duplicate": number of pages filled entirely with the same
3319 byte (json-int)
3320 These are sent over the wire much more efficiently.
Peter Lievenf1c72792013-03-26 10:58:37 +01003321 - "skipped": number of skipped zero pages (json-int)
Stefan Weil805a2502013-04-28 11:49:57 +02003322 - "normal" : number of whole pages transferred. I.e. they
Juan Quintela817c6042013-02-11 15:11:10 +01003323 were not sent as duplicate or xbzrle pages (json-int)
3324 - "normal-bytes" : number of bytes transferred in whole
3325 pages. This is just normal pages times size of one page,
3326 but this way upper levels don't need to care about page
3327 size (json-int)
ChenLiang58570ed2014-04-04 17:57:55 +08003328 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003329- "disk": only present if "status" is "active" and it is a block migration,
Juan Quintela817c6042013-02-11 15:11:10 +01003330 it is a json-object with the following disk information:
3331 - "transferred": amount transferred in bytes (json-int)
3332 - "remaining": amount remaining to transfer in bytes json-int)
3333 - "total": total disk size in bytes (json-int)
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003334- "xbzrle-cache": only present if XBZRLE is active.
3335 It is a json-object with the following XBZRLE information:
Juan Quintela817c6042013-02-11 15:11:10 +01003336 - "cache-size": XBZRLE cache size in bytes
3337 - "bytes": number of bytes transferred for XBZRLE compressed pages
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003338 - "pages": number of XBZRLE compressed pages
Juan Quintela817c6042013-02-11 15:11:10 +01003339 - "cache-miss": number of XBRZRLE page cache misses
ChenLiang8bc39232014-04-04 17:57:56 +08003340 - "cache-miss-rate": rate of XBRZRLE page cache misses
Juan Quintela817c6042013-02-11 15:11:10 +01003341 - "overflow": number of times XBZRLE overflows. This means
3342 that the XBZRLE encoding was bigger than just sent the
3343 whole page, and then we sent the whole page instead (as as
3344 normal page).
3345
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003346Examples:
3347
33481. Before the first migration
3349
3350-> { "execute": "query-migrate" }
3351<- { "return": {} }
3352
33532. Migration is done and has succeeded
3354
3355-> { "execute": "query-migrate" }
Orit Wasserman004d4c12012-08-06 21:42:56 +03003356<- { "return": {
3357 "status": "completed",
3358 "ram":{
3359 "transferred":123,
3360 "remaining":123,
3361 "total":246,
3362 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003363 "setup-time":12345,
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02003364 "downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003365 "duplicate":123,
3366 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003367 "normal-bytes":123456,
3368 "dirty-sync-count":15
Orit Wasserman004d4c12012-08-06 21:42:56 +03003369 }
3370 }
3371 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003372
33733. Migration is done and has failed
3374
3375-> { "execute": "query-migrate" }
3376<- { "return": { "status": "failed" } }
3377
33784. Migration is being performed and is not a block migration:
3379
3380-> { "execute": "query-migrate" }
3381<- {
3382 "return":{
3383 "status":"active",
3384 "ram":{
3385 "transferred":123,
3386 "remaining":123,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03003387 "total":246,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003388 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003389 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003390 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003391 "duplicate":123,
3392 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003393 "normal-bytes":123456,
3394 "dirty-sync-count":15
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003395 }
3396 }
3397 }
3398
33995. Migration is being performed and is a block migration:
3400
3401-> { "execute": "query-migrate" }
3402<- {
3403 "return":{
3404 "status":"active",
3405 "ram":{
3406 "total":1057024,
3407 "remaining":1053304,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03003408 "transferred":3720,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003409 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003410 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003411 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003412 "duplicate":123,
3413 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003414 "normal-bytes":123456,
3415 "dirty-sync-count":15
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003416 },
3417 "disk":{
3418 "total":20971520,
3419 "remaining":20880384,
3420 "transferred":91136
3421 }
3422 }
3423 }
3424
Orit Wassermanf36d55a2012-08-06 21:42:57 +030034256. Migration is being performed and XBZRLE is active:
3426
3427-> { "execute": "query-migrate" }
3428<- {
3429 "return":{
3430 "status":"active",
3431 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3432 "ram":{
3433 "total":1057024,
3434 "remaining":1053304,
3435 "transferred":3720,
3436 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003437 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003438 "expected-downtime":12345,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003439 "duplicate":10,
3440 "normal":3333,
ChenLiang58570ed2014-04-04 17:57:55 +08003441 "normal-bytes":3412992,
3442 "dirty-sync-count":15
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003443 },
3444 "xbzrle-cache":{
3445 "cache-size":67108864,
3446 "bytes":20971520,
3447 "pages":2444343,
3448 "cache-miss":2244,
ChenLiang8bc39232014-04-04 17:57:56 +08003449 "cache-miss-rate":0.123,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003450 "overflow":34434
3451 }
3452 }
3453 }
3454
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003455EQMP
3456
Luiz Capitulino791e7c82011-09-13 17:37:16 -03003457 {
3458 .name = "query-migrate",
3459 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003460 .mhandler.cmd_new = qmp_marshal_query_migrate,
Luiz Capitulino791e7c82011-09-13 17:37:16 -03003461 },
3462
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003463SQMP
Orit Wasserman00458432012-08-06 21:42:48 +03003464migrate-set-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01003465------------------------
Orit Wasserman00458432012-08-06 21:42:48 +03003466
3467Enable/Disable migration capabilities
3468
Juan Quintela817c6042013-02-11 15:11:10 +01003469- "xbzrle": XBZRLE support
zhanghailiangd6d69732014-12-09 14:38:37 +08003470- "rdma-pin-all": pin all pages when using RDMA during migration
3471- "auto-converge": throttle down guest to help convergence of migration
3472- "zero-blocks": compress zero blocks during block migration
Juan Quintela72e72e12015-07-08 14:13:10 +02003473- "events": generate events for each migration state change
Orit Wasserman00458432012-08-06 21:42:48 +03003474
3475Arguments:
3476
3477Example:
3478
3479-> { "execute": "migrate-set-capabilities" , "arguments":
3480 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3481
3482EQMP
3483
3484 {
3485 .name = "migrate-set-capabilities",
Paolo Bonzini43d0a2c2015-04-15 13:30:04 +02003486 .args_type = "capabilities:q",
Orit Wasserman00458432012-08-06 21:42:48 +03003487 .params = "capability:s,state:b",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003488 .mhandler.cmd_new = qmp_marshal_migrate_set_capabilities,
Orit Wasserman00458432012-08-06 21:42:48 +03003489 },
3490SQMP
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003491query-migrate-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01003492--------------------------
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003493
3494Query current migration capabilities
3495
3496- "capabilities": migration capabilities state
3497 - "xbzrle" : XBZRLE state (json-bool)
zhanghailiangd6d69732014-12-09 14:38:37 +08003498 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3499 - "auto-converge" : Auto Converge state (json-bool)
3500 - "zero-blocks" : Zero Blocks state (json-bool)
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003501
3502Arguments:
3503
3504Example:
3505
3506-> { "execute": "query-migrate-capabilities" }
Orit Wassermandbca1b32013-01-31 09:12:17 +02003507<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3508
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003509EQMP
3510
3511 {
3512 .name = "query-migrate-capabilities",
3513 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003514 .mhandler.cmd_new = qmp_marshal_query_migrate_capabilities,
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003515 },
3516
3517SQMP
Liang Li85de8322015-03-23 16:32:28 +08003518migrate-set-parameters
3519----------------------
3520
3521Set migration parameters
3522
3523- "compress-level": set compression level during migration (json-int)
3524- "compress-threads": set compression thread count for migration (json-int)
3525- "decompress-threads": set decompression thread count for migration (json-int)
3526
3527Arguments:
3528
3529Example:
3530
3531-> { "execute": "migrate-set-parameters" , "arguments":
3532 { "compress-level": 1 } }
3533
3534EQMP
3535
3536 {
3537 .name = "migrate-set-parameters",
3538 .args_type =
3539 "compress-level:i?,compress-threads:i?,decompress-threads:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003540 .mhandler.cmd_new = qmp_marshal_migrate_set_parameters,
Liang Li85de8322015-03-23 16:32:28 +08003541 },
3542SQMP
3543query-migrate-parameters
3544------------------------
3545
3546Query current migration parameters
3547
3548- "parameters": migration parameters value
3549 - "compress-level" : compression level value (json-int)
3550 - "compress-threads" : compression thread count value (json-int)
3551 - "decompress-threads" : decompression thread count value (json-int)
3552
3553Arguments:
3554
3555Example:
3556
3557-> { "execute": "query-migrate-parameters" }
3558<- {
3559 "return": {
3560 "decompress-threads", 2,
3561 "compress-threads", 8,
3562 "compress-level", 1
3563 }
3564 }
3565
3566EQMP
3567
3568 {
3569 .name = "query-migrate-parameters",
3570 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003571 .mhandler.cmd_new = qmp_marshal_query_migrate_parameters,
Liang Li85de8322015-03-23 16:32:28 +08003572 },
3573
3574SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003575query-balloon
3576-------------
3577
3578Show balloon information.
3579
3580Make an asynchronous request for balloon info. When the request completes a
3581json-object will be returned containing the following data:
3582
3583- "actual": current balloon value in bytes (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003584
3585Example:
3586
3587-> { "execute": "query-balloon" }
3588<- {
3589 "return":{
3590 "actual":1073741824,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003591 }
3592 }
3593
3594EQMP
3595
Luiz Capitulino96637bc2011-10-21 11:41:37 -02003596 {
3597 .name = "query-balloon",
3598 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003599 .mhandler.cmd_new = qmp_marshal_query_balloon,
Luiz Capitulino96637bc2011-10-21 11:41:37 -02003600 },
Anthony Liguorib4b12c62011-12-12 14:29:34 -06003601
3602 {
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00003603 .name = "query-block-jobs",
3604 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003605 .mhandler.cmd_new = qmp_marshal_query_block_jobs,
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00003606 },
3607
3608 {
Anthony Liguorib4b12c62011-12-12 14:29:34 -06003609 .name = "qom-list",
3610 .args_type = "path:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003611 .mhandler.cmd_new = qmp_marshal_qom_list,
Anthony Liguorib4b12c62011-12-12 14:29:34 -06003612 },
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06003613
3614 {
3615 .name = "qom-set",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01003616 .args_type = "path:s,property:s,value:q",
Markus Armbruster6eb39372015-09-16 13:06:25 +02003617 .mhandler.cmd_new = qmp_marshal_qom_set,
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06003618 },
3619
3620 {
3621 .name = "qom-get",
3622 .args_type = "path:s,property:s",
Markus Armbruster6eb39372015-09-16 13:06:25 +02003623 .mhandler.cmd_new = qmp_marshal_qom_get,
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06003624 },
Luiz Capitulino270b2432011-12-08 11:45:55 -02003625
3626 {
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02003627 .name = "nbd-server-start",
3628 .args_type = "addr:q",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003629 .mhandler.cmd_new = qmp_marshal_nbd_server_start,
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02003630 },
3631 {
3632 .name = "nbd-server-add",
3633 .args_type = "device:B,writable:b?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003634 .mhandler.cmd_new = qmp_marshal_nbd_server_add,
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02003635 },
3636 {
3637 .name = "nbd-server-stop",
3638 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003639 .mhandler.cmd_new = qmp_marshal_nbd_server_stop,
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02003640 },
3641
3642 {
Luiz Capitulino270b2432011-12-08 11:45:55 -02003643 .name = "change-vnc-password",
3644 .args_type = "password:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003645 .mhandler.cmd_new = qmp_marshal_change_vnc_password,
Luiz Capitulino270b2432011-12-08 11:45:55 -02003646 },
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06003647 {
3648 .name = "qom-list-types",
3649 .args_type = "implements:s?,abstract:b?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003650 .mhandler.cmd_new = qmp_marshal_qom_list_types,
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06003651 },
Anthony Liguori1daa31b2012-08-10 11:04:09 -05003652
3653 {
3654 .name = "device-list-properties",
3655 .args_type = "typename:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003656 .mhandler.cmd_new = qmp_marshal_device_list_properties,
Anthony Liguori1daa31b2012-08-10 11:04:09 -05003657 },
3658
Anthony Liguori01d3c802012-08-10 11:04:11 -05003659 {
3660 .name = "query-machines",
3661 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003662 .mhandler.cmd_new = qmp_marshal_query_machines,
Anthony Liguori01d3c802012-08-10 11:04:11 -05003663 },
3664
Anthony Liguorie4e31c62012-08-10 11:04:13 -05003665 {
3666 .name = "query-cpu-definitions",
3667 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003668 .mhandler.cmd_new = qmp_marshal_query_cpu_definitions,
Anthony Liguorie4e31c62012-08-10 11:04:13 -05003669 },
3670
Daniel P. Berrange99afc912012-08-20 15:31:38 +01003671 {
3672 .name = "query-target",
3673 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003674 .mhandler.cmd_new = qmp_marshal_query_target,
Daniel P. Berrange99afc912012-08-20 15:31:38 +01003675 },
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003676
3677 {
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003678 .name = "query-tpm",
3679 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003680 .mhandler.cmd_new = qmp_marshal_query_tpm,
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003681 },
3682
Corey Bryant28c4fa32013-03-20 12:34:49 -04003683SQMP
3684query-tpm
3685---------
3686
3687Return information about the TPM device.
3688
3689Arguments: None
3690
3691Example:
3692
3693-> { "execute": "query-tpm" }
3694<- { "return":
3695 [
3696 { "model": "tpm-tis",
3697 "options":
3698 { "type": "passthrough",
3699 "data":
3700 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3701 "path": "/dev/tpm0"
3702 }
3703 },
3704 "id": "tpm0"
3705 }
3706 ]
3707 }
3708
3709EQMP
3710
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003711 {
3712 .name = "query-tpm-models",
3713 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003714 .mhandler.cmd_new = qmp_marshal_query_tpm_models,
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003715 },
3716
Corey Bryant28c4fa32013-03-20 12:34:49 -04003717SQMP
3718query-tpm-models
3719----------------
3720
3721Return a list of supported TPM models.
3722
3723Arguments: None
3724
3725Example:
3726
3727-> { "execute": "query-tpm-models" }
3728<- { "return": [ "tpm-tis" ] }
3729
3730EQMP
3731
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003732 {
3733 .name = "query-tpm-types",
3734 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003735 .mhandler.cmd_new = qmp_marshal_query_tpm_types,
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003736 },
3737
Corey Bryant28c4fa32013-03-20 12:34:49 -04003738SQMP
3739query-tpm-types
3740---------------
3741
3742Return a list of supported TPM types.
3743
3744Arguments: None
3745
3746Example:
3747
3748-> { "execute": "query-tpm-types" }
3749<- { "return": [ "passthrough" ] }
3750
3751EQMP
3752
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003753 {
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003754 .name = "chardev-add",
3755 .args_type = "id:s,backend:q",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003756 .mhandler.cmd_new = qmp_marshal_chardev_add,
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003757 },
3758
3759SQMP
3760chardev-add
3761----------------
3762
3763Add a chardev.
3764
3765Arguments:
3766
3767- "id": the chardev's ID, must be unique (json-string)
3768- "backend": chardev backend type + parameters
3769
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003770Examples:
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003771
3772-> { "execute" : "chardev-add",
3773 "arguments" : { "id" : "foo",
3774 "backend" : { "type" : "null", "data" : {} } } }
3775<- { "return": {} }
3776
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003777-> { "execute" : "chardev-add",
3778 "arguments" : { "id" : "bar",
3779 "backend" : { "type" : "file",
3780 "data" : { "out" : "/tmp/bar.log" } } } }
3781<- { "return": {} }
3782
Gerd Hoffmann0a1a7fa2012-12-20 14:39:13 +01003783-> { "execute" : "chardev-add",
3784 "arguments" : { "id" : "baz",
3785 "backend" : { "type" : "pty", "data" : {} } } }
3786<- { "return": { "pty" : "/dev/pty/42" } }
3787
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003788EQMP
3789
3790 {
3791 .name = "chardev-remove",
3792 .args_type = "id:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003793 .mhandler.cmd_new = qmp_marshal_chardev_remove,
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003794 },
3795
3796
3797SQMP
3798chardev-remove
3799--------------
3800
3801Remove a chardev.
3802
3803Arguments:
3804
3805- "id": the chardev's ID, must exist and not be in use (json-string)
3806
3807Example:
3808
3809-> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3810<- { "return": {} }
3811
3812EQMP
Amos Kongb1be4282013-06-14 15:45:52 +08003813 {
3814 .name = "query-rx-filter",
3815 .args_type = "name:s?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003816 .mhandler.cmd_new = qmp_marshal_query_rx_filter,
Amos Kongb1be4282013-06-14 15:45:52 +08003817 },
3818
3819SQMP
3820query-rx-filter
3821---------------
3822
3823Show rx-filter information.
3824
3825Returns a json-array of rx-filter information for all NICs (or for the
3826given NIC), returning an error if the given NIC doesn't exist, or
3827given NIC doesn't support rx-filter querying, or given net client
3828isn't a NIC.
3829
3830The query will clear the event notification flag of each NIC, then qemu
3831will start to emit event to QMP monitor.
3832
3833Each array entry contains the following:
3834
3835- "name": net client name (json-string)
3836- "promiscuous": promiscuous mode is enabled (json-bool)
3837- "multicast": multicast receive state (one of 'normal', 'none', 'all')
3838- "unicast": unicast receive state (one of 'normal', 'none', 'all')
Amos Kongf7bc8ef2014-03-26 08:19:43 +08003839- "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
Amos Kongb1be4282013-06-14 15:45:52 +08003840- "broadcast-allowed": allow to receive broadcast (json-bool)
3841- "multicast-overflow": multicast table is overflowed (json-bool)
3842- "unicast-overflow": unicast table is overflowed (json-bool)
3843- "main-mac": main macaddr string (json-string)
3844- "vlan-table": a json-array of active vlan id
3845- "unicast-table": a json-array of unicast macaddr string
3846- "multicast-table": a json-array of multicast macaddr string
3847
3848Example:
3849
3850-> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
3851<- { "return": [
3852 {
3853 "promiscuous": true,
3854 "name": "vnet0",
3855 "main-mac": "52:54:00:12:34:56",
3856 "unicast": "normal",
Amos Kongf7bc8ef2014-03-26 08:19:43 +08003857 "vlan": "normal",
Amos Kongb1be4282013-06-14 15:45:52 +08003858 "vlan-table": [
3859 4,
3860 0
3861 ],
3862 "unicast-table": [
3863 ],
3864 "multicast": "normal",
3865 "multicast-overflow": false,
3866 "unicast-overflow": false,
3867 "multicast-table": [
3868 "01:00:5e:00:00:01",
3869 "33:33:00:00:00:01",
3870 "33:33:ff:12:34:56"
3871 ],
3872 "broadcast-allowed": false
3873 }
3874 ]
3875 }
3876
3877EQMP
Kevin Wolfd26c9a12013-09-23 15:26:03 +02003878
3879 {
3880 .name = "blockdev-add",
3881 .args_type = "options:q",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003882 .mhandler.cmd_new = qmp_marshal_blockdev_add,
Kevin Wolfd26c9a12013-09-23 15:26:03 +02003883 },
3884
3885SQMP
3886blockdev-add
3887------------
3888
3889Add a block device.
3890
Markus Armbrusterda2cf4e2015-03-20 14:32:17 +01003891This command is still a work in progress. It doesn't support all
3892block drivers, it lacks a matching blockdev-del, and more. Stay away
3893from it unless you want to help with its development.
3894
Kevin Wolfd26c9a12013-09-23 15:26:03 +02003895Arguments:
3896
3897- "options": block driver options
3898
3899Example (1):
3900
3901-> { "execute": "blockdev-add",
3902 "arguments": { "options" : { "driver": "qcow2",
3903 "file": { "driver": "file",
3904 "filename": "test.qcow2" } } } }
3905<- { "return": {} }
3906
3907Example (2):
3908
3909-> { "execute": "blockdev-add",
3910 "arguments": {
3911 "options": {
3912 "driver": "qcow2",
3913 "id": "my_disk",
3914 "discard": "unmap",
3915 "cache": {
3916 "direct": true,
3917 "writeback": true
3918 },
3919 "file": {
3920 "driver": "file",
3921 "filename": "/tmp/test.qcow2"
3922 },
3923 "backing": {
3924 "driver": "raw",
3925 "file": {
3926 "driver": "file",
3927 "filename": "/dev/fdset/4"
3928 }
3929 }
3930 }
3931 }
3932 }
3933
3934<- { "return": {} }
3935
3936EQMP
Benoît Canetc13163f2014-01-23 21:31:34 +01003937
3938 {
3939 .name = "query-named-block-nodes",
3940 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02003941 .mhandler.cmd_new = qmp_marshal_query_named_block_nodes,
Benoît Canetc13163f2014-01-23 21:31:34 +01003942 },
3943
3944SQMP
3945@query-named-block-nodes
3946------------------------
3947
3948Return a list of BlockDeviceInfo for all the named block driver nodes
3949
3950Example:
3951
3952-> { "execute": "query-named-block-nodes" }
3953<- { "return": [ { "ro":false,
3954 "drv":"qcow2",
3955 "encrypted":false,
3956 "file":"disks/test.qcow2",
3957 "node-name": "my-node",
3958 "backing_file_depth":1,
3959 "bps":1000000,
3960 "bps_rd":0,
3961 "bps_wr":0,
3962 "iops":1000000,
3963 "iops_rd":0,
3964 "iops_wr":0,
3965 "bps_max": 8000000,
3966 "bps_rd_max": 0,
3967 "bps_wr_max": 0,
3968 "iops_max": 0,
3969 "iops_rd_max": 0,
3970 "iops_wr_max": 0,
3971 "iops_size": 0,
Francesco Romanie2462112015-01-12 14:11:13 +01003972 "write_threshold": 0,
Benoît Canetc13163f2014-01-23 21:31:34 +01003973 "image":{
3974 "filename":"disks/test.qcow2",
3975 "format":"qcow2",
3976 "virtual-size":2048000,
3977 "backing_file":"base.qcow2",
3978 "full-backing-filename":"disks/base.qcow2",
John Snow54034322015-04-28 15:20:41 -04003979 "backing-filename-format":"qcow2",
Benoît Canetc13163f2014-01-23 21:31:34 +01003980 "snapshots":[
3981 {
3982 "id": "1",
3983 "name": "snapshot1",
3984 "vm-state-size": 0,
3985 "date-sec": 10000200,
3986 "date-nsec": 12,
3987 "vm-clock-sec": 206,
3988 "vm-clock-nsec": 30
3989 }
3990 ],
3991 "backing-image":{
3992 "filename":"disks/base.qcow2",
3993 "format":"qcow2",
3994 "virtual-size":2048000
3995 }
Michael S. Tsirkinc0594512014-06-16 15:20:18 +03003996 } } ] }
Benoît Canetc13163f2014-01-23 21:31:34 +01003997
3998EQMP
Hu Tao76b5d852014-06-16 18:05:41 +08003999
4000 {
4001 .name = "query-memdev",
4002 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004003 .mhandler.cmd_new = qmp_marshal_query_memdev,
Hu Tao76b5d852014-06-16 18:05:41 +08004004 },
4005
4006SQMP
4007query-memdev
4008------------
4009
4010Show memory devices information.
4011
4012
4013Example (1):
4014
4015-> { "execute": "query-memdev" }
4016<- { "return": [
4017 {
4018 "size": 536870912,
4019 "merge": false,
4020 "dump": true,
4021 "prealloc": false,
4022 "host-nodes": [0, 1],
4023 "policy": "bind"
4024 },
4025 {
4026 "size": 536870912,
4027 "merge": false,
4028 "dump": true,
4029 "prealloc": true,
4030 "host-nodes": [2, 3],
4031 "policy": "preferred"
4032 }
4033 ]
4034 }
4035
4036EQMP
Igor Mammedov6f2e2732014-06-16 19:12:25 +02004037
4038 {
4039 .name = "query-memory-devices",
4040 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004041 .mhandler.cmd_new = qmp_marshal_query_memory_devices,
Igor Mammedov6f2e2732014-06-16 19:12:25 +02004042 },
4043
4044SQMP
4045@query-memory-devices
4046--------------------
4047
4048Return a list of memory devices.
4049
4050Example:
4051-> { "execute": "query-memory-devices" }
4052<- { "return": [ { "data":
4053 { "addr": 5368709120,
4054 "hotpluggable": true,
4055 "hotplugged": true,
4056 "id": "d1",
4057 "memdev": "/objects/memX",
4058 "node": 0,
4059 "size": 1073741824,
4060 "slot": 0},
4061 "type": "dimm"
4062 } ] }
4063EQMP
Igor Mammedov02419bc2014-06-16 19:12:28 +02004064
4065 {
4066 .name = "query-acpi-ospm-status",
4067 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004068 .mhandler.cmd_new = qmp_marshal_query_acpi_ospm_status,
Igor Mammedov02419bc2014-06-16 19:12:28 +02004069 },
4070
4071SQMP
4072@query-acpi-ospm-status
4073--------------------
4074
4075Return list of ACPIOSTInfo for devices that support status reporting
4076via ACPI _OST method.
4077
4078Example:
4079-> { "execute": "query-acpi-ospm-status" }
4080<- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
4081 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
4082 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
4083 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
4084 ]}
4085EQMP
Marcelo Tosattif2ae8ab2014-06-24 18:55:11 -03004086
4087#if defined TARGET_I386
4088 {
4089 .name = "rtc-reset-reinjection",
4090 .args_type = "",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004091 .mhandler.cmd_new = qmp_marshal_rtc_reset_reinjection,
Marcelo Tosattif2ae8ab2014-06-24 18:55:11 -03004092 },
4093#endif
4094
4095SQMP
4096rtc-reset-reinjection
4097---------------------
4098
4099Reset the RTC interrupt reinjection backlog.
4100
4101Arguments: None.
4102
4103Example:
4104
4105-> { "execute": "rtc-reset-reinjection" }
4106<- { "return": {} }
Lluís Vilanova1dde0f42014-08-25 13:19:57 +02004107EQMP
Marcelo Tosattif2ae8ab2014-06-24 18:55:11 -03004108
Lluís Vilanova1dde0f42014-08-25 13:19:57 +02004109 {
4110 .name = "trace-event-get-state",
4111 .args_type = "name:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004112 .mhandler.cmd_new = qmp_marshal_trace_event_get_state,
Lluís Vilanova1dde0f42014-08-25 13:19:57 +02004113 },
4114
4115SQMP
4116trace-event-get-state
4117---------------------
4118
4119Query the state of events.
4120
4121Example:
4122
4123-> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
4124<- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
4125EQMP
4126
4127 {
4128 .name = "trace-event-set-state",
4129 .args_type = "name:s,enable:b,ignore-unavailable:b?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004130 .mhandler.cmd_new = qmp_marshal_trace_event_set_state,
Lluís Vilanova1dde0f42014-08-25 13:19:57 +02004131 },
4132
4133SQMP
4134trace-event-set-state
4135---------------------
4136
4137Set the state of events.
4138
4139Example:
4140
4141-> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
4142<- { "return": {} }
Marcelo Tosattif2ae8ab2014-06-24 18:55:11 -03004143EQMP
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004144
4145 {
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01004146 .name = "x-input-send-event",
Amos Kong51fc4472014-11-07 12:41:25 +08004147 .args_type = "console:i?,events:q",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004148 .mhandler.cmd_new = qmp_marshal_x_input_send_event,
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004149 },
4150
4151SQMP
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01004152@x-input-send-event
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004153-----------------
4154
4155Send input event to guest.
4156
4157Arguments:
4158
Amos Kong51fc4472014-11-07 12:41:25 +08004159- "console": console index. (json-int, optional)
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004160- "events": list of input events.
4161
4162The consoles are visible in the qom tree, under
4163/backend/console[$index]. They have a device link and head property, so
4164it is possible to map which console belongs to which device and display.
4165
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01004166Note: this command is experimental, and not a stable API.
4167
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004168Example (1):
4169
4170Press left mouse button.
4171
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01004172-> { "execute": "x-input-send-event",
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004173 "arguments": { "console": 0,
4174 "events": [ { "type": "btn",
Amos Kongb5369dd2014-11-25 16:05:56 +08004175 "data" : { "down": true, "button": "Left" } } ] } }
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004176<- { "return": {} }
4177
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01004178-> { "execute": "x-input-send-event",
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004179 "arguments": { "console": 0,
4180 "events": [ { "type": "btn",
Amos Kongb5369dd2014-11-25 16:05:56 +08004181 "data" : { "down": false, "button": "Left" } } ] } }
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004182<- { "return": {} }
4183
4184Example (2):
4185
4186Press ctrl-alt-del.
4187
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01004188-> { "execute": "x-input-send-event",
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004189 "arguments": { "console": 0, "events": [
4190 { "type": "key", "data" : { "down": true,
4191 "key": {"type": "qcode", "data": "ctrl" } } },
4192 { "type": "key", "data" : { "down": true,
4193 "key": {"type": "qcode", "data": "alt" } } },
4194 { "type": "key", "data" : { "down": true,
4195 "key": {"type": "qcode", "data": "delete" } } } ] } }
4196<- { "return": {} }
4197
4198Example (3):
4199
4200Move mouse pointer to absolute coordinates (20000, 400).
4201
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01004202-> { "execute": "x-input-send-event" ,
Marcelo Tosatti50c66172014-09-30 18:10:17 -03004203 "arguments": { "console": 0, "events": [
4204 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
4205 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
4206<- { "return": {} }
4207
4208EQMP
Francesco Romanie2462112015-01-12 14:11:13 +01004209
4210 {
4211 .name = "block-set-write-threshold",
4212 .args_type = "node-name:s,write-threshold:l",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004213 .mhandler.cmd_new = qmp_marshal_block_set_write_threshold,
Francesco Romanie2462112015-01-12 14:11:13 +01004214 },
4215
4216SQMP
4217block-set-write-threshold
4218------------
4219
4220Change the write threshold for a block drive. The threshold is an offset,
4221thus must be non-negative. Default is no write threshold.
4222Setting the threshold to zero disables it.
4223
4224Arguments:
4225
4226- "node-name": the node name in the block driver state graph (json-string)
4227- "write-threshold": the write threshold in bytes (json-int)
4228
4229Example:
4230
4231-> { "execute": "block-set-write-threshold",
4232 "arguments": { "node-name": "mydev",
4233 "write-threshold": 17179869184 } }
4234<- { "return": {} }
4235
4236EQMP
Scott Feldmanfafa4d52015-06-10 18:21:21 -07004237
4238 {
4239 .name = "query-rocker",
4240 .args_type = "name:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004241 .mhandler.cmd_new = qmp_marshal_query_rocker,
Scott Feldmanfafa4d52015-06-10 18:21:21 -07004242 },
4243
4244SQMP
4245Show rocker switch
4246------------------
4247
4248Arguments:
4249
4250- "name": switch name
4251
4252Example:
4253
4254-> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
4255<- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
4256
4257EQMP
4258
4259 {
4260 .name = "query-rocker-ports",
4261 .args_type = "name:s",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004262 .mhandler.cmd_new = qmp_marshal_query_rocker_ports,
Scott Feldmanfafa4d52015-06-10 18:21:21 -07004263 },
4264
4265SQMP
4266Show rocker switch ports
4267------------------------
4268
4269Arguments:
4270
4271- "name": switch name
4272
4273Example:
4274
4275-> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
4276<- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
4277 "autoneg": "off", "link-up": true, "speed": 10000},
4278 {"duplex": "full", "enabled": true, "name": "sw1.2",
4279 "autoneg": "off", "link-up": true, "speed": 10000}
4280 ]}
4281
4282EQMP
4283
4284 {
4285 .name = "query-rocker-of-dpa-flows",
4286 .args_type = "name:s,tbl-id:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004287 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_flows,
Scott Feldmanfafa4d52015-06-10 18:21:21 -07004288 },
4289
4290SQMP
4291Show rocker switch OF-DPA flow tables
4292-------------------------------------
4293
4294Arguments:
4295
4296- "name": switch name
4297- "tbl-id": (optional) flow table ID
4298
4299Example:
4300
4301-> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
4302<- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
4303 "hits": 138,
4304 "cookie": 0,
4305 "action": {"goto-tbl": 10},
4306 "mask": {"in-pport": 4294901760}
4307 },
4308 {...more...},
4309 ]}
4310
4311EQMP
4312
4313 {
4314 .name = "query-rocker-of-dpa-groups",
4315 .args_type = "name:s,type:i?",
Markus Armbruster7fad30f2015-09-16 13:06:19 +02004316 .mhandler.cmd_new = qmp_marshal_query_rocker_of_dpa_groups,
Scott Feldmanfafa4d52015-06-10 18:21:21 -07004317 },
4318
4319SQMP
4320Show rocker OF-DPA group tables
4321-------------------------------
4322
4323Arguments:
4324
4325- "name": switch name
4326- "type": (optional) group type
4327
4328Example:
4329
4330-> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
4331<- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
4332 "pop-vlan": 1, "id": 251723778},
4333 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
4334 "pop-vlan": 1, "id": 251723776},
4335 {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
4336 "pop-vlan": 1, "id": 251658241},
4337 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
4338 "pop-vlan": 1, "id": 251658240}
4339 ]}