1 HXCOMM QMP dispatch table and documentation
2 HXCOMM Text between SQMP and EQMP is copied to the QMP documention file and
3 HXCOMM does not show up in the other formats.
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
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)
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.
66 .mhandler.cmd_new = qmp_marshal_input_quit,
79 -> { "execute": "quit" }
86 .args_type = "force:-f,device:B",
87 .mhandler.cmd_new = qmp_marshal_input_eject,
94 Eject a removable medium.
98 - force: force ejection (json-bool, optional)
99 - device: device name (json-string)
103 -> { "execute": "eject", "arguments": { "device": "ide1-cd0" } }
106 Note: The "force" argument defaults to false.
112 .args_type = "device:B,target:F,arg:s?",
113 .mhandler.cmd_new = qmp_marshal_input_change,
120 Change a removable medium or VNC configuration.
124 - "device": device name (json-string)
125 - "target": filename or item (json-string)
126 - "arg": additional argument (json-string, optional)
130 1. Change a removable medium
132 -> { "execute": "change",
133 "arguments": { "device": "ide1-cd0",
134 "target": "/srv/images/Fedora-12-x86_64-DVD.iso" } }
137 2. Change VNC password
139 -> { "execute": "change",
140 "arguments": { "device": "vnc", "target": "password",
147 .name = "screendump",
148 .args_type = "filename:F",
149 .mhandler.cmd_new = qmp_marshal_input_screendump,
156 Save screen into PPM image.
160 - "filename": file path (json-string)
164 -> { "execute": "screendump", "arguments": { "filename": "/tmp/image" } }
172 .mhandler.cmd_new = qmp_marshal_input_stop,
185 -> { "execute": "stop" }
193 .mhandler.cmd_new = qmp_marshal_input_cont,
206 -> { "execute": "cont" }
212 .name = "system_wakeup",
214 .mhandler.cmd_new = qmp_marshal_input_system_wakeup,
221 Wakeup guest from suspend.
227 -> { "execute": "system_wakeup" }
233 .name = "system_reset",
235 .mhandler.cmd_new = qmp_marshal_input_system_reset,
248 -> { "execute": "system_reset" }
254 .name = "system_powerdown",
256 .mhandler.cmd_new = qmp_marshal_input_system_powerdown,
263 Send system power down event.
269 -> { "execute": "system_powerdown" }
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,
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)
298 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
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
312 .name = "device_del",
314 .mhandler.cmd_new = qmp_marshal_input_device_del,
325 - "id": the device's ID (json-string)
329 -> { "execute": "device_del", "arguments": { "id": "net1" } }
336 .args_type = "keys:O,hold-time:i?",
337 .mhandler.cmd_new = qmp_marshal_input_send_key,
349 - "key": key sequence (a json-array of key enum values)
351 - hold-time: time to delay key up events, milliseconds. Defaults to 100
356 -> { "execute": "send-key",
357 "arguments": { 'keys': [ 'ctrl', 'alt', 'delete' ] } }
364 .args_type = "index:i",
365 .mhandler.cmd_new = qmp_marshal_input_cpu,
376 - "index": the CPU's index (json-int)
380 -> { "execute": "cpu", "arguments": { "index": 0 } }
383 Note: CPUs' indexes are obtained with the 'query-cpus' command.
390 .mhandler.cmd_new = qmp_marshal_input_cpu_add,
401 - "id": cpu id (json-int)
405 -> { "execute": "cpu-add", "arguments": { "id": 2 } }
412 .args_type = "val:l,size:i,filename:s,cpu:i?",
413 .mhandler.cmd_new = qmp_marshal_input_memsave,
420 Save to disk virtual memory dump starting at 'val' of size 'size'.
424 - "val": the starting address (json-int)
425 - "size": the memory size, in bytes (json-int)
426 - "filename": file path (json-string)
427 - "cpu": virtual CPU index (json-int, optional)
431 -> { "execute": "memsave",
432 "arguments": { "val": 10,
434 "filename": "/tmp/virtual-mem-dump" } }
441 .args_type = "val:l,size:i,filename:s",
442 .mhandler.cmd_new = qmp_marshal_input_pmemsave,
449 Save to disk physical memory dump starting at 'val' of size 'size'.
453 - "val": the starting address (json-int)
454 - "size": the memory size, in bytes (json-int)
455 - "filename": file path (json-string)
459 -> { "execute": "pmemsave",
460 "arguments": { "val": 10,
462 "filename": "/tmp/physical-mem-dump" } }
468 .name = "inject-nmi",
470 .mhandler.cmd_new = qmp_marshal_input_inject_nmi,
477 Inject an NMI on guest's CPUs.
483 -> { "execute": "inject-nmi" }
486 Note: inject-nmi fails when the guest doesn't support injecting.
487 Currently, only x86 guests do.
492 .name = "ringbuf-write",
493 .args_type = "device:s,data:s,format:s?",
494 .mhandler.cmd_new = qmp_marshal_input_ringbuf_write,
501 Write to a ring buffer character device.
505 - "device": ring buffer character device name (json-string)
506 - "data": data to write (json-string)
507 - "format": data format (json-string, optional)
508 - Possible values: "utf8" (default), "base64"
509 Bug: invalid base64 is currently not rejected.
510 Whitespace *is* invalid.
514 -> { "execute": "ringbuf-write",
515 "arguments": { "device": "foo",
523 .name = "ringbuf-read",
524 .args_type = "device:s,size:i,format:s?",
525 .mhandler.cmd_new = qmp_marshal_input_ringbuf_read,
532 Read from a ring buffer character device.
536 - "device": ring buffer character device name (json-string)
537 - "size": how many bytes to read at most (json-int)
538 - Number of data bytes, not number of characters in encoded data
539 - "format": data format (json-string, optional)
540 - Possible values: "utf8" (default), "base64"
541 - Naturally, format "utf8" works only when the ring buffer
542 contains valid UTF-8 text. Invalid UTF-8 sequences get
543 replaced. Bug: replacement doesn't work. Bug: can screw
544 up on encountering NUL characters, after the ring buffer
545 lost data, and when reading stops because the size limit
550 -> { "execute": "ringbuf-read",
551 "arguments": { "device": "foo",
554 <- {"return": "abcdefgh"}
559 .name = "xen-save-devices-state",
560 .args_type = "filename:F",
561 .mhandler.cmd_new = qmp_marshal_input_xen_save_devices_state,
565 xen-save-devices-state
568 Save the state of all devices to file. The RAM and the block devices
569 of the VM are not saved by this command.
573 - "filename": the file to save the state of the devices to as binary
574 data. See xen-save-devices-state.txt for a description of the binary
579 -> { "execute": "xen-save-devices-state",
580 "arguments": { "filename": "/tmp/save" } }
586 .name = "xen-set-global-dirty-log",
587 .args_type = "enable:b",
588 .mhandler.cmd_new = qmp_marshal_input_xen_set_global_dirty_log,
592 xen-set-global-dirty-log
595 Enable or disable the global dirty log mode.
599 - "enable": Enable it or disable it.
603 -> { "execute": "xen-set-global-dirty-log",
604 "arguments": { "enable": true } }
611 .args_type = "detach:-d,blk:-b,inc:-i,uri:s",
612 .mhandler.cmd_new = qmp_marshal_input_migrate,
623 - "blk": block migration, full disk copy (json-bool, optional)
624 - "inc": incremental disk copy (json-bool, optional)
625 - "uri": Destination URI (json-string)
629 -> { "execute": "migrate", "arguments": { "uri": "tcp:0:4446" } }
634 (1) The 'query-migrate' command should be used to check migration's progress
635 and final result (this information is provided by the 'status' member)
636 (2) All boolean arguments default to false
637 (3) The user Monitor's "detach" argument is invalid in QMP and should not
643 .name = "migrate_cancel",
645 .mhandler.cmd_new = qmp_marshal_input_migrate_cancel,
652 Cancel the current migration.
658 -> { "execute": "migrate_cancel" }
663 .name = "migrate-set-cache-size",
664 .args_type = "value:o",
665 .mhandler.cmd_new = qmp_marshal_input_migrate_set_cache_size,
669 migrate-set-cache-size
670 ----------------------
672 Set cache size to be used by XBZRLE migration, the cache size will be rounded
673 down to the nearest power of 2
677 - "value": cache size in bytes (json-int)
681 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
686 .name = "query-migrate-cache-size",
688 .mhandler.cmd_new = qmp_marshal_input_query_migrate_cache_size,
692 query-migrate-cache-size
693 ------------------------
695 Show cache size to be used by XBZRLE migration
697 returns a json-object with the following information:
702 -> { "execute": "query-migrate-cache-size" }
703 <- { "return": 67108864 }
708 .name = "migrate_set_speed",
709 .args_type = "value:o",
710 .mhandler.cmd_new = qmp_marshal_input_migrate_set_speed,
717 Set maximum speed for migrations.
721 - "value": maximum speed, in bytes per second (json-int)
725 -> { "execute": "migrate_set_speed", "arguments": { "value": 1024 } }
731 .name = "migrate_set_downtime",
732 .args_type = "value:T",
733 .mhandler.cmd_new = qmp_marshal_input_migrate_set_downtime,
740 Set maximum tolerated downtime (in seconds) for migrations.
744 - "value": maximum downtime (json-number)
748 -> { "execute": "migrate_set_downtime", "arguments": { "value": 0.1 } }
754 .name = "client_migrate_info",
755 .args_type = "protocol:s,hostname:s,port:i?,tls-port:i?,cert-subject:s?",
756 .params = "protocol hostname port tls-port cert-subject",
757 .help = "send migration info to spice/vnc client",
758 .user_print = monitor_user_noop,
759 .mhandler.cmd_async = client_migrate_info,
760 .flags = MONITOR_CMD_ASYNC,
767 Set the spice/vnc connection info for the migration target. The spice/vnc
768 server will ask the spice/vnc client to automatically reconnect using the
769 new parameters (if specified) once the vm migration finished successfully.
773 - "protocol": protocol: "spice" or "vnc" (json-string)
774 - "hostname": migration target hostname (json-string)
775 - "port": spice/vnc tcp port for plaintext channels (json-int, optional)
776 - "tls-port": spice tcp port for tls-secured channels (json-int, optional)
777 - "cert-subject": server certificate subject (json-string, optional)
781 -> { "execute": "client_migrate_info",
782 "arguments": { "protocol": "spice",
783 "hostname": "virt42.lab.kraxel.org",
790 .name = "dump-guest-memory",
791 .args_type = "paging:b,protocol:s,begin:i?,end:i?",
792 .params = "-p protocol [begin] [length]",
793 .help = "dump guest memory to file",
794 .user_print = monitor_user_noop,
795 .mhandler.cmd_new = qmp_marshal_input_dump_guest_memory,
802 Dump guest memory to file. The file can be processed with crash or gdb.
806 - "paging": do paging to get guest's memory mapping (json-bool)
807 - "protocol": destination file(started with "file:") or destination file
808 descriptor (started with "fd:") (json-string)
809 - "begin": the starting physical address. It's optional, and should be specified
810 with length together (json-int)
811 - "length": the memory size, in bytes. It's optional, and should be specified
812 with begin together (json-int)
816 -> { "execute": "dump-guest-memory", "arguments": { "protocol": "fd:dump" } }
821 (1) All boolean arguments default to false
826 .name = "netdev_add",
827 .args_type = "netdev:O",
828 .mhandler.cmd_new = qmp_netdev_add,
835 Add host network device.
839 - "type": the device type, "tap", "user", ... (json-string)
840 - "id": the device's ID, must be unique (json-string)
845 -> { "execute": "netdev_add", "arguments": { "type": "user", "id": "netdev1" } }
848 Note: The supported device options are the same ones supported by the '-netdev'
849 command-line argument, which are listed in the '-help' output or QEMU's
855 .name = "netdev_del",
857 .mhandler.cmd_new = qmp_marshal_input_netdev_del,
864 Remove host network device.
868 - "id": the device's ID, must be unique (json-string)
872 -> { "execute": "netdev_del", "arguments": { "id": "netdev1" } }
879 .name = "block_resize",
880 .args_type = "device:B,size:o",
881 .mhandler.cmd_new = qmp_marshal_input_block_resize,
888 Resize a block image while a guest is running.
892 - "device": the device's ID, must be unique (json-string)
897 -> { "execute": "block_resize", "arguments": { "device": "scratch", "size": 1073741824 } }
903 .name = "block-stream",
904 .args_type = "device:B,base:s?,speed:o?,on-error:s?",
905 .mhandler.cmd_new = qmp_marshal_input_block_stream,
909 .name = "block-commit",
910 .args_type = "device:B,base:s?,top:s,speed:o?",
911 .mhandler.cmd_new = qmp_marshal_input_block_commit,
915 .name = "drive-backup",
916 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
917 "on-source-error:s?,on-target-error:s?",
918 .mhandler.cmd_new = qmp_marshal_input_drive_backup,
925 Start a point-in-time copy of a block device to a new destination. The
926 status of ongoing drive-backup operations can be checked with
927 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
928 The operation can be stopped before it has completed using the
929 block-job-cancel command.
933 - "device": the name of the device which should be copied.
935 - "target": the target of the new image. If the file exists, or if it is a
936 device, the existing file/device will be used as the new
937 destination. If it does not exist, a new file will be created.
939 - "format": the format of the new destination, default is to probe if 'mode' is
940 'existing', else the format of the source
941 (json-string, optional)
942 - "sync": what parts of the disk image should be copied to the destination;
943 possibilities include "full" for all the disk, "top" for only the sectors
944 allocated in the topmost image, or "none" to only replicate new I/O
946 - "mode": whether and how QEMU should create a new image
947 (NewImageMode, optional, default 'absolute-paths')
948 - "speed": the maximum speed, in bytes per second (json-int, optional)
949 - "on-source-error": the action to take on an error on the source, default
950 'report'. 'stop' and 'enospc' can only be used
951 if the block device supports io-status.
952 (BlockdevOnError, optional)
953 - "on-target-error": the action to take on an error on the target, default
954 'report' (no limitations, since this applies to
955 a different block device than device).
956 (BlockdevOnError, optional)
959 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
960 "target": "backup.img" } }
965 .name = "block-job-set-speed",
966 .args_type = "device:B,speed:o",
967 .mhandler.cmd_new = qmp_marshal_input_block_job_set_speed,
971 .name = "block-job-cancel",
972 .args_type = "device:B,force:b?",
973 .mhandler.cmd_new = qmp_marshal_input_block_job_cancel,
976 .name = "block-job-pause",
977 .args_type = "device:B",
978 .mhandler.cmd_new = qmp_marshal_input_block_job_pause,
981 .name = "block-job-resume",
982 .args_type = "device:B",
983 .mhandler.cmd_new = qmp_marshal_input_block_job_resume,
986 .name = "block-job-complete",
987 .args_type = "device:B",
988 .mhandler.cmd_new = qmp_marshal_input_block_job_complete,
991 .name = "transaction",
992 .args_type = "actions:q",
993 .mhandler.cmd_new = qmp_marshal_input_transaction,
1000 Atomically operate on one or more block devices. The only supported
1001 operation for now is snapshotting. If there is any failure performing
1002 any of the operations, all snapshots for the group are abandoned, and
1003 the original disks pre-snapshot attempt are used.
1005 A list of dictionaries is accepted, that contains the actions to be performed.
1006 For snapshots this is the device, the file to use for the new snapshot,
1007 and the format. The default format, if not specified, is qcow2.
1009 Each new snapshot defaults to being created by QEMU (wiping any
1010 contents if the file already exists), but it is also possible to reuse
1011 an externally-created file. In the latter case, you should ensure that
1012 the new image file has the same contents as the current one; QEMU cannot
1013 perform any meaningful check. Typically this is achieved by using the
1014 current image file as the backing file for the new image.
1019 - "type": the operation to perform. The only supported
1020 value is "blockdev-snapshot-sync". (json-string)
1021 - "data": a dictionary. The contents depend on the value
1022 of "type". When "type" is "blockdev-snapshot-sync":
1023 - "device": device name to snapshot (json-string)
1024 - "snapshot-file": name of new image file (json-string)
1025 - "format": format of new image (json-string, optional)
1026 - "mode": whether and how QEMU should create the snapshot file
1027 (NewImageMode, optional, default "absolute-paths")
1031 -> { "execute": "transaction",
1032 "arguments": { "actions": [
1033 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
1034 "snapshot-file": "/some/place/my-image",
1035 "format": "qcow2" } },
1036 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
1037 "snapshot-file": "/some/place/my-image2",
1039 "format": "qcow2" } } ] } }
1045 .name = "blockdev-snapshot-sync",
1046 .args_type = "device:B,snapshot-file:s,format:s?,mode:s?",
1047 .mhandler.cmd_new = qmp_marshal_input_blockdev_snapshot_sync,
1051 blockdev-snapshot-sync
1052 ----------------------
1054 Synchronous snapshot of a block device. snapshot-file specifies the
1055 target of the new image. If the file exists, or if it is a device, the
1056 snapshot will be created in the existing file/device. If does not
1057 exist, a new file will be created. format specifies the format of the
1058 snapshot image, default is qcow2.
1062 - "device": device name to snapshot (json-string)
1063 - "snapshot-file": name of new image file (json-string)
1064 - "mode": whether and how QEMU should create the snapshot file
1065 (NewImageMode, optional, default "absolute-paths")
1066 - "format": format of new image (json-string, optional)
1070 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1072 "/some/place/my-image",
1073 "format": "qcow2" } }
1079 .name = "drive-mirror",
1080 .args_type = "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1081 "on-source-error:s?,on-target-error:s?,"
1082 "granularity:i?,buf-size:i?",
1083 .mhandler.cmd_new = qmp_marshal_input_drive_mirror,
1090 Start mirroring a block device's writes to a new destination. target
1091 specifies the target of the new image. If the file exists, or if it is
1092 a device, it will be used as the new destination for writes. If it does not
1093 exist, a new file will be created. format specifies the format of the
1094 mirror image, default is to probe if mode='existing', else the format
1099 - "device": device name to operate on (json-string)
1100 - "target": name of new image file (json-string)
1101 - "format": format of new image (json-string, optional)
1102 - "mode": how an image file should be created into the target
1103 file/device (NewImageMode, optional, default 'absolute-paths')
1104 - "speed": maximum speed of the streaming job, in bytes per second
1106 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1107 - "buf_size": maximum amount of data in flight from source to target, in bytes
1108 (json-int, default 10M)
1109 - "sync": what parts of the disk image should be copied to the destination;
1110 possibilities include "full" for all the disk, "top" for only the sectors
1111 allocated in the topmost image, or "none" to only replicate new I/O
1113 - "on-source-error": the action to take on an error on the source
1114 (BlockdevOnError, default 'report')
1115 - "on-target-error": the action to take on an error on the target
1116 (BlockdevOnError, default 'report')
1118 The default value of the granularity is the image cluster size clamped
1119 between 4096 and 65536, if the image format defines one. If the format
1120 does not define a cluster size, the default value of the granularity
1126 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1127 "target": "/some/place/my-image",
1129 "format": "qcow2" } }
1136 .args_type = "value:M",
1137 .mhandler.cmd_new = qmp_marshal_input_balloon,
1144 Request VM to change its memory allocation (in bytes).
1148 - "value": New memory allocation (json-int)
1152 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1159 .args_type = "name:s,up:b",
1160 .mhandler.cmd_new = qmp_marshal_input_set_link,
1167 Change the link status of a network adapter.
1171 - "name": network device name (json-string)
1172 - "up": status is up (json-bool)
1176 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1183 .args_type = "fdname:s",
1184 .params = "getfd name",
1185 .help = "receive a file descriptor via SCM rights and assign it a name",
1186 .mhandler.cmd_new = qmp_marshal_input_getfd,
1193 Receive a file descriptor via SCM rights and assign it a name.
1197 - "fdname": file descriptor name (json-string)
1201 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1206 (1) If the name specified by the "fdname" argument already exists,
1207 the file descriptor assigned to it will be closed and replaced
1208 by the received file descriptor.
1209 (2) The 'closefd' command can be used to explicitly close the file
1210 descriptor when it is no longer needed.
1216 .args_type = "fdname:s",
1217 .params = "closefd name",
1218 .help = "close a file descriptor previously passed via SCM rights",
1219 .mhandler.cmd_new = qmp_marshal_input_closefd,
1226 Close a file descriptor previously passed via SCM rights.
1230 - "fdname": file descriptor name (json-string)
1234 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1241 .args_type = "fdset-id:i?,opaque:s?",
1242 .params = "add-fd fdset-id opaque",
1243 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1244 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1251 Add a file descriptor, that was passed via SCM rights, to an fd set.
1255 - "fdset-id": The ID of the fd set to add the file descriptor to.
1256 (json-int, optional)
1257 - "opaque": A free-form string that can be used to describe the fd.
1258 (json-string, optional)
1260 Return a json-object with the following information:
1262 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1263 - "fd": The file descriptor that was received via SCM rights and added to the
1268 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1269 <- { "return": { "fdset-id": 1, "fd": 3 } }
1273 (1) The list of fd sets is shared by all monitor connections.
1274 (2) If "fdset-id" is not specified, a new fd set will be created.
1279 .name = "remove-fd",
1280 .args_type = "fdset-id:i,fd:i?",
1281 .params = "remove-fd fdset-id fd",
1282 .help = "Remove a file descriptor from an fd set",
1283 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1290 Remove a file descriptor from an fd set.
1294 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1296 - "fd": The file descriptor that is to be removed. (json-int, optional)
1300 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1305 (1) The list of fd sets is shared by all monitor connections.
1306 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1312 .name = "query-fdsets",
1314 .help = "Return information describing all fd sets",
1315 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1322 Return information describing all fd sets.
1328 -> { "execute": "query-fdsets" }
1334 "opaque": "rdonly:/path/to/file"
1338 "opaque": "rdwr:/path/to/file"
1357 Note: The list of fd sets is shared by all monitor connections.
1362 .name = "block_passwd",
1363 .args_type = "device:B,password:s",
1364 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1371 Set the password of encrypted block devices.
1375 - "device": device name (json-string)
1376 - "password": password (json-string)
1380 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1381 "password": "12345" } }
1387 .name = "block_set_io_throttle",
1388 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1389 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1393 block_set_io_throttle
1396 Change I/O throttle limits for a block drive.
1400 - "device": device name (json-string)
1401 - "bps": total throughput limit in bytes per second(json-int)
1402 - "bps_rd": read throughput limit in bytes per second(json-int)
1403 - "bps_wr": read throughput limit in bytes per second(json-int)
1404 - "iops": total I/O operations per second(json-int)
1405 - "iops_rd": read I/O operations per second(json-int)
1406 - "iops_wr": write I/O operations per second(json-int)
1410 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1422 .name = "set_password",
1423 .args_type = "protocol:s,password:s,connected:s?",
1424 .mhandler.cmd_new = qmp_marshal_input_set_password,
1431 Set the password for vnc/spice protocols.
1435 - "protocol": protocol name (json-string)
1436 - "password": password (json-string)
1437 - "connected": [ keep | disconnect | fail ] (josn-string, optional)
1441 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
1442 "password": "secret" } }
1448 .name = "expire_password",
1449 .args_type = "protocol:s,time:s",
1450 .mhandler.cmd_new = qmp_marshal_input_expire_password,
1457 Set the password expire time for vnc/spice protocols.
1461 - "protocol": protocol name (json-string)
1462 - "time": [ now | never | +secs | secs ] (json-string)
1466 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1473 .name = "add_client",
1474 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1475 .mhandler.cmd_new = qmp_marshal_input_add_client,
1482 Add a graphics client
1486 - "protocol": protocol name (json-string)
1487 - "fdname": file descriptor name (json-string)
1488 - "skipauth": whether to skip authentication (json-bool, optional)
1489 - "tls": whether to perform TLS (json-bool, optional)
1493 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
1494 "fdname": "myclient" } }
1499 .name = "qmp_capabilities",
1502 .help = "enable QMP capabilities",
1503 .user_print = monitor_user_noop,
1504 .mhandler.cmd_new = do_qmp_capabilities,
1511 Enable QMP capabilities.
1517 -> { "execute": "qmp_capabilities" }
1520 Note: This command must be issued before issuing any other command.
1525 .name = "human-monitor-command",
1526 .args_type = "command-line:s,cpu-index:i?",
1527 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
1531 human-monitor-command
1532 ---------------------
1534 Execute a Human Monitor command.
1538 - command-line: the command name and its arguments, just like the
1539 Human Monitor's shell (json-string)
1540 - cpu-index: select the CPU number to be used by commands which access CPU
1541 data, like 'info registers'. The Monitor selects CPU 0 if this
1542 argument is not provided (json-int, optional)
1546 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1547 <- { "return": "kvm support: enabled\r\n" }
1551 (1) The Human Monitor is NOT an stable interface, this means that command
1552 names, arguments and responses can change or be removed at ANY time.
1553 Applications that rely on long term stability guarantees should NOT
1558 o This command is stateless, this means that commands that depend
1559 on state information (such as getfd) might not work
1561 o Commands that prompt the user for data (eg. 'cont' when the block
1562 device is encrypted) don't currently work
1567 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1568 HXCOMM this! We will possibly move query commands definitions inside those
1569 HXCOMM sections, just like regular commands.
1579 Return a json-object with the following information:
1581 - "qemu": A json-object containing three integer values:
1582 - "major": QEMU's major version (json-int)
1583 - "minor": QEMU's minor version (json-int)
1584 - "micro": QEMU's micro version (json-int)
1585 - "package": package's version (json-string)
1589 -> { "execute": "query-version" }
1604 .name = "query-version",
1606 .mhandler.cmd_new = qmp_marshal_input_query_version,
1613 List QMP available commands.
1615 Each command is represented by a json-object, the returned value is a json-array
1618 Each json-object contain:
1620 - "name": command's name (json-string)
1624 -> { "execute": "query-commands" }
1628 "name":"query-balloon"
1631 "name":"system_powerdown"
1636 Note: This example has been shortened as the real response is too long.
1641 .name = "query-commands",
1643 .mhandler.cmd_new = qmp_marshal_input_query_commands,
1650 List QMP available events.
1652 Each event is represented by a json-object, the returned value is a json-array
1655 Each json-object contains:
1657 - "name": event's name (json-string)
1661 -> { "execute": "query-events" }
1673 Note: This example has been shortened as the real response is too long.
1678 .name = "query-events",
1680 .mhandler.cmd_new = qmp_marshal_input_query_events,
1687 Each device is represented by a json-object. The returned value is a json-array
1690 Each json-object contain the following:
1692 - "label": device's label (json-string)
1693 - "filename": device's file (json-string)
1697 -> { "execute": "query-chardev" }
1714 .name = "query-chardev",
1716 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
1723 Show the block devices.
1725 Each block device information is stored in a json-object and the returned value
1726 is a json-array of all devices.
1728 Each json-object contain the following:
1730 - "device": device name (json-string)
1731 - "type": device type (json-string)
1732 - deprecated, retained for backward compatibility
1733 - Possible values: "unknown"
1734 - "removable": true if the device is removable, false otherwise (json-bool)
1735 - "locked": true if the device is locked, false otherwise (json-bool)
1736 - "tray_open": only present if removable, true if the device has a tray,
1737 and it is open (json-bool)
1738 - "inserted": only present if the device is inserted, it is a json-object
1739 containing the following:
1740 - "file": device file name (json-string)
1741 - "ro": true if read-only, false otherwise (json-bool)
1742 - "drv": driver format name (json-string)
1743 - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1744 "file", "file", "ftp", "ftps", "host_cdrom",
1745 "host_device", "host_floppy", "http", "https",
1746 "nbd", "parallels", "qcow", "qcow2", "raw",
1747 "tftp", "vdi", "vmdk", "vpc", "vvfat"
1748 - "backing_file": backing file name (json-string, optional)
1749 - "backing_file_depth": number of files in the backing file chain (json-int)
1750 - "encrypted": true if encrypted, false otherwise (json-bool)
1751 - "bps": limit total bytes per second (json-int)
1752 - "bps_rd": limit read bytes per second (json-int)
1753 - "bps_wr": limit write bytes per second (json-int)
1754 - "iops": limit total I/O operations per second (json-int)
1755 - "iops_rd": limit read operations per second (json-int)
1756 - "iops_wr": limit write operations per second (json-int)
1757 - "image": the detail of the image, it is a json-object containing
1759 - "filename": image file name (json-string)
1760 - "format": image format (json-string)
1761 - "virtual-size": image capacity in bytes (json-int)
1762 - "dirty-flag": true if image is not cleanly closed, not present
1763 means clean (json-bool, optional)
1764 - "actual-size": actual size on disk in bytes of the image, not
1765 present when image does not support thin
1766 provision (json-int, optional)
1767 - "cluster-size": size of a cluster in bytes, not present if image
1768 format does not support it (json-int, optional)
1769 - "encrypted": true if the image is encrypted, not present means
1770 false or the image format does not support
1771 encryption (json-bool, optional)
1772 - "backing_file": backing file name, not present means no backing
1773 file is used or the image format does not
1774 support backing file chain
1775 (json-string, optional)
1776 - "full-backing-filename": full path of the backing file, not
1777 present if it equals backing_file or no
1778 backing file is used
1779 (json-string, optional)
1780 - "backing-filename-format": the format of the backing file, not
1781 present means unknown or no backing
1782 file (json-string, optional)
1783 - "snapshots": the internal snapshot info, it is an optional list
1784 of json-object containing the following:
1785 - "id": unique snapshot id (json-string)
1786 - "name": snapshot name (json-string)
1787 - "vm-state-size": size of the VM state in bytes (json-int)
1788 - "date-sec": UTC date of the snapshot in seconds (json-int)
1789 - "date-nsec": fractional part in nanoseconds to be used with
1791 - "vm-clock-sec": VM clock relative to boot in seconds
1793 - "vm-clock-nsec": fractional part in nanoseconds to be used
1794 with vm-clock-sec (json-int)
1795 - "backing-image": the detail of the backing image, it is an
1796 optional json-object only present when a
1797 backing image present for this image
1799 - "io-status": I/O operation status, only present if the device supports it
1800 and the VM is configured to stop on errors. It's always reset
1801 to "ok" when the "cont" command is issued (json_string, optional)
1802 - Possible values: "ok", "failed", "nospace"
1806 -> { "execute": "query-block" }
1811 "device":"ide0-hd0",
1818 "file":"disks/test.qcow2",
1819 "backing_file_depth":1,
1827 "filename":"disks/test.qcow2",
1829 "virtual-size":2048000,
1830 "backing_file":"base.qcow2",
1831 "full-backing-filename":"disks/base.qcow2",
1832 "backing-filename-format:"qcow2",
1836 "name": "snapshot1",
1838 "date-sec": 10000200,
1840 "vm-clock-sec": 206,
1845 "filename":"disks/base.qcow2",
1847 "virtual-size":2048000
1855 "device":"ide1-cd0",
1878 .name = "query-block",
1880 .mhandler.cmd_new = qmp_marshal_input_query_block,
1887 Show block device statistics.
1889 Each device statistic information is stored in a json-object and the returned
1890 value is a json-array of all devices.
1892 Each json-object contain the following:
1894 - "device": device name (json-string)
1895 - "stats": A json-object with the statistics information, it contains:
1896 - "rd_bytes": bytes read (json-int)
1897 - "wr_bytes": bytes written (json-int)
1898 - "rd_operations": read operations (json-int)
1899 - "wr_operations": write operations (json-int)
1900 - "flush_operations": cache flush operations (json-int)
1901 - "wr_total_time_ns": total time spend on writes in nano-seconds (json-int)
1902 - "rd_total_time_ns": total time spend on reads in nano-seconds (json-int)
1903 - "flush_total_time_ns": total time spend on cache flushes in nano-seconds (json-int)
1904 - "wr_highest_offset": Highest offset of a sector written since the
1905 BlockDriverState has been opened (json-int)
1906 - "parent": Contains recursively the statistics of the underlying
1907 protocol (e.g. the host file for a qcow2 image). If there is
1908 no underlying protocol, this field is omitted
1909 (json-object, optional)
1913 -> { "execute": "query-blockstats" }
1917 "device":"ide0-hd0",
1920 "wr_highest_offset":3686448128,
1922 "wr_operations":751,
1923 "rd_bytes":122567168,
1924 "rd_operations":36772
1925 "wr_total_times_ns":313253456
1926 "rd_total_times_ns":3465673657
1927 "flush_total_times_ns":49653
1928 "flush_operations":61,
1932 "wr_highest_offset":2821110784,
1934 "wr_operations":692,
1935 "rd_bytes":122739200,
1936 "rd_operations":36604
1937 "flush_operations":51,
1938 "wr_total_times_ns":313253456
1939 "rd_total_times_ns":3465673657
1940 "flush_total_times_ns":49653
1944 "device":"ide1-cd0",
1946 "wr_highest_offset":0,
1951 "flush_operations":0,
1952 "wr_total_times_ns":0
1953 "rd_total_times_ns":0
1954 "flush_total_times_ns":0
1960 "wr_highest_offset":0,
1965 "flush_operations":0,
1966 "wr_total_times_ns":0
1967 "rd_total_times_ns":0
1968 "flush_total_times_ns":0
1974 "wr_highest_offset":0,
1979 "flush_operations":0,
1980 "wr_total_times_ns":0
1981 "rd_total_times_ns":0
1982 "flush_total_times_ns":0
1991 .name = "query-blockstats",
1993 .mhandler.cmd_new = qmp_marshal_input_query_blockstats,
2000 Show CPU information.
2002 Return a json-array. Each CPU is represented by a json-object, which contains:
2004 - "CPU": CPU index (json-int)
2005 - "current": true if this is the current CPU, false otherwise (json-bool)
2006 - "halted": true if the cpu is halted, false otherwise (json-bool)
2007 - Current program counter. The key's name depends on the architecture:
2008 "pc": i386/x86_64 (json-int)
2009 "nip": PPC (json-int)
2010 "pc" and "npc": sparc (json-int)
2011 "PC": mips (json-int)
2012 - "thread_id": ID of the underlying host thread (json-int)
2016 -> { "execute": "query-cpus" }
2039 .name = "query-cpus",
2041 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
2048 PCI buses and devices information.
2050 The returned value is a json-array of all buses. Each bus is represented by
2051 a json-object, which has a key with a json-array of all PCI devices attached
2052 to it. Each device is represented by a json-object.
2054 The bus json-object contains the following:
2056 - "bus": bus number (json-int)
2057 - "devices": a json-array of json-objects, each json-object represents a
2060 The PCI device json-object contains the following:
2062 - "bus": identical to the parent's bus number (json-int)
2063 - "slot": slot number (json-int)
2064 - "function": function number (json-int)
2065 - "class_info": a json-object containing:
2066 - "desc": device class description (json-string, optional)
2067 - "class": device class number (json-int)
2068 - "id": a json-object containing:
2069 - "device": device ID (json-int)
2070 - "vendor": vendor ID (json-int)
2071 - "irq": device's IRQ if assigned (json-int, optional)
2072 - "qdev_id": qdev id string (json-string)
2073 - "pci_bridge": It's a json-object, only present if this device is a
2074 PCI bridge, contains:
2075 - "bus": bus number (json-int)
2076 - "secondary": secondary bus number (json-int)
2077 - "subordinate": subordinate bus number (json-int)
2078 - "io_range": I/O memory range information, a json-object with the
2080 - "base": base address, in bytes (json-int)
2081 - "limit": limit address, in bytes (json-int)
2082 - "memory_range": memory range information, a json-object with the
2084 - "base": base address, in bytes (json-int)
2085 - "limit": limit address, in bytes (json-int)
2086 - "prefetchable_range": Prefetchable memory range information, a
2087 json-object with the following members:
2088 - "base": base address, in bytes (json-int)
2089 - "limit": limit address, in bytes (json-int)
2090 - "devices": a json-array of PCI devices if there's any attached, each
2091 each element is represented by a json-object, which contains
2092 the same members of the 'PCI device json-object' described
2094 - "regions": a json-array of json-objects, each json-object represents a
2095 memory region of this device
2097 The memory range json-object contains the following:
2099 - "base": base memory address (json-int)
2100 - "limit": limit value (json-int)
2102 The region json-object can be an I/O region or a memory region, an I/O region
2103 json-object contains the following:
2105 - "type": "io" (json-string, fixed)
2106 - "bar": BAR number (json-int)
2107 - "address": memory address (json-int)
2108 - "size": memory size (json-int)
2110 A memory region json-object contains the following:
2112 - "type": "memory" (json-string, fixed)
2113 - "bar": BAR number (json-int)
2114 - "address": memory address (json-int)
2115 - "size": memory size (json-int)
2116 - "mem_type_64": true or false (json-bool)
2117 - "prefetch": true or false (json-bool)
2121 -> { "execute": "query-pci" }
2133 "desc":"Host bridge"
2167 "desc":"IDE controller"
2189 "desc":"VGA controller"
2199 "mem_type_64":false,
2202 "address":4026531840,
2207 "mem_type_64":false,
2210 "address":4060086272,
2215 "mem_type_64":false,
2230 "desc":"RAM controller"
2251 Note: This example has been shortened as the real response is too long.
2256 .name = "query-pci",
2258 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2265 Show KVM information.
2267 Return a json-object with the following information:
2269 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
2270 - "present": true if QEMU has KVM support, false otherwise (json-bool)
2274 -> { "execute": "query-kvm" }
2275 <- { "return": { "enabled": true, "present": true } }
2280 .name = "query-kvm",
2282 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2289 Return a json-object with the following information:
2291 - "running": true if the VM is running, or false if it is paused (json-bool)
2292 - "singlestep": true if the VM is in single step mode,
2293 false otherwise (json-bool)
2294 - "status": one of the following values (json-string)
2295 "debug" - QEMU is running on a debugger
2296 "inmigrate" - guest is paused waiting for an incoming migration
2297 "internal-error" - An internal error that prevents further guest
2298 execution has occurred
2299 "io-error" - the last IOP has failed and the device is configured
2300 to pause on I/O errors
2301 "paused" - guest has been paused via the 'stop' command
2302 "postmigrate" - guest is paused following a successful 'migrate'
2303 "prelaunch" - QEMU was started with -S and guest has not started
2304 "finish-migrate" - guest is paused to finish the migration process
2305 "restore-vm" - guest is paused to restore VM state
2306 "running" - guest is actively running
2307 "save-vm" - guest is paused to save the VM state
2308 "shutdown" - guest is shut down (and -no-shutdown is in use)
2309 "watchdog" - the watchdog action is configured to pause and
2314 -> { "execute": "query-status" }
2315 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
2320 .name = "query-status",
2322 .mhandler.cmd_new = qmp_marshal_input_query_status,
2329 Show VM mice information.
2331 Each mouse is represented by a json-object, the returned value is a json-array
2334 The mouse json-object contains the following:
2336 - "name": mouse's name (json-string)
2337 - "index": mouse's index (json-int)
2338 - "current": true if this mouse is receiving events, false otherwise (json-bool)
2339 - "absolute": true if the mouse generates absolute input events (json-bool)
2343 -> { "execute": "query-mice" }
2347 "name":"QEMU Microsoft Mouse",
2353 "name":"QEMU PS/2 Mouse",
2364 .name = "query-mice",
2366 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2373 Show VNC server information.
2375 Return a json-object with server information. Connected clients are returned
2376 as a json-array of json-objects.
2378 The main json-object contains the following:
2380 - "enabled": true or false (json-bool)
2381 - "host": server's IP address (json-string)
2382 - "family": address family (json-string)
2383 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2384 - "service": server's port number (json-string)
2385 - "auth": authentication method (json-string)
2386 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2387 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2388 "vencrypt+plain", "vencrypt+tls+none",
2389 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2390 "vencrypt+tls+vnc", "vencrypt+x509+none",
2391 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2392 "vencrypt+x509+vnc", "vnc"
2393 - "clients": a json-array of all connected clients
2395 Clients are described by a json-object, each one contain the following:
2397 - "host": client's IP address (json-string)
2398 - "family": address family (json-string)
2399 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2400 - "service": client's port number (json-string)
2401 - "x509_dname": TLS dname (json-string, optional)
2402 - "sasl_username": SASL username (json-string, optional)
2406 -> { "execute": "query-vnc" }
2427 .name = "query-vnc",
2429 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2436 Show SPICE server information.
2438 Return a json-object with server information. Connected clients are returned
2439 as a json-array of json-objects.
2441 The main json-object contains the following:
2443 - "enabled": true or false (json-bool)
2444 - "host": server's IP address (json-string)
2445 - "port": server's port number (json-int, optional)
2446 - "tls-port": server's port number (json-int, optional)
2447 - "auth": authentication method (json-string)
2448 - Possible values: "none", "spice"
2449 - "channels": a json-array of all active channels clients
2451 Channels are described by a json-object, each one contain the following:
2453 - "host": client's IP address (json-string)
2454 - "family": address family (json-string)
2455 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2456 - "port": client's port number (json-string)
2457 - "connection-id": spice connection id. All channels with the same id
2458 belong to the same spice session (json-int)
2459 - "channel-type": channel type. "1" is the main control channel, filter for
2460 this one if you want track spice sessions only (json-int)
2461 - "channel-id": channel id. Usually "0", might be different needed when
2462 multiple channels of the same type exist, such as multiple
2463 display channels in a multihead setup (json-int)
2464 - "tls": whevener the channel is encrypted (json-bool)
2468 -> { "execute": "query-spice" }
2481 "connection-id": 1804289383,
2482 "host": "127.0.0.1",
2490 "connection-id": 1804289383,
2491 "host": "127.0.0.1",
2495 [ ... more channels follow ... ]
2502 #if defined(CONFIG_SPICE)
2504 .name = "query-spice",
2506 .mhandler.cmd_new = qmp_marshal_input_query_spice,
2516 Return a json-object with the following information:
2518 - "name": VM's name (json-string, optional)
2522 -> { "execute": "query-name" }
2523 <- { "return": { "name": "qemu-name" } }
2528 .name = "query-name",
2530 .mhandler.cmd_new = qmp_marshal_input_query_name,
2539 Return a json-object with the following information:
2541 - "UUID": Universally Unique Identifier (json-string)
2545 -> { "execute": "query-uuid" }
2546 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2551 .name = "query-uuid",
2553 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
2557 query-command-line-options
2558 --------------------------
2560 Show command line option schema.
2562 Return a json-array of command line option schema for all options (or for
2563 the given option), returning an error if the given option doesn't exist.
2565 Each array entry contains the following:
2567 - "option": option name (json-string)
2568 - "parameters": a json-array describes all parameters of the option:
2569 - "name": parameter name (json-string)
2570 - "type": parameter type (one of 'string', 'boolean', 'number',
2572 - "help": human readable description of the parameter
2573 (json-string, optional)
2577 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
2586 "name": "bootindex",
2590 "option": "option-rom"
2598 .name = "query-command-line-options",
2599 .args_type = "option:s?",
2600 .mhandler.cmd_new = qmp_marshal_input_query_command_line_options,
2609 Return a json-object. If migration is active there will be another json-object
2610 with RAM migration status and if block migration is active another one with
2611 block migration status.
2613 The main json-object contains the following:
2615 - "status": migration status (json-string)
2616 - Possible values: "active", "completed", "failed", "cancelled"
2617 - "total-time": total amount of ms since migration started. If
2618 migration has ended, it returns the total migration
2620 - "downtime": only present when migration has finished correctly
2621 total amount in ms for downtime that happened (json-int)
2622 - "expected-downtime": only present while migration is active
2623 total amount in ms for downtime that was calculated on
2624 the last bitmap round (json-int)
2625 - "ram": only present if "status" is "active", it is a json-object with the
2626 following RAM information:
2627 - "transferred": amount transferred in bytes (json-int)
2628 - "remaining": amount remaining to transfer in bytes (json-int)
2629 - "total": total amount of memory in bytes (json-int)
2630 - "duplicate": number of pages filled entirely with the same
2632 These are sent over the wire much more efficiently.
2633 - "skipped": number of skipped zero pages (json-int)
2634 - "normal" : number of whole pages transferred. I.e. they
2635 were not sent as duplicate or xbzrle pages (json-int)
2636 - "normal-bytes" : number of bytes transferred in whole
2637 pages. This is just normal pages times size of one page,
2638 but this way upper levels don't need to care about page
2640 - "disk": only present if "status" is "active" and it is a block migration,
2641 it is a json-object with the following disk information:
2642 - "transferred": amount transferred in bytes (json-int)
2643 - "remaining": amount remaining to transfer in bytes json-int)
2644 - "total": total disk size in bytes (json-int)
2645 - "xbzrle-cache": only present if XBZRLE is active.
2646 It is a json-object with the following XBZRLE information:
2647 - "cache-size": XBZRLE cache size in bytes
2648 - "bytes": number of bytes transferred for XBZRLE compressed pages
2649 - "pages": number of XBZRLE compressed pages
2650 - "cache-miss": number of XBRZRLE page cache misses
2651 - "overflow": number of times XBZRLE overflows. This means
2652 that the XBZRLE encoding was bigger than just sent the
2653 whole page, and then we sent the whole page instead (as as
2658 1. Before the first migration
2660 -> { "execute": "query-migrate" }
2663 2. Migration is done and has succeeded
2665 -> { "execute": "query-migrate" }
2667 "status": "completed",
2676 "normal-bytes":123456
2681 3. Migration is done and has failed
2683 -> { "execute": "query-migrate" }
2684 <- { "return": { "status": "failed" } }
2686 4. Migration is being performed and is not a block migration:
2688 -> { "execute": "query-migrate" }
2697 "expected-downtime":12345,
2700 "normal-bytes":123456
2705 5. Migration is being performed and is a block migration:
2707 -> { "execute": "query-migrate" }
2713 "remaining":1053304,
2716 "expected-downtime":12345,
2719 "normal-bytes":123456
2723 "remaining":20880384,
2729 6. Migration is being performed and XBZRLE is active:
2731 -> { "execute": "query-migrate" }
2735 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
2738 "remaining":1053304,
2741 "expected-downtime":12345,
2744 "normal-bytes":3412992
2747 "cache-size":67108864,
2759 .name = "query-migrate",
2761 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
2765 migrate-set-capabilities
2766 ------------------------
2768 Enable/Disable migration capabilities
2770 - "xbzrle": XBZRLE support
2776 -> { "execute": "migrate-set-capabilities" , "arguments":
2777 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
2782 .name = "migrate-set-capabilities",
2783 .args_type = "capabilities:O",
2784 .params = "capability:s,state:b",
2785 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
2788 query-migrate-capabilities
2789 --------------------------
2791 Query current migration capabilities
2793 - "capabilities": migration capabilities state
2794 - "xbzrle" : XBZRLE state (json-bool)
2800 -> { "execute": "query-migrate-capabilities" }
2801 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
2806 .name = "query-migrate-capabilities",
2808 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
2815 Show balloon information.
2817 Make an asynchronous request for balloon info. When the request completes a
2818 json-object will be returned containing the following data:
2820 - "actual": current balloon value in bytes (json-int)
2824 -> { "execute": "query-balloon" }
2827 "actual":1073741824,
2834 .name = "query-balloon",
2836 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
2840 .name = "query-block-jobs",
2842 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
2847 .args_type = "path:s",
2848 .mhandler.cmd_new = qmp_marshal_input_qom_list,
2853 .args_type = "path:s,property:s,value:q",
2854 .mhandler.cmd_new = qmp_qom_set,
2859 .args_type = "path:s,property:s",
2860 .mhandler.cmd_new = qmp_qom_get,
2864 .name = "nbd-server-start",
2865 .args_type = "addr:q",
2866 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
2869 .name = "nbd-server-add",
2870 .args_type = "device:B,writable:b?",
2871 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
2874 .name = "nbd-server-stop",
2876 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
2880 .name = "change-vnc-password",
2881 .args_type = "password:s",
2882 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
2885 .name = "qom-list-types",
2886 .args_type = "implements:s?,abstract:b?",
2887 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
2891 .name = "device-list-properties",
2892 .args_type = "typename:s",
2893 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
2897 .name = "query-machines",
2899 .mhandler.cmd_new = qmp_marshal_input_query_machines,
2903 .name = "query-cpu-definitions",
2905 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
2909 .name = "query-target",
2911 .mhandler.cmd_new = qmp_marshal_input_query_target,
2915 .name = "query-tpm",
2917 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
2924 Return information about the TPM device.
2930 -> { "execute": "query-tpm" }
2933 { "model": "tpm-tis",
2935 { "type": "passthrough",
2937 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
2949 .name = "query-tpm-models",
2951 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
2958 Return a list of supported TPM models.
2964 -> { "execute": "query-tpm-models" }
2965 <- { "return": [ "tpm-tis" ] }
2970 .name = "query-tpm-types",
2972 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
2979 Return a list of supported TPM types.
2985 -> { "execute": "query-tpm-types" }
2986 <- { "return": [ "passthrough" ] }
2991 .name = "chardev-add",
2992 .args_type = "id:s,backend:q",
2993 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
3004 - "id": the chardev's ID, must be unique (json-string)
3005 - "backend": chardev backend type + parameters
3009 -> { "execute" : "chardev-add",
3010 "arguments" : { "id" : "foo",
3011 "backend" : { "type" : "null", "data" : {} } } }
3014 -> { "execute" : "chardev-add",
3015 "arguments" : { "id" : "bar",
3016 "backend" : { "type" : "file",
3017 "data" : { "out" : "/tmp/bar.log" } } } }
3020 -> { "execute" : "chardev-add",
3021 "arguments" : { "id" : "baz",
3022 "backend" : { "type" : "pty", "data" : {} } } }
3023 <- { "return": { "pty" : "/dev/pty/42" } }
3028 .name = "chardev-remove",
3029 .args_type = "id:s",
3030 .mhandler.cmd_new = qmp_marshal_input_chardev_remove,
3042 - "id": the chardev's ID, must exist and not be in use (json-string)
3046 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }