nbd: Fix nbd_receive_options()
[qemu/ar7.git] / qmp-commands.hx
blob06639248f23b8c3b9f775cd4cd08815e79efe4da
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 .user_print = monitor_user_noop,
280 .mhandler.cmd_new = do_device_add,
283 SQMP
284 device_add
285 ----------
287 Add a device.
289 Arguments:
291 - "driver": the name of the new device's driver (json-string)
292 - "bus": the device's parent bus (device tree path, json-string, optional)
293 - "id": the device's ID, must be unique (json-string)
294 - device properties
296 Example:
298 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
299 <- { "return": {} }
301 Notes:
303 (1) For detailed information about this command, please refer to the
304 'docs/qdev-device-use.txt' file.
306 (2) It's possible to list device properties by running QEMU with the
307 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
309 EQMP
312 .name = "device_del",
313 .args_type = "id:s",
314 .mhandler.cmd_new = qmp_marshal_input_device_del,
317 SQMP
318 device_del
319 ----------
321 Remove a device.
323 Arguments:
325 - "id": the device's ID (json-string)
327 Example:
329 -> { "execute": "device_del", "arguments": { "id": "net1" } }
330 <- { "return": {} }
332 EQMP
335 .name = "send-key",
336 .args_type = "keys:O,hold-time:i?",
337 .mhandler.cmd_new = qmp_marshal_input_send_key,
340 SQMP
341 send-key
342 ----------
344 Send keys to VM.
346 Arguments:
348 keys array:
349 - "key": key sequence (a json-array of key union values,
350 union can be number or qcode enum)
352 - hold-time: time to delay key up events, milliseconds. Defaults to 100
353 (json-int, optional)
355 Example:
357 -> { "execute": "send-key",
358 "arguments": { "keys": [ { "type": "qcode", "data": "ctrl" },
359 { "type": "qcode", "data": "alt" },
360 { "type": "qcode", "data": "delete" } ] } }
361 <- { "return": {} }
363 EQMP
366 .name = "cpu",
367 .args_type = "index:i",
368 .mhandler.cmd_new = qmp_marshal_input_cpu,
371 SQMP
375 Set the default CPU.
377 Arguments:
379 - "index": the CPU's index (json-int)
381 Example:
383 -> { "execute": "cpu", "arguments": { "index": 0 } }
384 <- { "return": {} }
386 Note: CPUs' indexes are obtained with the 'query-cpus' command.
388 EQMP
391 .name = "cpu-add",
392 .args_type = "id:i",
393 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
396 SQMP
397 cpu-add
398 -------
400 Adds virtual cpu
402 Arguments:
404 - "id": cpu id (json-int)
406 Example:
408 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
409 <- { "return": {} }
411 EQMP
414 .name = "memsave",
415 .args_type = "val:l,size:i,filename:s,cpu:i?",
416 .mhandler.cmd_new = qmp_marshal_input_memsave,
419 SQMP
420 memsave
421 -------
423 Save to disk virtual memory dump starting at 'val' of size 'size'.
425 Arguments:
427 - "val": the starting address (json-int)
428 - "size": the memory size, in bytes (json-int)
429 - "filename": file path (json-string)
430 - "cpu": virtual CPU index (json-int, optional)
432 Example:
434 -> { "execute": "memsave",
435 "arguments": { "val": 10,
436 "size": 100,
437 "filename": "/tmp/virtual-mem-dump" } }
438 <- { "return": {} }
440 EQMP
443 .name = "pmemsave",
444 .args_type = "val:l,size:i,filename:s",
445 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
448 SQMP
449 pmemsave
450 --------
452 Save to disk physical memory dump starting at 'val' of size 'size'.
454 Arguments:
456 - "val": the starting address (json-int)
457 - "size": the memory size, in bytes (json-int)
458 - "filename": file path (json-string)
460 Example:
462 -> { "execute": "pmemsave",
463 "arguments": { "val": 10,
464 "size": 100,
465 "filename": "/tmp/physical-mem-dump" } }
466 <- { "return": {} }
468 EQMP
471 .name = "inject-nmi",
472 .args_type = "",
473 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
476 SQMP
477 inject-nmi
478 ----------
480 Inject an NMI on the default CPU (x86/s390) or all CPUs (ppc64).
482 Arguments: None.
484 Example:
486 -> { "execute": "inject-nmi" }
487 <- { "return": {} }
489 Note: inject-nmi fails when the guest doesn't support injecting.
491 EQMP
494 .name = "ringbuf-write",
495 .args_type = "device:s,data:s,format:s?",
496 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
499 SQMP
500 ringbuf-write
501 -------------
503 Write to a ring buffer character device.
505 Arguments:
507 - "device": ring buffer character device name (json-string)
508 - "data": data to write (json-string)
509 - "format": data format (json-string, optional)
510 - Possible values: "utf8" (default), "base64"
511 Bug: invalid base64 is currently not rejected.
512 Whitespace *is* invalid.
514 Example:
516 -> { "execute": "ringbuf-write",
517 "arguments": { "device": "foo",
518 "data": "abcdefgh",
519 "format": "utf8" } }
520 <- { "return": {} }
522 EQMP
525 .name = "ringbuf-read",
526 .args_type = "device:s,size:i,format:s?",
527 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
530 SQMP
531 ringbuf-read
532 -------------
534 Read from a ring buffer character device.
536 Arguments:
538 - "device": ring buffer character device name (json-string)
539 - "size": how many bytes to read at most (json-int)
540 - Number of data bytes, not number of characters in encoded data
541 - "format": data format (json-string, optional)
542 - Possible values: "utf8" (default), "base64"
543 - Naturally, format "utf8" works only when the ring buffer
544 contains valid UTF-8 text. Invalid UTF-8 sequences get
545 replaced. Bug: replacement doesn't work. Bug: can screw
546 up on encountering NUL characters, after the ring buffer
547 lost data, and when reading stops because the size limit
548 is reached.
550 Example:
552 -> { "execute": "ringbuf-read",
553 "arguments": { "device": "foo",
554 "size": 1000,
555 "format": "utf8" } }
556 <- {"return": "abcdefgh"}
558 EQMP
561 .name = "xen-save-devices-state",
562 .args_type = "filename:F",
563 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
566 SQMP
567 xen-save-devices-state
568 -------
570 Save the state of all devices to file. The RAM and the block devices
571 of the VM are not saved by this command.
573 Arguments:
575 - "filename": the file to save the state of the devices to as binary
576 data. See xen-save-devices-state.txt for a description of the binary
577 format.
579 Example:
581 -> { "execute": "xen-save-devices-state",
582 "arguments": { "filename": "/tmp/save" } }
583 <- { "return": {} }
585 EQMP
588 .name = "xen-set-global-dirty-log",
589 .args_type = "enable:b",
590 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
593 SQMP
594 xen-set-global-dirty-log
595 -------
597 Enable or disable the global dirty log mode.
599 Arguments:
601 - "enable": Enable it or disable it.
603 Example:
605 -> { "execute": "xen-set-global-dirty-log",
606 "arguments": { "enable": true } }
607 <- { "return": {} }
609 EQMP
612 .name = "migrate",
613 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
614 .mhandler.cmd_new = qmp_marshal_input_migrate,
617 SQMP
618 migrate
619 -------
621 Migrate to URI.
623 Arguments:
625 - "blk": block migration, full disk copy (json-bool, optional)
626 - "inc": incremental disk copy (json-bool, optional)
627 - "uri": Destination URI (json-string)
629 Example:
631 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
632 <- { "return": {} }
634 Notes:
636 (1) The 'query-migrate' command should be used to check migration's progress
637 and final result (this information is provided by the 'status' member)
638 (2) All boolean arguments default to false
639 (3) The user Monitor's "detach" argument is invalid in QMP and should not
640 be used
642 EQMP
645 .name = "migrate_cancel",
646 .args_type = "",
647 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
650 SQMP
651 migrate_cancel
652 --------------
654 Cancel the current migration.
656 Arguments: None.
658 Example:
660 -> { "execute": "migrate_cancel" }
661 <- { "return": {} }
663 EQMP
666 .name = "migrate-incoming",
667 .args_type = "uri:s",
668 .mhandler.cmd_new = qmp_marshal_input_migrate_incoming,
671 SQMP
672 migrate-incoming
673 ----------------
675 Continue an incoming migration
677 Arguments:
679 - "uri": Source/listening URI (json-string)
681 Example:
683 -> { "execute": "migrate-incoming", "arguments": { "uri": "tcp::4446" } }
684 <- { "return": {} }
686 Notes:
688 (1) QEMU must be started with -incoming defer to allow migrate-incoming to
689 be used
690 (2) The uri format is the same as to -incoming
692 EQMP
694 .name = "migrate-set-cache-size",
695 .args_type = "value:o",
696 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
699 SQMP
700 migrate-set-cache-size
701 ----------------------
703 Set cache size to be used by XBZRLE migration, the cache size will be rounded
704 down to the nearest power of 2
706 Arguments:
708 - "value": cache size in bytes (json-int)
710 Example:
712 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
713 <- { "return": {} }
715 EQMP
717 .name = "query-migrate-cache-size",
718 .args_type = "",
719 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
722 SQMP
723 query-migrate-cache-size
724 ------------------------
726 Show cache size to be used by XBZRLE migration
728 returns a json-object with the following information:
729 - "size" : json-int
731 Example:
733 -> { "execute": "query-migrate-cache-size" }
734 <- { "return": 67108864 }
736 EQMP
739 .name = "migrate_set_speed",
740 .args_type = "value:o",
741 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
744 SQMP
745 migrate_set_speed
746 -----------------
748 Set maximum speed for migrations.
750 Arguments:
752 - "value": maximum speed, in bytes per second (json-int)
754 Example:
756 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
757 <- { "return": {} }
759 EQMP
762 .name = "migrate_set_downtime",
763 .args_type = "value:T",
764 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
767 SQMP
768 migrate_set_downtime
769 --------------------
771 Set maximum tolerated downtime (in seconds) for migrations.
773 Arguments:
775 - "value": maximum downtime (json-number)
777 Example:
779 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
780 <- { "return": {} }
782 EQMP
785 .name = "client_migrate_info",
786 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
787 .params = "protocol hostname port tls-port cert-subject",
788 .help = "send migration info to spice/vnc client",
789 .user_print = monitor_user_noop,
790 .mhandler.cmd_async = client_migrate_info,
791 .flags = MONITOR_CMD_ASYNC,
794 SQMP
795 client_migrate_info
796 ------------------
798 Set the spice/vnc connection info for the migration target. The spice/vnc
799 server will ask the spice/vnc client to automatically reconnect using the
800 new parameters (if specified) once the vm migration finished successfully.
802 Arguments:
804 - "protocol": protocol: "spice" or "vnc" (json-string)
805 - "hostname": migration target hostname (json-string)
806 - "port": spice/vnc tcp port for plaintext channels (json-int, optional)
807 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
808 - "cert-subject": server certificate subject (json-string, optional)
810 Example:
812 -> { "execute": "client_migrate_info",
813 "arguments": { "protocol": "spice",
814 "hostname": "virt42.lab.kraxel.org",
815 "port": 1234 } }
816 <- { "return": {} }
818 EQMP
821 .name = "dump-guest-memory",
822 .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
823 .params = "-p protocol [begin] [length] [format]",
824 .help = "dump guest memory to file",
825 .user_print = monitor_user_noop,
826 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
829 SQMP
830 dump
833 Dump guest memory to file. The file can be processed with crash or gdb.
835 Arguments:
837 - "paging": do paging to get guest's memory mapping (json-bool)
838 - "protocol": destination file(started with "file:") or destination file
839 descriptor (started with "fd:") (json-string)
840 - "begin": the starting physical address. It's optional, and should be specified
841 with length together (json-int)
842 - "length": the memory size, in bytes. It's optional, and should be specified
843 with begin together (json-int)
844 - "format": the format of guest memory dump. It's optional, and can be
845 elf|kdump-zlib|kdump-lzo|kdump-snappy, but non-elf formats will
846 conflict with paging and filter, ie. begin and length (json-string)
848 Example:
850 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
851 <- { "return": {} }
853 Notes:
855 (1) All boolean arguments default to false
857 EQMP
860 .name = "query-dump-guest-memory-capability",
861 .args_type = "",
862 .mhandler.cmd_new = qmp_marshal_input_query_dump_guest_memory_capability,
865 SQMP
866 query-dump-guest-memory-capability
867 ----------
869 Show available formats for 'dump-guest-memory'
871 Example:
873 -> { "execute": "query-dump-guest-memory-capability" }
874 <- { "return": { "formats":
875 ["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
877 EQMP
880 .name = "netdev_add",
881 .args_type = "netdev:O",
882 .mhandler.cmd_new = qmp_netdev_add,
885 SQMP
886 netdev_add
887 ----------
889 Add host network device.
891 Arguments:
893 - "type": the device type, "tap", "user", ... (json-string)
894 - "id": the device's ID, must be unique (json-string)
895 - device options
897 Example:
899 -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
900 <- { "return": {} }
902 Note: The supported device options are the same ones supported by the '-netdev'
903 command-line argument, which are listed in the '-help' output or QEMU's
904 manual
906 EQMP
909 .name = "netdev_del",
910 .args_type = "id:s",
911 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
914 SQMP
915 netdev_del
916 ----------
918 Remove host network device.
920 Arguments:
922 - "id": the device's ID, must be unique (json-string)
924 Example:
926 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
927 <- { "return": {} }
930 EQMP
933 .name = "object-add",
934 .args_type = "qom-type:s,id:s,props:q?",
935 .mhandler.cmd_new = qmp_object_add,
938 SQMP
939 object-add
940 ----------
942 Create QOM object.
944 Arguments:
946 - "qom-type": the object's QOM type, i.e. the class name (json-string)
947 - "id": the object's ID, must be unique (json-string)
948 - "props": a dictionary of object property values (optional, json-dict)
950 Example:
952 -> { "execute": "object-add", "arguments": { "qom-type": "rng-random", "id": "rng1",
953 "props": { "filename": "/dev/hwrng" } } }
954 <- { "return": {} }
956 EQMP
959 .name = "object-del",
960 .args_type = "id:s",
961 .mhandler.cmd_new = qmp_marshal_input_object_del,
964 SQMP
965 object-del
966 ----------
968 Remove QOM object.
970 Arguments:
972 - "id": the object's ID (json-string)
974 Example:
976 -> { "execute": "object-del", "arguments": { "id": "rng1" } }
977 <- { "return": {} }
980 EQMP
984 .name = "block_resize",
985 .args_type = "device:s?,node-name:s?,size:o",
986 .mhandler.cmd_new = qmp_marshal_input_block_resize,
989 SQMP
990 block_resize
991 ------------
993 Resize a block image while a guest is running.
995 Arguments:
997 - "device": the device's ID, must be unique (json-string)
998 - "node-name": the node name in the block driver state graph (json-string)
999 - "size": new size
1001 Example:
1003 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
1004 <- { "return": {} }
1006 EQMP
1009 .name = "block-stream",
1010 .args_type = "device:B,base:s?,speed:o?,backing-file:s?,on-error:s?",
1011 .mhandler.cmd_new = qmp_marshal_input_block_stream,
1015 .name = "block-commit",
1016 .args_type = "device:B,base:s?,top:s?,backing-file:s?,speed:o?",
1017 .mhandler.cmd_new = qmp_marshal_input_block_commit,
1020 SQMP
1021 block-commit
1022 ------------
1024 Live commit of data from overlay image nodes into backing nodes - i.e., writes
1025 data between 'top' and 'base' into 'base'.
1027 Arguments:
1029 - "device": The device's ID, must be unique (json-string)
1030 - "base": The file name of the backing image to write data into.
1031 If not specified, this is the deepest backing image
1032 (json-string, optional)
1033 - "top": The file name of the backing image within the image chain,
1034 which contains the topmost data to be committed down. If
1035 not specified, this is the active layer. (json-string, optional)
1037 - backing-file: The backing file string to write into the overlay
1038 image of 'top'. If 'top' is the active layer,
1039 specifying a backing file string is an error. This
1040 filename is not validated.
1042 If a pathname string is such that it cannot be
1043 resolved by QEMU, that means that subsequent QMP or
1044 HMP commands must use node-names for the image in
1045 question, as filename lookup methods will fail.
1047 If not specified, QEMU will automatically determine
1048 the backing file string to use, or error out if
1049 there is no obvious choice. Care should be taken
1050 when specifying the string, to specify a valid
1051 filename or protocol.
1052 (json-string, optional) (Since 2.1)
1054 If top == base, that is an error.
1055 If top == active, the job will not be completed by itself,
1056 user needs to complete the job with the block-job-complete
1057 command after getting the ready event. (Since 2.0)
1059 If the base image is smaller than top, then the base image
1060 will be resized to be the same size as top. If top is
1061 smaller than the base image, the base will not be
1062 truncated. If you want the base image size to match the
1063 size of the smaller top, you can safely truncate it
1064 yourself once the commit operation successfully completes.
1065 (json-string)
1066 - "speed": the maximum speed, in bytes per second (json-int, optional)
1069 Example:
1071 -> { "execute": "block-commit", "arguments": { "device": "virtio0",
1072 "top": "/tmp/snap1.qcow2" } }
1073 <- { "return": {} }
1075 EQMP
1078 .name = "drive-backup",
1079 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1080 "on-source-error:s?,on-target-error:s?",
1081 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
1084 SQMP
1085 drive-backup
1086 ------------
1088 Start a point-in-time copy of a block device to a new destination. The
1089 status of ongoing drive-backup operations can be checked with
1090 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1091 The operation can be stopped before it has completed using the
1092 block-job-cancel command.
1094 Arguments:
1096 - "device": the name of the device which should be copied.
1097 (json-string)
1098 - "target": the target of the new image. If the file exists, or if it is a
1099 device, the existing file/device will be used as the new
1100 destination. If it does not exist, a new file will be created.
1101 (json-string)
1102 - "format": the format of the new destination, default is to probe if 'mode' is
1103 'existing', else the format of the source
1104 (json-string, optional)
1105 - "sync": what parts of the disk image should be copied to the destination;
1106 possibilities include "full" for all the disk, "top" for only the sectors
1107 allocated in the topmost image, or "none" to only replicate new I/O
1108 (MirrorSyncMode).
1109 - "mode": whether and how QEMU should create a new image
1110 (NewImageMode, optional, default 'absolute-paths')
1111 - "speed": the maximum speed, in bytes per second (json-int, optional)
1112 - "on-source-error": the action to take on an error on the source, default
1113 'report'. 'stop' and 'enospc' can only be used
1114 if the block device supports io-status.
1115 (BlockdevOnError, optional)
1116 - "on-target-error": the action to take on an error on the target, default
1117 'report' (no limitations, since this applies to
1118 a different block device than device).
1119 (BlockdevOnError, optional)
1121 Example:
1122 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
1123 "sync": "full",
1124 "target": "backup.img" } }
1125 <- { "return": {} }
1127 EQMP
1130 .name = "blockdev-backup",
1131 .args_type = "sync:s,device:B,target:B,speed:i?,"
1132 "on-source-error:s?,on-target-error:s?",
1133 .mhandler.cmd_new = qmp_marshal_input_blockdev_backup,
1136 SQMP
1137 blockdev-backup
1138 ---------------
1140 The device version of drive-backup: this command takes an existing named device
1141 as backup target.
1143 Arguments:
1145 - "device": the name of the device which should be copied.
1146 (json-string)
1147 - "target": the name of the backup target device. (json-string)
1148 - "sync": what parts of the disk image should be copied to the destination;
1149 possibilities include "full" for all the disk, "top" for only the
1150 sectors allocated in the topmost image, or "none" to only replicate
1151 new I/O (MirrorSyncMode).
1152 - "speed": the maximum speed, in bytes per second (json-int, optional)
1153 - "on-source-error": the action to take on an error on the source, default
1154 'report'. 'stop' and 'enospc' can only be used
1155 if the block device supports io-status.
1156 (BlockdevOnError, optional)
1157 - "on-target-error": the action to take on an error on the target, default
1158 'report' (no limitations, since this applies to
1159 a different block device than device).
1160 (BlockdevOnError, optional)
1162 Example:
1163 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
1164 "sync": "full",
1165 "target": "tgt-id" } }
1166 <- { "return": {} }
1168 EQMP
1171 .name = "block-job-set-speed",
1172 .args_type = "device:B,speed:o",
1173 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
1177 .name = "block-job-cancel",
1178 .args_type = "device:B,force:b?",
1179 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
1182 .name = "block-job-pause",
1183 .args_type = "device:B",
1184 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
1187 .name = "block-job-resume",
1188 .args_type = "device:B",
1189 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
1192 .name = "block-job-complete",
1193 .args_type = "device:B",
1194 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
1197 .name = "transaction",
1198 .args_type = "actions:q",
1199 .mhandler.cmd_new = qmp_marshal_input_transaction,
1202 SQMP
1203 transaction
1204 -----------
1206 Atomically operate on one or more block devices. The only supported operations
1207 for now are drive-backup, internal and external snapshotting. A list of
1208 dictionaries is accepted, that contains the actions to be performed.
1209 If there is any failure performing any of the operations, all operations
1210 for the group are abandoned.
1212 For external snapshots, the dictionary contains the device, the file to use for
1213 the new snapshot, and the format. The default format, if not specified, is
1214 qcow2.
1216 Each new snapshot defaults to being created by QEMU (wiping any
1217 contents if the file already exists), but it is also possible to reuse
1218 an externally-created file. In the latter case, you should ensure that
1219 the new image file has the same contents as the current one; QEMU cannot
1220 perform any meaningful check. Typically this is achieved by using the
1221 current image file as the backing file for the new image.
1223 On failure, the original disks pre-snapshot attempt will be used.
1225 For internal snapshots, the dictionary contains the device and the snapshot's
1226 name. If an internal snapshot matching name already exists, the request will
1227 be rejected. Only some image formats support it, for example, qcow2, rbd,
1228 and sheepdog.
1230 On failure, qemu will try delete the newly created internal snapshot in the
1231 transaction. When an I/O error occurs during deletion, the user needs to fix
1232 it later with qemu-img or other command.
1234 Arguments:
1236 actions array:
1237 - "type": the operation to perform. The only supported
1238 value is "blockdev-snapshot-sync". (json-string)
1239 - "data": a dictionary. The contents depend on the value
1240 of "type". When "type" is "blockdev-snapshot-sync":
1241 - "device": device name to snapshot (json-string)
1242 - "node-name": graph node name to snapshot (json-string)
1243 - "snapshot-file": name of new image file (json-string)
1244 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1245 - "format": format of new image (json-string, optional)
1246 - "mode": whether and how QEMU should create the snapshot file
1247 (NewImageMode, optional, default "absolute-paths")
1248 When "type" is "blockdev-snapshot-internal-sync":
1249 - "device": device name to snapshot (json-string)
1250 - "name": name of the new snapshot (json-string)
1252 Example:
1254 -> { "execute": "transaction",
1255 "arguments": { "actions": [
1256 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd0",
1257 "snapshot-file": "/some/place/my-image",
1258 "format": "qcow2" } },
1259 { "type": "blockdev-snapshot-sync", "data" : { "node-name": "myfile",
1260 "snapshot-file": "/some/place/my-image2",
1261 "snapshot-node-name": "node3432",
1262 "mode": "existing",
1263 "format": "qcow2" } },
1264 { "type": "blockdev-snapshot-sync", "data" : { "device": "ide-hd1",
1265 "snapshot-file": "/some/place/my-image2",
1266 "mode": "existing",
1267 "format": "qcow2" } },
1268 { "type": "blockdev-snapshot-internal-sync", "data" : {
1269 "device": "ide-hd2",
1270 "name": "snapshot0" } } ] } }
1271 <- { "return": {} }
1273 EQMP
1276 .name = "blockdev-snapshot-sync",
1277 .args_type = "device:s?,node-name:s?,snapshot-file:s,snapshot-node-name:s?,format:s?,mode:s?",
1278 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
1281 SQMP
1282 blockdev-snapshot-sync
1283 ----------------------
1285 Synchronous snapshot of a block device. snapshot-file specifies the
1286 target of the new image. If the file exists, or if it is a device, the
1287 snapshot will be created in the existing file/device. If does not
1288 exist, a new file will be created. format specifies the format of the
1289 snapshot image, default is qcow2.
1291 Arguments:
1293 - "device": device name to snapshot (json-string)
1294 - "node-name": graph node name to snapshot (json-string)
1295 - "snapshot-file": name of new image file (json-string)
1296 - "snapshot-node-name": graph node name of the new snapshot (json-string)
1297 - "mode": whether and how QEMU should create the snapshot file
1298 (NewImageMode, optional, default "absolute-paths")
1299 - "format": format of new image (json-string, optional)
1301 Example:
1303 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1304 "snapshot-file":
1305 "/some/place/my-image",
1306 "format": "qcow2" } }
1307 <- { "return": {} }
1309 EQMP
1312 .name = "blockdev-snapshot-internal-sync",
1313 .args_type = "device:B,name:s",
1314 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_internal_sync,
1317 SQMP
1318 blockdev-snapshot-internal-sync
1319 -------------------------------
1321 Synchronously take an internal snapshot of a block device when the format of
1322 image used supports it. If the name is an empty string, or a snapshot with
1323 name already exists, the operation will fail.
1325 Arguments:
1327 - "device": device name to snapshot (json-string)
1328 - "name": name of the new snapshot (json-string)
1330 Example:
1332 -> { "execute": "blockdev-snapshot-internal-sync",
1333 "arguments": { "device": "ide-hd0",
1334 "name": "snapshot0" }
1336 <- { "return": {} }
1338 EQMP
1341 .name = "blockdev-snapshot-delete-internal-sync",
1342 .args_type = "device:B,id:s?,name:s?",
1343 .mhandler.cmd_new =
1344 qmp_marshal_input_blockdev_snapshot_delete_internal_sync,
1347 SQMP
1348 blockdev-snapshot-delete-internal-sync
1349 --------------------------------------
1351 Synchronously delete an internal snapshot of a block device when the format of
1352 image used supports it. The snapshot is identified by name or id or both. One
1353 of name or id is required. If the snapshot is not found, the operation will
1354 fail.
1356 Arguments:
1358 - "device": device name (json-string)
1359 - "id": ID of the snapshot (json-string, optional)
1360 - "name": name of the snapshot (json-string, optional)
1362 Example:
1364 -> { "execute": "blockdev-snapshot-delete-internal-sync",
1365 "arguments": { "device": "ide-hd0",
1366 "name": "snapshot0" }
1368 <- { "return": {
1369 "id": "1",
1370 "name": "snapshot0",
1371 "vm-state-size": 0,
1372 "date-sec": 1000012,
1373 "date-nsec": 10,
1374 "vm-clock-sec": 100,
1375 "vm-clock-nsec": 20
1379 EQMP
1382 .name = "drive-mirror",
1383 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1384 "node-name:s?,replaces:s?,"
1385 "on-source-error:s?,on-target-error:s?,"
1386 "granularity:i?,buf-size:i?",
1387 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1390 SQMP
1391 drive-mirror
1392 ------------
1394 Start mirroring a block device's writes to a new destination. target
1395 specifies the target of the new image. If the file exists, or if it is
1396 a device, it will be used as the new destination for writes. If it does not
1397 exist, a new file will be created. format specifies the format of the
1398 mirror image, default is to probe if mode='existing', else the format
1399 of the source.
1401 Arguments:
1403 - "device": device name to operate on (json-string)
1404 - "target": name of new image file (json-string)
1405 - "format": format of new image (json-string, optional)
1406 - "node-name": the name of the new block driver state in the node graph
1407 (json-string, optional)
1408 - "replaces": the block driver node name to replace when finished
1409 (json-string, optional)
1410 - "mode": how an image file should be created into the target
1411 file/device (NewImageMode, optional, default 'absolute-paths')
1412 - "speed": maximum speed of the streaming job, in bytes per second
1413 (json-int)
1414 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1415 - "buf_size": maximum amount of data in flight from source to target, in bytes
1416 (json-int, default 10M)
1417 - "sync": what parts of the disk image should be copied to the destination;
1418 possibilities include "full" for all the disk, "top" for only the sectors
1419 allocated in the topmost image, or "none" to only replicate new I/O
1420 (MirrorSyncMode).
1421 - "on-source-error": the action to take on an error on the source
1422 (BlockdevOnError, default 'report')
1423 - "on-target-error": the action to take on an error on the target
1424 (BlockdevOnError, default 'report')
1426 The default value of the granularity is the image cluster size clamped
1427 between 4096 and 65536, if the image format defines one. If the format
1428 does not define a cluster size, the default value of the granularity
1429 is 65536.
1432 Example:
1434 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1435 "target": "/some/place/my-image",
1436 "sync": "full",
1437 "format": "qcow2" } }
1438 <- { "return": {} }
1440 EQMP
1443 .name = "change-backing-file",
1444 .args_type = "device:s,image-node-name:s,backing-file:s",
1445 .mhandler.cmd_new = qmp_marshal_input_change_backing_file,
1448 SQMP
1449 change-backing-file
1450 -------------------
1451 Since: 2.1
1453 Change the backing file in the image file metadata. This does not cause
1454 QEMU to reopen the image file to reparse the backing filename (it may,
1455 however, perform a reopen to change permissions from r/o -> r/w -> r/o,
1456 if needed). The new backing file string is written into the image file
1457 metadata, and the QEMU internal strings are updated.
1459 Arguments:
1461 - "image-node-name": The name of the block driver state node of the
1462 image to modify. The "device" is argument is used to
1463 verify "image-node-name" is in the chain described by
1464 "device".
1465 (json-string, optional)
1467 - "device": The name of the device.
1468 (json-string)
1470 - "backing-file": The string to write as the backing file. This string is
1471 not validated, so care should be taken when specifying
1472 the string or the image chain may not be able to be
1473 reopened again.
1474 (json-string)
1476 Returns: Nothing on success
1477 If "device" does not exist or cannot be determined, DeviceNotFound
1479 EQMP
1482 .name = "balloon",
1483 .args_type = "value:M",
1484 .mhandler.cmd_new = qmp_marshal_input_balloon,
1487 SQMP
1488 balloon
1489 -------
1491 Request VM to change its memory allocation (in bytes).
1493 Arguments:
1495 - "value": New memory allocation (json-int)
1497 Example:
1499 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1500 <- { "return": {} }
1502 EQMP
1505 .name = "set_link",
1506 .args_type = "name:s,up:b",
1507 .mhandler.cmd_new = qmp_marshal_input_set_link,
1510 SQMP
1511 set_link
1512 --------
1514 Change the link status of a network adapter.
1516 Arguments:
1518 - "name": network device name (json-string)
1519 - "up": status is up (json-bool)
1521 Example:
1523 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1524 <- { "return": {} }
1526 EQMP
1529 .name = "getfd",
1530 .args_type = "fdname:s",
1531 .params = "getfd name",
1532 .help = "receive a file descriptor via SCM rights and assign it a name",
1533 .mhandler.cmd_new = qmp_marshal_input_getfd,
1536 SQMP
1537 getfd
1538 -----
1540 Receive a file descriptor via SCM rights and assign it a name.
1542 Arguments:
1544 - "fdname": file descriptor name (json-string)
1546 Example:
1548 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1549 <- { "return": {} }
1551 Notes:
1553 (1) If the name specified by the "fdname" argument already exists,
1554 the file descriptor assigned to it will be closed and replaced
1555 by the received file descriptor.
1556 (2) The 'closefd' command can be used to explicitly close the file
1557 descriptor when it is no longer needed.
1559 EQMP
1562 .name = "closefd",
1563 .args_type = "fdname:s",
1564 .params = "closefd name",
1565 .help = "close a file descriptor previously passed via SCM rights",
1566 .mhandler.cmd_new = qmp_marshal_input_closefd,
1569 SQMP
1570 closefd
1571 -------
1573 Close a file descriptor previously passed via SCM rights.
1575 Arguments:
1577 - "fdname": file descriptor name (json-string)
1579 Example:
1581 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1582 <- { "return": {} }
1584 EQMP
1587 .name = "add-fd",
1588 .args_type = "fdset-id:i?,opaque:s?",
1589 .params = "add-fd fdset-id opaque",
1590 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1591 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1594 SQMP
1595 add-fd
1596 -------
1598 Add a file descriptor, that was passed via SCM rights, to an fd set.
1600 Arguments:
1602 - "fdset-id": The ID of the fd set to add the file descriptor to.
1603 (json-int, optional)
1604 - "opaque": A free-form string that can be used to describe the fd.
1605 (json-string, optional)
1607 Return a json-object with the following information:
1609 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1610 - "fd": The file descriptor that was received via SCM rights and added to the
1611 fd set. (json-int)
1613 Example:
1615 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1616 <- { "return": { "fdset-id": 1, "fd": 3 } }
1618 Notes:
1620 (1) The list of fd sets is shared by all monitor connections.
1621 (2) If "fdset-id" is not specified, a new fd set will be created.
1623 EQMP
1626 .name = "remove-fd",
1627 .args_type = "fdset-id:i,fd:i?",
1628 .params = "remove-fd fdset-id fd",
1629 .help = "Remove a file descriptor from an fd set",
1630 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1633 SQMP
1634 remove-fd
1635 ---------
1637 Remove a file descriptor from an fd set.
1639 Arguments:
1641 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1642 (json-int)
1643 - "fd": The file descriptor that is to be removed. (json-int, optional)
1645 Example:
1647 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1648 <- { "return": {} }
1650 Notes:
1652 (1) The list of fd sets is shared by all monitor connections.
1653 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1654 removed.
1656 EQMP
1659 .name = "query-fdsets",
1660 .args_type = "",
1661 .help = "Return information describing all fd sets",
1662 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1665 SQMP
1666 query-fdsets
1667 -------------
1669 Return information describing all fd sets.
1671 Arguments: None
1673 Example:
1675 -> { "execute": "query-fdsets" }
1676 <- { "return": [
1678 "fds": [
1680 "fd": 30,
1681 "opaque": "rdonly:/path/to/file"
1684 "fd": 24,
1685 "opaque": "rdwr:/path/to/file"
1688 "fdset-id": 1
1691 "fds": [
1693 "fd": 28
1696 "fd": 29
1699 "fdset-id": 0
1704 Note: The list of fd sets is shared by all monitor connections.
1706 EQMP
1709 .name = "block_passwd",
1710 .args_type = "device:s?,node-name:s?,password:s",
1711 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1714 SQMP
1715 block_passwd
1716 ------------
1718 Set the password of encrypted block devices.
1720 Arguments:
1722 - "device": device name (json-string)
1723 - "node-name": name in the block driver state graph (json-string)
1724 - "password": password (json-string)
1726 Example:
1728 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1729 "password": "12345" } }
1730 <- { "return": {} }
1732 EQMP
1735 .name = "block_set_io_throttle",
1736 .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?",
1737 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1740 SQMP
1741 block_set_io_throttle
1742 ------------
1744 Change I/O throttle limits for a block drive.
1746 Arguments:
1748 - "device": device name (json-string)
1749 - "bps": total throughput limit in bytes per second (json-int)
1750 - "bps_rd": read throughput limit in bytes per second (json-int)
1751 - "bps_wr": write throughput limit in bytes per second (json-int)
1752 - "iops": total I/O operations per second (json-int)
1753 - "iops_rd": read I/O operations per second (json-int)
1754 - "iops_wr": write I/O operations per second (json-int)
1755 - "bps_max": total max in bytes (json-int)
1756 - "bps_rd_max": read max in bytes (json-int)
1757 - "bps_wr_max": write max in bytes (json-int)
1758 - "iops_max": total I/O operations max (json-int)
1759 - "iops_rd_max": read I/O operations max (json-int)
1760 - "iops_wr_max": write I/O operations max (json-int)
1761 - "iops_size": I/O size in bytes when limiting (json-int)
1763 Example:
1765 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1766 "bps": 1000000,
1767 "bps_rd": 0,
1768 "bps_wr": 0,
1769 "iops": 0,
1770 "iops_rd": 0,
1771 "iops_wr": 0,
1772 "bps_max": 8000000,
1773 "bps_rd_max": 0,
1774 "bps_wr_max": 0,
1775 "iops_max": 0,
1776 "iops_rd_max": 0,
1777 "iops_wr_max": 0,
1778 "iops_size": 0 } }
1779 <- { "return": {} }
1781 EQMP
1784 .name = "set_password",
1785 .args_type = "protocol:s,password:s,connected:s?",
1786 .mhandler.cmd_new = qmp_marshal_input_set_password,
1789 SQMP
1790 set_password
1791 ------------
1793 Set the password for vnc/spice protocols.
1795 Arguments:
1797 - "protocol": protocol name (json-string)
1798 - "password": password (json-string)
1799 - "connected": [ keep | disconnect | fail ] (json-string, optional)
1801 Example:
1803 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
1804 "password": "secret" } }
1805 <- { "return": {} }
1807 EQMP
1810 .name = "expire_password",
1811 .args_type = "protocol:s,time:s",
1812 .mhandler.cmd_new = qmp_marshal_input_expire_password,
1815 SQMP
1816 expire_password
1817 ---------------
1819 Set the password expire time for vnc/spice protocols.
1821 Arguments:
1823 - "protocol": protocol name (json-string)
1824 - "time": [ now | never | +secs | secs ] (json-string)
1826 Example:
1828 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1829 "time": "+60" } }
1830 <- { "return": {} }
1832 EQMP
1835 .name = "add_client",
1836 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1837 .mhandler.cmd_new = qmp_marshal_input_add_client,
1840 SQMP
1841 add_client
1842 ----------
1844 Add a graphics client
1846 Arguments:
1848 - "protocol": protocol name (json-string)
1849 - "fdname": file descriptor name (json-string)
1850 - "skipauth": whether to skip authentication (json-bool, optional)
1851 - "tls": whether to perform TLS (json-bool, optional)
1853 Example:
1855 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
1856 "fdname": "myclient" } }
1857 <- { "return": {} }
1859 EQMP
1861 .name = "qmp_capabilities",
1862 .args_type = "",
1863 .params = "",
1864 .help = "enable QMP capabilities",
1865 .user_print = monitor_user_noop,
1866 .mhandler.cmd_new = do_qmp_capabilities,
1869 SQMP
1870 qmp_capabilities
1871 ----------------
1873 Enable QMP capabilities.
1875 Arguments: None.
1877 Example:
1879 -> { "execute": "qmp_capabilities" }
1880 <- { "return": {} }
1882 Note: This command must be issued before issuing any other command.
1884 EQMP
1887 .name = "human-monitor-command",
1888 .args_type = "command-line:s,cpu-index:i?",
1889 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
1892 SQMP
1893 human-monitor-command
1894 ---------------------
1896 Execute a Human Monitor command.
1898 Arguments:
1900 - command-line: the command name and its arguments, just like the
1901 Human Monitor's shell (json-string)
1902 - cpu-index: select the CPU number to be used by commands which access CPU
1903 data, like 'info registers'. The Monitor selects CPU 0 if this
1904 argument is not provided (json-int, optional)
1906 Example:
1908 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1909 <- { "return": "kvm support: enabled\r\n" }
1911 Notes:
1913 (1) The Human Monitor is NOT an stable interface, this means that command
1914 names, arguments and responses can change or be removed at ANY time.
1915 Applications that rely on long term stability guarantees should NOT
1916 use this command
1918 (2) Limitations:
1920 o This command is stateless, this means that commands that depend
1921 on state information (such as getfd) might not work
1923 o Commands that prompt the user for data (eg. 'cont' when the block
1924 device is encrypted) don't currently work
1926 3. Query Commands
1927 =================
1929 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1930 HXCOMM this! We will possibly move query commands definitions inside those
1931 HXCOMM sections, just like regular commands.
1933 EQMP
1935 SQMP
1936 query-version
1937 -------------
1939 Show QEMU version.
1941 Return a json-object with the following information:
1943 - "qemu": A json-object containing three integer values:
1944 - "major": QEMU's major version (json-int)
1945 - "minor": QEMU's minor version (json-int)
1946 - "micro": QEMU's micro version (json-int)
1947 - "package": package's version (json-string)
1949 Example:
1951 -> { "execute": "query-version" }
1952 <- {
1953 "return":{
1954 "qemu":{
1955 "major":0,
1956 "minor":11,
1957 "micro":5
1959 "package":""
1963 EQMP
1966 .name = "query-version",
1967 .args_type = "",
1968 .mhandler.cmd_new = qmp_marshal_input_query_version,
1971 SQMP
1972 query-commands
1973 --------------
1975 List QMP available commands.
1977 Each command is represented by a json-object, the returned value is a json-array
1978 of all commands.
1980 Each json-object contain:
1982 - "name": command's name (json-string)
1984 Example:
1986 -> { "execute": "query-commands" }
1987 <- {
1988 "return":[
1990 "name":"query-balloon"
1993 "name":"system_powerdown"
1998 Note: This example has been shortened as the real response is too long.
2000 EQMP
2003 .name = "query-commands",
2004 .args_type = "",
2005 .mhandler.cmd_new = qmp_marshal_input_query_commands,
2008 SQMP
2009 query-events
2010 --------------
2012 List QMP available events.
2014 Each event is represented by a json-object, the returned value is a json-array
2015 of all events.
2017 Each json-object contains:
2019 - "name": event's name (json-string)
2021 Example:
2023 -> { "execute": "query-events" }
2024 <- {
2025 "return":[
2027 "name":"SHUTDOWN"
2030 "name":"RESET"
2035 Note: This example has been shortened as the real response is too long.
2037 EQMP
2040 .name = "query-events",
2041 .args_type = "",
2042 .mhandler.cmd_new = qmp_marshal_input_query_events,
2045 SQMP
2046 query-chardev
2047 -------------
2049 Each device is represented by a json-object. The returned value is a json-array
2050 of all devices.
2052 Each json-object contain the following:
2054 - "label": device's label (json-string)
2055 - "filename": device's file (json-string)
2056 - "frontend-open": open/closed state of the frontend device attached to this
2057 backend (json-bool)
2059 Example:
2061 -> { "execute": "query-chardev" }
2062 <- {
2063 "return": [
2065 "label": "charchannel0",
2066 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.agent,server",
2067 "frontend-open": false
2070 "label": "charmonitor",
2071 "filename": "unix:/var/lib/libvirt/qemu/seabios.rhel6.monitor,server",
2072 "frontend-open": true
2075 "label": "charserial0",
2076 "filename": "pty:/dev/pts/2",
2077 "frontend-open": true
2082 EQMP
2085 .name = "query-chardev",
2086 .args_type = "",
2087 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
2090 SQMP
2091 query-chardev-backends
2092 -------------
2094 List available character device backends.
2096 Each backend is represented by a json-object, the returned value is a json-array
2097 of all backends.
2099 Each json-object contains:
2101 - "name": backend name (json-string)
2103 Example:
2105 -> { "execute": "query-chardev-backends" }
2106 <- {
2107 "return":[
2109 "name":"udp"
2112 "name":"tcp"
2115 "name":"unix"
2118 "name":"spiceport"
2123 EQMP
2126 .name = "query-chardev-backends",
2127 .args_type = "",
2128 .mhandler.cmd_new = qmp_marshal_input_query_chardev_backends,
2131 SQMP
2132 query-block
2133 -----------
2135 Show the block devices.
2137 Each block device information is stored in a json-object and the returned value
2138 is a json-array of all devices.
2140 Each json-object contain the following:
2142 - "device": device name (json-string)
2143 - "type": device type (json-string)
2144 - deprecated, retained for backward compatibility
2145 - Possible values: "unknown"
2146 - "removable": true if the device is removable, false otherwise (json-bool)
2147 - "locked": true if the device is locked, false otherwise (json-bool)
2148 - "tray_open": only present if removable, true if the device has a tray,
2149 and it is open (json-bool)
2150 - "inserted": only present if the device is inserted, it is a json-object
2151 containing the following:
2152 - "file": device file name (json-string)
2153 - "ro": true if read-only, false otherwise (json-bool)
2154 - "drv": driver format name (json-string)
2155 - Possible values: "blkdebug", "bochs", "cloop", "dmg",
2156 "file", "file", "ftp", "ftps", "host_cdrom",
2157 "host_device", "host_floppy", "http", "https",
2158 "nbd", "parallels", "qcow", "qcow2", "raw",
2159 "tftp", "vdi", "vmdk", "vpc", "vvfat"
2160 - "backing_file": backing file name (json-string, optional)
2161 - "backing_file_depth": number of files in the backing file chain (json-int)
2162 - "encrypted": true if encrypted, false otherwise (json-bool)
2163 - "bps": limit total bytes per second (json-int)
2164 - "bps_rd": limit read bytes per second (json-int)
2165 - "bps_wr": limit write bytes per second (json-int)
2166 - "iops": limit total I/O operations per second (json-int)
2167 - "iops_rd": limit read operations per second (json-int)
2168 - "iops_wr": limit write operations per second (json-int)
2169 - "bps_max": total max in bytes (json-int)
2170 - "bps_rd_max": read max in bytes (json-int)
2171 - "bps_wr_max": write max in bytes (json-int)
2172 - "iops_max": total I/O operations max (json-int)
2173 - "iops_rd_max": read I/O operations max (json-int)
2174 - "iops_wr_max": write I/O operations max (json-int)
2175 - "iops_size": I/O size when limiting by iops (json-int)
2176 - "detect_zeroes": detect and optimize zero writing (json-string)
2177 - Possible values: "off", "on", "unmap"
2178 - "write_threshold": write offset threshold in bytes, a event will be
2179 emitted if crossed. Zero if disabled (json-int)
2180 - "image": the detail of the image, it is a json-object containing
2181 the following:
2182 - "filename": image file name (json-string)
2183 - "format": image format (json-string)
2184 - "virtual-size": image capacity in bytes (json-int)
2185 - "dirty-flag": true if image is not cleanly closed, not present
2186 means clean (json-bool, optional)
2187 - "actual-size": actual size on disk in bytes of the image, not
2188 present when image does not support thin
2189 provision (json-int, optional)
2190 - "cluster-size": size of a cluster in bytes, not present if image
2191 format does not support it (json-int, optional)
2192 - "encrypted": true if the image is encrypted, not present means
2193 false or the image format does not support
2194 encryption (json-bool, optional)
2195 - "backing_file": backing file name, not present means no backing
2196 file is used or the image format does not
2197 support backing file chain
2198 (json-string, optional)
2199 - "full-backing-filename": full path of the backing file, not
2200 present if it equals backing_file or no
2201 backing file is used
2202 (json-string, optional)
2203 - "backing-filename-format": the format of the backing file, not
2204 present means unknown or no backing
2205 file (json-string, optional)
2206 - "snapshots": the internal snapshot info, it is an optional list
2207 of json-object containing the following:
2208 - "id": unique snapshot id (json-string)
2209 - "name": snapshot name (json-string)
2210 - "vm-state-size": size of the VM state in bytes (json-int)
2211 - "date-sec": UTC date of the snapshot in seconds (json-int)
2212 - "date-nsec": fractional part in nanoseconds to be used with
2213 date-sec (json-int)
2214 - "vm-clock-sec": VM clock relative to boot in seconds
2215 (json-int)
2216 - "vm-clock-nsec": fractional part in nanoseconds to be used
2217 with vm-clock-sec (json-int)
2218 - "backing-image": the detail of the backing image, it is an
2219 optional json-object only present when a
2220 backing image present for this image
2222 - "io-status": I/O operation status, only present if the device supports it
2223 and the VM is configured to stop on errors. It's always reset
2224 to "ok" when the "cont" command is issued (json_string, optional)
2225 - Possible values: "ok", "failed", "nospace"
2227 Example:
2229 -> { "execute": "query-block" }
2230 <- {
2231 "return":[
2233 "io-status": "ok",
2234 "device":"ide0-hd0",
2235 "locked":false,
2236 "removable":false,
2237 "inserted":{
2238 "ro":false,
2239 "drv":"qcow2",
2240 "encrypted":false,
2241 "file":"disks/test.qcow2",
2242 "backing_file_depth":1,
2243 "bps":1000000,
2244 "bps_rd":0,
2245 "bps_wr":0,
2246 "iops":1000000,
2247 "iops_rd":0,
2248 "iops_wr":0,
2249 "bps_max": 8000000,
2250 "bps_rd_max": 0,
2251 "bps_wr_max": 0,
2252 "iops_max": 0,
2253 "iops_rd_max": 0,
2254 "iops_wr_max": 0,
2255 "iops_size": 0,
2256 "detect_zeroes": "on",
2257 "write_threshold": 0,
2258 "image":{
2259 "filename":"disks/test.qcow2",
2260 "format":"qcow2",
2261 "virtual-size":2048000,
2262 "backing_file":"base.qcow2",
2263 "full-backing-filename":"disks/base.qcow2",
2264 "backing-filename-format:"qcow2",
2265 "snapshots":[
2267 "id": "1",
2268 "name": "snapshot1",
2269 "vm-state-size": 0,
2270 "date-sec": 10000200,
2271 "date-nsec": 12,
2272 "vm-clock-sec": 206,
2273 "vm-clock-nsec": 30
2276 "backing-image":{
2277 "filename":"disks/base.qcow2",
2278 "format":"qcow2",
2279 "virtual-size":2048000
2283 "type":"unknown"
2286 "io-status": "ok",
2287 "device":"ide1-cd0",
2288 "locked":false,
2289 "removable":true,
2290 "type":"unknown"
2293 "device":"floppy0",
2294 "locked":false,
2295 "removable":true,
2296 "type":"unknown"
2299 "device":"sd0",
2300 "locked":false,
2301 "removable":true,
2302 "type":"unknown"
2307 EQMP
2310 .name = "query-block",
2311 .args_type = "",
2312 .mhandler.cmd_new = qmp_marshal_input_query_block,
2315 SQMP
2316 query-blockstats
2317 ----------------
2319 Show block device statistics.
2321 Each device statistic information is stored in a json-object and the returned
2322 value is a json-array of all devices.
2324 Each json-object contain the following:
2326 - "device": device name (json-string)
2327 - "stats": A json-object with the statistics information, it contains:
2328 - "rd_bytes": bytes read (json-int)
2329 - "wr_bytes": bytes written (json-int)
2330 - "rd_operations": read operations (json-int)
2331 - "wr_operations": write operations (json-int)
2332 - "flush_operations": cache flush operations (json-int)
2333 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
2334 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
2335 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
2336 - "wr_highest_offset": Highest offset of a sector written since the
2337 BlockDriverState has been opened (json-int)
2338 - "rd_merged": number of read requests that have been merged into
2339 another request (json-int)
2340 - "wr_merged": number of write requests that have been merged into
2341 another request (json-int)
2342 - "parent": Contains recursively the statistics of the underlying
2343 protocol (e.g. the host file for a qcow2 image). If there is
2344 no underlying protocol, this field is omitted
2345 (json-object, optional)
2347 Example:
2349 -> { "execute": "query-blockstats" }
2350 <- {
2351 "return":[
2353 "device":"ide0-hd0",
2354 "parent":{
2355 "stats":{
2356 "wr_highest_offset":3686448128,
2357 "wr_bytes":9786368,
2358 "wr_operations":751,
2359 "rd_bytes":122567168,
2360 "rd_operations":36772
2361 "wr_total_times_ns":313253456
2362 "rd_total_times_ns":3465673657
2363 "flush_total_times_ns":49653
2364 "flush_operations":61,
2365 "rd_merged":0,
2366 "wr_merged":0
2369 "stats":{
2370 "wr_highest_offset":2821110784,
2371 "wr_bytes":9786368,
2372 "wr_operations":692,
2373 "rd_bytes":122739200,
2374 "rd_operations":36604
2375 "flush_operations":51,
2376 "wr_total_times_ns":313253456
2377 "rd_total_times_ns":3465673657
2378 "flush_total_times_ns":49653,
2379 "rd_merged":0,
2380 "wr_merged":0
2384 "device":"ide1-cd0",
2385 "stats":{
2386 "wr_highest_offset":0,
2387 "wr_bytes":0,
2388 "wr_operations":0,
2389 "rd_bytes":0,
2390 "rd_operations":0
2391 "flush_operations":0,
2392 "wr_total_times_ns":0
2393 "rd_total_times_ns":0
2394 "flush_total_times_ns":0,
2395 "rd_merged":0,
2396 "wr_merged":0
2400 "device":"floppy0",
2401 "stats":{
2402 "wr_highest_offset":0,
2403 "wr_bytes":0,
2404 "wr_operations":0,
2405 "rd_bytes":0,
2406 "rd_operations":0
2407 "flush_operations":0,
2408 "wr_total_times_ns":0
2409 "rd_total_times_ns":0
2410 "flush_total_times_ns":0,
2411 "rd_merged":0,
2412 "wr_merged":0
2416 "device":"sd0",
2417 "stats":{
2418 "wr_highest_offset":0,
2419 "wr_bytes":0,
2420 "wr_operations":0,
2421 "rd_bytes":0,
2422 "rd_operations":0
2423 "flush_operations":0,
2424 "wr_total_times_ns":0
2425 "rd_total_times_ns":0
2426 "flush_total_times_ns":0,
2427 "rd_merged":0,
2428 "wr_merged":0
2434 EQMP
2437 .name = "query-blockstats",
2438 .args_type = "query-nodes:b?",
2439 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
2442 SQMP
2443 query-cpus
2444 ----------
2446 Show CPU information.
2448 Return a json-array. Each CPU is represented by a json-object, which contains:
2450 - "CPU": CPU index (json-int)
2451 - "current": true if this is the current CPU, false otherwise (json-bool)
2452 - "halted": true if the cpu is halted, false otherwise (json-bool)
2453 - Current program counter. The key's name depends on the architecture:
2454 "pc": i386/x86_64 (json-int)
2455 "nip": PPC (json-int)
2456 "pc" and "npc": sparc (json-int)
2457 "PC": mips (json-int)
2458 - "thread_id": ID of the underlying host thread (json-int)
2460 Example:
2462 -> { "execute": "query-cpus" }
2463 <- {
2464 "return":[
2466 "CPU":0,
2467 "current":true,
2468 "halted":false,
2469 "pc":3227107138
2470 "thread_id":3134
2473 "CPU":1,
2474 "current":false,
2475 "halted":true,
2476 "pc":7108165
2477 "thread_id":3135
2482 EQMP
2485 .name = "query-cpus",
2486 .args_type = "",
2487 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2490 SQMP
2491 query-iothreads
2492 ---------------
2494 Returns a list of information about each iothread.
2496 Note this list excludes the QEMU main loop thread, which is not declared
2497 using the -object iothread command-line option. It is always the main thread
2498 of the process.
2500 Return a json-array. Each iothread is represented by a json-object, which contains:
2502 - "id": name of iothread (json-str)
2503 - "thread-id": ID of the underlying host thread (json-int)
2505 Example:
2507 -> { "execute": "query-iothreads" }
2508 <- {
2509 "return":[
2511 "id":"iothread0",
2512 "thread-id":3134
2515 "id":"iothread1",
2516 "thread-id":3135
2521 EQMP
2524 .name = "query-iothreads",
2525 .args_type = "",
2526 .mhandler.cmd_new = qmp_marshal_input_query_iothreads,
2529 SQMP
2530 query-pci
2531 ---------
2533 PCI buses and devices information.
2535 The returned value is a json-array of all buses. Each bus is represented by
2536 a json-object, which has a key with a json-array of all PCI devices attached
2537 to it. Each device is represented by a json-object.
2539 The bus json-object contains the following:
2541 - "bus": bus number (json-int)
2542 - "devices": a json-array of json-objects, each json-object represents a
2543 PCI device
2545 The PCI device json-object contains the following:
2547 - "bus": identical to the parent's bus number (json-int)
2548 - "slot": slot number (json-int)
2549 - "function": function number (json-int)
2550 - "class_info": a json-object containing:
2551 - "desc": device class description (json-string, optional)
2552 - "class": device class number (json-int)
2553 - "id": a json-object containing:
2554 - "device": device ID (json-int)
2555 - "vendor": vendor ID (json-int)
2556 - "irq": device's IRQ if assigned (json-int, optional)
2557 - "qdev_id": qdev id string (json-string)
2558 - "pci_bridge": It's a json-object, only present if this device is a
2559 PCI bridge, contains:
2560 - "bus": bus number (json-int)
2561 - "secondary": secondary bus number (json-int)
2562 - "subordinate": subordinate bus number (json-int)
2563 - "io_range": I/O memory range information, a json-object with the
2564 following members:
2565 - "base": base address, in bytes (json-int)
2566 - "limit": limit address, in bytes (json-int)
2567 - "memory_range": memory range information, a json-object with the
2568 following members:
2569 - "base": base address, in bytes (json-int)
2570 - "limit": limit address, in bytes (json-int)
2571 - "prefetchable_range": Prefetchable memory range information, a
2572 json-object with the following members:
2573 - "base": base address, in bytes (json-int)
2574 - "limit": limit address, in bytes (json-int)
2575 - "devices": a json-array of PCI devices if there's any attached, each
2576 each element is represented by a json-object, which contains
2577 the same members of the 'PCI device json-object' described
2578 above (optional)
2579 - "regions": a json-array of json-objects, each json-object represents a
2580 memory region of this device
2582 The memory range json-object contains the following:
2584 - "base": base memory address (json-int)
2585 - "limit": limit value (json-int)
2587 The region json-object can be an I/O region or a memory region, an I/O region
2588 json-object contains the following:
2590 - "type": "io" (json-string, fixed)
2591 - "bar": BAR number (json-int)
2592 - "address": memory address (json-int)
2593 - "size": memory size (json-int)
2595 A memory region json-object contains the following:
2597 - "type": "memory" (json-string, fixed)
2598 - "bar": BAR number (json-int)
2599 - "address": memory address (json-int)
2600 - "size": memory size (json-int)
2601 - "mem_type_64": true or false (json-bool)
2602 - "prefetch": true or false (json-bool)
2604 Example:
2606 -> { "execute": "query-pci" }
2607 <- {
2608 "return":[
2610 "bus":0,
2611 "devices":[
2613 "bus":0,
2614 "qdev_id":"",
2615 "slot":0,
2616 "class_info":{
2617 "class":1536,
2618 "desc":"Host bridge"
2620 "id":{
2621 "device":32902,
2622 "vendor":4663
2624 "function":0,
2625 "regions":[
2630 "bus":0,
2631 "qdev_id":"",
2632 "slot":1,
2633 "class_info":{
2634 "class":1537,
2635 "desc":"ISA bridge"
2637 "id":{
2638 "device":32902,
2639 "vendor":28672
2641 "function":0,
2642 "regions":[
2647 "bus":0,
2648 "qdev_id":"",
2649 "slot":1,
2650 "class_info":{
2651 "class":257,
2652 "desc":"IDE controller"
2654 "id":{
2655 "device":32902,
2656 "vendor":28688
2658 "function":1,
2659 "regions":[
2661 "bar":4,
2662 "size":16,
2663 "address":49152,
2664 "type":"io"
2669 "bus":0,
2670 "qdev_id":"",
2671 "slot":2,
2672 "class_info":{
2673 "class":768,
2674 "desc":"VGA controller"
2676 "id":{
2677 "device":4115,
2678 "vendor":184
2680 "function":0,
2681 "regions":[
2683 "prefetch":true,
2684 "mem_type_64":false,
2685 "bar":0,
2686 "size":33554432,
2687 "address":4026531840,
2688 "type":"memory"
2691 "prefetch":false,
2692 "mem_type_64":false,
2693 "bar":1,
2694 "size":4096,
2695 "address":4060086272,
2696 "type":"memory"
2699 "prefetch":false,
2700 "mem_type_64":false,
2701 "bar":6,
2702 "size":65536,
2703 "address":-1,
2704 "type":"memory"
2709 "bus":0,
2710 "qdev_id":"",
2711 "irq":11,
2712 "slot":4,
2713 "class_info":{
2714 "class":1280,
2715 "desc":"RAM controller"
2717 "id":{
2718 "device":6900,
2719 "vendor":4098
2721 "function":0,
2722 "regions":[
2724 "bar":0,
2725 "size":32,
2726 "address":49280,
2727 "type":"io"
2736 Note: This example has been shortened as the real response is too long.
2738 EQMP
2741 .name = "query-pci",
2742 .args_type = "",
2743 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2746 SQMP
2747 query-kvm
2748 ---------
2750 Show KVM information.
2752 Return a json-object with the following information:
2754 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
2755 - "present": true if QEMU has KVM support, false otherwise (json-bool)
2757 Example:
2759 -> { "execute": "query-kvm" }
2760 <- { "return": { "enabled": true, "present": true } }
2762 EQMP
2765 .name = "query-kvm",
2766 .args_type = "",
2767 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2770 SQMP
2771 query-status
2772 ------------
2774 Return a json-object with the following information:
2776 - "running": true if the VM is running, or false if it is paused (json-bool)
2777 - "singlestep": true if the VM is in single step mode,
2778 false otherwise (json-bool)
2779 - "status": one of the following values (json-string)
2780 "debug" - QEMU is running on a debugger
2781 "inmigrate" - guest is paused waiting for an incoming migration
2782 "internal-error" - An internal error that prevents further guest
2783 execution has occurred
2784 "io-error" - the last IOP has failed and the device is configured
2785 to pause on I/O errors
2786 "paused" - guest has been paused via the 'stop' command
2787 "postmigrate" - guest is paused following a successful 'migrate'
2788 "prelaunch" - QEMU was started with -S and guest has not started
2789 "finish-migrate" - guest is paused to finish the migration process
2790 "restore-vm" - guest is paused to restore VM state
2791 "running" - guest is actively running
2792 "save-vm" - guest is paused to save the VM state
2793 "shutdown" - guest is shut down (and -no-shutdown is in use)
2794 "watchdog" - the watchdog action is configured to pause and
2795 has been triggered
2797 Example:
2799 -> { "execute": "query-status" }
2800 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
2802 EQMP
2805 .name = "query-status",
2806 .args_type = "",
2807 .mhandler.cmd_new = qmp_marshal_input_query_status,
2810 SQMP
2811 query-mice
2812 ----------
2814 Show VM mice information.
2816 Each mouse is represented by a json-object, the returned value is a json-array
2817 of all mice.
2819 The mouse json-object contains the following:
2821 - "name": mouse's name (json-string)
2822 - "index": mouse's index (json-int)
2823 - "current": true if this mouse is receiving events, false otherwise (json-bool)
2824 - "absolute": true if the mouse generates absolute input events (json-bool)
2826 Example:
2828 -> { "execute": "query-mice" }
2829 <- {
2830 "return":[
2832 "name":"QEMU Microsoft Mouse",
2833 "index":0,
2834 "current":false,
2835 "absolute":false
2838 "name":"QEMU PS/2 Mouse",
2839 "index":1,
2840 "current":true,
2841 "absolute":true
2846 EQMP
2849 .name = "query-mice",
2850 .args_type = "",
2851 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2854 SQMP
2855 query-vnc
2856 ---------
2858 Show VNC server information.
2860 Return a json-object with server information. Connected clients are returned
2861 as a json-array of json-objects.
2863 The main json-object contains the following:
2865 - "enabled": true or false (json-bool)
2866 - "host": server's IP address (json-string)
2867 - "family": address family (json-string)
2868 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2869 - "service": server's port number (json-string)
2870 - "auth": authentication method (json-string)
2871 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2872 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2873 "vencrypt+plain", "vencrypt+tls+none",
2874 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2875 "vencrypt+tls+vnc", "vencrypt+x509+none",
2876 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2877 "vencrypt+x509+vnc", "vnc"
2878 - "clients": a json-array of all connected clients
2880 Clients are described by a json-object, each one contain the following:
2882 - "host": client's IP address (json-string)
2883 - "family": address family (json-string)
2884 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2885 - "service": client's port number (json-string)
2886 - "x509_dname": TLS dname (json-string, optional)
2887 - "sasl_username": SASL username (json-string, optional)
2889 Example:
2891 -> { "execute": "query-vnc" }
2892 <- {
2893 "return":{
2894 "enabled":true,
2895 "host":"0.0.0.0",
2896 "service":"50402",
2897 "auth":"vnc",
2898 "family":"ipv4",
2899 "clients":[
2901 "host":"127.0.0.1",
2902 "service":"50401",
2903 "family":"ipv4"
2909 EQMP
2912 .name = "query-vnc",
2913 .args_type = "",
2914 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2917 .name = "query-vnc-servers",
2918 .args_type = "",
2919 .mhandler.cmd_new = qmp_marshal_input_query_vnc_servers,
2922 SQMP
2923 query-spice
2924 -----------
2926 Show SPICE server information.
2928 Return a json-object with server information. Connected clients are returned
2929 as a json-array of json-objects.
2931 The main json-object contains the following:
2933 - "enabled": true or false (json-bool)
2934 - "host": server's IP address (json-string)
2935 - "port": server's port number (json-int, optional)
2936 - "tls-port": server's port number (json-int, optional)
2937 - "auth": authentication method (json-string)
2938 - Possible values: "none", "spice"
2939 - "channels": a json-array of all active channels clients
2941 Channels are described by a json-object, each one contain the following:
2943 - "host": client's IP address (json-string)
2944 - "family": address family (json-string)
2945 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2946 - "port": client's port number (json-string)
2947 - "connection-id": spice connection id. All channels with the same id
2948 belong to the same spice session (json-int)
2949 - "channel-type": channel type. "1" is the main control channel, filter for
2950 this one if you want track spice sessions only (json-int)
2951 - "channel-id": channel id. Usually "0", might be different needed when
2952 multiple channels of the same type exist, such as multiple
2953 display channels in a multihead setup (json-int)
2954 - "tls": whether the channel is encrypted (json-bool)
2956 Example:
2958 -> { "execute": "query-spice" }
2959 <- {
2960 "return": {
2961 "enabled": true,
2962 "auth": "spice",
2963 "port": 5920,
2964 "tls-port": 5921,
2965 "host": "0.0.0.0",
2966 "channels": [
2968 "port": "54924",
2969 "family": "ipv4",
2970 "channel-type": 1,
2971 "connection-id": 1804289383,
2972 "host": "127.0.0.1",
2973 "channel-id": 0,
2974 "tls": true
2977 "port": "36710",
2978 "family": "ipv4",
2979 "channel-type": 4,
2980 "connection-id": 1804289383,
2981 "host": "127.0.0.1",
2982 "channel-id": 0,
2983 "tls": false
2985 [ ... more channels follow ... ]
2990 EQMP
2992 #if defined(CONFIG_SPICE)
2994 .name = "query-spice",
2995 .args_type = "",
2996 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2998 #endif
3000 SQMP
3001 query-name
3002 ----------
3004 Show VM name.
3006 Return a json-object with the following information:
3008 - "name": VM's name (json-string, optional)
3010 Example:
3012 -> { "execute": "query-name" }
3013 <- { "return": { "name": "qemu-name" } }
3015 EQMP
3018 .name = "query-name",
3019 .args_type = "",
3020 .mhandler.cmd_new = qmp_marshal_input_query_name,
3023 SQMP
3024 query-uuid
3025 ----------
3027 Show VM UUID.
3029 Return a json-object with the following information:
3031 - "UUID": Universally Unique Identifier (json-string)
3033 Example:
3035 -> { "execute": "query-uuid" }
3036 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
3038 EQMP
3041 .name = "query-uuid",
3042 .args_type = "",
3043 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
3046 SQMP
3047 query-command-line-options
3048 --------------------------
3050 Show command line option schema.
3052 Return a json-array of command line option schema for all options (or for
3053 the given option), returning an error if the given option doesn't exist.
3055 Each array entry contains the following:
3057 - "option": option name (json-string)
3058 - "parameters": a json-array describes all parameters of the option:
3059 - "name": parameter name (json-string)
3060 - "type": parameter type (one of 'string', 'boolean', 'number',
3061 or 'size')
3062 - "help": human readable description of the parameter
3063 (json-string, optional)
3064 - "default": default value string for the parameter
3065 (json-string, optional)
3067 Example:
3069 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
3070 <- { "return": [
3072 "parameters": [
3074 "name": "romfile",
3075 "type": "string"
3078 "name": "bootindex",
3079 "type": "number"
3082 "option": "option-rom"
3087 EQMP
3090 .name = "query-command-line-options",
3091 .args_type = "option:s?",
3092 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
3095 SQMP
3096 query-migrate
3097 -------------
3099 Migration status.
3101 Return a json-object. If migration is active there will be another json-object
3102 with RAM migration status and if block migration is active another one with
3103 block migration status.
3105 The main json-object contains the following:
3107 - "status": migration status (json-string)
3108 - Possible values: "setup", "active", "completed", "failed", "cancelled"
3109 - "total-time": total amount of ms since migration started. If
3110 migration has ended, it returns the total migration
3111 time (json-int)
3112 - "setup-time" amount of setup time in milliseconds _before_ the
3113 iterations begin but _after_ the QMP command is issued.
3114 This is designed to provide an accounting of any activities
3115 (such as RDMA pinning) which may be expensive, but do not
3116 actually occur during the iterative migration rounds
3117 themselves. (json-int)
3118 - "downtime": only present when migration has finished correctly
3119 total amount in ms for downtime that happened (json-int)
3120 - "expected-downtime": only present while migration is active
3121 total amount in ms for downtime that was calculated on
3122 the last bitmap round (json-int)
3123 - "ram": only present if "status" is "active", it is a json-object with the
3124 following RAM information:
3125 - "transferred": amount transferred in bytes (json-int)
3126 - "remaining": amount remaining to transfer in bytes (json-int)
3127 - "total": total amount of memory in bytes (json-int)
3128 - "duplicate": number of pages filled entirely with the same
3129 byte (json-int)
3130 These are sent over the wire much more efficiently.
3131 - "skipped": number of skipped zero pages (json-int)
3132 - "normal" : number of whole pages transferred. I.e. they
3133 were not sent as duplicate or xbzrle pages (json-int)
3134 - "normal-bytes" : number of bytes transferred in whole
3135 pages. This is just normal pages times size of one page,
3136 but this way upper levels don't need to care about page
3137 size (json-int)
3138 - "dirty-sync-count": times that dirty ram was synchronized (json-int)
3139 - "disk": only present if "status" is "active" and it is a block migration,
3140 it is a json-object with the following disk information:
3141 - "transferred": amount transferred in bytes (json-int)
3142 - "remaining": amount remaining to transfer in bytes json-int)
3143 - "total": total disk size in bytes (json-int)
3144 - "xbzrle-cache": only present if XBZRLE is active.
3145 It is a json-object with the following XBZRLE information:
3146 - "cache-size": XBZRLE cache size in bytes
3147 - "bytes": number of bytes transferred for XBZRLE compressed pages
3148 - "pages": number of XBZRLE compressed pages
3149 - "cache-miss": number of XBRZRLE page cache misses
3150 - "cache-miss-rate": rate of XBRZRLE page cache misses
3151 - "overflow": number of times XBZRLE overflows. This means
3152 that the XBZRLE encoding was bigger than just sent the
3153 whole page, and then we sent the whole page instead (as as
3154 normal page).
3156 Examples:
3158 1. Before the first migration
3160 -> { "execute": "query-migrate" }
3161 <- { "return": {} }
3163 2. Migration is done and has succeeded
3165 -> { "execute": "query-migrate" }
3166 <- { "return": {
3167 "status": "completed",
3168 "ram":{
3169 "transferred":123,
3170 "remaining":123,
3171 "total":246,
3172 "total-time":12345,
3173 "setup-time":12345,
3174 "downtime":12345,
3175 "duplicate":123,
3176 "normal":123,
3177 "normal-bytes":123456,
3178 "dirty-sync-count":15
3183 3. Migration is done and has failed
3185 -> { "execute": "query-migrate" }
3186 <- { "return": { "status": "failed" } }
3188 4. Migration is being performed and is not a block migration:
3190 -> { "execute": "query-migrate" }
3191 <- {
3192 "return":{
3193 "status":"active",
3194 "ram":{
3195 "transferred":123,
3196 "remaining":123,
3197 "total":246,
3198 "total-time":12345,
3199 "setup-time":12345,
3200 "expected-downtime":12345,
3201 "duplicate":123,
3202 "normal":123,
3203 "normal-bytes":123456,
3204 "dirty-sync-count":15
3209 5. Migration is being performed and is a block migration:
3211 -> { "execute": "query-migrate" }
3212 <- {
3213 "return":{
3214 "status":"active",
3215 "ram":{
3216 "total":1057024,
3217 "remaining":1053304,
3218 "transferred":3720,
3219 "total-time":12345,
3220 "setup-time":12345,
3221 "expected-downtime":12345,
3222 "duplicate":123,
3223 "normal":123,
3224 "normal-bytes":123456,
3225 "dirty-sync-count":15
3227 "disk":{
3228 "total":20971520,
3229 "remaining":20880384,
3230 "transferred":91136
3235 6. Migration is being performed and XBZRLE is active:
3237 -> { "execute": "query-migrate" }
3238 <- {
3239 "return":{
3240 "status":"active",
3241 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
3242 "ram":{
3243 "total":1057024,
3244 "remaining":1053304,
3245 "transferred":3720,
3246 "total-time":12345,
3247 "setup-time":12345,
3248 "expected-downtime":12345,
3249 "duplicate":10,
3250 "normal":3333,
3251 "normal-bytes":3412992,
3252 "dirty-sync-count":15
3254 "xbzrle-cache":{
3255 "cache-size":67108864,
3256 "bytes":20971520,
3257 "pages":2444343,
3258 "cache-miss":2244,
3259 "cache-miss-rate":0.123,
3260 "overflow":34434
3265 EQMP
3268 .name = "query-migrate",
3269 .args_type = "",
3270 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
3273 SQMP
3274 migrate-set-capabilities
3275 ------------------------
3277 Enable/Disable migration capabilities
3279 - "xbzrle": XBZRLE support
3280 - "rdma-pin-all": pin all pages when using RDMA during migration
3281 - "auto-converge": throttle down guest to help convergence of migration
3282 - "zero-blocks": compress zero blocks during block migration
3284 Arguments:
3286 Example:
3288 -> { "execute": "migrate-set-capabilities" , "arguments":
3289 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
3291 EQMP
3294 .name = "migrate-set-capabilities",
3295 .args_type = "capabilities:O",
3296 .params = "capability:s,state:b",
3297 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
3299 SQMP
3300 query-migrate-capabilities
3301 --------------------------
3303 Query current migration capabilities
3305 - "capabilities": migration capabilities state
3306 - "xbzrle" : XBZRLE state (json-bool)
3307 - "rdma-pin-all" : RDMA Pin Page state (json-bool)
3308 - "auto-converge" : Auto Converge state (json-bool)
3309 - "zero-blocks" : Zero Blocks state (json-bool)
3311 Arguments:
3313 Example:
3315 -> { "execute": "query-migrate-capabilities" }
3316 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
3318 EQMP
3321 .name = "query-migrate-capabilities",
3322 .args_type = "",
3323 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
3326 SQMP
3327 query-balloon
3328 -------------
3330 Show balloon information.
3332 Make an asynchronous request for balloon info. When the request completes a
3333 json-object will be returned containing the following data:
3335 - "actual": current balloon value in bytes (json-int)
3337 Example:
3339 -> { "execute": "query-balloon" }
3340 <- {
3341 "return":{
3342 "actual":1073741824,
3346 EQMP
3349 .name = "query-balloon",
3350 .args_type = "",
3351 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
3355 .name = "query-block-jobs",
3356 .args_type = "",
3357 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
3361 .name = "qom-list",
3362 .args_type = "path:s",
3363 .mhandler.cmd_new = qmp_marshal_input_qom_list,
3367 .name = "qom-set",
3368 .args_type = "path:s,property:s,value:q",
3369 .mhandler.cmd_new = qmp_qom_set,
3373 .name = "qom-get",
3374 .args_type = "path:s,property:s",
3375 .mhandler.cmd_new = qmp_qom_get,
3379 .name = "nbd-server-start",
3380 .args_type = "addr:q",
3381 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
3384 .name = "nbd-server-add",
3385 .args_type = "device:B,writable:b?",
3386 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
3389 .name = "nbd-server-stop",
3390 .args_type = "",
3391 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
3395 .name = "change-vnc-password",
3396 .args_type = "password:s",
3397 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
3400 .name = "qom-list-types",
3401 .args_type = "implements:s?,abstract:b?",
3402 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
3406 .name = "device-list-properties",
3407 .args_type = "typename:s",
3408 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
3412 .name = "query-machines",
3413 .args_type = "",
3414 .mhandler.cmd_new = qmp_marshal_input_query_machines,
3418 .name = "query-cpu-definitions",
3419 .args_type = "",
3420 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
3424 .name = "query-target",
3425 .args_type = "",
3426 .mhandler.cmd_new = qmp_marshal_input_query_target,
3430 .name = "query-tpm",
3431 .args_type = "",
3432 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
3435 SQMP
3436 query-tpm
3437 ---------
3439 Return information about the TPM device.
3441 Arguments: None
3443 Example:
3445 -> { "execute": "query-tpm" }
3446 <- { "return":
3448 { "model": "tpm-tis",
3449 "options":
3450 { "type": "passthrough",
3451 "data":
3452 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
3453 "path": "/dev/tpm0"
3456 "id": "tpm0"
3461 EQMP
3464 .name = "query-tpm-models",
3465 .args_type = "",
3466 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
3469 SQMP
3470 query-tpm-models
3471 ----------------
3473 Return a list of supported TPM models.
3475 Arguments: None
3477 Example:
3479 -> { "execute": "query-tpm-models" }
3480 <- { "return": [ "tpm-tis" ] }
3482 EQMP
3485 .name = "query-tpm-types",
3486 .args_type = "",
3487 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
3490 SQMP
3491 query-tpm-types
3492 ---------------
3494 Return a list of supported TPM types.
3496 Arguments: None
3498 Example:
3500 -> { "execute": "query-tpm-types" }
3501 <- { "return": [ "passthrough" ] }
3503 EQMP
3506 .name = "chardev-add",
3507 .args_type = "id:s,backend:q",
3508 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
3511 SQMP
3512 chardev-add
3513 ----------------
3515 Add a chardev.
3517 Arguments:
3519 - "id": the chardev's ID, must be unique (json-string)
3520 - "backend": chardev backend type + parameters
3522 Examples:
3524 -> { "execute" : "chardev-add",
3525 "arguments" : { "id" : "foo",
3526 "backend" : { "type" : "null", "data" : {} } } }
3527 <- { "return": {} }
3529 -> { "execute" : "chardev-add",
3530 "arguments" : { "id" : "bar",
3531 "backend" : { "type" : "file",
3532 "data" : { "out" : "/tmp/bar.log" } } } }
3533 <- { "return": {} }
3535 -> { "execute" : "chardev-add",
3536 "arguments" : { "id" : "baz",
3537 "backend" : { "type" : "pty", "data" : {} } } }
3538 <- { "return": { "pty" : "/dev/pty/42" } }
3540 EQMP
3543 .name = "chardev-remove",
3544 .args_type = "id:s",
3545 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3549 SQMP
3550 chardev-remove
3551 --------------
3553 Remove a chardev.
3555 Arguments:
3557 - "id": the chardev's ID, must exist and not be in use (json-string)
3559 Example:
3561 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }
3562 <- { "return": {} }
3564 EQMP
3566 .name = "query-rx-filter",
3567 .args_type = "name:s?",
3568 .mhandler.cmd_new = qmp_marshal_input_query_rx_filter,
3571 SQMP
3572 query-rx-filter
3573 ---------------
3575 Show rx-filter information.
3577 Returns a json-array of rx-filter information for all NICs (or for the
3578 given NIC), returning an error if the given NIC doesn't exist, or
3579 given NIC doesn't support rx-filter querying, or given net client
3580 isn't a NIC.
3582 The query will clear the event notification flag of each NIC, then qemu
3583 will start to emit event to QMP monitor.
3585 Each array entry contains the following:
3587 - "name": net client name (json-string)
3588 - "promiscuous": promiscuous mode is enabled (json-bool)
3589 - "multicast": multicast receive state (one of 'normal', 'none', 'all')
3590 - "unicast": unicast receive state (one of 'normal', 'none', 'all')
3591 - "vlan": vlan receive state (one of 'normal', 'none', 'all') (Since 2.0)
3592 - "broadcast-allowed": allow to receive broadcast (json-bool)
3593 - "multicast-overflow": multicast table is overflowed (json-bool)
3594 - "unicast-overflow": unicast table is overflowed (json-bool)
3595 - "main-mac": main macaddr string (json-string)
3596 - "vlan-table": a json-array of active vlan id
3597 - "unicast-table": a json-array of unicast macaddr string
3598 - "multicast-table": a json-array of multicast macaddr string
3600 Example:
3602 -> { "execute": "query-rx-filter", "arguments": { "name": "vnet0" } }
3603 <- { "return": [
3605 "promiscuous": true,
3606 "name": "vnet0",
3607 "main-mac": "52:54:00:12:34:56",
3608 "unicast": "normal",
3609 "vlan": "normal",
3610 "vlan-table": [
3614 "unicast-table": [
3616 "multicast": "normal",
3617 "multicast-overflow": false,
3618 "unicast-overflow": false,
3619 "multicast-table": [
3620 "01:00:5e:00:00:01",
3621 "33:33:00:00:00:01",
3622 "33:33:ff:12:34:56"
3624 "broadcast-allowed": false
3629 EQMP
3632 .name = "blockdev-add",
3633 .args_type = "options:q",
3634 .mhandler.cmd_new = qmp_marshal_input_blockdev_add,
3637 SQMP
3638 blockdev-add
3639 ------------
3641 Add a block device.
3643 Arguments:
3645 - "options": block driver options
3647 Example (1):
3649 -> { "execute": "blockdev-add",
3650 "arguments": { "options" : { "driver": "qcow2",
3651 "file": { "driver": "file",
3652 "filename": "test.qcow2" } } } }
3653 <- { "return": {} }
3655 Example (2):
3657 -> { "execute": "blockdev-add",
3658 "arguments": {
3659 "options": {
3660 "driver": "qcow2",
3661 "id": "my_disk",
3662 "discard": "unmap",
3663 "cache": {
3664 "direct": true,
3665 "writeback": true
3667 "file": {
3668 "driver": "file",
3669 "filename": "/tmp/test.qcow2"
3671 "backing": {
3672 "driver": "raw",
3673 "file": {
3674 "driver": "file",
3675 "filename": "/dev/fdset/4"
3682 <- { "return": {} }
3684 EQMP
3687 .name = "query-named-block-nodes",
3688 .args_type = "",
3689 .mhandler.cmd_new = qmp_marshal_input_query_named_block_nodes,
3692 SQMP
3693 @query-named-block-nodes
3694 ------------------------
3696 Return a list of BlockDeviceInfo for all the named block driver nodes
3698 Example:
3700 -> { "execute": "query-named-block-nodes" }
3701 <- { "return": [ { "ro":false,
3702 "drv":"qcow2",
3703 "encrypted":false,
3704 "file":"disks/test.qcow2",
3705 "node-name": "my-node",
3706 "backing_file_depth":1,
3707 "bps":1000000,
3708 "bps_rd":0,
3709 "bps_wr":0,
3710 "iops":1000000,
3711 "iops_rd":0,
3712 "iops_wr":0,
3713 "bps_max": 8000000,
3714 "bps_rd_max": 0,
3715 "bps_wr_max": 0,
3716 "iops_max": 0,
3717 "iops_rd_max": 0,
3718 "iops_wr_max": 0,
3719 "iops_size": 0,
3720 "write_threshold": 0,
3721 "image":{
3722 "filename":"disks/test.qcow2",
3723 "format":"qcow2",
3724 "virtual-size":2048000,
3725 "backing_file":"base.qcow2",
3726 "full-backing-filename":"disks/base.qcow2",
3727 "backing-filename-format:"qcow2",
3728 "snapshots":[
3730 "id": "1",
3731 "name": "snapshot1",
3732 "vm-state-size": 0,
3733 "date-sec": 10000200,
3734 "date-nsec": 12,
3735 "vm-clock-sec": 206,
3736 "vm-clock-nsec": 30
3739 "backing-image":{
3740 "filename":"disks/base.qcow2",
3741 "format":"qcow2",
3742 "virtual-size":2048000
3744 } } ] }
3746 EQMP
3749 .name = "query-memdev",
3750 .args_type = "",
3751 .mhandler.cmd_new = qmp_marshal_input_query_memdev,
3754 SQMP
3755 query-memdev
3756 ------------
3758 Show memory devices information.
3761 Example (1):
3763 -> { "execute": "query-memdev" }
3764 <- { "return": [
3766 "size": 536870912,
3767 "merge": false,
3768 "dump": true,
3769 "prealloc": false,
3770 "host-nodes": [0, 1],
3771 "policy": "bind"
3774 "size": 536870912,
3775 "merge": false,
3776 "dump": true,
3777 "prealloc": true,
3778 "host-nodes": [2, 3],
3779 "policy": "preferred"
3784 EQMP
3787 .name = "query-memory-devices",
3788 .args_type = "",
3789 .mhandler.cmd_new = qmp_marshal_input_query_memory_devices,
3792 SQMP
3793 @query-memory-devices
3794 --------------------
3796 Return a list of memory devices.
3798 Example:
3799 -> { "execute": "query-memory-devices" }
3800 <- { "return": [ { "data":
3801 { "addr": 5368709120,
3802 "hotpluggable": true,
3803 "hotplugged": true,
3804 "id": "d1",
3805 "memdev": "/objects/memX",
3806 "node": 0,
3807 "size": 1073741824,
3808 "slot": 0},
3809 "type": "dimm"
3810 } ] }
3811 EQMP
3814 .name = "query-acpi-ospm-status",
3815 .args_type = "",
3816 .mhandler.cmd_new = qmp_marshal_input_query_acpi_ospm_status,
3819 SQMP
3820 @query-acpi-ospm-status
3821 --------------------
3823 Return list of ACPIOSTInfo for devices that support status reporting
3824 via ACPI _OST method.
3826 Example:
3827 -> { "execute": "query-acpi-ospm-status" }
3828 <- { "return": [ { "device": "d1", "slot": "0", "slot-type": "DIMM", "source": 1, "status": 0},
3829 { "slot": "1", "slot-type": "DIMM", "source": 0, "status": 0},
3830 { "slot": "2", "slot-type": "DIMM", "source": 0, "status": 0},
3831 { "slot": "3", "slot-type": "DIMM", "source": 0, "status": 0}
3833 EQMP
3835 #if defined TARGET_I386
3837 .name = "rtc-reset-reinjection",
3838 .args_type = "",
3839 .mhandler.cmd_new = qmp_marshal_input_rtc_reset_reinjection,
3841 #endif
3843 SQMP
3844 rtc-reset-reinjection
3845 ---------------------
3847 Reset the RTC interrupt reinjection backlog.
3849 Arguments: None.
3851 Example:
3853 -> { "execute": "rtc-reset-reinjection" }
3854 <- { "return": {} }
3855 EQMP
3858 .name = "trace-event-get-state",
3859 .args_type = "name:s",
3860 .mhandler.cmd_new = qmp_marshal_input_trace_event_get_state,
3863 SQMP
3864 trace-event-get-state
3865 ---------------------
3867 Query the state of events.
3869 Example:
3871 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
3872 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
3873 EQMP
3876 .name = "trace-event-set-state",
3877 .args_type = "name:s,enable:b,ignore-unavailable:b?",
3878 .mhandler.cmd_new = qmp_marshal_input_trace_event_set_state,
3881 SQMP
3882 trace-event-set-state
3883 ---------------------
3885 Set the state of events.
3887 Example:
3889 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
3890 <- { "return": {} }
3891 EQMP
3894 .name = "x-input-send-event",
3895 .args_type = "console:i?,events:q",
3896 .mhandler.cmd_new = qmp_marshal_input_x_input_send_event,
3899 SQMP
3900 @x-input-send-event
3901 -----------------
3903 Send input event to guest.
3905 Arguments:
3907 - "console": console index. (json-int, optional)
3908 - "events": list of input events.
3910 The consoles are visible in the qom tree, under
3911 /backend/console[$index]. They have a device link and head property, so
3912 it is possible to map which console belongs to which device and display.
3914 Note: this command is experimental, and not a stable API.
3916 Example (1):
3918 Press left mouse button.
3920 -> { "execute": "x-input-send-event",
3921 "arguments": { "console": 0,
3922 "events": [ { "type": "btn",
3923 "data" : { "down": true, "button": "Left" } } ] } }
3924 <- { "return": {} }
3926 -> { "execute": "x-input-send-event",
3927 "arguments": { "console": 0,
3928 "events": [ { "type": "btn",
3929 "data" : { "down": false, "button": "Left" } } ] } }
3930 <- { "return": {} }
3932 Example (2):
3934 Press ctrl-alt-del.
3936 -> { "execute": "x-input-send-event",
3937 "arguments": { "console": 0, "events": [
3938 { "type": "key", "data" : { "down": true,
3939 "key": {"type": "qcode", "data": "ctrl" } } },
3940 { "type": "key", "data" : { "down": true,
3941 "key": {"type": "qcode", "data": "alt" } } },
3942 { "type": "key", "data" : { "down": true,
3943 "key": {"type": "qcode", "data": "delete" } } } ] } }
3944 <- { "return": {} }
3946 Example (3):
3948 Move mouse pointer to absolute coordinates (20000, 400).
3950 -> { "execute": "x-input-send-event" ,
3951 "arguments": { "console": 0, "events": [
3952 { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
3953 { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
3954 <- { "return": {} }
3956 EQMP
3959 .name = "block-set-write-threshold",
3960 .args_type = "node-name:s,write-threshold:l",
3961 .mhandler.cmd_new = qmp_marshal_input_block_set_write_threshold,
3964 SQMP
3965 block-set-write-threshold
3966 ------------
3968 Change the write threshold for a block drive. The threshold is an offset,
3969 thus must be non-negative. Default is no write threshold.
3970 Setting the threshold to zero disables it.
3972 Arguments:
3974 - "node-name": the node name in the block driver state graph (json-string)
3975 - "write-threshold": the write threshold in bytes (json-int)
3977 Example:
3979 -> { "execute": "block-set-write-threshold",
3980 "arguments": { "node-name": "mydev",
3981 "write-threshold": 17179869184 } }
3982 <- { "return": {} }
3984 EQMP