blob: 06639248f23b8c3b9f775cd4cd08815e79efe4da [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 = "",
Luiz Capitulino7a7f3252011-09-15 14:20:28 -030066 .mhandler.cmd_new = qmp_marshal_input_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",
Luiz Capitulinoc245b6a2011-12-07 16:02:36 -020087 .mhandler.cmd_new = qmp_marshal_input_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?",
Luiz Capitulino333a96e2011-12-08 11:13:50 -0200113 .mhandler.cmd_new = qmp_marshal_input_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",
Luiz Capitulinoad39cf62012-05-24 13:48:23 -0300149 .mhandler.cmd_new = qmp_marshal_input_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 = "",
Luiz Capitulino5f158f22011-09-15 14:34:39 -0300172 .mhandler.cmd_new = qmp_marshal_input_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 = "",
Luiz Capitulinoe42e8182011-11-22 17:58:31 -0200193 .mhandler.cmd_new = qmp_marshal_input_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 = "",
214 .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
215 },
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 = "",
Luiz Capitulino38d22652011-09-15 14:41:46 -0300235 .mhandler.cmd_new = qmp_marshal_input_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 = "",
Luiz Capitulino22e1bb92011-11-27 22:40:03 -0200256 .mhandler.cmd_new = qmp_marshal_input_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",
279 .user_print = monitor_user_noop,
280 .mhandler.cmd_new = do_device_add,
281 },
282
283SQMP
284device_add
285----------
286
287Add a device.
288
289Arguments:
290
291- "driver": the name of the new device's driver (json-string)
292- "bus": the device's parent bus (device tree path, json-string, optional)
293- "id": the device's ID, must be unique (json-string)
294- device properties
295
296Example:
297
298-> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
299<- { "return": {} }
300
301Notes:
302
303(1) For detailed information about this command, please refer to the
304 'docs/qdev-device-use.txt' file.
305
306(2) It's possible to list device properties by running QEMU with the
307 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
308
309EQMP
310
311 {
312 .name = "device_del",
313 .args_type = "id:s",
Luiz Capitulinoa15fef22012-03-29 12:38:50 -0300314 .mhandler.cmd_new = qmp_marshal_input_device_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300315 },
316
317SQMP
318device_del
319----------
320
321Remove a device.
322
323Arguments:
324
325- "id": the device's ID (json-string)
326
327Example:
328
329-> { "execute": "device_del", "arguments": { "id": "net1" } }
330<- { "return": {} }
331
332EQMP
333
334 {
Amos Konge4c8f002012-08-31 10:56:26 +0800335 .name = "send-key",
336 .args_type = "keys:O,hold-time:i?",
337 .mhandler.cmd_new = qmp_marshal_input_send_key,
338 },
339
340SQMP
341send-key
342----------
343
344Send keys to VM.
345
346Arguments:
347
348keys array:
Amos Kongf9b1d9b2013-07-16 19:52:14 +0800349 - "key": key sequence (a json-array of key union values,
350 union can be number or qcode enum)
Amos Konge4c8f002012-08-31 10:56:26 +0800351
352- hold-time: time to delay key up events, milliseconds. Defaults to 100
353 (json-int, optional)
354
355Example:
356
357-> { "execute": "send-key",
Amos Kongf9b1d9b2013-07-16 19:52:14 +0800358 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
359 { "type": "qcode", "data": "alt" },
360 { "type": "qcode", "data": "delete" } ] } }
Amos Konge4c8f002012-08-31 10:56:26 +0800361<- { "return": {} }
362
363EQMP
364
365 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300366 .name = "cpu",
367 .args_type = "index:i",
Luiz Capitulino755f1962011-10-06 14:31:39 -0300368 .mhandler.cmd_new = qmp_marshal_input_cpu,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300369 },
370
371SQMP
372cpu
373---
374
375Set the default CPU.
376
377Arguments:
378
379- "index": the CPU's index (json-int)
380
381Example:
382
383-> { "execute": "cpu", "arguments": { "index": 0 } }
384<- { "return": {} }
385
386Note: CPUs' indexes are obtained with the 'query-cpus' command.
387
388EQMP
389
390 {
Igor Mammedov69ca3ea2013-04-30 15:41:25 +0200391 .name = "cpu-add",
392 .args_type = "id:i",
393 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
394 },
395
396SQMP
397cpu-add
398-------
399
400Adds virtual cpu
401
402Arguments:
403
404- "id": cpu id (json-int)
405
406Example:
407
408-> { "execute": "cpu-add", "arguments": { "id": 2 } }
409<- { "return": {} }
410
411EQMP
412
413 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300414 .name = "memsave",
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200415 .args_type = "val:l,size:i,filename:s,cpu:i?",
416 .mhandler.cmd_new = qmp_marshal_input_memsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300417 },
418
419SQMP
420memsave
421-------
422
423Save to disk virtual memory dump starting at 'val' of size 'size'.
424
425Arguments:
426
427- "val": the starting address (json-int)
428- "size": the memory size, in bytes (json-int)
429- "filename": file path (json-string)
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200430- "cpu": virtual CPU index (json-int, optional)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300431
432Example:
433
434-> { "execute": "memsave",
435 "arguments": { "val": 10,
436 "size": 100,
437 "filename": "/tmp/virtual-mem-dump" } }
438<- { "return": {} }
439
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300440EQMP
441
442 {
443 .name = "pmemsave",
444 .args_type = "val:l,size:i,filename:s",
Luiz Capitulino6d3962b2011-11-22 17:26:46 -0200445 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300446 },
447
448SQMP
449pmemsave
450--------
451
452Save to disk physical memory dump starting at 'val' of size 'size'.
453
454Arguments:
455
456- "val": the starting address (json-int)
457- "size": the memory size, in bytes (json-int)
458- "filename": file path (json-string)
459
460Example:
461
462-> { "execute": "pmemsave",
463 "arguments": { "val": 10,
464 "size": 100,
465 "filename": "/tmp/physical-mem-dump" } }
466<- { "return": {} }
467
468EQMP
469
470 {
Lai Jiangshana4046662011-03-07 17:05:15 +0800471 .name = "inject-nmi",
472 .args_type = "",
Luiz Capitulinoab49ab52011-11-23 12:55:53 -0200473 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
Lai Jiangshana4046662011-03-07 17:05:15 +0800474 },
475
476SQMP
477inject-nmi
478----------
479
Alexey Kardashevskiy9cb805f2014-08-20 22:16:33 +1000480Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
Lai Jiangshana4046662011-03-07 17:05:15 +0800481
482Arguments: None.
483
484Example:
485
486-> { "execute": "inject-nmi" }
487<- { "return": {} }
488
Luiz Capitulinode253f12012-07-27 16:18:16 -0300489Note: inject-nmi fails when the guest doesn't support injecting.
Lai Jiangshana4046662011-03-07 17:05:15 +0800490
491EQMP
492
493 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100494 .name = "ringbuf-write",
Markus Armbruster82e59a62013-02-06 21:27:14 +0100495 .args_type = "device:s,data:s,format:s?",
Markus Armbruster3949e592013-02-06 21:27:24 +0100496 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
Lei Li1f590cf2013-01-25 00:03:20 +0800497 },
498
499SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100500ringbuf-write
Lei Li1f590cf2013-01-25 00:03:20 +0800501-------------
502
Markus Armbruster3949e592013-02-06 21:27:24 +0100503Write to a ring buffer character device.
Lei Li1f590cf2013-01-25 00:03:20 +0800504
505Arguments:
506
Markus Armbruster3949e592013-02-06 21:27:24 +0100507- "device": ring buffer character device name (json-string)
508- "data": data to write (json-string)
509- "format": data format (json-string, optional)
510 - Possible values: "utf8" (default), "base64"
511 Bug: invalid base64 is currently not rejected.
512 Whitespace *is* invalid.
Lei Li1f590cf2013-01-25 00:03:20 +0800513
514Example:
515
Markus Armbruster3949e592013-02-06 21:27:24 +0100516-> { "execute": "ringbuf-write",
517 "arguments": { "device": "foo",
Lei Li1f590cf2013-01-25 00:03:20 +0800518 "data": "abcdefgh",
519 "format": "utf8" } }
520<- { "return": {} }
521
522EQMP
523
524 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100525 .name = "ringbuf-read",
Lei Li49b6d722013-01-25 00:03:21 +0800526 .args_type = "device:s,size:i,format:s?",
Markus Armbruster3949e592013-02-06 21:27:24 +0100527 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
Lei Li49b6d722013-01-25 00:03:21 +0800528 },
529
530SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100531ringbuf-read
Lei Li49b6d722013-01-25 00:03:21 +0800532-------------
533
Markus Armbruster3949e592013-02-06 21:27:24 +0100534Read from a ring buffer character device.
Lei Li49b6d722013-01-25 00:03:21 +0800535
536Arguments:
537
Markus Armbruster3949e592013-02-06 21:27:24 +0100538- "device": ring buffer character device name (json-string)
539- "size": how many bytes to read at most (json-int)
540 - Number of data bytes, not number of characters in encoded data
541- "format": data format (json-string, optional)
542 - Possible values: "utf8" (default), "base64"
543 - Naturally, format "utf8" works only when the ring buffer
544 contains valid UTF-8 text. Invalid UTF-8 sequences get
545 replaced. Bug: replacement doesn't work. Bug: can screw
546 up on encountering NUL characters, after the ring buffer
547 lost data, and when reading stops because the size limit
548 is reached.
Lei Li49b6d722013-01-25 00:03:21 +0800549
550Example:
551
Markus Armbruster3949e592013-02-06 21:27:24 +0100552-> { "execute": "ringbuf-read",
553 "arguments": { "device": "foo",
Lei Li49b6d722013-01-25 00:03:21 +0800554 "size": 1000,
555 "format": "utf8" } }
Markus Armbruster3ab651f2013-02-06 21:27:15 +0100556<- {"return": "abcdefgh"}
Lei Li49b6d722013-01-25 00:03:21 +0800557
558EQMP
559
560 {
Stefano Stabellinia7ae8352012-01-25 12:24:51 +0000561 .name = "xen-save-devices-state",
562 .args_type = "filename:F",
563 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
564 },
565
566SQMP
567xen-save-devices-state
568-------
569
570Save the state of all devices to file. The RAM and the block devices
571of the VM are not saved by this command.
572
573Arguments:
574
575- "filename": the file to save the state of the devices to as binary
576data. See xen-save-devices-state.txt for a description of the binary
577format.
578
579Example:
580
581-> { "execute": "xen-save-devices-state",
582 "arguments": { "filename": "/tmp/save" } }
583<- { "return": {} }
584
585EQMP
586
587 {
Anthony PERARD39f42432012-10-03 13:48:19 +0000588 .name = "xen-set-global-dirty-log",
589 .args_type = "enable:b",
590 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
591 },
592
593SQMP
594xen-set-global-dirty-log
595-------
596
597Enable or disable the global dirty log mode.
598
599Arguments:
600
601- "enable": Enable it or disable it.
602
603Example:
604
605-> { "execute": "xen-set-global-dirty-log",
606 "arguments": { "enable": true } }
607<- { "return": {} }
608
609EQMP
610
611 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300612 .name = "migrate",
613 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
Luiz Capitulinoe1c37d02011-12-05 14:48:01 -0200614 .mhandler.cmd_new = qmp_marshal_input_migrate,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300615 },
616
617SQMP
618migrate
619-------
620
621Migrate to URI.
622
623Arguments:
624
625- "blk": block migration, full disk copy (json-bool, optional)
626- "inc": incremental disk copy (json-bool, optional)
627- "uri": Destination URI (json-string)
628
629Example:
630
631-> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
632<- { "return": {} }
633
634Notes:
635
636(1) The 'query-migrate' command should be used to check migration's progress
637 and final result (this information is provided by the 'status' member)
638(2) All boolean arguments default to false
639(3) The user Monitor's "detach" argument is invalid in QMP and should not
640 be used
641
642EQMP
643
644 {
645 .name = "migrate_cancel",
646 .args_type = "",
Luiz Capitulino6cdedb02011-11-27 22:54:09 -0200647 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300648 },
649
650SQMP
651migrate_cancel
652--------------
653
654Cancel the current migration.
655
656Arguments: None.
657
658Example:
659
660-> { "execute": "migrate_cancel" }
661<- { "return": {} }
662
663EQMP
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000664
665 {
666 .name = "migrate-incoming",
667 .args_type = "uri:s",
668 .mhandler.cmd_new = qmp_marshal_input_migrate_incoming,
669 },
670
671SQMP
672migrate-incoming
673----------------
674
675Continue an incoming migration
676
677Arguments:
678
679- "uri": Source/listening URI (json-string)
680
681Example:
682
683-> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
684<- { "return": {} }
685
686Notes:
687
688(1) QEMU must be started with -incoming defer to allow migrate-incoming to
689 be used
690(2) The uri format is the same as to -incoming
691
692EQMP
693 {
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300694 .name = "migrate-set-cache-size",
695 .args_type = "value:o",
696 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
697 },
698
699SQMP
700migrate-set-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100701----------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300702
703Set cache size to be used by XBZRLE migration, the cache size will be rounded
704down to the nearest power of 2
705
706Arguments:
707
708- "value": cache size in bytes (json-int)
709
710Example:
711
712-> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
713<- { "return": {} }
714
715EQMP
716 {
717 .name = "query-migrate-cache-size",
718 .args_type = "",
719 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
720 },
721
722SQMP
723query-migrate-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100724------------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300725
726Show cache size to be used by XBZRLE migration
727
728returns a json-object with the following information:
729- "size" : json-int
730
731Example:
732
733-> { "execute": "query-migrate-cache-size" }
734<- { "return": 67108864 }
735
736EQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300737
738 {
739 .name = "migrate_set_speed",
Wen Congyang3a019b62010-11-25 09:06:05 +0800740 .args_type = "value:o",
Luiz Capitulino3dc85382011-11-28 11:59:37 -0200741 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300742 },
743
744SQMP
745migrate_set_speed
746-----------------
747
748Set maximum speed for migrations.
749
750Arguments:
751
Luiz Capitulino5569fd72010-12-15 17:56:18 -0200752- "value": maximum speed, in bytes per second (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300753
754Example:
755
756-> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
757<- { "return": {} }
758
759EQMP
760
761 {
762 .name = "migrate_set_downtime",
763 .args_type = "value:T",
Luiz Capitulino4f0a9932011-11-27 23:18:01 -0200764 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300765 },
766
767SQMP
768migrate_set_downtime
769--------------------
770
771Set maximum tolerated downtime (in seconds) for migrations.
772
773Arguments:
774
775- "value": maximum downtime (json-number)
776
777Example:
778
779-> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
780<- { "return": {} }
781
782EQMP
783
784 {
Jes Sorensenff73edf2011-03-09 14:31:06 +0100785 .name = "client_migrate_info",
786 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
787 .params = "protocol hostname port tls-port cert-subject",
788 .help = "send migration info to spice/vnc client",
789 .user_print = monitor_user_noop,
Yonit Halperinedc5cb12011-10-17 10:03:18 +0200790 .mhandler.cmd_async = client_migrate_info,
791 .flags = MONITOR_CMD_ASYNC,
Jes Sorensenff73edf2011-03-09 14:31:06 +0100792 },
793
794SQMP
795client_migrate_info
796------------------
797
798Set the spice/vnc connection info for the migration target. The spice/vnc
799server will ask the spice/vnc client to automatically reconnect using the
800new parameters (if specified) once the vm migration finished successfully.
801
802Arguments:
803
804- "protocol": protocol: "spice" or "vnc" (json-string)
805- "hostname": migration target hostname (json-string)
806- "port": spice/vnc tcp port for plaintext channels (json-int, optional)
807- "tls-port": spice tcp port for tls-secured channels (json-int, optional)
808- "cert-subject": server certificate subject (json-string, optional)
809
810Example:
811
812-> { "execute": "client_migrate_info",
813 "arguments": { "protocol": "spice",
814 "hostname": "virt42.lab.kraxel.org",
815 "port": 1234 } }
816<- { "return": {} }
817
818EQMP
819
820 {
Wen Congyang783e9b42012-05-07 12:10:47 +0800821 .name = "dump-guest-memory",
qiaonuohanb53ccc32014-02-18 14:11:36 +0800822 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
823 .params = "-p protocol [begin] [length] [format]",
Wen Congyang783e9b42012-05-07 12:10:47 +0800824 .help = "dump guest memory to file",
825 .user_print = monitor_user_noop,
826 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
827 },
828
829SQMP
830dump
831
832
833Dump guest memory to file. The file can be processed with crash or gdb.
834
835Arguments:
836
837- "paging": do paging to get guest's memory mapping (json-bool)
838- "protocol": destination file(started with "file:") or destination file
839 descriptor (started with "fd:") (json-string)
840- "begin": the starting physical address. It's optional, and should be specified
841 with length together (json-int)
842- "length": the memory size, in bytes. It's optional, and should be specified
843 with begin together (json-int)
qiaonuohanb53ccc32014-02-18 14:11:36 +0800844- "format": the format of guest memory dump. It's optional, and can be
845 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
846 conflict with paging and filter, ie. begin and length (json-string)
Wen Congyang783e9b42012-05-07 12:10:47 +0800847
848Example:
849
850-> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
851<- { "return": {} }
852
853Notes:
854
855(1) All boolean arguments default to false
856
857EQMP
858
859 {
qiaonuohan7d6dc7f2014-02-18 14:11:38 +0800860 .name = "query-dump-guest-memory-capability",
861 .args_type = "",
862 .mhandler.cmd_new = qmp_marshal_input_query_dump_guest_memory_capability,
863 },
864
865SQMP
866query-dump-guest-memory-capability
867----------
868
869Show available formats for 'dump-guest-memory'
870
871Example:
872
873-> { "execute": "query-dump-guest-memory-capability" }
874<- { "return": { "formats":
875 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
876
877EQMP
878
879 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300880 .name = "netdev_add",
881 .args_type = "netdev:O",
Luiz Capitulino928059a2012-04-18 17:34:15 -0300882 .mhandler.cmd_new = qmp_netdev_add,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300883 },
884
885SQMP
886netdev_add
887----------
888
889Add host network device.
890
891Arguments:
892
893- "type": the device type, "tap", "user", ... (json-string)
894- "id": the device's ID, must be unique (json-string)
895- device options
896
897Example:
898
899-> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
900<- { "return": {} }
901
Markus Armbrusteraf347aa2013-02-22 18:31:51 +0100902Note: The supported device options are the same ones supported by the '-netdev'
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300903 command-line argument, which are listed in the '-help' output or QEMU's
904 manual
905
906EQMP
907
908 {
909 .name = "netdev_del",
910 .args_type = "id:s",
Luiz Capitulino5f964152012-04-16 14:36:32 -0300911 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300912 },
913
914SQMP
915netdev_del
916----------
917
918Remove host network device.
919
920Arguments:
921
922- "id": the device's ID, must be unique (json-string)
923
924Example:
925
926-> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
927<- { "return": {} }
928
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100929
930EQMP
931
932 {
Paolo Bonzinicff8b2c2013-12-20 23:21:10 +0100933 .name = "object-add",
934 .args_type = "qom-type:s,id:s,props:q?",
935 .mhandler.cmd_new = qmp_object_add,
936 },
937
938SQMP
939object-add
940----------
941
942Create QOM object.
943
944Arguments:
945
946- "qom-type": the object's QOM type, i.e. the class name (json-string)
947- "id": the object's ID, must be unique (json-string)
948- "props": a dictionary of object property values (optional, json-dict)
949
950Example:
951
952-> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
953 "props": { "filename": "/dev/hwrng" } } }
954<- { "return": {} }
955
956EQMP
957
958 {
Paolo Bonziniab2d0532013-12-20 23:21:09 +0100959 .name = "object-del",
960 .args_type = "id:s",
961 .mhandler.cmd_new = qmp_marshal_input_object_del,
962 },
963
964SQMP
965object-del
966----------
967
968Remove QOM object.
969
970Arguments:
971
972- "id": the object's ID (json-string)
973
974Example:
975
976-> { "execute": "object-del", "arguments": { "id": "rng1" } }
977<- { "return": {} }
978
979
980EQMP
981
982
983 {
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100984 .name = "block_resize",
Benoît Canet3b1dbd12014-01-23 21:31:37 +0100985 .args_type = "device:s?,node-name:s?,size:o",
Luiz Capitulino5e7caac2011-11-25 14:57:10 -0200986 .mhandler.cmd_new = qmp_marshal_input_block_resize,
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100987 },
988
989SQMP
990block_resize
991------------
992
993Resize a block image while a guest is running.
994
995Arguments:
996
997- "device": the device's ID, must be unique (json-string)
Benoît Canet3b1dbd12014-01-23 21:31:37 +0100998- "node-name": the node name in the block driver state graph (json-string)
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100999- "size": new size
1000
1001Example:
1002
1003-> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1004<- { "return": {} }
1005
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001006EQMP
1007
1008 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001009 .name = "block-stream",
Jeff Cody13d8cc52014-06-25 15:40:11 -04001010 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00001011 .mhandler.cmd_new = qmp_marshal_input_block_stream,
1012 },
1013
1014 {
Jeff Codyed61fc12012-09-27 13:29:16 -04001015 .name = "block-commit",
Jeff Cody54e26902014-06-25 15:40:10 -04001016 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
Jeff Codyed61fc12012-09-27 13:29:16 -04001017 .mhandler.cmd_new = qmp_marshal_input_block_commit,
1018 },
1019
Jeff Cody37222902014-01-24 09:02:37 -05001020SQMP
1021block-commit
1022------------
1023
1024Live commit of data from overlay image nodes into backing nodes - i.e., writes
1025data between 'top' and 'base' into 'base'.
1026
1027Arguments:
1028
1029- "device": The device's ID, must be unique (json-string)
1030- "base": The file name of the backing image to write data into.
1031 If not specified, this is the deepest backing image
1032 (json-string, optional)
1033- "top": The file name of the backing image within the image chain,
Jeff Cody7676e2c2014-06-30 15:14:15 +02001034 which contains the topmost data to be committed down. If
1035 not specified, this is the active layer. (json-string, optional)
Jeff Cody37222902014-01-24 09:02:37 -05001036
Jeff Cody54e26902014-06-25 15:40:10 -04001037- backing-file: The backing file string to write into the overlay
1038 image of 'top'. If 'top' is the active layer,
1039 specifying a backing file string is an error. This
1040 filename is not validated.
1041
1042 If a pathname string is such that it cannot be
1043 resolved by QEMU, that means that subsequent QMP or
1044 HMP commands must use node-names for the image in
1045 question, as filename lookup methods will fail.
1046
1047 If not specified, QEMU will automatically determine
1048 the backing file string to use, or error out if
1049 there is no obvious choice. Care should be taken
1050 when specifying the string, to specify a valid
1051 filename or protocol.
1052 (json-string, optional) (Since 2.1)
1053
Jeff Cody37222902014-01-24 09:02:37 -05001054 If top == base, that is an error.
1055 If top == active, the job will not be completed by itself,
1056 user needs to complete the job with the block-job-complete
1057 command after getting the ready event. (Since 2.0)
1058
1059 If the base image is smaller than top, then the base image
1060 will be resized to be the same size as top. If top is
1061 smaller than the base image, the base will not be
1062 truncated. If you want the base image size to match the
1063 size of the smaller top, you can safely truncate it
1064 yourself once the commit operation successfully completes.
1065 (json-string)
1066- "speed": the maximum speed, in bytes per second (json-int, optional)
1067
1068
1069Example:
1070
1071-> { "execute": "block-commit", "arguments": { "device": "virtio0",
1072 "top": "/tmp/snap1.qcow2" } }
1073<- { "return": {} }
1074
1075EQMP
1076
Jeff Codyed61fc12012-09-27 13:29:16 -04001077 {
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001078 .name = "drive-backup",
Stefan Hajnoczib53169e2013-06-26 14:11:57 +02001079 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001080 "on-source-error:s?,on-target-error:s?",
1081 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
1082 },
1083
1084SQMP
1085drive-backup
1086------------
1087
1088Start a point-in-time copy of a block device to a new destination. The
1089status of ongoing drive-backup operations can be checked with
1090query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1091The operation can be stopped before it has completed using the
1092block-job-cancel command.
1093
1094Arguments:
1095
1096- "device": the name of the device which should be copied.
1097 (json-string)
1098- "target": the target of the new image. If the file exists, or if it is a
1099 device, the existing file/device will be used as the new
1100 destination. If it does not exist, a new file will be created.
1101 (json-string)
1102- "format": the format of the new destination, default is to probe if 'mode' is
1103 'existing', else the format of the source
1104 (json-string, optional)
Stefan Hajnoczib53169e2013-06-26 14:11:57 +02001105- "sync": what parts of the disk image should be copied to the destination;
1106 possibilities include "full" for all the disk, "top" for only the sectors
1107 allocated in the topmost image, or "none" to only replicate new I/O
1108 (MirrorSyncMode).
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001109- "mode": whether and how QEMU should create a new image
1110 (NewImageMode, optional, default 'absolute-paths')
1111- "speed": the maximum speed, in bytes per second (json-int, optional)
1112- "on-source-error": the action to take on an error on the source, default
1113 'report'. 'stop' and 'enospc' can only be used
1114 if the block device supports io-status.
1115 (BlockdevOnError, optional)
1116- "on-target-error": the action to take on an error on the target, default
1117 'report' (no limitations, since this applies to
1118 a different block device than device).
1119 (BlockdevOnError, optional)
1120
1121Example:
1122-> { "execute": "drive-backup", "arguments": { "device": "drive0",
Ian Mainfc5d3f82013-07-26 11:39:04 -07001123 "sync": "full",
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001124 "target": "backup.img" } }
1125<- { "return": {} }
Fam Zhengc29c1dd2014-12-18 18:37:05 +08001126
1127EQMP
1128
1129 {
1130 .name = "blockdev-backup",
1131 .args_type = "sync:s,device:B,target:B,speed:i?,"
1132 "on-source-error:s?,on-target-error:s?",
1133 .mhandler.cmd_new = qmp_marshal_input_blockdev_backup,
1134 },
1135
1136SQMP
1137blockdev-backup
1138---------------
1139
1140The device version of drive-backup: this command takes an existing named device
1141as backup target.
1142
1143Arguments:
1144
1145- "device": the name of the device which should be copied.
1146 (json-string)
1147- "target": the name of the backup target device. (json-string)
1148- "sync": what parts of the disk image should be copied to the destination;
1149 possibilities include "full" for all the disk, "top" for only the
1150 sectors allocated in the topmost image, or "none" to only replicate
1151 new I/O (MirrorSyncMode).
1152- "speed": the maximum speed, in bytes per second (json-int, optional)
1153- "on-source-error": the action to take on an error on the source, default
1154 'report'. 'stop' and 'enospc' can only be used
1155 if the block device supports io-status.
1156 (BlockdevOnError, optional)
1157- "on-target-error": the action to take on an error on the target, default
1158 'report' (no limitations, since this applies to
1159 a different block device than device).
1160 (BlockdevOnError, optional)
1161
1162Example:
1163-> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1164 "sync": "full",
1165 "target": "tgt-id" } }
1166<- { "return": {} }
1167
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001168EQMP
1169
1170 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001171 .name = "block-job-set-speed",
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +01001172 .args_type = "device:B,speed:o",
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +00001173 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
1174 },
1175
1176 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001177 .name = "block-job-cancel",
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001178 .args_type = "device:B,force:b?",
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00001179 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
1180 },
Jeff Codyc1864022012-02-28 15:54:07 -05001181 {
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001182 .name = "block-job-pause",
1183 .args_type = "device:B",
1184 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
1185 },
1186 {
1187 .name = "block-job-resume",
1188 .args_type = "device:B",
1189 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
1190 },
1191 {
Paolo Bonziniaeae8832012-10-18 16:49:21 +02001192 .name = "block-job-complete",
1193 .args_type = "device:B",
1194 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
1195 },
1196 {
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001197 .name = "transaction",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01001198 .args_type = "actions:q",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001199 .mhandler.cmd_new = qmp_marshal_input_transaction,
Jeff Codyc1864022012-02-28 15:54:07 -05001200 },
1201
1202SQMP
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001203transaction
1204-----------
Jeff Codyc1864022012-02-28 15:54:07 -05001205
Wenchao Xiabbe86012013-09-11 14:04:34 +08001206Atomically operate on one or more block devices. The only supported operations
1207for now are drive-backup, internal and external snapshotting. A list of
1208dictionaries is accepted, that contains the actions to be performed.
1209If there is any failure performing any of the operations, all operations
1210for the group are abandoned.
Jeff Codyc1864022012-02-28 15:54:07 -05001211
Wenchao Xiabbe86012013-09-11 14:04:34 +08001212For external snapshots, the dictionary contains the device, the file to use for
1213the new snapshot, and the format. The default format, if not specified, is
1214qcow2.
Jeff Codyc1864022012-02-28 15:54:07 -05001215
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001216Each new snapshot defaults to being created by QEMU (wiping any
1217contents if the file already exists), but it is also possible to reuse
1218an externally-created file. In the latter case, you should ensure that
1219the new image file has the same contents as the current one; QEMU cannot
1220perform any meaningful check. Typically this is achieved by using the
1221current image file as the backing file for the new image.
1222
Wenchao Xiabbe86012013-09-11 14:04:34 +08001223On failure, the original disks pre-snapshot attempt will be used.
1224
1225For internal snapshots, the dictionary contains the device and the snapshot's
1226name. If an internal snapshot matching name already exists, the request will
1227be rejected. Only some image formats support it, for example, qcow2, rbd,
1228and sheepdog.
1229
1230On failure, qemu will try delete the newly created internal snapshot in the
1231transaction. When an I/O error occurs during deletion, the user needs to fix
1232it later with qemu-img or other command.
1233
Jeff Codyc1864022012-02-28 15:54:07 -05001234Arguments:
1235
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001236actions array:
1237 - "type": the operation to perform. The only supported
1238 value is "blockdev-snapshot-sync". (json-string)
1239 - "data": a dictionary. The contents depend on the value
1240 of "type". When "type" is "blockdev-snapshot-sync":
1241 - "device": device name to snapshot (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001242 - "node-name": graph node name to snapshot (json-string)
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001243 - "snapshot-file": name of new image file (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001244 - "snapshot-node-name": graph node name of the new snapshot (json-string)
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001245 - "format": format of new image (json-string, optional)
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001246 - "mode": whether and how QEMU should create the snapshot file
1247 (NewImageMode, optional, default "absolute-paths")
Wenchao Xiabbe86012013-09-11 14:04:34 +08001248 When "type" is "blockdev-snapshot-internal-sync":
1249 - "device": device name to snapshot (json-string)
1250 - "name": name of the new snapshot (json-string)
Jeff Codyc1864022012-02-28 15:54:07 -05001251
1252Example:
1253
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001254-> { "execute": "transaction",
1255 "arguments": { "actions": [
Eric Blakecd0c5382014-05-06 09:39:03 -06001256 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001257 "snapshot-file": "/some/place/my-image",
1258 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001259 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
Benoît Canet0901f672014-01-23 21:31:38 +01001260 "snapshot-file": "/some/place/my-image2",
1261 "snapshot-node-name": "node3432",
1262 "mode": "existing",
1263 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001264 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001265 "snapshot-file": "/some/place/my-image2",
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001266 "mode": "existing",
Wenchao Xiabbe86012013-09-11 14:04:34 +08001267 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001268 { "type": "blockdev-snapshot-internal-sync", "data" : {
Wenchao Xiabbe86012013-09-11 14:04:34 +08001269 "device": "ide-hd2",
1270 "name": "snapshot0" } } ] } }
Jeff Codyc1864022012-02-28 15:54:07 -05001271<- { "return": {} }
1272
1273EQMP
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00001274
1275 {
Jes Sorensend967b2f2011-07-11 20:01:09 +02001276 .name = "blockdev-snapshot-sync",
Benoît Canet0901f672014-01-23 21:31:38 +01001277 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
Luiz Capitulino6106e242011-11-25 16:15:19 -02001278 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
Jes Sorensend967b2f2011-07-11 20:01:09 +02001279 },
1280
1281SQMP
1282blockdev-snapshot-sync
1283----------------------
1284
1285Synchronous snapshot of a block device. snapshot-file specifies the
1286target of the new image. If the file exists, or if it is a device, the
1287snapshot will be created in the existing file/device. If does not
1288exist, a new file will be created. format specifies the format of the
1289snapshot image, default is qcow2.
1290
1291Arguments:
1292
1293- "device": device name to snapshot (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001294- "node-name": graph node name to snapshot (json-string)
Jes Sorensend967b2f2011-07-11 20:01:09 +02001295- "snapshot-file": name of new image file (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001296- "snapshot-node-name": graph node name of the new snapshot (json-string)
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001297- "mode": whether and how QEMU should create the snapshot file
1298 (NewImageMode, optional, default "absolute-paths")
Jes Sorensend967b2f2011-07-11 20:01:09 +02001299- "format": format of new image (json-string, optional)
1300
1301Example:
1302
Luiz Capitulino7f3850c2011-10-10 17:30:08 -03001303-> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1304 "snapshot-file":
1305 "/some/place/my-image",
1306 "format": "qcow2" } }
Jes Sorensend967b2f2011-07-11 20:01:09 +02001307<- { "return": {} }
1308
1309EQMP
1310
1311 {
Wenchao Xiaf323bc92013-09-11 14:04:35 +08001312 .name = "blockdev-snapshot-internal-sync",
1313 .args_type = "device:B,name:s",
1314 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_internal_sync,
1315 },
1316
1317SQMP
1318blockdev-snapshot-internal-sync
1319-------------------------------
1320
1321Synchronously take an internal snapshot of a block device when the format of
1322image used supports it. If the name is an empty string, or a snapshot with
1323name already exists, the operation will fail.
1324
1325Arguments:
1326
1327- "device": device name to snapshot (json-string)
1328- "name": name of the new snapshot (json-string)
1329
1330Example:
1331
1332-> { "execute": "blockdev-snapshot-internal-sync",
1333 "arguments": { "device": "ide-hd0",
1334 "name": "snapshot0" }
1335 }
1336<- { "return": {} }
1337
1338EQMP
1339
1340 {
Wenchao Xia44e3e052013-09-11 14:04:36 +08001341 .name = "blockdev-snapshot-delete-internal-sync",
1342 .args_type = "device:B,id:s?,name:s?",
1343 .mhandler.cmd_new =
1344 qmp_marshal_input_blockdev_snapshot_delete_internal_sync,
1345 },
1346
1347SQMP
1348blockdev-snapshot-delete-internal-sync
1349--------------------------------------
1350
1351Synchronously delete an internal snapshot of a block device when the format of
1352image used supports it. The snapshot is identified by name or id or both. One
1353of name or id is required. If the snapshot is not found, the operation will
1354fail.
1355
1356Arguments:
1357
1358- "device": device name (json-string)
1359- "id": ID of the snapshot (json-string, optional)
1360- "name": name of the snapshot (json-string, optional)
1361
1362Example:
1363
1364-> { "execute": "blockdev-snapshot-delete-internal-sync",
1365 "arguments": { "device": "ide-hd0",
1366 "name": "snapshot0" }
1367 }
1368<- { "return": {
1369 "id": "1",
1370 "name": "snapshot0",
1371 "vm-state-size": 0,
1372 "date-sec": 1000012,
1373 "date-nsec": 10,
1374 "vm-clock-sec": 100,
1375 "vm-clock-nsec": 20
1376 }
1377 }
1378
1379EQMP
1380
1381 {
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001382 .name = "drive-mirror",
Paolo Bonzinib952b552012-10-18 16:49:28 +02001383 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Benoît Canet09158f02014-06-27 18:25:25 +02001384 "node-name:s?,replaces:s?,"
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001385 "on-source-error:s?,on-target-error:s?,"
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001386 "granularity:i?,buf-size:i?",
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001387 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1388 },
1389
1390SQMP
1391drive-mirror
1392------------
1393
1394Start mirroring a block device's writes to a new destination. target
1395specifies the target of the new image. If the file exists, or if it is
1396a device, it will be used as the new destination for writes. If it does not
1397exist, a new file will be created. format specifies the format of the
1398mirror image, default is to probe if mode='existing', else the format
1399of the source.
1400
1401Arguments:
1402
1403- "device": device name to operate on (json-string)
1404- "target": name of new image file (json-string)
1405- "format": format of new image (json-string, optional)
Benoît Canet4c828dc2014-06-16 12:00:55 +02001406- "node-name": the name of the new block driver state in the node graph
1407 (json-string, optional)
Benoît Canet09158f02014-06-27 18:25:25 +02001408- "replaces": the block driver node name to replace when finished
1409 (json-string, optional)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001410- "mode": how an image file should be created into the target
1411 file/device (NewImageMode, optional, default 'absolute-paths')
1412- "speed": maximum speed of the streaming job, in bytes per second
1413 (json-int)
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001414- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001415- "buf_size": maximum amount of data in flight from source to target, in bytes
1416 (json-int, default 10M)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001417- "sync": what parts of the disk image should be copied to the destination;
1418 possibilities include "full" for all the disk, "top" for only the sectors
1419 allocated in the topmost image, or "none" to only replicate new I/O
1420 (MirrorSyncMode).
Paolo Bonzinib952b552012-10-18 16:49:28 +02001421- "on-source-error": the action to take on an error on the source
1422 (BlockdevOnError, default 'report')
1423- "on-target-error": the action to take on an error on the target
1424 (BlockdevOnError, default 'report')
1425
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001426The default value of the granularity is the image cluster size clamped
1427between 4096 and 65536, if the image format defines one. If the format
1428does not define a cluster size, the default value of the granularity
1429is 65536.
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001430
1431
1432Example:
1433
1434-> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1435 "target": "/some/place/my-image",
1436 "sync": "full",
1437 "format": "qcow2" } }
1438<- { "return": {} }
1439
1440EQMP
1441
1442 {
Jeff Codyfa40e652014-07-01 09:52:16 +02001443 .name = "change-backing-file",
1444 .args_type = "device:s,image-node-name:s,backing-file:s",
1445 .mhandler.cmd_new = qmp_marshal_input_change_backing_file,
1446 },
1447
1448SQMP
1449change-backing-file
1450-------------------
1451Since: 2.1
1452
1453Change the backing file in the image file metadata. This does not cause
1454QEMU to reopen the image file to reparse the backing filename (it may,
1455however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1456if needed). The new backing file string is written into the image file
1457metadata, and the QEMU internal strings are updated.
1458
1459Arguments:
1460
1461- "image-node-name": The name of the block driver state node of the
1462 image to modify. The "device" is argument is used to
1463 verify "image-node-name" is in the chain described by
1464 "device".
1465 (json-string, optional)
1466
1467- "device": The name of the device.
1468 (json-string)
1469
1470- "backing-file": The string to write as the backing file. This string is
1471 not validated, so care should be taken when specifying
1472 the string or the image chain may not be able to be
1473 reopened again.
1474 (json-string)
1475
1476Returns: Nothing on success
1477 If "device" does not exist or cannot be determined, DeviceNotFound
1478
1479EQMP
1480
1481 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001482 .name = "balloon",
1483 .args_type = "value:M",
Luiz Capitulinod72f3262011-11-25 14:38:09 -02001484 .mhandler.cmd_new = qmp_marshal_input_balloon,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001485 },
1486
1487SQMP
1488balloon
1489-------
1490
1491Request VM to change its memory allocation (in bytes).
1492
1493Arguments:
1494
1495- "value": New memory allocation (json-int)
1496
1497Example:
1498
1499-> { "execute": "balloon", "arguments": { "value": 536870912 } }
1500<- { "return": {} }
1501
1502EQMP
1503
1504 {
1505 .name = "set_link",
1506 .args_type = "name:s,up:b",
Luiz Capitulino4b371562011-11-23 13:11:55 -02001507 .mhandler.cmd_new = qmp_marshal_input_set_link,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001508 },
1509
1510SQMP
1511set_link
1512--------
1513
1514Change the link status of a network adapter.
1515
1516Arguments:
1517
1518- "name": network device name (json-string)
1519- "up": status is up (json-bool)
1520
1521Example:
1522
1523-> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1524<- { "return": {} }
1525
1526EQMP
1527
1528 {
1529 .name = "getfd",
1530 .args_type = "fdname:s",
1531 .params = "getfd name",
1532 .help = "receive a file descriptor via SCM rights and assign it a name",
Corey Bryant208c9d12012-06-22 14:36:09 -04001533 .mhandler.cmd_new = qmp_marshal_input_getfd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001534 },
1535
1536SQMP
1537getfd
1538-----
1539
1540Receive a file descriptor via SCM rights and assign it a name.
1541
1542Arguments:
1543
1544- "fdname": file descriptor name (json-string)
1545
1546Example:
1547
1548-> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1549<- { "return": {} }
1550
Corey Bryant208c9d12012-06-22 14:36:09 -04001551Notes:
1552
1553(1) If the name specified by the "fdname" argument already exists,
1554 the file descriptor assigned to it will be closed and replaced
1555 by the received file descriptor.
1556(2) The 'closefd' command can be used to explicitly close the file
1557 descriptor when it is no longer needed.
1558
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001559EQMP
1560
1561 {
1562 .name = "closefd",
1563 .args_type = "fdname:s",
1564 .params = "closefd name",
1565 .help = "close a file descriptor previously passed via SCM rights",
Corey Bryant208c9d12012-06-22 14:36:09 -04001566 .mhandler.cmd_new = qmp_marshal_input_closefd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001567 },
1568
1569SQMP
1570closefd
1571-------
1572
1573Close a file descriptor previously passed via SCM rights.
1574
1575Arguments:
1576
1577- "fdname": file descriptor name (json-string)
1578
1579Example:
1580
1581-> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1582<- { "return": {} }
1583
1584EQMP
1585
Corey Bryantba1c0482012-08-14 16:43:43 -04001586 {
1587 .name = "add-fd",
1588 .args_type = "fdset-id:i?,opaque:s?",
1589 .params = "add-fd fdset-id opaque",
1590 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1591 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1592 },
1593
1594SQMP
1595add-fd
1596-------
1597
1598Add a file descriptor, that was passed via SCM rights, to an fd set.
1599
1600Arguments:
1601
1602- "fdset-id": The ID of the fd set to add the file descriptor to.
1603 (json-int, optional)
1604- "opaque": A free-form string that can be used to describe the fd.
1605 (json-string, optional)
1606
1607Return a json-object with the following information:
1608
1609- "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1610- "fd": The file descriptor that was received via SCM rights and added to the
1611 fd set. (json-int)
1612
1613Example:
1614
1615-> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1616<- { "return": { "fdset-id": 1, "fd": 3 } }
1617
1618Notes:
1619
1620(1) The list of fd sets is shared by all monitor connections.
1621(2) If "fdset-id" is not specified, a new fd set will be created.
1622
1623EQMP
1624
1625 {
1626 .name = "remove-fd",
1627 .args_type = "fdset-id:i,fd:i?",
1628 .params = "remove-fd fdset-id fd",
1629 .help = "Remove a file descriptor from an fd set",
1630 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1631 },
1632
1633SQMP
1634remove-fd
1635---------
1636
1637Remove a file descriptor from an fd set.
1638
1639Arguments:
1640
1641- "fdset-id": The ID of the fd set that the file descriptor belongs to.
1642 (json-int)
1643- "fd": The file descriptor that is to be removed. (json-int, optional)
1644
1645Example:
1646
1647-> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1648<- { "return": {} }
1649
1650Notes:
1651
1652(1) The list of fd sets is shared by all monitor connections.
1653(2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1654 removed.
1655
1656EQMP
1657
1658 {
1659 .name = "query-fdsets",
1660 .args_type = "",
1661 .help = "Return information describing all fd sets",
1662 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1663 },
1664
1665SQMP
1666query-fdsets
1667-------------
1668
1669Return information describing all fd sets.
1670
1671Arguments: None
1672
1673Example:
1674
1675-> { "execute": "query-fdsets" }
1676<- { "return": [
1677 {
1678 "fds": [
1679 {
1680 "fd": 30,
1681 "opaque": "rdonly:/path/to/file"
1682 },
1683 {
1684 "fd": 24,
1685 "opaque": "rdwr:/path/to/file"
1686 }
1687 ],
1688 "fdset-id": 1
1689 },
1690 {
1691 "fds": [
1692 {
1693 "fd": 28
1694 },
1695 {
1696 "fd": 29
1697 }
1698 ],
1699 "fdset-id": 0
1700 }
1701 ]
1702 }
1703
1704Note: The list of fd sets is shared by all monitor connections.
1705
1706EQMP
1707
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001708 {
1709 .name = "block_passwd",
Benoît Canet12d3ba82014-01-23 21:31:35 +01001710 .args_type = "device:s?,node-name:s?,password:s",
Luiz Capitulinoa4dea8a2011-11-23 13:28:21 -02001711 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001712 },
1713
1714SQMP
1715block_passwd
1716------------
1717
1718Set the password of encrypted block devices.
1719
1720Arguments:
1721
1722- "device": device name (json-string)
Benoît Canet12d3ba82014-01-23 21:31:35 +01001723- "node-name": name in the block driver state graph (json-string)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001724- "password": password (json-string)
1725
1726Example:
1727
1728-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1729 "password": "12345" } }
1730<- { "return": {} }
1731
1732EQMP
1733
1734 {
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001735 .name = "block_set_io_throttle",
Benoît Canet2024c1d2013-09-02 14:14:41 +02001736 .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?",
Luiz Capitulino80047da2011-12-14 16:49:14 -02001737 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001738 },
1739
1740SQMP
1741block_set_io_throttle
1742------------
1743
1744Change I/O throttle limits for a block drive.
1745
1746Arguments:
1747
1748- "device": device name (json-string)
Eric Blake586b5462013-08-30 14:44:11 -06001749- "bps": total throughput limit in bytes per second (json-int)
1750- "bps_rd": read throughput limit in bytes per second (json-int)
1751- "bps_wr": write throughput limit in bytes per second (json-int)
1752- "iops": total I/O operations per second (json-int)
1753- "iops_rd": read I/O operations per second (json-int)
1754- "iops_wr": write I/O operations per second (json-int)
Benoît Canet3e9fab62013-09-02 14:14:40 +02001755- "bps_max": total max in bytes (json-int)
1756- "bps_rd_max": read max in bytes (json-int)
1757- "bps_wr_max": write max in bytes (json-int)
1758- "iops_max": total I/O operations max (json-int)
1759- "iops_rd_max": read I/O operations max (json-int)
1760- "iops_wr_max": write I/O operations max (json-int)
Benoît Canet2024c1d2013-09-02 14:14:41 +02001761- "iops_size": I/O size in bytes when limiting (json-int)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001762
1763Example:
1764
1765-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
Eric Blake586b5462013-08-30 14:44:11 -06001766 "bps": 1000000,
1767 "bps_rd": 0,
1768 "bps_wr": 0,
1769 "iops": 0,
1770 "iops_rd": 0,
Benoît Canet3e9fab62013-09-02 14:14:40 +02001771 "iops_wr": 0,
1772 "bps_max": 8000000,
1773 "bps_rd_max": 0,
1774 "bps_wr_max": 0,
1775 "iops_max": 0,
1776 "iops_rd_max": 0,
Benoît Canet2024c1d2013-09-02 14:14:41 +02001777 "iops_wr_max": 0,
1778 "iops_size": 0 } }
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001779<- { "return": {} }
1780
1781EQMP
1782
1783 {
Gerd Hoffmann75721502010-10-07 12:22:54 +02001784 .name = "set_password",
1785 .args_type = "protocol:s,password:s,connected:s?",
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001786 .mhandler.cmd_new = qmp_marshal_input_set_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001787 },
1788
1789SQMP
1790set_password
1791------------
1792
1793Set the password for vnc/spice protocols.
1794
1795Arguments:
1796
1797- "protocol": protocol name (json-string)
1798- "password": password (json-string)
Alberto Garcia3599d462015-02-26 16:35:07 +02001799- "connected": [ keep | disconnect | fail ] (json-string, optional)
Gerd Hoffmann75721502010-10-07 12:22:54 +02001800
1801Example:
1802
1803-> { "execute": "set_password", "arguments": { "protocol": "vnc",
1804 "password": "secret" } }
1805<- { "return": {} }
1806
1807EQMP
1808
1809 {
1810 .name = "expire_password",
1811 .args_type = "protocol:s,time:s",
Luiz Capitulino9ad53722011-12-07 11:47:57 -02001812 .mhandler.cmd_new = qmp_marshal_input_expire_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001813 },
1814
1815SQMP
1816expire_password
1817---------------
1818
1819Set the password expire time for vnc/spice protocols.
1820
1821Arguments:
1822
1823- "protocol": protocol name (json-string)
1824- "time": [ now | never | +secs | secs ] (json-string)
1825
1826Example:
1827
1828-> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1829 "time": "+60" } }
1830<- { "return": {} }
1831
1832EQMP
1833
1834 {
Daniel P. Berrange13661082011-06-23 13:31:42 +01001835 .name = "add_client",
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001836 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
Luiz Capitulinob224e5e2012-09-13 16:52:20 -03001837 .mhandler.cmd_new = qmp_marshal_input_add_client,
Daniel P. Berrange13661082011-06-23 13:31:42 +01001838 },
1839
1840SQMP
1841add_client
1842----------
1843
1844Add a graphics client
1845
1846Arguments:
1847
1848- "protocol": protocol name (json-string)
1849- "fdname": file descriptor name (json-string)
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001850- "skipauth": whether to skip authentication (json-bool, optional)
1851- "tls": whether to perform TLS (json-bool, optional)
Daniel P. Berrange13661082011-06-23 13:31:42 +01001852
1853Example:
1854
1855-> { "execute": "add_client", "arguments": { "protocol": "vnc",
1856 "fdname": "myclient" } }
1857<- { "return": {} }
1858
1859EQMP
1860 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001861 .name = "qmp_capabilities",
1862 .args_type = "",
1863 .params = "",
1864 .help = "enable QMP capabilities",
1865 .user_print = monitor_user_noop,
1866 .mhandler.cmd_new = do_qmp_capabilities,
1867 },
1868
1869SQMP
1870qmp_capabilities
1871----------------
1872
1873Enable QMP capabilities.
1874
1875Arguments: None.
1876
1877Example:
1878
1879-> { "execute": "qmp_capabilities" }
1880<- { "return": {} }
1881
1882Note: This command must be issued before issuing any other command.
1883
Luiz Capitulino0268d972010-10-22 10:08:02 -02001884EQMP
1885
1886 {
1887 .name = "human-monitor-command",
1888 .args_type = "command-line:s,cpu-index:i?",
Luiz Capitulinod51a67b2011-11-25 17:52:45 -02001889 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
Luiz Capitulino0268d972010-10-22 10:08:02 -02001890 },
1891
1892SQMP
1893human-monitor-command
1894---------------------
1895
1896Execute a Human Monitor command.
1897
1898Arguments:
1899
1900- command-line: the command name and its arguments, just like the
1901 Human Monitor's shell (json-string)
1902- cpu-index: select the CPU number to be used by commands which access CPU
1903 data, like 'info registers'. The Monitor selects CPU 0 if this
1904 argument is not provided (json-int, optional)
1905
1906Example:
1907
1908-> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1909<- { "return": "kvm support: enabled\r\n" }
1910
1911Notes:
1912
1913(1) The Human Monitor is NOT an stable interface, this means that command
1914 names, arguments and responses can change or be removed at ANY time.
1915 Applications that rely on long term stability guarantees should NOT
1916 use this command
1917
1918(2) Limitations:
1919
1920 o This command is stateless, this means that commands that depend
1921 on state information (such as getfd) might not work
1922
1923 o Commands that prompt the user for data (eg. 'cont' when the block
1924 device is encrypted) don't currently work
1925
Luiz Capitulino82a56f02010-09-13 12:26:00 -030019263. Query Commands
1927=================
1928
1929HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1930HXCOMM this! We will possibly move query commands definitions inside those
1931HXCOMM sections, just like regular commands.
1932
1933EQMP
1934
1935SQMP
1936query-version
1937-------------
1938
1939Show QEMU version.
1940
1941Return a json-object with the following information:
1942
1943- "qemu": A json-object containing three integer values:
1944 - "major": QEMU's major version (json-int)
1945 - "minor": QEMU's minor version (json-int)
1946 - "micro": QEMU's micro version (json-int)
1947- "package": package's version (json-string)
1948
1949Example:
1950
1951-> { "execute": "query-version" }
1952<- {
1953 "return":{
1954 "qemu":{
1955 "major":0,
1956 "minor":11,
1957 "micro":5
1958 },
1959 "package":""
1960 }
1961 }
1962
1963EQMP
1964
Luiz Capitulinob9c15f12011-08-26 17:38:13 -03001965 {
1966 .name = "query-version",
1967 .args_type = "",
1968 .mhandler.cmd_new = qmp_marshal_input_query_version,
1969 },
1970
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001971SQMP
1972query-commands
1973--------------
1974
1975List QMP available commands.
1976
1977Each command is represented by a json-object, the returned value is a json-array
1978of all commands.
1979
1980Each json-object contain:
1981
1982- "name": command's name (json-string)
1983
1984Example:
1985
1986-> { "execute": "query-commands" }
1987<- {
1988 "return":[
1989 {
1990 "name":"query-balloon"
1991 },
1992 {
1993 "name":"system_powerdown"
1994 }
1995 ]
1996 }
1997
1998Note: This example has been shortened as the real response is too long.
1999
2000EQMP
2001
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -03002002 {
2003 .name = "query-commands",
2004 .args_type = "",
2005 .mhandler.cmd_new = qmp_marshal_input_query_commands,
2006 },
2007
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002008SQMP
Daniel P. Berrange48608532012-05-21 17:59:51 +01002009query-events
2010--------------
2011
2012List QMP available events.
2013
2014Each event is represented by a json-object, the returned value is a json-array
2015of all events.
2016
2017Each json-object contains:
2018
2019- "name": event's name (json-string)
2020
2021Example:
2022
2023-> { "execute": "query-events" }
2024<- {
2025 "return":[
2026 {
2027 "name":"SHUTDOWN"
2028 },
2029 {
2030 "name":"RESET"
2031 }
2032 ]
2033 }
2034
2035Note: This example has been shortened as the real response is too long.
2036
2037EQMP
2038
2039 {
2040 .name = "query-events",
2041 .args_type = "",
2042 .mhandler.cmd_new = qmp_marshal_input_query_events,
2043 },
2044
2045SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002046query-chardev
2047-------------
2048
2049Each device is represented by a json-object. The returned value is a json-array
2050of all devices.
2051
2052Each json-object contain the following:
2053
2054- "label": device's label (json-string)
2055- "filename": device's file (json-string)
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002056- "frontend-open": open/closed state of the frontend device attached to this
2057 backend (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002058
2059Example:
2060
2061-> { "execute": "query-chardev" }
2062<- {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002063 "return": [
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002064 {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002065 "label": "charchannel0",
2066 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2067 "frontend-open": false
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002068 },
2069 {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002070 "label": "charmonitor",
2071 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2072 "frontend-open": true
2073 },
2074 {
2075 "label": "charserial0",
2076 "filename": "pty:/dev/pts/2",
2077 "frontend-open": true
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002078 }
2079 ]
2080 }
2081
2082EQMP
2083
Luiz Capitulinoc5a415a2011-09-14 16:05:49 -03002084 {
2085 .name = "query-chardev",
2086 .args_type = "",
2087 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
2088 },
2089
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002090SQMP
Martin Kletzander77d1c3c2014-02-01 12:52:42 +01002091query-chardev-backends
2092-------------
2093
2094List available character device backends.
2095
2096Each backend is represented by a json-object, the returned value is a json-array
2097of all backends.
2098
2099Each json-object contains:
2100
2101- "name": backend name (json-string)
2102
2103Example:
2104
2105-> { "execute": "query-chardev-backends" }
2106<- {
2107 "return":[
2108 {
2109 "name":"udp"
2110 },
2111 {
2112 "name":"tcp"
2113 },
2114 {
2115 "name":"unix"
2116 },
2117 {
2118 "name":"spiceport"
2119 }
2120 ]
2121 }
2122
2123EQMP
2124
2125 {
2126 .name = "query-chardev-backends",
2127 .args_type = "",
2128 .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends,
2129 },
2130
2131SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002132query-block
2133-----------
2134
2135Show the block devices.
2136
2137Each block device information is stored in a json-object and the returned value
2138is a json-array of all devices.
2139
2140Each json-object contain the following:
2141
2142- "device": device name (json-string)
2143- "type": device type (json-string)
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002144 - deprecated, retained for backward compatibility
2145 - Possible values: "unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002146- "removable": true if the device is removable, false otherwise (json-bool)
2147- "locked": true if the device is locked, false otherwise (json-bool)
Michal Privoznik99f42802013-01-29 17:58:41 +01002148- "tray_open": only present if removable, true if the device has a tray,
Markus Armbrustere4def802011-09-06 18:58:53 +02002149 and it is open (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002150- "inserted": only present if the device is inserted, it is a json-object
2151 containing the following:
2152 - "file": device file name (json-string)
2153 - "ro": true if read-only, false otherwise (json-bool)
2154 - "drv": driver format name (json-string)
Stefan Hajnoczi550830f2014-09-16 15:24:24 +01002155 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002156 "file", "file", "ftp", "ftps", "host_cdrom",
2157 "host_device", "host_floppy", "http", "https",
2158 "nbd", "parallels", "qcow", "qcow2", "raw",
2159 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2160 - "backing_file": backing file name (json-string, optional)
Benoît Canet2e3e3312012-08-02 10:22:48 +02002161 - "backing_file_depth": number of files in the backing file chain (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002162 - "encrypted": true if encrypted, false otherwise (json-bool)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002163 - "bps": limit total bytes per second (json-int)
2164 - "bps_rd": limit read bytes per second (json-int)
2165 - "bps_wr": limit write bytes per second (json-int)
2166 - "iops": limit total I/O operations per second (json-int)
2167 - "iops_rd": limit read operations per second (json-int)
2168 - "iops_wr": limit write operations per second (json-int)
Benoît Canet3e9fab62013-09-02 14:14:40 +02002169 - "bps_max": total max in bytes (json-int)
2170 - "bps_rd_max": read max in bytes (json-int)
2171 - "bps_wr_max": write max in bytes (json-int)
2172 - "iops_max": total I/O operations max (json-int)
2173 - "iops_rd_max": read I/O operations max (json-int)
2174 - "iops_wr_max": write I/O operations max (json-int)
Benoît Canet2024c1d2013-09-02 14:14:41 +02002175 - "iops_size": I/O size when limiting by iops (json-int)
Peter Lieven465bee12014-05-18 00:58:19 +02002176 - "detect_zeroes": detect and optimize zero writing (json-string)
2177 - Possible values: "off", "on", "unmap"
Francesco Romanie2462112015-01-12 14:11:13 +01002178 - "write_threshold": write offset threshold in bytes, a event will be
2179 emitted if crossed. Zero if disabled (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08002180 - "image": the detail of the image, it is a json-object containing
2181 the following:
2182 - "filename": image file name (json-string)
2183 - "format": image format (json-string)
2184 - "virtual-size": image capacity in bytes (json-int)
2185 - "dirty-flag": true if image is not cleanly closed, not present
2186 means clean (json-bool, optional)
2187 - "actual-size": actual size on disk in bytes of the image, not
2188 present when image does not support thin
2189 provision (json-int, optional)
2190 - "cluster-size": size of a cluster in bytes, not present if image
2191 format does not support it (json-int, optional)
2192 - "encrypted": true if the image is encrypted, not present means
2193 false or the image format does not support
2194 encryption (json-bool, optional)
2195 - "backing_file": backing file name, not present means no backing
2196 file is used or the image format does not
2197 support backing file chain
2198 (json-string, optional)
2199 - "full-backing-filename": full path of the backing file, not
2200 present if it equals backing_file or no
2201 backing file is used
2202 (json-string, optional)
2203 - "backing-filename-format": the format of the backing file, not
2204 present means unknown or no backing
2205 file (json-string, optional)
2206 - "snapshots": the internal snapshot info, it is an optional list
2207 of json-object containing the following:
2208 - "id": unique snapshot id (json-string)
2209 - "name": snapshot name (json-string)
2210 - "vm-state-size": size of the VM state in bytes (json-int)
2211 - "date-sec": UTC date of the snapshot in seconds (json-int)
2212 - "date-nsec": fractional part in nanoseconds to be used with
Eric Blake586b5462013-08-30 14:44:11 -06002213 date-sec (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08002214 - "vm-clock-sec": VM clock relative to boot in seconds
2215 (json-int)
2216 - "vm-clock-nsec": fractional part in nanoseconds to be used
2217 with vm-clock-sec (json-int)
2218 - "backing-image": the detail of the backing image, it is an
2219 optional json-object only present when a
2220 backing image present for this image
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002221
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002222- "io-status": I/O operation status, only present if the device supports it
2223 and the VM is configured to stop on errors. It's always reset
2224 to "ok" when the "cont" command is issued (json_string, optional)
2225 - Possible values: "ok", "failed", "nospace"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002226
2227Example:
2228
2229-> { "execute": "query-block" }
2230<- {
2231 "return":[
2232 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002233 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002234 "device":"ide0-hd0",
2235 "locked":false,
2236 "removable":false,
2237 "inserted":{
2238 "ro":false,
2239 "drv":"qcow2",
2240 "encrypted":false,
Wenchao Xia553a7e82013-06-06 12:27:59 +08002241 "file":"disks/test.qcow2",
2242 "backing_file_depth":1,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002243 "bps":1000000,
2244 "bps_rd":0,
2245 "bps_wr":0,
2246 "iops":1000000,
2247 "iops_rd":0,
2248 "iops_wr":0,
Benoît Canet3e9fab62013-09-02 14:14:40 +02002249 "bps_max": 8000000,
2250 "bps_rd_max": 0,
2251 "bps_wr_max": 0,
2252 "iops_max": 0,
2253 "iops_rd_max": 0,
2254 "iops_wr_max": 0,
Benoît Canet2024c1d2013-09-02 14:14:41 +02002255 "iops_size": 0,
Peter Lieven465bee12014-05-18 00:58:19 +02002256 "detect_zeroes": "on",
Francesco Romanie2462112015-01-12 14:11:13 +01002257 "write_threshold": 0,
Wenchao Xia553a7e82013-06-06 12:27:59 +08002258 "image":{
2259 "filename":"disks/test.qcow2",
2260 "format":"qcow2",
2261 "virtual-size":2048000,
2262 "backing_file":"base.qcow2",
2263 "full-backing-filename":"disks/base.qcow2",
2264 "backing-filename-format:"qcow2",
2265 "snapshots":[
2266 {
2267 "id": "1",
2268 "name": "snapshot1",
2269 "vm-state-size": 0,
2270 "date-sec": 10000200,
2271 "date-nsec": 12,
2272 "vm-clock-sec": 206,
2273 "vm-clock-nsec": 30
2274 }
2275 ],
2276 "backing-image":{
2277 "filename":"disks/base.qcow2",
2278 "format":"qcow2",
2279 "virtual-size":2048000
2280 }
2281 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002282 },
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002283 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002284 },
2285 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002286 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002287 "device":"ide1-cd0",
2288 "locked":false,
2289 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002290 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002291 },
2292 {
2293 "device":"floppy0",
2294 "locked":false,
2295 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002296 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002297 },
2298 {
2299 "device":"sd0",
2300 "locked":false,
2301 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002302 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002303 }
2304 ]
2305 }
2306
2307EQMP
2308
Luiz Capitulinob2023812011-09-21 17:16:47 -03002309 {
2310 .name = "query-block",
2311 .args_type = "",
2312 .mhandler.cmd_new = qmp_marshal_input_query_block,
2313 },
2314
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002315SQMP
2316query-blockstats
2317----------------
2318
2319Show block device statistics.
2320
2321Each device statistic information is stored in a json-object and the returned
2322value is a json-array of all devices.
2323
2324Each json-object contain the following:
2325
2326- "device": device name (json-string)
2327- "stats": A json-object with the statistics information, it contains:
2328 - "rd_bytes": bytes read (json-int)
2329 - "wr_bytes": bytes written (json-int)
2330 - "rd_operations": read operations (json-int)
2331 - "wr_operations": write operations (json-int)
Christoph Hellwige8045d62011-08-22 00:25:58 +02002332 - "flush_operations": cache flush operations (json-int)
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002333 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2334 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2335 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002336 - "wr_highest_offset": Highest offset of a sector written since the
2337 BlockDriverState has been opened (json-int)
Peter Lievenf4564d52015-02-02 14:52:18 +01002338 - "rd_merged": number of read requests that have been merged into
2339 another request (json-int)
2340 - "wr_merged": number of write requests that have been merged into
2341 another request (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002342- "parent": Contains recursively the statistics of the underlying
2343 protocol (e.g. the host file for a qcow2 image). If there is
2344 no underlying protocol, this field is omitted
2345 (json-object, optional)
2346
2347Example:
2348
2349-> { "execute": "query-blockstats" }
2350<- {
2351 "return":[
2352 {
2353 "device":"ide0-hd0",
2354 "parent":{
2355 "stats":{
2356 "wr_highest_offset":3686448128,
2357 "wr_bytes":9786368,
2358 "wr_operations":751,
2359 "rd_bytes":122567168,
2360 "rd_operations":36772
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002361 "wr_total_times_ns":313253456
2362 "rd_total_times_ns":3465673657
2363 "flush_total_times_ns":49653
Christoph Hellwige8045d62011-08-22 00:25:58 +02002364 "flush_operations":61,
Peter Lievenf4564d52015-02-02 14:52:18 +01002365 "rd_merged":0,
2366 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002367 }
2368 },
2369 "stats":{
2370 "wr_highest_offset":2821110784,
2371 "wr_bytes":9786368,
2372 "wr_operations":692,
2373 "rd_bytes":122739200,
2374 "rd_operations":36604
Christoph Hellwige8045d62011-08-22 00:25:58 +02002375 "flush_operations":51,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002376 "wr_total_times_ns":313253456
2377 "rd_total_times_ns":3465673657
Peter Lievenf4564d52015-02-02 14:52:18 +01002378 "flush_total_times_ns":49653,
2379 "rd_merged":0,
2380 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002381 }
2382 },
2383 {
2384 "device":"ide1-cd0",
2385 "stats":{
2386 "wr_highest_offset":0,
2387 "wr_bytes":0,
2388 "wr_operations":0,
2389 "rd_bytes":0,
2390 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002391 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002392 "wr_total_times_ns":0
2393 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002394 "flush_total_times_ns":0,
2395 "rd_merged":0,
2396 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002397 }
2398 },
2399 {
2400 "device":"floppy0",
2401 "stats":{
2402 "wr_highest_offset":0,
2403 "wr_bytes":0,
2404 "wr_operations":0,
2405 "rd_bytes":0,
2406 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002407 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002408 "wr_total_times_ns":0
2409 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002410 "flush_total_times_ns":0,
2411 "rd_merged":0,
2412 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002413 }
2414 },
2415 {
2416 "device":"sd0",
2417 "stats":{
2418 "wr_highest_offset":0,
2419 "wr_bytes":0,
2420 "wr_operations":0,
2421 "rd_bytes":0,
2422 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002423 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002424 "wr_total_times_ns":0
2425 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002426 "flush_total_times_ns":0,
2427 "rd_merged":0,
2428 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002429 }
2430 }
2431 ]
2432 }
2433
2434EQMP
2435
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03002436 {
2437 .name = "query-blockstats",
Fam Zhengf71eaa72014-10-31 11:32:57 +08002438 .args_type = "query-nodes:b?",
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03002439 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
2440 },
2441
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002442SQMP
2443query-cpus
2444----------
2445
2446Show CPU information.
2447
2448Return a json-array. Each CPU is represented by a json-object, which contains:
2449
2450- "CPU": CPU index (json-int)
2451- "current": true if this is the current CPU, false otherwise (json-bool)
2452- "halted": true if the cpu is halted, false otherwise (json-bool)
2453- Current program counter. The key's name depends on the architecture:
2454 "pc": i386/x86_64 (json-int)
2455 "nip": PPC (json-int)
2456 "pc" and "npc": sparc (json-int)
2457 "PC": mips (json-int)
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002458- "thread_id": ID of the underlying host thread (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002459
2460Example:
2461
2462-> { "execute": "query-cpus" }
2463<- {
2464 "return":[
2465 {
2466 "CPU":0,
2467 "current":true,
2468 "halted":false,
2469 "pc":3227107138
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002470 "thread_id":3134
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002471 },
2472 {
2473 "CPU":1,
2474 "current":false,
2475 "halted":true,
2476 "pc":7108165
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002477 "thread_id":3135
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002478 }
2479 ]
2480 }
2481
2482EQMP
2483
Luiz Capitulinode0b36b2011-09-21 16:38:35 -03002484 {
2485 .name = "query-cpus",
2486 .args_type = "",
2487 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2488 },
2489
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002490SQMP
Stefan Hajnoczidc3dd0d2014-02-27 11:48:42 +01002491query-iothreads
2492---------------
2493
2494Returns a list of information about each iothread.
2495
2496Note this list excludes the QEMU main loop thread, which is not declared
2497using the -object iothread command-line option. It is always the main thread
2498of the process.
2499
2500Return a json-array. Each iothread is represented by a json-object, which contains:
2501
2502- "id": name of iothread (json-str)
2503- "thread-id": ID of the underlying host thread (json-int)
2504
2505Example:
2506
2507-> { "execute": "query-iothreads" }
2508<- {
2509 "return":[
2510 {
2511 "id":"iothread0",
2512 "thread-id":3134
2513 },
2514 {
2515 "id":"iothread1",
2516 "thread-id":3135
2517 }
2518 ]
2519 }
2520
2521EQMP
2522
2523 {
2524 .name = "query-iothreads",
2525 .args_type = "",
2526 .mhandler.cmd_new = qmp_marshal_input_query_iothreads,
2527 },
2528
2529SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002530query-pci
2531---------
2532
2533PCI buses and devices information.
2534
2535The returned value is a json-array of all buses. Each bus is represented by
2536a json-object, which has a key with a json-array of all PCI devices attached
2537to it. Each device is represented by a json-object.
2538
2539The bus json-object contains the following:
2540
2541- "bus": bus number (json-int)
2542- "devices": a json-array of json-objects, each json-object represents a
2543 PCI device
2544
2545The PCI device json-object contains the following:
2546
2547- "bus": identical to the parent's bus number (json-int)
2548- "slot": slot number (json-int)
2549- "function": function number (json-int)
2550- "class_info": a json-object containing:
2551 - "desc": device class description (json-string, optional)
2552 - "class": device class number (json-int)
2553- "id": a json-object containing:
2554 - "device": device ID (json-int)
2555 - "vendor": vendor ID (json-int)
2556- "irq": device's IRQ if assigned (json-int, optional)
2557- "qdev_id": qdev id string (json-string)
2558- "pci_bridge": It's a json-object, only present if this device is a
2559 PCI bridge, contains:
2560 - "bus": bus number (json-int)
2561 - "secondary": secondary bus number (json-int)
2562 - "subordinate": subordinate bus number (json-int)
2563 - "io_range": I/O memory range information, a json-object with the
2564 following members:
2565 - "base": base address, in bytes (json-int)
2566 - "limit": limit address, in bytes (json-int)
2567 - "memory_range": memory range information, a json-object with the
2568 following members:
2569 - "base": base address, in bytes (json-int)
2570 - "limit": limit address, in bytes (json-int)
2571 - "prefetchable_range": Prefetchable memory range information, a
2572 json-object with the following members:
2573 - "base": base address, in bytes (json-int)
2574 - "limit": limit address, in bytes (json-int)
2575 - "devices": a json-array of PCI devices if there's any attached, each
2576 each element is represented by a json-object, which contains
2577 the same members of the 'PCI device json-object' described
2578 above (optional)
2579- "regions": a json-array of json-objects, each json-object represents a
2580 memory region of this device
2581
2582The memory range json-object contains the following:
2583
2584- "base": base memory address (json-int)
2585- "limit": limit value (json-int)
2586
2587The region json-object can be an I/O region or a memory region, an I/O region
2588json-object contains the following:
2589
2590- "type": "io" (json-string, fixed)
2591- "bar": BAR number (json-int)
2592- "address": memory address (json-int)
2593- "size": memory size (json-int)
2594
2595A memory region json-object contains the following:
2596
2597- "type": "memory" (json-string, fixed)
2598- "bar": BAR number (json-int)
2599- "address": memory address (json-int)
2600- "size": memory size (json-int)
2601- "mem_type_64": true or false (json-bool)
2602- "prefetch": true or false (json-bool)
2603
2604Example:
2605
2606-> { "execute": "query-pci" }
2607<- {
2608 "return":[
2609 {
2610 "bus":0,
2611 "devices":[
2612 {
2613 "bus":0,
2614 "qdev_id":"",
2615 "slot":0,
2616 "class_info":{
2617 "class":1536,
2618 "desc":"Host bridge"
2619 },
2620 "id":{
2621 "device":32902,
2622 "vendor":4663
2623 },
2624 "function":0,
2625 "regions":[
2626
2627 ]
2628 },
2629 {
2630 "bus":0,
2631 "qdev_id":"",
2632 "slot":1,
2633 "class_info":{
2634 "class":1537,
2635 "desc":"ISA bridge"
2636 },
2637 "id":{
2638 "device":32902,
2639 "vendor":28672
2640 },
2641 "function":0,
2642 "regions":[
2643
2644 ]
2645 },
2646 {
2647 "bus":0,
2648 "qdev_id":"",
2649 "slot":1,
2650 "class_info":{
2651 "class":257,
2652 "desc":"IDE controller"
2653 },
2654 "id":{
2655 "device":32902,
2656 "vendor":28688
2657 },
2658 "function":1,
2659 "regions":[
2660 {
2661 "bar":4,
2662 "size":16,
2663 "address":49152,
2664 "type":"io"
2665 }
2666 ]
2667 },
2668 {
2669 "bus":0,
2670 "qdev_id":"",
2671 "slot":2,
2672 "class_info":{
2673 "class":768,
2674 "desc":"VGA controller"
2675 },
2676 "id":{
2677 "device":4115,
2678 "vendor":184
2679 },
2680 "function":0,
2681 "regions":[
2682 {
2683 "prefetch":true,
2684 "mem_type_64":false,
2685 "bar":0,
2686 "size":33554432,
2687 "address":4026531840,
2688 "type":"memory"
2689 },
2690 {
2691 "prefetch":false,
2692 "mem_type_64":false,
2693 "bar":1,
2694 "size":4096,
2695 "address":4060086272,
2696 "type":"memory"
2697 },
2698 {
2699 "prefetch":false,
2700 "mem_type_64":false,
2701 "bar":6,
2702 "size":65536,
2703 "address":-1,
2704 "type":"memory"
2705 }
2706 ]
2707 },
2708 {
2709 "bus":0,
2710 "qdev_id":"",
2711 "irq":11,
2712 "slot":4,
2713 "class_info":{
2714 "class":1280,
2715 "desc":"RAM controller"
2716 },
2717 "id":{
2718 "device":6900,
2719 "vendor":4098
2720 },
2721 "function":0,
2722 "regions":[
2723 {
2724 "bar":0,
2725 "size":32,
2726 "address":49280,
2727 "type":"io"
2728 }
2729 ]
2730 }
2731 ]
2732 }
2733 ]
2734 }
2735
2736Note: This example has been shortened as the real response is too long.
2737
2738EQMP
2739
Luiz Capitulino79627472011-10-21 14:15:33 -02002740 {
2741 .name = "query-pci",
2742 .args_type = "",
2743 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2744 },
2745
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002746SQMP
2747query-kvm
2748---------
2749
2750Show KVM information.
2751
2752Return a json-object with the following information:
2753
2754- "enabled": true if KVM support is enabled, false otherwise (json-bool)
2755- "present": true if QEMU has KVM support, false otherwise (json-bool)
2756
2757Example:
2758
2759-> { "execute": "query-kvm" }
2760<- { "return": { "enabled": true, "present": true } }
2761
2762EQMP
2763
Luiz Capitulino292a2602011-09-12 15:10:53 -03002764 {
2765 .name = "query-kvm",
2766 .args_type = "",
2767 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2768 },
2769
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002770SQMP
2771query-status
2772------------
2773
2774Return a json-object with the following information:
2775
2776- "running": true if the VM is running, or false if it is paused (json-bool)
2777- "singlestep": true if the VM is in single step mode,
2778 false otherwise (json-bool)
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002779- "status": one of the following values (json-string)
2780 "debug" - QEMU is running on a debugger
2781 "inmigrate" - guest is paused waiting for an incoming migration
2782 "internal-error" - An internal error that prevents further guest
2783 execution has occurred
2784 "io-error" - the last IOP has failed and the device is configured
2785 to pause on I/O errors
2786 "paused" - guest has been paused via the 'stop' command
2787 "postmigrate" - guest is paused following a successful 'migrate'
2788 "prelaunch" - QEMU was started with -S and guest has not started
2789 "finish-migrate" - guest is paused to finish the migration process
2790 "restore-vm" - guest is paused to restore VM state
2791 "running" - guest is actively running
2792 "save-vm" - guest is paused to save the VM state
2793 "shutdown" - guest is shut down (and -no-shutdown is in use)
2794 "watchdog" - the watchdog action is configured to pause and
2795 has been triggered
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002796
2797Example:
2798
2799-> { "execute": "query-status" }
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002800<- { "return": { "running": true, "singlestep": false, "status": "running" } }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002801
2802EQMP
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -03002803
2804 {
2805 .name = "query-status",
2806 .args_type = "",
2807 .mhandler.cmd_new = qmp_marshal_input_query_status,
2808 },
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002809
2810SQMP
2811query-mice
2812----------
2813
2814Show VM mice information.
2815
2816Each mouse is represented by a json-object, the returned value is a json-array
2817of all mice.
2818
2819The mouse json-object contains the following:
2820
2821- "name": mouse's name (json-string)
2822- "index": mouse's index (json-int)
2823- "current": true if this mouse is receiving events, false otherwise (json-bool)
2824- "absolute": true if the mouse generates absolute input events (json-bool)
2825
2826Example:
2827
2828-> { "execute": "query-mice" }
2829<- {
2830 "return":[
2831 {
2832 "name":"QEMU Microsoft Mouse",
2833 "index":0,
2834 "current":false,
2835 "absolute":false
2836 },
2837 {
2838 "name":"QEMU PS/2 Mouse",
2839 "index":1,
2840 "current":true,
2841 "absolute":true
2842 }
2843 ]
2844 }
2845
2846EQMP
2847
Luiz Capitulinoe235cec2011-09-21 15:29:55 -03002848 {
2849 .name = "query-mice",
2850 .args_type = "",
2851 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2852 },
2853
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002854SQMP
2855query-vnc
2856---------
2857
2858Show VNC server information.
2859
2860Return a json-object with server information. Connected clients are returned
2861as a json-array of json-objects.
2862
2863The main json-object contains the following:
2864
2865- "enabled": true or false (json-bool)
2866- "host": server's IP address (json-string)
2867- "family": address family (json-string)
2868 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2869- "service": server's port number (json-string)
2870- "auth": authentication method (json-string)
2871 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2872 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2873 "vencrypt+plain", "vencrypt+tls+none",
2874 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2875 "vencrypt+tls+vnc", "vencrypt+x509+none",
2876 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2877 "vencrypt+x509+vnc", "vnc"
2878- "clients": a json-array of all connected clients
2879
2880Clients are described by a json-object, each one contain the following:
2881
2882- "host": client's IP address (json-string)
2883- "family": address family (json-string)
2884 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2885- "service": client's port number (json-string)
2886- "x509_dname": TLS dname (json-string, optional)
2887- "sasl_username": SASL username (json-string, optional)
2888
2889Example:
2890
2891-> { "execute": "query-vnc" }
2892<- {
2893 "return":{
2894 "enabled":true,
2895 "host":"0.0.0.0",
2896 "service":"50402",
2897 "auth":"vnc",
2898 "family":"ipv4",
2899 "clients":[
2900 {
2901 "host":"127.0.0.1",
2902 "service":"50401",
2903 "family":"ipv4"
2904 }
2905 ]
2906 }
2907 }
2908
2909EQMP
2910
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02002911 {
2912 .name = "query-vnc",
2913 .args_type = "",
2914 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2915 },
Gerd Hoffmanndf887682014-12-17 15:49:44 +01002916 {
2917 .name = "query-vnc-servers",
2918 .args_type = "",
2919 .mhandler.cmd_new = qmp_marshal_input_query_vnc_servers,
2920 },
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02002921
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002922SQMP
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002923query-spice
2924-----------
2925
2926Show SPICE server information.
2927
2928Return a json-object with server information. Connected clients are returned
2929as a json-array of json-objects.
2930
2931The main json-object contains the following:
2932
2933- "enabled": true or false (json-bool)
2934- "host": server's IP address (json-string)
2935- "port": server's port number (json-int, optional)
2936- "tls-port": server's port number (json-int, optional)
2937- "auth": authentication method (json-string)
2938 - Possible values: "none", "spice"
2939- "channels": a json-array of all active channels clients
2940
2941Channels are described by a json-object, each one contain the following:
2942
2943- "host": client's IP address (json-string)
2944- "family": address family (json-string)
2945 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2946- "port": client's port number (json-string)
2947- "connection-id": spice connection id. All channels with the same id
2948 belong to the same spice session (json-int)
2949- "channel-type": channel type. "1" is the main control channel, filter for
2950 this one if you want track spice sessions only (json-int)
2951- "channel-id": channel id. Usually "0", might be different needed when
2952 multiple channels of the same type exist, such as multiple
2953 display channels in a multihead setup (json-int)
Alberto Garcia3599d462015-02-26 16:35:07 +02002954- "tls": whether the channel is encrypted (json-bool)
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002955
2956Example:
2957
2958-> { "execute": "query-spice" }
2959<- {
2960 "return": {
2961 "enabled": true,
2962 "auth": "spice",
2963 "port": 5920,
2964 "tls-port": 5921,
2965 "host": "0.0.0.0",
2966 "channels": [
2967 {
2968 "port": "54924",
2969 "family": "ipv4",
2970 "channel-type": 1,
2971 "connection-id": 1804289383,
2972 "host": "127.0.0.1",
2973 "channel-id": 0,
2974 "tls": true
2975 },
2976 {
2977 "port": "36710",
2978 "family": "ipv4",
2979 "channel-type": 4,
2980 "connection-id": 1804289383,
2981 "host": "127.0.0.1",
2982 "channel-id": 0,
2983 "tls": false
2984 },
2985 [ ... more channels follow ... ]
2986 ]
2987 }
2988 }
2989
2990EQMP
2991
Luiz Capitulinod1f29642011-10-20 17:01:33 -02002992#if defined(CONFIG_SPICE)
2993 {
2994 .name = "query-spice",
2995 .args_type = "",
2996 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2997 },
2998#endif
2999
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01003000SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003001query-name
3002----------
3003
3004Show VM name.
3005
3006Return a json-object with the following information:
3007
3008- "name": VM's name (json-string, optional)
3009
3010Example:
3011
3012-> { "execute": "query-name" }
3013<- { "return": { "name": "qemu-name" } }
3014
3015EQMP
3016
Anthony Liguori48a32be2011-09-02 12:34:48 -05003017 {
3018 .name = "query-name",
3019 .args_type = "",
3020 .mhandler.cmd_new = qmp_marshal_input_query_name,
3021 },
3022
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003023SQMP
3024query-uuid
3025----------
3026
3027Show VM UUID.
3028
3029Return a json-object with the following information:
3030
3031- "UUID": Universally Unique Identifier (json-string)
3032
3033Example:
3034
3035-> { "execute": "query-uuid" }
3036<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3037
3038EQMP
3039
Luiz Capitulinoefab7672011-09-13 17:16:25 -03003040 {
3041 .name = "query-uuid",
3042 .args_type = "",
3043 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
3044 },
3045
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003046SQMP
Amos Kong1f8f9872013-04-25 17:50:35 +08003047query-command-line-options
3048--------------------------
3049
3050Show command line option schema.
3051
3052Return a json-array of command line option schema for all options (or for
3053the given option), returning an error if the given option doesn't exist.
3054
3055Each array entry contains the following:
3056
3057- "option": option name (json-string)
3058- "parameters": a json-array describes all parameters of the option:
3059 - "name": parameter name (json-string)
3060 - "type": parameter type (one of 'string', 'boolean', 'number',
3061 or 'size')
3062 - "help": human readable description of the parameter
3063 (json-string, optional)
Chunyan Liue36af942014-06-05 17:20:43 +08003064 - "default": default value string for the parameter
3065 (json-string, optional)
Amos Kong1f8f9872013-04-25 17:50:35 +08003066
3067Example:
3068
3069-> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3070<- { "return": [
3071 {
3072 "parameters": [
3073 {
3074 "name": "romfile",
3075 "type": "string"
3076 },
3077 {
3078 "name": "bootindex",
3079 "type": "number"
3080 }
3081 ],
3082 "option": "option-rom"
3083 }
3084 ]
3085 }
3086
3087EQMP
3088
3089 {
3090 .name = "query-command-line-options",
3091 .args_type = "option:s?",
3092 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
3093 },
3094
3095SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003096query-migrate
3097-------------
3098
3099Migration status.
3100
3101Return a json-object. If migration is active there will be another json-object
3102with RAM migration status and if block migration is active another one with
3103block migration status.
3104
3105The main json-object contains the following:
3106
3107- "status": migration status (json-string)
Peter Feiner3b695952014-05-16 10:40:47 -04003108 - Possible values: "setup", "active", "completed", "failed", "cancelled"
Juan Quintela7aa939a2012-08-18 13:17:10 +02003109- "total-time": total amount of ms since migration started. If
3110 migration has ended, it returns the total migration
Juan Quintela817c6042013-02-11 15:11:10 +01003111 time (json-int)
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003112- "setup-time" amount of setup time in milliseconds _before_ the
3113 iterations begin but _after_ the QMP command is issued.
3114 This is designed to provide an accounting of any activities
3115 (such as RDMA pinning) which may be expensive, but do not
3116 actually occur during the iterative migration rounds
3117 themselves. (json-int)
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02003118- "downtime": only present when migration has finished correctly
3119 total amount in ms for downtime that happened (json-int)
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003120- "expected-downtime": only present while migration is active
3121 total amount in ms for downtime that was calculated on
Juan Quintela817c6042013-02-11 15:11:10 +01003122 the last bitmap round (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003123- "ram": only present if "status" is "active", it is a json-object with the
Juan Quintela817c6042013-02-11 15:11:10 +01003124 following RAM information:
3125 - "transferred": amount transferred in bytes (json-int)
3126 - "remaining": amount remaining to transfer in bytes (json-int)
3127 - "total": total amount of memory in bytes (json-int)
3128 - "duplicate": number of pages filled entirely with the same
3129 byte (json-int)
3130 These are sent over the wire much more efficiently.
Peter Lievenf1c72792013-03-26 10:58:37 +01003131 - "skipped": number of skipped zero pages (json-int)
Stefan Weil805a2502013-04-28 11:49:57 +02003132 - "normal" : number of whole pages transferred. I.e. they
Juan Quintela817c6042013-02-11 15:11:10 +01003133 were not sent as duplicate or xbzrle pages (json-int)
3134 - "normal-bytes" : number of bytes transferred in whole
3135 pages. This is just normal pages times size of one page,
3136 but this way upper levels don't need to care about page
3137 size (json-int)
ChenLiang58570ed2014-04-04 17:57:55 +08003138 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003139- "disk": only present if "status" is "active" and it is a block migration,
Juan Quintela817c6042013-02-11 15:11:10 +01003140 it is a json-object with the following disk information:
3141 - "transferred": amount transferred in bytes (json-int)
3142 - "remaining": amount remaining to transfer in bytes json-int)
3143 - "total": total disk size in bytes (json-int)
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003144- "xbzrle-cache": only present if XBZRLE is active.
3145 It is a json-object with the following XBZRLE information:
Juan Quintela817c6042013-02-11 15:11:10 +01003146 - "cache-size": XBZRLE cache size in bytes
3147 - "bytes": number of bytes transferred for XBZRLE compressed pages
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003148 - "pages": number of XBZRLE compressed pages
Juan Quintela817c6042013-02-11 15:11:10 +01003149 - "cache-miss": number of XBRZRLE page cache misses
ChenLiang8bc39232014-04-04 17:57:56 +08003150 - "cache-miss-rate": rate of XBRZRLE page cache misses
Juan Quintela817c6042013-02-11 15:11:10 +01003151 - "overflow": number of times XBZRLE overflows. This means
3152 that the XBZRLE encoding was bigger than just sent the
3153 whole page, and then we sent the whole page instead (as as
3154 normal page).
3155
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003156Examples:
3157
31581. Before the first migration
3159
3160-> { "execute": "query-migrate" }
3161<- { "return": {} }
3162
31632. Migration is done and has succeeded
3164
3165-> { "execute": "query-migrate" }
Orit Wasserman004d4c12012-08-06 21:42:56 +03003166<- { "return": {
3167 "status": "completed",
3168 "ram":{
3169 "transferred":123,
3170 "remaining":123,
3171 "total":246,
3172 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003173 "setup-time":12345,
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02003174 "downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003175 "duplicate":123,
3176 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003177 "normal-bytes":123456,
3178 "dirty-sync-count":15
Orit Wasserman004d4c12012-08-06 21:42:56 +03003179 }
3180 }
3181 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003182
31833. Migration is done and has failed
3184
3185-> { "execute": "query-migrate" }
3186<- { "return": { "status": "failed" } }
3187
31884. Migration is being performed and is not a block migration:
3189
3190-> { "execute": "query-migrate" }
3191<- {
3192 "return":{
3193 "status":"active",
3194 "ram":{
3195 "transferred":123,
3196 "remaining":123,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03003197 "total":246,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003198 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003199 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003200 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003201 "duplicate":123,
3202 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003203 "normal-bytes":123456,
3204 "dirty-sync-count":15
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003205 }
3206 }
3207 }
3208
32095. Migration is being performed and is a block migration:
3210
3211-> { "execute": "query-migrate" }
3212<- {
3213 "return":{
3214 "status":"active",
3215 "ram":{
3216 "total":1057024,
3217 "remaining":1053304,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03003218 "transferred":3720,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003219 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003220 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003221 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003222 "duplicate":123,
3223 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003224 "normal-bytes":123456,
3225 "dirty-sync-count":15
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003226 },
3227 "disk":{
3228 "total":20971520,
3229 "remaining":20880384,
3230 "transferred":91136
3231 }
3232 }
3233 }
3234
Orit Wassermanf36d55a2012-08-06 21:42:57 +030032356. Migration is being performed and XBZRLE is active:
3236
3237-> { "execute": "query-migrate" }
3238<- {
3239 "return":{
3240 "status":"active",
3241 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3242 "ram":{
3243 "total":1057024,
3244 "remaining":1053304,
3245 "transferred":3720,
3246 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003247 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003248 "expected-downtime":12345,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003249 "duplicate":10,
3250 "normal":3333,
ChenLiang58570ed2014-04-04 17:57:55 +08003251 "normal-bytes":3412992,
3252 "dirty-sync-count":15
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003253 },
3254 "xbzrle-cache":{
3255 "cache-size":67108864,
3256 "bytes":20971520,
3257 "pages":2444343,
3258 "cache-miss":2244,
ChenLiang8bc39232014-04-04 17:57:56 +08003259 "cache-miss-rate":0.123,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003260 "overflow":34434
3261 }
3262 }
3263 }
3264
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003265EQMP
3266
Luiz Capitulino791e7c82011-09-13 17:37:16 -03003267 {
3268 .name = "query-migrate",
3269 .args_type = "",
3270 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
3271 },
3272
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003273SQMP
Orit Wasserman00458432012-08-06 21:42:48 +03003274migrate-set-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01003275------------------------
Orit Wasserman00458432012-08-06 21:42:48 +03003276
3277Enable/Disable migration capabilities
3278
Juan Quintela817c6042013-02-11 15:11:10 +01003279- "xbzrle": XBZRLE support
zhanghailiangd6d69732014-12-09 14:38:37 +08003280- "rdma-pin-all": pin all pages when using RDMA during migration
3281- "auto-converge": throttle down guest to help convergence of migration
3282- "zero-blocks": compress zero blocks during block migration
Orit Wasserman00458432012-08-06 21:42:48 +03003283
3284Arguments:
3285
3286Example:
3287
3288-> { "execute": "migrate-set-capabilities" , "arguments":
3289 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3290
3291EQMP
3292
3293 {
3294 .name = "migrate-set-capabilities",
3295 .args_type = "capabilities:O",
3296 .params = "capability:s,state:b",
3297 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
3298 },
3299SQMP
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003300query-migrate-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01003301--------------------------
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003302
3303Query current migration capabilities
3304
3305- "capabilities": migration capabilities state
3306 - "xbzrle" : XBZRLE state (json-bool)
zhanghailiangd6d69732014-12-09 14:38:37 +08003307 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3308 - "auto-converge" : Auto Converge state (json-bool)
3309 - "zero-blocks" : Zero Blocks state (json-bool)
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003310
3311Arguments:
3312
3313Example:
3314
3315-> { "execute": "query-migrate-capabilities" }
Orit Wassermandbca1b32013-01-31 09:12:17 +02003316<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3317
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003318EQMP
3319
3320 {
3321 .name = "query-migrate-capabilities",
3322 .args_type = "",
3323 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
3324 },
3325
3326SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003327query-balloon
3328-------------
3329
3330Show balloon information.
3331
3332Make an asynchronous request for balloon info. When the request completes a
3333json-object will be returned containing the following data:
3334
3335- "actual": current balloon value in bytes (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003336
3337Example:
3338
3339-> { "execute": "query-balloon" }
3340<- {
3341 "return":{
3342 "actual":1073741824,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003343 }
3344 }
3345
3346EQMP
3347
Luiz Capitulino96637bc2011-10-21 11:41:37 -02003348 {
3349 .name = "query-balloon",
3350 .args_type = "",
3351 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
3352 },
Anthony Liguorib4b12c62011-12-12 14:29:34 -06003353
3354 {
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00003355 .name = "query-block-jobs",
3356 .args_type = "",
3357 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
3358 },
3359
3360 {
Anthony Liguorib4b12c62011-12-12 14:29:34 -06003361 .name = "qom-list",
3362 .args_type = "path:s",
3363 .mhandler.cmd_new = qmp_marshal_input_qom_list,
3364 },
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06003365
3366 {
3367 .name = "qom-set",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01003368 .args_type = "path:s,property:s,value:q",
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06003369 .mhandler.cmd_new = qmp_qom_set,
3370 },
3371
3372 {
3373 .name = "qom-get",
3374 .args_type = "path:s,property:s",
3375 .mhandler.cmd_new = qmp_qom_get,
3376 },
Luiz Capitulino270b2432011-12-08 11:45:55 -02003377
3378 {
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02003379 .name = "nbd-server-start",
3380 .args_type = "addr:q",
3381 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
3382 },
3383 {
3384 .name = "nbd-server-add",
3385 .args_type = "device:B,writable:b?",
3386 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
3387 },
3388 {
3389 .name = "nbd-server-stop",
3390 .args_type = "",
3391 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
3392 },
3393
3394 {
Luiz Capitulino270b2432011-12-08 11:45:55 -02003395 .name = "change-vnc-password",
3396 .args_type = "password:s",
3397 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
3398 },
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06003399 {
3400 .name = "qom-list-types",
3401 .args_type = "implements:s?,abstract:b?",
3402 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
3403 },
Anthony Liguori1daa31b2012-08-10 11:04:09 -05003404
3405 {
3406 .name = "device-list-properties",
3407 .args_type = "typename:s",
3408 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
3409 },
3410
Anthony Liguori01d3c802012-08-10 11:04:11 -05003411 {
3412 .name = "query-machines",
3413 .args_type = "",
3414 .mhandler.cmd_new = qmp_marshal_input_query_machines,
3415 },
3416
Anthony Liguorie4e31c62012-08-10 11:04:13 -05003417 {
3418 .name = "query-cpu-definitions",
3419 .args_type = "",
3420 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
3421 },
3422
Daniel P. Berrange99afc912012-08-20 15:31:38 +01003423 {
3424 .name = "query-target",
3425 .args_type = "",
3426 .mhandler.cmd_new = qmp_marshal_input_query_target,
3427 },
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003428
3429 {
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003430 .name = "query-tpm",
3431 .args_type = "",
3432 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
3433 },
3434
Corey Bryant28c4fa32013-03-20 12:34:49 -04003435SQMP
3436query-tpm
3437---------
3438
3439Return information about the TPM device.
3440
3441Arguments: None
3442
3443Example:
3444
3445-> { "execute": "query-tpm" }
3446<- { "return":
3447 [
3448 { "model": "tpm-tis",
3449 "options":
3450 { "type": "passthrough",
3451 "data":
3452 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3453 "path": "/dev/tpm0"
3454 }
3455 },
3456 "id": "tpm0"
3457 }
3458 ]
3459 }
3460
3461EQMP
3462
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003463 {
3464 .name = "query-tpm-models",
3465 .args_type = "",
3466 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
3467 },
3468
Corey Bryant28c4fa32013-03-20 12:34:49 -04003469SQMP
3470query-tpm-models
3471----------------
3472
3473Return a list of supported TPM models.
3474
3475Arguments: None
3476
3477Example:
3478
3479-> { "execute": "query-tpm-models" }
3480<- { "return": [ "tpm-tis" ] }
3481
3482EQMP
3483
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003484 {
3485 .name = "query-tpm-types",
3486 .args_type = "",
3487 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
3488 },
3489
Corey Bryant28c4fa32013-03-20 12:34:49 -04003490SQMP
3491query-tpm-types
3492---------------
3493
3494Return a list of supported TPM types.
3495
3496Arguments: None
3497
3498Example:
3499
3500-> { "execute": "query-tpm-types" }
3501<- { "return": [ "passthrough" ] }
3502
3503EQMP
3504
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003505 {
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003506 .name = "chardev-add",
3507 .args_type = "id:s,backend:q",
3508 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
3509 },
3510
3511SQMP
3512chardev-add
3513----------------
3514
3515Add a chardev.
3516
3517Arguments:
3518
3519- "id": the chardev's ID, must be unique (json-string)
3520- "backend": chardev backend type + parameters
3521
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003522Examples:
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003523
3524-> { "execute" : "chardev-add",
3525 "arguments" : { "id" : "foo",
3526 "backend" : { "type" : "null", "data" : {} } } }
3527<- { "return": {} }
3528
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003529-> { "execute" : "chardev-add",
3530 "arguments" : { "id" : "bar",
3531 "backend" : { "type" : "file",
3532 "data" : { "out" : "/tmp/bar.log" } } } }
3533<- { "return": {} }
3534
Gerd Hoffmann0a1a7fa2012-12-20 14:39:13 +01003535-> { "execute" : "chardev-add",
3536 "arguments" : { "id" : "baz",
3537 "backend" : { "type" : "pty", "data" : {} } } }
3538<- { "return": { "pty" : "/dev/pty/42" } }
3539
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003540EQMP
3541
3542 {
3543 .name = "chardev-remove",
3544 .args_type = "id:s",
3545 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3546 },
3547
3548
3549SQMP
3550chardev-remove
3551--------------
3552
3553Remove a chardev.
3554
3555Arguments:
3556
3557- "id": the chardev's ID, must exist and not be in use (json-string)
3558
3559Example:
3560
3561-> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3562<- { "return": {} }
3563
3564EQMP
Amos Kongb1be4282013-06-14 15:45:52 +08003565 {
3566 .name = "query-rx-filter",
3567 .args_type = "name:s?",
3568 .mhandler.cmd_new = qmp_marshal_input_query_rx_filter,
3569 },
3570
3571SQMP
3572query-rx-filter
3573---------------
3574
3575Show rx-filter information.
3576
3577Returns a json-array of rx-filter information for all NICs (or for the
3578given NIC), returning an error if the given NIC doesn't exist, or
3579given NIC doesn't support rx-filter querying, or given net client
3580isn't a NIC.
3581
3582The query will clear the event notification flag of each NIC, then qemu
3583will start to emit event to QMP monitor.
3584
3585Each array entry contains the following:
3586
3587- "name": net client name (json-string)
3588- "promiscuous": promiscuous mode is enabled (json-bool)
3589- "multicast": multicast receive state (one of 'normal', 'none', 'all')
3590- "unicast": unicast receive state (one of 'normal', 'none', 'all')
Amos Kongf7bc8ef2014-03-26 08:19:43 +08003591- "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
Amos Kongb1be4282013-06-14 15:45:52 +08003592- "broadcast-allowed": allow to receive broadcast (json-bool)
3593- "multicast-overflow": multicast table is overflowed (json-bool)
3594- "unicast-overflow": unicast table is overflowed (json-bool)
3595- "main-mac": main macaddr string (json-string)
3596- "vlan-table": a json-array of active vlan id
3597- "unicast-table": a json-array of unicast macaddr string
3598- "multicast-table": a json-array of multicast macaddr string
3599
3600Example:
3601
3602-> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
3603<- { "return": [
3604 {
3605 "promiscuous": true,
3606 "name": "vnet0",
3607 "main-mac": "52:54:00:12:34:56",
3608 "unicast": "normal",
Amos Kongf7bc8ef2014-03-26 08:19:43 +08003609 "vlan": "normal",
Amos Kongb1be4282013-06-14 15:45:52 +08003610 "vlan-table": [
3611 4,
3612 0
3613 ],
3614 "unicast-table": [
3615 ],
3616 "multicast": "normal",
3617 "multicast-overflow": false,
3618 "unicast-overflow": false,
3619 "multicast-table": [
3620 "01:00:5e:00:00:01",
3621 "33:33:00:00:00:01",
3622 "33:33:ff:12:34:56"
3623 ],
3624 "broadcast-allowed": false
3625 }
3626 ]
3627 }
3628
3629EQMP
Kevin Wolfd26c9a12013-09-23 15:26:03 +02003630
3631 {
3632 .name = "blockdev-add",
3633 .args_type = "options:q",
3634 .mhandler.cmd_new = qmp_marshal_input_blockdev_add,
3635 },
3636
3637SQMP
3638blockdev-add
3639------------
3640
3641Add a block device.
3642
3643Arguments:
3644
3645- "options": block driver options
3646
3647Example (1):
3648
3649-> { "execute": "blockdev-add",
3650 "arguments": { "options" : { "driver": "qcow2",
3651 "file": { "driver": "file",
3652 "filename": "test.qcow2" } } } }
3653<- { "return": {} }
3654
3655Example (2):
3656
3657-> { "execute": "blockdev-add",
3658 "arguments": {
3659 "options": {
3660 "driver": "qcow2",
3661 "id": "my_disk",
3662 "discard": "unmap",
3663 "cache": {
3664 "direct": true,
3665 "writeback": true
3666 },
3667 "file": {
3668 "driver": "file",
3669 "filename": "/tmp/test.qcow2"
3670 },
3671 "backing": {
3672 "driver": "raw",
3673 "file": {
3674 "driver": "file",
3675 "filename": "/dev/fdset/4"
3676 }
3677 }
3678 }
3679 }
3680 }
3681
3682<- { "return": {} }
3683
3684EQMP
Benoît Canetc13163f2014-01-23 21:31:34 +01003685
3686 {
3687 .name = "query-named-block-nodes",
3688 .args_type = "",
3689 .mhandler.cmd_new = qmp_marshal_input_query_named_block_nodes,
3690 },
3691
3692SQMP
3693@query-named-block-nodes
3694------------------------
3695
3696Return a list of BlockDeviceInfo for all the named block driver nodes
3697
3698Example:
3699
3700-> { "execute": "query-named-block-nodes" }
3701<- { "return": [ { "ro":false,
3702 "drv":"qcow2",
3703 "encrypted":false,
3704 "file":"disks/test.qcow2",
3705 "node-name": "my-node",
3706 "backing_file_depth":1,
3707 "bps":1000000,
3708 "bps_rd":0,
3709 "bps_wr":0,
3710 "iops":1000000,
3711 "iops_rd":0,
3712 "iops_wr":0,
3713 "bps_max": 8000000,
3714 "bps_rd_max": 0,
3715 "bps_wr_max": 0,
3716 "iops_max": 0,
3717 "iops_rd_max": 0,
3718 "iops_wr_max": 0,
3719 "iops_size": 0,
Francesco Romanie2462112015-01-12 14:11:13 +01003720 "write_threshold": 0,
Benoît Canetc13163f2014-01-23 21:31:34 +01003721 "image":{
3722 "filename":"disks/test.qcow2",
3723 "format":"qcow2",
3724 "virtual-size":2048000,
3725 "backing_file":"base.qcow2",
3726 "full-backing-filename":"disks/base.qcow2",
3727 "backing-filename-format:"qcow2",
3728 "snapshots":[
3729 {
3730 "id": "1",
3731 "name": "snapshot1",
3732 "vm-state-size": 0,
3733 "date-sec": 10000200,
3734 "date-nsec": 12,
3735 "vm-clock-sec": 206,
3736 "vm-clock-nsec": 30
3737 }
3738 ],
3739 "backing-image":{
3740 "filename":"disks/base.qcow2",
3741 "format":"qcow2",
3742 "virtual-size":2048000
3743 }
Michael S. Tsirkinc0594512014-06-16 15:20:18 +03003744 } } ] }
Benoît Canetc13163f2014-01-23 21:31:34 +01003745
3746EQMP
Hu Tao76b5d852014-06-16 18:05:41 +08003747
3748 {
3749 .name = "query-memdev",
3750 .args_type = "",
3751 .mhandler.cmd_new = qmp_marshal_input_query_memdev,
3752 },
3753
3754SQMP
3755query-memdev
3756------------
3757
3758Show memory devices information.
3759
3760
3761Example (1):
3762
3763-> { "execute": "query-memdev" }
3764<- { "return": [
3765 {
3766 "size": 536870912,
3767 "merge": false,
3768 "dump": true,
3769 "prealloc": false,
3770 "host-nodes": [0, 1],
3771 "policy": "bind"
3772 },
3773 {
3774 "size": 536870912,
3775 "merge": false,
3776 "dump": true,
3777 "prealloc": true,
3778 "host-nodes": [2, 3],
3779 "policy": "preferred"
3780 }
3781 ]
3782 }
3783
3784EQMP
Igor Mammedov6f2e2732014-06-16 19:12:25 +02003785
3786 {
3787 .name = "query-memory-devices",
3788 .args_type = "",
3789 .mhandler.cmd_new = qmp_marshal_input_query_memory_devices,
3790 },
3791
3792SQMP
3793@query-memory-devices
3794--------------------
3795
3796Return a list of memory devices.
3797
3798Example:
3799-> { "execute": "query-memory-devices" }
3800<- { "return": [ { "data":
3801 { "addr": 5368709120,
3802 "hotpluggable": true,
3803 "hotplugged": true,
3804 "id": "d1",
3805 "memdev": "/objects/memX",
3806 "node": 0,
3807 "size": 1073741824,
3808 "slot": 0},
3809 "type": "dimm"
3810 } ] }
3811EQMP
Igor Mammedov02419bc2014-06-16 19:12:28 +02003812
3813 {
3814 .name = "query-acpi-ospm-status",
3815 .args_type = "",
3816 .mhandler.cmd_new = qmp_marshal_input_query_acpi_ospm_status,
3817 },
3818
3819SQMP
3820@query-acpi-ospm-status
3821--------------------
3822
3823Return list of ACPIOSTInfo for devices that support status reporting
3824via ACPI _OST method.
3825
3826Example:
3827-> { "execute": "query-acpi-ospm-status" }
3828<- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
3829 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
3830 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
3831 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
3832 ]}
3833EQMP
Marcelo Tosattif2ae8ab2014-06-24 18:55:11 -03003834
3835#if defined TARGET_I386
3836 {
3837 .name = "rtc-reset-reinjection",
3838 .args_type = "",
3839 .mhandler.cmd_new = qmp_marshal_input_rtc_reset_reinjection,
3840 },
3841#endif
3842
3843SQMP
3844rtc-reset-reinjection
3845---------------------
3846
3847Reset the RTC interrupt reinjection backlog.
3848
3849Arguments: None.
3850
3851Example:
3852
3853-> { "execute": "rtc-reset-reinjection" }
3854<- { "return": {} }
Lluís Vilanova1dde0f42014-08-25 13:19:57 +02003855EQMP
Marcelo Tosattif2ae8ab2014-06-24 18:55:11 -03003856
Lluís Vilanova1dde0f42014-08-25 13:19:57 +02003857 {
3858 .name = "trace-event-get-state",
3859 .args_type = "name:s",
3860 .mhandler.cmd_new = qmp_marshal_input_trace_event_get_state,
3861 },
3862
3863SQMP
3864trace-event-get-state
3865---------------------
3866
3867Query the state of events.
3868
3869Example:
3870
3871-> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
3872<- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
3873EQMP
3874
3875 {
3876 .name = "trace-event-set-state",
3877 .args_type = "name:s,enable:b,ignore-unavailable:b?",
3878 .mhandler.cmd_new = qmp_marshal_input_trace_event_set_state,
3879 },
3880
3881SQMP
3882trace-event-set-state
3883---------------------
3884
3885Set the state of events.
3886
3887Example:
3888
3889-> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
3890<- { "return": {} }
Marcelo Tosattif2ae8ab2014-06-24 18:55:11 -03003891EQMP
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003892
3893 {
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003894 .name = "x-input-send-event",
Amos Kong51fc4472014-11-07 12:41:25 +08003895 .args_type = "console:i?,events:q",
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003896 .mhandler.cmd_new = qmp_marshal_input_x_input_send_event,
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003897 },
3898
3899SQMP
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003900@x-input-send-event
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003901-----------------
3902
3903Send input event to guest.
3904
3905Arguments:
3906
Amos Kong51fc4472014-11-07 12:41:25 +08003907- "console": console index. (json-int, optional)
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003908- "events": list of input events.
3909
3910The consoles are visible in the qom tree, under
3911/backend/console[$index]. They have a device link and head property, so
3912it is possible to map which console belongs to which device and display.
3913
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003914Note: this command is experimental, and not a stable API.
3915
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003916Example (1):
3917
3918Press left mouse button.
3919
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003920-> { "execute": "x-input-send-event",
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003921 "arguments": { "console": 0,
3922 "events": [ { "type": "btn",
Amos Kongb5369dd2014-11-25 16:05:56 +08003923 "data" : { "down": true, "button": "Left" } } ] } }
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003924<- { "return": {} }
3925
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003926-> { "execute": "x-input-send-event",
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003927 "arguments": { "console": 0,
3928 "events": [ { "type": "btn",
Amos Kongb5369dd2014-11-25 16:05:56 +08003929 "data" : { "down": false, "button": "Left" } } ] } }
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003930<- { "return": {} }
3931
3932Example (2):
3933
3934Press ctrl-alt-del.
3935
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003936-> { "execute": "x-input-send-event",
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003937 "arguments": { "console": 0, "events": [
3938 { "type": "key", "data" : { "down": true,
3939 "key": {"type": "qcode", "data": "ctrl" } } },
3940 { "type": "key", "data" : { "down": true,
3941 "key": {"type": "qcode", "data": "alt" } } },
3942 { "type": "key", "data" : { "down": true,
3943 "key": {"type": "qcode", "data": "delete" } } } ] } }
3944<- { "return": {} }
3945
3946Example (3):
3947
3948Move mouse pointer to absolute coordinates (20000, 400).
3949
Gerd Hoffmanndf5b2ad2014-11-25 14:54:17 +01003950-> { "execute": "x-input-send-event" ,
Marcelo Tosatti50c66172014-09-30 18:10:17 -03003951 "arguments": { "console": 0, "events": [
3952 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
3953 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
3954<- { "return": {} }
3955
3956EQMP
Francesco Romanie2462112015-01-12 14:11:13 +01003957
3958 {
3959 .name = "block-set-write-threshold",
3960 .args_type = "node-name:s,write-threshold:l",
3961 .mhandler.cmd_new = qmp_marshal_input_block_set_write_threshold,
3962 },
3963
3964SQMP
3965block-set-write-threshold
3966------------
3967
3968Change the write threshold for a block drive. The threshold is an offset,
3969thus must be non-negative. Default is no write threshold.
3970Setting the threshold to zero disables it.
3971
3972Arguments:
3973
3974- "node-name": the node name in the block driver state graph (json-string)
3975- "write-threshold": the write threshold in bytes (json-int)
3976
3977Example:
3978
3979-> { "execute": "block-set-write-threshold",
3980 "arguments": { "node-name": "mydev",
3981 "write-threshold": 17179869184 } }
3982<- { "return": {} }
3983
3984EQMP