# information (since 1.7)
#
# Since: 1.3
-#
##
{ 'struct': 'ImageInfo',
'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
# supports it
#
# Since: 1.4
-#
##
{ 'struct': 'ImageCheck',
'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
# @filename: filename that is referred to by @offset
#
# Since: 2.6
-#
##
{ 'struct': 'MapEntry',
'data': {'start': 'int', 'length': 'int', 'data': 'bool',
#
# Cache mode information for a block device
#
-# @writeback: true if writeback mode is enabled
-# @direct: true if the host page cache is bypassed (O_DIRECT)
-# @no-flush: true if flush requests are ignored for the device
+# @writeback: true if writeback mode is enabled
+# @direct: true if the host page cache is bypassed (O_DIRECT)
+# @no-flush: true if flush requests are ignored for the device
#
# Since: 2.3
##
# has one or more dirty bitmaps) (Since 4.2)
#
# Since: 0.14
-#
##
{ 'struct': 'BlockDeviceInfo',
'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
#
# @recording: true if the bitmap is recording new writes from the guest.
-# Replaces `active` and `disabled` statuses. (since 4.0)
+# Replaces ``active`` and ``disabled`` statuses. (since 4.0)
#
# @busy: true if the bitmap is in-use by some operation (NBD or jobs)
# and cannot be modified via QMP or used by another operation.
-# Replaces `locked` and `frozen` statuses. (since 4.0)
+# Replaces ``locked`` and ``frozen`` statuses. (since 4.0)
#
# @persistent: true if the bitmap was stored on disk, is scheduled to be stored
# on disk, or both. (since 4.0)
# @inserted: @BlockDeviceInfo describing the device if media is
# present
#
-# Since: 0.14
+# Since: 0.14
##
{ 'struct': 'BlockInfo',
'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool',
# }
#
##
-{ 'command': 'query-block', 'returns': ['BlockInfo'] }
-
+{ 'command': 'query-block', 'returns': ['BlockInfo'],
+ 'allow-preconfig': true }
##
# @BlockDeviceTimedStats:
#
# Statistics of a virtual block device or a block backing device.
#
-# @rd_bytes: The number of bytes read by the device.
+# @rd_bytes: The number of bytes read by the device.
#
-# @wr_bytes: The number of bytes written by the device.
+# @wr_bytes: The number of bytes written by the device.
#
# @unmap_bytes: The number of bytes unmapped by the device (Since 4.2)
#
# @qdev: The qdev ID, or if no ID is assigned, the QOM path of the block
# device. (since 3.0)
#
-# @stats: A @BlockDeviceStats for the device.
+# @stats: A @BlockDeviceStats for the device.
#
# @driver-specific: Optional driver-specific stats. (Since 4.2)
#
##
{ 'command': 'query-blockstats',
'data': { '*query-nodes': 'bool' },
- 'returns': ['BlockStats'] }
+ 'returns': ['BlockStats'],
+ 'allow-preconfig': true }
##
# @BlockdevOnError:
#
# Since: 1.1
##
-{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
+{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'],
+ 'allow-preconfig': true }
##
# @block_resize:
#
# @node-name: graph node name to get the image resized (Since 2.0)
#
-# @size: new image size in bytes
+# @size: new image size in bytes
#
# Returns: - nothing on success
# - If @device is not a valid block device, DeviceNotFound
'data': { '*device': 'str',
'*node-name': 'str',
'size': 'int' },
- 'coroutine': true }
+ 'coroutine': true,
+ 'allow-preconfig': true }
##
# @NewImageMode:
#
# @x-perf: Performance options. (Since 6.0)
#
+# Features:
+# @unstable: Member @x-perf is experimental.
+#
# Note: @on-source-error and @on-target-error only affect background
# I/O. If an error occurs during a guest write request, the device's
# rerror/werror actions will be used.
'*on-source-error': 'BlockdevOnError',
'*on-target-error': 'BlockdevOnError',
'*auto-finalize': 'bool', '*auto-dismiss': 'bool',
- '*filter-node-name': 'str', '*x-perf': 'BackupPerf' } }
+ '*filter-node-name': 'str',
+ '*x-perf': { 'type': 'BackupPerf',
+ 'features': [ 'unstable' ] } } }
##
# @DriveBackup:
#
##
{ 'command': 'blockdev-snapshot-sync',
- 'data': 'BlockdevSnapshotSync' }
-
+ 'data': 'BlockdevSnapshotSync',
+ 'allow-preconfig': true }
##
# @blockdev-snapshot:
##
{ 'command': 'blockdev-snapshot',
'data': 'BlockdevSnapshot',
- 'features': [ 'allow-write-only-overlay' ] }
+ 'features': [ 'allow-write-only-overlay' ],
+ 'allow-preconfig': true }
##
# @change-backing-file:
##
{ 'command': 'change-backing-file',
'data': { 'device': 'str', 'image-node-name': 'str',
- 'backing-file': 'str' } }
+ 'backing-file': 'str' },
+ 'allow-preconfig': true }
##
# @block-commit:
'*backing-file': 'str', '*speed': 'int',
'*on-error': 'BlockdevOnError',
'*filter-node-name': 'str',
- '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
+ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' },
+ 'allow-preconfig': true }
##
# @drive-backup:
# The operation can be stopped before it has completed using the
# block-job-cancel command.
#
+# Features:
+# @deprecated: This command is deprecated. Use @blockdev-backup instead.
+#
# Returns: - nothing on success
# - If @device is not a valid block device, GenericError
#
#
##
{ 'command': 'drive-backup', 'boxed': true,
- 'data': 'DriveBackup' }
+ 'data': 'DriveBackup', 'features': ['deprecated'],
+ 'allow-preconfig': true }
##
# @blockdev-backup:
# Since: 2.3
#
# Example:
+#
# -> { "execute": "blockdev-backup",
# "arguments": { "device": "src-id",
# "sync": "full",
#
##
{ 'command': 'blockdev-backup', 'boxed': true,
- 'data': 'BlockdevBackup' }
-
+ 'data': 'BlockdevBackup',
+ 'allow-preconfig': true }
##
# @query-named-block-nodes:
# "file":"disks/test.qcow2",
# "node-name": "my-node",
# "backing_file_depth":1,
+# "detect_zeroes":"off",
# "bps":1000000,
# "bps_rd":0,
# "bps_wr":0,
##
{ 'command': 'query-named-block-nodes',
'returns': [ 'BlockDeviceInfo' ],
- 'data': { '*flat': 'bool' } }
+ 'data': { '*flat': 'bool' },
+ 'allow-preconfig': true }
##
# @XDbgBlockGraphNodeType:
#
# @resize: This permission is required to change the size of a block node.
#
-# @graph-mod: This permission is required to change the node that this
-# BdrvChild points to.
-#
# Since: 4.0
##
{ 'enum': 'BlockPermission',
- 'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize',
- 'graph-mod' ] }
+ 'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize' ] }
+
##
# @XDbgBlockGraphEdge:
#
#
# Get the block graph.
#
+# Features:
+# @unstable: This command is meant for debugging.
+#
# Since: 4.0
##
-{ 'command': 'x-debug-query-block-graph', 'returns': 'XDbgBlockGraph' }
+{ 'command': 'x-debug-query-block-graph', 'returns': 'XDbgBlockGraph',
+ 'features': [ 'unstable' ],
+ 'allow-preconfig': true }
##
# @drive-mirror:
#
##
{ 'command': 'drive-mirror', 'boxed': true,
- 'data': 'DriveMirror' }
+ 'data': 'DriveMirror',
+ 'allow-preconfig': true }
##
# @DriveMirror:
# @job-id: identifier for the newly-created block job. If
# omitted, the device name will be used. (Since 2.7)
#
-# @device: the device name or node-name of a root node whose writes should be
-# mirrored.
+# @device: the device name or node-name of a root node whose writes should be
+# mirrored.
#
# @target: the target of the new image. If the file exists, or if it
# is a device, the existing file/device will be used as the new
# @mode: whether and how QEMU should create a new image, default is
# 'absolute-paths'.
#
-# @speed: the maximum speed, in bytes per second
+# @speed: the maximum speed, in bytes per second
#
# @sync: what parts of the disk image should be copied to the destination
# (all the disk, only the sectors allocated in the topmost image, or
# @on-target-error: the action to take on an error on the target,
# default 'report' (no limitations, since this applies to
# a different block device than @device).
+#
# @unmap: Whether to try to unmap target sectors where source has
# only zero. If true, and target unallocated sectors will read as zero,
# target image sectors will be unmapped; otherwise, zeroes will be
# When true, this job will automatically disappear from the query
# list without user intervention.
# Defaults to true. (Since 3.1)
+#
# Since: 1.3
##
{ 'struct': 'DriveMirror',
'*persistent': 'bool', '*disabled': 'bool' } }
##
-# @BlockDirtyBitmapMergeSource:
+# @BlockDirtyBitmapOrStr:
#
# @local: name of the bitmap, attached to the same node as target bitmap.
#
#
# Since: 4.1
##
-{ 'alternate': 'BlockDirtyBitmapMergeSource',
+{ 'alternate': 'BlockDirtyBitmapOrStr',
'data': { 'local': 'str',
'external': 'BlockDirtyBitmap' } }
##
{ 'struct': 'BlockDirtyBitmapMerge',
'data': { 'node': 'str', 'target': 'str',
- 'bitmaps': ['BlockDirtyBitmapMergeSource'] } }
+ 'bitmaps': ['BlockDirtyBitmapOrStr'] } }
##
# @block-dirty-bitmap-add:
#
##
{ 'command': 'block-dirty-bitmap-add',
- 'data': 'BlockDirtyBitmapAdd' }
+ 'data': 'BlockDirtyBitmapAdd',
+ 'allow-preconfig': true }
##
# @block-dirty-bitmap-remove:
#
##
{ 'command': 'block-dirty-bitmap-remove',
- 'data': 'BlockDirtyBitmap' }
+ 'data': 'BlockDirtyBitmap',
+ 'allow-preconfig': true }
##
# @block-dirty-bitmap-clear:
#
##
{ 'command': 'block-dirty-bitmap-clear',
- 'data': 'BlockDirtyBitmap' }
+ 'data': 'BlockDirtyBitmap',
+ 'allow-preconfig': true }
##
# @block-dirty-bitmap-enable:
#
##
{ 'command': 'block-dirty-bitmap-enable',
- 'data': 'BlockDirtyBitmap' }
+ 'data': 'BlockDirtyBitmap',
+ 'allow-preconfig': true }
##
# @block-dirty-bitmap-disable:
#
##
{ 'command': 'block-dirty-bitmap-disable',
- 'data': 'BlockDirtyBitmap' }
+ 'data': 'BlockDirtyBitmap',
+ 'allow-preconfig': true }
##
# @block-dirty-bitmap-merge:
#
##
{ 'command': 'block-dirty-bitmap-merge',
- 'data': 'BlockDirtyBitmapMerge' }
+ 'data': 'BlockDirtyBitmapMerge',
+ 'allow-preconfig': true }
##
# @BlockDirtyBitmapSha256:
#
# Get bitmap SHA256.
#
+# Features:
+# @unstable: This command is meant for debugging.
+#
# Returns: - BlockDirtyBitmapSha256 on success
# - If @node is not a valid block device, DeviceNotFound
# - If @name is not found or if hashing has failed, GenericError with an
# Since: 2.10
##
{ 'command': 'x-debug-block-dirty-bitmap-sha256',
- 'data': 'BlockDirtyBitmap', 'returns': 'BlockDirtyBitmapSha256' }
+ 'data': 'BlockDirtyBitmap', 'returns': 'BlockDirtyBitmapSha256',
+ 'features': [ 'unstable' ],
+ 'allow-preconfig': true }
##
# @blockdev-mirror:
# broken Quorum files. By default, @device is replaced, although
# implicitly created filters on it are kept.
#
-# @speed: the maximum speed, in bytes per second
+# @speed: the maximum speed, in bytes per second
#
# @sync: what parts of the disk image should be copied to the destination
# (all the disk, only the sectors allocated in the topmost image, or
# When true, this job will automatically disappear from the query
# list without user intervention.
# Defaults to true. (Since 3.1)
+#
# Returns: nothing on success.
#
# Since: 2.6
'*on-target-error': 'BlockdevOnError',
'*filter-node-name': 'str',
'*copy-mode': 'MirrorCopyMode',
- '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
+ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' },
+ 'allow-preconfig': true }
##
# @BlockIOThrottle:
#
# Properties for throttle-group objects.
#
-# The options starting with x- are aliases for the same key without x- in
-# the @limits object. As indicated by the x- prefix, this is not a stable
-# interface and may be removed or changed incompatibly in the future. Use
-# @limits for a supported stable interface.
-#
# @limits: limits to apply for this throttle group
#
+# Features:
+# @unstable: All members starting with x- are aliases for the same key
+# without x- in the @limits object. This is not a stable
+# interface and may be removed or changed incompatibly in
+# the future. Use @limits for a supported stable
+# interface.
+#
# Since: 2.11
##
{ 'struct': 'ThrottleGroupProperties',
'data': { '*limits': 'ThrottleLimits',
- '*x-iops-total' : 'int', '*x-iops-total-max' : 'int',
- '*x-iops-total-max-length' : 'int', '*x-iops-read' : 'int',
- '*x-iops-read-max' : 'int', '*x-iops-read-max-length' : 'int',
- '*x-iops-write' : 'int', '*x-iops-write-max' : 'int',
- '*x-iops-write-max-length' : 'int', '*x-bps-total' : 'int',
- '*x-bps-total-max' : 'int', '*x-bps-total-max-length' : 'int',
- '*x-bps-read' : 'int', '*x-bps-read-max' : 'int',
- '*x-bps-read-max-length' : 'int', '*x-bps-write' : 'int',
- '*x-bps-write-max' : 'int', '*x-bps-write-max-length' : 'int',
- '*x-iops-size' : 'int' } }
+ '*x-iops-total': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-total-max': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-total-max-length': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-read': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-read-max': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-read-max-length': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-write': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-write-max': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-write-max-length': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-total': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-total-max': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-total-max-length': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-read': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-read-max': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-read-max-length': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-write': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-write-max': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-bps-write-max-length': { 'type': 'int',
+ 'features': [ 'unstable' ] },
+ '*x-iops-size': { 'type': 'int',
+ 'features': [ 'unstable' ] } } }
##
# @block-stream:
'*base-node': 'str', '*backing-file': 'str', '*bottom': 'str',
'*speed': 'int', '*on-error': 'BlockdevOnError',
'*filter-node-name': 'str',
- '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } }
+ '*auto-finalize': 'bool', '*auto-dismiss': 'bool' },
+ 'allow-preconfig': true }
##
# @block-job-set-speed:
# Since: 1.1
##
{ 'command': 'block-job-set-speed',
- 'data': { 'device': 'str', 'speed': 'int' } }
+ 'data': { 'device': 'str', 'speed': 'int' },
+ 'allow-preconfig': true }
##
# @block-job-cancel:
#
# Since: 1.1
##
-{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
+{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' },
+ 'allow-preconfig': true }
##
# @block-job-pause:
#
# Since: 1.3
##
-{ 'command': 'block-job-pause', 'data': { 'device': 'str' } }
+{ 'command': 'block-job-pause', 'data': { 'device': 'str' },
+ 'allow-preconfig': true }
##
# @block-job-resume:
#
# Since: 1.3
##
-{ 'command': 'block-job-resume', 'data': { 'device': 'str' } }
+{ 'command': 'block-job-resume', 'data': { 'device': 'str' },
+ 'allow-preconfig': true }
##
# @block-job-complete:
#
# Since: 1.3
##
-{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
+{ 'command': 'block-job-complete', 'data': { 'device': 'str' },
+ 'allow-preconfig': true }
##
# @block-job-dismiss:
#
# Since: 2.12
##
-{ 'command': 'block-job-dismiss', 'data': { 'id': 'str' } }
+{ 'command': 'block-job-dismiss', 'data': { 'id': 'str' },
+ 'allow-preconfig': true }
##
# @block-job-finalize:
#
# Since: 2.12
##
-{ 'command': 'block-job-finalize', 'data': { 'id': 'str' } }
+{ 'command': 'block-job-finalize', 'data': { 'id': 'str' },
+ 'allow-preconfig': true }
##
# @BlockdevDiscardOptions:
# @blkreplay: Since 4.2
# @compress: Since 5.0
# @copy-before-write: Since 6.2
+# @snapshot-access: Since 7.0
#
# Since: 2.9
##
{ 'enum': 'BlockdevDriver',
'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs',
'cloop', 'compress', 'copy-before-write', 'copy-on-read', 'dmg',
- 'file', 'ftp', 'ftps', 'gluster',
+ 'file', 'snapshot-access', 'ftp', 'ftps', 'gluster',
{'name': 'host_cdrom', 'if': 'HAVE_HOST_BLOCK_DEVICE' },
{'name': 'host_device', 'if': 'HAVE_HOST_BLOCK_DEVICE' },
'http', 'https', 'iscsi',
# for this device (default: none, forward the commands via SG_IO;
# since 2.11)
# @aio: AIO backend (default: threads) (since: 2.8)
+# @aio-max-batch: maximum number of requests to batch together into a single
+# submission in the AIO backend. The smallest value between
+# this and the aio-max-batch value of the IOThread object is
+# chosen.
+# 0 means that the AIO backend will handle it automatically.
+# (default: 0, since 6.2)
# @locking: whether to enable file locking. If set to 'auto', only enable
# when Open File Descriptor (OFD) locking API is available
# (default: auto, since 2.10)
# read-only when the last writer is detached. This
# allows giving QEMU write permissions only on demand
# when an operation actually needs write access.
+# @unstable: Member x-check-cache-dropped is meant for debugging.
#
# Since: 2.9
##
'*pr-manager': 'str',
'*locking': 'OnOffAuto',
'*aio': 'BlockdevAioOptions',
+ '*aio-max-batch': 'int',
'*drop-cache': {'type': 'bool',
'if': 'CONFIG_LINUX'},
- '*x-check-cache-dropped': 'bool' },
+ '*x-check-cache-dropped': { 'type': 'bool',
+ 'features': [ 'unstable' ] } },
'features': [ { 'name': 'dynamic-auto-read-only',
'if': 'CONFIG_POSIX' } ] }
'base': 'BlockdevOptionsGenericFormat',
'data': { '*key-secret': 'str' } }
-
##
# @BlockdevOptionsGenericCOWFormat:
#
'base': 'BlockdevOptionsGenericCOWFormat',
'data': { '*encrypt': 'BlockdevQcowEncryption' } }
-
-
##
# @BlockdevQcow2EncryptionFormat:
#
##
# @BlockdevOptionsSsh:
#
-# @server: host address
+# @server: host address
#
-# @path: path to the image on the host
+# @path: path to the image on the host
#
-# @user: user as which to connect, defaults to current
-# local user name
+# @user: user as which to connect, defaults to current local user name
#
-# @host-key-check: Defines how and what to check the host key against
-# (default: known_hosts)
+# @host-key-check: Defines how and what to check the host key against
+# (default: known_hosts)
#
# Since: 2.9
##
'*user': 'str',
'*host-key-check': 'SshHostKeyCheck' } }
-
##
# @BlkdebugEvent:
#
'*header-digest': 'IscsiHeaderDigest',
'*timeout': 'int' } }
-
##
# @RbdAuthMode:
#
#
# @tls-creds: TLS credentials ID
#
+# @tls-hostname: TLS hostname override for certificate validation (Since 7.0)
+#
# @x-dirty-bitmap: A metadata context name such as "qemu:dirty-bitmap:NAME"
# or "qemu:allocation-depth" to query in place of the
# traditional "base:allocation" block status (see
# future requests before a successful reconnect will
# immediately fail. Default 0 (Since 4.2)
#
+# @open-timeout: In seconds. If zero, the nbd driver tries the connection
+# only once, and fails to open if the connection fails.
+# If non-zero, the nbd driver will repeat connection attempts
+# until successful or until @open-timeout seconds have elapsed.
+# Default 0 (Since 7.0)
+#
+# Features:
+# @unstable: Member @x-dirty-bitmap is experimental.
+#
# Since: 2.9
##
{ 'struct': 'BlockdevOptionsNbd',
'data': { 'server': 'SocketAddress',
'*export': 'str',
'*tls-creds': 'str',
- '*x-dirty-bitmap': 'str',
- '*reconnect-delay': 'uint32' } }
+ '*tls-hostname': 'str',
+ '*x-dirty-bitmap': { 'type': 'str', 'features': [ 'unstable' ] },
+ '*reconnect-delay': 'uint32',
+ '*open-timeout': 'uint32' } }
##
# @BlockdevOptionsRaw:
# @throttle-group: the name of the throttle-group object to use. It
# must already exist.
# @file: reference to or definition of the data source block device
+#
# Since: 2.11
##
{ 'struct': 'BlockdevOptionsThrottle',
'base': 'BlockdevOptionsGenericFormat',
'data': { '*bottom': 'str' } }
+##
+# @OnCbwError:
+#
+# An enumeration of possible behaviors for copy-before-write operation
+# failures.
+#
+# @break-guest-write: report the error to the guest. This way, the guest
+# will not be able to overwrite areas that cannot be
+# backed up, so the backup process remains valid.
+#
+# @break-snapshot: continue guest write. Doing so will make the provided
+# snapshot state invalid and any backup or export
+# process based on it will finally fail.
+#
+# Since: 7.1
+##
+{ 'enum': 'OnCbwError',
+ 'data': [ 'break-guest-write', 'break-snapshot' ] }
+
##
# @BlockdevOptionsCbw:
#
#
# @target: The target for copy-before-write operations.
#
+# @bitmap: If specified, copy-before-write filter will do
+# copy-before-write operations only for dirty regions of the
+# bitmap. Bitmap size must be equal to length of file and
+# target child of the filter. Note also, that bitmap is used
+# only to initialize internal bitmap of the process, so further
+# modifications (or removing) of specified bitmap doesn't
+# influence the filter. (Since 7.0)
+#
+# @on-cbw-error: Behavior on failure of copy-before-write operation.
+# Default is @break-guest-write. (Since 7.1)
+#
+# @cbw-timeout: Zero means no limit. Non-zero sets the timeout in seconds
+# for copy-before-write operation. When a timeout occurs,
+# the respective copy-before-write operation will fail, and
+# the @on-cbw-error parameter will decide how this failure
+# is handled. Default 0. (Since 7.1)
+#
# Since: 6.2
##
{ 'struct': 'BlockdevOptionsCbw',
'base': 'BlockdevOptionsGenericFormat',
- 'data': { 'target': 'BlockdevRef' } }
+ 'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap',
+ '*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32' } }
##
# @BlockdevOptions:
'rbd': 'BlockdevOptionsRbd',
'replication': { 'type': 'BlockdevOptionsReplication',
'if': 'CONFIG_REPLICATION' },
+ 'snapshot-access': 'BlockdevOptionsGenericFormat',
'ssh': 'BlockdevOptionsSsh',
'throttle': 'BlockdevOptionsThrottle',
'vdi': 'BlockdevOptionsGenericFormat',
# <- { "return": {} }
#
##
-{ 'command': 'blockdev-add', 'data': 'BlockdevOptions', 'boxed': true }
+{ 'command': 'blockdev-add', 'data': 'BlockdevOptions', 'boxed': true,
+ 'allow-preconfig': true }
##
# @blockdev-reopen:
# Since: 6.1
##
{ 'command': 'blockdev-reopen',
- 'data': { 'options': ['BlockdevOptions'] } }
+ 'data': { 'options': ['BlockdevOptions'] },
+ 'allow-preconfig': true }
##
# @blockdev-del:
# <- { "return": {} }
#
##
-{ 'command': 'blockdev-del', 'data': { 'node-name': 'str' } }
+{ 'command': 'blockdev-del', 'data': { 'node-name': 'str' },
+ 'allow-preconfig': true }
##
# @BlockdevCreateOptionsFile:
##
# @BlockdevQcow2Version:
#
-# @v2: The original QCOW2 format as introduced in qemu 0.10 (version 2)
-# @v3: The extended QCOW2 format as introduced in qemu 1.1 (version 3)
+# @v2: The original QCOW2 format as introduced in qemu 0.10 (version 2)
+# @v3: The extended QCOW2 format as introduced in qemu 1.1 (version 3)
#
# Since: 2.12
##
{ 'enum': 'BlockdevQcow2Version',
'data': [ 'v2', 'v3' ] }
-
##
# @Qcow2CompressionType:
#
#
# Subformat options for VMDK images
#
-# @monolithicSparse: Single file image with sparse cluster allocation
+# @monolithicSparse: Single file image with sparse cluster allocation
#
-# @monolithicFlat: Single flat data image and a descriptor file
+# @monolithicFlat: Single flat data image and a descriptor file
#
# @twoGbMaxExtentSparse: Data is split into 2GB (per virtual LBA) sparse extent
# files, in addition to a descriptor file
#
-# @twoGbMaxExtentFlat: Data is split into 2GB (per virtual LBA) flat extent
-# files, in addition to a descriptor file
+# @twoGbMaxExtentFlat: Data is split into 2GB (per virtual LBA) flat extent
+# files, in addition to a descriptor file
#
-# @streamOptimized: Single file image sparse cluster allocation, optimized
-# for streaming over network.
+# @streamOptimized: Single file image sparse cluster allocation, optimized
+# for streaming over network.
#
# Since: 4.0
##
# @adapter-type: The adapter type used to fill in the descriptor. Default: ide.
# @hwversion: Hardware version. The meaningful options are "4" or "6".
# Default: "4".
+# @toolsversion: VMware guest tools version.
+# Default: "2147483647" (Since 6.2)
# @zeroed-grain: Whether to enable zeroed-grain feature for sparse subformats.
# Default: false.
#
'*backing-file': 'str',
'*adapter-type': 'BlockdevVmdkAdapterType',
'*hwversion': 'str',
+ '*toolsversion': 'str',
'*zeroed-grain': 'bool' } }
-
##
# @BlockdevCreateOptionsSsh:
#
# @BlockdevVhdxSubformat:
#
# @dynamic: Growing image file
-# @fixed: Preallocated fixed-size image file
+# @fixed: Preallocated fixed-size image file
#
# Since: 2.12
##
# @BlockdevVpcSubformat:
#
# @dynamic: Growing image file
-# @fixed: Preallocated fixed-size image file
+# @fixed: Preallocated fixed-size image file
#
# Since: 2.12
##
# Starts a job to create an image format on a given node. The job is
# automatically finalized, but a manual job-dismiss is required.
#
-# @job-id: Identifier for the newly created job.
+# @job-id: Identifier for the newly created job.
#
-# @options: Options for the image creation.
+# @options: Options for the image creation.
#
# Since: 3.0
##
{ 'command': 'blockdev-create',
'data': { 'job-id': 'str',
- 'options': 'BlockdevCreateOptions' } }
+ 'options': 'BlockdevCreateOptions' },
+ 'allow-preconfig': true }
##
# @BlockdevAmendOptionsLUKS:
#
# Options for amending an image format
#
-# @driver: Block driver of the node to amend.
+# @driver: Block driver of the node to amend.
#
# Since: 5.1
##
# Starts a job to amend format specific options of an existing open block device
# The job is automatically finalized, but a manual job-dismiss is required.
#
-# @job-id: Identifier for the newly created job.
+# @job-id: Identifier for the newly created job.
+#
+# @node-name: Name of the block node to work on
#
-# @node-name: Name of the block node to work on
+# @options: Options (driver specific)
#
-# @options: Options (driver specific)
+# @force: Allow unsafe operations, format specific
+# For luks that allows erase of the last active keyslot
+# (permanent loss of data),
+# and replacement of an active keyslot
+# (possible loss of data if IO error happens)
#
-# @force: Allow unsafe operations, format specific
-# For luks that allows erase of the last active keyslot
-# (permanent loss of data),
-# and replacement of an active keyslot
-# (possible loss of data if IO error happens)
+# Features:
+# @unstable: This command is experimental.
#
# Since: 5.1
##
'data': { 'job-id': 'str',
'node-name': 'str',
'options': 'BlockdevAmendOptions',
- '*force': 'bool' } }
+ '*force': 'bool' },
+ 'features': [ 'unstable' ],
+ 'allow-preconfig': true }
##
# @BlockErrorAction:
{ 'enum': 'BlockErrorAction',
'data': [ 'ignore', 'report', 'stop' ] }
-
##
# @BLOCK_IMAGE_CORRUPTED:
#
# Example:
#
# <- { "event": "BLOCK_IMAGE_CORRUPTED",
-# "data": { "device": "ide0-hd0", "node-name": "node0",
-# "msg": "Prevented active L1 table overwrite", "offset": 196608,
-# "size": 65536 },
-# "timestamp": { "seconds": 1378126126, "microseconds": 966463 } }
+# "data": { "device": "", "node-name": "drive", "fatal": false,
+# "msg": "L2 table offset 0x2a2a2a00 unaligned (L1 index: 0)" },
+# "timestamp": { "seconds": 1648243240, "microseconds": 906060 } }
#
# Since: 1.7
##
# "data": { "device": "ide0-hd1",
# "node-name": "#block212",
# "operation": "write",
-# "action": "stop" },
+# "action": "stop",
+# "reason": "No space left on device" },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
#
##
#
# Example:
#
-# <- { "event": "BLOCK_JOB_WAITING",
-# "data": { "device": "drive0", "type": "mirror" },
+# <- { "event": "BLOCK_JOB_PENDING",
+# "data": { "type": "mirror", "id": "backup_1" },
# "timestamp": { "seconds": 1265044230, "microseconds": 450486 } }
#
##
#
##
{ 'command': 'block-set-write-threshold',
- 'data': { 'node-name': 'str', 'write-threshold': 'uint64' } }
+ 'data': { 'node-name': 'str', 'write-threshold': 'uint64' },
+ 'allow-preconfig': true }
##
# @x-blockdev-change:
#
# @node: the name of the node that will be added.
#
-# Note: this command is experimental, and its API is not stable. It
-# does not support all kinds of operations, all kinds of children, nor
-# all block drivers.
+# Features:
+# @unstable: This command is experimental, and its API is not stable. It
+# does not support all kinds of operations, all kinds of
+# children, nor all block drivers.
#
-# FIXME Removing children from a quorum node means introducing gaps in the
-# child indices. This cannot be represented in the 'children' list of
-# BlockdevOptionsQuorum, as returned by .bdrv_refresh_filename().
+# FIXME Removing children from a quorum node means introducing
+# gaps in the child indices. This cannot be represented in the
+# 'children' list of BlockdevOptionsQuorum, as returned by
+# .bdrv_refresh_filename().
#
-# Warning: The data in a new quorum child MUST be consistent with that of
-# the rest of the array.
+# Warning: The data in a new quorum child MUST be consistent
+# with that of the rest of the array.
#
# Since: 2.7
#
{ 'command': 'x-blockdev-change',
'data' : { 'parent': 'str',
'*child': 'str',
- '*node': 'str' } }
+ '*node': 'str' },
+ 'features': [ 'unstable' ],
+ 'allow-preconfig': true }
##
# @x-blockdev-set-iothread:
# @force: true if the node and its children should be moved when a BlockBackend
# is already attached
#
-# Note: this command is experimental and intended for test cases that need
-# control over IOThreads only.
+# Features:
+# @unstable: This command is experimental and intended for test cases that
+# need control over IOThreads only.
#
# Since: 2.12
#
{ 'command': 'x-blockdev-set-iothread',
'data' : { 'node-name': 'str',
'iothread': 'StrOrNull',
- '*force': 'bool' } }
+ '*force': 'bool' },
+ 'features': [ 'unstable' ],
+ 'allow-preconfig': true }
##
# @QuorumOpType:
#
##
{ 'command': 'blockdev-snapshot-internal-sync',
- 'data': 'BlockdevSnapshotInternal' }
+ 'data': 'BlockdevSnapshotInternal',
+ 'allow-preconfig': true }
##
# @blockdev-snapshot-delete-internal-sync:
##
{ 'command': 'blockdev-snapshot-delete-internal-sync',
'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
- 'returns': 'SnapshotInfo' }
+ 'returns': 'SnapshotInfo',
+ 'allow-preconfig': true }