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
= "block-job-set-speed",
916 .args_type
= "device:B,speed:o",
917 .mhandler
.cmd_new
= qmp_marshal_input_block_job_set_speed
,
921 .name
= "block-job-cancel",
922 .args_type
= "device:B,force:b?",
923 .mhandler
.cmd_new
= qmp_marshal_input_block_job_cancel
,
926 .name
= "block-job-pause",
927 .args_type
= "device:B",
928 .mhandler
.cmd_new
= qmp_marshal_input_block_job_pause
,
931 .name
= "block-job-resume",
932 .args_type
= "device:B",
933 .mhandler
.cmd_new
= qmp_marshal_input_block_job_resume
,
936 .name
= "block-job-complete",
937 .args_type
= "device:B",
938 .mhandler
.cmd_new
= qmp_marshal_input_block_job_complete
,
941 .name
= "transaction",
942 .args_type
= "actions:q",
943 .mhandler
.cmd_new
= qmp_marshal_input_transaction
,
950 Atomically operate on one or more block devices
. The only supported
951 operation
for now is snapshotting
. If there is any failure performing
952 any of the operations
, all snapshots
for the group are abandoned
, and
953 the original disks pre
-snapshot attempt are used
.
955 A list of dictionaries is accepted
, that contains the actions to be performed
.
956 For snapshots
this is the device
, the file to use
for the
new snapshot
,
957 and the format
. The
default format
, if not specified
, is qcow2
.
959 Each
new snapshot defaults to being created by
QEMU (wiping any
960 contents
if the file already exists
), but it is also possible to reuse
961 an externally
-created file
. In the latter
case, you should ensure that
962 the
new image file has the same contents as the current one
; QEMU cannot
963 perform any meaningful check
. Typically
this is achieved by
using the
964 current image file as the backing file
for the
new image
.
969 - "type": the operation to perform
. The only supported
970 value is
"blockdev-snapshot-sync". (json
-string
)
971 - "data": a dictionary
. The contents depend on the value
972 of
"type". When
"type" is
"blockdev-snapshot-sync":
973 - "device": device name to
snapshot (json
-string
)
974 - "snapshot-file": name of
new image
file (json
-string
)
975 - "format": format of
new image (json
-string
, optional
)
976 - "mode": whether and how QEMU should create the snapshot file
977 (NewImageMode
, optional
, default "absolute-paths")
981 -> { "execute": "transaction",
982 "arguments": { "actions": [
983 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd0",
984 "snapshot-file": "/some/place/my-image",
985 "format": "qcow2" } },
986 { 'type': 'blockdev-snapshot-sync', 'data' : { "device": "ide-hd1",
987 "snapshot-file": "/some/place/my-image2",
989 "format": "qcow2" } } ] } }
995 .name
= "blockdev-snapshot-sync",
996 .args_type
= "device:B,snapshot-file:s,format:s?,mode:s?",
997 .mhandler
.cmd_new
= qmp_marshal_input_blockdev_snapshot_sync
,
1001 blockdev
-snapshot
-sync
1002 ----------------------
1004 Synchronous snapshot of a block device
. snapshot
-file specifies the
1005 target of the
new image
. If the file exists
, or
if it is a device
, the
1006 snapshot will be created
in the existing file
/device
. If does not
1007 exist
, a
new file will be created
. format specifies the format of the
1008 snapshot image
, default is qcow2
.
1012 - "device": device name to
snapshot (json
-string
)
1013 - "snapshot-file": name of
new image
file (json
-string
)
1014 - "mode": whether and how QEMU should create the snapshot file
1015 (NewImageMode
, optional
, default "absolute-paths")
1016 - "format": format of
new image (json
-string
, optional
)
1020 -> { "execute": "blockdev-snapshot-sync", "arguments": { "device": "ide-hd0",
1022 "/some/place/my-image",
1023 "format": "qcow2" } }
1029 .name
= "drive-mirror",
1030 .args_type
= "sync:s,device:B,target:s,speed:i?,mode:s?,format:s?,"
1031 "on-source-error:s?,on-target-error:s?,"
1032 "granularity:i?,buf-size:i?",
1033 .mhandler
.cmd_new
= qmp_marshal_input_drive_mirror
,
1040 Start mirroring a block device
's writes to a new destination. target
1041 specifies the target of the new image. If the file exists, or if it is
1042 a device, it will be used as the new destination for writes. If it does not
1043 exist, a new file will be created. format specifies the format of the
1044 mirror image, default is to probe if mode='existing
', else the format
1049 - "device": device name to operate on (json-string)
1050 - "target": name of new image file (json-string)
1051 - "format": format of new image (json-string, optional)
1052 - "mode": how an image file should be created into the target
1053 file/device (NewImageMode, optional, default 'absolute
-paths
')
1054 - "speed": maximum speed of the streaming job, in bytes per second
1056 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
1057 - "buf_size": maximum amount of data in flight from source to target, in bytes
1058 (json-int, default 10M)
1059 - "sync": what parts of the disk image should be copied to the destination;
1060 possibilities include "full" for all the disk, "top" for only the sectors
1061 allocated in the topmost image, or "none" to only replicate new I/O
1063 - "on-source-error": the action to take on an error on the source
1064 (BlockdevOnError, default 'report
')
1065 - "on-target-error": the action to take on an error on the target
1066 (BlockdevOnError, default 'report
')
1068 The default value of the granularity is the image cluster size clamped
1069 between 4096 and 65536, if the image format defines one. If the format
1070 does not define a cluster size, the default value of the granularity
1076 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
1077 "target": "/some/place/my-image",
1079 "format": "qcow2" } }
1086 .args_type = "value:M",
1087 .mhandler.cmd_new = qmp_marshal_input_balloon,
1094 Request VM to change its memory allocation (in bytes).
1098 - "value": New memory allocation (json-int)
1102 -> { "execute": "balloon", "arguments": { "value": 536870912 } }
1109 .args_type = "name:s,up:b",
1110 .mhandler.cmd_new = qmp_marshal_input_set_link,
1117 Change the link status of a network adapter.
1121 - "name": network device name (json-string)
1122 - "up": status is up (json-bool)
1126 -> { "execute": "set_link", "arguments": { "name": "e1000.0", "up": false } }
1133 .args_type = "fdname:s",
1134 .params = "getfd name",
1135 .help = "receive a file descriptor via SCM rights and assign it a name",
1136 .mhandler.cmd_new = qmp_marshal_input_getfd,
1143 Receive a file descriptor via SCM rights and assign it a name.
1147 - "fdname": file descriptor name (json-string)
1151 -> { "execute": "getfd", "arguments": { "fdname": "fd1" } }
1156 (1) If the name specified by the "fdname" argument already exists,
1157 the file descriptor assigned to it will be closed and replaced
1158 by the received file descriptor.
1159 (2) The 'closefd
' command can be used to explicitly close the file
1160 descriptor when it is no longer needed.
1166 .args_type = "fdname:s",
1167 .params = "closefd name",
1168 .help = "close a file descriptor previously passed via SCM rights",
1169 .mhandler.cmd_new = qmp_marshal_input_closefd,
1176 Close a file descriptor previously passed via SCM rights.
1180 - "fdname": file descriptor name (json-string)
1184 -> { "execute": "closefd", "arguments": { "fdname": "fd1" } }
1191 .args_type = "fdset-id:i?,opaque:s?",
1192 .params = "add-fd fdset-id opaque",
1193 .help = "Add a file descriptor, that was passed via SCM rights, to an fd set",
1194 .mhandler.cmd_new = qmp_marshal_input_add_fd,
1201 Add a file descriptor, that was passed via SCM rights, to an fd set.
1205 - "fdset-id": The ID of the fd set to add the file descriptor to.
1206 (json-int, optional)
1207 - "opaque": A free-form string that can be used to describe the fd.
1208 (json-string, optional)
1210 Return a json-object with the following information:
1212 - "fdset-id": The ID of the fd set that the fd was added to. (json-int)
1213 - "fd": The file descriptor that was received via SCM rights and added to the
1218 -> { "execute": "add-fd", "arguments": { "fdset-id": 1 } }
1219 <- { "return": { "fdset-id": 1, "fd": 3 } }
1223 (1) The list of fd sets is shared by all monitor connections.
1224 (2) If "fdset-id" is not specified, a new fd set will be created.
1229 .name = "remove-fd",
1230 .args_type = "fdset-id:i,fd:i?",
1231 .params = "remove-fd fdset-id fd",
1232 .help = "Remove a file descriptor from an fd set",
1233 .mhandler.cmd_new = qmp_marshal_input_remove_fd,
1240 Remove a file descriptor from an fd set.
1244 - "fdset-id": The ID of the fd set that the file descriptor belongs to.
1246 - "fd": The file descriptor that is to be removed. (json-int, optional)
1250 -> { "execute": "remove-fd", "arguments": { "fdset-id": 1, "fd": 3 } }
1255 (1) The list of fd sets is shared by all monitor connections.
1256 (2) If "fd" is not specified, all file descriptors in "fdset-id" will be
1262 .name = "query-fdsets",
1264 .help = "Return information describing all fd sets",
1265 .mhandler.cmd_new = qmp_marshal_input_query_fdsets,
1272 Return information describing all fd sets.
1278 -> { "execute": "query-fdsets" }
1284 "opaque": "rdonly:/path/to/file"
1288 "opaque": "rdwr:/path/to/file"
1307 Note: The list of fd sets is shared by all monitor connections.
1312 .name = "block_passwd",
1313 .args_type = "device:B,password:s",
1314 .mhandler.cmd_new = qmp_marshal_input_block_passwd,
1321 Set the password of encrypted block devices.
1325 - "device": device name (json-string)
1326 - "password": password (json-string)
1330 -> { "execute": "block_passwd", "arguments": { "device": "ide0-hd0",
1331 "password": "12345" } }
1337 .name = "block_set_io_throttle",
1338 .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l",
1339 .mhandler.cmd_new = qmp_marshal_input_block_set_io_throttle,
1343 block_set_io_throttle
1346 Change I/O throttle limits for a block drive.
1350 - "device": device name (json-string)
1351 - "bps": total throughput limit in bytes per second(json-int)
1352 - "bps_rd": read throughput limit in bytes per second(json-int)
1353 - "bps_wr": read throughput limit in bytes per second(json-int)
1354 - "iops": total I/O operations per second(json-int)
1355 - "iops_rd": read I/O operations per second(json-int)
1356 - "iops_wr": write I/O operations per second(json-int)
1360 -> { "execute": "block_set_io_throttle", "arguments": { "device": "virtio0",
1372 .name = "set_password",
1373 .args_type = "protocol:s,password:s,connected:s?",
1374 .mhandler.cmd_new = qmp_marshal_input_set_password,
1381 Set the password for vnc/spice protocols.
1385 - "protocol": protocol name (json-string)
1386 - "password": password (json-string)
1387 - "connected": [ keep | disconnect | fail ] (josn-string, optional)
1391 -> { "execute": "set_password", "arguments": { "protocol": "vnc",
1392 "password": "secret" } }
1398 .name = "expire_password",
1399 .args_type = "protocol:s,time:s",
1400 .mhandler.cmd_new = qmp_marshal_input_expire_password,
1407 Set the password expire time for vnc/spice protocols.
1411 - "protocol": protocol name (json-string)
1412 - "time": [ now | never | +secs | secs ] (json-string)
1416 -> { "execute": "expire_password", "arguments": { "protocol": "vnc",
1423 .name = "add_client",
1424 .args_type = "protocol:s,fdname:s,skipauth:b?,tls:b?",
1425 .mhandler.cmd_new = qmp_marshal_input_add_client,
1432 Add a graphics client
1436 - "protocol": protocol name (json-string)
1437 - "fdname": file descriptor name (json-string)
1438 - "skipauth": whether to skip authentication (json-bool, optional)
1439 - "tls": whether to perform TLS (json-bool, optional)
1443 -> { "execute": "add_client", "arguments": { "protocol": "vnc",
1444 "fdname": "myclient" } }
1449 .name = "qmp_capabilities",
1452 .help = "enable QMP capabilities",
1453 .user_print = monitor_user_noop,
1454 .mhandler.cmd_new = do_qmp_capabilities,
1461 Enable QMP capabilities.
1467 -> { "execute": "qmp_capabilities" }
1470 Note: This command must be issued before issuing any other command.
1475 .name = "human-monitor-command",
1476 .args_type = "command-line:s,cpu-index:i?",
1477 .mhandler.cmd_new = qmp_marshal_input_human_monitor_command,
1481 human-monitor-command
1482 ---------------------
1484 Execute a Human Monitor command.
1488 - command-line: the command name and its arguments, just like the
1489 Human Monitor's
shell (json
-string
)
1490 - cpu
-index
: select the CPU number to be used by commands which access CPU
1491 data
, like
'info registers'. The Monitor selects CPU
0 if this
1492 argument is not
provided (json
-int
, optional
)
1496 -> { "execute": "human-monitor-command", "arguments": { "command-line": "info kvm" } }
1497 <- { "return": "kvm support: enabled\r\n" }
1501 (1) The Human Monitor is NOT an stable
interface, this means that command
1502 names
, arguments and responses can change or be removed at ANY time
.
1503 Applications that rely on long term stability guarantees should NOT
1508 o This command is stateless
, this means that commands that depend
1509 on state
information (such as getfd
) might not work
1511 o Commands that prompt the user
for data (eg
. 'cont' when the block
1512 device is encrypted
) don
't currently work
1517 HXCOMM Each query command below is inside a SQMP/EQMP section, do NOT change
1518 HXCOMM this! We will possibly move query commands definitions inside those
1519 HXCOMM sections, just like regular commands.
1529 Return a json-object with the following information:
1531 - "qemu": A json-object containing three integer values:
1532 - "major": QEMU's major
version (json
-int
)
1533 - "minor": QEMU
's minor version (json-int)
1534 - "micro": QEMU's micro
version (json
-int
)
1535 - "package": package's version (json-string)
1539 -> { "execute": "query-version" }
1554 .name = "query-version",
1556 .mhandler.cmd_new = qmp_marshal_input_query_version,
1563 List QMP available commands.
1565 Each command is represented by a json-object, the returned value is a json-array
1568 Each json-object contain:
1570 - "name": command's
name (json
-string
)
1574 -> { "execute": "query-commands" }
1578 "name":"query-balloon"
1581 "name":"system_powerdown"
1586 Note
: This example has been shortened as the real response is too long
.
1591 .name
= "query-commands",
1593 .mhandler
.cmd_new
= qmp_marshal_input_query_commands
,
1600 List QMP available events
.
1602 Each event is represented by a json
-object
, the returned value is a json
-array
1605 Each json
-object contains
:
1607 - "name": event
's name (json-string)
1611 -> { "execute": "query-events" }
1623 Note: This example has been shortened as the real response is too long.
1628 .name = "query-events",
1630 .mhandler.cmd_new = qmp_marshal_input_query_events,
1637 Each device is represented by a json-object. The returned value is a json-array
1640 Each json-object contain the following:
1642 - "label": device's
label (json
-string
)
1643 - "filename": device
's file (json-string)
1647 -> { "execute": "query-chardev" }
1664 .name = "query-chardev",
1666 .mhandler.cmd_new = qmp_marshal_input_query_chardev,
1673 Show the block devices.
1675 Each block device information is stored in a json-object and the returned value
1676 is a json-array of all devices.
1678 Each json-object contain the following:
1680 - "device": device name (json-string)
1681 - "type": device type (json-string)
1682 - deprecated, retained for backward compatibility
1683 - Possible values: "unknown"
1684 - "removable": true if the device is removable, false otherwise (json-bool)
1685 - "locked": true if the device is locked, false otherwise (json-bool)
1686 - "tray_open": only present if removable, true if the device has a tray,
1687 and it is open (json-bool)
1688 - "inserted": only present if the device is inserted, it is a json-object
1689 containing the following:
1690 - "file": device file name (json-string)
1691 - "ro": true if read-only, false otherwise (json-bool)
1692 - "drv": driver format name (json-string)
1693 - Possible values: "blkdebug", "bochs", "cloop", "cow", "dmg",
1694 "file", "file", "ftp", "ftps", "host_cdrom",
1695 "host_device", "host_floppy", "http", "https",
1696 "nbd", "parallels", "qcow", "qcow2", "raw",
1697 "tftp", "vdi", "vmdk", "vpc", "vvfat"
1698 - "backing_file": backing file name (json-string, optional)
1699 - "backing_file_depth": number of files in the backing file chain (json-int)
1700 - "encrypted": true if encrypted, false otherwise (json-bool)
1701 - "bps": limit total bytes per second (json-int)
1702 - "bps_rd": limit read bytes per second (json-int)
1703 - "bps_wr": limit write bytes per second (json-int)
1704 - "iops": limit total I/O operations per second (json-int)
1705 - "iops_rd": limit read operations per second (json-int)
1706 - "iops_wr": limit write operations per second (json-int)
1708 - "io-status": I/O operation status, only present if the device supports it
1709 and the VM is configured to stop on errors. It's always reset
1710 to
"ok" when the
"cont" command is
issued (json_string
, optional
)
1711 - Possible values
: "ok", "failed", "nospace"
1715 -> { "execute": "query-block" }
1720 "device":"ide0-hd0",
1727 "file":"disks/test.img",
1728 "backing_file_depth":0,
1740 "device":"ide1-cd0",
1763 .name
= "query-block",
1765 .mhandler
.cmd_new
= qmp_marshal_input_query_block
,
1772 Show block device statistics
.
1774 Each device statistic information is stored
in a json
-object and the returned
1775 value is a json
-array of all devices
.
1777 Each json
-object contain the following
:
1779 - "device": device
name (json
-string
)
1780 - "stats": A json
-object with the statistics information
, it contains
:
1781 - "rd_bytes": bytes
read (json
-int
)
1782 - "wr_bytes": bytes
written (json
-int
)
1783 - "rd_operations": read
operations (json
-int
)
1784 - "wr_operations": write
operations (json
-int
)
1785 - "flush_operations": cache flush
operations (json
-int
)
1786 - "wr_total_time_ns": total time spend on writes
in nano
-seconds (json
-int
)
1787 - "rd_total_time_ns": total time spend on reads
in nano
-seconds (json
-int
)
1788 - "flush_total_time_ns": total time spend on cache flushes
in nano
-seconds (json
-int
)
1789 - "wr_highest_offset": Highest offset of a sector written since the
1790 BlockDriverState has been
opened (json
-int
)
1791 - "parent": Contains recursively the statistics of the underlying
1792 protocol (e
.g
. the host file
for a qcow2 image
). If there is
1793 no underlying protocol
, this field is omitted
1794 (json
-object
, optional
)
1798 -> { "execute": "query-blockstats" }
1802 "device":"ide0-hd0",
1805 "wr_highest_offset":3686448128,
1807 "wr_operations":751,
1808 "rd_bytes":122567168,
1809 "rd_operations":36772
1810 "wr_total_times_ns":313253456
1811 "rd_total_times_ns":3465673657
1812 "flush_total_times_ns":49653
1813 "flush_operations":61,
1817 "wr_highest_offset":2821110784,
1819 "wr_operations":692,
1820 "rd_bytes":122739200,
1821 "rd_operations":36604
1822 "flush_operations":51,
1823 "wr_total_times_ns":313253456
1824 "rd_total_times_ns":3465673657
1825 "flush_total_times_ns":49653
1829 "device":"ide1-cd0",
1831 "wr_highest_offset":0,
1836 "flush_operations":0,
1837 "wr_total_times_ns":0
1838 "rd_total_times_ns":0
1839 "flush_total_times_ns":0
1845 "wr_highest_offset":0,
1850 "flush_operations":0,
1851 "wr_total_times_ns":0
1852 "rd_total_times_ns":0
1853 "flush_total_times_ns":0
1859 "wr_highest_offset":0,
1864 "flush_operations":0,
1865 "wr_total_times_ns":0
1866 "rd_total_times_ns":0
1867 "flush_total_times_ns":0
1876 .name
= "query-blockstats",
1878 .mhandler
.cmd_new
= qmp_marshal_input_query_blockstats
,
1885 Show CPU information
.
1887 Return a json
-array
. Each CPU is represented by a json
-object
, which contains
:
1889 - "CPU": CPU
index (json
-int
)
1890 - "current": true if this is the current CPU
, false otherwise (json
-bool
)
1891 - "halted": true if the cpu is halted
, false otherwise (json
-bool
)
1892 - Current program counter
. The key
's name depends on the architecture:
1893 "pc": i386/x86_64 (json-int)
1894 "nip": PPC (json-int)
1895 "pc" and "npc": sparc (json-int)
1896 "PC": mips (json-int)
1897 - "thread_id": ID of the underlying host thread (json-int)
1901 -> { "execute": "query-cpus" }
1924 .name = "query-cpus",
1926 .mhandler.cmd_new = qmp_marshal_input_query_cpus,
1933 PCI buses and devices information.
1935 The returned value is a json-array of all buses. Each bus is represented by
1936 a json-object, which has a key with a json-array of all PCI devices attached
1937 to it. Each device is represented by a json-object.
1939 The bus json-object contains the following:
1941 - "bus": bus number (json-int)
1942 - "devices": a json-array of json-objects, each json-object represents a
1945 The PCI device json-object contains the following:
1947 - "bus": identical to the parent's bus
number (json
-int
)
1948 - "slot": slot
number (json
-int
)
1949 - "function": function number (json
-int
)
1950 - "class_info": a json
-object containing
:
1951 - "desc": device
class description (json
-string
, optional
)
1952 - "class": device
class number (json
-int
)
1953 - "id": a json
-object containing
:
1954 - "device": device
ID (json
-int
)
1955 - "vendor": vendor
ID (json
-int
)
1956 - "irq": device
's IRQ if assigned (json-int, optional)
1957 - "qdev_id": qdev id string (json-string)
1958 - "pci_bridge": It's a json
-object
, only present
if this device is a
1959 PCI bridge
, contains
:
1960 - "bus": bus
number (json
-int
)
1961 - "secondary": secondary bus
number (json
-int
)
1962 - "subordinate": subordinate bus
number (json
-int
)
1963 - "io_range": I
/O memory range information
, a json
-object with the
1965 - "base": base address
, in bytes (json
-int
)
1966 - "limit": limit address
, in bytes (json
-int
)
1967 - "memory_range": memory range information
, a json
-object with the
1969 - "base": base address
, in bytes (json
-int
)
1970 - "limit": limit address
, in bytes (json
-int
)
1971 - "prefetchable_range": Prefetchable memory range information
, a
1972 json
-object with the following members
:
1973 - "base": base address
, in bytes (json
-int
)
1974 - "limit": limit address
, in bytes (json
-int
)
1975 - "devices": a json
-array of PCI devices
if there
's any attached, each
1976 each element is represented by a json-object, which contains
1977 the same members of the 'PCI device json
-object
' described
1979 - "regions": a json-array of json-objects, each json-object represents a
1980 memory region of this device
1982 The memory range json-object contains the following:
1984 - "base": base memory address (json-int)
1985 - "limit": limit value (json-int)
1987 The region json-object can be an I/O region or a memory region, an I/O region
1988 json-object contains the following:
1990 - "type": "io" (json-string, fixed)
1991 - "bar": BAR number (json-int)
1992 - "address": memory address (json-int)
1993 - "size": memory size (json-int)
1995 A memory region json-object contains the following:
1997 - "type": "memory" (json-string, fixed)
1998 - "bar": BAR number (json-int)
1999 - "address": memory address (json-int)
2000 - "size": memory size (json-int)
2001 - "mem_type_64": true or false (json-bool)
2002 - "prefetch": true or false (json-bool)
2006 -> { "execute": "query-pci" }
2018 "desc":"Host bridge"
2052 "desc":"IDE controller"
2074 "desc":"VGA controller"
2084 "mem_type_64":false,
2087 "address":4026531840,
2092 "mem_type_64":false,
2095 "address":4060086272,
2100 "mem_type_64":false,
2115 "desc":"RAM controller"
2136 Note: This example has been shortened as the real response is too long.
2141 .name = "query-pci",
2143 .mhandler.cmd_new = qmp_marshal_input_query_pci,
2150 Show KVM information.
2152 Return a json-object with the following information:
2154 - "enabled": true if KVM support is enabled, false otherwise (json-bool)
2155 - "present": true if QEMU has KVM support, false otherwise (json-bool)
2159 -> { "execute": "query-kvm" }
2160 <- { "return": { "enabled": true, "present": true } }
2165 .name = "query-kvm",
2167 .mhandler.cmd_new = qmp_marshal_input_query_kvm,
2174 Return a json-object with the following information:
2176 - "running": true if the VM is running, or false if it is paused (json-bool)
2177 - "singlestep": true if the VM is in single step mode,
2178 false otherwise (json-bool)
2179 - "status": one of the following values (json-string)
2180 "debug" - QEMU is running on a debugger
2181 "inmigrate" - guest is paused waiting for an incoming migration
2182 "internal-error" - An internal error that prevents further guest
2183 execution has occurred
2184 "io-error" - the last IOP has failed and the device is configured
2185 to pause on I/O errors
2186 "paused" - guest has been paused via the 'stop
' command
2187 "postmigrate" - guest is paused following a successful 'migrate
'
2188 "prelaunch" - QEMU was started with -S and guest has not started
2189 "finish-migrate" - guest is paused to finish the migration process
2190 "restore-vm" - guest is paused to restore VM state
2191 "running" - guest is actively running
2192 "save-vm" - guest is paused to save the VM state
2193 "shutdown" - guest is shut down (and -no-shutdown is in use)
2194 "watchdog" - the watchdog action is configured to pause and
2199 -> { "execute": "query-status" }
2200 <- { "return": { "running": true, "singlestep": false, "status": "running" } }
2205 .name = "query-status",
2207 .mhandler.cmd_new = qmp_marshal_input_query_status,
2214 Show VM mice information.
2216 Each mouse is represented by a json-object, the returned value is a json-array
2219 The mouse json-object contains the following:
2221 - "name": mouse's
name (json
-string
)
2222 - "index": mouse
's index (json-int)
2223 - "current": true if this mouse is receiving events, false otherwise (json-bool)
2224 - "absolute": true if the mouse generates absolute input events (json-bool)
2228 -> { "execute": "query-mice" }
2232 "name":"QEMU Microsoft Mouse",
2238 "name":"QEMU PS/2 Mouse",
2249 .name = "query-mice",
2251 .mhandler.cmd_new = qmp_marshal_input_query_mice,
2258 Show VNC server information.
2260 Return a json-object with server information. Connected clients are returned
2261 as a json-array of json-objects.
2263 The main json-object contains the following:
2265 - "enabled": true or false (json-bool)
2266 - "host": server's IP
address (json
-string
)
2267 - "family": address
family (json
-string
)
2268 - Possible values
: "ipv4", "ipv6", "unix", "unknown"
2269 - "service": server
's port number (json-string)
2270 - "auth": authentication method (json-string)
2271 - Possible values: "invalid", "none", "ra2", "ra2ne", "sasl", "tight",
2272 "tls", "ultra", "unknown", "vencrypt", "vencrypt",
2273 "vencrypt+plain", "vencrypt+tls+none",
2274 "vencrypt+tls+plain", "vencrypt+tls+sasl",
2275 "vencrypt+tls+vnc", "vencrypt+x509+none",
2276 "vencrypt+x509+plain", "vencrypt+x509+sasl",
2277 "vencrypt+x509+vnc", "vnc"
2278 - "clients": a json-array of all connected clients
2280 Clients are described by a json-object, each one contain the following:
2282 - "host": client's IP
address (json
-string
)
2283 - "family": address
family (json
-string
)
2284 - Possible values
: "ipv4", "ipv6", "unix", "unknown"
2285 - "service": client
's port number (json-string)
2286 - "x509_dname": TLS dname (json-string, optional)
2287 - "sasl_username": SASL username (json-string, optional)
2291 -> { "execute": "query-vnc" }
2312 .name = "query-vnc",
2314 .mhandler.cmd_new = qmp_marshal_input_query_vnc,
2321 Show SPICE server information.
2323 Return a json-object with server information. Connected clients are returned
2324 as a json-array of json-objects.
2326 The main json-object contains the following:
2328 - "enabled": true or false (json-bool)
2329 - "host": server's IP
address (json
-string
)
2330 - "port": server
's port number (json-int, optional)
2331 - "tls-port": server's port
number (json
-int
, optional
)
2332 - "auth": authentication
method (json
-string
)
2333 - Possible values
: "none", "spice"
2334 - "channels": a json
-array of all active channels clients
2336 Channels are described by a json
-object
, each one contain the following
:
2338 - "host": client
's IP address (json-string)
2339 - "family": address family (json-string)
2340 - Possible values: "ipv4", "ipv6", "unix", "unknown"
2341 - "port": client's port
number (json
-string
)
2342 - "connection-id": spice connection id
. All channels with the same id
2343 belong to the same spice
session (json
-int
)
2344 - "channel-type": channel type
. "1" is the main control channel
, filter
for
2345 this one
if you want track spice sessions
only (json
-int
)
2346 - "channel-id": channel id
. Usually
"0", might be different needed when
2347 multiple channels of the same type exist
, such as multiple
2348 display channels
in a multihead
setup (json
-int
)
2349 - "tls": whevener the channel is
encrypted (json
-bool
)
2353 -> { "execute": "query-spice" }
2366 "connection-id": 1804289383,
2367 "host": "127.0.0.1",
2375 "connection-id": 1804289383,
2376 "host": "127.0.0.1",
2380 [ ... more channels follow
... ]
2387 #
if defined(CONFIG_SPICE
)
2389 .name
= "query-spice",
2391 .mhandler
.cmd_new
= qmp_marshal_input_query_spice
,
2401 Return a json
-object with the following information
:
2403 - "name": VM
's name (json-string, optional)
2407 -> { "execute": "query-name" }
2408 <- { "return": { "name": "qemu-name" } }
2413 .name = "query-name",
2415 .mhandler.cmd_new = qmp_marshal_input_query_name,
2424 Return a json-object with the following information:
2426 - "UUID": Universally Unique Identifier (json-string)
2430 -> { "execute": "query-uuid" }
2431 <- { "return": { "UUID": "550e8400-e29b-41d4-a716-446655440000" } }
2436 .name = "query-uuid",
2438 .mhandler.cmd_new = qmp_marshal_input_query_uuid,
2442 query-command-line-options
2443 --------------------------
2445 Show command line option schema.
2447 Return a json-array of command line option schema for all options (or for
2448 the given option), returning an error if the given option doesn't exist
.
2450 Each array entry contains the following
:
2452 - "option": option
name (json
-string
)
2453 - "parameters": a json
-array describes all parameters of the option
:
2454 - "name": parameter
name (json
-string
)
2455 - "type": parameter
type (one of
'string', 'boolean', 'number',
2457 - "help": human readable description of the parameter
2458 (json
-string
, optional
)
2462 -> { "execute": "query-command-line-options", "arguments": { "option": "option-rom" } }
2471 "name": "bootindex",
2475 "option": "option-rom"
2483 .name
= "query-command-line-options",
2484 .args_type
= "option:s?",
2485 .mhandler
.cmd_new
= qmp_marshal_input_query_command_line_options
,
2494 Return a json
-object
. If migration is active there will be another json
-object
2495 with RAM migration status and
if block migration is active another one with
2496 block migration status
.
2498 The main json
-object contains the following
:
2500 - "status": migration
status (json
-string
)
2501 - Possible values
: "active", "completed", "failed", "cancelled"
2502 - "total-time": total amount of ms since migration started
. If
2503 migration has ended
, it returns the total migration
2505 - "downtime": only present when migration has finished correctly
2506 total amount
in ms
for downtime that
happened (json
-int
)
2507 - "expected-downtime": only present
while migration is active
2508 total amount
in ms
for downtime that was calculated on
2509 the last bitmap
round (json
-int
)
2510 - "ram": only present
if "status" is
"active", it is a json
-object with the
2511 following RAM information
:
2512 - "transferred": amount transferred
in bytes (json
-int
)
2513 - "remaining": amount remaining to transfer
in bytes (json
-int
)
2514 - "total": total amount of memory
in bytes (json
-int
)
2515 - "duplicate": number of pages filled entirely with the same
2517 These are sent over the wire much more efficiently
.
2518 - "skipped": number of skipped zero
pages (json
-int
)
2519 - "normal" : number of whole pages transferred
. I
.e
. they
2520 were not sent as duplicate or xbzrle
pages (json
-int
)
2521 - "normal-bytes" : number of bytes transferred
in whole
2522 pages
. This is just normal pages times size of one page
,
2523 but
this way upper levels don
't need to care about page
2525 - "disk": only present if "status" is "active" and it is a block migration,
2526 it is a json-object with the following disk information:
2527 - "transferred": amount transferred in bytes (json-int)
2528 - "remaining": amount remaining to transfer in bytes json-int)
2529 - "total": total disk size in bytes (json-int)
2530 - "xbzrle-cache": only present if XBZRLE is active.
2531 It is a json-object with the following XBZRLE information:
2532 - "cache-size": XBZRLE cache size in bytes
2533 - "bytes": number of bytes transferred for XBZRLE compressed pages
2534 - "pages": number of XBZRLE compressed pages
2535 - "cache-miss": number of XBRZRLE page cache misses
2536 - "overflow": number of times XBZRLE overflows. This means
2537 that the XBZRLE encoding was bigger than just sent the
2538 whole page, and then we sent the whole page instead (as as
2543 1. Before the first migration
2545 -> { "execute": "query-migrate" }
2548 2. Migration is done and has succeeded
2550 -> { "execute": "query-migrate" }
2552 "status": "completed",
2561 "normal-bytes":123456
2566 3. Migration is done and has failed
2568 -> { "execute": "query-migrate" }
2569 <- { "return": { "status": "failed" } }
2571 4. Migration is being performed and is not a block migration:
2573 -> { "execute": "query-migrate" }
2582 "expected-downtime":12345,
2585 "normal-bytes":123456
2590 5. Migration is being performed and is a block migration:
2592 -> { "execute": "query-migrate" }
2598 "remaining":1053304,
2601 "expected-downtime":12345,
2604 "normal-bytes":123456
2608 "remaining":20880384,
2614 6. Migration is being performed and XBZRLE is active:
2616 -> { "execute": "query-migrate" }
2620 "capabilities" : [ { "capability": "xbzrle", "state" : true } ],
2623 "remaining":1053304,
2626 "expected-downtime":12345,
2629 "normal-bytes":3412992
2632 "cache-size":67108864,
2644 .name = "query-migrate",
2646 .mhandler.cmd_new = qmp_marshal_input_query_migrate,
2650 migrate-set-capabilities
2651 ------------------------
2653 Enable/Disable migration capabilities
2655 - "xbzrle": XBZRLE support
2661 -> { "execute": "migrate-set-capabilities" , "arguments":
2662 { "capabilities": [ { "capability": "xbzrle", "state": true } ] } }
2667 .name = "migrate-set-capabilities",
2668 .args_type = "capabilities:O",
2669 .params = "capability:s,state:b",
2670 .mhandler.cmd_new = qmp_marshal_input_migrate_set_capabilities,
2673 query-migrate-capabilities
2674 --------------------------
2676 Query current migration capabilities
2678 - "capabilities": migration capabilities state
2679 - "xbzrle" : XBZRLE state (json-bool)
2685 -> { "execute": "query-migrate-capabilities" }
2686 <- { "return": [ { "state": false, "capability": "xbzrle" } ] }
2691 .name = "query-migrate-capabilities",
2693 .mhandler.cmd_new = qmp_marshal_input_query_migrate_capabilities,
2700 Show balloon information.
2702 Make an asynchronous request for balloon info. When the request completes a
2703 json-object will be returned containing the following data:
2705 - "actual": current balloon value in bytes (json-int)
2709 -> { "execute": "query-balloon" }
2712 "actual":1073741824,
2719 .name = "query-balloon",
2721 .mhandler.cmd_new = qmp_marshal_input_query_balloon,
2725 .name = "query-block-jobs",
2727 .mhandler.cmd_new = qmp_marshal_input_query_block_jobs,
2732 .args_type = "path:s",
2733 .mhandler.cmd_new = qmp_marshal_input_qom_list,
2738 .args_type = "path:s,property:s,value:q",
2739 .mhandler.cmd_new = qmp_qom_set,
2744 .args_type = "path:s,property:s",
2745 .mhandler.cmd_new = qmp_qom_get,
2749 .name = "nbd-server-start",
2750 .args_type = "addr:q",
2751 .mhandler.cmd_new = qmp_marshal_input_nbd_server_start,
2754 .name = "nbd-server-add",
2755 .args_type = "device:B,writable:b?",
2756 .mhandler.cmd_new = qmp_marshal_input_nbd_server_add,
2759 .name = "nbd-server-stop",
2761 .mhandler.cmd_new = qmp_marshal_input_nbd_server_stop,
2765 .name = "change-vnc-password",
2766 .args_type = "password:s",
2767 .mhandler.cmd_new = qmp_marshal_input_change_vnc_password,
2770 .name = "qom-list-types",
2771 .args_type = "implements:s?,abstract:b?",
2772 .mhandler.cmd_new = qmp_marshal_input_qom_list_types,
2776 .name = "device-list-properties",
2777 .args_type = "typename:s",
2778 .mhandler.cmd_new = qmp_marshal_input_device_list_properties,
2782 .name = "query-machines",
2784 .mhandler.cmd_new = qmp_marshal_input_query_machines,
2788 .name = "query-cpu-definitions",
2790 .mhandler.cmd_new = qmp_marshal_input_query_cpu_definitions,
2794 .name = "query-target",
2796 .mhandler.cmd_new = qmp_marshal_input_query_target,
2800 .name = "query-tpm",
2802 .mhandler.cmd_new = qmp_marshal_input_query_tpm,
2809 Return information about the TPM device.
2815 -> { "execute": "query-tpm" }
2818 { "model": "tpm-tis",
2820 { "type": "passthrough",
2822 { "cancel-path": "/sys/class/misc/tpm0/device/cancel",
2834 .name = "query-tpm-models",
2836 .mhandler.cmd_new = qmp_marshal_input_query_tpm_models,
2843 Return a list of supported TPM models.
2849 -> { "execute": "query-tpm-models" }
2850 <- { "return": [ "tpm-tis" ] }
2855 .name = "query-tpm-types",
2857 .mhandler.cmd_new = qmp_marshal_input_query_tpm_types,
2864 Return a list of supported TPM types.
2870 -> { "execute": "query-tpm-types" }
2871 <- { "return": [ "passthrough" ] }
2876 .name = "chardev-add",
2877 .args_type = "id:s,backend:q",
2878 .mhandler.cmd_new = qmp_marshal_input_chardev_add,
2889 - "id": the chardev's ID
, must be
unique (json
-string
)
2890 - "backend": chardev backend type
+ parameters
2894 -> { "execute" : "chardev-add",
2895 "arguments" : { "id" : "foo",
2896 "backend" : { "type" : "null", "data" : {} } } }
2899 -> { "execute" : "chardev-add",
2900 "arguments" : { "id" : "bar",
2901 "backend" : { "type" : "file",
2902 "data" : { "out" : "/tmp/bar.log" } } } }
2905 -> { "execute" : "chardev-add",
2906 "arguments" : { "id" : "baz",
2907 "backend" : { "type" : "pty", "data" : {} } } }
2908 <- { "return": { "pty" : "/dev/pty/42" } }
2913 .name
= "chardev-remove",
2914 .args_type
= "id:s",
2915 .mhandler
.cmd_new
= qmp_marshal_input_chardev_remove
,
2927 - "id": the chardev
's ID, must exist and not be in use (json-string)
2931 -> { "execute": "chardev-remove", "arguments": { "id" : "foo" } }