]> git.proxmox.com Git - mirror_qemu.git/blame - qmp-commands.hx
Add MemTxAttrs to the IOTLB
[mirror_qemu.git] / qmp-commands.hx
CommitLineData
82a56f0d 1HXCOMM QMP dispatch table and documentation
3599d46b 2HXCOMM Text between SQMP and EQMP is copied to the QMP documentation file and
82a56f0d
LC
3HXCOMM 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
c20cdf8b 45 1. The deprecation policy will take effect and be documented soon, please
82a56f0d
LC
46 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 = "",
7a7f325e 66 .mhandler.cmd_new = qmp_marshal_input_quit,
82a56f0d
LC
67 },
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",
c245b6a3 87 .mhandler.cmd_new = qmp_marshal_input_eject,
82a56f0d
LC
88 },
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?",
333a96ec 113 .mhandler.cmd_new = qmp_marshal_input_change,
82a56f0d
LC
114 },
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",
ad39cf6d 149 .mhandler.cmd_new = qmp_marshal_input_screendump,
82a56f0d
LC
150 },
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 = "",
5f158f21 172 .mhandler.cmd_new = qmp_marshal_input_stop,
82a56f0d
LC
173 },
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 = "",
e42e818b 193 .mhandler.cmd_new = qmp_marshal_input_cont,
82a56f0d
LC
194 },
195
196SQMP
197cont
198----
199
200Resume emulation.
201
202Arguments: None.
203
204Example:
205
206-> { "execute": "cont" }
207<- { "return": {} }
9b9df25a
GH
208
209EQMP
210
211 {
212 .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": {} }
82a56f0d
LC
229
230EQMP
231
232 {
233 .name = "system_reset",
234 .args_type = "",
38d22653 235 .mhandler.cmd_new = qmp_marshal_input_system_reset,
82a56f0d
LC
236 },
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 = "",
22e1bb9c 256 .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
82a56f0d
LC
257 },
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",
82a56f0d
LC
279 .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",
a15fef21 313 .mhandler.cmd_new = qmp_marshal_input_device_del,
82a56f0d
LC
314 },
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
e4c8f004
AK
331EQMP
332
333 {
334 .name = "send-key",
335 .args_type = "keys:O,hold-time:i?",
336 .mhandler.cmd_new = qmp_marshal_input_send_key,
337 },
338
339SQMP
340send-key
341----------
342
343Send keys to VM.
344
345Arguments:
346
347keys array:
f9b1d9b2
AK
348 - "key": key sequence (a json-array of key union values,
349 union can be number or qcode enum)
e4c8f004
AK
350
351- hold-time: time to delay key up events, milliseconds. Defaults to 100
352 (json-int, optional)
353
354Example:
355
356-> { "execute": "send-key",
f9b1d9b2
AK
357 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
358 { "type": "qcode", "data": "alt" },
359 { "type": "qcode", "data": "delete" } ] } }
e4c8f004
AK
360<- { "return": {} }
361
82a56f0d
LC
362EQMP
363
364 {
365 .name = "cpu",
366 .args_type = "index:i",
755f1968 367 .mhandler.cmd_new = qmp_marshal_input_cpu,
82a56f0d
LC
368 },
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
69ca3ea5
IM
387EQMP
388
389 {
390 .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
82a56f0d
LC
410EQMP
411
412 {
413 .name = "memsave",
0cfd6a9a
LC
414 .args_type = "val:l,size:i,filename:s,cpu:i?",
415 .mhandler.cmd_new = qmp_marshal_input_memsave,
82a56f0d
LC
416 },
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)
0cfd6a9a 429- "cpu": virtual CPU index (json-int, optional)
82a56f0d
LC
430
431Example:
432
433-> { "execute": "memsave",
434 "arguments": { "val": 10,
435 "size": 100,
436 "filename": "/tmp/virtual-mem-dump" } }
437<- { "return": {} }
438
82a56f0d
LC
439EQMP
440
441 {
442 .name = "pmemsave",
443 .args_type = "val:l,size:i,filename:s",
6d3962bf 444 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
82a56f0d
LC
445 },
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
a4046664
LJ
467EQMP
468
469 {
470 .name = "inject-nmi",
471 .args_type = "",
ab49ab5c 472 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
a4046664
LJ
473 },
474
475SQMP
476inject-nmi
477----------
478
9cb805fd 479Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
a4046664
LJ
480
481Arguments: None.
482
483Example:
484
485-> { "execute": "inject-nmi" }
486<- { "return": {} }
487
de253f14 488Note: inject-nmi fails when the guest doesn't support injecting.
a4046664 489
1f590cf9
LL
490EQMP
491
492 {
3949e594 493 .name = "ringbuf-write",
82e59a67 494 .args_type = "device:s,data:s,format:s?",
3949e594 495 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
1f590cf9
LL
496 },
497
498SQMP
3949e594 499ringbuf-write
1f590cf9
LL
500-------------
501
3949e594 502Write to a ring buffer character device.
1f590cf9
LL
503
504Arguments:
505
3949e594
MA
506- "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.
1f590cf9
LL
512
513Example:
514
3949e594
MA
515-> { "execute": "ringbuf-write",
516 "arguments": { "device": "foo",
1f590cf9
LL
517 "data": "abcdefgh",
518 "format": "utf8" } }
519<- { "return": {} }
520
49b6d722
LL
521EQMP
522
523 {
3949e594 524 .name = "ringbuf-read",
49b6d722 525 .args_type = "device:s,size:i,format:s?",
3949e594 526 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
49b6d722
LL
527 },
528
529SQMP
3949e594 530ringbuf-read
49b6d722
LL
531-------------
532
3949e594 533Read from a ring buffer character device.
49b6d722
LL
534
535Arguments:
536
3949e594
MA
537- "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.
49b6d722
LL
548
549Example:
550
3949e594
MA
551-> { "execute": "ringbuf-read",
552 "arguments": { "device": "foo",
49b6d722
LL
553 "size": 1000,
554 "format": "utf8" } }
3ab651fc 555<- {"return": "abcdefgh"}
49b6d722 556
a7ae8355
SS
557EQMP
558
559 {
560 .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
39f42439
AP
584EQMP
585
586 {
587 .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
82a56f0d
LC
608EQMP
609
610 {
611 .name = "migrate",
612 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
e1c37d0e 613 .mhandler.cmd_new = qmp_marshal_input_migrate,
82a56f0d
LC
614 },
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 = "",
6cdedb07 646 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
82a56f0d
LC
647 },
648
649SQMP
650migrate_cancel
651--------------
652
653Cancel the current migration.
654
655Arguments: None.
656
657Example:
658
659-> { "execute": "migrate_cancel" }
660<- { "return": {} }
661
9e1ba4cc 662EQMP
bf1ae1f4
DDAG
663
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 {
9e1ba4cc
OW
693 .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
817c6045 700----------------------
9e1ba4cc
OW
701
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
817c6045 723------------------------
9e1ba4cc
OW
724
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
82a56f0d
LC
735EQMP
736
737 {
738 .name = "migrate_set_speed",
3a019b6e 739 .args_type = "value:o",
3dc85383 740 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
82a56f0d
LC
741 },
742
e866e239 743SQMP
ff73edf5
JS
744migrate_set_speed
745-----------------
e866e239 746
ff73edf5 747Set maximum speed for migrations.
e866e239
GH
748
749Arguments:
750
ff73edf5 751- "value": maximum speed, in bytes per second (json-int)
e866e239
GH
752
753Example:
754
ff73edf5 755-> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
e866e239
GH
756<- { "return": {} }
757
758EQMP
759
760 {
ff73edf5
JS
761 .name = "migrate_set_downtime",
762 .args_type = "value:T",
4f0a993b 763 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
e866e239
GH
764 },
765
82a56f0d 766SQMP
ff73edf5
JS
767migrate_set_downtime
768--------------------
82a56f0d 769
ff73edf5 770Set maximum tolerated downtime (in seconds) for migrations.
82a56f0d
LC
771
772Arguments:
773
ff73edf5 774- "value": maximum downtime (json-number)
82a56f0d
LC
775
776Example:
777
ff73edf5 778-> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
82a56f0d
LC
779<- { "return": {} }
780
781EQMP
782
783 {
ff73edf5
JS
784 .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",
edc5cb1a
YH
788 .mhandler.cmd_async = client_migrate_info,
789 .flags = MONITOR_CMD_ASYNC,
82a56f0d
LC
790 },
791
792SQMP
ff73edf5
JS
793client_migrate_info
794------------------
82a56f0d 795
ff73edf5
JS
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.
82a56f0d
LC
799
800Arguments:
801
ff73edf5
JS
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)
82a56f0d
LC
807
808Example:
809
ff73edf5
JS
810-> { "execute": "client_migrate_info",
811 "arguments": { "protocol": "spice",
812 "hostname": "virt42.lab.kraxel.org",
813 "port": 1234 } }
82a56f0d
LC
814<- { "return": {} }
815
783e9b48
WC
816EQMP
817
818 {
819 .name = "dump-guest-memory",
b53ccc30
QN
820 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
821 .params = "-p protocol [begin] [length] [format]",
783e9b48 822 .help = "dump guest memory to file",
783e9b48
WC
823 .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)
b53ccc30
QN
841- "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)
783e9b48
WC
844
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
7d6dc7f3
QN
854EQMP
855
856 {
857 .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
82a56f0d
LC
874EQMP
875
876 {
877 .name = "netdev_add",
878 .args_type = "netdev:O",
928059a3 879 .mhandler.cmd_new = qmp_netdev_add,
82a56f0d
LC
880 },
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
af347aa5 899Note: The supported device options are the same ones supported by the '-netdev'
82a56f0d
LC
900 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",
5f964155 908 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
82a56f0d
LC
909 },
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
6d4a2b3a 926
cff8b2c6
PB
927EQMP
928
929 {
930 .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
6d4a2b3a
CH
953EQMP
954
ab2d0531
PB
955 {
956 .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
6d4a2b3a
CH
980 {
981 .name = "block_resize",
3b1dbd11 982 .args_type = "device:s?,node-name:s?,size:o",
5e7caacb 983 .mhandler.cmd_new = qmp_marshal_input_block_resize,
6d4a2b3a
CH
984 },
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)
3b1dbd11 995- "node-name": the node name in the block driver state graph (json-string)
6d4a2b3a
CH
996- "size": new size
997
998Example:
999
1000-> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1001<- { "return": {} }
1002
d967b2f1
JS
1003EQMP
1004
12bd451f 1005 {
db58f9c0 1006 .name = "block-stream",
13d8cc51 1007 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
12bd451f
SH
1008 .mhandler.cmd_new = qmp_marshal_input_block_stream,
1009 },
1010
ed61fc10
JC
1011 {
1012 .name = "block-commit",
54e26900 1013 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
ed61fc10
JC
1014 .mhandler.cmd_new = qmp_marshal_input_block_commit,
1015 },
1016
37222900
JC
1017SQMP
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,
7676e2c5
JC
1031 which contains the topmost data to be committed down. If
1032 not specified, this is the active layer. (json-string, optional)
37222900 1033
54e26900
JC
1034- 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
37222900
JC
1051 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
99a9addf
SH
1074 {
1075 .name = "drive-backup",
b53169ea 1076 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
99a9addf
SH
1077 "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)
b53169ea
SH
1102- "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).
99a9addf
SH
1106- "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",
fc5d3f84 1120 "sync": "full",
99a9addf
SH
1121 "target": "backup.img" } }
1122<- { "return": {} }
c29c1dd3
FZ
1123
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
99a9addf
SH
1165EQMP
1166
2d47c6e9 1167 {
db58f9c0 1168 .name = "block-job-set-speed",
882ec7ce 1169 .args_type = "device:B,speed:o",
2d47c6e9
SH
1170 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
1171 },
1172
370521a1 1173 {
db58f9c0 1174 .name = "block-job-cancel",
6e37fb81 1175 .args_type = "device:B,force:b?",
370521a1
SH
1176 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
1177 },
6e37fb81
PB
1178 {
1179 .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 },
aeae883b
PB
1188 {
1189 .name = "block-job-complete",
1190 .args_type = "device:B",
1191 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
1192 },
c186402c 1193 {
52e7c241 1194 .name = "transaction",
b9f8978c 1195 .args_type = "actions:q",
52e7c241 1196 .mhandler.cmd_new = qmp_marshal_input_transaction,
c186402c
JC
1197 },
1198
1199SQMP
52e7c241
PB
1200transaction
1201-----------
c186402c 1202
bbe86010
WX
1203Atomically 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.
c186402c 1208
bbe86010
WX
1209For 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.
c186402c 1212
bc8b094f
PB
1213Each 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
bbe86010
WX
1220On 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
c186402c
JC
1231Arguments:
1232
52e7c241
PB
1233actions 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)
0901f67e 1239 - "node-name": graph node name to snapshot (json-string)
52e7c241 1240 - "snapshot-file": name of new image file (json-string)
0901f67e 1241 - "snapshot-node-name": graph node name of the new snapshot (json-string)
52e7c241 1242 - "format": format of new image (json-string, optional)
bc8b094f
PB
1243 - "mode": whether and how QEMU should create the snapshot file
1244 (NewImageMode, optional, default "absolute-paths")
bbe86010
WX
1245 When "type" is "blockdev-snapshot-internal-sync":
1246 - "device": device name to snapshot (json-string)
1247 - "name": name of the new snapshot (json-string)
c186402c
JC
1248
1249Example:
1250
52e7c241
PB
1251-> { "execute": "transaction",
1252 "arguments": { "actions": [
cd0c5389 1253 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
52e7c241
PB
1254 "snapshot-file": "/some/place/my-image",
1255 "format": "qcow2" } },
cd0c5389 1256 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
0901f67e
BC
1257 "snapshot-file": "/some/place/my-image2",
1258 "snapshot-node-name": "node3432",
1259 "mode": "existing",
1260 "format": "qcow2" } },
cd0c5389 1261 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
52e7c241 1262 "snapshot-file": "/some/place/my-image2",
bc8b094f 1263 "mode": "existing",
bbe86010 1264 "format": "qcow2" } },
cd0c5389 1265 { "type": "blockdev-snapshot-internal-sync", "data" : {
bbe86010
WX
1266 "device": "ide-hd2",
1267 "name": "snapshot0" } } ] } }
c186402c
JC
1268<- { "return": {} }
1269
1270EQMP
370521a1 1271
d967b2f1
JS
1272 {
1273 .name = "blockdev-snapshot-sync",
0901f67e 1274 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
6106e249 1275 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
d967b2f1
JS
1276 },
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)
0901f67e 1291- "node-name": graph node name to snapshot (json-string)
d967b2f1 1292- "snapshot-file": name of new image file (json-string)
0901f67e 1293- "snapshot-node-name": graph node name of the new snapshot (json-string)
6cc2a415
PB
1294- "mode": whether and how QEMU should create the snapshot file
1295 (NewImageMode, optional, default "absolute-paths")
d967b2f1
JS
1296- "format": format of new image (json-string, optional)
1297
1298Example:
1299
7f3850c2
LC
1300-> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1301 "snapshot-file":
1302 "/some/place/my-image",
1303 "format": "qcow2" } }
d967b2f1
JS
1304<- { "return": {} }
1305
f323bc9e
WX
1306EQMP
1307
1308 {
1309 .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
44e3e053
WX
1335EQMP
1336
1337 {
1338 .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
d9b902db
PB
1376EQMP
1377
1378 {
1379 .name = "drive-mirror",
b952b558 1380 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
09158f00 1381 "node-name:s?,replaces:s?,"
eee13dfe 1382 "on-source-error:s?,on-target-error:s?,"
08e4ed6c 1383 "granularity:i?,buf-size:i?",
d9b902db
PB
1384 .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)
4c828dc6
BC
1403- "node-name": the name of the new block driver state in the node graph
1404 (json-string, optional)
09158f00
BC
1405- "replaces": the block driver node name to replace when finished
1406 (json-string, optional)
d9b902db
PB
1407- "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)
eee13dfe 1411- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
08e4ed6c
PB
1412- "buf_size": maximum amount of data in flight from source to target, in bytes
1413 (json-int, default 10M)
d9b902db
PB
1414- "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).
b952b558
PB
1418- "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
eee13dfe
PB
1423The 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.
d9b902db
PB
1427
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
fa40e656
JC
1437EQMP
1438
1439 {
1440 .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
82a56f0d
LC
1476EQMP
1477
1478 {
1479 .name = "balloon",
1480 .args_type = "value:M",
d72f3264 1481 .mhandler.cmd_new = qmp_marshal_input_balloon,
82a56f0d
LC
1482 },
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",
4b37156c 1504 .mhandler.cmd_new = qmp_marshal_input_set_link,
82a56f0d
LC
1505 },
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",
208c9d1b 1530 .mhandler.cmd_new = qmp_marshal_input_getfd,
82a56f0d
LC
1531 },
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
208c9d1b
CB
1548Notes:
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
82a56f0d
LC
1556EQMP
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",
208c9d1b 1563 .mhandler.cmd_new = qmp_marshal_input_closefd,
82a56f0d
LC
1564 },
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
ba1c048a
CB
1581EQMP
1582
1583 {
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
82a56f0d
LC
1703EQMP
1704
1705 {
1706 .name = "block_passwd",
12d3ba82 1707 .args_type = "device:s?,node-name:s?,password:s",
a4dea8a9 1708 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
82a56f0d
LC
1709 },
1710
1711SQMP
1712block_passwd
1713------------
1714
1715Set the password of encrypted block devices.
1716
1717Arguments:
1718
1719- "device": device name (json-string)
12d3ba82 1720- "node-name": name in the block driver state graph (json-string)
82a56f0d
LC
1721- "password": password (json-string)
1722
1723Example:
1724
1725-> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1726 "password": "12345" } }
1727<- { "return": {} }
1728
727f005e
ZYW
1729EQMP
1730
1731 {
1732 .name = "block_set_io_throttle",
2024c1df 1733 .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?",
80047da5 1734 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
727f005e
ZYW
1735 },
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)
586b5466
EB
1746- "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)
3e9fab69
BC
1752- "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)
2024c1df 1758- "iops_size": I/O size in bytes when limiting (json-int)
727f005e
ZYW
1759
1760Example:
1761
1762-> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
586b5466
EB
1763 "bps": 1000000,
1764 "bps_rd": 0,
1765 "bps_wr": 0,
1766 "iops": 0,
1767 "iops_rd": 0,
3e9fab69
BC
1768 "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,
2024c1df
BC
1774 "iops_wr_max": 0,
1775 "iops_size": 0 } }
727f005e
ZYW
1776<- { "return": {} }
1777
7572150c
GH
1778EQMP
1779
1780 {
1781 .name = "set_password",
1782 .args_type = "protocol:s,password:s,connected:s?",
fbf796fd 1783 .mhandler.cmd_new = qmp_marshal_input_set_password,
7572150c
GH
1784 },
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)
3599d46b 1796- "connected": [ keep | disconnect | fail ] (json-string, optional)
7572150c
GH
1797
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",
9ad5372d 1809 .mhandler.cmd_new = qmp_marshal_input_expire_password,
7572150c
GH
1810 },
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
82a56f0d
LC
1829EQMP
1830
13661089
DB
1831 {
1832 .name = "add_client",
f1f5f407 1833 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
b224e5e2 1834 .mhandler.cmd_new = qmp_marshal_input_add_client,
13661089
DB
1835 },
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)
f1f5f407
DB
1847- "skipauth": whether to skip authentication (json-bool, optional)
1848- "tls": whether to perform TLS (json-bool, optional)
13661089
DB
1849
1850Example:
1851
1852-> { "execute": "add_client", "arguments": { "protocol": "vnc",
1853 "fdname": "myclient" } }
1854<- { "return": {} }
1855
1856EQMP
82a56f0d
LC
1857 {
1858 .name = "qmp_capabilities",
1859 .args_type = "",
1860 .params = "",
1861 .help = "enable QMP capabilities",
82a56f0d
LC
1862 .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
0268d97c
LC
1880EQMP
1881
1882 {
1883 .name = "human-monitor-command",
1884 .args_type = "command-line:s,cpu-index:i?",
d51a67b4 1885 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
0268d97c
LC
1886 },
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
82a56f0d
LC
19223. 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
b9c15f16
LC
1961 {
1962 .name = "query-version",
1963 .args_type = "",
1964 .mhandler.cmd_new = qmp_marshal_input_query_version,
1965 },
1966
82a56f0d
LC
1967SQMP
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
aa9b79bc
LC
1998 {
1999 .name = "query-commands",
2000 .args_type = "",
2001 .mhandler.cmd_new = qmp_marshal_input_query_commands,
2002 },
2003
4860853d
DB
2004SQMP
2005query-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
82a56f0d
LC
2041SQMP
2042query-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)
32a97ea1
LE
2052- "frontend-open": open/closed state of the frontend device attached to this
2053 backend (json-bool)
82a56f0d
LC
2054
2055Example:
2056
2057-> { "execute": "query-chardev" }
2058<- {
32a97ea1
LE
2059 "return": [
2060 {
2061 "label": "charchannel0",
2062 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2063 "frontend-open": false
2064 },
82a56f0d 2065 {
32a97ea1
LE
2066 "label": "charmonitor",
2067 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2068 "frontend-open": true
82a56f0d
LC
2069 },
2070 {
32a97ea1
LE
2071 "label": "charserial0",
2072 "filename": "pty:/dev/pts/2",
2073 "frontend-open": true
82a56f0d
LC
2074 }
2075 ]
2076 }
2077
2078EQMP
2079
c5a415a0
LC
2080 {
2081 .name = "query-chardev",
2082 .args_type = "",
2083 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
2084 },
2085
77d1c3c6
MK
2086SQMP
2087query-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
82a56f0d
LC
2127SQMP
2128query-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)
d8aeeb31
MA
2140 - deprecated, retained for backward compatibility
2141 - Possible values: "unknown"
82a56f0d
LC
2142- "removable": true if the device is removable, false otherwise (json-bool)
2143- "locked": true if the device is locked, false otherwise (json-bool)
99f42808 2144- "tray_open": only present if removable, true if the device has a tray,
e4def80b 2145 and it is open (json-bool)
82a56f0d
LC
2146- "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)
550830f9 2151 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
82a56f0d 2152 "file", "file", "ftp", "ftps", "host_cdrom",
92a539d2 2153 "host_device", "http", "https",
82a56f0d
LC
2154 "nbd", "parallels", "qcow", "qcow2", "raw",
2155 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2156 - "backing_file": backing file name (json-string, optional)
2e3e3317 2157 - "backing_file_depth": number of files in the backing file chain (json-int)
82a56f0d 2158 - "encrypted": true if encrypted, false otherwise (json-bool)
727f005e
ZYW
2159 - "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)
3e9fab69
BC
2165 - "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)
2024c1df 2171 - "iops_size": I/O size when limiting by iops (json-int)
465bee1d
PL
2172 - "detect_zeroes": detect and optimize zero writing (json-string)
2173 - Possible values: "off", "on", "unmap"
e2462113
FR
2174 - "write_threshold": write offset threshold in bytes, a event will be
2175 emitted if crossed. Zero if disabled (json-int)
553a7e87
WX
2176 - "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
586b5466 2209 date-sec (json-int)
553a7e87
WX
2210 - "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
727f005e 2217
f04ef601
LC
2218- "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"
82a56f0d
LC
2222
2223Example:
2224
2225-> { "execute": "query-block" }
2226<- {
2227 "return":[
2228 {
f04ef601 2229 "io-status": "ok",
82a56f0d
LC
2230 "device":"ide0-hd0",
2231 "locked":false,
2232 "removable":false,
2233 "inserted":{
2234 "ro":false,
2235 "drv":"qcow2",
2236 "encrypted":false,
553a7e87
WX
2237 "file":"disks/test.qcow2",
2238 "backing_file_depth":1,
727f005e
ZYW
2239 "bps":1000000,
2240 "bps_rd":0,
2241 "bps_wr":0,
2242 "iops":1000000,
2243 "iops_rd":0,
2244 "iops_wr":0,
3e9fab69
BC
2245 "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,
2024c1df 2251 "iops_size": 0,
465bee1d 2252 "detect_zeroes": "on",
e2462113 2253 "write_threshold": 0,
553a7e87
WX
2254 "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 }
82a56f0d 2278 },
d8aeeb31 2279 "type":"unknown"
82a56f0d
LC
2280 },
2281 {
f04ef601 2282 "io-status": "ok",
82a56f0d
LC
2283 "device":"ide1-cd0",
2284 "locked":false,
2285 "removable":true,
d8aeeb31 2286 "type":"unknown"
82a56f0d
LC
2287 },
2288 {
2289 "device":"floppy0",
2290 "locked":false,
2291 "removable":true,
d8aeeb31 2292 "type":"unknown"
82a56f0d
LC
2293 },
2294 {
2295 "device":"sd0",
2296 "locked":false,
2297 "removable":true,
d8aeeb31 2298 "type":"unknown"
82a56f0d
LC
2299 }
2300 ]
2301 }
2302
2303EQMP
2304
b2023818
LC
2305 {
2306 .name = "query-block",
2307 .args_type = "",
2308 .mhandler.cmd_new = qmp_marshal_input_query_block,
2309 },
2310
82a56f0d
LC
2311SQMP
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)
e8045d67 2328 - "flush_operations": cache flush operations (json-int)
c488c7f6
CH
2329 - "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)
82a56f0d
LC
2332 - "wr_highest_offset": Highest offset of a sector written since the
2333 BlockDriverState has been opened (json-int)
f4564d53
PL
2334 - "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)
82a56f0d
LC
2338- "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
c488c7f6
CH
2357 "wr_total_times_ns":313253456
2358 "rd_total_times_ns":3465673657
2359 "flush_total_times_ns":49653
e8045d67 2360 "flush_operations":61,
f4564d53
PL
2361 "rd_merged":0,
2362 "wr_merged":0
82a56f0d
LC
2363 }
2364 },
2365 "stats":{
2366 "wr_highest_offset":2821110784,
2367 "wr_bytes":9786368,
2368 "wr_operations":692,
2369 "rd_bytes":122739200,
2370 "rd_operations":36604
e8045d67 2371 "flush_operations":51,
c488c7f6
CH
2372 "wr_total_times_ns":313253456
2373 "rd_total_times_ns":3465673657
f4564d53
PL
2374 "flush_total_times_ns":49653,
2375 "rd_merged":0,
2376 "wr_merged":0
82a56f0d
LC
2377 }
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
e8045d67 2387 "flush_operations":0,
c488c7f6
CH
2388 "wr_total_times_ns":0
2389 "rd_total_times_ns":0
f4564d53
PL
2390 "flush_total_times_ns":0,
2391 "rd_merged":0,
2392 "wr_merged":0
82a56f0d
LC
2393 }
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
e8045d67 2403 "flush_operations":0,
c488c7f6
CH
2404 "wr_total_times_ns":0
2405 "rd_total_times_ns":0
f4564d53
PL
2406 "flush_total_times_ns":0,
2407 "rd_merged":0,
2408 "wr_merged":0
82a56f0d
LC
2409 }
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
e8045d67 2419 "flush_operations":0,
c488c7f6
CH
2420 "wr_total_times_ns":0
2421 "rd_total_times_ns":0
f4564d53
PL
2422 "flush_total_times_ns":0,
2423 "rd_merged":0,
2424 "wr_merged":0
82a56f0d
LC
2425 }
2426 }
2427 ]
2428 }
2429
2430EQMP
2431
f11f57e4
LC
2432 {
2433 .name = "query-blockstats",
f71eaa74 2434 .args_type = "query-nodes:b?",
f11f57e4
LC
2435 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
2436 },
2437
82a56f0d
LC
2438SQMP
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)
dc7a09cf 2454- "thread_id": ID of the underlying host thread (json-int)
82a56f0d
LC
2455
2456Example:
2457
2458-> { "execute": "query-cpus" }
2459<- {
2460 "return":[
2461 {
2462 "CPU":0,
2463 "current":true,
2464 "halted":false,
2465 "pc":3227107138
dc7a09cf 2466 "thread_id":3134
82a56f0d
LC
2467 },
2468 {
2469 "CPU":1,
2470 "current":false,
2471 "halted":true,
2472 "pc":7108165
dc7a09cf 2473 "thread_id":3135
82a56f0d
LC
2474 }
2475 ]
2476 }
2477
2478EQMP
2479
de0b36b6
LC
2480 {
2481 .name = "query-cpus",
2482 .args_type = "",
2483 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2484 },
2485
dc3dd0d2
SH
2486SQMP
2487query-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
82a56f0d
LC
2525SQMP
2526query-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
79627472
LC
2736 {
2737 .name = "query-pci",
2738 .args_type = "",
2739 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2740 },
2741
82a56f0d
LC
2742SQMP
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
292a2602
LC
2760 {
2761 .name = "query-kvm",
2762 .args_type = "",
2763 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2764 },
2765
82a56f0d
LC
2766SQMP
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)
9e37b9dc
LC
2775- "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
82a56f0d
LC
2792
2793Example:
2794
2795-> { "execute": "query-status" }
9e37b9dc 2796<- { "return": { "running": true, "singlestep": false, "status": "running" } }
82a56f0d
LC
2797
2798EQMP
1fa9a5e4
LC
2799
2800 {
2801 .name = "query-status",
2802 .args_type = "",
2803 .mhandler.cmd_new = qmp_marshal_input_query_status,
2804 },
82a56f0d
LC
2805
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
e235cec3
LC
2844 {
2845 .name = "query-mice",
2846 .args_type = "",
2847 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2848 },
2849
82a56f0d
LC
2850SQMP
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
2b54aa87
LC
2907 {
2908 .name = "query-vnc",
2909 .args_type = "",
2910 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2911 },
df887684
GH
2912 {
2913 .name = "query-vnc-servers",
2914 .args_type = "",
2915 .mhandler.cmd_new = qmp_marshal_input_query_vnc_servers,
2916 },
2b54aa87 2917
cb42a870
GH
2918SQMP
2919query-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)
3599d46b 2950- "tls": whether the channel is encrypted (json-bool)
cb42a870
GH
2951
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
d1f29646
LC
2988#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
82a56f0d
LC
2996SQMP
2997query-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
48a32bed
AL
3013 {
3014 .name = "query-name",
3015 .args_type = "",
3016 .mhandler.cmd_new = qmp_marshal_input_query_name,
3017 },
3018
82a56f0d
LC
3019SQMP
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
efab767e
LC
3036 {
3037 .name = "query-uuid",
3038 .args_type = "",
3039 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
3040 },
3041
1f8f987d
AK
3042SQMP
3043query-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)
e36af94f
CL
3060 - "default": default value string for the parameter
3061 (json-string, optional)
1f8f987d
AK
3062
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
82a56f0d
LC
3091SQMP
3092query-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)
3b695950 3104 - Possible values: "setup", "active", "completed", "failed", "cancelled"
7aa939af
JQ
3105- "total-time": total amount of ms since migration started. If
3106 migration has ended, it returns the total migration
817c6045 3107 time (json-int)
8f3067bd
MH
3108- "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)
9c5a9fcf
JQ
3114- "downtime": only present when migration has finished correctly
3115 total amount in ms for downtime that happened (json-int)
2c52ddf1
JQ
3116- "expected-downtime": only present while migration is active
3117 total amount in ms for downtime that was calculated on
817c6045 3118 the last bitmap round (json-int)
82a56f0d 3119- "ram": only present if "status" is "active", it is a json-object with the
817c6045
JQ
3120 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.
f1c72795 3127 - "skipped": number of skipped zero pages (json-int)
805a2505 3128 - "normal" : number of whole pages transferred. I.e. they
817c6045
JQ
3129 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)
58570ed8 3134 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
82a56f0d 3135- "disk": only present if "status" is "active" and it is a block migration,
817c6045
JQ
3136 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)
f36d55af
OW
3140- "xbzrle-cache": only present if XBZRLE is active.
3141 It is a json-object with the following XBZRLE information:
817c6045
JQ
3142 - "cache-size": XBZRLE cache size in bytes
3143 - "bytes": number of bytes transferred for XBZRLE compressed pages
f36d55af 3144 - "pages": number of XBZRLE compressed pages
817c6045 3145 - "cache-miss": number of XBRZRLE page cache misses
8bc39233 3146 - "cache-miss-rate": rate of XBRZRLE page cache misses
817c6045
JQ
3147 - "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
82a56f0d
LC
3152Examples:
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" }
004d4c10
OW
3162<- { "return": {
3163 "status": "completed",
3164 "ram":{
3165 "transferred":123,
3166 "remaining":123,
3167 "total":246,
3168 "total-time":12345,
8f3067bd 3169 "setup-time":12345,
9c5a9fcf 3170 "downtime":12345,
004d4c10
OW
3171 "duplicate":123,
3172 "normal":123,
58570ed8
C
3173 "normal-bytes":123456,
3174 "dirty-sync-count":15
004d4c10
OW
3175 }
3176 }
3177 }
82a56f0d
LC
3178
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,
62d4e3fe 3193 "total":246,
004d4c10 3194 "total-time":12345,
8f3067bd 3195 "setup-time":12345,
2c52ddf1 3196 "expected-downtime":12345,
004d4c10
OW
3197 "duplicate":123,
3198 "normal":123,
58570ed8
C
3199 "normal-bytes":123456,
3200 "dirty-sync-count":15
82a56f0d
LC
3201 }
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,
62d4e3fe 3214 "transferred":3720,
004d4c10 3215 "total-time":12345,
8f3067bd 3216 "setup-time":12345,
2c52ddf1 3217 "expected-downtime":12345,
004d4c10
OW
3218 "duplicate":123,
3219 "normal":123,
58570ed8
C
3220 "normal-bytes":123456,
3221 "dirty-sync-count":15
82a56f0d
LC
3222 },
3223 "disk":{
3224 "total":20971520,
3225 "remaining":20880384,
3226 "transferred":91136
3227 }
3228 }
3229 }
3230
f36d55af
OW
32316. 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,
8f3067bd 3243 "setup-time":12345,
2c52ddf1 3244 "expected-downtime":12345,
f36d55af
OW
3245 "duplicate":10,
3246 "normal":3333,
58570ed8
C
3247 "normal-bytes":3412992,
3248 "dirty-sync-count":15
f36d55af
OW
3249 },
3250 "xbzrle-cache":{
3251 "cache-size":67108864,
3252 "bytes":20971520,
3253 "pages":2444343,
3254 "cache-miss":2244,
8bc39233 3255 "cache-miss-rate":0.123,
f36d55af
OW
3256 "overflow":34434
3257 }
3258 }
3259 }
3260
82a56f0d
LC
3261EQMP
3262
791e7c82
LC
3263 {
3264 .name = "query-migrate",
3265 .args_type = "",
3266 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
3267 },
3268
bbf6da32 3269SQMP
00458433 3270migrate-set-capabilities
817c6045 3271------------------------
00458433
OW
3272
3273Enable/Disable migration capabilities
3274
817c6045 3275- "xbzrle": XBZRLE support
d6d69731
HZ
3276- "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
00458433
OW
3279
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",
3291 .args_type = "capabilities:O",
3292 .params = "capability:s,state:b",
3293 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
3294 },
3295SQMP
bbf6da32 3296query-migrate-capabilities
817c6045 3297--------------------------
bbf6da32
OW
3298
3299Query current migration capabilities
3300
3301- "capabilities": migration capabilities state
3302 - "xbzrle" : XBZRLE state (json-bool)
d6d69731
HZ
3303 - "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)
bbf6da32
OW
3306
3307Arguments:
3308
3309Example:
3310
3311-> { "execute": "query-migrate-capabilities" }
dbca1b37
OW
3312<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3313
bbf6da32
OW
3314EQMP
3315
3316 {
3317 .name = "query-migrate-capabilities",
3318 .args_type = "",
3319 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
3320 },
3321
82a56f0d
LC
3322SQMP
3323query-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)
82a56f0d
LC
3332
3333Example:
3334
3335-> { "execute": "query-balloon" }
3336<- {
3337 "return":{
3338 "actual":1073741824,
82a56f0d
LC
3339 }
3340 }
3341
3342EQMP
3343
96637bcd
LC
3344 {
3345 .name = "query-balloon",
3346 .args_type = "",
3347 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
3348 },
b4b12c62 3349
fb5458cd
SH
3350 {
3351 .name = "query-block-jobs",
3352 .args_type = "",
3353 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
3354 },
3355
b4b12c62
AL
3356 {
3357 .name = "qom-list",
3358 .args_type = "path:s",
3359 .mhandler.cmd_new = qmp_marshal_input_qom_list,
3360 },
eb6e8ea5
AL
3361
3362 {
3363 .name = "qom-set",
b9f8978c 3364 .args_type = "path:s,property:s,value:q",
eb6e8ea5
AL
3365 .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 },
270b243f 3373
6dd844db
PB
3374 {
3375 .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
270b243f
LC
3390 {
3391 .name = "change-vnc-password",
3392 .args_type = "password:s",
3393 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
3394 },
5eeee3fa
AL
3395 {
3396 .name = "qom-list-types",
3397 .args_type = "implements:s?,abstract:b?",
3398 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
3399 },
1daa31b9
AL
3400
3401 {
3402 .name = "device-list-properties",
3403 .args_type = "typename:s",
3404 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
3405 },
3406
01d3c80d
AL
3407 {
3408 .name = "query-machines",
3409 .args_type = "",
3410 .mhandler.cmd_new = qmp_marshal_input_query_machines,
3411 },
3412
e4e31c63
AL
3413 {
3414 .name = "query-cpu-definitions",
3415 .args_type = "",
3416 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
3417 },
3418
99afc91d
DB
3419 {
3420 .name = "query-target",
3421 .args_type = "",
3422 .mhandler.cmd_new = qmp_marshal_input_query_target,
3423 },
f1a1a356 3424
d1a0cf73
SB
3425 {
3426 .name = "query-tpm",
3427 .args_type = "",
3428 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
3429 },
3430
28c4fa32
CB
3431SQMP
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
d1a0cf73
SB
3459 {
3460 .name = "query-tpm-models",
3461 .args_type = "",
3462 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
3463 },
3464
28c4fa32
CB
3465SQMP
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
d1a0cf73
SB
3480 {
3481 .name = "query-tpm-types",
3482 .args_type = "",
3483 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
3484 },
3485
28c4fa32
CB
3486SQMP
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
f1a1a356
GH
3501 {
3502 .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
ffbdbe59 3518Examples:
f1a1a356
GH
3519
3520-> { "execute" : "chardev-add",
3521 "arguments" : { "id" : "foo",
3522 "backend" : { "type" : "null", "data" : {} } } }
3523<- { "return": {} }
3524
ffbdbe59
GH
3525-> { "execute" : "chardev-add",
3526 "arguments" : { "id" : "bar",
3527 "backend" : { "type" : "file",
3528 "data" : { "out" : "/tmp/bar.log" } } } }
3529<- { "return": {} }
3530
0a1a7fab
GH
3531-> { "execute" : "chardev-add",
3532 "arguments" : { "id" : "baz",
3533 "backend" : { "type" : "pty", "data" : {} } } }
3534<- { "return": { "pty" : "/dev/pty/42" } }
3535
f1a1a356
GH
3536EQMP
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
b1be4280
AK
3560EQMP
3561 {
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')
f7bc8ef8 3587- "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
b1be4280
AK
3588- "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",
f7bc8ef8 3605 "vlan": "normal",
b1be4280
AK
3606 "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
d26c9a15
KW
3625EQMP
3626
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
da2cf4e8
MA
3639This 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
d26c9a15
KW
3643Arguments:
3644
3645- "options": block driver options
3646
3647Example (1):
3648
3649-> { "execute": "blockdev-add",
3650 "arguments": { "options" : { "driver": "qcow2",
3651 "file": { "driver": "file",
3652 "filename": "test.qcow2" } } } }
3653<- { "return": {} }
3654
3655Example (2):
3656
3657-> { "execute": "blockdev-add",
3658 "arguments": {
3659 "options": {
3660 "driver": "qcow2",
3661 "id": "my_disk",
3662 "discard": "unmap",
3663 "cache": {
3664 "direct": true,
3665 "writeback": true
3666 },
3667 "file": {
3668 "driver": "file",
3669 "filename": "/tmp/test.qcow2"
3670 },
3671 "backing": {
3672 "driver": "raw",
3673 "file": {
3674 "driver": "file",
3675 "filename": "/dev/fdset/4"
3676 }
3677 }
3678 }
3679 }
3680 }
3681
3682<- { "return": {} }
3683
c13163fb
BC
3684EQMP
3685
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,
e2462113 3720 "write_threshold": 0,
c13163fb
BC
3721 "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 }
c059451c 3744 } } ] }
c13163fb 3745
76b5d850
HT
3746EQMP
3747
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
6f2e2730
IM
3784EQMP
3785
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 } ] }
f1a1a356 3811EQMP
02419bcb
IM
3812
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
f2ae8abf
MT
3834
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": {} }
1dde0f48
LV
3855EQMP
3856
3857 {
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 },
f2ae8abf 3880
1dde0f48
LV
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": {} }
50c6617f
MT
3891EQMP
3892
3893 {
df5b2adb 3894 .name = "x-input-send-event",
51fc4476 3895 .args_type = "console:i?,events:q",
df5b2adb 3896 .mhandler.cmd_new = qmp_marshal_input_x_input_send_event,
50c6617f
MT
3897 },
3898
3899SQMP
df5b2adb 3900@x-input-send-event
50c6617f
MT
3901-----------------
3902
3903Send input event to guest.
3904
3905Arguments:
3906
51fc4476 3907- "console": console index. (json-int, optional)
50c6617f
MT
3908- "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
df5b2adb
GH
3914Note: this command is experimental, and not a stable API.
3915
50c6617f
MT
3916Example (1):
3917
3918Press left mouse button.
3919
df5b2adb 3920-> { "execute": "x-input-send-event",
50c6617f
MT
3921 "arguments": { "console": 0,
3922 "events": [ { "type": "btn",
b5369dd8 3923 "data" : { "down": true, "button": "Left" } } ] } }
50c6617f
MT
3924<- { "return": {} }
3925
df5b2adb 3926-> { "execute": "x-input-send-event",
50c6617f
MT
3927 "arguments": { "console": 0,
3928 "events": [ { "type": "btn",
b5369dd8 3929 "data" : { "down": false, "button": "Left" } } ] } }
50c6617f
MT
3930<- { "return": {} }
3931
3932Example (2):
3933
3934Press ctrl-alt-del.
3935
df5b2adb 3936-> { "execute": "x-input-send-event",
50c6617f
MT
3937 "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
df5b2adb 3950-> { "execute": "x-input-send-event" ,
50c6617f
MT
3951 "arguments": { "console": 0, "events": [
3952 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
3953 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
3954<- { "return": {} }
3955
e2462113
FR
3956EQMP
3957
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
f2ae8abf 3984EQMP