qemu-char: remove unused list node from FDCharDriver
[qemu/ar7.git] / qmp-commands.hx
blob213508fe5d2e6ada854437aafdbac7946e7055b3
1 HXCOMM QMP dispatch table and documentation
2 HXCOMM Text between SQMP and EQMP is copied to the QMP documentation file and
3 HXCOMM does not show up in the other formats.
5 SQMP
6 QMP Supported Commands
7 ----------------------
9 This document describes all commands currently supported by QMP.
11 Most of the time their usage is exactly the same as in the user Monitor, this
12 means that any other document which also describe commands (the manpage,
13 QEMU's manual, etc) can and should be consulted.
15 QMP has two types of commands: regular and query commands. Regular commands
16 usually change the Virtual Machine's state someway, while query commands just
17 return information. The sections below are divided accordingly.
19 It's important to observe that all communication examples are formatted in
20 a reader-friendly way, so that they're easier to understand. However, in real
21 protocol usage, they're emitted as a single line.
23 Also, the following notation is used to denote data flow:
25 -> data issued by the Client
26 <- Server data response
28 Please, refer to the QMP specification (QMP/qmp-spec.txt) for detailed
29 information on the Server command and response formats.
31 NOTE: This document is temporary and will be replaced soon.
33 1. Stability Considerations
34 ===========================
36 The current QMP command set (described in this file) may be useful for a
37 number of use cases, however it's limited and several commands have bad
38 defined semantics, specially with regard to command completion.
40 These problems are going to be solved incrementally in the next QEMU releases
41 and we're going to establish a deprecation policy for badly defined commands.
43 If you're planning to adopt QMP, please observe the following:
45 1. The deprecation policy will take effect and be documented soon, please
46 check the documentation of each used command as soon as a new release of
47 QEMU is available
49 2. DO NOT rely on anything which is not explicit documented
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)
55 2. Regular Commands
56 ===================
58 Server's responses in the examples below are always a success response, please
59 refer to the QMP specification for more details on error responses.
61 EQMP
64 .name = "quit",
65 .args_type = "",
66 .mhandler.cmd_new = qmp_marshal_input_quit,
69 SQMP
70 quit
71 ----
73 Quit the emulator.
75 Arguments: None.
77 Example:
79 -> { "execute": "quit" }
80 <- { "return": {} }
82 EQMP
85 .name = "eject",
86 .args_type = "force:-f,device:B",
87 .mhandler.cmd_new = qmp_marshal_input_eject,
90 SQMP
91 eject
92 -----
94 Eject a removable medium.
96 Arguments:
98 - force: force ejection (json-bool, optional)
99 - device: device name (json-string)
101 Example:
103 -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
104 <- { "return": {} }
106 Note: The "force" argument defaults to false.
108 EQMP
111 .name = "change",
112 .args_type = "device:B,target:F,arg:s?",
113 .mhandler.cmd_new = qmp_marshal_input_change,
116 SQMP
117 change
118 ------
120 Change a removable medium or VNC configuration.
122 Arguments:
124 - "device": device name (json-string)
125 - "target": filename or item (json-string)
126 - "arg": additional argument (json-string, optional)
128 Examples:
130 1. Change a removable medium
132 -> { "execute": "change",
133 "arguments": { "device": "ide1-cd0",
134 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
135 <- { "return": {} }
137 2. Change VNC password
139 -> { "execute": "change",
140 "arguments": { "device": "vnc", "target": "password",
141 "arg": "foobar1" } }
142 <- { "return": {} }
144 EQMP
147 .name = "screendump",
148 .args_type = "filename:F",
149 .mhandler.cmd_new = qmp_marshal_input_screendump,
152 SQMP
153 screendump
154 ----------
156 Save screen into PPM image.
158 Arguments:
160 - "filename": file path (json-string)
162 Example:
164 -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
165 <- { "return": {} }
167 EQMP
170 .name = "stop",
171 .args_type = "",
172 .mhandler.cmd_new = qmp_marshal_input_stop,
175 SQMP
176 stop
177 ----
179 Stop the emulator.
181 Arguments: None.
183 Example:
185 -> { "execute": "stop" }
186 <- { "return": {} }
188 EQMP
191 .name = "cont",
192 .args_type = "",
193 .mhandler.cmd_new = qmp_marshal_input_cont,
196 SQMP
197 cont
198 ----
200 Resume emulation.
202 Arguments: None.
204 Example:
206 -> { "execute": "cont" }
207 <- { "return": {} }
209 EQMP
212 .name = "system_wakeup",
213 .args_type = "",
214 .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
217 SQMP
218 system_wakeup
219 -------------
221 Wakeup guest from suspend.
223 Arguments: None.
225 Example:
227 -> { "execute": "system_wakeup" }
228 <- { "return": {} }
230 EQMP
233 .name = "system_reset",
234 .args_type = "",
235 .mhandler.cmd_new = qmp_marshal_input_system_reset,
238 SQMP
239 system_reset
240 ------------
242 Reset the system.
244 Arguments: None.
246 Example:
248 -> { "execute": "system_reset" }
249 <- { "return": {} }
251 EQMP
254 .name = "system_powerdown",
255 .args_type = "",
256 .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
259 SQMP
260 system_powerdown
261 ----------------
263 Send system power down event.
265 Arguments: None.
267 Example:
269 -> { "execute": "system_powerdown" }
270 <- { "return": {} }
272 EQMP
275 .name = "device_add",
276 .args_type = "device:O",
277 .params = "driver[,prop=value][,...]",
278 .help = "add device, like -device on the command line",
279 .mhandler.cmd_new = do_device_add,
282 SQMP
283 device_add
284 ----------
286 Add a device.
288 Arguments:
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
295 Example:
297 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
298 <- { "return": {} }
300 Notes:
302 (1) For detailed information about this command, please refer to the
303 'docs/qdev-device-use.txt' file.
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
308 EQMP
311 .name = "device_del",
312 .args_type = "id:s",
313 .mhandler.cmd_new = qmp_marshal_input_device_del,
316 SQMP
317 device_del
318 ----------
320 Remove a device.
322 Arguments:
324 - "id": the device's ID (json-string)
326 Example:
328 -> { "execute": "device_del", "arguments": { "id": "net1" } }
329 <- { "return": {} }
331 EQMP
334 .name = "send-key",
335 .args_type = "keys:q,hold-time:i?",
336 .mhandler.cmd_new = qmp_marshal_input_send_key,
339 SQMP
340 send-key
341 ----------
343 Send keys to VM.
345 Arguments:
347 keys array:
348 - "key": key sequence (a json-array of key union values,
349 union can be number or qcode enum)
351 - hold-time: time to delay key up events, milliseconds. Defaults to 100
352 (json-int, optional)
354 Example:
356 -> { "execute": "send-key",
357 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
358 { "type": "qcode", "data": "alt" },
359 { "type": "qcode", "data": "delete" } ] } }
360 <- { "return": {} }
362 EQMP
365 .name = "cpu",
366 .args_type = "index:i",
367 .mhandler.cmd_new = qmp_marshal_input_cpu,
370 SQMP
374 Set the default CPU.
376 Arguments:
378 - "index": the CPU's index (json-int)
380 Example:
382 -> { "execute": "cpu", "arguments": { "index": 0 } }
383 <- { "return": {} }
385 Note: CPUs' indexes are obtained with the 'query-cpus' command.
387 EQMP
390 .name = "cpu-add",
391 .args_type = "id:i",
392 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
395 SQMP
396 cpu-add
397 -------
399 Adds virtual cpu
401 Arguments:
403 - "id": cpu id (json-int)
405 Example:
407 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
408 <- { "return": {} }
410 EQMP
413 .name = "memsave",
414 .args_type = "val:l,size:i,filename:s,cpu:i?",
415 .mhandler.cmd_new = qmp_marshal_input_memsave,
418 SQMP
419 memsave
420 -------
422 Save to disk virtual memory dump starting at 'val' of size 'size'.
424 Arguments:
426 - "val": the starting address (json-int)
427 - "size": the memory size, in bytes (json-int)
428 - "filename": file path (json-string)
429 - "cpu": virtual CPU index (json-int, optional)
431 Example:
433 -> { "execute": "memsave",
434 "arguments": { "val": 10,
435 "size": 100,
436 "filename": "/tmp/virtual-mem-dump" } }
437 <- { "return": {} }
439 EQMP
442 .name = "pmemsave",
443 .args_type = "val:l,size:i,filename:s",
444 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
447 SQMP
448 pmemsave
449 --------
451 Save to disk physical memory dump starting at 'val' of size 'size'.
453 Arguments:
455 - "val": the starting address (json-int)
456 - "size": the memory size, in bytes (json-int)
457 - "filename": file path (json-string)
459 Example:
461 -> { "execute": "pmemsave",
462 "arguments": { "val": 10,
463 "size": 100,
464 "filename": "/tmp/physical-mem-dump" } }
465 <- { "return": {} }
467 EQMP
470 .name = "inject-nmi",
471 .args_type = "",
472 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
475 SQMP
476 inject-nmi
477 ----------
479 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
481 Arguments: None.
483 Example:
485 -> { "execute": "inject-nmi" }
486 <- { "return": {} }
488 Note: inject-nmi fails when the guest doesn't support injecting.
490 EQMP
493 .name = "ringbuf-write",
494 .args_type = "device:s,data:s,format:s?",
495 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
498 SQMP
499 ringbuf-write
500 -------------
502 Write to a ring buffer character device.
504 Arguments:
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.
513 Example:
515 -> { "execute": "ringbuf-write",
516 "arguments": { "device": "foo",
517 "data": "abcdefgh",
518 "format": "utf8" } }
519 <- { "return": {} }
521 EQMP
524 .name = "ringbuf-read",
525 .args_type = "device:s,size:i,format:s?",
526 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
529 SQMP
530 ringbuf-read
531 -------------
533 Read from a ring buffer character device.
535 Arguments:
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.
549 Example:
551 -> { "execute": "ringbuf-read",
552 "arguments": { "device": "foo",
553 "size": 1000,
554 "format": "utf8" } }
555 <- {"return": "abcdefgh"}
557 EQMP
560 .name = "xen-save-devices-state",
561 .args_type = "filename:F",
562 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
565 SQMP
566 xen-save-devices-state
567 -------
569 Save the state of all devices to file. The RAM and the block devices
570 of the VM are not saved by this command.
572 Arguments:
574 - "filename": the file to save the state of the devices to as binary
575 data. See xen-save-devices-state.txt for a description of the binary
576 format.
578 Example:
580 -> { "execute": "xen-save-devices-state",
581 "arguments": { "filename": "/tmp/save" } }
582 <- { "return": {} }
584 EQMP
587 .name = "xen-set-global-dirty-log",
588 .args_type = "enable:b",
589 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
592 SQMP
593 xen-set-global-dirty-log
594 -------
596 Enable or disable the global dirty log mode.
598 Arguments:
600 - "enable": Enable it or disable it.
602 Example:
604 -> { "execute": "xen-set-global-dirty-log",
605 "arguments": { "enable": true } }
606 <- { "return": {} }
608 EQMP
611 .name = "migrate",
612 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
613 .mhandler.cmd_new = qmp_marshal_input_migrate,
616 SQMP
617 migrate
618 -------
620 Migrate to URI.
622 Arguments:
624 - "blk": block migration, full disk copy (json-bool, optional)
625 - "inc": incremental disk copy (json-bool, optional)
626 - "uri": Destination URI (json-string)
628 Example:
630 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
631 <- { "return": {} }
633 Notes:
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
641 EQMP
644 .name = "migrate_cancel",
645 .args_type = "",
646 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
649 SQMP
650 migrate_cancel
651 --------------
653 Cancel the current migration.
655 Arguments: None.
657 Example:
659 -> { "execute": "migrate_cancel" }
660 <- { "return": {} }
662 EQMP
665 .name = "migrate-incoming",
666 .args_type = "uri:s",
667 .mhandler.cmd_new = qmp_marshal_input_migrate_incoming,
670 SQMP
671 migrate-incoming
672 ----------------
674 Continue an incoming migration
676 Arguments:
678 - "uri": Source/listening URI (json-string)
680 Example:
682 -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
683 <- { "return": {} }
685 Notes:
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
691 EQMP
693 .name = "migrate-set-cache-size",
694 .args_type = "value:o",
695 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
698 SQMP
699 migrate-set-cache-size
700 ----------------------
702 Set cache size to be used by XBZRLE migration, the cache size will be rounded
703 down to the nearest power of 2
705 Arguments:
707 - "value": cache size in bytes (json-int)
709 Example:
711 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
712 <- { "return": {} }
714 EQMP
716 .name = "query-migrate-cache-size",
717 .args_type = "",
718 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
721 SQMP
722 query-migrate-cache-size
723 ------------------------
725 Show cache size to be used by XBZRLE migration
727 returns a json-object with the following information:
728 - "size" : json-int
730 Example:
732 -> { "execute": "query-migrate-cache-size" }
733 <- { "return": 67108864 }
735 EQMP
738 .name = "migrate_set_speed",
739 .args_type = "value:o",
740 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
743 SQMP
744 migrate_set_speed
745 -----------------
747 Set maximum speed for migrations.
749 Arguments:
751 - "value": maximum speed, in bytes per second (json-int)
753 Example:
755 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
756 <- { "return": {} }
758 EQMP
761 .name = "migrate_set_downtime",
762 .args_type = "value:T",
763 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
766 SQMP
767 migrate_set_downtime
768 --------------------
770 Set maximum tolerated downtime (in seconds) for migrations.
772 Arguments:
774 - "value": maximum downtime (json-number)
776 Example:
778 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
779 <- { "return": {} }
781 EQMP
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",
788 .mhandler.cmd_new = client_migrate_info,
791 SQMP
792 client_migrate_info
793 ------------------
795 Set the spice/vnc connection info for the migration target. The spice/vnc
796 server will ask the spice/vnc client to automatically reconnect using the
797 new parameters (if specified) once the vm migration finished successfully.
799 Arguments:
801 - "protocol": protocol: "spice" or "vnc" (json-string)
802 - "hostname": migration target hostname (json-string)
803 - "port": spice/vnc tcp port for plaintext channels (json-int, optional)
804 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
805 - "cert-subject": server certificate subject (json-string, optional)
807 Example:
809 -> { "execute": "client_migrate_info",
810 "arguments": { "protocol": "spice",
811 "hostname": "virt42.lab.kraxel.org",
812 "port": 1234 } }
813 <- { "return": {} }
815 EQMP
818 .name = "dump-guest-memory",
819 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
820 .params = "-p protocol [begin] [length] [format]",
821 .help = "dump guest memory to file",
822 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
825 SQMP
826 dump
829 Dump guest memory to file. The file can be processed with crash or gdb.
831 Arguments:
833 - "paging": do paging to get guest's memory mapping (json-bool)
834 - "protocol": destination file(started with "file:") or destination file
835 descriptor (started with "fd:") (json-string)
836 - "begin": the starting physical address. It's optional, and should be specified
837 with length together (json-int)
838 - "length": the memory size, in bytes. It's optional, and should be specified
839 with begin together (json-int)
840 - "format": the format of guest memory dump. It's optional, and can be
841 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
842 conflict with paging and filter, ie. begin and length (json-string)
844 Example:
846 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
847 <- { "return": {} }
849 Notes:
851 (1) All boolean arguments default to false
853 EQMP
856 .name = "query-dump-guest-memory-capability",
857 .args_type = "",
858 .mhandler.cmd_new = qmp_marshal_input_query_dump_guest_memory_capability,
861 SQMP
862 query-dump-guest-memory-capability
863 ----------
865 Show available formats for 'dump-guest-memory'
867 Example:
869 -> { "execute": "query-dump-guest-memory-capability" }
870 <- { "return": { "formats":
871 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
873 EQMP
876 .name = "netdev_add",
877 .args_type = "netdev:O",
878 .mhandler.cmd_new = qmp_netdev_add,
881 SQMP
882 netdev_add
883 ----------
885 Add host network device.
887 Arguments:
889 - "type": the device type, "tap", "user", ... (json-string)
890 - "id": the device's ID, must be unique (json-string)
891 - device options
893 Example:
895 -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
896 <- { "return": {} }
898 Note: The supported device options are the same ones supported by the '-netdev'
899 command-line argument, which are listed in the '-help' output or QEMU's
900 manual
902 EQMP
905 .name = "netdev_del",
906 .args_type = "id:s",
907 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
910 SQMP
911 netdev_del
912 ----------
914 Remove host network device.
916 Arguments:
918 - "id": the device's ID, must be unique (json-string)
920 Example:
922 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
923 <- { "return": {} }
926 EQMP
929 .name = "object-add",
930 .args_type = "qom-type:s,id:s,props:q?",
931 .mhandler.cmd_new = qmp_object_add,
934 SQMP
935 object-add
936 ----------
938 Create QOM object.
940 Arguments:
942 - "qom-type": the object's QOM type, i.e. the class name (json-string)
943 - "id": the object's ID, must be unique (json-string)
944 - "props": a dictionary of object property values (optional, json-dict)
946 Example:
948 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
949 "props": { "filename": "/dev/hwrng" } } }
950 <- { "return": {} }
952 EQMP
955 .name = "object-del",
956 .args_type = "id:s",
957 .mhandler.cmd_new = qmp_marshal_input_object_del,
960 SQMP
961 object-del
962 ----------
964 Remove QOM object.
966 Arguments:
968 - "id": the object's ID (json-string)
970 Example:
972 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
973 <- { "return": {} }
976 EQMP
980 .name = "block_resize",
981 .args_type = "device:s?,node-name:s?,size:o",
982 .mhandler.cmd_new = qmp_marshal_input_block_resize,
985 SQMP
986 block_resize
987 ------------
989 Resize a block image while a guest is running.
991 Arguments:
993 - "device": the device's ID, must be unique (json-string)
994 - "node-name": the node name in the block driver state graph (json-string)
995 - "size": new size
997 Example:
999 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1000 <- { "return": {} }
1002 EQMP
1005 .name = "block-stream",
1006 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
1007 .mhandler.cmd_new = qmp_marshal_input_block_stream,
1010 SQMP
1011 block-stream
1012 ------------
1014 Copy data from a backing file into a block device.
1016 Arguments:
1018 - "device": The device's ID, must be unique (json-string)
1019 - "base": The file name of the backing image above which copying starts
1020 (json-string, optional)
1021 - "backing-file": The backing file string to write into the active layer. This
1022 filename is not validated.
1024 If a pathname string is such that it cannot be resolved by
1025 QEMU, that means that subsequent QMP or HMP commands must use
1026 node-names for the image in question, as filename lookup
1027 methods will fail.
1029 If not specified, QEMU will automatically determine the
1030 backing file string to use, or error out if there is no
1031 obvious choice. Care should be taken when specifying the
1032 string, to specify a valid filename or protocol.
1033 (json-string, optional) (Since 2.1)
1034 - "speed": the maximum speed, in bytes per second (json-int, optional)
1035 - "on-error": the action to take on an error (default 'report'). 'stop' and
1036 'enospc' can only be used if the block device supports io-status.
1037 (json-string, optional) (Since 2.1)
1039 Example:
1041 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
1042 "base": "/tmp/master.qcow2" } }
1043 <- { "return": {} }
1045 EQMP
1048 .name = "block-commit",
1049 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
1050 .mhandler.cmd_new = qmp_marshal_input_block_commit,
1053 SQMP
1054 block-commit
1055 ------------
1057 Live commit of data from overlay image nodes into backing nodes - i.e., writes
1058 data between 'top' and 'base' into 'base'.
1060 Arguments:
1062 - "device": The device's ID, must be unique (json-string)
1063 - "base": The file name of the backing image to write data into.
1064 If not specified, this is the deepest backing image
1065 (json-string, optional)
1066 - "top": The file name of the backing image within the image chain,
1067 which contains the topmost data to be committed down. If
1068 not specified, this is the active layer. (json-string, optional)
1070 - backing-file: The backing file string to write into the overlay
1071 image of 'top'. If 'top' is the active layer,
1072 specifying a backing file string is an error. This
1073 filename is not validated.
1075 If a pathname string is such that it cannot be
1076 resolved by QEMU, that means that subsequent QMP or
1077 HMP commands must use node-names for the image in
1078 question, as filename lookup methods will fail.
1080 If not specified, QEMU will automatically determine
1081 the backing file string to use, or error out if
1082 there is no obvious choice. Care should be taken
1083 when specifying the string, to specify a valid
1084 filename or protocol.
1085 (json-string, optional) (Since 2.1)
1087 If top == base, that is an error.
1088 If top == active, the job will not be completed by itself,
1089 user needs to complete the job with the block-job-complete
1090 command after getting the ready event. (Since 2.0)
1092 If the base image is smaller than top, then the base image
1093 will be resized to be the same size as top. If top is
1094 smaller than the base image, the base will not be
1095 truncated. If you want the base image size to match the
1096 size of the smaller top, you can safely truncate it
1097 yourself once the commit operation successfully completes.
1098 (json-string)
1099 - "speed": the maximum speed, in bytes per second (json-int, optional)
1102 Example:
1104 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
1105 "top": "/tmp/snap1.qcow2" } }
1106 <- { "return": {} }
1108 EQMP
1111 .name = "drive-backup",
1112 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1113 "bitmap:s?,on-source-error:s?,on-target-error:s?",
1114 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
1117 SQMP
1118 drive-backup
1119 ------------
1121 Start a point-in-time copy of a block device to a new destination. The
1122 status of ongoing drive-backup operations can be checked with
1123 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1124 The operation can be stopped before it has completed using the
1125 block-job-cancel command.
1127 Arguments:
1129 - "device": the name of the device which should be copied.
1130 (json-string)
1131 - "target": the target of the new image. If the file exists, or if it is a
1132 device, the existing file/device will be used as the new
1133 destination. If it does not exist, a new file will be created.
1134 (json-string)
1135 - "format": the format of the new destination, default is to probe if 'mode' is
1136 'existing', else the format of the source
1137 (json-string, optional)
1138 - "sync": what parts of the disk image should be copied to the destination;
1139 possibilities include "full" for all the disk, "top" for only the sectors
1140 allocated in the topmost image, "dirty-bitmap" for only the dirty sectors in
1141 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
1142 - "bitmap": dirty bitmap name for sync==dirty-bitmap. Must be present if sync
1143 is "dirty-bitmap", must NOT be present otherwise.
1144 - "mode": whether and how QEMU should create a new image
1145 (NewImageMode, optional, default 'absolute-paths')
1146 - "speed": the maximum speed, in bytes per second (json-int, optional)
1147 - "on-source-error": the action to take on an error on the source, default
1148 'report'. 'stop' and 'enospc' can only be used
1149 if the block device supports io-status.
1150 (BlockdevOnError, optional)
1151 - "on-target-error": the action to take on an error on the target, default
1152 'report' (no limitations, since this applies to
1153 a different block device than device).
1154 (BlockdevOnError, optional)
1156 Example:
1157 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
1158 "sync": "full",
1159 "target": "backup.img" } }
1160 <- { "return": {} }
1162 EQMP
1165 .name = "blockdev-backup",
1166 .args_type = "sync:s,device:B,target:B,speed:i?,"
1167 "on-source-error:s?,on-target-error:s?",
1168 .mhandler.cmd_new = qmp_marshal_input_blockdev_backup,
1171 SQMP
1172 blockdev-backup
1173 ---------------
1175 The device version of drive-backup: this command takes an existing named device
1176 as backup target.
1178 Arguments:
1180 - "device": the name of the device which should be copied.
1181 (json-string)
1182 - "target": the name of the backup target device. (json-string)
1183 - "sync": what parts of the disk image should be copied to the destination;
1184 possibilities include "full" for all the disk, "top" for only the
1185 sectors allocated in the topmost image, or "none" to only replicate
1186 new I/O (MirrorSyncMode).
1187 - "speed": the maximum speed, in bytes per second (json-int, optional)
1188 - "on-source-error": the action to take on an error on the source, default
1189 'report'. 'stop' and 'enospc' can only be used
1190 if the block device supports io-status.
1191 (BlockdevOnError, optional)
1192 - "on-target-error": the action to take on an error on the target, default
1193 'report' (no limitations, since this applies to
1194 a different block device than device).
1195 (BlockdevOnError, optional)
1197 Example:
1198 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1199 "sync": "full",
1200 "target": "tgt-id" } }
1201 <- { "return": {} }
1203 EQMP
1206 .name = "block-job-set-speed",
1207 .args_type = "device:B,speed:o",
1208 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
1212 .name = "block-job-cancel",
1213 .args_type = "device:B,force:b?",
1214 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
1217 .name = "block-job-pause",
1218 .args_type = "device:B",
1219 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
1222 .name = "block-job-resume",
1223 .args_type = "device:B",
1224 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
1227 .name = "block-job-complete",
1228 .args_type = "device:B",
1229 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
1232 .name = "transaction",
1233 .args_type = "actions:q",
1234 .mhandler.cmd_new = qmp_marshal_input_transaction,
1237 SQMP
1238 transaction
1239 -----------
1241 Atomically operate on one or more block devices. The only supported operations
1242 for now are drive-backup, internal and external snapshotting. A list of
1243 dictionaries is accepted, that contains the actions to be performed.
1244 If there is any failure performing any of the operations, all operations
1245 for the group are abandoned.
1247 For external snapshots, the dictionary contains the device, the file to use for
1248 the new snapshot, and the format. The default format, if not specified, is
1249 qcow2.
1251 Each new snapshot defaults to being created by QEMU (wiping any
1252 contents if the file already exists), but it is also possible to reuse
1253 an externally-created file. In the latter case, you should ensure that
1254 the new image file has the same contents as the current one; QEMU cannot
1255 perform any meaningful check. Typically this is achieved by using the
1256 current image file as the backing file for the new image.
1258 On failure, the original disks pre-snapshot attempt will be used.
1260 For internal snapshots, the dictionary contains the device and the snapshot's
1261 name. If an internal snapshot matching name already exists, the request will
1262 be rejected. Only some image formats support it, for example, qcow2, rbd,
1263 and sheepdog.
1265 On failure, qemu will try delete the newly created internal snapshot in the
1266 transaction. When an I/O error occurs during deletion, the user needs to fix
1267 it later with qemu-img or other command.
1269 Arguments:
1271 actions array:
1272 - "type": the operation to perform. The only supported
1273 value is "blockdev-snapshot-sync". (json-string)
1274 - "data": a dictionary. The contents depend on the value
1275 of "type". When "type" is "blockdev-snapshot-sync":
1276 - "device": device name to snapshot (json-string)
1277 - "node-name": graph node name to snapshot (json-string)
1278 - "snapshot-file": name of new image file (json-string)
1279 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1280 - "format": format of new image (json-string, optional)
1281 - "mode": whether and how QEMU should create the snapshot file
1282 (NewImageMode, optional, default "absolute-paths")
1283 When "type" is "blockdev-snapshot-internal-sync":
1284 - "device": device name to snapshot (json-string)
1285 - "name": name of the new snapshot (json-string)
1287 Example:
1289 -> { "execute": "transaction",
1290 "arguments": { "actions": [
1291 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
1292 "snapshot-file": "/some/place/my-image",
1293 "format": "qcow2" } },
1294 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
1295 "snapshot-file": "/some/place/my-image2",
1296 "snapshot-node-name": "node3432",
1297 "mode": "existing",
1298 "format": "qcow2" } },
1299 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
1300 "snapshot-file": "/some/place/my-image2",
1301 "mode": "existing",
1302 "format": "qcow2" } },
1303 { "type": "blockdev-snapshot-internal-sync", "data" : {
1304 "device": "ide-hd2",
1305 "name": "snapshot0" } } ] } }
1306 <- { "return": {} }
1308 EQMP
1311 .name = "block-dirty-bitmap-add",
1312 .args_type = "node:B,name:s,granularity:i?",
1313 .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_add,
1316 SQMP
1318 block-dirty-bitmap-add
1319 ----------------------
1320 Since 2.4
1322 Create a dirty bitmap with a name on the device, and start tracking the writes.
1324 Arguments:
1326 - "node": device/node on which to create dirty bitmap (json-string)
1327 - "name": name of the new dirty bitmap (json-string)
1328 - "granularity": granularity to track writes with (int, optional)
1330 Example:
1332 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
1333 "name": "bitmap0" } }
1334 <- { "return": {} }
1336 EQMP
1339 .name = "block-dirty-bitmap-remove",
1340 .args_type = "node:B,name:s",
1341 .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_remove,
1344 SQMP
1346 block-dirty-bitmap-remove
1347 -------------------------
1348 Since 2.4
1350 Stop write tracking and remove the dirty bitmap that was created with
1351 block-dirty-bitmap-add.
1353 Arguments:
1355 - "node": device/node on which to remove dirty bitmap (json-string)
1356 - "name": name of the dirty bitmap to remove (json-string)
1358 Example:
1360 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
1361 "name": "bitmap0" } }
1362 <- { "return": {} }
1364 EQMP
1367 .name = "block-dirty-bitmap-clear",
1368 .args_type = "node:B,name:s",
1369 .mhandler.cmd_new = qmp_marshal_input_block_dirty_bitmap_clear,
1372 SQMP
1374 block-dirty-bitmap-clear
1375 ------------------------
1376 Since 2.4
1378 Reset the dirty bitmap associated with a node so that an incremental backup
1379 from this point in time forward will only backup clusters modified after this
1380 clear operation.
1382 Arguments:
1384 - "node": device/node on which to remove dirty bitmap (json-string)
1385 - "name": name of the dirty bitmap to remove (json-string)
1387 Example:
1389 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
1390 "name": "bitmap0" } }
1391 <- { "return": {} }
1393 EQMP
1396 .name = "blockdev-snapshot-sync",
1397 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
1398 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
1401 SQMP
1402 blockdev-snapshot-sync
1403 ----------------------
1405 Synchronous snapshot of a block device. snapshot-file specifies the
1406 target of the new image. If the file exists, or if it is a device, the
1407 snapshot will be created in the existing file/device. If does not
1408 exist, a new file will be created. format specifies the format of the
1409 snapshot image, default is qcow2.
1411 Arguments:
1413 - "device": device name to snapshot (json-string)
1414 - "node-name": graph node name to snapshot (json-string)
1415 - "snapshot-file": name of new image file (json-string)
1416 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1417 - "mode": whether and how QEMU should create the snapshot file
1418 (NewImageMode, optional, default "absolute-paths")
1419 - "format": format of new image (json-string, optional)
1421 Example:
1423 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1424 "snapshot-file":
1425 "/some/place/my-image",
1426 "format": "qcow2" } }
1427 <- { "return": {} }
1429 EQMP
1432 .name = "blockdev-snapshot-internal-sync",
1433 .args_type = "device:B,name:s",
1434 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_internal_sync,
1437 SQMP
1438 blockdev-snapshot-internal-sync
1439 -------------------------------
1441 Synchronously take an internal snapshot of a block device when the format of
1442 image used supports it. If the name is an empty string, or a snapshot with
1443 name already exists, the operation will fail.
1445 Arguments:
1447 - "device": device name to snapshot (json-string)
1448 - "name": name of the new snapshot (json-string)
1450 Example:
1452 -> { "execute": "blockdev-snapshot-internal-sync",
1453 "arguments": { "device": "ide-hd0",
1454 "name": "snapshot0" }
1456 <- { "return": {} }
1458 EQMP
1461 .name = "blockdev-snapshot-delete-internal-sync",
1462 .args_type = "device:B,id:s?,name:s?",
1463 .mhandler.cmd_new =
1464 qmp_marshal_input_blockdev_snapshot_delete_internal_sync,
1467 SQMP
1468 blockdev-snapshot-delete-internal-sync
1469 --------------------------------------
1471 Synchronously delete an internal snapshot of a block device when the format of
1472 image used supports it. The snapshot is identified by name or id or both. One
1473 of name or id is required. If the snapshot is not found, the operation will
1474 fail.
1476 Arguments:
1478 - "device": device name (json-string)
1479 - "id": ID of the snapshot (json-string, optional)
1480 - "name": name of the snapshot (json-string, optional)
1482 Example:
1484 -> { "execute": "blockdev-snapshot-delete-internal-sync",
1485 "arguments": { "device": "ide-hd0",
1486 "name": "snapshot0" }
1488 <- { "return": {
1489 "id": "1",
1490 "name": "snapshot0",
1491 "vm-state-size": 0,
1492 "date-sec": 1000012,
1493 "date-nsec": 10,
1494 "vm-clock-sec": 100,
1495 "vm-clock-nsec": 20
1499 EQMP
1502 .name = "drive-mirror",
1503 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1504 "node-name:s?,replaces:s?,"
1505 "on-source-error:s?,on-target-error:s?,"
1506 "granularity:i?,buf-size:i?",
1507 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1510 SQMP
1511 drive-mirror
1512 ------------
1514 Start mirroring a block device's writes to a new destination. target
1515 specifies the target of the new image. If the file exists, or if it is
1516 a device, it will be used as the new destination for writes. If it does not
1517 exist, a new file will be created. format specifies the format of the
1518 mirror image, default is to probe if mode='existing', else the format
1519 of the source.
1521 Arguments:
1523 - "device": device name to operate on (json-string)
1524 - "target": name of new image file (json-string)
1525 - "format": format of new image (json-string, optional)
1526 - "node-name": the name of the new block driver state in the node graph
1527 (json-string, optional)
1528 - "replaces": the block driver node name to replace when finished
1529 (json-string, optional)
1530 - "mode": how an image file should be created into the target
1531 file/device (NewImageMode, optional, default 'absolute-paths')
1532 - "speed": maximum speed of the streaming job, in bytes per second
1533 (json-int)
1534 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1535 - "buf_size": maximum amount of data in flight from source to target, in bytes
1536 (json-int, default 10M)
1537 - "sync": what parts of the disk image should be copied to the destination;
1538 possibilities include "full" for all the disk, "top" for only the sectors
1539 allocated in the topmost image, or "none" to only replicate new I/O
1540 (MirrorSyncMode).
1541 - "on-source-error": the action to take on an error on the source
1542 (BlockdevOnError, default 'report')
1543 - "on-target-error": the action to take on an error on the target
1544 (BlockdevOnError, default 'report')
1546 The default value of the granularity is the image cluster size clamped
1547 between 4096 and 65536, if the image format defines one. If the format
1548 does not define a cluster size, the default value of the granularity
1549 is 65536.
1552 Example:
1554 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1555 "target": "/some/place/my-image",
1556 "sync": "full",
1557 "format": "qcow2" } }
1558 <- { "return": {} }
1560 EQMP
1563 .name = "change-backing-file",
1564 .args_type = "device:s,image-node-name:s,backing-file:s",
1565 .mhandler.cmd_new = qmp_marshal_input_change_backing_file,
1568 SQMP
1569 change-backing-file
1570 -------------------
1571 Since: 2.1
1573 Change the backing file in the image file metadata. This does not cause
1574 QEMU to reopen the image file to reparse the backing filename (it may,
1575 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1576 if needed). The new backing file string is written into the image file
1577 metadata, and the QEMU internal strings are updated.
1579 Arguments:
1581 - "image-node-name": The name of the block driver state node of the
1582 image to modify. The "device" is argument is used to
1583 verify "image-node-name" is in the chain described by
1584 "device".
1585 (json-string, optional)
1587 - "device": The name of the device.
1588 (json-string)
1590 - "backing-file": The string to write as the backing file. This string is
1591 not validated, so care should be taken when specifying
1592 the string or the image chain may not be able to be
1593 reopened again.
1594 (json-string)
1596 Returns: Nothing on success
1597 If "device" does not exist or cannot be determined, DeviceNotFound
1599 EQMP
1602 .name = "balloon",
1603 .args_type = "value:M",
1604 .mhandler.cmd_new = qmp_marshal_input_balloon,
1607 SQMP
1608 balloon
1609 -------
1611 Request VM to change its memory allocation (in bytes).
1613 Arguments:
1615 - "value": New memory allocation (json-int)
1617 Example:
1619 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1620 <- { "return": {} }
1622 EQMP
1625 .name = "set_link",
1626 .args_type = "name:s,up:b",
1627 .mhandler.cmd_new = qmp_marshal_input_set_link,
1630 SQMP
1631 set_link
1632 --------
1634 Change the link status of a network adapter.
1636 Arguments:
1638 - "name": network device name (json-string)
1639 - "up": status is up (json-bool)
1641 Example:
1643 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1644 <- { "return": {} }
1646 EQMP
1649 .name = "getfd",
1650 .args_type = "fdname:s",
1651 .params = "getfd name",
1652 .help = "receive a file descriptor via SCM rights and assign it a name",
1653 .mhandler.cmd_new = qmp_marshal_input_getfd,
1656 SQMP
1657 getfd
1658 -----
1660 Receive a file descriptor via SCM rights and assign it a name.
1662 Arguments:
1664 - "fdname": file descriptor name (json-string)
1666 Example:
1668 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1669 <- { "return": {} }
1671 Notes:
1673 (1) If the name specified by the "fdname" argument already exists,
1674 the file descriptor assigned to it will be closed and replaced
1675 by the received file descriptor.
1676 (2) The 'closefd' command can be used to explicitly close the file
1677 descriptor when it is no longer needed.
1679 EQMP
1682 .name = "closefd",
1683 .args_type = "fdname:s",
1684 .params = "closefd name",
1685 .help = "close a file descriptor previously passed via SCM rights",
1686 .mhandler.cmd_new = qmp_marshal_input_closefd,
1689 SQMP
1690 closefd
1691 -------
1693 Close a file descriptor previously passed via SCM rights.
1695 Arguments:
1697 - "fdname": file descriptor name (json-string)
1699 Example:
1701 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1702 <- { "return": {} }
1704 EQMP
1707 .name = "add-fd",
1708 .args_type = "fdset-id:i?,opaque:s?",
1709 .params = "add-fd fdset-id opaque",
1710 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1711 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1714 SQMP
1715 add-fd
1716 -------
1718 Add a file descriptor, that was passed via SCM rights, to an fd set.
1720 Arguments:
1722 - "fdset-id": The ID of the fd set to add the file descriptor to.
1723 (json-int, optional)
1724 - "opaque": A free-form string that can be used to describe the fd.
1725 (json-string, optional)
1727 Return a json-object with the following information:
1729 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1730 - "fd": The file descriptor that was received via SCM rights and added to the
1731 fd set. (json-int)
1733 Example:
1735 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1736 <- { "return": { "fdset-id": 1, "fd": 3 } }
1738 Notes:
1740 (1) The list of fd sets is shared by all monitor connections.
1741 (2) If "fdset-id" is not specified, a new fd set will be created.
1743 EQMP
1746 .name = "remove-fd",
1747 .args_type = "fdset-id:i,fd:i?",
1748 .params = "remove-fd fdset-id fd",
1749 .help = "Remove a file descriptor from an fd set",
1750 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1753 SQMP
1754 remove-fd
1755 ---------
1757 Remove a file descriptor from an fd set.
1759 Arguments:
1761 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1762 (json-int)
1763 - "fd": The file descriptor that is to be removed. (json-int, optional)
1765 Example:
1767 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1768 <- { "return": {} }
1770 Notes:
1772 (1) The list of fd sets is shared by all monitor connections.
1773 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1774 removed.
1776 EQMP
1779 .name = "query-fdsets",
1780 .args_type = "",
1781 .help = "Return information describing all fd sets",
1782 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1785 SQMP
1786 query-fdsets
1787 -------------
1789 Return information describing all fd sets.
1791 Arguments: None
1793 Example:
1795 -> { "execute": "query-fdsets" }
1796 <- { "return": [
1798 "fds": [
1800 "fd": 30,
1801 "opaque": "rdonly:/path/to/file"
1804 "fd": 24,
1805 "opaque": "rdwr:/path/to/file"
1808 "fdset-id": 1
1811 "fds": [
1813 "fd": 28
1816 "fd": 29
1819 "fdset-id": 0
1824 Note: The list of fd sets is shared by all monitor connections.
1826 EQMP
1829 .name = "block_passwd",
1830 .args_type = "device:s?,node-name:s?,password:s",
1831 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1834 SQMP
1835 block_passwd
1836 ------------
1838 Set the password of encrypted block devices.
1840 Arguments:
1842 - "device": device name (json-string)
1843 - "node-name": name in the block driver state graph (json-string)
1844 - "password": password (json-string)
1846 Example:
1848 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1849 "password": "12345" } }
1850 <- { "return": {} }
1852 EQMP
1855 .name = "block_set_io_throttle",
1856 .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?",
1857 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1860 SQMP
1861 block_set_io_throttle
1862 ------------
1864 Change I/O throttle limits for a block drive.
1866 Arguments:
1868 - "device": device name (json-string)
1869 - "bps": total throughput limit in bytes per second (json-int)
1870 - "bps_rd": read throughput limit in bytes per second (json-int)
1871 - "bps_wr": write throughput limit in bytes per second (json-int)
1872 - "iops": total I/O operations per second (json-int)
1873 - "iops_rd": read I/O operations per second (json-int)
1874 - "iops_wr": write I/O operations per second (json-int)
1875 - "bps_max": total max in bytes (json-int)
1876 - "bps_rd_max": read max in bytes (json-int)
1877 - "bps_wr_max": write max in bytes (json-int)
1878 - "iops_max": total I/O operations max (json-int)
1879 - "iops_rd_max": read I/O operations max (json-int)
1880 - "iops_wr_max": write I/O operations max (json-int)
1881 - "iops_size": I/O size in bytes when limiting (json-int)
1883 Example:
1885 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1886 "bps": 1000000,
1887 "bps_rd": 0,
1888 "bps_wr": 0,
1889 "iops": 0,
1890 "iops_rd": 0,
1891 "iops_wr": 0,
1892 "bps_max": 8000000,
1893 "bps_rd_max": 0,
1894 "bps_wr_max": 0,
1895 "iops_max": 0,
1896 "iops_rd_max": 0,
1897 "iops_wr_max": 0,
1898 "iops_size": 0 } }
1899 <- { "return": {} }
1901 EQMP
1904 .name = "set_password",
1905 .args_type = "protocol:s,password:s,connected:s?",
1906 .mhandler.cmd_new = qmp_marshal_input_set_password,
1909 SQMP
1910 set_password
1911 ------------
1913 Set the password for vnc/spice protocols.
1915 Arguments:
1917 - "protocol": protocol name (json-string)
1918 - "password": password (json-string)
1919 - "connected": [ keep | disconnect | fail ] (json-string, optional)
1921 Example:
1923 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
1924 "password": "secret" } }
1925 <- { "return": {} }
1927 EQMP
1930 .name = "expire_password",
1931 .args_type = "protocol:s,time:s",
1932 .mhandler.cmd_new = qmp_marshal_input_expire_password,
1935 SQMP
1936 expire_password
1937 ---------------
1939 Set the password expire time for vnc/spice protocols.
1941 Arguments:
1943 - "protocol": protocol name (json-string)
1944 - "time": [ now | never | +secs | secs ] (json-string)
1946 Example:
1948 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1949 "time": "+60" } }
1950 <- { "return": {} }
1952 EQMP
1955 .name = "add_client",
1956 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1957 .mhandler.cmd_new = qmp_marshal_input_add_client,
1960 SQMP
1961 add_client
1962 ----------
1964 Add a graphics client
1966 Arguments:
1968 - "protocol": protocol name (json-string)
1969 - "fdname": file descriptor name (json-string)
1970 - "skipauth": whether to skip authentication (json-bool, optional)
1971 - "tls": whether to perform TLS (json-bool, optional)
1973 Example:
1975 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
1976 "fdname": "myclient" } }
1977 <- { "return": {} }
1979 EQMP
1981 .name = "qmp_capabilities",
1982 .args_type = "",
1983 .params = "",
1984 .help = "enable QMP capabilities",
1985 .mhandler.cmd_new = do_qmp_capabilities,
1988 SQMP
1989 qmp_capabilities
1990 ----------------
1992 Enable QMP capabilities.
1994 Arguments: None.
1996 Example:
1998 -> { "execute": "qmp_capabilities" }
1999 <- { "return": {} }
2001 Note: This command must be issued before issuing any other command.
2003 EQMP
2006 .name = "human-monitor-command",
2007 .args_type = "command-line:s,cpu-index:i?",
2008 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
2011 SQMP
2012 human-monitor-command
2013 ---------------------
2015 Execute a Human Monitor command.
2017 Arguments:
2019 - command-line: the command name and its arguments, just like the
2020 Human Monitor's shell (json-string)
2021 - cpu-index: select the CPU number to be used by commands which access CPU
2022 data, like 'info registers'. The Monitor selects CPU 0 if this
2023 argument is not provided (json-int, optional)
2025 Example:
2027 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
2028 <- { "return": "kvm support: enabled\r\n" }
2030 Notes:
2032 (1) The Human Monitor is NOT an stable interface, this means that command
2033 names, arguments and responses can change or be removed at ANY time.
2034 Applications that rely on long term stability guarantees should NOT
2035 use this command
2037 (2) Limitations:
2039 o This command is stateless, this means that commands that depend
2040 on state information (such as getfd) might not work
2042 o Commands that prompt the user for data (eg. 'cont' when the block
2043 device is encrypted) don't currently work
2045 3. Query Commands
2046 =================
2048 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
2049 HXCOMM this! We will possibly move query commands definitions inside those
2050 HXCOMM sections, just like regular commands.
2052 EQMP
2054 SQMP
2055 query-version
2056 -------------
2058 Show QEMU version.
2060 Return a json-object with the following information:
2062 - "qemu": A json-object containing three integer values:
2063 - "major": QEMU's major version (json-int)
2064 - "minor": QEMU's minor version (json-int)
2065 - "micro": QEMU's micro version (json-int)
2066 - "package": package's version (json-string)
2068 Example:
2070 -> { "execute": "query-version" }
2071 <- {
2072 "return":{
2073 "qemu":{
2074 "major":0,
2075 "minor":11,
2076 "micro":5
2078 "package":""
2082 EQMP
2085 .name = "query-version",
2086 .args_type = "",
2087 .mhandler.cmd_new = qmp_marshal_input_query_version,
2090 SQMP
2091 query-commands
2092 --------------
2094 List QMP available commands.
2096 Each command is represented by a json-object, the returned value is a json-array
2097 of all commands.
2099 Each json-object contain:
2101 - "name": command's name (json-string)
2103 Example:
2105 -> { "execute": "query-commands" }
2106 <- {
2107 "return":[
2109 "name":"query-balloon"
2112 "name":"system_powerdown"
2117 Note: This example has been shortened as the real response is too long.
2119 EQMP
2122 .name = "query-commands",
2123 .args_type = "",
2124 .mhandler.cmd_new = qmp_marshal_input_query_commands,
2127 SQMP
2128 query-events
2129 --------------
2131 List QMP available events.
2133 Each event is represented by a json-object, the returned value is a json-array
2134 of all events.
2136 Each json-object contains:
2138 - "name": event's name (json-string)
2140 Example:
2142 -> { "execute": "query-events" }
2143 <- {
2144 "return":[
2146 "name":"SHUTDOWN"
2149 "name":"RESET"
2154 Note: This example has been shortened as the real response is too long.
2156 EQMP
2159 .name = "query-events",
2160 .args_type = "",
2161 .mhandler.cmd_new = qmp_marshal_input_query_events,
2164 SQMP
2165 query-chardev
2166 -------------
2168 Each device is represented by a json-object. The returned value is a json-array
2169 of all devices.
2171 Each json-object contain the following:
2173 - "label": device's label (json-string)
2174 - "filename": device's file (json-string)
2175 - "frontend-open": open/closed state of the frontend device attached to this
2176 backend (json-bool)
2178 Example:
2180 -> { "execute": "query-chardev" }
2181 <- {
2182 "return": [
2184 "label": "charchannel0",
2185 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2186 "frontend-open": false
2189 "label": "charmonitor",
2190 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2191 "frontend-open": true
2194 "label": "charserial0",
2195 "filename": "pty:/dev/pts/2",
2196 "frontend-open": true
2201 EQMP
2204 .name = "query-chardev",
2205 .args_type = "",
2206 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
2209 SQMP
2210 query-chardev-backends
2211 -------------
2213 List available character device backends.
2215 Each backend is represented by a json-object, the returned value is a json-array
2216 of all backends.
2218 Each json-object contains:
2220 - "name": backend name (json-string)
2222 Example:
2224 -> { "execute": "query-chardev-backends" }
2225 <- {
2226 "return":[
2228 "name":"udp"
2231 "name":"tcp"
2234 "name":"unix"
2237 "name":"spiceport"
2242 EQMP
2245 .name = "query-chardev-backends",
2246 .args_type = "",
2247 .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends,
2250 SQMP
2251 query-block
2252 -----------
2254 Show the block devices.
2256 Each block device information is stored in a json-object and the returned value
2257 is a json-array of all devices.
2259 Each json-object contain the following:
2261 - "device": device name (json-string)
2262 - "type": device type (json-string)
2263 - deprecated, retained for backward compatibility
2264 - Possible values: "unknown"
2265 - "removable": true if the device is removable, false otherwise (json-bool)
2266 - "locked": true if the device is locked, false otherwise (json-bool)
2267 - "tray_open": only present if removable, true if the device has a tray,
2268 and it is open (json-bool)
2269 - "inserted": only present if the device is inserted, it is a json-object
2270 containing the following:
2271 - "file": device file name (json-string)
2272 - "ro": true if read-only, false otherwise (json-bool)
2273 - "drv": driver format name (json-string)
2274 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
2275 "file", "file", "ftp", "ftps", "host_cdrom",
2276 "host_device", "http", "https",
2277 "nbd", "parallels", "qcow", "qcow2", "raw",
2278 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2279 - "backing_file": backing file name (json-string, optional)
2280 - "backing_file_depth": number of files in the backing file chain (json-int)
2281 - "encrypted": true if encrypted, false otherwise (json-bool)
2282 - "bps": limit total bytes per second (json-int)
2283 - "bps_rd": limit read bytes per second (json-int)
2284 - "bps_wr": limit write bytes per second (json-int)
2285 - "iops": limit total I/O operations per second (json-int)
2286 - "iops_rd": limit read operations per second (json-int)
2287 - "iops_wr": limit write operations per second (json-int)
2288 - "bps_max": total max in bytes (json-int)
2289 - "bps_rd_max": read max in bytes (json-int)
2290 - "bps_wr_max": write max in bytes (json-int)
2291 - "iops_max": total I/O operations max (json-int)
2292 - "iops_rd_max": read I/O operations max (json-int)
2293 - "iops_wr_max": write I/O operations max (json-int)
2294 - "iops_size": I/O size when limiting by iops (json-int)
2295 - "detect_zeroes": detect and optimize zero writing (json-string)
2296 - Possible values: "off", "on", "unmap"
2297 - "write_threshold": write offset threshold in bytes, a event will be
2298 emitted if crossed. Zero if disabled (json-int)
2299 - "image": the detail of the image, it is a json-object containing
2300 the following:
2301 - "filename": image file name (json-string)
2302 - "format": image format (json-string)
2303 - "virtual-size": image capacity in bytes (json-int)
2304 - "dirty-flag": true if image is not cleanly closed, not present
2305 means clean (json-bool, optional)
2306 - "actual-size": actual size on disk in bytes of the image, not
2307 present when image does not support thin
2308 provision (json-int, optional)
2309 - "cluster-size": size of a cluster in bytes, not present if image
2310 format does not support it (json-int, optional)
2311 - "encrypted": true if the image is encrypted, not present means
2312 false or the image format does not support
2313 encryption (json-bool, optional)
2314 - "backing_file": backing file name, not present means no backing
2315 file is used or the image format does not
2316 support backing file chain
2317 (json-string, optional)
2318 - "full-backing-filename": full path of the backing file, not
2319 present if it equals backing_file or no
2320 backing file is used
2321 (json-string, optional)
2322 - "backing-filename-format": the format of the backing file, not
2323 present means unknown or no backing
2324 file (json-string, optional)
2325 - "snapshots": the internal snapshot info, it is an optional list
2326 of json-object containing the following:
2327 - "id": unique snapshot id (json-string)
2328 - "name": snapshot name (json-string)
2329 - "vm-state-size": size of the VM state in bytes (json-int)
2330 - "date-sec": UTC date of the snapshot in seconds (json-int)
2331 - "date-nsec": fractional part in nanoseconds to be used with
2332 date-sec (json-int)
2333 - "vm-clock-sec": VM clock relative to boot in seconds
2334 (json-int)
2335 - "vm-clock-nsec": fractional part in nanoseconds to be used
2336 with vm-clock-sec (json-int)
2337 - "backing-image": the detail of the backing image, it is an
2338 optional json-object only present when a
2339 backing image present for this image
2341 - "io-status": I/O operation status, only present if the device supports it
2342 and the VM is configured to stop on errors. It's always reset
2343 to "ok" when the "cont" command is issued (json_string, optional)
2344 - Possible values: "ok", "failed", "nospace"
2346 Example:
2348 -> { "execute": "query-block" }
2349 <- {
2350 "return":[
2352 "io-status": "ok",
2353 "device":"ide0-hd0",
2354 "locked":false,
2355 "removable":false,
2356 "inserted":{
2357 "ro":false,
2358 "drv":"qcow2",
2359 "encrypted":false,
2360 "file":"disks/test.qcow2",
2361 "backing_file_depth":1,
2362 "bps":1000000,
2363 "bps_rd":0,
2364 "bps_wr":0,
2365 "iops":1000000,
2366 "iops_rd":0,
2367 "iops_wr":0,
2368 "bps_max": 8000000,
2369 "bps_rd_max": 0,
2370 "bps_wr_max": 0,
2371 "iops_max": 0,
2372 "iops_rd_max": 0,
2373 "iops_wr_max": 0,
2374 "iops_size": 0,
2375 "detect_zeroes": "on",
2376 "write_threshold": 0,
2377 "image":{
2378 "filename":"disks/test.qcow2",
2379 "format":"qcow2",
2380 "virtual-size":2048000,
2381 "backing_file":"base.qcow2",
2382 "full-backing-filename":"disks/base.qcow2",
2383 "backing-filename-format:"qcow2",
2384 "snapshots":[
2386 "id": "1",
2387 "name": "snapshot1",
2388 "vm-state-size": 0,
2389 "date-sec": 10000200,
2390 "date-nsec": 12,
2391 "vm-clock-sec": 206,
2392 "vm-clock-nsec": 30
2395 "backing-image":{
2396 "filename":"disks/base.qcow2",
2397 "format":"qcow2",
2398 "virtual-size":2048000
2402 "type":"unknown"
2405 "io-status": "ok",
2406 "device":"ide1-cd0",
2407 "locked":false,
2408 "removable":true,
2409 "type":"unknown"
2412 "device":"floppy0",
2413 "locked":false,
2414 "removable":true,
2415 "type":"unknown"
2418 "device":"sd0",
2419 "locked":false,
2420 "removable":true,
2421 "type":"unknown"
2426 EQMP
2429 .name = "query-block",
2430 .args_type = "",
2431 .mhandler.cmd_new = qmp_marshal_input_query_block,
2434 SQMP
2435 query-blockstats
2436 ----------------
2438 Show block device statistics.
2440 Each device statistic information is stored in a json-object and the returned
2441 value is a json-array of all devices.
2443 Each json-object contain the following:
2445 - "device": device name (json-string)
2446 - "stats": A json-object with the statistics information, it contains:
2447 - "rd_bytes": bytes read (json-int)
2448 - "wr_bytes": bytes written (json-int)
2449 - "rd_operations": read operations (json-int)
2450 - "wr_operations": write operations (json-int)
2451 - "flush_operations": cache flush operations (json-int)
2452 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2453 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2454 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
2455 - "wr_highest_offset": Highest offset of a sector written since the
2456 BlockDriverState has been opened (json-int)
2457 - "rd_merged": number of read requests that have been merged into
2458 another request (json-int)
2459 - "wr_merged": number of write requests that have been merged into
2460 another request (json-int)
2461 - "parent": Contains recursively the statistics of the underlying
2462 protocol (e.g. the host file for a qcow2 image). If there is
2463 no underlying protocol, this field is omitted
2464 (json-object, optional)
2466 Example:
2468 -> { "execute": "query-blockstats" }
2469 <- {
2470 "return":[
2472 "device":"ide0-hd0",
2473 "parent":{
2474 "stats":{
2475 "wr_highest_offset":3686448128,
2476 "wr_bytes":9786368,
2477 "wr_operations":751,
2478 "rd_bytes":122567168,
2479 "rd_operations":36772
2480 "wr_total_times_ns":313253456
2481 "rd_total_times_ns":3465673657
2482 "flush_total_times_ns":49653
2483 "flush_operations":61,
2484 "rd_merged":0,
2485 "wr_merged":0
2488 "stats":{
2489 "wr_highest_offset":2821110784,
2490 "wr_bytes":9786368,
2491 "wr_operations":692,
2492 "rd_bytes":122739200,
2493 "rd_operations":36604
2494 "flush_operations":51,
2495 "wr_total_times_ns":313253456
2496 "rd_total_times_ns":3465673657
2497 "flush_total_times_ns":49653,
2498 "rd_merged":0,
2499 "wr_merged":0
2503 "device":"ide1-cd0",
2504 "stats":{
2505 "wr_highest_offset":0,
2506 "wr_bytes":0,
2507 "wr_operations":0,
2508 "rd_bytes":0,
2509 "rd_operations":0
2510 "flush_operations":0,
2511 "wr_total_times_ns":0
2512 "rd_total_times_ns":0
2513 "flush_total_times_ns":0,
2514 "rd_merged":0,
2515 "wr_merged":0
2519 "device":"floppy0",
2520 "stats":{
2521 "wr_highest_offset":0,
2522 "wr_bytes":0,
2523 "wr_operations":0,
2524 "rd_bytes":0,
2525 "rd_operations":0
2526 "flush_operations":0,
2527 "wr_total_times_ns":0
2528 "rd_total_times_ns":0
2529 "flush_total_times_ns":0,
2530 "rd_merged":0,
2531 "wr_merged":0
2535 "device":"sd0",
2536 "stats":{
2537 "wr_highest_offset":0,
2538 "wr_bytes":0,
2539 "wr_operations":0,
2540 "rd_bytes":0,
2541 "rd_operations":0
2542 "flush_operations":0,
2543 "wr_total_times_ns":0
2544 "rd_total_times_ns":0
2545 "flush_total_times_ns":0,
2546 "rd_merged":0,
2547 "wr_merged":0
2553 EQMP
2556 .name = "query-blockstats",
2557 .args_type = "query-nodes:b?",
2558 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
2561 SQMP
2562 query-cpus
2563 ----------
2565 Show CPU information.
2567 Return a json-array. Each CPU is represented by a json-object, which contains:
2569 - "CPU": CPU index (json-int)
2570 - "current": true if this is the current CPU, false otherwise (json-bool)
2571 - "halted": true if the cpu is halted, false otherwise (json-bool)
2572 - Current program counter. The key's name depends on the architecture:
2573 "pc": i386/x86_64 (json-int)
2574 "nip": PPC (json-int)
2575 "pc" and "npc": sparc (json-int)
2576 "PC": mips (json-int)
2577 - "thread_id": ID of the underlying host thread (json-int)
2579 Example:
2581 -> { "execute": "query-cpus" }
2582 <- {
2583 "return":[
2585 "CPU":0,
2586 "current":true,
2587 "halted":false,
2588 "pc":3227107138
2589 "thread_id":3134
2592 "CPU":1,
2593 "current":false,
2594 "halted":true,
2595 "pc":7108165
2596 "thread_id":3135
2601 EQMP
2604 .name = "query-cpus",
2605 .args_type = "",
2606 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2609 SQMP
2610 query-iothreads
2611 ---------------
2613 Returns a list of information about each iothread.
2615 Note this list excludes the QEMU main loop thread, which is not declared
2616 using the -object iothread command-line option. It is always the main thread
2617 of the process.
2619 Return a json-array. Each iothread is represented by a json-object, which contains:
2621 - "id": name of iothread (json-str)
2622 - "thread-id": ID of the underlying host thread (json-int)
2624 Example:
2626 -> { "execute": "query-iothreads" }
2627 <- {
2628 "return":[
2630 "id":"iothread0",
2631 "thread-id":3134
2634 "id":"iothread1",
2635 "thread-id":3135
2640 EQMP
2643 .name = "query-iothreads",
2644 .args_type = "",
2645 .mhandler.cmd_new = qmp_marshal_input_query_iothreads,
2648 SQMP
2649 query-pci
2650 ---------
2652 PCI buses and devices information.
2654 The returned value is a json-array of all buses. Each bus is represented by
2655 a json-object, which has a key with a json-array of all PCI devices attached
2656 to it. Each device is represented by a json-object.
2658 The bus json-object contains the following:
2660 - "bus": bus number (json-int)
2661 - "devices": a json-array of json-objects, each json-object represents a
2662 PCI device
2664 The PCI device json-object contains the following:
2666 - "bus": identical to the parent's bus number (json-int)
2667 - "slot": slot number (json-int)
2668 - "function": function number (json-int)
2669 - "class_info": a json-object containing:
2670 - "desc": device class description (json-string, optional)
2671 - "class": device class number (json-int)
2672 - "id": a json-object containing:
2673 - "device": device ID (json-int)
2674 - "vendor": vendor ID (json-int)
2675 - "irq": device's IRQ if assigned (json-int, optional)
2676 - "qdev_id": qdev id string (json-string)
2677 - "pci_bridge": It's a json-object, only present if this device is a
2678 PCI bridge, contains:
2679 - "bus": bus number (json-int)
2680 - "secondary": secondary bus number (json-int)
2681 - "subordinate": subordinate bus number (json-int)
2682 - "io_range": I/O memory range information, a json-object with the
2683 following members:
2684 - "base": base address, in bytes (json-int)
2685 - "limit": limit address, in bytes (json-int)
2686 - "memory_range": memory range information, a json-object with the
2687 following members:
2688 - "base": base address, in bytes (json-int)
2689 - "limit": limit address, in bytes (json-int)
2690 - "prefetchable_range": Prefetchable memory range information, a
2691 json-object with the following members:
2692 - "base": base address, in bytes (json-int)
2693 - "limit": limit address, in bytes (json-int)
2694 - "devices": a json-array of PCI devices if there's any attached, each
2695 each element is represented by a json-object, which contains
2696 the same members of the 'PCI device json-object' described
2697 above (optional)
2698 - "regions": a json-array of json-objects, each json-object represents a
2699 memory region of this device
2701 The memory range json-object contains the following:
2703 - "base": base memory address (json-int)
2704 - "limit": limit value (json-int)
2706 The region json-object can be an I/O region or a memory region, an I/O region
2707 json-object contains the following:
2709 - "type": "io" (json-string, fixed)
2710 - "bar": BAR number (json-int)
2711 - "address": memory address (json-int)
2712 - "size": memory size (json-int)
2714 A memory region json-object contains the following:
2716 - "type": "memory" (json-string, fixed)
2717 - "bar": BAR number (json-int)
2718 - "address": memory address (json-int)
2719 - "size": memory size (json-int)
2720 - "mem_type_64": true or false (json-bool)
2721 - "prefetch": true or false (json-bool)
2723 Example:
2725 -> { "execute": "query-pci" }
2726 <- {
2727 "return":[
2729 "bus":0,
2730 "devices":[
2732 "bus":0,
2733 "qdev_id":"",
2734 "slot":0,
2735 "class_info":{
2736 "class":1536,
2737 "desc":"Host bridge"
2739 "id":{
2740 "device":32902,
2741 "vendor":4663
2743 "function":0,
2744 "regions":[
2749 "bus":0,
2750 "qdev_id":"",
2751 "slot":1,
2752 "class_info":{
2753 "class":1537,
2754 "desc":"ISA bridge"
2756 "id":{
2757 "device":32902,
2758 "vendor":28672
2760 "function":0,
2761 "regions":[
2766 "bus":0,
2767 "qdev_id":"",
2768 "slot":1,
2769 "class_info":{
2770 "class":257,
2771 "desc":"IDE controller"
2773 "id":{
2774 "device":32902,
2775 "vendor":28688
2777 "function":1,
2778 "regions":[
2780 "bar":4,
2781 "size":16,
2782 "address":49152,
2783 "type":"io"
2788 "bus":0,
2789 "qdev_id":"",
2790 "slot":2,
2791 "class_info":{
2792 "class":768,
2793 "desc":"VGA controller"
2795 "id":{
2796 "device":4115,
2797 "vendor":184
2799 "function":0,
2800 "regions":[
2802 "prefetch":true,
2803 "mem_type_64":false,
2804 "bar":0,
2805 "size":33554432,
2806 "address":4026531840,
2807 "type":"memory"
2810 "prefetch":false,
2811 "mem_type_64":false,
2812 "bar":1,
2813 "size":4096,
2814 "address":4060086272,
2815 "type":"memory"
2818 "prefetch":false,
2819 "mem_type_64":false,
2820 "bar":6,
2821 "size":65536,
2822 "address":-1,
2823 "type":"memory"
2828 "bus":0,
2829 "qdev_id":"",
2830 "irq":11,
2831 "slot":4,
2832 "class_info":{
2833 "class":1280,
2834 "desc":"RAM controller"
2836 "id":{
2837 "device":6900,
2838 "vendor":4098
2840 "function":0,
2841 "regions":[
2843 "bar":0,
2844 "size":32,
2845 "address":49280,
2846 "type":"io"
2855 Note: This example has been shortened as the real response is too long.
2857 EQMP
2860 .name = "query-pci",
2861 .args_type = "",
2862 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2865 SQMP
2866 query-kvm
2867 ---------
2869 Show KVM information.
2871 Return a json-object with the following information:
2873 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
2874 - "present": true if QEMU has KVM support, false otherwise (json-bool)
2876 Example:
2878 -> { "execute": "query-kvm" }
2879 <- { "return": { "enabled": true, "present": true } }
2881 EQMP
2884 .name = "query-kvm",
2885 .args_type = "",
2886 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2889 SQMP
2890 query-status
2891 ------------
2893 Return a json-object with the following information:
2895 - "running": true if the VM is running, or false if it is paused (json-bool)
2896 - "singlestep": true if the VM is in single step mode,
2897 false otherwise (json-bool)
2898 - "status": one of the following values (json-string)
2899 "debug" - QEMU is running on a debugger
2900 "inmigrate" - guest is paused waiting for an incoming migration
2901 "internal-error" - An internal error that prevents further guest
2902 execution has occurred
2903 "io-error" - the last IOP has failed and the device is configured
2904 to pause on I/O errors
2905 "paused" - guest has been paused via the 'stop' command
2906 "postmigrate" - guest is paused following a successful 'migrate'
2907 "prelaunch" - QEMU was started with -S and guest has not started
2908 "finish-migrate" - guest is paused to finish the migration process
2909 "restore-vm" - guest is paused to restore VM state
2910 "running" - guest is actively running
2911 "save-vm" - guest is paused to save the VM state
2912 "shutdown" - guest is shut down (and -no-shutdown is in use)
2913 "watchdog" - the watchdog action is configured to pause and
2914 has been triggered
2916 Example:
2918 -> { "execute": "query-status" }
2919 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
2921 EQMP
2924 .name = "query-status",
2925 .args_type = "",
2926 .mhandler.cmd_new = qmp_marshal_input_query_status,
2929 SQMP
2930 query-mice
2931 ----------
2933 Show VM mice information.
2935 Each mouse is represented by a json-object, the returned value is a json-array
2936 of all mice.
2938 The mouse json-object contains the following:
2940 - "name": mouse's name (json-string)
2941 - "index": mouse's index (json-int)
2942 - "current": true if this mouse is receiving events, false otherwise (json-bool)
2943 - "absolute": true if the mouse generates absolute input events (json-bool)
2945 Example:
2947 -> { "execute": "query-mice" }
2948 <- {
2949 "return":[
2951 "name":"QEMU Microsoft Mouse",
2952 "index":0,
2953 "current":false,
2954 "absolute":false
2957 "name":"QEMU PS/2 Mouse",
2958 "index":1,
2959 "current":true,
2960 "absolute":true
2965 EQMP
2968 .name = "query-mice",
2969 .args_type = "",
2970 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2973 SQMP
2974 query-vnc
2975 ---------
2977 Show VNC server information.
2979 Return a json-object with server information. Connected clients are returned
2980 as a json-array of json-objects.
2982 The main json-object contains the following:
2984 - "enabled": true or false (json-bool)
2985 - "host": server's IP address (json-string)
2986 - "family": address family (json-string)
2987 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2988 - "service": server's port number (json-string)
2989 - "auth": authentication method (json-string)
2990 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2991 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2992 "vencrypt+plain", "vencrypt+tls+none",
2993 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2994 "vencrypt+tls+vnc", "vencrypt+x509+none",
2995 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2996 "vencrypt+x509+vnc", "vnc"
2997 - "clients": a json-array of all connected clients
2999 Clients are described by a json-object, each one contain the following:
3001 - "host": client's IP address (json-string)
3002 - "family": address family (json-string)
3003 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3004 - "service": client's port number (json-string)
3005 - "x509_dname": TLS dname (json-string, optional)
3006 - "sasl_username": SASL username (json-string, optional)
3008 Example:
3010 -> { "execute": "query-vnc" }
3011 <- {
3012 "return":{
3013 "enabled":true,
3014 "host":"0.0.0.0",
3015 "service":"50402",
3016 "auth":"vnc",
3017 "family":"ipv4",
3018 "clients":[
3020 "host":"127.0.0.1",
3021 "service":"50401",
3022 "family":"ipv4"
3028 EQMP
3031 .name = "query-vnc",
3032 .args_type = "",
3033 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
3036 .name = "query-vnc-servers",
3037 .args_type = "",
3038 .mhandler.cmd_new = qmp_marshal_input_query_vnc_servers,
3041 SQMP
3042 query-spice
3043 -----------
3045 Show SPICE server information.
3047 Return a json-object with server information. Connected clients are returned
3048 as a json-array of json-objects.
3050 The main json-object contains the following:
3052 - "enabled": true or false (json-bool)
3053 - "host": server's IP address (json-string)
3054 - "port": server's port number (json-int, optional)
3055 - "tls-port": server's port number (json-int, optional)
3056 - "auth": authentication method (json-string)
3057 - Possible values: "none", "spice"
3058 - "channels": a json-array of all active channels clients
3060 Channels are described by a json-object, each one contain the following:
3062 - "host": client's IP address (json-string)
3063 - "family": address family (json-string)
3064 - Possible values: "ipv4", "ipv6", "unix", "unknown"
3065 - "port": client's port number (json-string)
3066 - "connection-id": spice connection id. All channels with the same id
3067 belong to the same spice session (json-int)
3068 - "channel-type": channel type. "1" is the main control channel, filter for
3069 this one if you want track spice sessions only (json-int)
3070 - "channel-id": channel id. Usually "0", might be different needed when
3071 multiple channels of the same type exist, such as multiple
3072 display channels in a multihead setup (json-int)
3073 - "tls": whether the channel is encrypted (json-bool)
3075 Example:
3077 -> { "execute": "query-spice" }
3078 <- {
3079 "return": {
3080 "enabled": true,
3081 "auth": "spice",
3082 "port": 5920,
3083 "tls-port": 5921,
3084 "host": "0.0.0.0",
3085 "channels": [
3087 "port": "54924",
3088 "family": "ipv4",
3089 "channel-type": 1,
3090 "connection-id": 1804289383,
3091 "host": "127.0.0.1",
3092 "channel-id": 0,
3093 "tls": true
3096 "port": "36710",
3097 "family": "ipv4",
3098 "channel-type": 4,
3099 "connection-id": 1804289383,
3100 "host": "127.0.0.1",
3101 "channel-id": 0,
3102 "tls": false
3104 [ ... more channels follow ... ]
3109 EQMP
3111 #if defined(CONFIG_SPICE)
3113 .name = "query-spice",
3114 .args_type = "",
3115 .mhandler.cmd_new = qmp_marshal_input_query_spice,
3117 #endif
3119 SQMP
3120 query-name
3121 ----------
3123 Show VM name.
3125 Return a json-object with the following information:
3127 - "name": VM's name (json-string, optional)
3129 Example:
3131 -> { "execute": "query-name" }
3132 <- { "return": { "name": "qemu-name" } }
3134 EQMP
3137 .name = "query-name",
3138 .args_type = "",
3139 .mhandler.cmd_new = qmp_marshal_input_query_name,
3142 SQMP
3143 query-uuid
3144 ----------
3146 Show VM UUID.
3148 Return a json-object with the following information:
3150 - "UUID": Universally Unique Identifier (json-string)
3152 Example:
3154 -> { "execute": "query-uuid" }
3155 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3157 EQMP
3160 .name = "query-uuid",
3161 .args_type = "",
3162 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
3165 SQMP
3166 query-command-line-options
3167 --------------------------
3169 Show command line option schema.
3171 Return a json-array of command line option schema for all options (or for
3172 the given option), returning an error if the given option doesn't exist.
3174 Each array entry contains the following:
3176 - "option": option name (json-string)
3177 - "parameters": a json-array describes all parameters of the option:
3178 - "name": parameter name (json-string)
3179 - "type": parameter type (one of 'string', 'boolean', 'number',
3180 or 'size')
3181 - "help": human readable description of the parameter
3182 (json-string, optional)
3183 - "default": default value string for the parameter
3184 (json-string, optional)
3186 Example:
3188 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3189 <- { "return": [
3191 "parameters": [
3193 "name": "romfile",
3194 "type": "string"
3197 "name": "bootindex",
3198 "type": "number"
3201 "option": "option-rom"
3206 EQMP
3209 .name = "query-command-line-options",
3210 .args_type = "option:s?",
3211 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
3214 SQMP
3215 query-migrate
3216 -------------
3218 Migration status.
3220 Return a json-object. If migration is active there will be another json-object
3221 with RAM migration status and if block migration is active another one with
3222 block migration status.
3224 The main json-object contains the following:
3226 - "status": migration status (json-string)
3227 - Possible values: "setup", "active", "completed", "failed", "cancelled"
3228 - "total-time": total amount of ms since migration started. If
3229 migration has ended, it returns the total migration
3230 time (json-int)
3231 - "setup-time" amount of setup time in milliseconds _before_ the
3232 iterations begin but _after_ the QMP command is issued.
3233 This is designed to provide an accounting of any activities
3234 (such as RDMA pinning) which may be expensive, but do not
3235 actually occur during the iterative migration rounds
3236 themselves. (json-int)
3237 - "downtime": only present when migration has finished correctly
3238 total amount in ms for downtime that happened (json-int)
3239 - "expected-downtime": only present while migration is active
3240 total amount in ms for downtime that was calculated on
3241 the last bitmap round (json-int)
3242 - "ram": only present if "status" is "active", it is a json-object with the
3243 following RAM information:
3244 - "transferred": amount transferred in bytes (json-int)
3245 - "remaining": amount remaining to transfer in bytes (json-int)
3246 - "total": total amount of memory in bytes (json-int)
3247 - "duplicate": number of pages filled entirely with the same
3248 byte (json-int)
3249 These are sent over the wire much more efficiently.
3250 - "skipped": number of skipped zero pages (json-int)
3251 - "normal" : number of whole pages transferred. I.e. they
3252 were not sent as duplicate or xbzrle pages (json-int)
3253 - "normal-bytes" : number of bytes transferred in whole
3254 pages. This is just normal pages times size of one page,
3255 but this way upper levels don't need to care about page
3256 size (json-int)
3257 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
3258 - "disk": only present if "status" is "active" and it is a block migration,
3259 it is a json-object with the following disk information:
3260 - "transferred": amount transferred in bytes (json-int)
3261 - "remaining": amount remaining to transfer in bytes json-int)
3262 - "total": total disk size in bytes (json-int)
3263 - "xbzrle-cache": only present if XBZRLE is active.
3264 It is a json-object with the following XBZRLE information:
3265 - "cache-size": XBZRLE cache size in bytes
3266 - "bytes": number of bytes transferred for XBZRLE compressed pages
3267 - "pages": number of XBZRLE compressed pages
3268 - "cache-miss": number of XBRZRLE page cache misses
3269 - "cache-miss-rate": rate of XBRZRLE page cache misses
3270 - "overflow": number of times XBZRLE overflows. This means
3271 that the XBZRLE encoding was bigger than just sent the
3272 whole page, and then we sent the whole page instead (as as
3273 normal page).
3275 Examples:
3277 1. Before the first migration
3279 -> { "execute": "query-migrate" }
3280 <- { "return": {} }
3282 2. Migration is done and has succeeded
3284 -> { "execute": "query-migrate" }
3285 <- { "return": {
3286 "status": "completed",
3287 "ram":{
3288 "transferred":123,
3289 "remaining":123,
3290 "total":246,
3291 "total-time":12345,
3292 "setup-time":12345,
3293 "downtime":12345,
3294 "duplicate":123,
3295 "normal":123,
3296 "normal-bytes":123456,
3297 "dirty-sync-count":15
3302 3. Migration is done and has failed
3304 -> { "execute": "query-migrate" }
3305 <- { "return": { "status": "failed" } }
3307 4. Migration is being performed and is not a block migration:
3309 -> { "execute": "query-migrate" }
3310 <- {
3311 "return":{
3312 "status":"active",
3313 "ram":{
3314 "transferred":123,
3315 "remaining":123,
3316 "total":246,
3317 "total-time":12345,
3318 "setup-time":12345,
3319 "expected-downtime":12345,
3320 "duplicate":123,
3321 "normal":123,
3322 "normal-bytes":123456,
3323 "dirty-sync-count":15
3328 5. Migration is being performed and is a block migration:
3330 -> { "execute": "query-migrate" }
3331 <- {
3332 "return":{
3333 "status":"active",
3334 "ram":{
3335 "total":1057024,
3336 "remaining":1053304,
3337 "transferred":3720,
3338 "total-time":12345,
3339 "setup-time":12345,
3340 "expected-downtime":12345,
3341 "duplicate":123,
3342 "normal":123,
3343 "normal-bytes":123456,
3344 "dirty-sync-count":15
3346 "disk":{
3347 "total":20971520,
3348 "remaining":20880384,
3349 "transferred":91136
3354 6. Migration is being performed and XBZRLE is active:
3356 -> { "execute": "query-migrate" }
3357 <- {
3358 "return":{
3359 "status":"active",
3360 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3361 "ram":{
3362 "total":1057024,
3363 "remaining":1053304,
3364 "transferred":3720,
3365 "total-time":12345,
3366 "setup-time":12345,
3367 "expected-downtime":12345,
3368 "duplicate":10,
3369 "normal":3333,
3370 "normal-bytes":3412992,
3371 "dirty-sync-count":15
3373 "xbzrle-cache":{
3374 "cache-size":67108864,
3375 "bytes":20971520,
3376 "pages":2444343,
3377 "cache-miss":2244,
3378 "cache-miss-rate":0.123,
3379 "overflow":34434
3384 EQMP
3387 .name = "query-migrate",
3388 .args_type = "",
3389 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
3392 SQMP
3393 migrate-set-capabilities
3394 ------------------------
3396 Enable/Disable migration capabilities
3398 - "xbzrle": XBZRLE support
3399 - "rdma-pin-all": pin all pages when using RDMA during migration
3400 - "auto-converge": throttle down guest to help convergence of migration
3401 - "zero-blocks": compress zero blocks during block migration
3403 Arguments:
3405 Example:
3407 -> { "execute": "migrate-set-capabilities" , "arguments":
3408 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3410 EQMP
3413 .name = "migrate-set-capabilities",
3414 .args_type = "capabilities:q",
3415 .params = "capability:s,state:b",
3416 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
3418 SQMP
3419 query-migrate-capabilities
3420 --------------------------
3422 Query current migration capabilities
3424 - "capabilities": migration capabilities state
3425 - "xbzrle" : XBZRLE state (json-bool)
3426 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3427 - "auto-converge" : Auto Converge state (json-bool)
3428 - "zero-blocks" : Zero Blocks state (json-bool)
3430 Arguments:
3432 Example:
3434 -> { "execute": "query-migrate-capabilities" }
3435 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3437 EQMP
3440 .name = "query-migrate-capabilities",
3441 .args_type = "",
3442 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
3445 SQMP
3446 query-balloon
3447 -------------
3449 Show balloon information.
3451 Make an asynchronous request for balloon info. When the request completes a
3452 json-object will be returned containing the following data:
3454 - "actual": current balloon value in bytes (json-int)
3456 Example:
3458 -> { "execute": "query-balloon" }
3459 <- {
3460 "return":{
3461 "actual":1073741824,
3465 EQMP
3468 .name = "query-balloon",
3469 .args_type = "",
3470 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
3474 .name = "query-block-jobs",
3475 .args_type = "",
3476 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
3480 .name = "qom-list",
3481 .args_type = "path:s",
3482 .mhandler.cmd_new = qmp_marshal_input_qom_list,
3486 .name = "qom-set",
3487 .args_type = "path:s,property:s,value:q",
3488 .mhandler.cmd_new = qmp_qom_set,
3492 .name = "qom-get",
3493 .args_type = "path:s,property:s",
3494 .mhandler.cmd_new = qmp_qom_get,
3498 .name = "nbd-server-start",
3499 .args_type = "addr:q",
3500 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
3503 .name = "nbd-server-add",
3504 .args_type = "device:B,writable:b?",
3505 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
3508 .name = "nbd-server-stop",
3509 .args_type = "",
3510 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
3514 .name = "change-vnc-password",
3515 .args_type = "password:s",
3516 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
3519 .name = "qom-list-types",
3520 .args_type = "implements:s?,abstract:b?",
3521 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
3525 .name = "device-list-properties",
3526 .args_type = "typename:s",
3527 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
3531 .name = "query-machines",
3532 .args_type = "",
3533 .mhandler.cmd_new = qmp_marshal_input_query_machines,
3537 .name = "query-cpu-definitions",
3538 .args_type = "",
3539 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
3543 .name = "query-target",
3544 .args_type = "",
3545 .mhandler.cmd_new = qmp_marshal_input_query_target,
3549 .name = "query-tpm",
3550 .args_type = "",
3551 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
3554 SQMP
3555 query-tpm
3556 ---------
3558 Return information about the TPM device.
3560 Arguments: None
3562 Example:
3564 -> { "execute": "query-tpm" }
3565 <- { "return":
3567 { "model": "tpm-tis",
3568 "options":
3569 { "type": "passthrough",
3570 "data":
3571 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3572 "path": "/dev/tpm0"
3575 "id": "tpm0"
3580 EQMP
3583 .name = "query-tpm-models",
3584 .args_type = "",
3585 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
3588 SQMP
3589 query-tpm-models
3590 ----------------
3592 Return a list of supported TPM models.
3594 Arguments: None
3596 Example:
3598 -> { "execute": "query-tpm-models" }
3599 <- { "return": [ "tpm-tis" ] }
3601 EQMP
3604 .name = "query-tpm-types",
3605 .args_type = "",
3606 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
3609 SQMP
3610 query-tpm-types
3611 ---------------
3613 Return a list of supported TPM types.
3615 Arguments: None
3617 Example:
3619 -> { "execute": "query-tpm-types" }
3620 <- { "return": [ "passthrough" ] }
3622 EQMP
3625 .name = "chardev-add",
3626 .args_type = "id:s,backend:q",
3627 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
3630 SQMP
3631 chardev-add
3632 ----------------
3634 Add a chardev.
3636 Arguments:
3638 - "id": the chardev's ID, must be unique (json-string)
3639 - "backend": chardev backend type + parameters
3641 Examples:
3643 -> { "execute" : "chardev-add",
3644 "arguments" : { "id" : "foo",
3645 "backend" : { "type" : "null", "data" : {} } } }
3646 <- { "return": {} }
3648 -> { "execute" : "chardev-add",
3649 "arguments" : { "id" : "bar",
3650 "backend" : { "type" : "file",
3651 "data" : { "out" : "/tmp/bar.log" } } } }
3652 <- { "return": {} }
3654 -> { "execute" : "chardev-add",
3655 "arguments" : { "id" : "baz",
3656 "backend" : { "type" : "pty", "data" : {} } } }
3657 <- { "return": { "pty" : "/dev/pty/42" } }
3659 EQMP
3662 .name = "chardev-remove",
3663 .args_type = "id:s",
3664 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3668 SQMP
3669 chardev-remove
3670 --------------
3672 Remove a chardev.
3674 Arguments:
3676 - "id": the chardev's ID, must exist and not be in use (json-string)
3678 Example:
3680 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3681 <- { "return": {} }
3683 EQMP
3685 .name = "query-rx-filter",
3686 .args_type = "name:s?",
3687 .mhandler.cmd_new = qmp_marshal_input_query_rx_filter,
3690 SQMP
3691 query-rx-filter
3692 ---------------
3694 Show rx-filter information.
3696 Returns a json-array of rx-filter information for all NICs (or for the
3697 given NIC), returning an error if the given NIC doesn't exist, or
3698 given NIC doesn't support rx-filter querying, or given net client
3699 isn't a NIC.
3701 The query will clear the event notification flag of each NIC, then qemu
3702 will start to emit event to QMP monitor.
3704 Each array entry contains the following:
3706 - "name": net client name (json-string)
3707 - "promiscuous": promiscuous mode is enabled (json-bool)
3708 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
3709 - "unicast": unicast receive state (one of 'normal', 'none', 'all')
3710 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
3711 - "broadcast-allowed": allow to receive broadcast (json-bool)
3712 - "multicast-overflow": multicast table is overflowed (json-bool)
3713 - "unicast-overflow": unicast table is overflowed (json-bool)
3714 - "main-mac": main macaddr string (json-string)
3715 - "vlan-table": a json-array of active vlan id
3716 - "unicast-table": a json-array of unicast macaddr string
3717 - "multicast-table": a json-array of multicast macaddr string
3719 Example:
3721 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
3722 <- { "return": [
3724 "promiscuous": true,
3725 "name": "vnet0",
3726 "main-mac": "52:54:00:12:34:56",
3727 "unicast": "normal",
3728 "vlan": "normal",
3729 "vlan-table": [
3733 "unicast-table": [
3735 "multicast": "normal",
3736 "multicast-overflow": false,
3737 "unicast-overflow": false,
3738 "multicast-table": [
3739 "01:00:5e:00:00:01",
3740 "33:33:00:00:00:01",
3741 "33:33:ff:12:34:56"
3743 "broadcast-allowed": false
3748 EQMP
3751 .name = "blockdev-add",
3752 .args_type = "options:q",
3753 .mhandler.cmd_new = qmp_marshal_input_blockdev_add,
3756 SQMP
3757 blockdev-add
3758 ------------
3760 Add a block device.
3762 This command is still a work in progress. It doesn't support all
3763 block drivers, it lacks a matching blockdev-del, and more. Stay away
3764 from it unless you want to help with its development.
3766 Arguments:
3768 - "options": block driver options
3770 Example (1):
3772 -> { "execute": "blockdev-add",
3773 "arguments": { "options" : { "driver": "qcow2",
3774 "file": { "driver": "file",
3775 "filename": "test.qcow2" } } } }
3776 <- { "return": {} }
3778 Example (2):
3780 -> { "execute": "blockdev-add",
3781 "arguments": {
3782 "options": {
3783 "driver": "qcow2",
3784 "id": "my_disk",
3785 "discard": "unmap",
3786 "cache": {
3787 "direct": true,
3788 "writeback": true
3790 "file": {
3791 "driver": "file",
3792 "filename": "/tmp/test.qcow2"
3794 "backing": {
3795 "driver": "raw",
3796 "file": {
3797 "driver": "file",
3798 "filename": "/dev/fdset/4"
3805 <- { "return": {} }
3807 EQMP
3810 .name = "query-named-block-nodes",
3811 .args_type = "",
3812 .mhandler.cmd_new = qmp_marshal_input_query_named_block_nodes,
3815 SQMP
3816 @query-named-block-nodes
3817 ------------------------
3819 Return a list of BlockDeviceInfo for all the named block driver nodes
3821 Example:
3823 -> { "execute": "query-named-block-nodes" }
3824 <- { "return": [ { "ro":false,
3825 "drv":"qcow2",
3826 "encrypted":false,
3827 "file":"disks/test.qcow2",
3828 "node-name": "my-node",
3829 "backing_file_depth":1,
3830 "bps":1000000,
3831 "bps_rd":0,
3832 "bps_wr":0,
3833 "iops":1000000,
3834 "iops_rd":0,
3835 "iops_wr":0,
3836 "bps_max": 8000000,
3837 "bps_rd_max": 0,
3838 "bps_wr_max": 0,
3839 "iops_max": 0,
3840 "iops_rd_max": 0,
3841 "iops_wr_max": 0,
3842 "iops_size": 0,
3843 "write_threshold": 0,
3844 "image":{
3845 "filename":"disks/test.qcow2",
3846 "format":"qcow2",
3847 "virtual-size":2048000,
3848 "backing_file":"base.qcow2",
3849 "full-backing-filename":"disks/base.qcow2",
3850 "backing-filename-format:"qcow2",
3851 "snapshots":[
3853 "id": "1",
3854 "name": "snapshot1",
3855 "vm-state-size": 0,
3856 "date-sec": 10000200,
3857 "date-nsec": 12,
3858 "vm-clock-sec": 206,
3859 "vm-clock-nsec": 30
3862 "backing-image":{
3863 "filename":"disks/base.qcow2",
3864 "format":"qcow2",
3865 "virtual-size":2048000
3867 } } ] }
3869 EQMP
3872 .name = "query-memdev",
3873 .args_type = "",
3874 .mhandler.cmd_new = qmp_marshal_input_query_memdev,
3877 SQMP
3878 query-memdev
3879 ------------
3881 Show memory devices information.
3884 Example (1):
3886 -> { "execute": "query-memdev" }
3887 <- { "return": [
3889 "size": 536870912,
3890 "merge": false,
3891 "dump": true,
3892 "prealloc": false,
3893 "host-nodes": [0, 1],
3894 "policy": "bind"
3897 "size": 536870912,
3898 "merge": false,
3899 "dump": true,
3900 "prealloc": true,
3901 "host-nodes": [2, 3],
3902 "policy": "preferred"
3907 EQMP
3910 .name = "query-memory-devices",
3911 .args_type = "",
3912 .mhandler.cmd_new = qmp_marshal_input_query_memory_devices,
3915 SQMP
3916 @query-memory-devices
3917 --------------------
3919 Return a list of memory devices.
3921 Example:
3922 -> { "execute": "query-memory-devices" }
3923 <- { "return": [ { "data":
3924 { "addr": 5368709120,
3925 "hotpluggable": true,
3926 "hotplugged": true,
3927 "id": "d1",
3928 "memdev": "/objects/memX",
3929 "node": 0,
3930 "size": 1073741824,
3931 "slot": 0},
3932 "type": "dimm"
3933 } ] }
3934 EQMP
3937 .name = "query-acpi-ospm-status",
3938 .args_type = "",
3939 .mhandler.cmd_new = qmp_marshal_input_query_acpi_ospm_status,
3942 SQMP
3943 @query-acpi-ospm-status
3944 --------------------
3946 Return list of ACPIOSTInfo for devices that support status reporting
3947 via ACPI _OST method.
3949 Example:
3950 -> { "execute": "query-acpi-ospm-status" }
3951 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
3952 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
3953 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
3954 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
3956 EQMP
3958 #if defined TARGET_I386
3960 .name = "rtc-reset-reinjection",
3961 .args_type = "",
3962 .mhandler.cmd_new = qmp_marshal_input_rtc_reset_reinjection,
3964 #endif
3966 SQMP
3967 rtc-reset-reinjection
3968 ---------------------
3970 Reset the RTC interrupt reinjection backlog.
3972 Arguments: None.
3974 Example:
3976 -> { "execute": "rtc-reset-reinjection" }
3977 <- { "return": {} }
3978 EQMP
3981 .name = "trace-event-get-state",
3982 .args_type = "name:s",
3983 .mhandler.cmd_new = qmp_marshal_input_trace_event_get_state,
3986 SQMP
3987 trace-event-get-state
3988 ---------------------
3990 Query the state of events.
3992 Example:
3994 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
3995 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
3996 EQMP
3999 .name = "trace-event-set-state",
4000 .args_type = "name:s,enable:b,ignore-unavailable:b?",
4001 .mhandler.cmd_new = qmp_marshal_input_trace_event_set_state,
4004 SQMP
4005 trace-event-set-state
4006 ---------------------
4008 Set the state of events.
4010 Example:
4012 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
4013 <- { "return": {} }
4014 EQMP
4017 .name = "x-input-send-event",
4018 .args_type = "console:i?,events:q",
4019 .mhandler.cmd_new = qmp_marshal_input_x_input_send_event,
4022 SQMP
4023 @x-input-send-event
4024 -----------------
4026 Send input event to guest.
4028 Arguments:
4030 - "console": console index. (json-int, optional)
4031 - "events": list of input events.
4033 The consoles are visible in the qom tree, under
4034 /backend/console[$index]. They have a device link and head property, so
4035 it is possible to map which console belongs to which device and display.
4037 Note: this command is experimental, and not a stable API.
4039 Example (1):
4041 Press left mouse button.
4043 -> { "execute": "x-input-send-event",
4044 "arguments": { "console": 0,
4045 "events": [ { "type": "btn",
4046 "data" : { "down": true, "button": "Left" } } ] } }
4047 <- { "return": {} }
4049 -> { "execute": "x-input-send-event",
4050 "arguments": { "console": 0,
4051 "events": [ { "type": "btn",
4052 "data" : { "down": false, "button": "Left" } } ] } }
4053 <- { "return": {} }
4055 Example (2):
4057 Press ctrl-alt-del.
4059 -> { "execute": "x-input-send-event",
4060 "arguments": { "console": 0, "events": [
4061 { "type": "key", "data" : { "down": true,
4062 "key": {"type": "qcode", "data": "ctrl" } } },
4063 { "type": "key", "data" : { "down": true,
4064 "key": {"type": "qcode", "data": "alt" } } },
4065 { "type": "key", "data" : { "down": true,
4066 "key": {"type": "qcode", "data": "delete" } } } ] } }
4067 <- { "return": {} }
4069 Example (3):
4071 Move mouse pointer to absolute coordinates (20000, 400).
4073 -> { "execute": "x-input-send-event" ,
4074 "arguments": { "console": 0, "events": [
4075 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
4076 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
4077 <- { "return": {} }
4079 EQMP
4082 .name = "block-set-write-threshold",
4083 .args_type = "node-name:s,write-threshold:l",
4084 .mhandler.cmd_new = qmp_marshal_input_block_set_write_threshold,
4087 SQMP
4088 block-set-write-threshold
4089 ------------
4091 Change the write threshold for a block drive. The threshold is an offset,
4092 thus must be non-negative. Default is no write threshold.
4093 Setting the threshold to zero disables it.
4095 Arguments:
4097 - "node-name": the node name in the block driver state graph (json-string)
4098 - "write-threshold": the write threshold in bytes (json-int)
4100 Example:
4102 -> { "execute": "block-set-write-threshold",
4103 "arguments": { "node-name": "mydev",
4104 "write-threshold": 17179869184 } }
4105 <- { "return": {} }
4107 EQMP