- "data": data to write (json-string)
- "format": data format (json-string, optional)
- Possible values: "utf8" (default), "base64"
- Bug: invalid base64 is currently not rejected.
- Whitespace *is* invalid.
Example:
{
.name = "dump-guest-memory",
- .args_type = "paging:b,protocol:s,begin:i?,end:i?,format:s?",
- .params = "-p protocol [begin] [length] [format]",
+ .args_type = "paging:b,protocol:s,detach:b?,begin:i?,end:i?,format:s?",
+ .params = "-p protocol [-d] [begin] [length] [format]",
.help = "dump guest memory to file",
.mhandler.cmd_new = qmp_marshal_dump_guest_memory,
},
- "paging": do paging to get guest's memory mapping (json-bool)
- "protocol": destination file(started with "file:") or destination file
descriptor (started with "fd:") (json-string)
+- "detach": if specified, command will return immediately, without waiting
+ for the dump to finish. The user can track progress using
+ "query-dump". (json-bool)
- "begin": the starting physical address. It's optional, and should be specified
with length together (json-int)
- "length": the memory size, in bytes. It's optional, and should be specified
<- { "return": { "formats":
["elf", "kdump-zlib", "kdump-lzo", "kdump-snappy"] }
+EQMP
+
+ {
+ .name = "query-dump",
+ .args_type = "",
+ .params = "",
+ .help = "query background dump status",
+ .mhandler.cmd_new = qmp_marshal_query_dump,
+ },
+
+SQMP
+query-dump
+----------
+
+Query background dump status.
+
+Arguments: None.
+
+Example:
+
+-> { "execute": "query-dump" }
+<- { "return": { "status": "active", "completed": 1024000,
+ "total": 2048000 } }
+
EQMP
#if defined TARGET_S390X
- "speed": maximum speed of the streaming job, in bytes per second
(json-int)
- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
-- "buf_size": maximum amount of data in flight from source to target, in bytes
+- "buf-size": maximum amount of data in flight from source to target, in bytes
(json-int, default 10M)
- "sync": what parts of the disk image should be copied to the destination;
possibilities include "full" for all the disk, "top" for only the sectors
EQMP
+ {
+ .name = "blockdev-mirror",
+ .args_type = "sync:s,device:B,target:B,replaces:s?,speed:i?,"
+ "on-source-error:s?,on-target-error:s?,"
+ "granularity:i?,buf-size:i?",
+ .mhandler.cmd_new = qmp_marshal_blockdev_mirror,
+ },
+
+SQMP
+blockdev-mirror
+------------
+
+Start mirroring a block device's writes to another block device. target
+specifies the target of mirror operation.
+
+Arguments:
+
+- "device": device name to operate on (json-string)
+- "target": device name to mirror to (json-string)
+- "replaces": the block driver node name to replace when finished
+ (json-string, optional)
+- "speed": maximum speed of the streaming job, in bytes per second
+ (json-int)
+- "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
+- "buf_size": maximum amount of data in flight from source to target, in bytes
+ (json-int, default 10M)
+- "sync": what parts of the disk image should be copied to the destination;
+ possibilities include "full" for all the disk, "top" for only the sectors
+ allocated in the topmost image, or "none" to only replicate new I/O
+ (MirrorSyncMode).
+- "on-source-error": the action to take on an error on the source
+ (BlockdevOnError, default 'report')
+- "on-target-error": the action to take on an error on the target
+ (BlockdevOnError, default 'report')
+
+The default value of the granularity is the image cluster size clamped
+between 4096 and 65536, if the image format defines one. If the format
+does not define a cluster size, the default value of the granularity
+is 65536.
+
+Example:
+
+-> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0",
+ "target": "target0",
+ "sync": "full" } }
+<- { "return": {} }
+
+EQMP
{
.name = "change-backing-file",
.args_type = "device:s,image-node-name:s,backing-file:s",
{
.name = "block_set_io_throttle",
- .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,iops_size:l?,group:s?",
+ .args_type = "device:B,bps:l,bps_rd:l,bps_wr:l,iops:l,iops_rd:l,iops_wr:l,bps_max:l?,bps_rd_max:l?,bps_wr_max:l?,iops_max:l?,iops_rd_max:l?,iops_wr_max:l?,bps_max_length:l?,bps_rd_max_length:l?,bps_wr_max_length:l?,iops_max_length:l?,iops_rd_max_length:l?,iops_wr_max_length:l?,iops_size:l?,group:s?",
.mhandler.cmd_new = qmp_marshal_block_set_io_throttle,
},
- "iops": total I/O operations per second (json-int)
- "iops_rd": read I/O operations per second (json-int)
- "iops_wr": write I/O operations per second (json-int)
-- "bps_max": total max in bytes (json-int)
-- "bps_rd_max": read max in bytes (json-int)
-- "bps_wr_max": write max in bytes (json-int)
-- "iops_max": total I/O operations max (json-int)
-- "iops_rd_max": read I/O operations max (json-int)
-- "iops_wr_max": write I/O operations max (json-int)
-- "iops_size": I/O size in bytes when limiting (json-int)
-- "group": throttle group name (json-string)
+- "bps_max": total throughput limit during bursts, in bytes (json-int, optional)
+- "bps_rd_max": read throughput limit during bursts, in bytes (json-int, optional)
+- "bps_wr_max": write throughput limit during bursts, in bytes (json-int, optional)
+- "iops_max": total I/O operations per second during bursts (json-int, optional)
+- "iops_rd_max": read I/O operations per second during bursts (json-int, optional)
+- "iops_wr_max": write I/O operations per second during bursts (json-int, optional)
+- "bps_max_length": maximum length of the @bps_max burst period, in seconds (json-int, optional)
+- "bps_rd_max_length": maximum length of the @bps_rd_max burst period, in seconds (json-int, optional)
+- "bps_wr_max_length": maximum length of the @bps_wr_max burst period, in seconds (json-int, optional)
+- "iops_max_length": maximum length of the @iops_max burst period, in seconds (json-int, optional)
+- "iops_rd_max_length": maximum length of the @iops_rd_max burst period, in seconds (json-int, optional)
+- "iops_wr_max_length": maximum length of the @iops_wr_max burst period, in seconds (json-int, optional)
+- "iops_size": I/O size in bytes when limiting (json-int, optional)
+- "group": throttle group name (json-string, optional)
Example:
"iops_max": 0,
"iops_rd_max": 0,
"iops_wr_max": 0,
+ "bps_max_length": 60,
"iops_size": 0 } }
<- { "return": {} }
- "avg_flush_latency_ns": average latency of flush operations
in the defined interval, in
nanoseconds (json-int)
+ - "avg_rd_queue_depth": average number of pending read
+ operations in the defined interval
+ (json-number)
+ - "avg_wr_queue_depth": average number of pending write
+ operations in the defined interval
+ (json-number).
- "parent": Contains recursively the statistics of the underlying
protocol (e.g. the host file for a qcow2 image). If there is
no underlying protocol, this field is omitted
- "current": true if this is the current CPU, false otherwise (json-bool)
- "halted": true if the cpu is halted, false otherwise (json-bool)
- "qom_path": path to the CPU object in the QOM tree (json-str)
+- "arch": architecture of the cpu, which determines what additional
+ keys will be present (json-str)
- Current program counter. The key's name depends on the architecture:
"pc": i386/x86_64 (json-int)
"nip": PPC (json-int)
"current":true,
"halted":false,
"qom_path":"/machine/unattached/device[0]",
+ "arch":"x86",
"pc":3227107138,
"thread_id":3134
},
"current":false,
"halted":true,
"qom_path":"/machine/unattached/device[2]",
+ "arch":"x86",
"pc":7108165,
"thread_id":3135
}
- "rdma-pin-all": pin all pages when using RDMA during migration
- "auto-converge": throttle down guest to help convergence of migration
- "zero-blocks": compress zero blocks during block migration
+- "compress": use multiple compression threads to accelerate live migration
- "events": generate events for each migration state change
+- "x-postcopy-ram": postcopy mode for live migration
Arguments:
- "rdma-pin-all" : RDMA Pin Page state (json-bool)
- "auto-converge" : Auto Converge state (json-bool)
- "zero-blocks" : Zero Blocks state (json-bool)
+ - "compress": Multiple compression threads state (json-bool)
+ - "events": Migration state change event state (json-bool)
+ - "x-postcopy-ram": postcopy ram state (json-bool)
Arguments:
Example:
-> { "execute": "query-migrate-capabilities" }
-<- { "return": [ { "state": false, "capability": "xbzrle" } ] }
+<- {"return": [
+ {"state": false, "capability": "xbzrle"},
+ {"state": false, "capability": "rdma-pin-all"},
+ {"state": false, "capability": "auto-converge"},
+ {"state": false, "capability": "zero-blocks"},
+ {"state": false, "capability": "compress"},
+ {"state": true, "capability": "events"},
+ {"state": false, "capability": "x-postcopy-ram"}
+ ]}
EQMP
- "compress-level": set compression level during migration (json-int)
- "compress-threads": set compression thread count for migration (json-int)
- "decompress-threads": set decompression thread count for migration (json-int)
+- "x-cpu-throttle-initial": set initial percentage of time guest cpus are
+ throttled for auto-converge (json-int)
+- "x-cpu-throttle-increment": set throttle increasing percentage for
+ auto-converge (json-int)
Arguments:
{
.name = "migrate-set-parameters",
.args_type =
- "compress-level:i?,compress-threads:i?,decompress-threads:i?",
+ "compress-level:i?,compress-threads:i?,decompress-threads:i?,x-cpu-throttle-initial:i?,x-cpu-throttle-increment:i?",
.mhandler.cmd_new = qmp_marshal_migrate_set_parameters,
},
SQMP
- "compress-level" : compression level value (json-int)
- "compress-threads" : compression thread count value (json-int)
- "decompress-threads" : decompression thread count value (json-int)
+ - "x-cpu-throttle-initial" : initial percentage of time guest cpus are
+ throttled (json-int)
+ - "x-cpu-throttle-increment" : throttle increasing percentage for
+ auto-converge (json-int)
Arguments:
-> { "execute": "query-migrate-parameters" }
<- {
"return": {
- "decompress-threads", 2,
- "compress-threads", 8,
- "compress-level", 1
+ "decompress-threads": 2,
+ "x-cpu-throttle-increment": 10,
+ "compress-threads": 8,
+ "compress-level": 1,
+ "x-cpu-throttle-initial": 20
}
}
{
.name = "nbd-server-start",
- .args_type = "addr:q",
+ .args_type = "addr:q,tls-creds:s?",
.mhandler.cmd_new = qmp_marshal_nbd_server_start,
},
{
EQMP
{
- .name = "blockdev-remove-medium",
+ .name = "x-blockdev-remove-medium",
.args_type = "device:s",
- .mhandler.cmd_new = qmp_marshal_blockdev_remove_medium,
+ .mhandler.cmd_new = qmp_marshal_x_blockdev_remove_medium,
},
SQMP
-blockdev-remove-medium
-----------------------
+x-blockdev-remove-medium
+------------------------
Removes a medium (a block driver state tree) from a block device. That block
device's tray must currently be open (unless there is no attached guest device).
If the tray is open and there is no medium inserted, this will be a no-op.
+This command is still a work in progress and is considered experimental.
+Stay away from it unless you want to help with its development.
+
Arguments:
- "device": block device name (json-string)
Example:
--> { "execute": "blockdev-remove-medium",
+-> { "execute": "x-blockdev-remove-medium",
"arguments": { "device": "ide1-cd0" } }
<- { "error": { "class": "GenericError",
<- { "return": {} }
--> { "execute": "blockdev-remove-medium",
+-> { "execute": "x-blockdev-remove-medium",
"arguments": { "device": "ide1-cd0" } }
<- { "return": {} }
EQMP
{
- .name = "blockdev-insert-medium",
+ .name = "x-blockdev-insert-medium",
.args_type = "device:s,node-name:s",
- .mhandler.cmd_new = qmp_marshal_blockdev_insert_medium,
+ .mhandler.cmd_new = qmp_marshal_x_blockdev_insert_medium,
},
SQMP
-blockdev-insert-medium
-----------------------
+x-blockdev-insert-medium
+------------------------
Inserts a medium (a block driver state tree) into a block device. That block
device's tray must currently be open (unless there is no attached guest device)
and there must be no medium inserted already.
+This command is still a work in progress and is considered experimental.
+Stay away from it unless you want to help with its development.
+
Arguments:
- "device": block device name (json-string)
<- { "return": {} }
--> { "execute": "blockdev-insert-medium",
+-> { "execute": "x-blockdev-insert-medium",
"arguments": { "device": "ide1-cd0",
"node-name": "node0" } }
EQMP
{
- .name = "x-input-send-event",
+ .name = "input-send-event",
.args_type = "console:i?,events:q",
- .mhandler.cmd_new = qmp_marshal_x_input_send_event,
+ .mhandler.cmd_new = qmp_marshal_input_send_event,
},
SQMP
-@x-input-send-event
+@input-send-event
-----------------
Send input event to guest.
Arguments:
-- "console": console index. (json-int, optional)
-- "events": list of input events.
+- "device": display device (json-string, optional)
+- "head": display head (json-int, optional)
+- "events": list of input events
The consoles are visible in the qom tree, under
/backend/console[$index]. They have a device link and head property, so
Press left mouse button.
--> { "execute": "x-input-send-event",
- "arguments": { "console": 0,
+-> { "execute": "input-send-event",
+ "arguments": { "device": "video0",
"events": [ { "type": "btn",
- "data" : { "down": true, "button": "Left" } } ] } }
+ "data" : { "down": true, "button": "left" } } ] } }
<- { "return": {} }
--> { "execute": "x-input-send-event",
- "arguments": { "console": 0,
+-> { "execute": "input-send-event",
+ "arguments": { "device": "video0",
"events": [ { "type": "btn",
- "data" : { "down": false, "button": "Left" } } ] } }
+ "data" : { "down": false, "button": "left" } } ] } }
<- { "return": {} }
Example (2):
Press ctrl-alt-del.
--> { "execute": "x-input-send-event",
- "arguments": { "console": 0, "events": [
+-> { "execute": "input-send-event",
+ "arguments": { "events": [
{ "type": "key", "data" : { "down": true,
"key": {"type": "qcode", "data": "ctrl" } } },
{ "type": "key", "data" : { "down": true,
Move mouse pointer to absolute coordinates (20000, 400).
--> { "execute": "x-input-send-event" ,
- "arguments": { "console": 0, "events": [
- { "type": "abs", "data" : { "axis": "X", "value" : 20000 } },
- { "type": "abs", "data" : { "axis": "Y", "value" : 400 } } ] } }
+-> { "execute": "input-send-event" ,
+ "arguments": { "events": [
+ { "type": "abs", "data" : { "axis": "x", "value" : 20000 } },
+ { "type": "abs", "data" : { "axis": "y", "value" : 400 } } ] } }
<- { "return": {} }
EQMP