4 This document describes all commands currently supported by QMP.
6 Most of the time their usage is exactly the same as in the user Monitor, this
7 means that any other document which also describe commands (the manpage,
8 QEMU's manual, etc) can and should be consulted.
10 QMP has two types of commands: regular and query commands. Regular commands
11 usually change the Virtual Machine's state someway, while query commands just
12 return information. The sections below are divided accordingly.
14 It's important to observe that all communication examples are formatted in
15 a reader-friendly way, so that they're easier to understand. However, in real
16 protocol usage, they're emitted as a single line.
18 Also, the following notation is used to denote data flow:
20 -> data issued by the Client
21 <- Server data response
23 Please, refer to the QMP specification (docs/qmp-spec.txt) for detailed
24 information on the Server command and response formats.
26 NOTE: This document is temporary and will be replaced soon.
28 1. Stability Considerations
29 ===========================
31 The current QMP command set (described in this file) may be useful for a
32 number of use cases, however it's limited and several commands have bad
33 defined semantics, specially with regard to command completion.
35 These problems are going to be solved incrementally in the next QEMU releases
36 and we're going to establish a deprecation policy for badly defined commands.
38 If you're planning to adopt QMP, please observe the following:
40 1. The deprecation policy will take effect and be documented soon, please
41 check the documentation of each used command as soon as a new release of
44 2. DO NOT rely on anything which is not explicit documented
46 3. Errors, in special, are not documented. Applications should NOT check
47 for specific errors classes or data (it's strongly recommended to only
48 check for the "error" key)
53 Server's responses in the examples below are always a success response, please
54 refer to the QMP specification for more details on error responses.
59 Eject a removable medium.
63 - "force": force ejection (json-bool, optional)
64 - "device": block device name (deprecated, use @id instead)
65 (json-string, optional)
66 - "id": the name or QOM path of the guest device (json-string, optional)
70 -> { "execute": "eject", "arguments": { "id": "ide0-1-0" } }
73 Note: The "force" argument defaults to false.
82 - "driver": the name of the new device's driver (json-string)
83 - "bus": the device's parent bus (device tree path, json-string, optional)
84 - "id": the device's ID, must be unique (json-string)
89 -> { "execute": "device_add", "arguments": { "driver": "e1000", "id": "net1" } }
94 (1) For detailed information about this command, please refer to the
95 'docs/qdev-device-use.txt' file.
97 (2) It's possible to list device properties by running QEMU with the
98 "-device DEVICE,\?" command-line argument, where DEVICE is the device's name
107 - "index": the CPU's index (json-int)
111 -> { "execute": "cpu", "arguments": { "index": 0 } }
114 Note: CPUs' indexes are obtained with the 'query-cpus' command.
116 xen-load-devices-state
117 ----------------------
119 Load the state of all devices from file. The RAM and the block devices
120 of the VM are not loaded by this command.
124 - "filename": the file to load the state of the devices from as binary
125 data. See xen-save-devices-state.txt for a description of the binary
130 -> { "execute": "xen-load-devices-state",
131 "arguments": { "filename": "/tmp/resume" } }
134 migrate-set-cache-size
135 ----------------------
137 Set cache size to be used by XBZRLE migration, the cache size will be rounded
138 down to the nearest power of 2
142 - "value": cache size in bytes (json-int)
146 -> { "execute": "migrate-set-cache-size", "arguments": { "value": 536870912 } }
149 x-colo-lost-heartbeat
152 Tell COLO that heartbeat is lost, a failover or takeover is needed.
156 -> { "execute": "x-colo-lost-heartbeat" }
162 Query background dump status.
168 -> { "execute": "query-dump" }
169 <- { "return": { "status": "active", "completed": 1024000,
175 Copy data from a backing file into a block device.
179 - "job-id": Identifier for the newly-created block job. If omitted,
180 the device name will be used. (json-string, optional)
181 - "device": The device name or node-name of a root node (json-string)
182 - "base": The file name of the backing image above which copying starts.
183 It cannot be set if 'base-node' is also set (json-string, optional)
184 - "base-node": the node name of the backing image above which copying starts.
185 It cannot be set if 'base' is also set.
186 (json-string, optional) (Since 2.8)
187 - "backing-file": The backing file string to write into the active layer. This
188 filename is not validated.
190 If a pathname string is such that it cannot be resolved by
191 QEMU, that means that subsequent QMP or HMP commands must use
192 node-names for the image in question, as filename lookup
195 If not specified, QEMU will automatically determine the
196 backing file string to use, or error out if there is no
197 obvious choice. Care should be taken when specifying the
198 string, to specify a valid filename or protocol.
199 (json-string, optional) (Since 2.1)
200 - "speed": the maximum speed, in bytes per second (json-int, optional)
201 - "on-error": the action to take on an error (default 'report'). 'stop' and
202 'enospc' can only be used if the block device supports io-status.
203 (json-string, optional) (Since 2.1)
207 -> { "execute": "block-stream", "arguments": { "device": "virtio0",
208 "base": "/tmp/master.qcow2" } }
214 Start a point-in-time copy of a block device to a new destination. The
215 status of ongoing drive-backup operations can be checked with
216 query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
217 The operation can be stopped before it has completed using the
218 block-job-cancel command.
222 - "job-id": Identifier for the newly-created block job. If omitted,
223 the device name will be used. (json-string, optional)
224 - "device": the device name or node-name of a root node which should be copied.
226 - "target": the target of the new image. If the file exists, or if it is a
227 device, the existing file/device will be used as the new
228 destination. If it does not exist, a new file will be created.
230 - "format": the format of the new destination, default is to probe if 'mode' is
231 'existing', else the format of the source
232 (json-string, optional)
233 - "sync": what parts of the disk image should be copied to the destination;
234 possibilities include "full" for all the disk, "top" for only the sectors
235 allocated in the topmost image, "incremental" for only the dirty sectors in
236 the bitmap, or "none" to only replicate new I/O (MirrorSyncMode).
237 - "bitmap": dirty bitmap name for sync==incremental. Must be present if sync
238 is "incremental", must NOT be present otherwise.
239 - "mode": whether and how QEMU should create a new image
240 (NewImageMode, optional, default 'absolute-paths')
241 - "speed": the maximum speed, in bytes per second (json-int, optional)
242 - "compress": true to compress data, if the target format supports it.
243 (json-bool, optional, default false)
244 - "on-source-error": the action to take on an error on the source, default
245 'report'. 'stop' and 'enospc' can only be used
246 if the block device supports io-status.
247 (BlockdevOnError, optional)
248 - "on-target-error": the action to take on an error on the target, default
249 'report' (no limitations, since this applies to
250 a different block device than device).
251 (BlockdevOnError, optional)
254 -> { "execute": "drive-backup", "arguments": { "device": "drive0",
256 "target": "backup.img" } }
262 The device version of drive-backup: this command takes an existing named device
267 - "job-id": Identifier for the newly-created block job. If omitted,
268 the device name will be used. (json-string, optional)
269 - "device": the device name or node-name of a root node which should be copied.
271 - "target": the name of the backup target device. (json-string)
272 - "sync": what parts of the disk image should be copied to the destination;
273 possibilities include "full" for all the disk, "top" for only the
274 sectors allocated in the topmost image, or "none" to only replicate
275 new I/O (MirrorSyncMode).
276 - "speed": the maximum speed, in bytes per second (json-int, optional)
277 - "compress": true to compress data, if the target format supports it.
278 (json-bool, optional, default false)
279 - "on-source-error": the action to take on an error on the source, default
280 'report'. 'stop' and 'enospc' can only be used
281 if the block device supports io-status.
282 (BlockdevOnError, optional)
283 - "on-target-error": the action to take on an error on the target, default
284 'report' (no limitations, since this applies to
285 a different block device than device).
286 (BlockdevOnError, optional)
289 -> { "execute": "blockdev-backup", "arguments": { "device": "src-id",
291 "target": "tgt-id" } }
294 block-dirty-bitmap-add
295 ----------------------
298 Create a dirty bitmap with a name on the device, and start tracking the writes.
302 - "node": device/node on which to create dirty bitmap (json-string)
303 - "name": name of the new dirty bitmap (json-string)
304 - "granularity": granularity to track writes with (int, optional)
308 -> { "execute": "block-dirty-bitmap-add", "arguments": { "node": "drive0",
309 "name": "bitmap0" } }
312 block-dirty-bitmap-remove
313 -------------------------
316 Stop write tracking and remove the dirty bitmap that was created with
317 block-dirty-bitmap-add.
321 - "node": device/node on which to remove dirty bitmap (json-string)
322 - "name": name of the dirty bitmap to remove (json-string)
326 -> { "execute": "block-dirty-bitmap-remove", "arguments": { "node": "drive0",
327 "name": "bitmap0" } }
330 block-dirty-bitmap-clear
331 ------------------------
334 Reset the dirty bitmap associated with a node so that an incremental backup
335 from this point in time forward will only backup clusters modified after this
340 - "node": device/node on which to remove dirty bitmap (json-string)
341 - "name": name of the dirty bitmap to remove (json-string)
345 -> { "execute": "block-dirty-bitmap-clear", "arguments": { "node": "drive0",
346 "name": "bitmap0" } }
349 blockdev-snapshot-internal-sync
350 -------------------------------
352 Synchronously take an internal snapshot of a block device when the format of
353 image used supports it. If the name is an empty string, or a snapshot with
354 name already exists, the operation will fail.
358 - "device": the device name or node-name of a root node to snapshot
360 - "name": name of the new snapshot (json-string)
364 -> { "execute": "blockdev-snapshot-internal-sync",
365 "arguments": { "device": "ide-hd0",
366 "name": "snapshot0" }
370 blockdev-snapshot-delete-internal-sync
371 --------------------------------------
373 Synchronously delete an internal snapshot of a block device when the format of
374 image used supports it. The snapshot is identified by name or id or both. One
375 of name or id is required. If the snapshot is not found, the operation will
380 - "device": the device name or node-name of a root node (json-string)
381 - "id": ID of the snapshot (json-string, optional)
382 - "name": name of the snapshot (json-string, optional)
386 -> { "execute": "blockdev-snapshot-delete-internal-sync",
387 "arguments": { "device": "ide-hd0",
388 "name": "snapshot0" }
404 Start mirroring a block device's writes to a new destination. target
405 specifies the target of the new image. If the file exists, or if it is
406 a device, it will be used as the new destination for writes. If it does not
407 exist, a new file will be created. format specifies the format of the
408 mirror image, default is to probe if mode='existing', else the format
413 - "job-id": Identifier for the newly-created block job. If omitted,
414 the device name will be used. (json-string, optional)
415 - "device": the device name or node-name of a root node whose writes should be
416 mirrored. (json-string)
417 - "target": name of new image file (json-string)
418 - "format": format of new image (json-string, optional)
419 - "node-name": the name of the new block driver state in the node graph
420 (json-string, optional)
421 - "replaces": the block driver node name to replace when finished
422 (json-string, optional)
423 - "mode": how an image file should be created into the target
424 file/device (NewImageMode, optional, default 'absolute-paths')
425 - "speed": maximum speed of the streaming job, in bytes per second
427 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
428 - "buf-size": maximum amount of data in flight from source to target, in bytes
429 (json-int, default 10M)
430 - "sync": what parts of the disk image should be copied to the destination;
431 possibilities include "full" for all the disk, "top" for only the sectors
432 allocated in the topmost image, or "none" to only replicate new I/O
434 - "on-source-error": the action to take on an error on the source
435 (BlockdevOnError, default 'report')
436 - "on-target-error": the action to take on an error on the target
437 (BlockdevOnError, default 'report')
438 - "unmap": whether the target sectors should be discarded where source has only
439 zeroes. (json-bool, optional, default true)
441 The default value of the granularity is the image cluster size clamped
442 between 4096 and 65536, if the image format defines one. If the format
443 does not define a cluster size, the default value of the granularity
449 -> { "execute": "drive-mirror", "arguments": { "device": "ide-hd0",
450 "target": "/some/place/my-image",
452 "format": "qcow2" } }
458 Start mirroring a block device's writes to another block device. target
459 specifies the target of mirror operation.
463 - "job-id": Identifier for the newly-created block job. If omitted,
464 the device name will be used. (json-string, optional)
465 - "device": The device name or node-name of a root node whose writes should be
466 mirrored (json-string)
467 - "target": device name to mirror to (json-string)
468 - "replaces": the block driver node name to replace when finished
469 (json-string, optional)
470 - "speed": maximum speed of the streaming job, in bytes per second
472 - "granularity": granularity of the dirty bitmap, in bytes (json-int, optional)
473 - "buf_size": maximum amount of data in flight from source to target, in bytes
474 (json-int, default 10M)
475 - "sync": what parts of the disk image should be copied to the destination;
476 possibilities include "full" for all the disk, "top" for only the sectors
477 allocated in the topmost image, or "none" to only replicate new I/O
479 - "on-source-error": the action to take on an error on the source
480 (BlockdevOnError, default 'report')
481 - "on-target-error": the action to take on an error on the target
482 (BlockdevOnError, default 'report')
484 The default value of the granularity is the image cluster size clamped
485 between 4096 and 65536, if the image format defines one. If the format
486 does not define a cluster size, the default value of the granularity
491 -> { "execute": "blockdev-mirror", "arguments": { "device": "ide-hd0",
496 block_set_io_throttle
499 Change I/O throttle limits for a block drive.
503 - "device": block device name (deprecated, use @id instead)
504 (json-string, optional)
505 - "id": the name or QOM path of the guest device (json-string, optional)
506 - "bps": total throughput limit in bytes per second (json-int)
507 - "bps_rd": read throughput limit in bytes per second (json-int)
508 - "bps_wr": write throughput limit in bytes per second (json-int)
509 - "iops": total I/O operations per second (json-int)
510 - "iops_rd": read I/O operations per second (json-int)
511 - "iops_wr": write I/O operations per second (json-int)
512 - "bps_max": total throughput limit during bursts, in bytes (json-int, optional)
513 - "bps_rd_max": read throughput limit during bursts, in bytes (json-int, optional)
514 - "bps_wr_max": write throughput limit during bursts, in bytes (json-int, optional)
515 - "iops_max": total I/O operations per second during bursts (json-int, optional)
516 - "iops_rd_max": read I/O operations per second during bursts (json-int, optional)
517 - "iops_wr_max": write I/O operations per second during bursts (json-int, optional)
518 - "bps_max_length": maximum length of the @bps_max burst period, in seconds (json-int, optional)
519 - "bps_rd_max_length": maximum length of the @bps_rd_max burst period, in seconds (json-int, optional)
520 - "bps_wr_max_length": maximum length of the @bps_wr_max burst period, in seconds (json-int, optional)
521 - "iops_max_length": maximum length of the @iops_max burst period, in seconds (json-int, optional)
522 - "iops_rd_max_length": maximum length of the @iops_rd_max burst period, in seconds (json-int, optional)
523 - "iops_wr_max_length": maximum length of the @iops_wr_max burst period, in seconds (json-int, optional)
524 - "iops_size": I/O size in bytes when limiting (json-int, optional)
525 - "group": throttle group name (json-string, optional)
529 -> { "execute": "block_set_io_throttle", "arguments": { "id": "ide0-1-0",
542 "bps_max_length": 60,
549 Enable QMP capabilities.
555 -> { "execute": "qmp_capabilities" }
558 Note: This command must be issued before issuing any other command.
569 Return a json-object with the following information:
571 - "qemu": A json-object containing three integer values:
572 - "major": QEMU's major version (json-int)
573 - "minor": QEMU's minor version (json-int)
574 - "micro": QEMU's micro version (json-int)
575 - "package": package's version (json-string)
579 -> { "execute": "query-version" }
594 List QMP available commands.
596 Each command is represented by a json-object, the returned value is a json-array
599 Each json-object contain:
601 - "name": command's name (json-string)
605 -> { "execute": "query-commands" }
609 "name":"query-balloon"
612 "name":"system_powerdown"
617 Note: This example has been shortened as the real response is too long.
622 Return the QMP wire schema. The returned value is a json-array of
623 named schema entities. Entities are commands, events and various
624 types. See docs/qapi-code-gen.txt for information on their structure
632 This command is still a work in progress. It doesn't support all
633 block drivers among other things. Stay away from it unless you want
634 to help with its development.
636 For the arguments, see the QAPI schema documentation of BlockdevOptions.
640 -> { "execute": "blockdev-add",
641 "arguments": { "driver": "qcow2",
642 "file": { "driver": "file",
643 "filename": "test.qcow2" } } }
648 -> { "execute": "blockdev-add",
651 "node-name": "my_disk",
659 "filename": "/tmp/test.qcow2"
665 "filename": "/dev/fdset/4"
677 Deletes a block device that has been added using blockdev-add.
678 The command will fail if the node is attached to a device or is
679 otherwise being used.
681 This command is still a work in progress and is considered
682 experimental. Stay away from it unless you want to help with its
687 - "node-name": Name of the graph node to delete (json-string)
691 -> { "execute": "blockdev-add",
694 "node-name": "node0",
697 "filename": "test.qcow2"
704 -> { "execute": "x-blockdev-del",
705 "arguments": { "node-name": "node0" }
712 Opens a block device's tray. If there is a block driver state tree inserted as a
713 medium, it will become inaccessible to the guest (but it will remain associated
714 to the block device, so closing the tray will make it accessible again).
716 If the tray was already open before, this will be a no-op.
718 Once the tray opens, a DEVICE_TRAY_MOVED event is emitted. There are cases in
719 which no such event will be generated, these include:
720 - if the guest has locked the tray, @force is false and the guest does not
721 respond to the eject request
722 - if the BlockBackend denoted by @device does not have a guest device attached
724 - if the guest device does not have an actual tray and is empty, for instance
725 for floppy disk drives
729 - "device": block device name (deprecated, use @id instead)
730 (json-string, optional)
731 - "id": the name or QOM path of the guest device (json-string, optional)
732 - "force": if false (the default), an eject request will be sent to the guest if
733 it has locked the tray (and the tray will not be opened immediately);
734 if true, the tray will be opened regardless of whether it is locked
735 (json-bool, optional)
739 -> { "execute": "blockdev-open-tray",
740 "arguments": { "id": "ide0-1-0" } }
742 <- { "timestamp": { "seconds": 1418751016,
743 "microseconds": 716996 },
744 "event": "DEVICE_TRAY_MOVED",
745 "data": { "device": "ide1-cd0",
747 "tray-open": true } }
754 Closes a block device's tray. If there is a block driver state tree associated
755 with the block device (which is currently ejected), that tree will be loaded as
758 If the tray was already closed before, this will be a no-op.
762 - "device": block device name (deprecated, use @id instead)
763 (json-string, optional)
764 - "id": the name or QOM path of the guest device (json-string, optional)
768 -> { "execute": "blockdev-close-tray",
769 "arguments": { "id": "ide0-1-0" } }
771 <- { "timestamp": { "seconds": 1418751345,
772 "microseconds": 272147 },
773 "event": "DEVICE_TRAY_MOVED",
774 "data": { "device": "ide1-cd0",
776 "tray-open": false } }
780 x-blockdev-remove-medium
781 ------------------------
783 Removes a medium (a block driver state tree) from a block device. That block
784 device's tray must currently be open (unless there is no attached guest device).
786 If the tray is open and there is no medium inserted, this will be a no-op.
788 This command is still a work in progress and is considered experimental.
789 Stay away from it unless you want to help with its development.
793 - "device": block device name (deprecated, use @id instead)
794 (json-string, optional)
795 - "id": the name or QOM path of the guest device (json-string, optional)
799 -> { "execute": "x-blockdev-remove-medium",
800 "arguments": { "id": "ide0-1-0" } }
802 <- { "error": { "class": "GenericError",
803 "desc": "Tray of device 'ide0-1-0' is not open" } }
805 -> { "execute": "blockdev-open-tray",
806 "arguments": { "id": "ide0-1-0" } }
808 <- { "timestamp": { "seconds": 1418751627,
809 "microseconds": 549958 },
810 "event": "DEVICE_TRAY_MOVED",
811 "data": { "device": "ide1-cd0",
813 "tray-open": true } }
817 -> { "execute": "x-blockdev-remove-medium",
818 "arguments": { "device": "ide0-1-0" } }
822 x-blockdev-insert-medium
823 ------------------------
825 Inserts a medium (a block driver state tree) into a block device. That block
826 device's tray must currently be open (unless there is no attached guest device)
827 and there must be no medium inserted already.
829 This command is still a work in progress and is considered experimental.
830 Stay away from it unless you want to help with its development.
834 - "device": block device name (deprecated, use @id instead)
835 (json-string, optional)
836 - "id": the name or QOM path of the guest device (json-string, optional)
837 - "node-name": root node of the BDS tree to insert into the block device
841 -> { "execute": "blockdev-add",
842 "arguments": { { "node-name": "node0",
844 "file": { "driver": "file",
845 "filename": "fedora.iso" } } }
849 -> { "execute": "x-blockdev-insert-medium",
850 "arguments": { "id": "ide0-1-0",
851 "node-name": "node0" } }
858 Dynamically reconfigure the block driver state graph. It can be used
859 to add, remove, insert or replace a graph node. Currently only the
860 Quorum driver implements this feature to add or remove its child. This
861 is useful to fix a broken quorum child.
863 If @node is specified, it will be inserted under @parent. @child
864 may not be specified in this case. If both @parent and @child are
865 specified but @node is not, @child will be detached from @parent.
868 - "parent": the id or name of the parent node (json-string)
869 - "child": the name of a child under the given parent node (json-string, optional)
870 - "node": the name of the node that will be added (json-string, optional)
872 Note: this command is experimental, and not a stable API. It doesn't
873 support all kinds of operations, all kinds of children, nor all block
876 Warning: The data in a new quorum child MUST be consistent with that of
877 the rest of the array.
881 Add a new node to a quorum
882 -> { "execute": "blockdev-add",
883 "arguments": { "driver": "raw",
884 "node-name": "new_node",
885 "file": { "driver": "file",
886 "filename": "test.raw" } } }
888 -> { "execute": "x-blockdev-change",
889 "arguments": { "parent": "disk1",
890 "node": "new_node" } }
893 Delete a quorum's node
894 -> { "execute": "x-blockdev-change",
895 "arguments": { "parent": "disk1",
896 "child": "children.1" } }
899 query-named-block-nodes
900 -----------------------
902 Return a list of BlockDeviceInfo for all the named block driver nodes
906 -> { "execute": "query-named-block-nodes" }
907 <- { "return": [ { "ro":false,
910 "file":"disks/test.qcow2",
911 "node-name": "my-node",
912 "backing_file_depth":1,
926 "write_threshold": 0,
928 "filename":"disks/test.qcow2",
930 "virtual-size":2048000,
931 "backing_file":"base.qcow2",
932 "full-backing-filename":"disks/base.qcow2",
933 "backing-filename-format":"qcow2",
939 "date-sec": 10000200,
946 "filename":"disks/base.qcow2",
948 "virtual-size":2048000
952 blockdev-change-medium
953 ----------------------
955 Changes the medium inserted into a block device by ejecting the current medium
956 and loading a new image file which is inserted as the new medium.
960 - "device": block device name (deprecated, use @id instead)
961 (json-string, optional)
962 - "id": the name or QOM path of the guest device (json-string, optional)
963 - "filename": filename of the new image (json-string)
964 - "format": format of the new image (json-string, optional)
965 - "read-only-mode": new read-only mode (json-string, optional)
966 - Possible values: "retain" (default), "read-only", "read-write"
970 1. Change a removable medium
972 -> { "execute": "blockdev-change-medium",
973 "arguments": { "id": "ide0-1-0",
974 "filename": "/srv/images/Fedora-12-x86_64-DVD.iso",
978 2. Load a read-only medium into a writable drive
980 -> { "execute": "blockdev-change-medium",
981 "arguments": { "id": "floppyA",
982 "filename": "/srv/images/ro.img",
984 "read-only-mode": "retain" } }
987 { "class": "GenericError",
988 "desc": "Could not open '/srv/images/ro.img': Permission denied" } }
990 -> { "execute": "blockdev-change-medium",
991 "arguments": { "id": "floppyA",
992 "filename": "/srv/images/ro.img",
994 "read-only-mode": "read-only" } }
998 trace-event-get-state
999 ---------------------
1001 Query the state of events.
1005 - "name": Event name pattern (json-string).
1006 - "vcpu": The vCPU to query, any vCPU by default (json-int, optional).
1008 An event is returned if:
1009 - its name matches the "name" pattern, and
1010 - if "vcpu" is given, the event has the "vcpu" property.
1012 Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
1013 returning their state on the specified vCPU. Special case: if "name" is an exact
1014 match, "vcpu" is given and the event does not have the "vcpu" property, an error
1019 -> { "execute": "trace-event-get-state", "arguments": { "name": "qemu_memalign" } }
1020 <- { "return": [ { "name": "qemu_memalign", "state": "disabled" } ] }
1022 trace-event-set-state
1023 ---------------------
1025 Set the state of events.
1029 - "name": Event name pattern (json-string).
1030 - "enable": Whether to enable or disable the event (json-bool).
1031 - "ignore-unavailable": Whether to ignore errors for events that cannot be
1032 changed (json-bool, optional).
1033 - "vcpu": The vCPU to act upon, all vCPUs by default (json-int, optional).
1035 An event's state is modified if:
1036 - its name matches the "name" pattern, and
1037 - if "vcpu" is given, the event has the "vcpu" property.
1039 Therefore, if "vcpu" is given, the operation will only match per-vCPU events,
1040 setting their state on the specified vCPU. Special case: if "name" is an exact
1041 match, "vcpu" is given and the event does not have the "vcpu" property, an error
1046 -> { "execute": "trace-event-set-state", "arguments": { "name": "qemu_memalign", "enable": "true" } }
1049 block-set-write-threshold
1052 Change the write threshold for a block drive. The threshold is an offset,
1053 thus must be non-negative. Default is no write threshold.
1054 Setting the threshold to zero disables it.
1058 - "node-name": the node name in the block driver state graph (json-string)
1059 - "write-threshold": the write threshold in bytes (json-int)
1063 -> { "execute": "block-set-write-threshold",
1064 "arguments": { "node-name": "mydev",
1065 "write-threshold": 17179869184 } }
1073 - "name": switch name
1077 -> { "execute": "query-rocker", "arguments": { "name": "sw1" } }
1078 <- { "return": {"name": "sw1", "ports": 2, "id": 1327446905938}}
1080 Show rocker switch ports
1081 ------------------------
1085 - "name": switch name
1089 -> { "execute": "query-rocker-ports", "arguments": { "name": "sw1" } }
1090 <- { "return": [ {"duplex": "full", "enabled": true, "name": "sw1.1",
1091 "autoneg": "off", "link-up": true, "speed": 10000},
1092 {"duplex": "full", "enabled": true, "name": "sw1.2",
1093 "autoneg": "off", "link-up": true, "speed": 10000}
1096 Show rocker switch OF-DPA flow tables
1097 -------------------------------------
1101 - "name": switch name
1102 - "tbl-id": (optional) flow table ID
1106 -> { "execute": "query-rocker-of-dpa-flows", "arguments": { "name": "sw1" } }
1107 <- { "return": [ {"key": {"in-pport": 0, "priority": 1, "tbl-id": 0},
1110 "action": {"goto-tbl": 10},
1111 "mask": {"in-pport": 4294901760}
1116 Show rocker OF-DPA group tables
1117 -------------------------------
1121 - "name": switch name
1122 - "type": (optional) group type
1126 -> { "execute": "query-rocker-of-dpa-groups", "arguments": { "name": "sw1" } }
1127 <- { "return": [ {"type": 0, "out-pport": 2, "pport": 2, "vlan-id": 3841,
1128 "pop-vlan": 1, "id": 251723778},
1129 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3841,
1130 "pop-vlan": 1, "id": 251723776},
1131 {"type": 0, "out-pport": 1, "pport": 1, "vlan-id": 3840,
1132 "pop-vlan": 1, "id": 251658241},
1133 {"type": 0, "out-pport": 0, "pport": 0, "vlan-id": 3840,
1134 "pop-vlan": 1, "id": 251658240}
1137 query-gic-capabilities
1140 Return a list of GICCapability objects, describing supported GIC
1141 (Generic Interrupt Controller) versions.
1147 -> { "execute": "query-gic-capabilities" }
1148 <- { "return": [{ "version": 2, "emulated": true, "kernel": false },
1149 { "version": 3, "emulated": false, "kernel": true } ] }
1151 Show existing/possible CPUs
1152 ---------------------------
1156 Example for pseries machine type started with
1157 -smp 2,cores=2,maxcpus=4 -cpu POWER8:
1159 -> { "execute": "query-hotpluggable-cpus" }
1161 { "props": { "core-id": 8 }, "type": "POWER8-spapr-cpu-core",
1163 { "props": { "core-id": 0 }, "type": "POWER8-spapr-cpu-core",
1164 "vcpus-count": 1, "qom-path": "/machine/unattached/device[0]"}
1167 Example for pc machine type started with
1169 -> { "execute": "query-hotpluggable-cpus" }
1172 "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1173 "props": {"core-id": 0, "socket-id": 1, "thread-id": 0}
1176 "qom-path": "/machine/unattached/device[0]",
1177 "type": "qemu64-x86_64-cpu", "vcpus-count": 1,
1178 "props": {"core-id": 0, "socket-id": 0, "thread-id": 0}