blob: 09f48bada5895dbc0b9fa0cc3df44b7281498e0e [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",
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300279 .mhandler.cmd_new = do_device_add,
280 },
281
282SQMP
283device_add
284----------
285
286Add a device.
287
288Arguments:
289
290- "driver": the name of the new device's driver (json-string)
291- "bus": the device's parent bus (device tree path, json-string, optional)
292- "id": the device's ID, must be unique (json-string)
293- device properties
294
295Example:
296
297-> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
298<- { "return": {} }
299
300Notes:
301
302(1) For detailed information about this command, please refer to the
303 'docs/qdev-device-use.txt' file.
304
305(2) It's possible to list device properties by running QEMU with the
306 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
307
308EQMP
309
310 {
311 .name = "device_del",
312 .args_type = "id:s",
Luiz Capitulinoa15fef22012-03-29 12:38:50 -0300313 .mhandler.cmd_new = qmp_marshal_input_device_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300314 },
315
316SQMP
317device_del
318----------
319
320Remove a device.
321
322Arguments:
323
324- "id": the device's ID (json-string)
325
326Example:
327
328-> { "execute": "device_del", "arguments": { "id": "net1" } }
329<- { "return": {} }
330
331EQMP
332
333 {
Amos Konge4c8f002012-08-31 10:56:26 +0800334 .name = "send-key",
Paolo Bonzini43d0a2c2015-04-15 13:30:04 +0200335 .args_type = "keys:q,hold-time:i?",
Amos Konge4c8f002012-08-31 10:56:26 +0800336 .mhandler.cmd_new = qmp_marshal_input_send_key,
337 },
338
339SQMP
340send-key
341----------
342
343Send keys to VM.
344
345Arguments:
346
347keys array:
Amos Kongf9b1d9b2013-07-16 19:52:14 +0800348 - "key": key sequence (a json-array of key union values,
349 union can be number or qcode enum)
Amos Konge4c8f002012-08-31 10:56:26 +0800350
351- hold-time: time to delay key up events, milliseconds. Defaults to 100
352 (json-int, optional)
353
354Example:
355
356-> { "execute": "send-key",
Amos Kongf9b1d9b2013-07-16 19:52:14 +0800357 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
358 { "type": "qcode", "data": "alt" },
359 { "type": "qcode", "data": "delete" } ] } }
Amos Konge4c8f002012-08-31 10:56:26 +0800360<- { "return": {} }
361
362EQMP
363
364 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300365 .name = "cpu",
366 .args_type = "index:i",
Luiz Capitulino755f1962011-10-06 14:31:39 -0300367 .mhandler.cmd_new = qmp_marshal_input_cpu,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300368 },
369
370SQMP
371cpu
372---
373
374Set the default CPU.
375
376Arguments:
377
378- "index": the CPU's index (json-int)
379
380Example:
381
382-> { "execute": "cpu", "arguments": { "index": 0 } }
383<- { "return": {} }
384
385Note: CPUs' indexes are obtained with the 'query-cpus' command.
386
387EQMP
388
389 {
Igor Mammedov69ca3ea2013-04-30 15:41:25 +0200390 .name = "cpu-add",
391 .args_type = "id:i",
392 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
393 },
394
395SQMP
396cpu-add
397-------
398
399Adds virtual cpu
400
401Arguments:
402
403- "id": cpu id (json-int)
404
405Example:
406
407-> { "execute": "cpu-add", "arguments": { "id": 2 } }
408<- { "return": {} }
409
410EQMP
411
412 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300413 .name = "memsave",
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200414 .args_type = "val:l,size:i,filename:s,cpu:i?",
415 .mhandler.cmd_new = qmp_marshal_input_memsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300416 },
417
418SQMP
419memsave
420-------
421
422Save to disk virtual memory dump starting at 'val' of size 'size'.
423
424Arguments:
425
426- "val": the starting address (json-int)
427- "size": the memory size, in bytes (json-int)
428- "filename": file path (json-string)
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -0200429- "cpu": virtual CPU index (json-int, optional)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300430
431Example:
432
433-> { "execute": "memsave",
434 "arguments": { "val": 10,
435 "size": 100,
436 "filename": "/tmp/virtual-mem-dump" } }
437<- { "return": {} }
438
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300439EQMP
440
441 {
442 .name = "pmemsave",
443 .args_type = "val:l,size:i,filename:s",
Luiz Capitulino6d3962b2011-11-22 17:26:46 -0200444 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300445 },
446
447SQMP
448pmemsave
449--------
450
451Save to disk physical memory dump starting at 'val' of size 'size'.
452
453Arguments:
454
455- "val": the starting address (json-int)
456- "size": the memory size, in bytes (json-int)
457- "filename": file path (json-string)
458
459Example:
460
461-> { "execute": "pmemsave",
462 "arguments": { "val": 10,
463 "size": 100,
464 "filename": "/tmp/physical-mem-dump" } }
465<- { "return": {} }
466
467EQMP
468
469 {
Lai Jiangshana4046662011-03-07 17:05:15 +0800470 .name = "inject-nmi",
471 .args_type = "",
Luiz Capitulinoab49ab52011-11-23 12:55:53 -0200472 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
Lai Jiangshana4046662011-03-07 17:05:15 +0800473 },
474
475SQMP
476inject-nmi
477----------
478
Alexey Kardashevskiy9cb805f2014-08-20 22:16:33 +1000479Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
Lai Jiangshana4046662011-03-07 17:05:15 +0800480
481Arguments: None.
482
483Example:
484
485-> { "execute": "inject-nmi" }
486<- { "return": {} }
487
Luiz Capitulinode253f12012-07-27 16:18:16 -0300488Note: inject-nmi fails when the guest doesn't support injecting.
Lai Jiangshana4046662011-03-07 17:05:15 +0800489
490EQMP
491
492 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100493 .name = "ringbuf-write",
Markus Armbruster82e59a62013-02-06 21:27:14 +0100494 .args_type = "device:s,data:s,format:s?",
Markus Armbruster3949e592013-02-06 21:27:24 +0100495 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
Lei Li1f590cf2013-01-25 00:03:20 +0800496 },
497
498SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100499ringbuf-write
Lei Li1f590cf2013-01-25 00:03:20 +0800500-------------
501
Markus Armbruster3949e592013-02-06 21:27:24 +0100502Write to a ring buffer character device.
Lei Li1f590cf2013-01-25 00:03:20 +0800503
504Arguments:
505
Markus Armbruster3949e592013-02-06 21:27:24 +0100506- "device": ring buffer character device name (json-string)
507- "data": data to write (json-string)
508- "format": data format (json-string, optional)
509 - Possible values: "utf8" (default), "base64"
510 Bug: invalid base64 is currently not rejected.
511 Whitespace *is* invalid.
Lei Li1f590cf2013-01-25 00:03:20 +0800512
513Example:
514
Markus Armbruster3949e592013-02-06 21:27:24 +0100515-> { "execute": "ringbuf-write",
516 "arguments": { "device": "foo",
Lei Li1f590cf2013-01-25 00:03:20 +0800517 "data": "abcdefgh",
518 "format": "utf8" } }
519<- { "return": {} }
520
521EQMP
522
523 {
Markus Armbruster3949e592013-02-06 21:27:24 +0100524 .name = "ringbuf-read",
Lei Li49b6d722013-01-25 00:03:21 +0800525 .args_type = "device:s,size:i,format:s?",
Markus Armbruster3949e592013-02-06 21:27:24 +0100526 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
Lei Li49b6d722013-01-25 00:03:21 +0800527 },
528
529SQMP
Markus Armbruster3949e592013-02-06 21:27:24 +0100530ringbuf-read
Lei Li49b6d722013-01-25 00:03:21 +0800531-------------
532
Markus Armbruster3949e592013-02-06 21:27:24 +0100533Read from a ring buffer character device.
Lei Li49b6d722013-01-25 00:03:21 +0800534
535Arguments:
536
Markus Armbruster3949e592013-02-06 21:27:24 +0100537- "device": ring buffer character device name (json-string)
538- "size": how many bytes to read at most (json-int)
539 - Number of data bytes, not number of characters in encoded data
540- "format": data format (json-string, optional)
541 - Possible values: "utf8" (default), "base64"
542 - Naturally, format "utf8" works only when the ring buffer
543 contains valid UTF-8 text. Invalid UTF-8 sequences get
544 replaced. Bug: replacement doesn't work. Bug: can screw
545 up on encountering NUL characters, after the ring buffer
546 lost data, and when reading stops because the size limit
547 is reached.
Lei Li49b6d722013-01-25 00:03:21 +0800548
549Example:
550
Markus Armbruster3949e592013-02-06 21:27:24 +0100551-> { "execute": "ringbuf-read",
552 "arguments": { "device": "foo",
Lei Li49b6d722013-01-25 00:03:21 +0800553 "size": 1000,
554 "format": "utf8" } }
Markus Armbruster3ab651f2013-02-06 21:27:15 +0100555<- {"return": "abcdefgh"}
Lei Li49b6d722013-01-25 00:03:21 +0800556
557EQMP
558
559 {
Stefano Stabellinia7ae8352012-01-25 12:24:51 +0000560 .name = "xen-save-devices-state",
561 .args_type = "filename:F",
562 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
563 },
564
565SQMP
566xen-save-devices-state
567-------
568
569Save the state of all devices to file. The RAM and the block devices
570of the VM are not saved by this command.
571
572Arguments:
573
574- "filename": the file to save the state of the devices to as binary
575data. See xen-save-devices-state.txt for a description of the binary
576format.
577
578Example:
579
580-> { "execute": "xen-save-devices-state",
581 "arguments": { "filename": "/tmp/save" } }
582<- { "return": {} }
583
584EQMP
585
586 {
Anthony PERARD39f42432012-10-03 13:48:19 +0000587 .name = "xen-set-global-dirty-log",
588 .args_type = "enable:b",
589 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
590 },
591
592SQMP
593xen-set-global-dirty-log
594-------
595
596Enable or disable the global dirty log mode.
597
598Arguments:
599
600- "enable": Enable it or disable it.
601
602Example:
603
604-> { "execute": "xen-set-global-dirty-log",
605 "arguments": { "enable": true } }
606<- { "return": {} }
607
608EQMP
609
610 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300611 .name = "migrate",
612 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
Luiz Capitulinoe1c37d02011-12-05 14:48:01 -0200613 .mhandler.cmd_new = qmp_marshal_input_migrate,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300614 },
615
616SQMP
617migrate
618-------
619
620Migrate to URI.
621
622Arguments:
623
624- "blk": block migration, full disk copy (json-bool, optional)
625- "inc": incremental disk copy (json-bool, optional)
626- "uri": Destination URI (json-string)
627
628Example:
629
630-> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
631<- { "return": {} }
632
633Notes:
634
635(1) The 'query-migrate' command should be used to check migration's progress
636 and final result (this information is provided by the 'status' member)
637(2) All boolean arguments default to false
638(3) The user Monitor's "detach" argument is invalid in QMP and should not
639 be used
640
641EQMP
642
643 {
644 .name = "migrate_cancel",
645 .args_type = "",
Luiz Capitulino6cdedb02011-11-27 22:54:09 -0200646 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300647 },
648
649SQMP
650migrate_cancel
651--------------
652
653Cancel the current migration.
654
655Arguments: None.
656
657Example:
658
659-> { "execute": "migrate_cancel" }
660<- { "return": {} }
661
662EQMP
Dr. David Alan Gilbertbf1ae1f2015-02-19 11:40:28 +0000663
664 {
665 .name = "migrate-incoming",
666 .args_type = "uri:s",
667 .mhandler.cmd_new = qmp_marshal_input_migrate_incoming,
668 },
669
670SQMP
671migrate-incoming
672----------------
673
674Continue an incoming migration
675
676Arguments:
677
678- "uri": Source/listening URI (json-string)
679
680Example:
681
682-> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
683<- { "return": {} }
684
685Notes:
686
687(1) QEMU must be started with -incoming defer to allow migrate-incoming to
688 be used
689(2) The uri format is the same as to -incoming
690
691EQMP
692 {
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300693 .name = "migrate-set-cache-size",
694 .args_type = "value:o",
695 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
696 },
697
698SQMP
699migrate-set-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100700----------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300701
702Set cache size to be used by XBZRLE migration, the cache size will be rounded
703down to the nearest power of 2
704
705Arguments:
706
707- "value": cache size in bytes (json-int)
708
709Example:
710
711-> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
712<- { "return": {} }
713
714EQMP
715 {
716 .name = "query-migrate-cache-size",
717 .args_type = "",
718 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
719 },
720
721SQMP
722query-migrate-cache-size
Juan Quintela817c6042013-02-11 15:11:10 +0100723------------------------
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +0300724
725Show cache size to be used by XBZRLE migration
726
727returns a json-object with the following information:
728- "size" : json-int
729
730Example:
731
732-> { "execute": "query-migrate-cache-size" }
733<- { "return": 67108864 }
734
735EQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300736
737 {
738 .name = "migrate_set_speed",
Wen Congyang3a019b62010-11-25 09:06:05 +0800739 .args_type = "value:o",
Luiz Capitulino3dc85382011-11-28 11:59:37 -0200740 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300741 },
742
743SQMP
744migrate_set_speed
745-----------------
746
747Set maximum speed for migrations.
748
749Arguments:
750
Luiz Capitulino5569fd72010-12-15 17:56:18 -0200751- "value": maximum speed, in bytes per second (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300752
753Example:
754
755-> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
756<- { "return": {} }
757
758EQMP
759
760 {
761 .name = "migrate_set_downtime",
762 .args_type = "value:T",
Luiz Capitulino4f0a9932011-11-27 23:18:01 -0200763 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300764 },
765
766SQMP
767migrate_set_downtime
768--------------------
769
770Set maximum tolerated downtime (in seconds) for migrations.
771
772Arguments:
773
774- "value": maximum downtime (json-number)
775
776Example:
777
778-> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
779<- { "return": {} }
780
781EQMP
782
783 {
Jes Sorensenff73edf2011-03-09 14:31:06 +0100784 .name = "client_migrate_info",
785 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
786 .params = "protocol hostname port tls-port cert-subject",
787 .help = "send migration info to spice/vnc client",
Yonit Halperinedc5cb12011-10-17 10:03:18 +0200788 .mhandler.cmd_async = client_migrate_info,
789 .flags = MONITOR_CMD_ASYNC,
Jes Sorensenff73edf2011-03-09 14:31:06 +0100790 },
791
792SQMP
793client_migrate_info
794------------------
795
796Set the spice/vnc connection info for the migration target. The spice/vnc
797server will ask the spice/vnc client to automatically reconnect using the
798new parameters (if specified) once the vm migration finished successfully.
799
800Arguments:
801
802- "protocol": protocol: "spice" or "vnc" (json-string)
803- "hostname": migration target hostname (json-string)
804- "port": spice/vnc tcp port for plaintext channels (json-int, optional)
805- "tls-port": spice tcp port for tls-secured channels (json-int, optional)
806- "cert-subject": server certificate subject (json-string, optional)
807
808Example:
809
810-> { "execute": "client_migrate_info",
811 "arguments": { "protocol": "spice",
812 "hostname": "virt42.lab.kraxel.org",
813 "port": 1234 } }
814<- { "return": {} }
815
816EQMP
817
818 {
Wen Congyang783e9b42012-05-07 12:10:47 +0800819 .name = "dump-guest-memory",
qiaonuohanb53ccc32014-02-18 14:11:36 +0800820 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
821 .params = "-p protocol [begin] [length] [format]",
Wen Congyang783e9b42012-05-07 12:10:47 +0800822 .help = "dump guest memory to file",
Wen Congyang783e9b42012-05-07 12:10:47 +0800823 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
824 },
825
826SQMP
827dump
828
829
830Dump guest memory to file. The file can be processed with crash or gdb.
831
832Arguments:
833
834- "paging": do paging to get guest's memory mapping (json-bool)
835- "protocol": destination file(started with "file:") or destination file
836 descriptor (started with "fd:") (json-string)
837- "begin": the starting physical address. It's optional, and should be specified
838 with length together (json-int)
839- "length": the memory size, in bytes. It's optional, and should be specified
840 with begin together (json-int)
qiaonuohanb53ccc32014-02-18 14:11:36 +0800841- "format": the format of guest memory dump. It's optional, and can be
842 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
843 conflict with paging and filter, ie. begin and length (json-string)
Wen Congyang783e9b42012-05-07 12:10:47 +0800844
845Example:
846
847-> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
848<- { "return": {} }
849
850Notes:
851
852(1) All boolean arguments default to false
853
854EQMP
855
856 {
qiaonuohan7d6dc7f2014-02-18 14:11:38 +0800857 .name = "query-dump-guest-memory-capability",
858 .args_type = "",
859 .mhandler.cmd_new = qmp_marshal_input_query_dump_guest_memory_capability,
860 },
861
862SQMP
863query-dump-guest-memory-capability
864----------
865
866Show available formats for 'dump-guest-memory'
867
868Example:
869
870-> { "execute": "query-dump-guest-memory-capability" }
871<- { "return": { "formats":
872 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
873
874EQMP
875
876 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300877 .name = "netdev_add",
878 .args_type = "netdev:O",
Luiz Capitulino928059a2012-04-18 17:34:15 -0300879 .mhandler.cmd_new = qmp_netdev_add,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300880 },
881
882SQMP
883netdev_add
884----------
885
886Add host network device.
887
888Arguments:
889
890- "type": the device type, "tap", "user", ... (json-string)
891- "id": the device's ID, must be unique (json-string)
892- device options
893
894Example:
895
896-> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
897<- { "return": {} }
898
Markus Armbrusteraf347aa2013-02-22 18:31:51 +0100899Note: The supported device options are the same ones supported by the '-netdev'
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300900 command-line argument, which are listed in the '-help' output or QEMU's
901 manual
902
903EQMP
904
905 {
906 .name = "netdev_del",
907 .args_type = "id:s",
Luiz Capitulino5f964152012-04-16 14:36:32 -0300908 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
Luiz Capitulino82a56f02010-09-13 12:26:00 -0300909 },
910
911SQMP
912netdev_del
913----------
914
915Remove host network device.
916
917Arguments:
918
919- "id": the device's ID, must be unique (json-string)
920
921Example:
922
923-> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
924<- { "return": {} }
925
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100926
927EQMP
928
929 {
Paolo Bonzinicff8b2c2013-12-20 23:21:10 +0100930 .name = "object-add",
931 .args_type = "qom-type:s,id:s,props:q?",
932 .mhandler.cmd_new = qmp_object_add,
933 },
934
935SQMP
936object-add
937----------
938
939Create QOM object.
940
941Arguments:
942
943- "qom-type": the object's QOM type, i.e. the class name (json-string)
944- "id": the object's ID, must be unique (json-string)
945- "props": a dictionary of object property values (optional, json-dict)
946
947Example:
948
949-> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
950 "props": { "filename": "/dev/hwrng" } } }
951<- { "return": {} }
952
953EQMP
954
955 {
Paolo Bonziniab2d0532013-12-20 23:21:09 +0100956 .name = "object-del",
957 .args_type = "id:s",
958 .mhandler.cmd_new = qmp_marshal_input_object_del,
959 },
960
961SQMP
962object-del
963----------
964
965Remove QOM object.
966
967Arguments:
968
969- "id": the object's ID (json-string)
970
971Example:
972
973-> { "execute": "object-del", "arguments": { "id": "rng1" } }
974<- { "return": {} }
975
976
977EQMP
978
979
980 {
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100981 .name = "block_resize",
Benoît Canet3b1dbd12014-01-23 21:31:37 +0100982 .args_type = "device:s?,node-name:s?,size:o",
Luiz Capitulino5e7caac2011-11-25 14:57:10 -0200983 .mhandler.cmd_new = qmp_marshal_input_block_resize,
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100984 },
985
986SQMP
987block_resize
988------------
989
990Resize a block image while a guest is running.
991
992Arguments:
993
994- "device": the device's ID, must be unique (json-string)
Benoît Canet3b1dbd12014-01-23 21:31:37 +0100995- "node-name": the node name in the block driver state graph (json-string)
Christoph Hellwig6d4a2b32011-01-24 13:32:33 +0100996- "size": new size
997
998Example:
999
1000-> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1001<- { "return": {} }
1002
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001003EQMP
1004
1005 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001006 .name = "block-stream",
Jeff Cody13d8cc52014-06-25 15:40:11 -04001007 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00001008 .mhandler.cmd_new = qmp_marshal_input_block_stream,
1009 },
1010
1011 {
Jeff Codyed61fc12012-09-27 13:29:16 -04001012 .name = "block-commit",
Jeff Cody54e26902014-06-25 15:40:10 -04001013 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
Jeff Codyed61fc12012-09-27 13:29:16 -04001014 .mhandler.cmd_new = qmp_marshal_input_block_commit,
1015 },
1016
Jeff Cody37222902014-01-24 09:02:37 -05001017SQMP
1018block-commit
1019------------
1020
1021Live commit of data from overlay image nodes into backing nodes - i.e., writes
1022data between 'top' and 'base' into 'base'.
1023
1024Arguments:
1025
1026- "device": The device's ID, must be unique (json-string)
1027- "base": The file name of the backing image to write data into.
1028 If not specified, this is the deepest backing image
1029 (json-string, optional)
1030- "top": The file name of the backing image within the image chain,
Jeff Cody7676e2c2014-06-30 15:14:15 +02001031 which contains the topmost data to be committed down. If
1032 not specified, this is the active layer. (json-string, optional)
Jeff Cody37222902014-01-24 09:02:37 -05001033
Jeff Cody54e26902014-06-25 15:40:10 -04001034- backing-file: The backing file string to write into the overlay
1035 image of 'top'. If 'top' is the active layer,
1036 specifying a backing file string is an error. This
1037 filename is not validated.
1038
1039 If a pathname string is such that it cannot be
1040 resolved by QEMU, that means that subsequent QMP or
1041 HMP commands must use node-names for the image in
1042 question, as filename lookup methods will fail.
1043
1044 If not specified, QEMU will automatically determine
1045 the backing file string to use, or error out if
1046 there is no obvious choice. Care should be taken
1047 when specifying the string, to specify a valid
1048 filename or protocol.
1049 (json-string, optional) (Since 2.1)
1050
Jeff Cody37222902014-01-24 09:02:37 -05001051 If top == base, that is an error.
1052 If top == active, the job will not be completed by itself,
1053 user needs to complete the job with the block-job-complete
1054 command after getting the ready event. (Since 2.0)
1055
1056 If the base image is smaller than top, then the base image
1057 will be resized to be the same size as top. If top is
1058 smaller than the base image, the base will not be
1059 truncated. If you want the base image size to match the
1060 size of the smaller top, you can safely truncate it
1061 yourself once the commit operation successfully completes.
1062 (json-string)
1063- "speed": the maximum speed, in bytes per second (json-int, optional)
1064
1065
1066Example:
1067
1068-> { "execute": "block-commit", "arguments": { "device": "virtio0",
1069 "top": "/tmp/snap1.qcow2" } }
1070<- { "return": {} }
1071
1072EQMP
1073
Jeff Codyed61fc12012-09-27 13:29:16 -04001074 {
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001075 .name = "drive-backup",
Stefan Hajnoczib53169e2013-06-26 14:11:57 +02001076 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001077 "on-source-error:s?,on-target-error:s?",
1078 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
1079 },
1080
1081SQMP
1082drive-backup
1083------------
1084
1085Start a point-in-time copy of a block device to a new destination. The
1086status of ongoing drive-backup operations can be checked with
1087query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1088The operation can be stopped before it has completed using the
1089block-job-cancel command.
1090
1091Arguments:
1092
1093- "device": the name of the device which should be copied.
1094 (json-string)
1095- "target": the target of the new image. If the file exists, or if it is a
1096 device, the existing file/device will be used as the new
1097 destination. If it does not exist, a new file will be created.
1098 (json-string)
1099- "format": the format of the new destination, default is to probe if 'mode' is
1100 'existing', else the format of the source
1101 (json-string, optional)
Stefan Hajnoczib53169e2013-06-26 14:11:57 +02001102- "sync": what parts of the disk image should be copied to the destination;
1103 possibilities include "full" for all the disk, "top" for only the sectors
1104 allocated in the topmost image, or "none" to only replicate new I/O
1105 (MirrorSyncMode).
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001106- "mode": whether and how QEMU should create a new image
1107 (NewImageMode, optional, default 'absolute-paths')
1108- "speed": the maximum speed, in bytes per second (json-int, optional)
1109- "on-source-error": the action to take on an error on the source, default
1110 'report'. 'stop' and 'enospc' can only be used
1111 if the block device supports io-status.
1112 (BlockdevOnError, optional)
1113- "on-target-error": the action to take on an error on the target, default
1114 'report' (no limitations, since this applies to
1115 a different block device than device).
1116 (BlockdevOnError, optional)
1117
1118Example:
1119-> { "execute": "drive-backup", "arguments": { "device": "drive0",
Ian Mainfc5d3f82013-07-26 11:39:04 -07001120 "sync": "full",
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001121 "target": "backup.img" } }
1122<- { "return": {} }
Fam Zhengc29c1dd2014-12-18 18:37:05 +08001123
1124EQMP
1125
1126 {
1127 .name = "blockdev-backup",
1128 .args_type = "sync:s,device:B,target:B,speed:i?,"
1129 "on-source-error:s?,on-target-error:s?",
1130 .mhandler.cmd_new = qmp_marshal_input_blockdev_backup,
1131 },
1132
1133SQMP
1134blockdev-backup
1135---------------
1136
1137The device version of drive-backup: this command takes an existing named device
1138as backup target.
1139
1140Arguments:
1141
1142- "device": the name of the device which should be copied.
1143 (json-string)
1144- "target": the name of the backup target device. (json-string)
1145- "sync": what parts of the disk image should be copied to the destination;
1146 possibilities include "full" for all the disk, "top" for only the
1147 sectors allocated in the topmost image, or "none" to only replicate
1148 new I/O (MirrorSyncMode).
1149- "speed": the maximum speed, in bytes per second (json-int, optional)
1150- "on-source-error": the action to take on an error on the source, default
1151 'report'. 'stop' and 'enospc' can only be used
1152 if the block device supports io-status.
1153 (BlockdevOnError, optional)
1154- "on-target-error": the action to take on an error on the target, default
1155 'report' (no limitations, since this applies to
1156 a different block device than device).
1157 (BlockdevOnError, optional)
1158
1159Example:
1160-> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1161 "sync": "full",
1162 "target": "tgt-id" } }
1163<- { "return": {} }
1164
Stefan Hajnoczi99a9add2013-06-24 17:13:14 +02001165EQMP
1166
1167 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001168 .name = "block-job-set-speed",
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +01001169 .args_type = "device:B,speed:o",
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +00001170 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
1171 },
1172
1173 {
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01001174 .name = "block-job-cancel",
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001175 .args_type = "device:B,force:b?",
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00001176 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
1177 },
Jeff Codyc1864022012-02-28 15:54:07 -05001178 {
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02001179 .name = "block-job-pause",
1180 .args_type = "device:B",
1181 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
1182 },
1183 {
1184 .name = "block-job-resume",
1185 .args_type = "device:B",
1186 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
1187 },
1188 {
Paolo Bonziniaeae8832012-10-18 16:49:21 +02001189 .name = "block-job-complete",
1190 .args_type = "device:B",
1191 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
1192 },
1193 {
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001194 .name = "transaction",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01001195 .args_type = "actions:q",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001196 .mhandler.cmd_new = qmp_marshal_input_transaction,
Jeff Codyc1864022012-02-28 15:54:07 -05001197 },
1198
1199SQMP
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001200transaction
1201-----------
Jeff Codyc1864022012-02-28 15:54:07 -05001202
Wenchao Xiabbe86012013-09-11 14:04:34 +08001203Atomically operate on one or more block devices. The only supported operations
1204for now are drive-backup, internal and external snapshotting. A list of
1205dictionaries is accepted, that contains the actions to be performed.
1206If there is any failure performing any of the operations, all operations
1207for the group are abandoned.
Jeff Codyc1864022012-02-28 15:54:07 -05001208
Wenchao Xiabbe86012013-09-11 14:04:34 +08001209For external snapshots, the dictionary contains the device, the file to use for
1210the new snapshot, and the format. The default format, if not specified, is
1211qcow2.
Jeff Codyc1864022012-02-28 15:54:07 -05001212
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001213Each new snapshot defaults to being created by QEMU (wiping any
1214contents if the file already exists), but it is also possible to reuse
1215an externally-created file. In the latter case, you should ensure that
1216the new image file has the same contents as the current one; QEMU cannot
1217perform any meaningful check. Typically this is achieved by using the
1218current image file as the backing file for the new image.
1219
Wenchao Xiabbe86012013-09-11 14:04:34 +08001220On failure, the original disks pre-snapshot attempt will be used.
1221
1222For internal snapshots, the dictionary contains the device and the snapshot's
1223name. If an internal snapshot matching name already exists, the request will
1224be rejected. Only some image formats support it, for example, qcow2, rbd,
1225and sheepdog.
1226
1227On failure, qemu will try delete the newly created internal snapshot in the
1228transaction. When an I/O error occurs during deletion, the user needs to fix
1229it later with qemu-img or other command.
1230
Jeff Codyc1864022012-02-28 15:54:07 -05001231Arguments:
1232
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001233actions array:
1234 - "type": the operation to perform. The only supported
1235 value is "blockdev-snapshot-sync". (json-string)
1236 - "data": a dictionary. The contents depend on the value
1237 of "type". When "type" is "blockdev-snapshot-sync":
1238 - "device": device name to snapshot (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001239 - "node-name": graph node name to snapshot (json-string)
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001240 - "snapshot-file": name of new image file (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001241 - "snapshot-node-name": graph node name of the new snapshot (json-string)
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001242 - "format": format of new image (json-string, optional)
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001243 - "mode": whether and how QEMU should create the snapshot file
1244 (NewImageMode, optional, default "absolute-paths")
Wenchao Xiabbe86012013-09-11 14:04:34 +08001245 When "type" is "blockdev-snapshot-internal-sync":
1246 - "device": device name to snapshot (json-string)
1247 - "name": name of the new snapshot (json-string)
Jeff Codyc1864022012-02-28 15:54:07 -05001248
1249Example:
1250
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001251-> { "execute": "transaction",
1252 "arguments": { "actions": [
Eric Blakecd0c5382014-05-06 09:39:03 -06001253 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001254 "snapshot-file": "/some/place/my-image",
1255 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001256 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
Benoît Canet0901f672014-01-23 21:31:38 +01001257 "snapshot-file": "/some/place/my-image2",
1258 "snapshot-node-name": "node3432",
1259 "mode": "existing",
1260 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001261 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001262 "snapshot-file": "/some/place/my-image2",
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001263 "mode": "existing",
Wenchao Xiabbe86012013-09-11 14:04:34 +08001264 "format": "qcow2" } },
Eric Blakecd0c5382014-05-06 09:39:03 -06001265 { "type": "blockdev-snapshot-internal-sync", "data" : {
Wenchao Xiabbe86012013-09-11 14:04:34 +08001266 "device": "ide-hd2",
1267 "name": "snapshot0" } } ] } }
Jeff Codyc1864022012-02-28 15:54:07 -05001268<- { "return": {} }
1269
1270EQMP
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00001271
1272 {
Jes Sorensend967b2f2011-07-11 20:01:09 +02001273 .name = "blockdev-snapshot-sync",
Benoît Canet0901f672014-01-23 21:31:38 +01001274 .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 -02001275 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
Jes Sorensend967b2f2011-07-11 20:01:09 +02001276 },
1277
1278SQMP
1279blockdev-snapshot-sync
1280----------------------
1281
1282Synchronous snapshot of a block device. snapshot-file specifies the
1283target of the new image. If the file exists, or if it is a device, the
1284snapshot will be created in the existing file/device. If does not
1285exist, a new file will be created. format specifies the format of the
1286snapshot image, default is qcow2.
1287
1288Arguments:
1289
1290- "device": device name to snapshot (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001291- "node-name": graph node name to snapshot (json-string)
Jes Sorensend967b2f2011-07-11 20:01:09 +02001292- "snapshot-file": name of new image file (json-string)
Benoît Canet0901f672014-01-23 21:31:38 +01001293- "snapshot-node-name": graph node name of the new snapshot (json-string)
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001294- "mode": whether and how QEMU should create the snapshot file
1295 (NewImageMode, optional, default "absolute-paths")
Jes Sorensend967b2f2011-07-11 20:01:09 +02001296- "format": format of new image (json-string, optional)
1297
1298Example:
1299
Luiz Capitulino7f3850c2011-10-10 17:30:08 -03001300-> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1301 "snapshot-file":
1302 "/some/place/my-image",
1303 "format": "qcow2" } }
Jes Sorensend967b2f2011-07-11 20:01:09 +02001304<- { "return": {} }
1305
1306EQMP
1307
1308 {
Wenchao Xiaf323bc92013-09-11 14:04:35 +08001309 .name = "blockdev-snapshot-internal-sync",
1310 .args_type = "device:B,name:s",
1311 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_internal_sync,
1312 },
1313
1314SQMP
1315blockdev-snapshot-internal-sync
1316-------------------------------
1317
1318Synchronously take an internal snapshot of a block device when the format of
1319image used supports it. If the name is an empty string, or a snapshot with
1320name already exists, the operation will fail.
1321
1322Arguments:
1323
1324- "device": device name to snapshot (json-string)
1325- "name": name of the new snapshot (json-string)
1326
1327Example:
1328
1329-> { "execute": "blockdev-snapshot-internal-sync",
1330 "arguments": { "device": "ide-hd0",
1331 "name": "snapshot0" }
1332 }
1333<- { "return": {} }
1334
1335EQMP
1336
1337 {
Wenchao Xia44e3e052013-09-11 14:04:36 +08001338 .name = "blockdev-snapshot-delete-internal-sync",
1339 .args_type = "device:B,id:s?,name:s?",
1340 .mhandler.cmd_new =
1341 qmp_marshal_input_blockdev_snapshot_delete_internal_sync,
1342 },
1343
1344SQMP
1345blockdev-snapshot-delete-internal-sync
1346--------------------------------------
1347
1348Synchronously delete an internal snapshot of a block device when the format of
1349image used supports it. The snapshot is identified by name or id or both. One
1350of name or id is required. If the snapshot is not found, the operation will
1351fail.
1352
1353Arguments:
1354
1355- "device": device name (json-string)
1356- "id": ID of the snapshot (json-string, optional)
1357- "name": name of the snapshot (json-string, optional)
1358
1359Example:
1360
1361-> { "execute": "blockdev-snapshot-delete-internal-sync",
1362 "arguments": { "device": "ide-hd0",
1363 "name": "snapshot0" }
1364 }
1365<- { "return": {
1366 "id": "1",
1367 "name": "snapshot0",
1368 "vm-state-size": 0,
1369 "date-sec": 1000012,
1370 "date-nsec": 10,
1371 "vm-clock-sec": 100,
1372 "vm-clock-nsec": 20
1373 }
1374 }
1375
1376EQMP
1377
1378 {
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001379 .name = "drive-mirror",
Paolo Bonzinib952b552012-10-18 16:49:28 +02001380 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
Benoît Canet09158f02014-06-27 18:25:25 +02001381 "node-name:s?,replaces:s?,"
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001382 "on-source-error:s?,on-target-error:s?,"
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001383 "granularity:i?,buf-size:i?",
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001384 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1385 },
1386
1387SQMP
1388drive-mirror
1389------------
1390
1391Start mirroring a block device's writes to a new destination. target
1392specifies the target of the new image. If the file exists, or if it is
1393a device, it will be used as the new destination for writes. If it does not
1394exist, a new file will be created. format specifies the format of the
1395mirror image, default is to probe if mode='existing', else the format
1396of the source.
1397
1398Arguments:
1399
1400- "device": device name to operate on (json-string)
1401- "target": name of new image file (json-string)
1402- "format": format of new image (json-string, optional)
Benoît Canet4c828dc2014-06-16 12:00:55 +02001403- "node-name": the name of the new block driver state in the node graph
1404 (json-string, optional)
Benoît Canet09158f02014-06-27 18:25:25 +02001405- "replaces": the block driver node name to replace when finished
1406 (json-string, optional)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001407- "mode": how an image file should be created into the target
1408 file/device (NewImageMode, optional, default 'absolute-paths')
1409- "speed": maximum speed of the streaming job, in bytes per second
1410 (json-int)
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001411- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001412- "buf_size": maximum amount of data in flight from source to target, in bytes
1413 (json-int, default 10M)
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001414- "sync": what parts of the disk image should be copied to the destination;
1415 possibilities include "full" for all the disk, "top" for only the sectors
1416 allocated in the topmost image, or "none" to only replicate new I/O
1417 (MirrorSyncMode).
Paolo Bonzinib952b552012-10-18 16:49:28 +02001418- "on-source-error": the action to take on an error on the source
1419 (BlockdevOnError, default 'report')
1420- "on-target-error": the action to take on an error on the target
1421 (BlockdevOnError, default 'report')
1422
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001423The default value of the granularity is the image cluster size clamped
1424between 4096 and 65536, if the image format defines one. If the format
1425does not define a cluster size, the default value of the granularity
1426is 65536.
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001427
1428
1429Example:
1430
1431-> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1432 "target": "/some/place/my-image",
1433 "sync": "full",
1434 "format": "qcow2" } }
1435<- { "return": {} }
1436
1437EQMP
1438
1439 {
Jeff Codyfa40e652014-07-01 09:52:16 +02001440 .name = "change-backing-file",
1441 .args_type = "device:s,image-node-name:s,backing-file:s",
1442 .mhandler.cmd_new = qmp_marshal_input_change_backing_file,
1443 },
1444
1445SQMP
1446change-backing-file
1447-------------------
1448Since: 2.1
1449
1450Change the backing file in the image file metadata. This does not cause
1451QEMU to reopen the image file to reparse the backing filename (it may,
1452however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1453if needed). The new backing file string is written into the image file
1454metadata, and the QEMU internal strings are updated.
1455
1456Arguments:
1457
1458- "image-node-name": The name of the block driver state node of the
1459 image to modify. The "device" is argument is used to
1460 verify "image-node-name" is in the chain described by
1461 "device".
1462 (json-string, optional)
1463
1464- "device": The name of the device.
1465 (json-string)
1466
1467- "backing-file": The string to write as the backing file. This string is
1468 not validated, so care should be taken when specifying
1469 the string or the image chain may not be able to be
1470 reopened again.
1471 (json-string)
1472
1473Returns: Nothing on success
1474 If "device" does not exist or cannot be determined, DeviceNotFound
1475
1476EQMP
1477
1478 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001479 .name = "balloon",
1480 .args_type = "value:M",
Luiz Capitulinod72f3262011-11-25 14:38:09 -02001481 .mhandler.cmd_new = qmp_marshal_input_balloon,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001482 },
1483
1484SQMP
1485balloon
1486-------
1487
1488Request VM to change its memory allocation (in bytes).
1489
1490Arguments:
1491
1492- "value": New memory allocation (json-int)
1493
1494Example:
1495
1496-> { "execute": "balloon", "arguments": { "value": 536870912 } }
1497<- { "return": {} }
1498
1499EQMP
1500
1501 {
1502 .name = "set_link",
1503 .args_type = "name:s,up:b",
Luiz Capitulino4b371562011-11-23 13:11:55 -02001504 .mhandler.cmd_new = qmp_marshal_input_set_link,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001505 },
1506
1507SQMP
1508set_link
1509--------
1510
1511Change the link status of a network adapter.
1512
1513Arguments:
1514
1515- "name": network device name (json-string)
1516- "up": status is up (json-bool)
1517
1518Example:
1519
1520-> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1521<- { "return": {} }
1522
1523EQMP
1524
1525 {
1526 .name = "getfd",
1527 .args_type = "fdname:s",
1528 .params = "getfd name",
1529 .help = "receive a file descriptor via SCM rights and assign it a name",
Corey Bryant208c9d12012-06-22 14:36:09 -04001530 .mhandler.cmd_new = qmp_marshal_input_getfd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001531 },
1532
1533SQMP
1534getfd
1535-----
1536
1537Receive a file descriptor via SCM rights and assign it a name.
1538
1539Arguments:
1540
1541- "fdname": file descriptor name (json-string)
1542
1543Example:
1544
1545-> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1546<- { "return": {} }
1547
Corey Bryant208c9d12012-06-22 14:36:09 -04001548Notes:
1549
1550(1) If the name specified by the "fdname" argument already exists,
1551 the file descriptor assigned to it will be closed and replaced
1552 by the received file descriptor.
1553(2) The 'closefd' command can be used to explicitly close the file
1554 descriptor when it is no longer needed.
1555
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001556EQMP
1557
1558 {
1559 .name = "closefd",
1560 .args_type = "fdname:s",
1561 .params = "closefd name",
1562 .help = "close a file descriptor previously passed via SCM rights",
Corey Bryant208c9d12012-06-22 14:36:09 -04001563 .mhandler.cmd_new = qmp_marshal_input_closefd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001564 },
1565
1566SQMP
1567closefd
1568-------
1569
1570Close a file descriptor previously passed via SCM rights.
1571
1572Arguments:
1573
1574- "fdname": file descriptor name (json-string)
1575
1576Example:
1577
1578-> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1579<- { "return": {} }
1580
1581EQMP
1582
Corey Bryantba1c0482012-08-14 16:43:43 -04001583 {
1584 .name = "add-fd",
1585 .args_type = "fdset-id:i?,opaque:s?",
1586 .params = "add-fd fdset-id opaque",
1587 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1588 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1589 },
1590
1591SQMP
1592add-fd
1593-------
1594
1595Add a file descriptor, that was passed via SCM rights, to an fd set.
1596
1597Arguments:
1598
1599- "fdset-id": The ID of the fd set to add the file descriptor to.
1600 (json-int, optional)
1601- "opaque": A free-form string that can be used to describe the fd.
1602 (json-string, optional)
1603
1604Return a json-object with the following information:
1605
1606- "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1607- "fd": The file descriptor that was received via SCM rights and added to the
1608 fd set. (json-int)
1609
1610Example:
1611
1612-> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1613<- { "return": { "fdset-id": 1, "fd": 3 } }
1614
1615Notes:
1616
1617(1) The list of fd sets is shared by all monitor connections.
1618(2) If "fdset-id" is not specified, a new fd set will be created.
1619
1620EQMP
1621
1622 {
1623 .name = "remove-fd",
1624 .args_type = "fdset-id:i,fd:i?",
1625 .params = "remove-fd fdset-id fd",
1626 .help = "Remove a file descriptor from an fd set",
1627 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1628 },
1629
1630SQMP
1631remove-fd
1632---------
1633
1634Remove a file descriptor from an fd set.
1635
1636Arguments:
1637
1638- "fdset-id": The ID of the fd set that the file descriptor belongs to.
1639 (json-int)
1640- "fd": The file descriptor that is to be removed. (json-int, optional)
1641
1642Example:
1643
1644-> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1645<- { "return": {} }
1646
1647Notes:
1648
1649(1) The list of fd sets is shared by all monitor connections.
1650(2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1651 removed.
1652
1653EQMP
1654
1655 {
1656 .name = "query-fdsets",
1657 .args_type = "",
1658 .help = "Return information describing all fd sets",
1659 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1660 },
1661
1662SQMP
1663query-fdsets
1664-------------
1665
1666Return information describing all fd sets.
1667
1668Arguments: None
1669
1670Example:
1671
1672-> { "execute": "query-fdsets" }
1673<- { "return": [
1674 {
1675 "fds": [
1676 {
1677 "fd": 30,
1678 "opaque": "rdonly:/path/to/file"
1679 },
1680 {
1681 "fd": 24,
1682 "opaque": "rdwr:/path/to/file"
1683 }
1684 ],
1685 "fdset-id": 1
1686 },
1687 {
1688 "fds": [
1689 {
1690 "fd": 28
1691 },
1692 {
1693 "fd": 29
1694 }
1695 ],
1696 "fdset-id": 0
1697 }
1698 ]
1699 }
1700
1701Note: The list of fd sets is shared by all monitor connections.
1702
1703EQMP
1704
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001705 {
1706 .name = "block_passwd",
Benoît Canet12d3ba82014-01-23 21:31:35 +01001707 .args_type = "device:s?,node-name:s?,password:s",
Luiz Capitulinoa4dea8a2011-11-23 13:28:21 -02001708 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001709 },
1710
1711SQMP
1712block_passwd
1713------------
1714
1715Set the password of encrypted block devices.
1716
1717Arguments:
1718
1719- "device": device name (json-string)
Benoît Canet12d3ba82014-01-23 21:31:35 +01001720- "node-name": name in the block driver state graph (json-string)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001721- "password": password (json-string)
1722
1723Example:
1724
1725-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1726 "password": "12345" } }
1727<- { "return": {} }
1728
1729EQMP
1730
1731 {
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001732 .name = "block_set_io_throttle",
Benoît Canet2024c1d2013-09-02 14:14:41 +02001733 .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 -02001734 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001735 },
1736
1737SQMP
1738block_set_io_throttle
1739------------
1740
1741Change I/O throttle limits for a block drive.
1742
1743Arguments:
1744
1745- "device": device name (json-string)
Eric Blake586b5462013-08-30 14:44:11 -06001746- "bps": total throughput limit in bytes per second (json-int)
1747- "bps_rd": read throughput limit in bytes per second (json-int)
1748- "bps_wr": write throughput limit in bytes per second (json-int)
1749- "iops": total I/O operations per second (json-int)
1750- "iops_rd": read I/O operations per second (json-int)
1751- "iops_wr": write I/O operations per second (json-int)
Benoît Canet3e9fab62013-09-02 14:14:40 +02001752- "bps_max": total max in bytes (json-int)
1753- "bps_rd_max": read max in bytes (json-int)
1754- "bps_wr_max": write max in bytes (json-int)
1755- "iops_max": total I/O operations max (json-int)
1756- "iops_rd_max": read I/O operations max (json-int)
1757- "iops_wr_max": write I/O operations max (json-int)
Benoît Canet2024c1d2013-09-02 14:14:41 +02001758- "iops_size": I/O size in bytes when limiting (json-int)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001759
1760Example:
1761
1762-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
Eric Blake586b5462013-08-30 14:44:11 -06001763 "bps": 1000000,
1764 "bps_rd": 0,
1765 "bps_wr": 0,
1766 "iops": 0,
1767 "iops_rd": 0,
Benoît Canet3e9fab62013-09-02 14:14:40 +02001768 "iops_wr": 0,
1769 "bps_max": 8000000,
1770 "bps_rd_max": 0,
1771 "bps_wr_max": 0,
1772 "iops_max": 0,
1773 "iops_rd_max": 0,
Benoît Canet2024c1d2013-09-02 14:14:41 +02001774 "iops_wr_max": 0,
1775 "iops_size": 0 } }
Zhi Yong Wu727f0052011-11-08 13:00:31 +08001776<- { "return": {} }
1777
1778EQMP
1779
1780 {
Gerd Hoffmann75721502010-10-07 12:22:54 +02001781 .name = "set_password",
1782 .args_type = "protocol:s,password:s,connected:s?",
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001783 .mhandler.cmd_new = qmp_marshal_input_set_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001784 },
1785
1786SQMP
1787set_password
1788------------
1789
1790Set the password for vnc/spice protocols.
1791
1792Arguments:
1793
1794- "protocol": protocol name (json-string)
1795- "password": password (json-string)
Alberto Garcia3599d462015-02-26 16:35:07 +02001796- "connected": [ keep | disconnect | fail ] (json-string, optional)
Gerd Hoffmann75721502010-10-07 12:22:54 +02001797
1798Example:
1799
1800-> { "execute": "set_password", "arguments": { "protocol": "vnc",
1801 "password": "secret" } }
1802<- { "return": {} }
1803
1804EQMP
1805
1806 {
1807 .name = "expire_password",
1808 .args_type = "protocol:s,time:s",
Luiz Capitulino9ad53722011-12-07 11:47:57 -02001809 .mhandler.cmd_new = qmp_marshal_input_expire_password,
Gerd Hoffmann75721502010-10-07 12:22:54 +02001810 },
1811
1812SQMP
1813expire_password
1814---------------
1815
1816Set the password expire time for vnc/spice protocols.
1817
1818Arguments:
1819
1820- "protocol": protocol name (json-string)
1821- "time": [ now | never | +secs | secs ] (json-string)
1822
1823Example:
1824
1825-> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1826 "time": "+60" } }
1827<- { "return": {} }
1828
1829EQMP
1830
1831 {
Daniel P. Berrange13661082011-06-23 13:31:42 +01001832 .name = "add_client",
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001833 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
Luiz Capitulinob224e5e2012-09-13 16:52:20 -03001834 .mhandler.cmd_new = qmp_marshal_input_add_client,
Daniel P. Berrange13661082011-06-23 13:31:42 +01001835 },
1836
1837SQMP
1838add_client
1839----------
1840
1841Add a graphics client
1842
1843Arguments:
1844
1845- "protocol": protocol name (json-string)
1846- "fdname": file descriptor name (json-string)
Daniel P. Berrangef1f5f402012-02-13 13:43:08 +00001847- "skipauth": whether to skip authentication (json-bool, optional)
1848- "tls": whether to perform TLS (json-bool, optional)
Daniel P. Berrange13661082011-06-23 13:31:42 +01001849
1850Example:
1851
1852-> { "execute": "add_client", "arguments": { "protocol": "vnc",
1853 "fdname": "myclient" } }
1854<- { "return": {} }
1855
1856EQMP
1857 {
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001858 .name = "qmp_capabilities",
1859 .args_type = "",
1860 .params = "",
1861 .help = "enable QMP capabilities",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001862 .mhandler.cmd_new = do_qmp_capabilities,
1863 },
1864
1865SQMP
1866qmp_capabilities
1867----------------
1868
1869Enable QMP capabilities.
1870
1871Arguments: None.
1872
1873Example:
1874
1875-> { "execute": "qmp_capabilities" }
1876<- { "return": {} }
1877
1878Note: This command must be issued before issuing any other command.
1879
Luiz Capitulino0268d972010-10-22 10:08:02 -02001880EQMP
1881
1882 {
1883 .name = "human-monitor-command",
1884 .args_type = "command-line:s,cpu-index:i?",
Luiz Capitulinod51a67b2011-11-25 17:52:45 -02001885 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
Luiz Capitulino0268d972010-10-22 10:08:02 -02001886 },
1887
1888SQMP
1889human-monitor-command
1890---------------------
1891
1892Execute a Human Monitor command.
1893
1894Arguments:
1895
1896- command-line: the command name and its arguments, just like the
1897 Human Monitor's shell (json-string)
1898- cpu-index: select the CPU number to be used by commands which access CPU
1899 data, like 'info registers'. The Monitor selects CPU 0 if this
1900 argument is not provided (json-int, optional)
1901
1902Example:
1903
1904-> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1905<- { "return": "kvm support: enabled\r\n" }
1906
1907Notes:
1908
1909(1) The Human Monitor is NOT an stable interface, this means that command
1910 names, arguments and responses can change or be removed at ANY time.
1911 Applications that rely on long term stability guarantees should NOT
1912 use this command
1913
1914(2) Limitations:
1915
1916 o This command is stateless, this means that commands that depend
1917 on state information (such as getfd) might not work
1918
1919 o Commands that prompt the user for data (eg. 'cont' when the block
1920 device is encrypted) don't currently work
1921
Luiz Capitulino82a56f02010-09-13 12:26:00 -030019223. Query Commands
1923=================
1924
1925HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1926HXCOMM this! We will possibly move query commands definitions inside those
1927HXCOMM sections, just like regular commands.
1928
1929EQMP
1930
1931SQMP
1932query-version
1933-------------
1934
1935Show QEMU version.
1936
1937Return a json-object with the following information:
1938
1939- "qemu": A json-object containing three integer values:
1940 - "major": QEMU's major version (json-int)
1941 - "minor": QEMU's minor version (json-int)
1942 - "micro": QEMU's micro version (json-int)
1943- "package": package's version (json-string)
1944
1945Example:
1946
1947-> { "execute": "query-version" }
1948<- {
1949 "return":{
1950 "qemu":{
1951 "major":0,
1952 "minor":11,
1953 "micro":5
1954 },
1955 "package":""
1956 }
1957 }
1958
1959EQMP
1960
Luiz Capitulinob9c15f12011-08-26 17:38:13 -03001961 {
1962 .name = "query-version",
1963 .args_type = "",
1964 .mhandler.cmd_new = qmp_marshal_input_query_version,
1965 },
1966
Luiz Capitulino82a56f02010-09-13 12:26:00 -03001967SQMP
1968query-commands
1969--------------
1970
1971List QMP available commands.
1972
1973Each command is represented by a json-object, the returned value is a json-array
1974of all commands.
1975
1976Each json-object contain:
1977
1978- "name": command's name (json-string)
1979
1980Example:
1981
1982-> { "execute": "query-commands" }
1983<- {
1984 "return":[
1985 {
1986 "name":"query-balloon"
1987 },
1988 {
1989 "name":"system_powerdown"
1990 }
1991 ]
1992 }
1993
1994Note: This example has been shortened as the real response is too long.
1995
1996EQMP
1997
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -03001998 {
1999 .name = "query-commands",
2000 .args_type = "",
2001 .mhandler.cmd_new = qmp_marshal_input_query_commands,
2002 },
2003
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002004SQMP
Daniel P. Berrange48608532012-05-21 17:59:51 +01002005query-events
2006--------------
2007
2008List QMP available events.
2009
2010Each event is represented by a json-object, the returned value is a json-array
2011of all events.
2012
2013Each json-object contains:
2014
2015- "name": event's name (json-string)
2016
2017Example:
2018
2019-> { "execute": "query-events" }
2020<- {
2021 "return":[
2022 {
2023 "name":"SHUTDOWN"
2024 },
2025 {
2026 "name":"RESET"
2027 }
2028 ]
2029 }
2030
2031Note: This example has been shortened as the real response is too long.
2032
2033EQMP
2034
2035 {
2036 .name = "query-events",
2037 .args_type = "",
2038 .mhandler.cmd_new = qmp_marshal_input_query_events,
2039 },
2040
2041SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002042query-chardev
2043-------------
2044
2045Each device is represented by a json-object. The returned value is a json-array
2046of all devices.
2047
2048Each json-object contain the following:
2049
2050- "label": device's label (json-string)
2051- "filename": device's file (json-string)
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002052- "frontend-open": open/closed state of the frontend device attached to this
2053 backend (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002054
2055Example:
2056
2057-> { "execute": "query-chardev" }
2058<- {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002059 "return": [
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002060 {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002061 "label": "charchannel0",
2062 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2063 "frontend-open": false
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002064 },
2065 {
Laszlo Ersek32a97ea2014-06-26 17:50:03 +02002066 "label": "charmonitor",
2067 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2068 "frontend-open": true
2069 },
2070 {
2071 "label": "charserial0",
2072 "filename": "pty:/dev/pts/2",
2073 "frontend-open": true
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002074 }
2075 ]
2076 }
2077
2078EQMP
2079
Luiz Capitulinoc5a415a2011-09-14 16:05:49 -03002080 {
2081 .name = "query-chardev",
2082 .args_type = "",
2083 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
2084 },
2085
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002086SQMP
Martin Kletzander77d1c3c2014-02-01 12:52:42 +01002087query-chardev-backends
2088-------------
2089
2090List available character device backends.
2091
2092Each backend is represented by a json-object, the returned value is a json-array
2093of all backends.
2094
2095Each json-object contains:
2096
2097- "name": backend name (json-string)
2098
2099Example:
2100
2101-> { "execute": "query-chardev-backends" }
2102<- {
2103 "return":[
2104 {
2105 "name":"udp"
2106 },
2107 {
2108 "name":"tcp"
2109 },
2110 {
2111 "name":"unix"
2112 },
2113 {
2114 "name":"spiceport"
2115 }
2116 ]
2117 }
2118
2119EQMP
2120
2121 {
2122 .name = "query-chardev-backends",
2123 .args_type = "",
2124 .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends,
2125 },
2126
2127SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002128query-block
2129-----------
2130
2131Show the block devices.
2132
2133Each block device information is stored in a json-object and the returned value
2134is a json-array of all devices.
2135
2136Each json-object contain the following:
2137
2138- "device": device name (json-string)
2139- "type": device type (json-string)
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002140 - deprecated, retained for backward compatibility
2141 - Possible values: "unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002142- "removable": true if the device is removable, false otherwise (json-bool)
2143- "locked": true if the device is locked, false otherwise (json-bool)
Michal Privoznik99f42802013-01-29 17:58:41 +01002144- "tray_open": only present if removable, true if the device has a tray,
Markus Armbrustere4def802011-09-06 18:58:53 +02002145 and it is open (json-bool)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002146- "inserted": only present if the device is inserted, it is a json-object
2147 containing the following:
2148 - "file": device file name (json-string)
2149 - "ro": true if read-only, false otherwise (json-bool)
2150 - "drv": driver format name (json-string)
Stefan Hajnoczi550830f2014-09-16 15:24:24 +01002151 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002152 "file", "file", "ftp", "ftps", "host_cdrom",
Markus Armbruster92a539d2015-03-17 17:02:20 +01002153 "host_device", "http", "https",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002154 "nbd", "parallels", "qcow", "qcow2", "raw",
2155 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2156 - "backing_file": backing file name (json-string, optional)
Benoît Canet2e3e3312012-08-02 10:22:48 +02002157 - "backing_file_depth": number of files in the backing file chain (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002158 - "encrypted": true if encrypted, false otherwise (json-bool)
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002159 - "bps": limit total bytes per second (json-int)
2160 - "bps_rd": limit read bytes per second (json-int)
2161 - "bps_wr": limit write bytes per second (json-int)
2162 - "iops": limit total I/O operations per second (json-int)
2163 - "iops_rd": limit read operations per second (json-int)
2164 - "iops_wr": limit write operations per second (json-int)
Benoît Canet3e9fab62013-09-02 14:14:40 +02002165 - "bps_max": total max in bytes (json-int)
2166 - "bps_rd_max": read max in bytes (json-int)
2167 - "bps_wr_max": write max in bytes (json-int)
2168 - "iops_max": total I/O operations max (json-int)
2169 - "iops_rd_max": read I/O operations max (json-int)
2170 - "iops_wr_max": write I/O operations max (json-int)
Benoît Canet2024c1d2013-09-02 14:14:41 +02002171 - "iops_size": I/O size when limiting by iops (json-int)
Peter Lieven465bee12014-05-18 00:58:19 +02002172 - "detect_zeroes": detect and optimize zero writing (json-string)
2173 - Possible values: "off", "on", "unmap"
Francesco Romanie2462112015-01-12 14:11:13 +01002174 - "write_threshold": write offset threshold in bytes, a event will be
2175 emitted if crossed. Zero if disabled (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08002176 - "image": the detail of the image, it is a json-object containing
2177 the following:
2178 - "filename": image file name (json-string)
2179 - "format": image format (json-string)
2180 - "virtual-size": image capacity in bytes (json-int)
2181 - "dirty-flag": true if image is not cleanly closed, not present
2182 means clean (json-bool, optional)
2183 - "actual-size": actual size on disk in bytes of the image, not
2184 present when image does not support thin
2185 provision (json-int, optional)
2186 - "cluster-size": size of a cluster in bytes, not present if image
2187 format does not support it (json-int, optional)
2188 - "encrypted": true if the image is encrypted, not present means
2189 false or the image format does not support
2190 encryption (json-bool, optional)
2191 - "backing_file": backing file name, not present means no backing
2192 file is used or the image format does not
2193 support backing file chain
2194 (json-string, optional)
2195 - "full-backing-filename": full path of the backing file, not
2196 present if it equals backing_file or no
2197 backing file is used
2198 (json-string, optional)
2199 - "backing-filename-format": the format of the backing file, not
2200 present means unknown or no backing
2201 file (json-string, optional)
2202 - "snapshots": the internal snapshot info, it is an optional list
2203 of json-object containing the following:
2204 - "id": unique snapshot id (json-string)
2205 - "name": snapshot name (json-string)
2206 - "vm-state-size": size of the VM state in bytes (json-int)
2207 - "date-sec": UTC date of the snapshot in seconds (json-int)
2208 - "date-nsec": fractional part in nanoseconds to be used with
Eric Blake586b5462013-08-30 14:44:11 -06002209 date-sec (json-int)
Wenchao Xia553a7e82013-06-06 12:27:59 +08002210 - "vm-clock-sec": VM clock relative to boot in seconds
2211 (json-int)
2212 - "vm-clock-nsec": fractional part in nanoseconds to be used
2213 with vm-clock-sec (json-int)
2214 - "backing-image": the detail of the backing image, it is an
2215 optional json-object only present when a
2216 backing image present for this image
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002217
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002218- "io-status": I/O operation status, only present if the device supports it
2219 and the VM is configured to stop on errors. It's always reset
2220 to "ok" when the "cont" command is issued (json_string, optional)
2221 - Possible values: "ok", "failed", "nospace"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002222
2223Example:
2224
2225-> { "execute": "query-block" }
2226<- {
2227 "return":[
2228 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002229 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002230 "device":"ide0-hd0",
2231 "locked":false,
2232 "removable":false,
2233 "inserted":{
2234 "ro":false,
2235 "drv":"qcow2",
2236 "encrypted":false,
Wenchao Xia553a7e82013-06-06 12:27:59 +08002237 "file":"disks/test.qcow2",
2238 "backing_file_depth":1,
Zhi Yong Wu727f0052011-11-08 13:00:31 +08002239 "bps":1000000,
2240 "bps_rd":0,
2241 "bps_wr":0,
2242 "iops":1000000,
2243 "iops_rd":0,
2244 "iops_wr":0,
Benoît Canet3e9fab62013-09-02 14:14:40 +02002245 "bps_max": 8000000,
2246 "bps_rd_max": 0,
2247 "bps_wr_max": 0,
2248 "iops_max": 0,
2249 "iops_rd_max": 0,
2250 "iops_wr_max": 0,
Benoît Canet2024c1d2013-09-02 14:14:41 +02002251 "iops_size": 0,
Peter Lieven465bee12014-05-18 00:58:19 +02002252 "detect_zeroes": "on",
Francesco Romanie2462112015-01-12 14:11:13 +01002253 "write_threshold": 0,
Wenchao Xia553a7e82013-06-06 12:27:59 +08002254 "image":{
2255 "filename":"disks/test.qcow2",
2256 "format":"qcow2",
2257 "virtual-size":2048000,
2258 "backing_file":"base.qcow2",
2259 "full-backing-filename":"disks/base.qcow2",
2260 "backing-filename-format:"qcow2",
2261 "snapshots":[
2262 {
2263 "id": "1",
2264 "name": "snapshot1",
2265 "vm-state-size": 0,
2266 "date-sec": 10000200,
2267 "date-nsec": 12,
2268 "vm-clock-sec": 206,
2269 "vm-clock-nsec": 30
2270 }
2271 ],
2272 "backing-image":{
2273 "filename":"disks/base.qcow2",
2274 "format":"qcow2",
2275 "virtual-size":2048000
2276 }
2277 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002278 },
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002279 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002280 },
2281 {
Luiz Capitulinof04ef602011-09-26 17:43:54 -03002282 "io-status": "ok",
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002283 "device":"ide1-cd0",
2284 "locked":false,
2285 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002286 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002287 },
2288 {
2289 "device":"floppy0",
2290 "locked":false,
2291 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002292 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002293 },
2294 {
2295 "device":"sd0",
2296 "locked":false,
2297 "removable":true,
Markus Armbrusterd8aeeb32011-05-16 15:04:55 +02002298 "type":"unknown"
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002299 }
2300 ]
2301 }
2302
2303EQMP
2304
Luiz Capitulinob2023812011-09-21 17:16:47 -03002305 {
2306 .name = "query-block",
2307 .args_type = "",
2308 .mhandler.cmd_new = qmp_marshal_input_query_block,
2309 },
2310
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002311SQMP
2312query-blockstats
2313----------------
2314
2315Show block device statistics.
2316
2317Each device statistic information is stored in a json-object and the returned
2318value is a json-array of all devices.
2319
2320Each json-object contain the following:
2321
2322- "device": device name (json-string)
2323- "stats": A json-object with the statistics information, it contains:
2324 - "rd_bytes": bytes read (json-int)
2325 - "wr_bytes": bytes written (json-int)
2326 - "rd_operations": read operations (json-int)
2327 - "wr_operations": write operations (json-int)
Christoph Hellwige8045d62011-08-22 00:25:58 +02002328 - "flush_operations": cache flush operations (json-int)
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002329 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2330 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2331 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002332 - "wr_highest_offset": Highest offset of a sector written since the
2333 BlockDriverState has been opened (json-int)
Peter Lievenf4564d52015-02-02 14:52:18 +01002334 - "rd_merged": number of read requests that have been merged into
2335 another request (json-int)
2336 - "wr_merged": number of write requests that have been merged into
2337 another request (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002338- "parent": Contains recursively the statistics of the underlying
2339 protocol (e.g. the host file for a qcow2 image). If there is
2340 no underlying protocol, this field is omitted
2341 (json-object, optional)
2342
2343Example:
2344
2345-> { "execute": "query-blockstats" }
2346<- {
2347 "return":[
2348 {
2349 "device":"ide0-hd0",
2350 "parent":{
2351 "stats":{
2352 "wr_highest_offset":3686448128,
2353 "wr_bytes":9786368,
2354 "wr_operations":751,
2355 "rd_bytes":122567168,
2356 "rd_operations":36772
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002357 "wr_total_times_ns":313253456
2358 "rd_total_times_ns":3465673657
2359 "flush_total_times_ns":49653
Christoph Hellwige8045d62011-08-22 00:25:58 +02002360 "flush_operations":61,
Peter Lievenf4564d52015-02-02 14:52:18 +01002361 "rd_merged":0,
2362 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002363 }
2364 },
2365 "stats":{
2366 "wr_highest_offset":2821110784,
2367 "wr_bytes":9786368,
2368 "wr_operations":692,
2369 "rd_bytes":122739200,
2370 "rd_operations":36604
Christoph Hellwige8045d62011-08-22 00:25:58 +02002371 "flush_operations":51,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002372 "wr_total_times_ns":313253456
2373 "rd_total_times_ns":3465673657
Peter Lievenf4564d52015-02-02 14:52:18 +01002374 "flush_total_times_ns":49653,
2375 "rd_merged":0,
2376 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002377 }
2378 },
2379 {
2380 "device":"ide1-cd0",
2381 "stats":{
2382 "wr_highest_offset":0,
2383 "wr_bytes":0,
2384 "wr_operations":0,
2385 "rd_bytes":0,
2386 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002387 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002388 "wr_total_times_ns":0
2389 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002390 "flush_total_times_ns":0,
2391 "rd_merged":0,
2392 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002393 }
2394 },
2395 {
2396 "device":"floppy0",
2397 "stats":{
2398 "wr_highest_offset":0,
2399 "wr_bytes":0,
2400 "wr_operations":0,
2401 "rd_bytes":0,
2402 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002403 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002404 "wr_total_times_ns":0
2405 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002406 "flush_total_times_ns":0,
2407 "rd_merged":0,
2408 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002409 }
2410 },
2411 {
2412 "device":"sd0",
2413 "stats":{
2414 "wr_highest_offset":0,
2415 "wr_bytes":0,
2416 "wr_operations":0,
2417 "rd_bytes":0,
2418 "rd_operations":0
Christoph Hellwige8045d62011-08-22 00:25:58 +02002419 "flush_operations":0,
Christoph Hellwigc488c7f2011-08-25 08:26:10 +02002420 "wr_total_times_ns":0
2421 "rd_total_times_ns":0
Peter Lievenf4564d52015-02-02 14:52:18 +01002422 "flush_total_times_ns":0,
2423 "rd_merged":0,
2424 "wr_merged":0
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002425 }
2426 }
2427 ]
2428 }
2429
2430EQMP
2431
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03002432 {
2433 .name = "query-blockstats",
Fam Zhengf71eaa72014-10-31 11:32:57 +08002434 .args_type = "query-nodes:b?",
Luiz Capitulinof11f57e2011-09-22 15:56:36 -03002435 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
2436 },
2437
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002438SQMP
2439query-cpus
2440----------
2441
2442Show CPU information.
2443
2444Return a json-array. Each CPU is represented by a json-object, which contains:
2445
2446- "CPU": CPU index (json-int)
2447- "current": true if this is the current CPU, false otherwise (json-bool)
2448- "halted": true if the cpu is halted, false otherwise (json-bool)
2449- Current program counter. The key's name depends on the architecture:
2450 "pc": i386/x86_64 (json-int)
2451 "nip": PPC (json-int)
2452 "pc" and "npc": sparc (json-int)
2453 "PC": mips (json-int)
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002454- "thread_id": ID of the underlying host thread (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002455
2456Example:
2457
2458-> { "execute": "query-cpus" }
2459<- {
2460 "return":[
2461 {
2462 "CPU":0,
2463 "current":true,
2464 "halted":false,
2465 "pc":3227107138
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002466 "thread_id":3134
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002467 },
2468 {
2469 "CPU":1,
2470 "current":false,
2471 "halted":true,
2472 "pc":7108165
Jan Kiszkadc7a09c2011-03-15 12:26:31 +01002473 "thread_id":3135
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002474 }
2475 ]
2476 }
2477
2478EQMP
2479
Luiz Capitulinode0b36b2011-09-21 16:38:35 -03002480 {
2481 .name = "query-cpus",
2482 .args_type = "",
2483 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2484 },
2485
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002486SQMP
Stefan Hajnoczidc3dd0d2014-02-27 11:48:42 +01002487query-iothreads
2488---------------
2489
2490Returns a list of information about each iothread.
2491
2492Note this list excludes the QEMU main loop thread, which is not declared
2493using the -object iothread command-line option. It is always the main thread
2494of the process.
2495
2496Return a json-array. Each iothread is represented by a json-object, which contains:
2497
2498- "id": name of iothread (json-str)
2499- "thread-id": ID of the underlying host thread (json-int)
2500
2501Example:
2502
2503-> { "execute": "query-iothreads" }
2504<- {
2505 "return":[
2506 {
2507 "id":"iothread0",
2508 "thread-id":3134
2509 },
2510 {
2511 "id":"iothread1",
2512 "thread-id":3135
2513 }
2514 ]
2515 }
2516
2517EQMP
2518
2519 {
2520 .name = "query-iothreads",
2521 .args_type = "",
2522 .mhandler.cmd_new = qmp_marshal_input_query_iothreads,
2523 },
2524
2525SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002526query-pci
2527---------
2528
2529PCI buses and devices information.
2530
2531The returned value is a json-array of all buses. Each bus is represented by
2532a json-object, which has a key with a json-array of all PCI devices attached
2533to it. Each device is represented by a json-object.
2534
2535The bus json-object contains the following:
2536
2537- "bus": bus number (json-int)
2538- "devices": a json-array of json-objects, each json-object represents a
2539 PCI device
2540
2541The PCI device json-object contains the following:
2542
2543- "bus": identical to the parent's bus number (json-int)
2544- "slot": slot number (json-int)
2545- "function": function number (json-int)
2546- "class_info": a json-object containing:
2547 - "desc": device class description (json-string, optional)
2548 - "class": device class number (json-int)
2549- "id": a json-object containing:
2550 - "device": device ID (json-int)
2551 - "vendor": vendor ID (json-int)
2552- "irq": device's IRQ if assigned (json-int, optional)
2553- "qdev_id": qdev id string (json-string)
2554- "pci_bridge": It's a json-object, only present if this device is a
2555 PCI bridge, contains:
2556 - "bus": bus number (json-int)
2557 - "secondary": secondary bus number (json-int)
2558 - "subordinate": subordinate bus number (json-int)
2559 - "io_range": I/O memory range information, a json-object with the
2560 following members:
2561 - "base": base address, in bytes (json-int)
2562 - "limit": limit address, in bytes (json-int)
2563 - "memory_range": 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 - "prefetchable_range": Prefetchable memory range information, a
2568 json-object with the following members:
2569 - "base": base address, in bytes (json-int)
2570 - "limit": limit address, in bytes (json-int)
2571 - "devices": a json-array of PCI devices if there's any attached, each
2572 each element is represented by a json-object, which contains
2573 the same members of the 'PCI device json-object' described
2574 above (optional)
2575- "regions": a json-array of json-objects, each json-object represents a
2576 memory region of this device
2577
2578The memory range json-object contains the following:
2579
2580- "base": base memory address (json-int)
2581- "limit": limit value (json-int)
2582
2583The region json-object can be an I/O region or a memory region, an I/O region
2584json-object contains the following:
2585
2586- "type": "io" (json-string, fixed)
2587- "bar": BAR number (json-int)
2588- "address": memory address (json-int)
2589- "size": memory size (json-int)
2590
2591A memory region json-object contains the following:
2592
2593- "type": "memory" (json-string, fixed)
2594- "bar": BAR number (json-int)
2595- "address": memory address (json-int)
2596- "size": memory size (json-int)
2597- "mem_type_64": true or false (json-bool)
2598- "prefetch": true or false (json-bool)
2599
2600Example:
2601
2602-> { "execute": "query-pci" }
2603<- {
2604 "return":[
2605 {
2606 "bus":0,
2607 "devices":[
2608 {
2609 "bus":0,
2610 "qdev_id":"",
2611 "slot":0,
2612 "class_info":{
2613 "class":1536,
2614 "desc":"Host bridge"
2615 },
2616 "id":{
2617 "device":32902,
2618 "vendor":4663
2619 },
2620 "function":0,
2621 "regions":[
2622
2623 ]
2624 },
2625 {
2626 "bus":0,
2627 "qdev_id":"",
2628 "slot":1,
2629 "class_info":{
2630 "class":1537,
2631 "desc":"ISA bridge"
2632 },
2633 "id":{
2634 "device":32902,
2635 "vendor":28672
2636 },
2637 "function":0,
2638 "regions":[
2639
2640 ]
2641 },
2642 {
2643 "bus":0,
2644 "qdev_id":"",
2645 "slot":1,
2646 "class_info":{
2647 "class":257,
2648 "desc":"IDE controller"
2649 },
2650 "id":{
2651 "device":32902,
2652 "vendor":28688
2653 },
2654 "function":1,
2655 "regions":[
2656 {
2657 "bar":4,
2658 "size":16,
2659 "address":49152,
2660 "type":"io"
2661 }
2662 ]
2663 },
2664 {
2665 "bus":0,
2666 "qdev_id":"",
2667 "slot":2,
2668 "class_info":{
2669 "class":768,
2670 "desc":"VGA controller"
2671 },
2672 "id":{
2673 "device":4115,
2674 "vendor":184
2675 },
2676 "function":0,
2677 "regions":[
2678 {
2679 "prefetch":true,
2680 "mem_type_64":false,
2681 "bar":0,
2682 "size":33554432,
2683 "address":4026531840,
2684 "type":"memory"
2685 },
2686 {
2687 "prefetch":false,
2688 "mem_type_64":false,
2689 "bar":1,
2690 "size":4096,
2691 "address":4060086272,
2692 "type":"memory"
2693 },
2694 {
2695 "prefetch":false,
2696 "mem_type_64":false,
2697 "bar":6,
2698 "size":65536,
2699 "address":-1,
2700 "type":"memory"
2701 }
2702 ]
2703 },
2704 {
2705 "bus":0,
2706 "qdev_id":"",
2707 "irq":11,
2708 "slot":4,
2709 "class_info":{
2710 "class":1280,
2711 "desc":"RAM controller"
2712 },
2713 "id":{
2714 "device":6900,
2715 "vendor":4098
2716 },
2717 "function":0,
2718 "regions":[
2719 {
2720 "bar":0,
2721 "size":32,
2722 "address":49280,
2723 "type":"io"
2724 }
2725 ]
2726 }
2727 ]
2728 }
2729 ]
2730 }
2731
2732Note: This example has been shortened as the real response is too long.
2733
2734EQMP
2735
Luiz Capitulino79627472011-10-21 14:15:33 -02002736 {
2737 .name = "query-pci",
2738 .args_type = "",
2739 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2740 },
2741
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002742SQMP
2743query-kvm
2744---------
2745
2746Show KVM information.
2747
2748Return a json-object with the following information:
2749
2750- "enabled": true if KVM support is enabled, false otherwise (json-bool)
2751- "present": true if QEMU has KVM support, false otherwise (json-bool)
2752
2753Example:
2754
2755-> { "execute": "query-kvm" }
2756<- { "return": { "enabled": true, "present": true } }
2757
2758EQMP
2759
Luiz Capitulino292a2602011-09-12 15:10:53 -03002760 {
2761 .name = "query-kvm",
2762 .args_type = "",
2763 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2764 },
2765
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002766SQMP
2767query-status
2768------------
2769
2770Return a json-object with the following information:
2771
2772- "running": true if the VM is running, or false if it is paused (json-bool)
2773- "singlestep": true if the VM is in single step mode,
2774 false otherwise (json-bool)
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002775- "status": one of the following values (json-string)
2776 "debug" - QEMU is running on a debugger
2777 "inmigrate" - guest is paused waiting for an incoming migration
2778 "internal-error" - An internal error that prevents further guest
2779 execution has occurred
2780 "io-error" - the last IOP has failed and the device is configured
2781 to pause on I/O errors
2782 "paused" - guest has been paused via the 'stop' command
2783 "postmigrate" - guest is paused following a successful 'migrate'
2784 "prelaunch" - QEMU was started with -S and guest has not started
2785 "finish-migrate" - guest is paused to finish the migration process
2786 "restore-vm" - guest is paused to restore VM state
2787 "running" - guest is actively running
2788 "save-vm" - guest is paused to save the VM state
2789 "shutdown" - guest is shut down (and -no-shutdown is in use)
2790 "watchdog" - the watchdog action is configured to pause and
2791 has been triggered
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002792
2793Example:
2794
2795-> { "execute": "query-status" }
Luiz Capitulino9e37b9d2011-08-29 16:02:57 -03002796<- { "return": { "running": true, "singlestep": false, "status": "running" } }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002797
2798EQMP
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -03002799
2800 {
2801 .name = "query-status",
2802 .args_type = "",
2803 .mhandler.cmd_new = qmp_marshal_input_query_status,
2804 },
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002805
2806SQMP
2807query-mice
2808----------
2809
2810Show VM mice information.
2811
2812Each mouse is represented by a json-object, the returned value is a json-array
2813of all mice.
2814
2815The mouse json-object contains the following:
2816
2817- "name": mouse's name (json-string)
2818- "index": mouse's index (json-int)
2819- "current": true if this mouse is receiving events, false otherwise (json-bool)
2820- "absolute": true if the mouse generates absolute input events (json-bool)
2821
2822Example:
2823
2824-> { "execute": "query-mice" }
2825<- {
2826 "return":[
2827 {
2828 "name":"QEMU Microsoft Mouse",
2829 "index":0,
2830 "current":false,
2831 "absolute":false
2832 },
2833 {
2834 "name":"QEMU PS/2 Mouse",
2835 "index":1,
2836 "current":true,
2837 "absolute":true
2838 }
2839 ]
2840 }
2841
2842EQMP
2843
Luiz Capitulinoe235cec2011-09-21 15:29:55 -03002844 {
2845 .name = "query-mice",
2846 .args_type = "",
2847 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2848 },
2849
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002850SQMP
2851query-vnc
2852---------
2853
2854Show VNC server information.
2855
2856Return a json-object with server information. Connected clients are returned
2857as a json-array of json-objects.
2858
2859The main json-object contains the following:
2860
2861- "enabled": true or false (json-bool)
2862- "host": server's IP address (json-string)
2863- "family": address family (json-string)
2864 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2865- "service": server's port number (json-string)
2866- "auth": authentication method (json-string)
2867 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2868 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2869 "vencrypt+plain", "vencrypt+tls+none",
2870 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2871 "vencrypt+tls+vnc", "vencrypt+x509+none",
2872 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2873 "vencrypt+x509+vnc", "vnc"
2874- "clients": a json-array of all connected clients
2875
2876Clients are described by a json-object, each one contain the following:
2877
2878- "host": client's IP address (json-string)
2879- "family": address family (json-string)
2880 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2881- "service": client's port number (json-string)
2882- "x509_dname": TLS dname (json-string, optional)
2883- "sasl_username": SASL username (json-string, optional)
2884
2885Example:
2886
2887-> { "execute": "query-vnc" }
2888<- {
2889 "return":{
2890 "enabled":true,
2891 "host":"0.0.0.0",
2892 "service":"50402",
2893 "auth":"vnc",
2894 "family":"ipv4",
2895 "clients":[
2896 {
2897 "host":"127.0.0.1",
2898 "service":"50401",
2899 "family":"ipv4"
2900 }
2901 ]
2902 }
2903 }
2904
2905EQMP
2906
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02002907 {
2908 .name = "query-vnc",
2909 .args_type = "",
2910 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2911 },
Gerd Hoffmanndf887682014-12-17 15:49:44 +01002912 {
2913 .name = "query-vnc-servers",
2914 .args_type = "",
2915 .mhandler.cmd_new = qmp_marshal_input_query_vnc_servers,
2916 },
Luiz Capitulino2b54aa82011-10-17 16:41:22 -02002917
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002918SQMP
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002919query-spice
2920-----------
2921
2922Show SPICE server information.
2923
2924Return a json-object with server information. Connected clients are returned
2925as a json-array of json-objects.
2926
2927The main json-object contains the following:
2928
2929- "enabled": true or false (json-bool)
2930- "host": server's IP address (json-string)
2931- "port": server's port number (json-int, optional)
2932- "tls-port": server's port number (json-int, optional)
2933- "auth": authentication method (json-string)
2934 - Possible values: "none", "spice"
2935- "channels": a json-array of all active channels clients
2936
2937Channels are described by a json-object, each one contain the following:
2938
2939- "host": client's IP address (json-string)
2940- "family": address family (json-string)
2941 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2942- "port": client's port number (json-string)
2943- "connection-id": spice connection id. All channels with the same id
2944 belong to the same spice session (json-int)
2945- "channel-type": channel type. "1" is the main control channel, filter for
2946 this one if you want track spice sessions only (json-int)
2947- "channel-id": channel id. Usually "0", might be different needed when
2948 multiple channels of the same type exist, such as multiple
2949 display channels in a multihead setup (json-int)
Alberto Garcia3599d462015-02-26 16:35:07 +02002950- "tls": whether the channel is encrypted (json-bool)
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002951
2952Example:
2953
2954-> { "execute": "query-spice" }
2955<- {
2956 "return": {
2957 "enabled": true,
2958 "auth": "spice",
2959 "port": 5920,
2960 "tls-port": 5921,
2961 "host": "0.0.0.0",
2962 "channels": [
2963 {
2964 "port": "54924",
2965 "family": "ipv4",
2966 "channel-type": 1,
2967 "connection-id": 1804289383,
2968 "host": "127.0.0.1",
2969 "channel-id": 0,
2970 "tls": true
2971 },
2972 {
2973 "port": "36710",
2974 "family": "ipv4",
2975 "channel-type": 4,
2976 "connection-id": 1804289383,
2977 "host": "127.0.0.1",
2978 "channel-id": 0,
2979 "tls": false
2980 },
2981 [ ... more channels follow ... ]
2982 ]
2983 }
2984 }
2985
2986EQMP
2987
Luiz Capitulinod1f29642011-10-20 17:01:33 -02002988#if defined(CONFIG_SPICE)
2989 {
2990 .name = "query-spice",
2991 .args_type = "",
2992 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2993 },
2994#endif
2995
Gerd Hoffmanncb42a872010-11-30 11:02:51 +01002996SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03002997query-name
2998----------
2999
3000Show VM name.
3001
3002Return a json-object with the following information:
3003
3004- "name": VM's name (json-string, optional)
3005
3006Example:
3007
3008-> { "execute": "query-name" }
3009<- { "return": { "name": "qemu-name" } }
3010
3011EQMP
3012
Anthony Liguori48a32be2011-09-02 12:34:48 -05003013 {
3014 .name = "query-name",
3015 .args_type = "",
3016 .mhandler.cmd_new = qmp_marshal_input_query_name,
3017 },
3018
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003019SQMP
3020query-uuid
3021----------
3022
3023Show VM UUID.
3024
3025Return a json-object with the following information:
3026
3027- "UUID": Universally Unique Identifier (json-string)
3028
3029Example:
3030
3031-> { "execute": "query-uuid" }
3032<- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3033
3034EQMP
3035
Luiz Capitulinoefab7672011-09-13 17:16:25 -03003036 {
3037 .name = "query-uuid",
3038 .args_type = "",
3039 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
3040 },
3041
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003042SQMP
Amos Kong1f8f9872013-04-25 17:50:35 +08003043query-command-line-options
3044--------------------------
3045
3046Show command line option schema.
3047
3048Return a json-array of command line option schema for all options (or for
3049the given option), returning an error if the given option doesn't exist.
3050
3051Each array entry contains the following:
3052
3053- "option": option name (json-string)
3054- "parameters": a json-array describes all parameters of the option:
3055 - "name": parameter name (json-string)
3056 - "type": parameter type (one of 'string', 'boolean', 'number',
3057 or 'size')
3058 - "help": human readable description of the parameter
3059 (json-string, optional)
Chunyan Liue36af942014-06-05 17:20:43 +08003060 - "default": default value string for the parameter
3061 (json-string, optional)
Amos Kong1f8f9872013-04-25 17:50:35 +08003062
3063Example:
3064
3065-> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3066<- { "return": [
3067 {
3068 "parameters": [
3069 {
3070 "name": "romfile",
3071 "type": "string"
3072 },
3073 {
3074 "name": "bootindex",
3075 "type": "number"
3076 }
3077 ],
3078 "option": "option-rom"
3079 }
3080 ]
3081 }
3082
3083EQMP
3084
3085 {
3086 .name = "query-command-line-options",
3087 .args_type = "option:s?",
3088 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
3089 },
3090
3091SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003092query-migrate
3093-------------
3094
3095Migration status.
3096
3097Return a json-object. If migration is active there will be another json-object
3098with RAM migration status and if block migration is active another one with
3099block migration status.
3100
3101The main json-object contains the following:
3102
3103- "status": migration status (json-string)
Peter Feiner3b695952014-05-16 10:40:47 -04003104 - Possible values: "setup", "active", "completed", "failed", "cancelled"
Juan Quintela7aa939a2012-08-18 13:17:10 +02003105- "total-time": total amount of ms since migration started. If
3106 migration has ended, it returns the total migration
Juan Quintela817c6042013-02-11 15:11:10 +01003107 time (json-int)
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003108- "setup-time" amount of setup time in milliseconds _before_ the
3109 iterations begin but _after_ the QMP command is issued.
3110 This is designed to provide an accounting of any activities
3111 (such as RDMA pinning) which may be expensive, but do not
3112 actually occur during the iterative migration rounds
3113 themselves. (json-int)
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02003114- "downtime": only present when migration has finished correctly
3115 total amount in ms for downtime that happened (json-int)
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003116- "expected-downtime": only present while migration is active
3117 total amount in ms for downtime that was calculated on
Juan Quintela817c6042013-02-11 15:11:10 +01003118 the last bitmap round (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003119- "ram": only present if "status" is "active", it is a json-object with the
Juan Quintela817c6042013-02-11 15:11:10 +01003120 following RAM information:
3121 - "transferred": amount transferred in bytes (json-int)
3122 - "remaining": amount remaining to transfer in bytes (json-int)
3123 - "total": total amount of memory in bytes (json-int)
3124 - "duplicate": number of pages filled entirely with the same
3125 byte (json-int)
3126 These are sent over the wire much more efficiently.
Peter Lievenf1c72792013-03-26 10:58:37 +01003127 - "skipped": number of skipped zero pages (json-int)
Stefan Weil805a2502013-04-28 11:49:57 +02003128 - "normal" : number of whole pages transferred. I.e. they
Juan Quintela817c6042013-02-11 15:11:10 +01003129 were not sent as duplicate or xbzrle pages (json-int)
3130 - "normal-bytes" : number of bytes transferred in whole
3131 pages. This is just normal pages times size of one page,
3132 but this way upper levels don't need to care about page
3133 size (json-int)
ChenLiang58570ed2014-04-04 17:57:55 +08003134 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003135- "disk": only present if "status" is "active" and it is a block migration,
Juan Quintela817c6042013-02-11 15:11:10 +01003136 it is a json-object with the following disk information:
3137 - "transferred": amount transferred in bytes (json-int)
3138 - "remaining": amount remaining to transfer in bytes json-int)
3139 - "total": total disk size in bytes (json-int)
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003140- "xbzrle-cache": only present if XBZRLE is active.
3141 It is a json-object with the following XBZRLE information:
Juan Quintela817c6042013-02-11 15:11:10 +01003142 - "cache-size": XBZRLE cache size in bytes
3143 - "bytes": number of bytes transferred for XBZRLE compressed pages
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003144 - "pages": number of XBZRLE compressed pages
Juan Quintela817c6042013-02-11 15:11:10 +01003145 - "cache-miss": number of XBRZRLE page cache misses
ChenLiang8bc39232014-04-04 17:57:56 +08003146 - "cache-miss-rate": rate of XBRZRLE page cache misses
Juan Quintela817c6042013-02-11 15:11:10 +01003147 - "overflow": number of times XBZRLE overflows. This means
3148 that the XBZRLE encoding was bigger than just sent the
3149 whole page, and then we sent the whole page instead (as as
3150 normal page).
3151
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003152Examples:
3153
31541. Before the first migration
3155
3156-> { "execute": "query-migrate" }
3157<- { "return": {} }
3158
31592. Migration is done and has succeeded
3160
3161-> { "execute": "query-migrate" }
Orit Wasserman004d4c12012-08-06 21:42:56 +03003162<- { "return": {
3163 "status": "completed",
3164 "ram":{
3165 "transferred":123,
3166 "remaining":123,
3167 "total":246,
3168 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003169 "setup-time":12345,
Juan Quintela9c5a9fc2012-08-13 09:35:16 +02003170 "downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003171 "duplicate":123,
3172 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003173 "normal-bytes":123456,
3174 "dirty-sync-count":15
Orit Wasserman004d4c12012-08-06 21:42:56 +03003175 }
3176 }
3177 }
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003178
31793. Migration is done and has failed
3180
3181-> { "execute": "query-migrate" }
3182<- { "return": { "status": "failed" } }
3183
31844. Migration is being performed and is not a block migration:
3185
3186-> { "execute": "query-migrate" }
3187<- {
3188 "return":{
3189 "status":"active",
3190 "ram":{
3191 "transferred":123,
3192 "remaining":123,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03003193 "total":246,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003194 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003195 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003196 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003197 "duplicate":123,
3198 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003199 "normal-bytes":123456,
3200 "dirty-sync-count":15
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003201 }
3202 }
3203 }
3204
32055. Migration is being performed and is a block migration:
3206
3207-> { "execute": "query-migrate" }
3208<- {
3209 "return":{
3210 "status":"active",
3211 "ram":{
3212 "total":1057024,
3213 "remaining":1053304,
Orit Wasserman62d4e3f2012-08-06 21:42:55 +03003214 "transferred":3720,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003215 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003216 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003217 "expected-downtime":12345,
Orit Wasserman004d4c12012-08-06 21:42:56 +03003218 "duplicate":123,
3219 "normal":123,
ChenLiang58570ed2014-04-04 17:57:55 +08003220 "normal-bytes":123456,
3221 "dirty-sync-count":15
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003222 },
3223 "disk":{
3224 "total":20971520,
3225 "remaining":20880384,
3226 "transferred":91136
3227 }
3228 }
3229 }
3230
Orit Wassermanf36d55a2012-08-06 21:42:57 +030032316. Migration is being performed and XBZRLE is active:
3232
3233-> { "execute": "query-migrate" }
3234<- {
3235 "return":{
3236 "status":"active",
3237 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3238 "ram":{
3239 "total":1057024,
3240 "remaining":1053304,
3241 "transferred":3720,
3242 "total-time":12345,
Michael R. Hines8f3067b2013-08-09 16:05:45 -04003243 "setup-time":12345,
Juan Quintela2c52ddf2012-08-13 09:53:12 +02003244 "expected-downtime":12345,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003245 "duplicate":10,
3246 "normal":3333,
ChenLiang58570ed2014-04-04 17:57:55 +08003247 "normal-bytes":3412992,
3248 "dirty-sync-count":15
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003249 },
3250 "xbzrle-cache":{
3251 "cache-size":67108864,
3252 "bytes":20971520,
3253 "pages":2444343,
3254 "cache-miss":2244,
ChenLiang8bc39232014-04-04 17:57:56 +08003255 "cache-miss-rate":0.123,
Orit Wassermanf36d55a2012-08-06 21:42:57 +03003256 "overflow":34434
3257 }
3258 }
3259 }
3260
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003261EQMP
3262
Luiz Capitulino791e7c82011-09-13 17:37:16 -03003263 {
3264 .name = "query-migrate",
3265 .args_type = "",
3266 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
3267 },
3268
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003269SQMP
Orit Wasserman00458432012-08-06 21:42:48 +03003270migrate-set-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01003271------------------------
Orit Wasserman00458432012-08-06 21:42:48 +03003272
3273Enable/Disable migration capabilities
3274
Juan Quintela817c6042013-02-11 15:11:10 +01003275- "xbzrle": XBZRLE support
zhanghailiangd6d69732014-12-09 14:38:37 +08003276- "rdma-pin-all": pin all pages when using RDMA during migration
3277- "auto-converge": throttle down guest to help convergence of migration
3278- "zero-blocks": compress zero blocks during block migration
Orit Wasserman00458432012-08-06 21:42:48 +03003279
3280Arguments:
3281
3282Example:
3283
3284-> { "execute": "migrate-set-capabilities" , "arguments":
3285 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3286
3287EQMP
3288
3289 {
3290 .name = "migrate-set-capabilities",
Paolo Bonzini43d0a2c2015-04-15 13:30:04 +02003291 .args_type = "capabilities:q",
Orit Wasserman00458432012-08-06 21:42:48 +03003292 .params = "capability:s,state:b",
3293 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
3294 },
3295SQMP
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003296query-migrate-capabilities
Juan Quintela817c6042013-02-11 15:11:10 +01003297--------------------------
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003298
3299Query current migration capabilities
3300
3301- "capabilities": migration capabilities state
3302 - "xbzrle" : XBZRLE state (json-bool)
zhanghailiangd6d69732014-12-09 14:38:37 +08003303 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3304 - "auto-converge" : Auto Converge state (json-bool)
3305 - "zero-blocks" : Zero Blocks state (json-bool)
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003306
3307Arguments:
3308
3309Example:
3310
3311-> { "execute": "query-migrate-capabilities" }
Orit Wassermandbca1b32013-01-31 09:12:17 +02003312<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3313
Orit Wassermanbbf6da32012-08-06 21:42:47 +03003314EQMP
3315
3316 {
3317 .name = "query-migrate-capabilities",
3318 .args_type = "",
3319 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
3320 },
3321
3322SQMP
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003323query-balloon
3324-------------
3325
3326Show balloon information.
3327
3328Make an asynchronous request for balloon info. When the request completes a
3329json-object will be returned containing the following data:
3330
3331- "actual": current balloon value in bytes (json-int)
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003332
3333Example:
3334
3335-> { "execute": "query-balloon" }
3336<- {
3337 "return":{
3338 "actual":1073741824,
Luiz Capitulino82a56f02010-09-13 12:26:00 -03003339 }
3340 }
3341
3342EQMP
3343
Luiz Capitulino96637bc2011-10-21 11:41:37 -02003344 {
3345 .name = "query-balloon",
3346 .args_type = "",
3347 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
3348 },
Anthony Liguorib4b12c62011-12-12 14:29:34 -06003349
3350 {
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00003351 .name = "query-block-jobs",
3352 .args_type = "",
3353 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
3354 },
3355
3356 {
Anthony Liguorib4b12c62011-12-12 14:29:34 -06003357 .name = "qom-list",
3358 .args_type = "path:s",
3359 .mhandler.cmd_new = qmp_marshal_input_qom_list,
3360 },
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06003361
3362 {
3363 .name = "qom-set",
Paolo Bonzinib9f89782012-03-22 12:51:11 +01003364 .args_type = "path:s,property:s,value:q",
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06003365 .mhandler.cmd_new = qmp_qom_set,
3366 },
3367
3368 {
3369 .name = "qom-get",
3370 .args_type = "path:s,property:s",
3371 .mhandler.cmd_new = qmp_qom_get,
3372 },
Luiz Capitulino270b2432011-12-08 11:45:55 -02003373
3374 {
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02003375 .name = "nbd-server-start",
3376 .args_type = "addr:q",
3377 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
3378 },
3379 {
3380 .name = "nbd-server-add",
3381 .args_type = "device:B,writable:b?",
3382 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
3383 },
3384 {
3385 .name = "nbd-server-stop",
3386 .args_type = "",
3387 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
3388 },
3389
3390 {
Luiz Capitulino270b2432011-12-08 11:45:55 -02003391 .name = "change-vnc-password",
3392 .args_type = "password:s",
3393 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
3394 },
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06003395 {
3396 .name = "qom-list-types",
3397 .args_type = "implements:s?,abstract:b?",
3398 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
3399 },
Anthony Liguori1daa31b2012-08-10 11:04:09 -05003400
3401 {
3402 .name = "device-list-properties",
3403 .args_type = "typename:s",
3404 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
3405 },
3406
Anthony Liguori01d3c802012-08-10 11:04:11 -05003407 {
3408 .name = "query-machines",
3409 .args_type = "",
3410 .mhandler.cmd_new = qmp_marshal_input_query_machines,
3411 },
3412
Anthony Liguorie4e31c62012-08-10 11:04:13 -05003413 {
3414 .name = "query-cpu-definitions",
3415 .args_type = "",
3416 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
3417 },
3418
Daniel P. Berrange99afc912012-08-20 15:31:38 +01003419 {
3420 .name = "query-target",
3421 .args_type = "",
3422 .mhandler.cmd_new = qmp_marshal_input_query_target,
3423 },
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003424
3425 {
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003426 .name = "query-tpm",
3427 .args_type = "",
3428 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
3429 },
3430
Corey Bryant28c4fa32013-03-20 12:34:49 -04003431SQMP
3432query-tpm
3433---------
3434
3435Return information about the TPM device.
3436
3437Arguments: None
3438
3439Example:
3440
3441-> { "execute": "query-tpm" }
3442<- { "return":
3443 [
3444 { "model": "tpm-tis",
3445 "options":
3446 { "type": "passthrough",
3447 "data":
3448 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3449 "path": "/dev/tpm0"
3450 }
3451 },
3452 "id": "tpm0"
3453 }
3454 ]
3455 }
3456
3457EQMP
3458
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003459 {
3460 .name = "query-tpm-models",
3461 .args_type = "",
3462 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
3463 },
3464
Corey Bryant28c4fa32013-03-20 12:34:49 -04003465SQMP
3466query-tpm-models
3467----------------
3468
3469Return a list of supported TPM models.
3470
3471Arguments: None
3472
3473Example:
3474
3475-> { "execute": "query-tpm-models" }
3476<- { "return": [ "tpm-tis" ] }
3477
3478EQMP
3479
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003480 {
3481 .name = "query-tpm-types",
3482 .args_type = "",
3483 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
3484 },
3485
Corey Bryant28c4fa32013-03-20 12:34:49 -04003486SQMP
3487query-tpm-types
3488---------------
3489
3490Return a list of supported TPM types.
3491
3492Arguments: None
3493
3494Example:
3495
3496-> { "execute": "query-tpm-types" }
3497<- { "return": [ "passthrough" ] }
3498
3499EQMP
3500
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003501 {
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003502 .name = "chardev-add",
3503 .args_type = "id:s,backend:q",
3504 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
3505 },
3506
3507SQMP
3508chardev-add
3509----------------
3510
3511Add a chardev.
3512
3513Arguments:
3514
3515- "id": the chardev's ID, must be unique (json-string)
3516- "backend": chardev backend type + parameters
3517
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003518Examples:
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003519
3520-> { "execute" : "chardev-add",
3521 "arguments" : { "id" : "foo",
3522 "backend" : { "type" : "null", "data" : {} } } }
3523<- { "return": {} }
3524
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003525-> { "execute" : "chardev-add",
3526 "arguments" : { "id" : "bar",
3527 "backend" : { "type" : "file",
3528 "data" : { "out" : "/tmp/bar.log" } } } }
3529<- { "return": {} }
3530
Gerd Hoffmann0a1a7fa2012-12-20 14:39:13 +01003531-> { "execute" : "chardev-add",
3532 "arguments" : { "id" : "baz",
3533 "backend" : { "type" : "pty", "data" : {} } } }
3534<- { "return": { "pty" : "/dev/pty/42" } }
3535
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003536EQMP
3537
3538 {
3539 .name = "chardev-remove",
3540 .args_type = "id:s",
3541 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3542 },
3543
3544
3545SQMP
3546chardev-remove
3547--------------
3548
3549Remove a chardev.
3550
3551Arguments:
3552
3553- "id": the chardev's ID, must exist and not be in use (json-string)
3554
3555Example:
3556
3557-> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3558<- { "return": {} }
3559
3560EQMP
Amos Kongb1be4282013-06-14 15:45:52 +08003561 {
3562 .name = "query-rx-filter",
3563 .args_type = "name:s?",
3564 .mhandler.cmd_new = qmp_marshal_input_query_rx_filter,
3565 },
3566
3567SQMP
3568query-rx-filter
3569---------------
3570
3571Show rx-filter information.
3572
3573Returns a json-array of rx-filter information for all NICs (or for the
3574given NIC), returning an error if the given NIC doesn't exist, or
3575given NIC doesn't support rx-filter querying, or given net client
3576isn't a NIC.
3577
3578The query will clear the event notification flag of each NIC, then qemu
3579will start to emit event to QMP monitor.
3580
3581Each array entry contains the following:
3582
3583- "name": net client name (json-string)
3584- "promiscuous": promiscuous mode is enabled (json-bool)
3585- "multicast": multicast receive state (one of 'normal', 'none', 'all')
3586- "unicast": unicast receive state (one of 'normal', 'none', 'all')
Amos Kongf7bc8ef2014-03-26 08:19:43 +08003587- "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
Amos Kongb1be4282013-06-14 15:45:52 +08003588- "broadcast-allowed": allow to receive broadcast (json-bool)
3589- "multicast-overflow": multicast table is overflowed (json-bool)
3590- "unicast-overflow": unicast table is overflowed (json-bool)
3591- "main-mac": main macaddr string (json-string)
3592- "vlan-table": a json-array of active vlan id
3593- "unicast-table": a json-array of unicast macaddr string
3594- "multicast-table": a json-array of multicast macaddr string
3595
3596Example:
3597
3598-> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
3599<- { "return": [
3600 {
3601 "promiscuous": true,
3602 "name": "vnet0",
3603 "main-mac": "52:54:00:12:34:56",
3604 "unicast": "normal",
Amos Kongf7bc8ef2014-03-26 08:19:43 +08003605 "vlan": "normal",
Amos Kongb1be4282013-06-14 15:45:52 +08003606 "vlan-table": [
3607 4,
3608 0
3609 ],
3610 "unicast-table": [
3611 ],
3612 "multicast": "normal",
3613 "multicast-overflow": false,
3614 "unicast-overflow": false,
3615 "multicast-table": [
3616 "01:00:5e:00:00:01",
3617 "33:33:00:00:00:01",
3618 "33:33:ff:12:34:56"
3619 ],
3620 "broadcast-allowed": false
3621 }
3622 ]
3623 }
3624
3625EQMP
Kevin Wolfd26c9a12013-09-23 15:26:03 +02003626
3627 {
3628 .name = "blockdev-add",
3629 .args_type = "options:q",
3630 .mhandler.cmd_new = qmp_marshal_input_blockdev_add,
3631 },
3632
3633SQMP
3634blockdev-add
3635------------
3636
3637Add a block device.
3638
Markus Armbrusterda2cf4e2015-03-20 14:32:17 +01003639This command is still a work in progress. It doesn't support all
3640block drivers, it lacks a matching blockdev-del, and more. Stay away
3641from it unless you want to help with its development.
3642
Kevin Wolfd26c9a12013-09-23 15:26:03 +02003643Arguments:
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