| 1 | # -*- Mode: Python -*- |
| 2 | # vim: filetype=python |
| 3 | |
| 4 | ## |
| 5 | # Block core (VM unrelated) |
| 6 | # ========================= |
| 7 | ## |
| 8 | |
| 9 | { 'include': 'common.json' } |
| 10 | { 'include': 'crypto.json' } |
| 11 | { 'include': 'job.json' } |
| 12 | { 'include': 'sockets.json' } |
| 13 | |
| 14 | ## |
| 15 | # @SnapshotInfo: |
| 16 | # |
| 17 | # @id: unique snapshot id |
| 18 | # |
| 19 | # @name: user chosen name |
| 20 | # |
| 21 | # @vm-state-size: size of the VM state |
| 22 | # |
| 23 | # @date-sec: UTC date of the snapshot in seconds |
| 24 | # |
| 25 | # @date-nsec: fractional part in nano seconds to be used with date-sec |
| 26 | # |
| 27 | # @vm-clock-sec: VM clock relative to boot in seconds |
| 28 | # |
| 29 | # @vm-clock-nsec: fractional part in nano seconds to be used with |
| 30 | # vm-clock-sec |
| 31 | # |
| 32 | # @icount: Current instruction count. Appears when execution |
| 33 | # record/replay is enabled. Used for "time-traveling" to match |
| 34 | # the moment in the recorded execution with the snapshots. This |
| 35 | # counter may be obtained through `query-replay` command |
| 36 | # (since 5.2) |
| 37 | # |
| 38 | # Since: 1.3 |
| 39 | ## |
| 40 | { 'struct': 'SnapshotInfo', |
| 41 | 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int', |
| 42 | 'date-sec': 'int', 'date-nsec': 'int', |
| 43 | 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int', |
| 44 | '*icount': 'int' } } |
| 45 | |
| 46 | ## |
| 47 | # @ImageInfoSpecificQCow2EncryptionBase: |
| 48 | # |
| 49 | # @format: The encryption format |
| 50 | # |
| 51 | # Since: 2.10 |
| 52 | ## |
| 53 | { 'struct': 'ImageInfoSpecificQCow2EncryptionBase', |
| 54 | 'data': { 'format': 'BlockdevQcow2EncryptionFormat'}} |
| 55 | |
| 56 | ## |
| 57 | # @ImageInfoSpecificQCow2Encryption: |
| 58 | # |
| 59 | # Since: 2.10 |
| 60 | ## |
| 61 | { 'union': 'ImageInfoSpecificQCow2Encryption', |
| 62 | 'base': 'ImageInfoSpecificQCow2EncryptionBase', |
| 63 | 'discriminator': 'format', |
| 64 | 'data': { 'luks': 'QCryptoBlockInfoLUKS' } } |
| 65 | |
| 66 | ## |
| 67 | # @ImageInfoSpecificQCow2: |
| 68 | # |
| 69 | # @compat: compatibility level |
| 70 | # |
| 71 | # @data-file: the filename of the external data file that is stored in |
| 72 | # the image and used as a default for opening the image |
| 73 | # (since: 4.0) |
| 74 | # |
| 75 | # @data-file-raw: True if the external data file must stay valid as a |
| 76 | # standalone (read-only) raw image without looking at qcow2 |
| 77 | # metadata (since: 4.0) |
| 78 | # |
| 79 | # @extended-l2: true if the image has extended L2 entries; only valid |
| 80 | # for compat >= 1.1 (since 5.2) |
| 81 | # |
| 82 | # @lazy-refcounts: on or off; only valid for compat >= 1.1 |
| 83 | # |
| 84 | # @corrupt: true if the image has been marked corrupt; only valid for |
| 85 | # compat >= 1.1 (since 2.2) |
| 86 | # |
| 87 | # @refcount-bits: width of a refcount entry in bits (since 2.3) |
| 88 | # |
| 89 | # @encrypt: details about encryption parameters; only set if image is |
| 90 | # encrypted (since 2.10) |
| 91 | # |
| 92 | # @bitmaps: A list of qcow2 bitmap details (since 4.0) |
| 93 | # |
| 94 | # @compression-type: the image cluster compression method (since 5.1) |
| 95 | # |
| 96 | # Since: 1.7 |
| 97 | ## |
| 98 | { 'struct': 'ImageInfoSpecificQCow2', |
| 99 | 'data': { |
| 100 | 'compat': 'str', |
| 101 | '*data-file': 'str', |
| 102 | '*data-file-raw': 'bool', |
| 103 | '*extended-l2': 'bool', |
| 104 | '*lazy-refcounts': 'bool', |
| 105 | '*corrupt': 'bool', |
| 106 | 'refcount-bits': 'int', |
| 107 | '*encrypt': 'ImageInfoSpecificQCow2Encryption', |
| 108 | '*bitmaps': ['Qcow2BitmapInfo'], |
| 109 | 'compression-type': 'Qcow2CompressionType' |
| 110 | } } |
| 111 | |
| 112 | ## |
| 113 | # @ImageInfoSpecificVmdk: |
| 114 | # |
| 115 | # @create-type: The create type of VMDK image |
| 116 | # |
| 117 | # @cid: Content id of image |
| 118 | # |
| 119 | # @parent-cid: Parent VMDK image's cid |
| 120 | # |
| 121 | # @extents: List of extent files |
| 122 | # |
| 123 | # Since: 1.7 |
| 124 | ## |
| 125 | { 'struct': 'ImageInfoSpecificVmdk', |
| 126 | 'data': { |
| 127 | 'create-type': 'str', |
| 128 | 'cid': 'int', |
| 129 | 'parent-cid': 'int', |
| 130 | 'extents': ['VmdkExtentInfo'] |
| 131 | } } |
| 132 | |
| 133 | ## |
| 134 | # @VmdkExtentInfo: |
| 135 | # |
| 136 | # Information about a VMDK extent file |
| 137 | # |
| 138 | # @filename: Name of the extent file |
| 139 | # |
| 140 | # @format: Extent type (e.g. FLAT or SPARSE) |
| 141 | # |
| 142 | # @virtual-size: Number of bytes covered by this extent |
| 143 | # |
| 144 | # @cluster-size: Cluster size in bytes (for non-flat extents) |
| 145 | # |
| 146 | # @compressed: Whether this extent contains compressed data |
| 147 | # |
| 148 | # Since: 8.0 |
| 149 | ## |
| 150 | { 'struct': 'VmdkExtentInfo', |
| 151 | 'data': { |
| 152 | 'filename': 'str', |
| 153 | 'format': 'str', |
| 154 | 'virtual-size': 'int', |
| 155 | '*cluster-size': 'int', |
| 156 | '*compressed': 'bool' |
| 157 | } } |
| 158 | |
| 159 | ## |
| 160 | # @ImageInfoSpecificRbd: |
| 161 | # |
| 162 | # @encryption-format: Image encryption format. If encryption is |
| 163 | # enabled for the image (see encrypted in BlockNodeInfo), this is |
| 164 | # the actual format in which the image is accessed. If encryption |
| 165 | # is not enabled, this is the result of probing when the image was |
| 166 | # opened, to give a suggestion which encryption format could be |
| 167 | # enabled. Note that probing results can be changed by the guest |
| 168 | # by writing a (possibly partial) encryption format header to the |
| 169 | # image, so don't treat this information as trusted if the guest |
| 170 | # is not trusted. |
| 171 | # |
| 172 | # Since: 6.1 |
| 173 | ## |
| 174 | { 'struct': 'ImageInfoSpecificRbd', |
| 175 | 'data': { |
| 176 | '*encryption-format': 'RbdImageEncryptionFormat' |
| 177 | } } |
| 178 | |
| 179 | ## |
| 180 | # @ImageInfoSpecificFile: |
| 181 | # |
| 182 | # @extent-size-hint: Extent size hint (if available) |
| 183 | # |
| 184 | # Since: 8.0 |
| 185 | ## |
| 186 | { 'struct': 'ImageInfoSpecificFile', |
| 187 | 'data': { |
| 188 | '*extent-size-hint': 'size' |
| 189 | } } |
| 190 | |
| 191 | ## |
| 192 | # @ImageInfoSpecificKind: |
| 193 | # |
| 194 | # @luks: Since 2.7 |
| 195 | # |
| 196 | # @rbd: Since 6.1 |
| 197 | # |
| 198 | # @file: Since 8.0 |
| 199 | # |
| 200 | # Since: 1.7 |
| 201 | ## |
| 202 | { 'enum': 'ImageInfoSpecificKind', |
| 203 | 'data': [ 'qcow2', 'vmdk', 'luks', 'rbd', 'file' ] } |
| 204 | |
| 205 | ## |
| 206 | # @ImageInfoSpecificQCow2Wrapper: |
| 207 | # |
| 208 | # @data: image information specific to QCOW2 |
| 209 | # |
| 210 | # Since: 1.7 |
| 211 | ## |
| 212 | { 'struct': 'ImageInfoSpecificQCow2Wrapper', |
| 213 | 'data': { 'data': 'ImageInfoSpecificQCow2' } } |
| 214 | |
| 215 | ## |
| 216 | # @ImageInfoSpecificVmdkWrapper: |
| 217 | # |
| 218 | # @data: image information specific to VMDK |
| 219 | # |
| 220 | # Since: 6.1 |
| 221 | ## |
| 222 | { 'struct': 'ImageInfoSpecificVmdkWrapper', |
| 223 | 'data': { 'data': 'ImageInfoSpecificVmdk' } } |
| 224 | |
| 225 | ## |
| 226 | # @ImageInfoSpecificLUKSWrapper: |
| 227 | # |
| 228 | # @data: image information specific to LUKS |
| 229 | # |
| 230 | # Since: 2.7 |
| 231 | ## |
| 232 | { 'struct': 'ImageInfoSpecificLUKSWrapper', |
| 233 | 'data': { 'data': 'QCryptoBlockInfoLUKS' } } |
| 234 | # If we need to add block driver specific parameters for |
| 235 | # LUKS in future, then we'll subclass `QCryptoBlockInfoLUKS` |
| 236 | # to define a ImageInfoSpecificLUKS |
| 237 | |
| 238 | ## |
| 239 | # @ImageInfoSpecificRbdWrapper: |
| 240 | # |
| 241 | # @data: image information specific to RBD |
| 242 | # |
| 243 | # Since: 6.1 |
| 244 | ## |
| 245 | { 'struct': 'ImageInfoSpecificRbdWrapper', |
| 246 | 'data': { 'data': 'ImageInfoSpecificRbd' } } |
| 247 | |
| 248 | ## |
| 249 | # @ImageInfoSpecificFileWrapper: |
| 250 | # |
| 251 | # @data: image information specific to files |
| 252 | # |
| 253 | # Since: 8.0 |
| 254 | ## |
| 255 | { 'struct': 'ImageInfoSpecificFileWrapper', |
| 256 | 'data': { 'data': 'ImageInfoSpecificFile' } } |
| 257 | |
| 258 | ## |
| 259 | # @ImageInfoSpecific: |
| 260 | # |
| 261 | # A discriminated record of image format specific information |
| 262 | # structures. |
| 263 | # |
| 264 | # @type: block driver name |
| 265 | # |
| 266 | # Since: 1.7 |
| 267 | ## |
| 268 | { 'union': 'ImageInfoSpecific', |
| 269 | 'base': { 'type': 'ImageInfoSpecificKind' }, |
| 270 | 'discriminator': 'type', |
| 271 | 'data': { |
| 272 | 'qcow2': 'ImageInfoSpecificQCow2Wrapper', |
| 273 | 'vmdk': 'ImageInfoSpecificVmdkWrapper', |
| 274 | 'luks': 'ImageInfoSpecificLUKSWrapper', |
| 275 | 'rbd': 'ImageInfoSpecificRbdWrapper', |
| 276 | 'file': 'ImageInfoSpecificFileWrapper' |
| 277 | } } |
| 278 | |
| 279 | ## |
| 280 | # @BlockLimitsInfo: |
| 281 | # |
| 282 | # @request-alignment: Alignment requirement, in bytes, for |
| 283 | # offset/length of I/O requests. |
| 284 | # |
| 285 | # @max-discard: Maximum number of bytes that can be discarded at once. |
| 286 | # If not present, there is no specific maximum. |
| 287 | # |
| 288 | # @discard-alignment: Optimal alignment for discard requests in bytes. |
| 289 | # Note that this doesn't have to be a power of two. If not |
| 290 | # present, discards don't have a alignment requirement different |
| 291 | # from @request-alignment. |
| 292 | # |
| 293 | # @max-write-zeroes: Maximum number of bytes that can be zeroed out at |
| 294 | # once. If not present, there is no specific maximum. |
| 295 | # |
| 296 | # @write-zeroes-alignment: Optimal alignment for write zeroes requests |
| 297 | # in bytes. Note that this doesn't have to be a power of two. If |
| 298 | # not present, write_zeroes doesn't have a alignment requirement |
| 299 | # different from @request-alignment. |
| 300 | # |
| 301 | # @opt-transfer: Optimal transfer length in bytes. If not present, |
| 302 | # there is no preferred size. |
| 303 | # |
| 304 | # @max-transfer: Maximal transfer length in bytes. If not present, |
| 305 | # there is no specific maximum. |
| 306 | # |
| 307 | # @max-hw-transfer: Maximal hardware transfer length in bytes. |
| 308 | # Applies whenever transfers to the device bypass the kernel I/O |
| 309 | # scheduler, for example with SG_IO. If not present, there is no |
| 310 | # specific maximum. |
| 311 | # |
| 312 | # @max-iov: Maximum number of scatter/gather elements |
| 313 | # |
| 314 | # @max-hw-iov: Maximum number of scatter/gather elements allowed by |
| 315 | # the hardware. Applies whenever transfers to the device bypass |
| 316 | # the kernel I/O scheduler, for example with SG_IO. If not |
| 317 | # present, the hardware limits is unknown and @max-iov is always |
| 318 | # used. |
| 319 | # |
| 320 | # @min-mem-alignment: Minimal required memory alignment in bytes for |
| 321 | # zero-copy I/O to succeed. For unaligned requests, a bounce |
| 322 | # buffer will be used. |
| 323 | # |
| 324 | # @opt-mem-alignment: Optimal memory alignment in bytes. This is the |
| 325 | # alignment used for any buffer allocations QEMU performs |
| 326 | # internally. |
| 327 | ## |
| 328 | { 'struct': 'BlockLimitsInfo', |
| 329 | 'data': { 'request-alignment': 'uint32', |
| 330 | '*max-discard': 'uint64', |
| 331 | '*discard-alignment': 'uint32', |
| 332 | '*max-write-zeroes': 'uint64', |
| 333 | '*write-zeroes-alignment': 'uint32', |
| 334 | '*opt-transfer': 'uint32', |
| 335 | '*max-transfer': 'uint32', |
| 336 | '*max-hw-transfer': 'uint32', |
| 337 | 'max-iov': 'int', |
| 338 | '*max-hw-iov': 'int', |
| 339 | 'min-mem-alignment': 'size', |
| 340 | 'opt-mem-alignment': 'size' } } |
| 341 | |
| 342 | ## |
| 343 | # @BlockNodeInfo: |
| 344 | # |
| 345 | # Information about a QEMU image file |
| 346 | # |
| 347 | # @filename: name of the image file |
| 348 | # |
| 349 | # @format: format of the image file |
| 350 | # |
| 351 | # @virtual-size: maximum capacity in bytes of the image |
| 352 | # |
| 353 | # @actual-size: actual size on disk in bytes of the image |
| 354 | # |
| 355 | # @dirty-flag: true if image is not cleanly closed |
| 356 | # |
| 357 | # @cluster-size: size of a cluster in bytes |
| 358 | # |
| 359 | # @encrypted: true if the image is encrypted |
| 360 | # |
| 361 | # @compressed: true if the image is compressed (Since 1.7) |
| 362 | # |
| 363 | # @backing-filename: name of the backing file |
| 364 | # |
| 365 | # @full-backing-filename: full path of the backing file |
| 366 | # |
| 367 | # @backing-filename-format: the format of the backing file |
| 368 | # |
| 369 | # @snapshots: list of VM snapshots |
| 370 | # |
| 371 | # @limits: block limits that are used for I/O on the node (Since 10.2) |
| 372 | # |
| 373 | # @format-specific: structure supplying additional format-specific |
| 374 | # information (since 1.7) |
| 375 | # |
| 376 | # Since: 8.0 |
| 377 | ## |
| 378 | { 'struct': 'BlockNodeInfo', |
| 379 | 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool', |
| 380 | '*actual-size': 'int', 'virtual-size': 'int', |
| 381 | '*cluster-size': 'int', '*encrypted': 'bool', '*compressed': 'bool', |
| 382 | '*backing-filename': 'str', '*full-backing-filename': 'str', |
| 383 | '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'], |
| 384 | '*limits': 'BlockLimitsInfo', |
| 385 | '*format-specific': 'ImageInfoSpecific' } } |
| 386 | |
| 387 | ## |
| 388 | # @ImageInfo: |
| 389 | # |
| 390 | # Information about a QEMU image file, and potentially its backing |
| 391 | # image |
| 392 | # |
| 393 | # @backing-image: info of the backing image |
| 394 | # |
| 395 | # Since: 1.3 |
| 396 | ## |
| 397 | { 'struct': 'ImageInfo', |
| 398 | 'base': 'BlockNodeInfo', |
| 399 | 'data': { |
| 400 | '*backing-image': 'ImageInfo' |
| 401 | } } |
| 402 | |
| 403 | ## |
| 404 | # @BlockChildInfo: |
| 405 | # |
| 406 | # Information about all nodes in the block graph starting at some |
| 407 | # node, annotated with information about that node in relation to its |
| 408 | # parent. |
| 409 | # |
| 410 | # @name: Child name of the root node in the `BlockGraphInfo` struct, |
| 411 | # in its role as the child of some undescribed parent node |
| 412 | # |
| 413 | # @info: Block graph information starting at this node |
| 414 | # |
| 415 | # Since: 8.0 |
| 416 | ## |
| 417 | { 'struct': 'BlockChildInfo', |
| 418 | 'data': { |
| 419 | 'name': 'str', |
| 420 | 'info': 'BlockGraphInfo' |
| 421 | } } |
| 422 | |
| 423 | ## |
| 424 | # @BlockGraphInfo: |
| 425 | # |
| 426 | # Information about all nodes in a block (sub)graph in the form of |
| 427 | # `BlockNodeInfo` data. The base `BlockNodeInfo` struct contains the |
| 428 | # information for the (sub)graph's root node. |
| 429 | # |
| 430 | # @children: Array of links to this node's child nodes' information |
| 431 | # |
| 432 | # Since: 8.0 |
| 433 | ## |
| 434 | { 'struct': 'BlockGraphInfo', |
| 435 | 'base': 'BlockNodeInfo', |
| 436 | 'data': { 'children': ['BlockChildInfo'] } } |
| 437 | |
| 438 | ## |
| 439 | # @ImageCheck: |
| 440 | # |
| 441 | # Information about a QEMU image file check |
| 442 | # |
| 443 | # @filename: name of the image file checked |
| 444 | # |
| 445 | # @format: format of the image file checked |
| 446 | # |
| 447 | # @check-errors: number of unexpected errors occurred during check |
| 448 | # |
| 449 | # @image-end-offset: offset (in bytes) where the image ends, this |
| 450 | # field is present if the driver for the image format supports it |
| 451 | # |
| 452 | # @corruptions: number of corruptions found during the check if any |
| 453 | # |
| 454 | # @leaks: number of leaks found during the check if any |
| 455 | # |
| 456 | # @corruptions-fixed: number of corruptions fixed during the check if |
| 457 | # any |
| 458 | # |
| 459 | # @leaks-fixed: number of leaks fixed during the check if any |
| 460 | # |
| 461 | # @total-clusters: total number of clusters, this field is present if |
| 462 | # the driver for the image format supports it |
| 463 | # |
| 464 | # @allocated-clusters: total number of allocated clusters, this field |
| 465 | # is present if the driver for the image format supports it |
| 466 | # |
| 467 | # @fragmented-clusters: total number of fragmented clusters, this |
| 468 | # field is present if the driver for the image format supports it |
| 469 | # |
| 470 | # @compressed-clusters: total number of compressed clusters, this |
| 471 | # field is present if the driver for the image format supports it |
| 472 | # |
| 473 | # Since: 1.4 |
| 474 | ## |
| 475 | { 'struct': 'ImageCheck', |
| 476 | 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int', |
| 477 | '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int', |
| 478 | '*corruptions-fixed': 'int', '*leaks-fixed': 'int', |
| 479 | '*total-clusters': 'int', '*allocated-clusters': 'int', |
| 480 | '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } } |
| 481 | |
| 482 | ## |
| 483 | # @MapEntry: |
| 484 | # |
| 485 | # Mapping information from a virtual block range to a host file range |
| 486 | # |
| 487 | # @start: virtual (guest) offset of the first byte described by this |
| 488 | # entry |
| 489 | # |
| 490 | # @length: the number of bytes of the mapped virtual range |
| 491 | # |
| 492 | # @data: reading the image will actually read data from a file (in |
| 493 | # particular, if @offset is present this means that the sectors |
| 494 | # are not simply preallocated, but contain actual data in raw |
| 495 | # format) |
| 496 | # |
| 497 | # @zero: whether the virtual blocks read as zeroes |
| 498 | # |
| 499 | # @compressed: true if the data is stored compressed (since 8.2) |
| 500 | # |
| 501 | # @depth: number of layers (0 = top image, 1 = top image's backing |
| 502 | # file, ..., n - 1 = bottom image (where n is the number of images |
| 503 | # in the chain)) before reaching one for which the range is |
| 504 | # allocated |
| 505 | # |
| 506 | # @present: true if this layer provides the data, false if adding a |
| 507 | # backing layer could impact this region (since 6.1) |
| 508 | # |
| 509 | # @offset: if present, the image file stores the data for this range |
| 510 | # in raw format at the given (host) offset |
| 511 | # |
| 512 | # @filename: filename that is referred to by @offset |
| 513 | # |
| 514 | # Since: 2.6 |
| 515 | ## |
| 516 | { 'struct': 'MapEntry', |
| 517 | 'data': {'start': 'int', 'length': 'int', 'data': 'bool', |
| 518 | 'zero': 'bool', 'compressed': 'bool', 'depth': 'int', |
| 519 | 'present': 'bool', '*offset': 'int', '*filename': 'str' } } |
| 520 | |
| 521 | ## |
| 522 | # @BlockdevCacheInfo: |
| 523 | # |
| 524 | # Cache mode information for a block device |
| 525 | # |
| 526 | # @writeback: true if writeback mode is enabled |
| 527 | # |
| 528 | # @direct: true if the host page cache is bypassed (O_DIRECT) |
| 529 | # |
| 530 | # @no-flush: true if flush requests are ignored for the device |
| 531 | # |
| 532 | # Since: 2.3 |
| 533 | ## |
| 534 | { 'struct': 'BlockdevCacheInfo', |
| 535 | 'data': { 'writeback': 'bool', |
| 536 | 'direct': 'bool', |
| 537 | 'no-flush': 'bool' } } |
| 538 | |
| 539 | ## |
| 540 | # @BlockdevChild: |
| 541 | # |
| 542 | # @child: The name of the child, for example 'file' or 'backing'. |
| 543 | # |
| 544 | # @node-name: The name of the child's block driver node. |
| 545 | # |
| 546 | # Since: 10.1 |
| 547 | ## |
| 548 | { 'struct': 'BlockdevChild', |
| 549 | 'data': { 'child': 'str', |
| 550 | 'node-name': 'str' } } |
| 551 | |
| 552 | ## |
| 553 | # @BlockDeviceInfo: |
| 554 | # |
| 555 | # Information about the backing device for a block device. |
| 556 | # |
| 557 | # @file: the filename of the backing device |
| 558 | # |
| 559 | # @node-name: the name of the block driver node (Since 2.0) |
| 560 | # |
| 561 | # @ro: true if the backing device was open read-only |
| 562 | # |
| 563 | # @drv: the name of the block format used to open the backing device. |
| 564 | # As of 0.14 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', |
| 565 | # 'dmg', 'file', 'file', 'ftp', 'ftps', 'host_cdrom', |
| 566 | # 'host_device', 'http', 'https', 'luks', 'nbd', 'parallels', |
| 567 | # 'qcow', 'qcow2', 'raw', 'vdi', 'vmdk', 'vpc', 'vvfat' 2.2: |
| 568 | # 'archipelago' added, 'cow' dropped 2.3: 'host_floppy' deprecated |
| 569 | # 2.5: 'host_floppy' dropped 2.6: 'luks' added 2.8: 'replication' |
| 570 | # added, 'tftp' dropped 2.9: 'archipelago' dropped |
| 571 | # |
| 572 | # @backing_file: the name of the backing file (for copy-on-write) |
| 573 | # |
| 574 | # @backing_file_depth: number of files in the backing file chain |
| 575 | # (since: 1.2) |
| 576 | # |
| 577 | # @children: Information about child block nodes. (since: 10.1) |
| 578 | # |
| 579 | # @active: true if the backend is active; typical cases for inactive |
| 580 | # backends are on the migration source instance after migration |
| 581 | # completes and on the destination before it completes. |
| 582 | # (since: 10.0) |
| 583 | # |
| 584 | # @encrypted: true if the backing device is encrypted |
| 585 | # |
| 586 | # @detect_zeroes: detect and optimize zero writes (Since 2.1) |
| 587 | # |
| 588 | # @bps: total throughput limit in bytes per second is specified |
| 589 | # |
| 590 | # @bps_rd: read throughput limit in bytes per second is specified |
| 591 | # |
| 592 | # @bps_wr: write throughput limit in bytes per second is specified |
| 593 | # |
| 594 | # @iops: total I/O operations per second is specified |
| 595 | # |
| 596 | # @iops_rd: read I/O operations per second is specified |
| 597 | # |
| 598 | # @iops_wr: write I/O operations per second is specified |
| 599 | # |
| 600 | # @image: the info of image used (since: 1.6) |
| 601 | # |
| 602 | # @bps_max: total throughput limit during bursts, in bytes (Since 1.7) |
| 603 | # |
| 604 | # @bps_rd_max: read throughput limit during bursts, in bytes |
| 605 | # (Since 1.7) |
| 606 | # |
| 607 | # @bps_wr_max: write throughput limit during bursts, in bytes |
| 608 | # (Since 1.7) |
| 609 | # |
| 610 | # @iops_max: total I/O operations per second during bursts, in bytes |
| 611 | # (Since 1.7) |
| 612 | # |
| 613 | # @iops_rd_max: read I/O operations per second during bursts, in bytes |
| 614 | # (Since 1.7) |
| 615 | # |
| 616 | # @iops_wr_max: write I/O operations per second during bursts, in |
| 617 | # bytes (Since 1.7) |
| 618 | # |
| 619 | # @bps_max_length: maximum length of the @bps_max burst period, in |
| 620 | # seconds. (Since 2.6) |
| 621 | # |
| 622 | # @bps_rd_max_length: maximum length of the @bps_rd_max burst period, |
| 623 | # in seconds. (Since 2.6) |
| 624 | # |
| 625 | # @bps_wr_max_length: maximum length of the @bps_wr_max burst period, |
| 626 | # in seconds. (Since 2.6) |
| 627 | # |
| 628 | # @iops_max_length: maximum length of the @iops burst period, in |
| 629 | # seconds. (Since 2.6) |
| 630 | # |
| 631 | # @iops_rd_max_length: maximum length of the @iops_rd_max burst |
| 632 | # period, in seconds. (Since 2.6) |
| 633 | # |
| 634 | # @iops_wr_max_length: maximum length of the @iops_wr_max burst |
| 635 | # period, in seconds. (Since 2.6) |
| 636 | # |
| 637 | # @iops_size: an I/O size in bytes (Since 1.7) |
| 638 | # |
| 639 | # @group: throttle group name (Since 2.4) |
| 640 | # |
| 641 | # @cache: the cache mode used for the block device (since: 2.3) |
| 642 | # |
| 643 | # @write_threshold: configured write threshold for the device. 0 if |
| 644 | # disabled. (Since 2.3) |
| 645 | # |
| 646 | # @dirty-bitmaps: dirty bitmaps information (only present if node has |
| 647 | # one or more dirty bitmaps) (Since 4.2) |
| 648 | # |
| 649 | # Since: 0.14 |
| 650 | ## |
| 651 | { 'struct': 'BlockDeviceInfo', |
| 652 | 'data': { 'file': 'str', 'node-name': 'str', 'ro': 'bool', 'drv': 'str', |
| 653 | '*backing_file': 'str', 'backing_file_depth': 'int', |
| 654 | 'children': ['BlockdevChild'], |
| 655 | 'active': 'bool', 'encrypted': 'bool', |
| 656 | 'detect_zeroes': 'BlockdevDetectZeroesOptions', |
| 657 | 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', |
| 658 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int', |
| 659 | 'image': 'ImageInfo', |
| 660 | '*bps_max': 'int', '*bps_rd_max': 'int', |
| 661 | '*bps_wr_max': 'int', '*iops_max': 'int', |
| 662 | '*iops_rd_max': 'int', '*iops_wr_max': 'int', |
| 663 | '*bps_max_length': 'int', '*bps_rd_max_length': 'int', |
| 664 | '*bps_wr_max_length': 'int', '*iops_max_length': 'int', |
| 665 | '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int', |
| 666 | '*iops_size': 'int', '*group': 'str', 'cache': 'BlockdevCacheInfo', |
| 667 | 'write_threshold': 'int', '*dirty-bitmaps': ['BlockDirtyInfo'] } } |
| 668 | |
| 669 | ## |
| 670 | # @BlockDeviceIoStatus: |
| 671 | # |
| 672 | # An enumeration of block device I/O status. |
| 673 | # |
| 674 | # @ok: The last I/O operation has succeeded |
| 675 | # |
| 676 | # @failed: The last I/O operation has failed |
| 677 | # |
| 678 | # @nospace: The last I/O operation has failed due to a no-space |
| 679 | # condition |
| 680 | # |
| 681 | # Since: 1.0 |
| 682 | ## |
| 683 | { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } |
| 684 | |
| 685 | ## |
| 686 | # @BlockDirtyInfo: |
| 687 | # |
| 688 | # Block dirty bitmap information. |
| 689 | # |
| 690 | # @name: the name of the dirty bitmap (Since 2.4) |
| 691 | # |
| 692 | # @count: number of dirty bytes according to the dirty bitmap |
| 693 | # |
| 694 | # @granularity: granularity of the dirty bitmap in bytes (since 1.4) |
| 695 | # |
| 696 | # @recording: true if the bitmap is recording new writes from the |
| 697 | # guest. (since 4.0) |
| 698 | # |
| 699 | # @busy: true if the bitmap is in-use by some operation (NBD or jobs) |
| 700 | # and cannot be modified via QMP or used by another operation. |
| 701 | # (since 4.0) |
| 702 | # |
| 703 | # @persistent: true if the bitmap was stored on disk, is scheduled to |
| 704 | # be stored on disk, or both. (since 4.0) |
| 705 | # |
| 706 | # @inconsistent: true if this is a persistent bitmap that was |
| 707 | # improperly stored. Implies @persistent to be true; @recording |
| 708 | # and @busy to be false. This bitmap cannot be used. To remove |
| 709 | # it, use `block-dirty-bitmap-remove`. (Since 4.0) |
| 710 | # |
| 711 | # Since: 1.3 |
| 712 | ## |
| 713 | { 'struct': 'BlockDirtyInfo', |
| 714 | 'data': {'*name': 'str', 'count': 'int', 'granularity': 'uint32', |
| 715 | 'recording': 'bool', 'busy': 'bool', |
| 716 | 'persistent': 'bool', '*inconsistent': 'bool' } } |
| 717 | |
| 718 | ## |
| 719 | # @Qcow2BitmapInfoFlags: |
| 720 | # |
| 721 | # An enumeration of flags that a bitmap can report to the user. |
| 722 | # |
| 723 | # @in-use: This flag is set by any process actively modifying the |
| 724 | # qcow2 file, and cleared when the updated bitmap is flushed to |
| 725 | # the qcow2 image. The presence of this flag in an offline image |
| 726 | # means that the bitmap was not saved correctly after its last |
| 727 | # usage, and may contain inconsistent data. |
| 728 | # |
| 729 | # @auto: The bitmap must reflect all changes of the virtual disk by |
| 730 | # any application that would write to this qcow2 file. |
| 731 | # |
| 732 | # Since: 4.0 |
| 733 | ## |
| 734 | { 'enum': 'Qcow2BitmapInfoFlags', |
| 735 | 'data': ['in-use', 'auto'] } |
| 736 | |
| 737 | ## |
| 738 | # @Qcow2BitmapInfo: |
| 739 | # |
| 740 | # Qcow2 bitmap information. |
| 741 | # |
| 742 | # @name: the name of the bitmap |
| 743 | # |
| 744 | # @granularity: granularity of the bitmap in bytes |
| 745 | # |
| 746 | # @flags: flags of the bitmap |
| 747 | # |
| 748 | # Since: 4.0 |
| 749 | ## |
| 750 | { 'struct': 'Qcow2BitmapInfo', |
| 751 | 'data': {'name': 'str', 'granularity': 'uint32', |
| 752 | 'flags': ['Qcow2BitmapInfoFlags'] } } |
| 753 | |
| 754 | ## |
| 755 | # @BlockLatencyHistogramInfo: |
| 756 | # |
| 757 | # Block latency histogram. |
| 758 | # |
| 759 | # @boundaries: list of interval boundary values in nanoseconds, all |
| 760 | # greater than zero and in ascending order. For example, the list |
| 761 | # [10, 50, 100] produces the following histogram intervals: [0, |
| 762 | # 10), [10, 50), [50, 100), [100, +inf). |
| 763 | # |
| 764 | # @bins: list of io request counts corresponding to histogram |
| 765 | # intervals, one more element than @boundaries has. For the |
| 766 | # example above, @bins may be something like [3, 1, 5, 2], and |
| 767 | # corresponding histogram looks like:: |
| 768 | # |
| 769 | # 5| * |
| 770 | # 4| * |
| 771 | # 3| * * |
| 772 | # 2| * * * |
| 773 | # 1| * * * * |
| 774 | # +------------------ |
| 775 | # 10 50 100 |
| 776 | # |
| 777 | # Since: 4.0 |
| 778 | ## |
| 779 | { 'struct': 'BlockLatencyHistogramInfo', |
| 780 | 'data': {'boundaries': ['uint64'], 'bins': ['uint64'] } } |
| 781 | |
| 782 | ## |
| 783 | # @BlockInfo: |
| 784 | # |
| 785 | # Block device information. This structure describes a virtual device |
| 786 | # and the backing device associated with it. |
| 787 | # |
| 788 | # @device: The device name associated with the virtual device. |
| 789 | # |
| 790 | # @qdev: The qdev ID, or if no ID is assigned, the QOM path of the |
| 791 | # block device. (since 2.10) |
| 792 | # |
| 793 | # @type: This field is returned only for compatibility reasons, it |
| 794 | # should not be used (always returns 'unknown') |
| 795 | # |
| 796 | # @removable: True if the device supports removable media. |
| 797 | # |
| 798 | # @locked: True if the guest has locked this device from having its |
| 799 | # media removed |
| 800 | # |
| 801 | # @tray_open: True if the device's tray is open (only present if it |
| 802 | # has a tray) |
| 803 | # |
| 804 | # @io-status: `BlockDeviceIoStatus`. Only present if the device |
| 805 | # supports it and the VM is configured to stop on errors |
| 806 | # (supported device models: virtio-blk, IDE, SCSI except |
| 807 | # scsi-generic) |
| 808 | # |
| 809 | # @inserted: `BlockDeviceInfo` describing the device if media is |
| 810 | # present |
| 811 | # |
| 812 | # Since: 0.14 |
| 813 | ## |
| 814 | { 'struct': 'BlockInfo', |
| 815 | 'data': {'device': 'str', '*qdev': 'str', 'type': 'str', 'removable': 'bool', |
| 816 | 'locked': 'bool', '*inserted': 'BlockDeviceInfo', |
| 817 | '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus' } } |
| 818 | |
| 819 | ## |
| 820 | # @BlockMeasureInfo: |
| 821 | # |
| 822 | # Image file size calculation information. This structure describes |
| 823 | # the size requirements for creating a new image file. |
| 824 | # |
| 825 | # The size requirements depend on the new image file format. File |
| 826 | # size always equals virtual disk size for the 'raw' format, even for |
| 827 | # sparse POSIX files. Compact formats such as 'qcow2' represent |
| 828 | # unallocated and zero regions efficiently so file size may be smaller |
| 829 | # than virtual disk size. |
| 830 | # |
| 831 | # The values are upper bounds that are guaranteed to fit the new image |
| 832 | # file. Subsequent modification, such as internal snapshot or further |
| 833 | # bitmap creation, may require additional space and is not covered |
| 834 | # here. |
| 835 | # |
| 836 | # @required: Size required for a new image file, in bytes, when |
| 837 | # copying just allocated guest-visible contents. |
| 838 | # |
| 839 | # @fully-allocated: Image file size, in bytes, once data has been |
| 840 | # written to all sectors, when copying just guest-visible |
| 841 | # contents. |
| 842 | # |
| 843 | # @bitmaps: Additional size required if all the top-level bitmap |
| 844 | # metadata in the source image were to be copied to the |
| 845 | # destination, present only when source and destination both |
| 846 | # support persistent bitmaps. (since 5.1) |
| 847 | # |
| 848 | # Since: 2.10 |
| 849 | ## |
| 850 | { 'struct': 'BlockMeasureInfo', |
| 851 | 'data': {'required': 'int', 'fully-allocated': 'int', '*bitmaps': 'int'} } |
| 852 | |
| 853 | ## |
| 854 | # @query-block: |
| 855 | # |
| 856 | # Get a list of `BlockInfo` for all virtual block devices. |
| 857 | # |
| 858 | # @flat: Omit nested data about the backing image, i.e. `BlockInfo` |
| 859 | # member 'inserted.image.backing-image' will be absent. |
| 860 | # Default is false. (Since 11.0) |
| 861 | # |
| 862 | # Returns: a list describing each virtual block device. Filter nodes |
| 863 | # that were created implicitly are skipped over. |
| 864 | # |
| 865 | # Since: 0.14 |
| 866 | # |
| 867 | # .. qmp-example:: |
| 868 | # |
| 869 | # -> { "execute": "query-block" } |
| 870 | # <- { |
| 871 | # "return":[ |
| 872 | # { |
| 873 | # "io-status": "ok", |
| 874 | # "device":"ide0-hd0", |
| 875 | # "locked":false, |
| 876 | # "removable":false, |
| 877 | # "inserted":{ |
| 878 | # "ro":false, |
| 879 | # "drv":"qcow2", |
| 880 | # "encrypted":false, |
| 881 | # "file":"disks/test.qcow2", |
| 882 | # "backing_file_depth":1, |
| 883 | # "bps":1000000, |
| 884 | # "bps_rd":0, |
| 885 | # "bps_wr":0, |
| 886 | # "iops":1000000, |
| 887 | # "iops_rd":0, |
| 888 | # "iops_wr":0, |
| 889 | # "bps_max": 8000000, |
| 890 | # "bps_rd_max": 0, |
| 891 | # "bps_wr_max": 0, |
| 892 | # "iops_max": 0, |
| 893 | # "iops_rd_max": 0, |
| 894 | # "iops_wr_max": 0, |
| 895 | # "iops_size": 0, |
| 896 | # "detect_zeroes": "on", |
| 897 | # "write_threshold": 0, |
| 898 | # "image":{ |
| 899 | # "filename":"disks/test.qcow2", |
| 900 | # "format":"qcow2", |
| 901 | # "virtual-size":2048000, |
| 902 | # "backing_file":"base.qcow2", |
| 903 | # "full-backing-filename":"disks/base.qcow2", |
| 904 | # "backing-filename-format":"qcow2", |
| 905 | # "snapshots":[ |
| 906 | # { |
| 907 | # "id": "1", |
| 908 | # "name": "snapshot1", |
| 909 | # "vm-state-size": 0, |
| 910 | # "date-sec": 10000200, |
| 911 | # "date-nsec": 12, |
| 912 | # "vm-clock-sec": 206, |
| 913 | # "vm-clock-nsec": 30 |
| 914 | # } |
| 915 | # ], |
| 916 | # "backing-image":{ |
| 917 | # "filename":"disks/base.qcow2", |
| 918 | # "format":"qcow2", |
| 919 | # "virtual-size":2048000 |
| 920 | # } |
| 921 | # } |
| 922 | # }, |
| 923 | # "qdev": "ide_disk", |
| 924 | # "type":"unknown" |
| 925 | # }, |
| 926 | # { |
| 927 | # "io-status": "ok", |
| 928 | # "device":"ide1-cd0", |
| 929 | # "locked":false, |
| 930 | # "removable":true, |
| 931 | # "qdev": "/machine/unattached/device[23]", |
| 932 | # "tray_open": false, |
| 933 | # "type":"unknown" |
| 934 | # }, |
| 935 | # { |
| 936 | # "device":"floppy0", |
| 937 | # "locked":false, |
| 938 | # "removable":true, |
| 939 | # "qdev": "/machine/unattached/device[20]", |
| 940 | # "type":"unknown" |
| 941 | # }, |
| 942 | # { |
| 943 | # "device":"sd0", |
| 944 | # "locked":false, |
| 945 | # "removable":true, |
| 946 | # "type":"unknown" |
| 947 | # } |
| 948 | # ] |
| 949 | # } |
| 950 | ## |
| 951 | { 'command': 'query-block', 'returns': ['BlockInfo'], |
| 952 | 'data': { '*flat': 'bool' }, |
| 953 | 'allow-preconfig': true } |
| 954 | |
| 955 | ## |
| 956 | # @BlockDeviceTimedStats: |
| 957 | # |
| 958 | # Statistics of a block device during a given interval of time. |
| 959 | # |
| 960 | # @interval_length: Interval used for calculating the statistics, in |
| 961 | # seconds. |
| 962 | # |
| 963 | # @min_rd_latency_ns: Minimum latency of read operations in the |
| 964 | # defined interval, in nanoseconds. |
| 965 | # |
| 966 | # @min_wr_latency_ns: Minimum latency of write operations in the |
| 967 | # defined interval, in nanoseconds. |
| 968 | # |
| 969 | # @min_zone_append_latency_ns: Minimum latency of zone append |
| 970 | # operations in the defined interval, in nanoseconds (since 8.1) |
| 971 | # |
| 972 | # @min_flush_latency_ns: Minimum latency of flush operations in the |
| 973 | # defined interval, in nanoseconds. |
| 974 | # |
| 975 | # @max_rd_latency_ns: Maximum latency of read operations in the |
| 976 | # defined interval, in nanoseconds. |
| 977 | # |
| 978 | # @max_wr_latency_ns: Maximum latency of write operations in the |
| 979 | # defined interval, in nanoseconds. |
| 980 | # |
| 981 | # @max_zone_append_latency_ns: Maximum latency of zone append |
| 982 | # operations in the defined interval, in nanoseconds (since 8.1) |
| 983 | # |
| 984 | # @max_flush_latency_ns: Maximum latency of flush operations in the |
| 985 | # defined interval, in nanoseconds. |
| 986 | # |
| 987 | # @avg_rd_latency_ns: Average latency of read operations in the |
| 988 | # defined interval, in nanoseconds. |
| 989 | # |
| 990 | # @avg_wr_latency_ns: Average latency of write operations in the |
| 991 | # defined interval, in nanoseconds. |
| 992 | # |
| 993 | # @avg_zone_append_latency_ns: Average latency of zone append |
| 994 | # operations in the defined interval, in nanoseconds (since 8.1) |
| 995 | # |
| 996 | # @avg_flush_latency_ns: Average latency of flush operations in the |
| 997 | # defined interval, in nanoseconds. |
| 998 | # |
| 999 | # @avg_rd_queue_depth: Average number of pending read operations in |
| 1000 | # the defined interval. |
| 1001 | # |
| 1002 | # @avg_wr_queue_depth: Average number of pending write operations in |
| 1003 | # the defined interval. |
| 1004 | # |
| 1005 | # @avg_zone_append_queue_depth: Average number of pending zone append |
| 1006 | # operations in the defined interval (since 8.1). |
| 1007 | # |
| 1008 | # Since: 2.5 |
| 1009 | ## |
| 1010 | { 'struct': 'BlockDeviceTimedStats', |
| 1011 | 'data': { 'interval_length': 'int', 'min_rd_latency_ns': 'int', |
| 1012 | 'max_rd_latency_ns': 'int', 'avg_rd_latency_ns': 'int', |
| 1013 | 'min_wr_latency_ns': 'int', 'max_wr_latency_ns': 'int', |
| 1014 | 'avg_wr_latency_ns': 'int', 'min_zone_append_latency_ns': 'int', |
| 1015 | 'max_zone_append_latency_ns': 'int', |
| 1016 | 'avg_zone_append_latency_ns': 'int', |
| 1017 | 'min_flush_latency_ns': 'int', 'max_flush_latency_ns': 'int', |
| 1018 | 'avg_flush_latency_ns': 'int', 'avg_rd_queue_depth': 'number', |
| 1019 | 'avg_wr_queue_depth': 'number', |
| 1020 | 'avg_zone_append_queue_depth': 'number' } } |
| 1021 | |
| 1022 | ## |
| 1023 | # @BlockDeviceStats: |
| 1024 | # |
| 1025 | # Statistics of a virtual block device or a block backing device. |
| 1026 | # |
| 1027 | # @rd_bytes: The number of bytes read by the device. |
| 1028 | # |
| 1029 | # @wr_bytes: The number of bytes written by the device. |
| 1030 | # |
| 1031 | # @zone_append_bytes: The number of bytes appended by the zoned |
| 1032 | # devices (since 8.1) |
| 1033 | # |
| 1034 | # @unmap_bytes: The number of bytes unmapped by the device (Since 4.2) |
| 1035 | # |
| 1036 | # @rd_operations: The number of read operations performed by the |
| 1037 | # device. |
| 1038 | # |
| 1039 | # @wr_operations: The number of write operations performed by the |
| 1040 | # device. |
| 1041 | # |
| 1042 | # @zone_append_operations: The number of zone append operations |
| 1043 | # performed by the zoned devices (since 8.1) |
| 1044 | # |
| 1045 | # @flush_operations: The number of cache flush operations performed by |
| 1046 | # the device (since 0.15) |
| 1047 | # |
| 1048 | # @unmap_operations: The number of unmap operations performed by the |
| 1049 | # device (Since 4.2) |
| 1050 | # |
| 1051 | # @rd_total_time_ns: Total time spent on reads in nanoseconds |
| 1052 | # (since 0.15) |
| 1053 | # |
| 1054 | # @wr_total_time_ns: Total time spent on writes in nanoseconds |
| 1055 | # (since 0.15) |
| 1056 | # |
| 1057 | # @zone_append_total_time_ns: Total time spent on zone append writes |
| 1058 | # in nanoseconds (since 8.1) |
| 1059 | # |
| 1060 | # @flush_total_time_ns: Total time spent on cache flushes in |
| 1061 | # nanoseconds (since 0.15). |
| 1062 | # |
| 1063 | # @unmap_total_time_ns: Total time spent on unmap operations in |
| 1064 | # nanoseconds (Since 4.2) |
| 1065 | # |
| 1066 | # @wr_highest_offset: The offset after the greatest byte written to |
| 1067 | # the device. The intended use of this information is for |
| 1068 | # growable sparse files (like qcow2) that are used on top of a |
| 1069 | # physical device. |
| 1070 | # |
| 1071 | # @rd_merged: Number of read requests that have been merged into |
| 1072 | # another request (Since 2.3). |
| 1073 | # |
| 1074 | # @wr_merged: Number of write requests that have been merged into |
| 1075 | # another request (Since 2.3). |
| 1076 | # |
| 1077 | # @zone_append_merged: Number of zone append requests that have been |
| 1078 | # merged into another request (since 8.1) |
| 1079 | # |
| 1080 | # @unmap_merged: Number of unmap requests that have been merged into |
| 1081 | # another request (Since 4.2) |
| 1082 | # |
| 1083 | # @idle_time_ns: Time since the last I/O operation, in nanoseconds. |
| 1084 | # If the field is absent it means that there haven't been any |
| 1085 | # operations yet (Since 2.5). |
| 1086 | # |
| 1087 | # @failed_rd_operations: The number of failed read operations |
| 1088 | # performed by the device (Since 2.5) |
| 1089 | # |
| 1090 | # @failed_wr_operations: The number of failed write operations |
| 1091 | # performed by the device (Since 2.5) |
| 1092 | # |
| 1093 | # @failed_zone_append_operations: The number of failed zone append |
| 1094 | # write operations performed by the zoned devices (since 8.1) |
| 1095 | # |
| 1096 | # @failed_flush_operations: The number of failed flush operations |
| 1097 | # performed by the device (Since 2.5) |
| 1098 | # |
| 1099 | # @failed_unmap_operations: The number of failed unmap operations |
| 1100 | # performed by the device (Since 4.2) |
| 1101 | # |
| 1102 | # @invalid_rd_operations: The number of invalid read operations |
| 1103 | # performed by the device (Since 2.5) |
| 1104 | # |
| 1105 | # @invalid_wr_operations: The number of invalid write operations |
| 1106 | # performed by the device (Since 2.5) |
| 1107 | # |
| 1108 | # @invalid_zone_append_operations: The number of invalid zone append |
| 1109 | # operations performed by the zoned device (since 8.1) |
| 1110 | # |
| 1111 | # @invalid_flush_operations: The number of invalid flush operations |
| 1112 | # performed by the device (Since 2.5) |
| 1113 | # |
| 1114 | # @invalid_unmap_operations: The number of invalid unmap operations |
| 1115 | # performed by the device (Since 4.2) |
| 1116 | # |
| 1117 | # @account_invalid: Whether invalid operations are included in the |
| 1118 | # last access statistics (Since 2.5) |
| 1119 | # |
| 1120 | # @account_failed: Whether failed operations are included in the |
| 1121 | # latency and last access statistics (Since 2.5) |
| 1122 | # |
| 1123 | # @timed_stats: Statistics specific to the set of previously defined |
| 1124 | # intervals of time (Since 2.5) |
| 1125 | # |
| 1126 | # @rd_latency_histogram: `BlockLatencyHistogramInfo`. (Since 4.0) |
| 1127 | # |
| 1128 | # @wr_latency_histogram: `BlockLatencyHistogramInfo`. (Since 4.0) |
| 1129 | # |
| 1130 | # @zone_append_latency_histogram: `BlockLatencyHistogramInfo`. |
| 1131 | # (since 8.1) |
| 1132 | # |
| 1133 | # @flush_latency_histogram: `BlockLatencyHistogramInfo`. (Since 4.0) |
| 1134 | # |
| 1135 | # Since: 0.14 |
| 1136 | ## |
| 1137 | { 'struct': 'BlockDeviceStats', |
| 1138 | 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'zone_append_bytes': 'int', |
| 1139 | 'unmap_bytes' : 'int', 'rd_operations': 'int', |
| 1140 | 'wr_operations': 'int', 'zone_append_operations': 'int', |
| 1141 | 'flush_operations': 'int', 'unmap_operations': 'int', |
| 1142 | 'rd_total_time_ns': 'int', 'wr_total_time_ns': 'int', |
| 1143 | 'zone_append_total_time_ns': 'int', 'flush_total_time_ns': 'int', |
| 1144 | 'unmap_total_time_ns': 'int', 'wr_highest_offset': 'int', |
| 1145 | 'rd_merged': 'int', 'wr_merged': 'int', 'zone_append_merged': 'int', |
| 1146 | 'unmap_merged': 'int', '*idle_time_ns': 'int', |
| 1147 | 'failed_rd_operations': 'int', 'failed_wr_operations': 'int', |
| 1148 | 'failed_zone_append_operations': 'int', |
| 1149 | 'failed_flush_operations': 'int', |
| 1150 | 'failed_unmap_operations': 'int', 'invalid_rd_operations': 'int', |
| 1151 | 'invalid_wr_operations': 'int', |
| 1152 | 'invalid_zone_append_operations': 'int', |
| 1153 | 'invalid_flush_operations': 'int', 'invalid_unmap_operations': 'int', |
| 1154 | 'account_invalid': 'bool', 'account_failed': 'bool', |
| 1155 | 'timed_stats': ['BlockDeviceTimedStats'], |
| 1156 | '*rd_latency_histogram': 'BlockLatencyHistogramInfo', |
| 1157 | '*wr_latency_histogram': 'BlockLatencyHistogramInfo', |
| 1158 | '*zone_append_latency_histogram': 'BlockLatencyHistogramInfo', |
| 1159 | '*flush_latency_histogram': 'BlockLatencyHistogramInfo' } } |
| 1160 | |
| 1161 | ## |
| 1162 | # @BlockStatsSpecificFile: |
| 1163 | # |
| 1164 | # File driver statistics |
| 1165 | # |
| 1166 | # @discard-nb-ok: The number of successful discard operations |
| 1167 | # performed by the driver. |
| 1168 | # |
| 1169 | # @discard-nb-failed: The number of failed discard operations |
| 1170 | # performed by the driver. |
| 1171 | # |
| 1172 | # @discard-bytes-ok: The number of bytes discarded by the driver. |
| 1173 | # |
| 1174 | # Since: 4.2 |
| 1175 | ## |
| 1176 | { 'struct': 'BlockStatsSpecificFile', |
| 1177 | 'data': { |
| 1178 | 'discard-nb-ok': 'uint64', |
| 1179 | 'discard-nb-failed': 'uint64', |
| 1180 | 'discard-bytes-ok': 'uint64' } } |
| 1181 | |
| 1182 | ## |
| 1183 | # @BlockStatsSpecificNvme: |
| 1184 | # |
| 1185 | # NVMe driver statistics |
| 1186 | # |
| 1187 | # @completion-errors: The number of completion errors. |
| 1188 | # |
| 1189 | # @aligned-accesses: The number of aligned accesses performed by the |
| 1190 | # driver. |
| 1191 | # |
| 1192 | # @unaligned-accesses: The number of unaligned accesses performed by |
| 1193 | # the driver. |
| 1194 | # |
| 1195 | # Since: 5.2 |
| 1196 | ## |
| 1197 | { 'struct': 'BlockStatsSpecificNvme', |
| 1198 | 'data': { |
| 1199 | 'completion-errors': 'uint64', |
| 1200 | 'aligned-accesses': 'uint64', |
| 1201 | 'unaligned-accesses': 'uint64' } } |
| 1202 | |
| 1203 | ## |
| 1204 | # @BlockStatsSpecific: |
| 1205 | # |
| 1206 | # Block driver specific statistics |
| 1207 | # |
| 1208 | # @driver: block driver name |
| 1209 | # |
| 1210 | # Since: 4.2 |
| 1211 | ## |
| 1212 | { 'union': 'BlockStatsSpecific', |
| 1213 | 'base': { 'driver': 'BlockdevDriver' }, |
| 1214 | 'discriminator': 'driver', |
| 1215 | 'data': { |
| 1216 | 'file': 'BlockStatsSpecificFile', |
| 1217 | 'host_device': { 'type': 'BlockStatsSpecificFile', |
| 1218 | 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
| 1219 | 'nvme': 'BlockStatsSpecificNvme' } } |
| 1220 | |
| 1221 | ## |
| 1222 | # @BlockStats: |
| 1223 | # |
| 1224 | # Statistics of a virtual block device or a block backing device. |
| 1225 | # |
| 1226 | # @device: If the stats are for a virtual block device, the name |
| 1227 | # corresponding to the virtual block device. |
| 1228 | # |
| 1229 | # @node-name: The node name of the device. (Since 2.3) |
| 1230 | # |
| 1231 | # @qdev: The qdev ID, or if no ID is assigned, the QOM path of the |
| 1232 | # block device. (since 3.0) |
| 1233 | # |
| 1234 | # @stats: A `BlockDeviceStats` for the device. |
| 1235 | # |
| 1236 | # @driver-specific: Optional driver-specific stats. (Since 4.2) |
| 1237 | # |
| 1238 | # @parent: This describes the file block device if it has one. |
| 1239 | # Contains recursively the statistics of the underlying protocol |
| 1240 | # (e.g. the host file for a qcow2 image). If there is no |
| 1241 | # underlying protocol, this field is omitted |
| 1242 | # |
| 1243 | # @backing: This describes the backing block device if it has one. |
| 1244 | # (Since 2.0) |
| 1245 | # |
| 1246 | # Since: 0.14 |
| 1247 | ## |
| 1248 | { 'struct': 'BlockStats', |
| 1249 | 'data': {'*device': 'str', '*qdev': 'str', '*node-name': 'str', |
| 1250 | 'stats': 'BlockDeviceStats', |
| 1251 | '*driver-specific': 'BlockStatsSpecific', |
| 1252 | '*parent': 'BlockStats', |
| 1253 | '*backing': 'BlockStats'} } |
| 1254 | |
| 1255 | ## |
| 1256 | # @query-blockstats: |
| 1257 | # |
| 1258 | # Query the `BlockStats` for all virtual block devices. |
| 1259 | # |
| 1260 | # @query-nodes: If true, the command will query all the block nodes |
| 1261 | # that have a node name, in a list which will include "parent" |
| 1262 | # information, but not "backing". If false or omitted, the |
| 1263 | # behavior is as before - query all the device backends, |
| 1264 | # recursively including their "parent" and "backing". Filter |
| 1265 | # nodes that were created implicitly are skipped over in this |
| 1266 | # mode. (Since 2.3) |
| 1267 | # |
| 1268 | # Returns: A list of statistics for each virtual block device. |
| 1269 | # |
| 1270 | # Since: 0.14 |
| 1271 | # |
| 1272 | # .. qmp-example:: |
| 1273 | # |
| 1274 | # -> { "execute": "query-blockstats" } |
| 1275 | # <- { |
| 1276 | # "return":[ |
| 1277 | # { |
| 1278 | # "device":"ide0-hd0", |
| 1279 | # "parent":{ |
| 1280 | # "stats":{ |
| 1281 | # "wr_highest_offset":3686448128, |
| 1282 | # "wr_bytes":9786368, |
| 1283 | # "wr_operations":751, |
| 1284 | # "rd_bytes":122567168, |
| 1285 | # "rd_operations":36772 |
| 1286 | # "wr_total_times_ns":313253456 |
| 1287 | # "rd_total_times_ns":3465673657 |
| 1288 | # "flush_total_times_ns":49653 |
| 1289 | # "flush_operations":61, |
| 1290 | # "rd_merged":0, |
| 1291 | # "wr_merged":0, |
| 1292 | # "idle_time_ns":2953431879, |
| 1293 | # "account_invalid":true, |
| 1294 | # "account_failed":false |
| 1295 | # } |
| 1296 | # }, |
| 1297 | # "stats":{ |
| 1298 | # "wr_highest_offset":2821110784, |
| 1299 | # "wr_bytes":9786368, |
| 1300 | # "wr_operations":692, |
| 1301 | # "rd_bytes":122739200, |
| 1302 | # "rd_operations":36604 |
| 1303 | # "flush_operations":51, |
| 1304 | # "wr_total_times_ns":313253456 |
| 1305 | # "rd_total_times_ns":3465673657 |
| 1306 | # "flush_total_times_ns":49653, |
| 1307 | # "rd_merged":0, |
| 1308 | # "wr_merged":0, |
| 1309 | # "idle_time_ns":2953431879, |
| 1310 | # "account_invalid":true, |
| 1311 | # "account_failed":false |
| 1312 | # }, |
| 1313 | # "qdev": "/machine/unattached/device[23]" |
| 1314 | # }, |
| 1315 | # { |
| 1316 | # "device":"ide1-cd0", |
| 1317 | # "stats":{ |
| 1318 | # "wr_highest_offset":0, |
| 1319 | # "wr_bytes":0, |
| 1320 | # "wr_operations":0, |
| 1321 | # "rd_bytes":0, |
| 1322 | # "rd_operations":0 |
| 1323 | # "flush_operations":0, |
| 1324 | # "wr_total_times_ns":0 |
| 1325 | # "rd_total_times_ns":0 |
| 1326 | # "flush_total_times_ns":0, |
| 1327 | # "rd_merged":0, |
| 1328 | # "wr_merged":0, |
| 1329 | # "account_invalid":false, |
| 1330 | # "account_failed":false |
| 1331 | # }, |
| 1332 | # "qdev": "/machine/unattached/device[24]" |
| 1333 | # }, |
| 1334 | # { |
| 1335 | # "device":"floppy0", |
| 1336 | # "stats":{ |
| 1337 | # "wr_highest_offset":0, |
| 1338 | # "wr_bytes":0, |
| 1339 | # "wr_operations":0, |
| 1340 | # "rd_bytes":0, |
| 1341 | # "rd_operations":0 |
| 1342 | # "flush_operations":0, |
| 1343 | # "wr_total_times_ns":0 |
| 1344 | # "rd_total_times_ns":0 |
| 1345 | # "flush_total_times_ns":0, |
| 1346 | # "rd_merged":0, |
| 1347 | # "wr_merged":0, |
| 1348 | # "account_invalid":false, |
| 1349 | # "account_failed":false |
| 1350 | # }, |
| 1351 | # "qdev": "/machine/unattached/device[16]" |
| 1352 | # }, |
| 1353 | # { |
| 1354 | # "device":"sd0", |
| 1355 | # "stats":{ |
| 1356 | # "wr_highest_offset":0, |
| 1357 | # "wr_bytes":0, |
| 1358 | # "wr_operations":0, |
| 1359 | # "rd_bytes":0, |
| 1360 | # "rd_operations":0 |
| 1361 | # "flush_operations":0, |
| 1362 | # "wr_total_times_ns":0 |
| 1363 | # "rd_total_times_ns":0 |
| 1364 | # "flush_total_times_ns":0, |
| 1365 | # "rd_merged":0, |
| 1366 | # "wr_merged":0, |
| 1367 | # "account_invalid":false, |
| 1368 | # "account_failed":false |
| 1369 | # } |
| 1370 | # } |
| 1371 | # ] |
| 1372 | # } |
| 1373 | ## |
| 1374 | { 'command': 'query-blockstats', |
| 1375 | 'data': { '*query-nodes': 'bool' }, |
| 1376 | 'returns': ['BlockStats'], |
| 1377 | 'allow-preconfig': true } |
| 1378 | |
| 1379 | ## |
| 1380 | # @BlockdevOnError: |
| 1381 | # |
| 1382 | # An enumeration of possible behaviors for errors on I/O operations. |
| 1383 | # The exact meaning depends on whether the I/O was initiated by a |
| 1384 | # guest or by a block job |
| 1385 | # |
| 1386 | # @report: for guest operations, report the error to the guest; for |
| 1387 | # jobs, cancel the job |
| 1388 | # |
| 1389 | # @ignore: ignore the error, only report a QMP event (`BLOCK_IO_ERROR` |
| 1390 | # or `BLOCK_JOB_ERROR`). The backup, mirror and commit block jobs |
| 1391 | # retry the failing request later and may still complete |
| 1392 | # successfully. The stream block job continues to stream and will |
| 1393 | # complete with an error. |
| 1394 | # |
| 1395 | # @enospc: same as @stop on ENOSPC, same as @report otherwise. |
| 1396 | # |
| 1397 | # @stop: for guest operations, stop the virtual machine; for jobs, |
| 1398 | # pause the job |
| 1399 | # |
| 1400 | # @auto: inherit the error handling policy of the backend (since: 2.7) |
| 1401 | # |
| 1402 | # Since: 1.3 |
| 1403 | ## |
| 1404 | { 'enum': 'BlockdevOnError', |
| 1405 | 'data': ['report', 'ignore', 'enospc', 'stop', 'auto'] } |
| 1406 | |
| 1407 | ## |
| 1408 | # @MirrorSyncMode: |
| 1409 | # |
| 1410 | # An enumeration of possible behaviors for the initial synchronization |
| 1411 | # phase of storage mirroring. |
| 1412 | # |
| 1413 | # @top: copies data in the topmost image to the destination |
| 1414 | # |
| 1415 | # @full: copies data from all images to the destination |
| 1416 | # |
| 1417 | # @none: only copy data written from now on |
| 1418 | # |
| 1419 | # @incremental: only copy data described by the dirty bitmap. |
| 1420 | # (since: 2.4) |
| 1421 | # |
| 1422 | # @bitmap: only copy data described by the dirty bitmap. Behavior on |
| 1423 | # completion is determined by the `BitmapSyncMode`. (since: 4.2) |
| 1424 | # |
| 1425 | # Since: 1.3 |
| 1426 | ## |
| 1427 | { 'enum': 'MirrorSyncMode', |
| 1428 | 'data': ['top', 'full', 'none', 'incremental', 'bitmap'] } |
| 1429 | |
| 1430 | ## |
| 1431 | # @BitmapSyncMode: |
| 1432 | # |
| 1433 | # An enumeration of possible behaviors for the synchronization of a |
| 1434 | # bitmap when used for data copy operations. |
| 1435 | # |
| 1436 | # @on-success: The bitmap is only synced when the operation is |
| 1437 | # successful. This is the behavior always used for incremental |
| 1438 | # backups. |
| 1439 | # |
| 1440 | # @never: The bitmap is never synchronized with the operation, and is |
| 1441 | # treated solely as a read-only manifest of blocks to copy. |
| 1442 | # |
| 1443 | # @always: The bitmap is always synchronized with the operation, |
| 1444 | # regardless of whether or not the operation was successful. |
| 1445 | # |
| 1446 | # Since: 4.2 |
| 1447 | ## |
| 1448 | { 'enum': 'BitmapSyncMode', |
| 1449 | 'data': ['on-success', 'never', 'always'] } |
| 1450 | |
| 1451 | ## |
| 1452 | # @MirrorCopyMode: |
| 1453 | # |
| 1454 | # An enumeration whose values tell the mirror block job when to |
| 1455 | # trigger writes to the target. |
| 1456 | # |
| 1457 | # @background: copy data in background only. |
| 1458 | # |
| 1459 | # @write-blocking: when data is written to the source, write it |
| 1460 | # (synchronously) to the target as well. In addition, data is |
| 1461 | # copied in background just like in @background mode. |
| 1462 | # |
| 1463 | # Since: 3.0 |
| 1464 | ## |
| 1465 | { 'enum': 'MirrorCopyMode', |
| 1466 | 'data': ['background', 'write-blocking'] } |
| 1467 | |
| 1468 | ## |
| 1469 | # @BlockJobInfoMirror: |
| 1470 | # |
| 1471 | # Information specific to mirror block jobs. |
| 1472 | # |
| 1473 | # @actively-synced: Whether the source is actively synced to the |
| 1474 | # target, i.e. same data and new writes are done synchronously to |
| 1475 | # both. |
| 1476 | # |
| 1477 | # Since: 8.2 |
| 1478 | ## |
| 1479 | { 'struct': 'BlockJobInfoMirror', |
| 1480 | 'data': { 'actively-synced': 'bool' } } |
| 1481 | |
| 1482 | ## |
| 1483 | # @BlockJobInfo: |
| 1484 | # |
| 1485 | # Information about a long-running block device operation. |
| 1486 | # |
| 1487 | # @type: the job type ('stream' for image streaming) |
| 1488 | # |
| 1489 | # @device: The job identifier. Originally the device name but other |
| 1490 | # values are allowed since QEMU 2.7 |
| 1491 | # |
| 1492 | # @len: Estimated @offset value at the completion of the job. This |
| 1493 | # value can arbitrarily change while the job is running, in both |
| 1494 | # directions. |
| 1495 | # |
| 1496 | # @offset: Progress made until now. The unit is arbitrary and the |
| 1497 | # value can only meaningfully be used for the ratio of @offset to |
| 1498 | # @len. The value is monotonically increasing. |
| 1499 | # |
| 1500 | # @busy: false if the job is known to be in a quiescent state, with no |
| 1501 | # pending I/O. (Since 1.3) |
| 1502 | # |
| 1503 | # @paused: whether the job is paused or, if @busy is true, will pause |
| 1504 | # itself as soon as possible. (Since 1.3) |
| 1505 | # |
| 1506 | # @speed: the rate limit, bytes per second |
| 1507 | # |
| 1508 | # @io-status: the status of the job (since 1.3) |
| 1509 | # |
| 1510 | # @ready: true if the job may be completed (since 2.2) |
| 1511 | # |
| 1512 | # @status: Current job state/status (since 2.12) |
| 1513 | # |
| 1514 | # @auto-finalize: Job will finalize itself when PENDING, moving to the |
| 1515 | # CONCLUDED state. (since 2.12) |
| 1516 | # |
| 1517 | # @auto-dismiss: Job will dismiss itself when CONCLUDED, and |
| 1518 | # disappear. (since 2.12) |
| 1519 | # |
| 1520 | # @error: Error information if the job did not complete successfully. |
| 1521 | # Not set if the job completed successfully. (since 2.12.1) |
| 1522 | # |
| 1523 | # Since: 1.1 |
| 1524 | ## |
| 1525 | { 'union': 'BlockJobInfo', |
| 1526 | 'base': {'type': 'JobType', 'device': 'str', 'len': 'int', |
| 1527 | 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int', |
| 1528 | 'io-status': 'BlockDeviceIoStatus', 'ready': 'bool', |
| 1529 | 'status': 'JobStatus', |
| 1530 | 'auto-finalize': 'bool', 'auto-dismiss': 'bool', |
| 1531 | '*error': 'str' }, |
| 1532 | 'discriminator': 'type', |
| 1533 | 'data': { 'mirror': 'BlockJobInfoMirror' } } |
| 1534 | |
| 1535 | ## |
| 1536 | # @query-block-jobs: |
| 1537 | # |
| 1538 | # Return information about long-running block device operations. |
| 1539 | # |
| 1540 | # Returns: a list of job info for each active block job |
| 1541 | # |
| 1542 | # Since: 1.1 |
| 1543 | ## |
| 1544 | { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'], |
| 1545 | 'allow-preconfig': true } |
| 1546 | |
| 1547 | ## |
| 1548 | # @block_resize: |
| 1549 | # |
| 1550 | # Resize a block image while a guest is running. |
| 1551 | # |
| 1552 | # Either @device or @node-name must be set but not both. |
| 1553 | # |
| 1554 | # @device: the name of the device to get the image resized |
| 1555 | # |
| 1556 | # @node-name: graph node name to get the image resized (Since 2.0) |
| 1557 | # |
| 1558 | # @size: new image size in bytes |
| 1559 | # |
| 1560 | # Errors: |
| 1561 | # - If @device is not a valid block device, DeviceNotFound |
| 1562 | # |
| 1563 | # Since: 0.14 |
| 1564 | # |
| 1565 | # .. qmp-example:: |
| 1566 | # |
| 1567 | # -> { "execute": "block_resize", |
| 1568 | # "arguments": { "device": "scratch", "size": 1073741824 } } |
| 1569 | # <- { "return": {} } |
| 1570 | ## |
| 1571 | { 'command': 'block_resize', |
| 1572 | 'data': { '*device': 'str', |
| 1573 | '*node-name': 'str', |
| 1574 | 'size': 'int' }, |
| 1575 | 'coroutine': true, |
| 1576 | 'allow-preconfig': true } |
| 1577 | |
| 1578 | ## |
| 1579 | # @NewImageMode: |
| 1580 | # |
| 1581 | # An enumeration that tells QEMU how to set the backing file path in a |
| 1582 | # new image file. |
| 1583 | # |
| 1584 | # @existing: QEMU should look for an existing image file. |
| 1585 | # |
| 1586 | # @absolute-paths: QEMU should create a new image with absolute paths |
| 1587 | # for the backing file. If there is no backing file available, |
| 1588 | # the new image will not be backed either. |
| 1589 | # |
| 1590 | # Since: 1.1 |
| 1591 | ## |
| 1592 | { 'enum': 'NewImageMode', |
| 1593 | 'data': [ 'existing', 'absolute-paths' ] } |
| 1594 | |
| 1595 | ## |
| 1596 | # @BlockdevSnapshotSync: |
| 1597 | # |
| 1598 | # Either @device or @node-name must be set but not both. |
| 1599 | # |
| 1600 | # @device: the name of the device to take a snapshot of. |
| 1601 | # |
| 1602 | # @node-name: graph node name to generate the snapshot from |
| 1603 | # (Since 2.0) |
| 1604 | # |
| 1605 | # @snapshot-file: the target of the new overlay image. If the file |
| 1606 | # exists, or if it is a device, the overlay will be created in the |
| 1607 | # existing file/device. Otherwise, a new file will be created. |
| 1608 | # |
| 1609 | # @snapshot-node-name: the graph node name of the new image |
| 1610 | # (Since 2.0) |
| 1611 | # |
| 1612 | # @format: the format of the overlay image, default is 'qcow2'. |
| 1613 | # |
| 1614 | # @mode: whether and how QEMU should create a new image, default is |
| 1615 | # 'absolute-paths'. |
| 1616 | ## |
| 1617 | { 'struct': 'BlockdevSnapshotSync', |
| 1618 | 'data': { '*device': 'str', '*node-name': 'str', |
| 1619 | 'snapshot-file': 'str', '*snapshot-node-name': 'str', |
| 1620 | '*format': 'str', '*mode': 'NewImageMode' } } |
| 1621 | |
| 1622 | ## |
| 1623 | # @BlockdevSnapshot: |
| 1624 | # |
| 1625 | # @node: device or node name that will have a snapshot taken. |
| 1626 | # |
| 1627 | # @overlay: reference to the existing block device that will become |
| 1628 | # the overlay of @node, as part of taking the snapshot. It must |
| 1629 | # not have a current backing file (this can be achieved by passing |
| 1630 | # "backing": null to `blockdev-add`). |
| 1631 | # |
| 1632 | # Since: 2.5 |
| 1633 | ## |
| 1634 | { 'struct': 'BlockdevSnapshot', |
| 1635 | 'data': { 'node': 'str', 'overlay': 'str' } } |
| 1636 | |
| 1637 | ## |
| 1638 | # @BackupPerf: |
| 1639 | # |
| 1640 | # Optional parameters for backup. These parameters don't affect |
| 1641 | # functionality, but may significantly affect performance. |
| 1642 | # |
| 1643 | # @use-copy-range: Use copy offloading. Default false. |
| 1644 | # |
| 1645 | # @max-workers: Maximum number of parallel requests for the sustained |
| 1646 | # background copying process. Doesn't influence copy-before-write |
| 1647 | # operations. Default 64. |
| 1648 | # |
| 1649 | # @max-chunk: Maximum request length for the sustained background |
| 1650 | # copying process. Doesn't influence copy-before-write |
| 1651 | # operations. 0 means unlimited. If max-chunk is non-zero then |
| 1652 | # it should not be less than job cluster size which is calculated |
| 1653 | # as maximum of target image cluster size and 64k. Default 0. |
| 1654 | # |
| 1655 | # @min-cluster-size: Minimum size of blocks used by copy-before-write |
| 1656 | # and background copy operations. Has to be a power of 2. No |
| 1657 | # effect if smaller than the maximum of the target's cluster size |
| 1658 | # and 64 KiB. Default 0. (Since 9.2) |
| 1659 | # |
| 1660 | # Since: 6.0 |
| 1661 | ## |
| 1662 | { 'struct': 'BackupPerf', |
| 1663 | 'data': { '*use-copy-range': 'bool', '*max-workers': 'int', |
| 1664 | '*max-chunk': 'int64', '*min-cluster-size': 'size' } } |
| 1665 | |
| 1666 | ## |
| 1667 | # @BackupCommon: |
| 1668 | # |
| 1669 | # @job-id: identifier for the newly-created block job. If omitted, |
| 1670 | # the device name will be used. (Since 2.7) |
| 1671 | # |
| 1672 | # @device: the device name or node-name of a root node which should be |
| 1673 | # copied. |
| 1674 | # |
| 1675 | # @sync: what parts of the disk image should be copied to the |
| 1676 | # destination (all the disk, only the sectors allocated in the |
| 1677 | # topmost image, from a dirty bitmap, or only new I/O). |
| 1678 | # |
| 1679 | # @speed: the maximum speed, in bytes per second. The default is 0, |
| 1680 | # for unlimited. |
| 1681 | # |
| 1682 | # @bitmap: The name of a dirty bitmap to use. Must be present if sync |
| 1683 | # is "bitmap" or "incremental". Can be present if sync is "full" |
| 1684 | # or "top". Must not be present otherwise. |
| 1685 | # (Since 2.4 (`drive-backup`), 3.1 (`blockdev-backup`)) |
| 1686 | # |
| 1687 | # @bitmap-mode: Specifies the type of data the bitmap should contain |
| 1688 | # after the operation concludes. Must be present if a bitmap was |
| 1689 | # provided, must **not** be present otherwise. (Since 4.2) |
| 1690 | # |
| 1691 | # @compress: true to compress data, if the target format supports it. |
| 1692 | # (default: false) (since 2.8) |
| 1693 | # |
| 1694 | # @on-source-error: the action to take on an error on the source, |
| 1695 | # default 'report'. 'stop' and 'enospc' can only be used if the |
| 1696 | # block device supports io-status (see `BlockInfo`). |
| 1697 | # |
| 1698 | # @on-target-error: the action to take on an error on the target, |
| 1699 | # default 'report' (no limitations, since this applies to a |
| 1700 | # different block device than @device). |
| 1701 | # |
| 1702 | # @on-cbw-error: policy defining behavior on I/O errors in |
| 1703 | # copy-before-write jobs; defaults to break-guest-write. |
| 1704 | # (Since 10.1) |
| 1705 | # |
| 1706 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 1707 | # after it has finished its work, waiting for `job-finalize` |
| 1708 | # before making any block graph changes. When true, this job will |
| 1709 | # automatically perform its abort or commit actions. Defaults to |
| 1710 | # true. (Since 2.12) |
| 1711 | # |
| 1712 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 1713 | # after it has completely ceased all work, and awaits |
| 1714 | # `job-dismiss`. When true, this job will automatically disappear |
| 1715 | # without user intervention. Defaults to true. (Since 2.12) |
| 1716 | # |
| 1717 | # @filter-node-name: the node name that should be assigned to the |
| 1718 | # filter driver that the backup job inserts into the graph above |
| 1719 | # node specified by @drive. If this option is not given, a node |
| 1720 | # name is autogenerated. (Since: 4.2) |
| 1721 | # |
| 1722 | # @discard-source: Discard blocks on source which have already been |
| 1723 | # copied to the target. (Since 9.1) |
| 1724 | # |
| 1725 | # @x-perf: Performance options. (Since 6.0) |
| 1726 | # |
| 1727 | # Features: |
| 1728 | # |
| 1729 | # @unstable: Member @x-perf is experimental. |
| 1730 | # |
| 1731 | # .. note:: @on-source-error and @on-target-error only affect |
| 1732 | # background I/O. If an error occurs during a guest write request, |
| 1733 | # the device's rerror/werror actions will be used. |
| 1734 | # |
| 1735 | # Since: 4.2 |
| 1736 | ## |
| 1737 | { 'struct': 'BackupCommon', |
| 1738 | 'data': { '*job-id': 'str', 'device': 'str', |
| 1739 | 'sync': 'MirrorSyncMode', '*speed': 'int', |
| 1740 | '*bitmap': 'str', '*bitmap-mode': 'BitmapSyncMode', |
| 1741 | '*compress': 'bool', |
| 1742 | '*on-source-error': 'BlockdevOnError', |
| 1743 | '*on-target-error': 'BlockdevOnError', |
| 1744 | '*on-cbw-error': 'OnCbwError', |
| 1745 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool', |
| 1746 | '*filter-node-name': 'str', |
| 1747 | '*discard-source': 'bool', |
| 1748 | '*x-perf': { 'type': 'BackupPerf', |
| 1749 | 'features': [ 'unstable' ] } } } |
| 1750 | |
| 1751 | ## |
| 1752 | # @DriveBackup: |
| 1753 | # |
| 1754 | # @target: the target of the new image. If the file exists, or if it |
| 1755 | # is a device, the existing file/device will be used as the new |
| 1756 | # destination. If it does not exist, a new file will be created. |
| 1757 | # |
| 1758 | # @format: the format of the new destination, default is to probe if |
| 1759 | # @mode is 'existing', else the format of the source |
| 1760 | # |
| 1761 | # @mode: whether and how QEMU should create a new image, default is |
| 1762 | # 'absolute-paths'. |
| 1763 | # |
| 1764 | # Since: 1.6 |
| 1765 | ## |
| 1766 | { 'struct': 'DriveBackup', |
| 1767 | 'base': 'BackupCommon', |
| 1768 | 'data': { 'target': 'str', |
| 1769 | '*format': 'str', |
| 1770 | '*mode': 'NewImageMode' } } |
| 1771 | |
| 1772 | ## |
| 1773 | # @BlockdevBackup: |
| 1774 | # |
| 1775 | # @target: the device name or node-name of the backup target node. |
| 1776 | # |
| 1777 | # Since: 2.3 |
| 1778 | ## |
| 1779 | { 'struct': 'BlockdevBackup', |
| 1780 | 'base': 'BackupCommon', |
| 1781 | 'data': { 'target': 'str' } } |
| 1782 | |
| 1783 | ## |
| 1784 | # @blockdev-snapshot-sync: |
| 1785 | # |
| 1786 | # Takes a synchronous snapshot of a block device. |
| 1787 | # |
| 1788 | # Errors: |
| 1789 | # - If @device is not a valid block device, DeviceNotFound |
| 1790 | # |
| 1791 | # Since: 0.14 |
| 1792 | # |
| 1793 | # .. qmp-example:: |
| 1794 | # |
| 1795 | # -> { "execute": "blockdev-snapshot-sync", |
| 1796 | # "arguments": { "device": "ide-hd0", |
| 1797 | # "snapshot-file": |
| 1798 | # "/some/place/my-image", |
| 1799 | # "format": "qcow2" } } |
| 1800 | # <- { "return": {} } |
| 1801 | ## |
| 1802 | { 'command': 'blockdev-snapshot-sync', |
| 1803 | 'data': 'BlockdevSnapshotSync', |
| 1804 | 'allow-preconfig': true } |
| 1805 | |
| 1806 | ## |
| 1807 | # @blockdev-snapshot: |
| 1808 | # |
| 1809 | # Takes a snapshot of a block device. |
| 1810 | # |
| 1811 | # Take a snapshot, by installing 'node' as the backing image of |
| 1812 | # 'overlay'. Additionally, if 'node' is associated with a block |
| 1813 | # device, the block device changes to using 'overlay' as its new |
| 1814 | # active image. |
| 1815 | # |
| 1816 | # Features: |
| 1817 | # |
| 1818 | # @allow-write-only-overlay: If present, the check whether this |
| 1819 | # operation is safe was relaxed so that it can be used to change |
| 1820 | # backing file of a destination of a `blockdev-mirror`. |
| 1821 | # (since 5.0) |
| 1822 | # |
| 1823 | # Since: 2.5 |
| 1824 | # |
| 1825 | # .. qmp-example:: |
| 1826 | # |
| 1827 | # -> { "execute": "blockdev-add", |
| 1828 | # "arguments": { "driver": "qcow2", |
| 1829 | # "node-name": "node1534", |
| 1830 | # "file": { "driver": "file", |
| 1831 | # "filename": "hd1.qcow2" }, |
| 1832 | # "backing": null } } |
| 1833 | # |
| 1834 | # <- { "return": {} } |
| 1835 | # |
| 1836 | # -> { "execute": "blockdev-snapshot", |
| 1837 | # "arguments": { "node": "ide-hd0", |
| 1838 | # "overlay": "node1534" } } |
| 1839 | # <- { "return": {} } |
| 1840 | ## |
| 1841 | { 'command': 'blockdev-snapshot', |
| 1842 | 'data': 'BlockdevSnapshot', |
| 1843 | 'features': [ 'allow-write-only-overlay' ], |
| 1844 | 'allow-preconfig': true } |
| 1845 | |
| 1846 | ## |
| 1847 | # @change-backing-file: |
| 1848 | # |
| 1849 | # Change the backing file in the image file metadata. This does not |
| 1850 | # cause QEMU to reopen the image file to reparse the backing filename |
| 1851 | # (it may, however, perform a reopen to change permissions from r/o -> |
| 1852 | # r/w -> r/o, if needed). The new backing file string is written into |
| 1853 | # the image file metadata, and the QEMU internal strings are updated. |
| 1854 | # |
| 1855 | # @image-node-name: The name of the block driver state node of the |
| 1856 | # image to modify. The "device" argument is used to verify |
| 1857 | # "image-node-name" is in the chain described by "device". |
| 1858 | # |
| 1859 | # @device: The device name or node-name of the root node that owns |
| 1860 | # image-node-name. |
| 1861 | # |
| 1862 | # @backing-file: The string to write as the backing file. This string |
| 1863 | # is not validated, so care should be taken when specifying the |
| 1864 | # string or the image chain may not be able to be reopened again. |
| 1865 | # |
| 1866 | # Errors: |
| 1867 | # - If "device" does not exist or cannot be determined, |
| 1868 | # DeviceNotFound |
| 1869 | # |
| 1870 | # Since: 2.1 |
| 1871 | ## |
| 1872 | { 'command': 'change-backing-file', |
| 1873 | 'data': { 'device': 'str', 'image-node-name': 'str', |
| 1874 | 'backing-file': 'str' }, |
| 1875 | 'allow-preconfig': true } |
| 1876 | |
| 1877 | ## |
| 1878 | # @block-commit: |
| 1879 | # |
| 1880 | # Live commit of data from overlay image nodes into backing nodes - |
| 1881 | # i.e., writes data between 'top' and 'base' into 'base'. |
| 1882 | # |
| 1883 | # If top == base, that is an error. If top has no overlays on top of |
| 1884 | # it, or if it is in use by a writer, the job will not be completed by |
| 1885 | # itself. The user needs to complete the job with the `job-complete` |
| 1886 | # command after getting the ready event. (Since 2.0) |
| 1887 | # |
| 1888 | # If the base image is smaller than top, then the base image will be |
| 1889 | # resized to be the same size as top. If top is smaller than the base |
| 1890 | # image, the base will not be truncated. If you want the base image |
| 1891 | # size to match the size of the smaller top, you can safely truncate |
| 1892 | # it yourself once the commit operation successfully completes. |
| 1893 | # |
| 1894 | # @job-id: identifier for the newly-created block job. If omitted, |
| 1895 | # the device name will be used. (Since 2.7) |
| 1896 | # |
| 1897 | # @device: the device name or node-name of a root node |
| 1898 | # |
| 1899 | # @base-node: The node name of the backing image to write data into. |
| 1900 | # If not specified, this is the deepest backing image. |
| 1901 | # (since: 3.1) |
| 1902 | # |
| 1903 | # @base: Same as @base-node, except that it is a file name rather than |
| 1904 | # a node name. This must be the exact filename string that was |
| 1905 | # used to open the node; other strings, even if addressing the |
| 1906 | # same file, are not accepted |
| 1907 | # |
| 1908 | # @top-node: The node name of the backing image within the image chain |
| 1909 | # which contains the topmost data to be committed down. If not |
| 1910 | # specified, this is the active layer. (since: 3.1) |
| 1911 | # |
| 1912 | # @top: Same as @top-node, except that it is a file name rather than a |
| 1913 | # node name. This must be the exact filename string that was used |
| 1914 | # to open the node; other strings, even if addressing the same |
| 1915 | # file, are not accepted |
| 1916 | # |
| 1917 | # @backing-file: The backing file string to write into the overlay |
| 1918 | # image of 'top'. If 'top' does not have an overlay image, or if |
| 1919 | # 'top' is in use by a writer, specifying a backing file string is |
| 1920 | # an error. |
| 1921 | # |
| 1922 | # This filename is not validated. If a pathname string is such |
| 1923 | # that it cannot be resolved by QEMU, that means that subsequent |
| 1924 | # QMP or HMP commands must use node-names for the image in |
| 1925 | # question, as filename lookup methods will fail. |
| 1926 | # |
| 1927 | # If not specified, QEMU will automatically determine the backing |
| 1928 | # file string to use, or error out if there is no obvious choice. |
| 1929 | # Care should be taken when specifying the string, to specify a |
| 1930 | # valid filename or protocol. (Since 2.1) |
| 1931 | # |
| 1932 | # @backing-mask-protocol: If true, replace any protocol mentioned in |
| 1933 | # the 'backing file format' with 'raw', rather than storing the |
| 1934 | # protocol name as the backing format. Can be used even when no |
| 1935 | # image header will be updated (default false; since 9.0). |
| 1936 | # |
| 1937 | # @speed: the maximum speed, in bytes per second |
| 1938 | # |
| 1939 | # @on-error: the action to take on an error. 'ignore' means that the |
| 1940 | # request should be retried. (default: report; since: 5.0) |
| 1941 | # |
| 1942 | # @filter-node-name: the node name that should be assigned to the |
| 1943 | # filter driver that the commit job inserts into the graph above |
| 1944 | # @top. If this option is not given, a node name is |
| 1945 | # autogenerated. (Since: 2.9) |
| 1946 | # |
| 1947 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 1948 | # after it has finished its work, waiting for `job-finalize` |
| 1949 | # before making any block graph changes. When true, this job will |
| 1950 | # automatically perform its abort or commit actions. Defaults to |
| 1951 | # true. (Since 3.1) |
| 1952 | # |
| 1953 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 1954 | # after it has completely ceased all work, and awaits |
| 1955 | # `job-dismiss`. When true, this job will automatically disappear |
| 1956 | # without user intervention. Defaults to true. (Since 3.1) |
| 1957 | # |
| 1958 | # Features: |
| 1959 | # |
| 1960 | # @deprecated: Members @base and @top are deprecated. Use @base-node |
| 1961 | # and @top-node instead. |
| 1962 | # |
| 1963 | # Errors: |
| 1964 | # - If @device does not exist, DeviceNotFound |
| 1965 | # |
| 1966 | # Since: 1.3 |
| 1967 | # |
| 1968 | # .. qmp-example:: |
| 1969 | # |
| 1970 | # -> { "execute": "block-commit", |
| 1971 | # "arguments": { "device": "virtio0", |
| 1972 | # "top": "/tmp/snap1.qcow2" } } |
| 1973 | # <- { "return": {} } |
| 1974 | ## |
| 1975 | { 'command': 'block-commit', |
| 1976 | 'data': { '*job-id': 'str', 'device': 'str', '*base-node': 'str', |
| 1977 | '*base': { 'type': 'str', 'features': [ 'deprecated' ] }, |
| 1978 | '*top-node': 'str', |
| 1979 | '*top': { 'type': 'str', 'features': [ 'deprecated' ] }, |
| 1980 | '*backing-file': 'str', '*backing-mask-protocol': 'bool', |
| 1981 | '*speed': 'int', |
| 1982 | '*on-error': 'BlockdevOnError', |
| 1983 | '*filter-node-name': 'str', |
| 1984 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool' }, |
| 1985 | 'allow-preconfig': true } |
| 1986 | |
| 1987 | ## |
| 1988 | # @drive-backup: |
| 1989 | # |
| 1990 | # Start a point-in-time copy of a block device to a new destination. |
| 1991 | # The status of ongoing `drive-backup` operations can be checked with |
| 1992 | # `query-block-jobs` where the `BlockJobInfo`.type field has the value |
| 1993 | # 'backup'. The operation can be stopped before it has completed |
| 1994 | # using the `job-cancel` or `block-job-cancel` command. |
| 1995 | # |
| 1996 | # Features: |
| 1997 | # |
| 1998 | # @deprecated: This command is deprecated. Use `blockdev-backup` |
| 1999 | # instead. |
| 2000 | # |
| 2001 | # Errors: |
| 2002 | # - If @device is not a valid block device, GenericError |
| 2003 | # |
| 2004 | # Since: 1.6 |
| 2005 | # |
| 2006 | # .. qmp-example:: |
| 2007 | # |
| 2008 | # -> { "execute": "drive-backup", |
| 2009 | # "arguments": { "device": "drive0", |
| 2010 | # "sync": "full", |
| 2011 | # "target": "backup.img" } } |
| 2012 | # <- { "return": {} } |
| 2013 | ## |
| 2014 | { 'command': 'drive-backup', 'boxed': true, |
| 2015 | 'data': 'DriveBackup', 'features': ['deprecated'], |
| 2016 | 'allow-preconfig': true } |
| 2017 | |
| 2018 | ## |
| 2019 | # @blockdev-backup: |
| 2020 | # |
| 2021 | # Start a point-in-time copy of a block device to a new destination. |
| 2022 | # The status of ongoing `blockdev-backup` operations can be checked |
| 2023 | # with `query-block-jobs` where the `BlockJobInfo`.type field has the |
| 2024 | # value 'backup'. The operation can be stopped before it has |
| 2025 | # completed using the `job-cancel` or `block-job-cancel` command. |
| 2026 | # |
| 2027 | # Errors: |
| 2028 | # - If @device is not a valid block device, DeviceNotFound |
| 2029 | # |
| 2030 | # Since: 2.3 |
| 2031 | # |
| 2032 | # .. qmp-example:: |
| 2033 | # |
| 2034 | # -> { "execute": "blockdev-backup", |
| 2035 | # "arguments": { "device": "src-id", |
| 2036 | # "sync": "full", |
| 2037 | # "target": "tgt-id" } } |
| 2038 | # <- { "return": {} } |
| 2039 | ## |
| 2040 | { 'command': 'blockdev-backup', 'boxed': true, |
| 2041 | 'data': 'BlockdevBackup', |
| 2042 | 'allow-preconfig': true } |
| 2043 | |
| 2044 | ## |
| 2045 | # @query-named-block-nodes: |
| 2046 | # |
| 2047 | # Get the named block driver list |
| 2048 | # |
| 2049 | # @flat: Omit the nested data about backing image ("backing-image" |
| 2050 | # key) if true. Default is false (Since 5.0) |
| 2051 | # |
| 2052 | # Since: 2.0 |
| 2053 | # |
| 2054 | # .. qmp-example:: |
| 2055 | # |
| 2056 | # -> { "execute": "query-named-block-nodes" } |
| 2057 | # <- { "return": [ { "ro":false, |
| 2058 | # "drv":"qcow2", |
| 2059 | # "encrypted":false, |
| 2060 | # "file":"disks/test.qcow2", |
| 2061 | # "node-name": "my-node", |
| 2062 | # "backing_file_depth":1, |
| 2063 | # "detect_zeroes":"off", |
| 2064 | # "bps":1000000, |
| 2065 | # "bps_rd":0, |
| 2066 | # "bps_wr":0, |
| 2067 | # "iops":1000000, |
| 2068 | # "iops_rd":0, |
| 2069 | # "iops_wr":0, |
| 2070 | # "bps_max": 8000000, |
| 2071 | # "bps_rd_max": 0, |
| 2072 | # "bps_wr_max": 0, |
| 2073 | # "iops_max": 0, |
| 2074 | # "iops_rd_max": 0, |
| 2075 | # "iops_wr_max": 0, |
| 2076 | # "iops_size": 0, |
| 2077 | # "write_threshold": 0, |
| 2078 | # "image":{ |
| 2079 | # "filename":"disks/test.qcow2", |
| 2080 | # "format":"qcow2", |
| 2081 | # "virtual-size":2048000, |
| 2082 | # "backing_file":"base.qcow2", |
| 2083 | # "full-backing-filename":"disks/base.qcow2", |
| 2084 | # "backing-filename-format":"qcow2", |
| 2085 | # "snapshots":[ |
| 2086 | # { |
| 2087 | # "id": "1", |
| 2088 | # "name": "snapshot1", |
| 2089 | # "vm-state-size": 0, |
| 2090 | # "date-sec": 10000200, |
| 2091 | # "date-nsec": 12, |
| 2092 | # "vm-clock-sec": 206, |
| 2093 | # "vm-clock-nsec": 30 |
| 2094 | # } |
| 2095 | # ], |
| 2096 | # "backing-image":{ |
| 2097 | # "filename":"disks/base.qcow2", |
| 2098 | # "format":"qcow2", |
| 2099 | # "virtual-size":2048000 |
| 2100 | # } |
| 2101 | # } } ] } |
| 2102 | ## |
| 2103 | { 'command': 'query-named-block-nodes', |
| 2104 | 'returns': [ 'BlockDeviceInfo' ], |
| 2105 | 'data': { '*flat': 'bool' }, |
| 2106 | 'allow-preconfig': true } |
| 2107 | |
| 2108 | ## |
| 2109 | # @XDbgBlockGraphNodeType: |
| 2110 | # |
| 2111 | # @block-backend: corresponds to BlockBackend |
| 2112 | # |
| 2113 | # @block-job: corresponds to BlockJob |
| 2114 | # |
| 2115 | # @block-driver: corresponds to BlockDriverState |
| 2116 | # |
| 2117 | # Since: 4.0 |
| 2118 | ## |
| 2119 | { 'enum': 'XDbgBlockGraphNodeType', |
| 2120 | 'data': [ 'block-backend', 'block-job', 'block-driver' ] } |
| 2121 | |
| 2122 | ## |
| 2123 | # @XDbgBlockGraphNode: |
| 2124 | # |
| 2125 | # @id: Block graph node identifier. This @id is generated only for |
| 2126 | # `x-debug-query-block-graph` and does not relate to any other |
| 2127 | # identifiers in QEMU. |
| 2128 | # |
| 2129 | # @type: Type of graph node. Can be one of block-backend, block-job |
| 2130 | # or block-driver-state. |
| 2131 | # |
| 2132 | # @name: Human readable name of the node. Corresponds to node-name |
| 2133 | # for block-driver-state nodes; is not guaranteed to be unique in |
| 2134 | # the whole graph (with block-jobs and block-backends). |
| 2135 | # |
| 2136 | # Since: 4.0 |
| 2137 | ## |
| 2138 | { 'struct': 'XDbgBlockGraphNode', |
| 2139 | 'data': { 'id': 'uint64', 'type': 'XDbgBlockGraphNodeType', 'name': 'str' } } |
| 2140 | |
| 2141 | ## |
| 2142 | # @BlockPermission: |
| 2143 | # |
| 2144 | # Enum of base block permissions. |
| 2145 | # |
| 2146 | # @consistent-read: A user that has the "permission" of consistent |
| 2147 | # reads is guaranteed that their view of the contents of the block |
| 2148 | # device is complete and self-consistent, representing the |
| 2149 | # contents of a disk at a specific point. For most block devices |
| 2150 | # (including their backing files) this is true, but the property |
| 2151 | # cannot be maintained in a few situations like for intermediate |
| 2152 | # nodes of a commit block job. |
| 2153 | # |
| 2154 | # @write: This permission is required to change the visible disk |
| 2155 | # contents. |
| 2156 | # |
| 2157 | # @write-unchanged: This permission (which is weaker than |
| 2158 | # BLK_PERM_WRITE) is both enough and required for writes to the |
| 2159 | # block node when the caller promises that the visible disk |
| 2160 | # content doesn't change. As the BLK_PERM_WRITE permission is |
| 2161 | # strictly stronger, either is sufficient to perform an unchanging |
| 2162 | # write. |
| 2163 | # |
| 2164 | # @resize: This permission is required to change the size of a block |
| 2165 | # node. |
| 2166 | # |
| 2167 | # Since: 4.0 |
| 2168 | ## |
| 2169 | { 'enum': 'BlockPermission', |
| 2170 | 'data': [ 'consistent-read', 'write', 'write-unchanged', 'resize' ] } |
| 2171 | |
| 2172 | ## |
| 2173 | # @XDbgBlockGraphEdge: |
| 2174 | # |
| 2175 | # Block Graph edge description for `x-debug-query-block-graph`. |
| 2176 | # |
| 2177 | # @parent: parent id |
| 2178 | # |
| 2179 | # @child: child id |
| 2180 | # |
| 2181 | # @name: name of the relation (examples are 'file' and 'backing') |
| 2182 | # |
| 2183 | # @perm: granted permissions for the parent operating on the child |
| 2184 | # |
| 2185 | # @shared-perm: permissions that can still be granted to other users |
| 2186 | # of the child while it is still attached to this parent |
| 2187 | # |
| 2188 | # Since: 4.0 |
| 2189 | ## |
| 2190 | { 'struct': 'XDbgBlockGraphEdge', |
| 2191 | 'data': { 'parent': 'uint64', 'child': 'uint64', |
| 2192 | 'name': 'str', 'perm': [ 'BlockPermission' ], |
| 2193 | 'shared-perm': [ 'BlockPermission' ] } } |
| 2194 | |
| 2195 | ## |
| 2196 | # @XDbgBlockGraph: |
| 2197 | # |
| 2198 | # Block Graph - list of nodes and list of edges. |
| 2199 | # |
| 2200 | # Since: 4.0 |
| 2201 | ## |
| 2202 | { 'struct': 'XDbgBlockGraph', |
| 2203 | 'data': { 'nodes': ['XDbgBlockGraphNode'], 'edges': ['XDbgBlockGraphEdge'] } } |
| 2204 | |
| 2205 | ## |
| 2206 | # @x-debug-query-block-graph: |
| 2207 | # |
| 2208 | # Get the block graph. |
| 2209 | # |
| 2210 | # Features: |
| 2211 | # |
| 2212 | # @unstable: This command is meant for debugging. |
| 2213 | # |
| 2214 | # Since: 4.0 |
| 2215 | ## |
| 2216 | { 'command': 'x-debug-query-block-graph', 'returns': 'XDbgBlockGraph', |
| 2217 | 'features': [ 'unstable' ], |
| 2218 | 'allow-preconfig': true } |
| 2219 | |
| 2220 | ## |
| 2221 | # @drive-mirror: |
| 2222 | # |
| 2223 | # Start mirroring a block device's writes to a new destination. |
| 2224 | # target specifies the target of the new image. If the file exists, |
| 2225 | # or if it is a device, it will be used as the new destination for |
| 2226 | # writes. If it does not exist, a new file will be created. @format |
| 2227 | # specifies the format of the mirror image, default is to probe if |
| 2228 | # mode='existing', else the format of the source. |
| 2229 | # |
| 2230 | # Errors: |
| 2231 | # - If @device is not a valid block device, GenericError |
| 2232 | # |
| 2233 | # Since: 1.3 |
| 2234 | # |
| 2235 | # .. qmp-example:: |
| 2236 | # |
| 2237 | # -> { "execute": "drive-mirror", |
| 2238 | # "arguments": { "device": "ide-hd0", |
| 2239 | # "target": "/some/place/my-image", |
| 2240 | # "sync": "full", |
| 2241 | # "format": "qcow2" } } |
| 2242 | # <- { "return": {} } |
| 2243 | ## |
| 2244 | { 'command': 'drive-mirror', 'boxed': true, |
| 2245 | 'data': 'DriveMirror', |
| 2246 | 'allow-preconfig': true } |
| 2247 | |
| 2248 | ## |
| 2249 | # @DriveMirror: |
| 2250 | # |
| 2251 | # A set of parameters describing drive mirror setup. |
| 2252 | # |
| 2253 | # @job-id: identifier for the newly-created block job. If omitted, |
| 2254 | # the device name will be used. (Since 2.7) |
| 2255 | # |
| 2256 | # @device: the device name or node-name of a root node whose writes |
| 2257 | # should be mirrored. |
| 2258 | # |
| 2259 | # @target: the target of the new image. If the file exists, or if it |
| 2260 | # is a device, the existing file/device will be used as the new |
| 2261 | # destination. If it does not exist, a new file will be created. |
| 2262 | # |
| 2263 | # @format: the format of the new destination, default is to probe if |
| 2264 | # @mode is 'existing', else the format of the source |
| 2265 | # |
| 2266 | # @node-name: the new block driver state node name in the graph |
| 2267 | # (Since 2.1) |
| 2268 | # |
| 2269 | # @replaces: with sync=full graph node name to be replaced by the new |
| 2270 | # image when a whole image copy is done. This can be used to |
| 2271 | # repair broken Quorum files. By default, @device is replaced, |
| 2272 | # although implicitly created filters on it are kept. (Since 2.1) |
| 2273 | # |
| 2274 | # @mode: whether and how QEMU should create a new image, default is |
| 2275 | # 'absolute-paths'. |
| 2276 | # |
| 2277 | # @speed: the maximum speed, in bytes per second |
| 2278 | # |
| 2279 | # @sync: what parts of the disk image should be copied to the |
| 2280 | # destination (all the disk, only the sectors allocated in the |
| 2281 | # topmost image, or only new I/O). |
| 2282 | # |
| 2283 | # @granularity: granularity of the dirty bitmap, default is 64K if the |
| 2284 | # image format doesn't have clusters, 4K if the clusters are |
| 2285 | # smaller than that, else the cluster size. Must be a power of 2 |
| 2286 | # between 512 and 64M (since 1.4). |
| 2287 | # |
| 2288 | # @buf-size: maximum amount of data in flight from source to target |
| 2289 | # (since 1.4). |
| 2290 | # |
| 2291 | # @on-source-error: the action to take on an error on the source, |
| 2292 | # default 'report'. 'stop' and 'enospc' can only be used if the |
| 2293 | # block device supports io-status (see `BlockInfo`). |
| 2294 | # |
| 2295 | # @on-target-error: the action to take on an error on the target, |
| 2296 | # default 'report' (no limitations, since this applies to a |
| 2297 | # different block device than @device). |
| 2298 | # |
| 2299 | # @unmap: Whether to try to unmap target sectors where source has only |
| 2300 | # zero. If true, and target unallocated sectors will read as |
| 2301 | # zero, target image sectors will be unmapped; otherwise, zeroes |
| 2302 | # will be written. Both will result in identical contents. |
| 2303 | # Default is true. (Since 2.4) |
| 2304 | # |
| 2305 | # @copy-mode: when to copy data to the destination; defaults to |
| 2306 | # 'background' (Since: 3.0) |
| 2307 | # |
| 2308 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 2309 | # after it has finished its work, waiting for `job-finalize` |
| 2310 | # before making any block graph changes. When true, this job will |
| 2311 | # automatically perform its abort or commit actions. Defaults to |
| 2312 | # true. (Since 3.1) |
| 2313 | # |
| 2314 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 2315 | # after it has completely ceased all work, and awaits |
| 2316 | # `job-dismiss`. When true, this job will automatically disappear |
| 2317 | # without user intervention. Defaults to true. (Since 3.1) |
| 2318 | # |
| 2319 | # Since: 1.3 |
| 2320 | ## |
| 2321 | { 'struct': 'DriveMirror', |
| 2322 | 'data': { '*job-id': 'str', 'device': 'str', 'target': 'str', |
| 2323 | '*format': 'str', '*node-name': 'str', '*replaces': 'str', |
| 2324 | 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', |
| 2325 | '*speed': 'int', '*granularity': 'uint32', |
| 2326 | '*buf-size': 'int', '*on-source-error': 'BlockdevOnError', |
| 2327 | '*on-target-error': 'BlockdevOnError', |
| 2328 | '*unmap': 'bool', '*copy-mode': 'MirrorCopyMode', |
| 2329 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool' } } |
| 2330 | |
| 2331 | ## |
| 2332 | # @BlockDirtyBitmap: |
| 2333 | # |
| 2334 | # @node: name of device/node which the bitmap is tracking |
| 2335 | # |
| 2336 | # @name: name of the dirty bitmap |
| 2337 | # |
| 2338 | # Since: 2.4 |
| 2339 | ## |
| 2340 | { 'struct': 'BlockDirtyBitmap', |
| 2341 | 'data': { 'node': 'str', 'name': 'str' } } |
| 2342 | |
| 2343 | ## |
| 2344 | # @BlockDirtyBitmapAdd: |
| 2345 | # |
| 2346 | # @node: name of device/node which the bitmap is tracking |
| 2347 | # |
| 2348 | # @name: name of the dirty bitmap (must be less than 1024 bytes) |
| 2349 | # |
| 2350 | # @granularity: the bitmap granularity, default is 64k for |
| 2351 | # `block-dirty-bitmap-add` |
| 2352 | # |
| 2353 | # @persistent: the bitmap is persistent, i.e. it will be saved to the |
| 2354 | # corresponding block device image file on its close. For now |
| 2355 | # only Qcow2 disks support persistent bitmaps. Default is false |
| 2356 | # for `block-dirty-bitmap-add`. This fails if the node is |
| 2357 | # read-only or inactive, since such a bitmap could never be |
| 2358 | # stored. (Since: 2.10) |
| 2359 | # |
| 2360 | # @disabled: the bitmap is created in the disabled state, which means |
| 2361 | # that it will not track drive changes. The bitmap may be enabled |
| 2362 | # with `block-dirty-bitmap-enable`. Default is false. |
| 2363 | # (Since: 4.0) |
| 2364 | # |
| 2365 | # Since: 2.4 |
| 2366 | ## |
| 2367 | { 'struct': 'BlockDirtyBitmapAdd', |
| 2368 | 'data': { 'node': 'str', 'name': 'str', '*granularity': 'uint32', |
| 2369 | '*persistent': 'bool', '*disabled': 'bool' } } |
| 2370 | |
| 2371 | ## |
| 2372 | # @BlockDirtyBitmapOrStr: |
| 2373 | # |
| 2374 | # @local: name of the bitmap, attached to the same node as target |
| 2375 | # bitmap. |
| 2376 | # |
| 2377 | # @external: bitmap with specified node |
| 2378 | # |
| 2379 | # Since: 4.1 |
| 2380 | ## |
| 2381 | { 'alternate': 'BlockDirtyBitmapOrStr', |
| 2382 | 'data': { 'local': 'str', |
| 2383 | 'external': 'BlockDirtyBitmap' } } |
| 2384 | |
| 2385 | ## |
| 2386 | # @BlockDirtyBitmapMerge: |
| 2387 | # |
| 2388 | # @node: name of device/node which the @target bitmap is tracking |
| 2389 | # |
| 2390 | # @target: name of the destination dirty bitmap |
| 2391 | # |
| 2392 | # @bitmaps: name(s) of the source dirty bitmap(s) at @node and/or |
| 2393 | # fully specified `BlockDirtyBitmap` elements. The latter are |
| 2394 | # supported since 4.1. |
| 2395 | # |
| 2396 | # Since: 4.0 |
| 2397 | ## |
| 2398 | { 'struct': 'BlockDirtyBitmapMerge', |
| 2399 | 'data': { 'node': 'str', 'target': 'str', |
| 2400 | 'bitmaps': ['BlockDirtyBitmapOrStr'] } } |
| 2401 | |
| 2402 | ## |
| 2403 | # @block-dirty-bitmap-add: |
| 2404 | # |
| 2405 | # Create a dirty bitmap with a name on the node, and start tracking |
| 2406 | # the writes. |
| 2407 | # |
| 2408 | # Errors: |
| 2409 | # - If @node is not a valid block device or node, DeviceNotFound |
| 2410 | # - If @name is already taken, GenericError |
| 2411 | # |
| 2412 | # Since: 2.4 |
| 2413 | # |
| 2414 | # .. qmp-example:: |
| 2415 | # |
| 2416 | # -> { "execute": "block-dirty-bitmap-add", |
| 2417 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2418 | # <- { "return": {} } |
| 2419 | ## |
| 2420 | { 'command': 'block-dirty-bitmap-add', |
| 2421 | 'data': 'BlockDirtyBitmapAdd', |
| 2422 | 'allow-preconfig': true } |
| 2423 | |
| 2424 | ## |
| 2425 | # @block-dirty-bitmap-remove: |
| 2426 | # |
| 2427 | # Stop write tracking and remove the dirty bitmap that was created |
| 2428 | # with `block-dirty-bitmap-add`. If the bitmap is persistent, remove |
| 2429 | # it from its storage too. |
| 2430 | # |
| 2431 | # Errors: |
| 2432 | # - If @node is not a valid block device or node, DeviceNotFound |
| 2433 | # - If @name is not found, GenericError |
| 2434 | # - if @name is frozen by an operation, GenericError |
| 2435 | # |
| 2436 | # Since: 2.4 |
| 2437 | # |
| 2438 | # .. qmp-example:: |
| 2439 | # |
| 2440 | # -> { "execute": "block-dirty-bitmap-remove", |
| 2441 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2442 | # <- { "return": {} } |
| 2443 | ## |
| 2444 | { 'command': 'block-dirty-bitmap-remove', |
| 2445 | 'data': 'BlockDirtyBitmap', |
| 2446 | 'allow-preconfig': true } |
| 2447 | |
| 2448 | ## |
| 2449 | # @block-dirty-bitmap-clear: |
| 2450 | # |
| 2451 | # Clear (reset) a dirty bitmap on the device, so that an incremental |
| 2452 | # backup from this point in time forward will only backup clusters |
| 2453 | # modified after this clear operation. |
| 2454 | # |
| 2455 | # Errors: |
| 2456 | # - If @node is not a valid block device, DeviceNotFound |
| 2457 | # - If @name is not found, GenericError |
| 2458 | # |
| 2459 | # Since: 2.4 |
| 2460 | # |
| 2461 | # .. qmp-example:: |
| 2462 | # |
| 2463 | # -> { "execute": "block-dirty-bitmap-clear", |
| 2464 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2465 | # <- { "return": {} } |
| 2466 | ## |
| 2467 | { 'command': 'block-dirty-bitmap-clear', |
| 2468 | 'data': 'BlockDirtyBitmap', |
| 2469 | 'allow-preconfig': true } |
| 2470 | |
| 2471 | ## |
| 2472 | # @block-dirty-bitmap-enable: |
| 2473 | # |
| 2474 | # Enables a dirty bitmap so that it will begin tracking disk changes. |
| 2475 | # |
| 2476 | # Errors: |
| 2477 | # - If @node is not a valid block device, DeviceNotFound |
| 2478 | # - If @name is not found, GenericError |
| 2479 | # |
| 2480 | # Since: 4.0 |
| 2481 | # |
| 2482 | # .. qmp-example:: |
| 2483 | # |
| 2484 | # -> { "execute": "block-dirty-bitmap-enable", |
| 2485 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2486 | # <- { "return": {} } |
| 2487 | ## |
| 2488 | { 'command': 'block-dirty-bitmap-enable', |
| 2489 | 'data': 'BlockDirtyBitmap', |
| 2490 | 'allow-preconfig': true } |
| 2491 | |
| 2492 | ## |
| 2493 | # @block-dirty-bitmap-disable: |
| 2494 | # |
| 2495 | # Disables a dirty bitmap so that it will stop tracking disk changes. |
| 2496 | # |
| 2497 | # Errors: |
| 2498 | # - If @node is not a valid block device, DeviceNotFound |
| 2499 | # - If @name is not found, GenericError |
| 2500 | # |
| 2501 | # Since: 4.0 |
| 2502 | # |
| 2503 | # .. qmp-example:: |
| 2504 | # |
| 2505 | # -> { "execute": "block-dirty-bitmap-disable", |
| 2506 | # "arguments": { "node": "drive0", "name": "bitmap0" } } |
| 2507 | # <- { "return": {} } |
| 2508 | ## |
| 2509 | { 'command': 'block-dirty-bitmap-disable', |
| 2510 | 'data': 'BlockDirtyBitmap', |
| 2511 | 'allow-preconfig': true } |
| 2512 | |
| 2513 | ## |
| 2514 | # @block-dirty-bitmap-merge: |
| 2515 | # |
| 2516 | # Merge dirty bitmaps listed in @bitmaps to the @target dirty bitmap. |
| 2517 | # Dirty bitmaps in @bitmaps will be unchanged, except if it also |
| 2518 | # appears as the @target bitmap. Any bits already set in @target will |
| 2519 | # still be set after the merge, i.e., this operation does not clear |
| 2520 | # the target. On error, @target is unchanged. |
| 2521 | # |
| 2522 | # The resulting bitmap will count as dirty any clusters that were |
| 2523 | # dirty in any of the source bitmaps. This can be used to achieve |
| 2524 | # backup checkpoints, or in simpler usages, to copy bitmaps. |
| 2525 | # |
| 2526 | # Errors: |
| 2527 | # - If @node is not a valid block device, DeviceNotFound |
| 2528 | # - If any bitmap in @bitmaps or @target is not found, |
| 2529 | # GenericError |
| 2530 | # - If any of the bitmaps have different sizes or granularities, |
| 2531 | # GenericError |
| 2532 | # |
| 2533 | # Since: 4.0 |
| 2534 | # |
| 2535 | # .. qmp-example:: |
| 2536 | # |
| 2537 | # -> { "execute": "block-dirty-bitmap-merge", |
| 2538 | # "arguments": { "node": "drive0", "target": "bitmap0", |
| 2539 | # "bitmaps": ["bitmap1"] } } |
| 2540 | # <- { "return": {} } |
| 2541 | ## |
| 2542 | { 'command': 'block-dirty-bitmap-merge', |
| 2543 | 'data': 'BlockDirtyBitmapMerge', |
| 2544 | 'allow-preconfig': true } |
| 2545 | |
| 2546 | ## |
| 2547 | # @BlockDirtyBitmapSha256: |
| 2548 | # |
| 2549 | # SHA256 hash of dirty bitmap data |
| 2550 | # |
| 2551 | # @sha256: ASCII representation of SHA256 bitmap hash |
| 2552 | # |
| 2553 | # Since: 2.10 |
| 2554 | ## |
| 2555 | { 'struct': 'BlockDirtyBitmapSha256', |
| 2556 | 'data': {'sha256': 'str'} } |
| 2557 | |
| 2558 | ## |
| 2559 | # @x-debug-block-dirty-bitmap-sha256: |
| 2560 | # |
| 2561 | # Get bitmap SHA256. |
| 2562 | # |
| 2563 | # Features: |
| 2564 | # |
| 2565 | # @unstable: This command is meant for debugging. |
| 2566 | # |
| 2567 | # Errors: |
| 2568 | # - If @node is not a valid block device, DeviceNotFound |
| 2569 | # - If @name is not found or if hashing has failed, GenericError |
| 2570 | # |
| 2571 | # Since: 2.10 |
| 2572 | ## |
| 2573 | { 'command': 'x-debug-block-dirty-bitmap-sha256', |
| 2574 | 'data': 'BlockDirtyBitmap', 'returns': 'BlockDirtyBitmapSha256', |
| 2575 | 'features': [ 'unstable' ], |
| 2576 | 'allow-preconfig': true } |
| 2577 | |
| 2578 | ## |
| 2579 | # @blockdev-mirror: |
| 2580 | # |
| 2581 | # Start mirroring a block device's writes to a new destination. |
| 2582 | # |
| 2583 | # @job-id: identifier for the newly-created block job. If omitted, |
| 2584 | # the device name will be used. (Since 2.7) |
| 2585 | # |
| 2586 | # @device: The device name or node-name of a root node whose writes |
| 2587 | # should be mirrored. |
| 2588 | # |
| 2589 | # @target: the id or node-name of the block device to mirror to. This |
| 2590 | # mustn't be attached to guest. |
| 2591 | # |
| 2592 | # @replaces: with sync=full graph node name to be replaced by the new |
| 2593 | # image when a whole image copy is done. This can be used to |
| 2594 | # repair broken Quorum files. By default, @device is replaced, |
| 2595 | # although implicitly created filters on it are kept. |
| 2596 | # |
| 2597 | # @speed: the maximum speed, in bytes per second |
| 2598 | # |
| 2599 | # @sync: what parts of the disk image should be copied to the |
| 2600 | # destination (all the disk, only the sectors allocated in the |
| 2601 | # topmost image, or only new I/O). |
| 2602 | # |
| 2603 | # @granularity: granularity of the dirty bitmap, default is 64K if the |
| 2604 | # image format doesn't have clusters, 4K if the clusters are |
| 2605 | # smaller than that, else the cluster size. Must be a power of 2 |
| 2606 | # between 512 and 64M |
| 2607 | # |
| 2608 | # @buf-size: maximum amount of data in flight from source to target |
| 2609 | # |
| 2610 | # @on-source-error: the action to take on an error on the source, |
| 2611 | # default 'report'. 'stop' and 'enospc' can only be used if the |
| 2612 | # block device supports io-status (see `BlockInfo`). |
| 2613 | # |
| 2614 | # @on-target-error: the action to take on an error on the target, |
| 2615 | # default 'report' (no limitations, since this applies to a |
| 2616 | # different block device than @device). |
| 2617 | # |
| 2618 | # @filter-node-name: the node name that should be assigned to the |
| 2619 | # filter driver that the mirror job inserts into the graph above |
| 2620 | # @device. If this option is not given, a node name is |
| 2621 | # autogenerated. (Since: 2.9) |
| 2622 | # |
| 2623 | # @copy-mode: when to copy data to the destination; defaults to |
| 2624 | # 'background' (Since: 3.0) |
| 2625 | # |
| 2626 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 2627 | # after it has finished its work, waiting for `job-finalize` |
| 2628 | # before making any block graph changes. When true, this job will |
| 2629 | # automatically perform its abort or commit actions. Defaults to |
| 2630 | # true. (Since 3.1) |
| 2631 | # |
| 2632 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 2633 | # after it has completely ceased all work, and awaits |
| 2634 | # `job-dismiss`. When true, this job will automatically disappear |
| 2635 | # without user intervention. Defaults to true. (Since 3.1) |
| 2636 | # |
| 2637 | # @target-is-zero: Assume the destination reads as all zeroes before |
| 2638 | # the mirror started. Setting this to true can speed up the |
| 2639 | # mirror. Setting this to true when the destination is not |
| 2640 | # actually all zero can corrupt the destination. (Since 10.1) |
| 2641 | # |
| 2642 | # Since: 2.6 |
| 2643 | # |
| 2644 | # .. qmp-example:: |
| 2645 | # |
| 2646 | # -> { "execute": "blockdev-mirror", |
| 2647 | # "arguments": { "device": "ide-hd0", |
| 2648 | # "target": "target0", |
| 2649 | # "sync": "full" } } |
| 2650 | # <- { "return": {} } |
| 2651 | ## |
| 2652 | { 'command': 'blockdev-mirror', |
| 2653 | 'data': { '*job-id': 'str', 'device': 'str', 'target': 'str', |
| 2654 | '*replaces': 'str', |
| 2655 | 'sync': 'MirrorSyncMode', |
| 2656 | '*speed': 'int', '*granularity': 'uint32', |
| 2657 | '*buf-size': 'int', '*on-source-error': 'BlockdevOnError', |
| 2658 | '*on-target-error': 'BlockdevOnError', |
| 2659 | '*filter-node-name': 'str', |
| 2660 | '*copy-mode': 'MirrorCopyMode', |
| 2661 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool', |
| 2662 | '*target-is-zero': 'bool'}, |
| 2663 | 'allow-preconfig': true } |
| 2664 | |
| 2665 | ## |
| 2666 | # @BlockIOThrottle: |
| 2667 | # |
| 2668 | # A set of parameters describing block throttling. |
| 2669 | # |
| 2670 | # @device: Block device name |
| 2671 | # |
| 2672 | # @id: The name or QOM path of the guest device (since: 2.8) |
| 2673 | # |
| 2674 | # @bps: total throughput limit in bytes per second |
| 2675 | # |
| 2676 | # @bps_rd: read throughput limit in bytes per second |
| 2677 | # |
| 2678 | # @bps_wr: write throughput limit in bytes per second |
| 2679 | # |
| 2680 | # @iops: total I/O operations per second |
| 2681 | # |
| 2682 | # @iops_rd: read I/O operations per second |
| 2683 | # |
| 2684 | # @iops_wr: write I/O operations per second |
| 2685 | # |
| 2686 | # @bps_max: total throughput limit during bursts, in bytes (Since 1.7) |
| 2687 | # |
| 2688 | # @bps_rd_max: read throughput limit during bursts, in bytes |
| 2689 | # (Since 1.7) |
| 2690 | # |
| 2691 | # @bps_wr_max: write throughput limit during bursts, in bytes |
| 2692 | # (Since 1.7) |
| 2693 | # |
| 2694 | # @iops_max: total I/O operations per second during bursts, in bytes |
| 2695 | # (Since 1.7) |
| 2696 | # |
| 2697 | # @iops_rd_max: read I/O operations per second during bursts, in bytes |
| 2698 | # (Since 1.7) |
| 2699 | # |
| 2700 | # @iops_wr_max: write I/O operations per second during bursts, in |
| 2701 | # bytes (Since 1.7) |
| 2702 | # |
| 2703 | # @bps_max_length: maximum length of the @bps_max burst period, in |
| 2704 | # seconds. It must only be set if @bps_max is set as well. |
| 2705 | # Defaults to 1. (Since 2.6) |
| 2706 | # |
| 2707 | # @bps_rd_max_length: maximum length of the @bps_rd_max burst period, |
| 2708 | # in seconds. It must only be set if @bps_rd_max is set as well. |
| 2709 | # Defaults to 1. (Since 2.6) |
| 2710 | # |
| 2711 | # @bps_wr_max_length: maximum length of the @bps_wr_max burst period, |
| 2712 | # in seconds. It must only be set if @bps_wr_max is set as well. |
| 2713 | # Defaults to 1. (Since 2.6) |
| 2714 | # |
| 2715 | # @iops_max_length: maximum length of the @iops burst period, in |
| 2716 | # seconds. It must only be set if @iops_max is set as well. |
| 2717 | # Defaults to 1. (Since 2.6) |
| 2718 | # |
| 2719 | # @iops_rd_max_length: maximum length of the @iops_rd_max burst |
| 2720 | # period, in seconds. It must only be set if @iops_rd_max is set |
| 2721 | # as well. Defaults to 1. (Since 2.6) |
| 2722 | # |
| 2723 | # @iops_wr_max_length: maximum length of the @iops_wr_max burst |
| 2724 | # period, in seconds. It must only be set if @iops_wr_max is set |
| 2725 | # as well. Defaults to 1. (Since 2.6) |
| 2726 | # |
| 2727 | # @iops_size: an I/O size in bytes (Since 1.7) |
| 2728 | # |
| 2729 | # @group: throttle group name (Since 2.4) |
| 2730 | # |
| 2731 | # Features: |
| 2732 | # |
| 2733 | # @deprecated: Member @device is deprecated. Use @id instead. |
| 2734 | # |
| 2735 | # Since: 1.1 |
| 2736 | ## |
| 2737 | { 'struct': 'BlockIOThrottle', |
| 2738 | 'data': { '*device': { 'type': 'str', 'features': [ 'deprecated' ] }, |
| 2739 | '*id': 'str', 'bps': 'int', 'bps_rd': 'int', |
| 2740 | 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int', |
| 2741 | '*bps_max': 'int', '*bps_rd_max': 'int', |
| 2742 | '*bps_wr_max': 'int', '*iops_max': 'int', |
| 2743 | '*iops_rd_max': 'int', '*iops_wr_max': 'int', |
| 2744 | '*bps_max_length': 'int', '*bps_rd_max_length': 'int', |
| 2745 | '*bps_wr_max_length': 'int', '*iops_max_length': 'int', |
| 2746 | '*iops_rd_max_length': 'int', '*iops_wr_max_length': 'int', |
| 2747 | '*iops_size': 'int', '*group': 'str' } } |
| 2748 | |
| 2749 | ## |
| 2750 | # @ThrottleLimits: |
| 2751 | # |
| 2752 | # Limit parameters for throttling. Since some limit combinations are |
| 2753 | # illegal, limits should always be set in one transaction. All fields |
| 2754 | # are optional. When setting limits, if a field is missing the |
| 2755 | # current value is not changed. |
| 2756 | # |
| 2757 | # @iops-total: limit total I/O operations per second |
| 2758 | # |
| 2759 | # @iops-total-max: I/O operations burst |
| 2760 | # |
| 2761 | # @iops-total-max-length: length of the iops-total-max burst period, |
| 2762 | # in seconds. It must only be set if @iops-total-max is set as |
| 2763 | # well. |
| 2764 | # |
| 2765 | # @iops-read: limit read operations per second |
| 2766 | # |
| 2767 | # @iops-read-max: I/O operations read burst |
| 2768 | # |
| 2769 | # @iops-read-max-length: length of the iops-read-max burst period, in |
| 2770 | # seconds. It must only be set if @iops-read-max is set as well. |
| 2771 | # |
| 2772 | # @iops-write: limit write operations per second |
| 2773 | # |
| 2774 | # @iops-write-max: I/O operations write burst |
| 2775 | # |
| 2776 | # @iops-write-max-length: length of the iops-write-max burst period, |
| 2777 | # in seconds. It must only be set if @iops-write-max is set as |
| 2778 | # well. |
| 2779 | # |
| 2780 | # @bps-total: limit total bytes per second |
| 2781 | # |
| 2782 | # @bps-total-max: total bytes burst |
| 2783 | # |
| 2784 | # @bps-total-max-length: length of the bps-total-max burst period, in |
| 2785 | # seconds. It must only be set if @bps-total-max is set as well. |
| 2786 | # |
| 2787 | # @bps-read: limit read bytes per second |
| 2788 | # |
| 2789 | # @bps-read-max: total bytes read burst |
| 2790 | # |
| 2791 | # @bps-read-max-length: length of the bps-read-max burst period, in |
| 2792 | # seconds. It must only be set if @bps-read-max is set as well. |
| 2793 | # |
| 2794 | # @bps-write: limit write bytes per second |
| 2795 | # |
| 2796 | # @bps-write-max: total bytes write burst |
| 2797 | # |
| 2798 | # @bps-write-max-length: length of the bps-write-max burst period, in |
| 2799 | # seconds. It must only be set if @bps-write-max is set as well. |
| 2800 | # |
| 2801 | # @iops-size: when limiting by iops max size of an I/O in bytes |
| 2802 | # |
| 2803 | # Since: 2.11 |
| 2804 | ## |
| 2805 | { 'struct': 'ThrottleLimits', |
| 2806 | 'data': { '*iops-total' : 'int', '*iops-total-max' : 'int', |
| 2807 | '*iops-total-max-length' : 'int', '*iops-read' : 'int', |
| 2808 | '*iops-read-max' : 'int', '*iops-read-max-length' : 'int', |
| 2809 | '*iops-write' : 'int', '*iops-write-max' : 'int', |
| 2810 | '*iops-write-max-length' : 'int', '*bps-total' : 'int', |
| 2811 | '*bps-total-max' : 'int', '*bps-total-max-length' : 'int', |
| 2812 | '*bps-read' : 'int', '*bps-read-max' : 'int', |
| 2813 | '*bps-read-max-length' : 'int', '*bps-write' : 'int', |
| 2814 | '*bps-write-max' : 'int', '*bps-write-max-length' : 'int', |
| 2815 | '*iops-size' : 'int' } } |
| 2816 | |
| 2817 | ## |
| 2818 | # @ThrottleGroupProperties: |
| 2819 | # |
| 2820 | # Properties for throttle-group objects. |
| 2821 | # |
| 2822 | # @limits: limits to apply for this throttle group |
| 2823 | # |
| 2824 | # Features: |
| 2825 | # |
| 2826 | # @unstable: All members starting with x- are aliases for the same key |
| 2827 | # without x- in the @limits object. This is not a stable |
| 2828 | # interface and may be removed or changed incompatibly in the |
| 2829 | # future. Use @limits for a supported stable interface. |
| 2830 | # |
| 2831 | # Since: 2.11 |
| 2832 | ## |
| 2833 | { 'struct': 'ThrottleGroupProperties', |
| 2834 | 'data': { '*limits': 'ThrottleLimits', |
| 2835 | '*x-iops-total': { 'type': 'int', |
| 2836 | 'features': [ 'unstable' ] }, |
| 2837 | '*x-iops-total-max': { 'type': 'int', |
| 2838 | 'features': [ 'unstable' ] }, |
| 2839 | '*x-iops-total-max-length': { 'type': 'int', |
| 2840 | 'features': [ 'unstable' ] }, |
| 2841 | '*x-iops-read': { 'type': 'int', |
| 2842 | 'features': [ 'unstable' ] }, |
| 2843 | '*x-iops-read-max': { 'type': 'int', |
| 2844 | 'features': [ 'unstable' ] }, |
| 2845 | '*x-iops-read-max-length': { 'type': 'int', |
| 2846 | 'features': [ 'unstable' ] }, |
| 2847 | '*x-iops-write': { 'type': 'int', |
| 2848 | 'features': [ 'unstable' ] }, |
| 2849 | '*x-iops-write-max': { 'type': 'int', |
| 2850 | 'features': [ 'unstable' ] }, |
| 2851 | '*x-iops-write-max-length': { 'type': 'int', |
| 2852 | 'features': [ 'unstable' ] }, |
| 2853 | '*x-bps-total': { 'type': 'int', |
| 2854 | 'features': [ 'unstable' ] }, |
| 2855 | '*x-bps-total-max': { 'type': 'int', |
| 2856 | 'features': [ 'unstable' ] }, |
| 2857 | '*x-bps-total-max-length': { 'type': 'int', |
| 2858 | 'features': [ 'unstable' ] }, |
| 2859 | '*x-bps-read': { 'type': 'int', |
| 2860 | 'features': [ 'unstable' ] }, |
| 2861 | '*x-bps-read-max': { 'type': 'int', |
| 2862 | 'features': [ 'unstable' ] }, |
| 2863 | '*x-bps-read-max-length': { 'type': 'int', |
| 2864 | 'features': [ 'unstable' ] }, |
| 2865 | '*x-bps-write': { 'type': 'int', |
| 2866 | 'features': [ 'unstable' ] }, |
| 2867 | '*x-bps-write-max': { 'type': 'int', |
| 2868 | 'features': [ 'unstable' ] }, |
| 2869 | '*x-bps-write-max-length': { 'type': 'int', |
| 2870 | 'features': [ 'unstable' ] }, |
| 2871 | '*x-iops-size': { 'type': 'int', |
| 2872 | 'features': [ 'unstable' ] } } } |
| 2873 | |
| 2874 | ## |
| 2875 | # @block-stream: |
| 2876 | # |
| 2877 | # Copy data from a backing file into a block device. |
| 2878 | # |
| 2879 | # The block streaming operation is performed in the background until |
| 2880 | # the entire backing file has been copied. This command returns |
| 2881 | # immediately once streaming has started. The status of ongoing block |
| 2882 | # streaming operations can be checked with `query-block-jobs`. The |
| 2883 | # operation can be stopped before it has completed using the |
| 2884 | # `job-cancel` or `block-job-cancel` command. |
| 2885 | # |
| 2886 | # The node that receives the data is called the top image, can be |
| 2887 | # located in any part of the chain (but always above the base image; |
| 2888 | # see below) and can be specified using its device or node name. |
| 2889 | # Earlier QEMU versions only allowed 'device' to name the top level |
| 2890 | # node; presence of the 'base-node' parameter during introspection can |
| 2891 | # be used as a witness of the enhanced semantics of 'device'. |
| 2892 | # |
| 2893 | # If a base file is specified then sectors are not copied from that |
| 2894 | # base file and its backing chain. This can be used to stream a |
| 2895 | # subset of the backing file chain instead of flattening the entire |
| 2896 | # image. When streaming completes the image file will have the base |
| 2897 | # file as its backing file, unless that node was changed while the job |
| 2898 | # was running. In that case, base's parent's backing (or filtered, |
| 2899 | # whichever exists) child (i.e., base at the beginning of the job) |
| 2900 | # will be the new backing file. |
| 2901 | # |
| 2902 | # On successful completion the image file is updated to drop the |
| 2903 | # backing file and the `BLOCK_JOB_COMPLETED` event is emitted. |
| 2904 | # |
| 2905 | # In case @device is a filter node, `block-stream` modifies the first |
| 2906 | # non-filter overlay node below it to point to the new backing node |
| 2907 | # instead of modifying @device itself. |
| 2908 | # |
| 2909 | # @job-id: identifier for the newly-created block job. If omitted, |
| 2910 | # the device name will be used. (Since 2.7) |
| 2911 | # |
| 2912 | # @device: the device or node name of the top image |
| 2913 | # |
| 2914 | # @base: the common backing file name. It cannot be set if @base-node |
| 2915 | # or @bottom is also set. |
| 2916 | # |
| 2917 | # @base-node: the node name of the backing file. It cannot be set if |
| 2918 | # @base or @bottom is also set. (Since 2.8) |
| 2919 | # |
| 2920 | # @bottom: the last node in the chain that should be streamed into |
| 2921 | # top. It cannot be set if @base or @base-node is also set. It |
| 2922 | # cannot be filter node. (Since 6.0) |
| 2923 | # |
| 2924 | # @backing-file: The backing file string to write into the top image. |
| 2925 | # This filename is not validated. |
| 2926 | # |
| 2927 | # If a pathname string is such that it cannot be resolved by QEMU, |
| 2928 | # that means that subsequent QMP or HMP commands must use |
| 2929 | # node-names for the image in question, as filename lookup methods |
| 2930 | # will fail. |
| 2931 | # |
| 2932 | # If not specified, QEMU will automatically determine the backing |
| 2933 | # file string to use, or error out if there is no obvious choice. |
| 2934 | # Care should be taken when specifying the string, to specify a |
| 2935 | # valid filename or protocol. (Since 2.1) |
| 2936 | # |
| 2937 | # @backing-mask-protocol: If true, replace any protocol mentioned in |
| 2938 | # the 'backing file format' with 'raw', rather than storing the |
| 2939 | # protocol name as the backing format. Can be used even when no |
| 2940 | # image header will be updated (default false; since 9.0). |
| 2941 | # |
| 2942 | # @speed: the maximum speed, in bytes per second |
| 2943 | # |
| 2944 | # @on-error: the action to take on an error (default report). 'stop' |
| 2945 | # and 'enospc' can only be used if the block device supports |
| 2946 | # io-status (see `BlockInfo`). (Since 1.3) |
| 2947 | # |
| 2948 | # @filter-node-name: the node name that should be assigned to the |
| 2949 | # filter driver that the stream job inserts into the graph above |
| 2950 | # @device. If this option is not given, a node name is |
| 2951 | # autogenerated. (Since: 6.0) |
| 2952 | # |
| 2953 | # @auto-finalize: When false, this job will wait in a PENDING state |
| 2954 | # after it has finished its work, waiting for `job-finalize` |
| 2955 | # before making any block graph changes. When true, this job will |
| 2956 | # automatically perform its abort or commit actions. Defaults to |
| 2957 | # true. (Since 3.1) |
| 2958 | # |
| 2959 | # @auto-dismiss: When false, this job will wait in a CONCLUDED state |
| 2960 | # after it has completely ceased all work, and awaits |
| 2961 | # `job-dismiss`. When true, this job will automatically disappear |
| 2962 | # without user intervention. Defaults to true. (Since 3.1) |
| 2963 | # |
| 2964 | # Errors: |
| 2965 | # - If @device does not exist, DeviceNotFound. |
| 2966 | # |
| 2967 | # Since: 1.1 |
| 2968 | # |
| 2969 | # .. qmp-example:: |
| 2970 | # |
| 2971 | # -> { "execute": "block-stream", |
| 2972 | # "arguments": { "device": "virtio0", |
| 2973 | # "base": "/tmp/master.qcow2" } } |
| 2974 | # <- { "return": {} } |
| 2975 | ## |
| 2976 | { 'command': 'block-stream', |
| 2977 | 'data': { '*job-id': 'str', 'device': 'str', '*base': 'str', |
| 2978 | '*base-node': 'str', '*backing-file': 'str', |
| 2979 | '*backing-mask-protocol': 'bool', |
| 2980 | '*bottom': 'str', |
| 2981 | '*speed': 'int', '*on-error': 'BlockdevOnError', |
| 2982 | '*filter-node-name': 'str', |
| 2983 | '*auto-finalize': 'bool', '*auto-dismiss': 'bool' }, |
| 2984 | 'allow-preconfig': true } |
| 2985 | |
| 2986 | ## |
| 2987 | # @block-job-set-speed: |
| 2988 | # |
| 2989 | # Set maximum speed for a background block operation. |
| 2990 | # |
| 2991 | # This command can only be issued when there is an active block job. |
| 2992 | # |
| 2993 | # Throttling can be disabled by setting the speed to 0. |
| 2994 | # |
| 2995 | # @device: The job identifier. This used to be a device name (hence |
| 2996 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 2997 | # values. |
| 2998 | # |
| 2999 | # @speed: the maximum speed, in bytes per second, or 0 for unlimited. |
| 3000 | # Defaults to 0. |
| 3001 | # |
| 3002 | # Errors: |
| 3003 | # - If no background operation is active on this device, |
| 3004 | # DeviceNotActive |
| 3005 | # |
| 3006 | # Since: 1.1 |
| 3007 | ## |
| 3008 | { 'command': 'block-job-set-speed', |
| 3009 | 'data': { 'device': 'str', 'speed': 'int' }, |
| 3010 | 'allow-preconfig': true } |
| 3011 | |
| 3012 | ## |
| 3013 | # @block-job-cancel: |
| 3014 | # |
| 3015 | # Stop an active background block operation. |
| 3016 | # |
| 3017 | # This command returns immediately after marking the active background |
| 3018 | # block operation for cancellation. It is an error to call this |
| 3019 | # command if no operation is in progress. |
| 3020 | # |
| 3021 | # The operation will cancel as soon as possible and then emit the |
| 3022 | # `BLOCK_JOB_CANCELLED` event. Before that happens the job is still |
| 3023 | # visible when enumerated using `query-block-jobs`. |
| 3024 | # |
| 3025 | # Note that if you issue `block-job-cancel` after `drive-mirror` has |
| 3026 | # indicated (via the event `BLOCK_JOB_READY`) that the source and |
| 3027 | # destination are synchronized, then the event triggered by this |
| 3028 | # command changes to `BLOCK_JOB_COMPLETED`, to indicate that the |
| 3029 | # mirroring has ended and the destination now has a point-in-time copy |
| 3030 | # tied to the time of the cancellation. |
| 3031 | # |
| 3032 | # For streaming, the image file retains its backing file unless the |
| 3033 | # streaming operation happens to complete just as it is being |
| 3034 | # cancelled. A new streaming operation can be started at a later time |
| 3035 | # to finish copying all data from the backing file. |
| 3036 | # |
| 3037 | # @device: The job identifier. This used to be a device name (hence |
| 3038 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 3039 | # values. |
| 3040 | # |
| 3041 | # @force: If true, and the job has already emitted the event |
| 3042 | # `BLOCK_JOB_READY`, abandon the job immediately (even if it is |
| 3043 | # paused) instead of waiting for the destination to complete its |
| 3044 | # final synchronization (since 1.3) |
| 3045 | # |
| 3046 | # Errors: |
| 3047 | # - If no background operation is active on this device, |
| 3048 | # DeviceNotActive |
| 3049 | # |
| 3050 | # Since: 1.1 |
| 3051 | ## |
| 3052 | { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' }, |
| 3053 | 'allow-preconfig': true } |
| 3054 | |
| 3055 | ## |
| 3056 | # @block-job-pause: |
| 3057 | # |
| 3058 | # Pause an active background block operation. |
| 3059 | # |
| 3060 | # This command returns immediately after marking the active job for |
| 3061 | # pausing. Pausing an already paused job is an error. |
| 3062 | # |
| 3063 | # The job will pause as soon as possible, which means transitioning |
| 3064 | # into the PAUSED state if it was RUNNING, or into STANDBY if it was |
| 3065 | # READY. The corresponding `JOB_STATUS_CHANGE` event will be emitted. |
| 3066 | # |
| 3067 | # Cancelling a paused job automatically resumes it. |
| 3068 | # |
| 3069 | # @device: The job identifier. This used to be a device name (hence |
| 3070 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 3071 | # values. |
| 3072 | # |
| 3073 | # Features: |
| 3074 | # |
| 3075 | # @deprecated: This command is deprecated. Use `job-pause` |
| 3076 | # instead. |
| 3077 | # |
| 3078 | # Errors: |
| 3079 | # - If no background operation is active on this device, |
| 3080 | # DeviceNotActive |
| 3081 | # |
| 3082 | # Since: 1.3 |
| 3083 | ## |
| 3084 | { 'command': 'block-job-pause', 'data': { 'device': 'str' }, |
| 3085 | 'features': ['deprecated'], |
| 3086 | 'allow-preconfig': true } |
| 3087 | |
| 3088 | ## |
| 3089 | # @block-job-resume: |
| 3090 | # |
| 3091 | # Resume an active background block operation. |
| 3092 | # |
| 3093 | # This command returns immediately after resuming a paused job. |
| 3094 | # Resuming an already running job is an error. |
| 3095 | # |
| 3096 | # This command also clears the error status of the job. |
| 3097 | # |
| 3098 | # @device: The job identifier. This used to be a device name (hence |
| 3099 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 3100 | # values. |
| 3101 | # |
| 3102 | # Features: |
| 3103 | # |
| 3104 | # @deprecated: This command is deprecated. Use `job-resume` |
| 3105 | # instead. |
| 3106 | # |
| 3107 | # Errors: |
| 3108 | # - If no background operation is active on this device, |
| 3109 | # DeviceNotActive |
| 3110 | # |
| 3111 | # Since: 1.3 |
| 3112 | ## |
| 3113 | { 'command': 'block-job-resume', 'data': { 'device': 'str' }, |
| 3114 | 'features': ['deprecated'], |
| 3115 | 'allow-preconfig': true } |
| 3116 | |
| 3117 | ## |
| 3118 | # @block-job-complete: |
| 3119 | # |
| 3120 | # Manually trigger completion of an active job in the READY or STANDBY |
| 3121 | # state. Completing the job in any other state is an error. |
| 3122 | # |
| 3123 | # This is supported only for drive mirroring, where it also switches |
| 3124 | # the device to write to the target path only. Note that drive |
| 3125 | # mirroring includes `drive-mirror`, `blockdev-mirror` and |
| 3126 | # `block-commit` job (only in case of "active commit", when the node |
| 3127 | # being committed is used by the guest). The ability to complete is |
| 3128 | # signaled with a `BLOCK_JOB_READY` event. |
| 3129 | # |
| 3130 | # This command completes an active background block operation |
| 3131 | # synchronously. The ordering of this command's return with the |
| 3132 | # `BLOCK_JOB_COMPLETED` event is not defined. Note that if an I/O |
| 3133 | # error occurs during the processing of this command: 1) the command |
| 3134 | # itself will fail; 2) the error will be processed according to the |
| 3135 | # rerror/werror arguments that were specified when starting the |
| 3136 | # operation. |
| 3137 | # |
| 3138 | # @device: The job identifier. This used to be a device name (hence |
| 3139 | # the name of the parameter), but since QEMU 2.7 it can have other |
| 3140 | # values. |
| 3141 | # |
| 3142 | # Features: |
| 3143 | # |
| 3144 | # @deprecated: This command is deprecated. Use `job-complete` |
| 3145 | # instead. |
| 3146 | # |
| 3147 | # Errors: |
| 3148 | # - If no background operation is active on this device, |
| 3149 | # DeviceNotActive |
| 3150 | # |
| 3151 | # Since: 1.3 |
| 3152 | ## |
| 3153 | { 'command': 'block-job-complete', 'data': { 'device': 'str' }, |
| 3154 | 'features': ['deprecated'], |
| 3155 | 'allow-preconfig': true } |
| 3156 | |
| 3157 | ## |
| 3158 | # @block-job-dismiss: |
| 3159 | # |
| 3160 | # Deletes a job that is in the CONCLUDED state. This command only |
| 3161 | # needs to be run explicitly for jobs that don't have automatic |
| 3162 | # dismiss enabled. In turn, automatic dismiss may be enabled only for |
| 3163 | # jobs that have @auto-dismiss option, which are `drive-backup`, |
| 3164 | # `blockdev-backup`, `drive-mirror`, `blockdev-mirror`, `block-commit` |
| 3165 | # and `block-stream`. @auto-dismiss is enabled by default for these |
| 3166 | # jobs. |
| 3167 | # |
| 3168 | # This command will refuse to operate on any job that has not yet |
| 3169 | # reached its terminal state, CONCLUDED. For jobs that make use of |
| 3170 | # the `BLOCK_JOB_READY` event, `job-cancel`, `block-job-cancel` or |
| 3171 | # `job-complete` will still need to be used as appropriate. |
| 3172 | # |
| 3173 | # @id: The job identifier. |
| 3174 | # |
| 3175 | # Features: |
| 3176 | # |
| 3177 | # @deprecated: This command is deprecated. Use `job-dismiss` |
| 3178 | # instead. |
| 3179 | # |
| 3180 | # Since: 2.12 |
| 3181 | ## |
| 3182 | { 'command': 'block-job-dismiss', 'data': { 'id': 'str' }, |
| 3183 | 'features': ['deprecated'], |
| 3184 | 'allow-preconfig': true } |
| 3185 | |
| 3186 | ## |
| 3187 | # @block-job-finalize: |
| 3188 | # |
| 3189 | # Instructs all jobs in a transaction (or a single job if it is not |
| 3190 | # part of any transaction) to finalize any graph changes and do any |
| 3191 | # necessary cleanup. This command requires that all involved jobs are |
| 3192 | # in the PENDING state. |
| 3193 | # |
| 3194 | # For jobs in a transaction, instructing one job to finalize will |
| 3195 | # force ALL jobs in the transaction to finalize, so it is only |
| 3196 | # necessary to instruct a single member job to finalize. |
| 3197 | # |
| 3198 | # The command is applicable only to jobs which have @auto-finalize |
| 3199 | # option and only when this option is set to false. |
| 3200 | # |
| 3201 | # @id: The job identifier. |
| 3202 | # |
| 3203 | # Features: |
| 3204 | # |
| 3205 | # @deprecated: This command is deprecated. Use `job-finalize` |
| 3206 | # instead. |
| 3207 | # |
| 3208 | # Since: 2.12 |
| 3209 | ## |
| 3210 | { 'command': 'block-job-finalize', 'data': { 'id': 'str' }, |
| 3211 | 'features': ['deprecated'], |
| 3212 | 'allow-preconfig': true } |
| 3213 | |
| 3214 | ## |
| 3215 | # @BlockJobChangeOptionsMirror: |
| 3216 | # |
| 3217 | # @copy-mode: Switch to this copy mode. Currently, only the switch |
| 3218 | # from 'background' to 'write-blocking' is implemented. |
| 3219 | # |
| 3220 | # Since: 8.2 |
| 3221 | ## |
| 3222 | { 'struct': 'BlockJobChangeOptionsMirror', |
| 3223 | 'data': { 'copy-mode' : 'MirrorCopyMode' } } |
| 3224 | |
| 3225 | ## |
| 3226 | # @BlockJobChangeOptions: |
| 3227 | # |
| 3228 | # Block job options that can be changed after job creation. |
| 3229 | # |
| 3230 | # @id: The job identifier |
| 3231 | # |
| 3232 | # @type: The job type |
| 3233 | # |
| 3234 | # Since: 8.2 |
| 3235 | ## |
| 3236 | { 'union': 'BlockJobChangeOptions', |
| 3237 | 'base': { 'id': 'str', 'type': 'JobType' }, |
| 3238 | 'discriminator': 'type', |
| 3239 | 'data': { 'mirror': 'BlockJobChangeOptionsMirror' } } |
| 3240 | |
| 3241 | ## |
| 3242 | # @block-job-change: |
| 3243 | # |
| 3244 | # Change the block job's options. |
| 3245 | # |
| 3246 | # Since: 8.2 |
| 3247 | ## |
| 3248 | { 'command': 'block-job-change', |
| 3249 | 'data': 'BlockJobChangeOptions', 'boxed': true } |
| 3250 | |
| 3251 | ## |
| 3252 | # @BlockdevDiscardOptions: |
| 3253 | # |
| 3254 | # Determines how to handle discard requests. |
| 3255 | # |
| 3256 | # @ignore: Ignore the request |
| 3257 | # |
| 3258 | # @unmap: Forward as an unmap request |
| 3259 | # |
| 3260 | # Since: 2.9 |
| 3261 | ## |
| 3262 | { 'enum': 'BlockdevDiscardOptions', |
| 3263 | 'data': [ 'ignore', 'unmap' ] } |
| 3264 | |
| 3265 | ## |
| 3266 | # @BlockdevDetectZeroesOptions: |
| 3267 | # |
| 3268 | # Describes the operation mode for the automatic conversion of plain |
| 3269 | # zero writes by the OS to driver specific optimized zero write |
| 3270 | # commands. |
| 3271 | # |
| 3272 | # @off: Disabled (default) |
| 3273 | # |
| 3274 | # @on: Enabled |
| 3275 | # |
| 3276 | # @unmap: Enabled and even try to unmap blocks if possible. This |
| 3277 | # requires also that `BlockdevDiscardOptions` is set to unmap for |
| 3278 | # this device. |
| 3279 | # |
| 3280 | # Since: 2.1 |
| 3281 | ## |
| 3282 | { 'enum': 'BlockdevDetectZeroesOptions', |
| 3283 | 'data': [ 'off', 'on', 'unmap' ] } |
| 3284 | |
| 3285 | ## |
| 3286 | # @BlockdevAioOptions: |
| 3287 | # |
| 3288 | # Selects the AIO backend to handle I/O requests |
| 3289 | # |
| 3290 | # @threads: Use QEMU's thread pool |
| 3291 | # |
| 3292 | # @native: Use native AIO backend (only Linux and Windows) |
| 3293 | # |
| 3294 | # @io_uring: Use linux io_uring (since 5.0) |
| 3295 | # |
| 3296 | # Since: 2.9 |
| 3297 | ## |
| 3298 | { 'enum': 'BlockdevAioOptions', |
| 3299 | 'data': [ 'threads', 'native', |
| 3300 | { 'name': 'io_uring', 'if': 'CONFIG_LINUX_IO_URING' } ] } |
| 3301 | |
| 3302 | ## |
| 3303 | # @BlockdevCacheOptions: |
| 3304 | # |
| 3305 | # Includes cache-related options for block devices |
| 3306 | # |
| 3307 | # @direct: enables use of O_DIRECT (bypass the host page cache; |
| 3308 | # default: false) |
| 3309 | # |
| 3310 | # @no-flush: ignore any flush requests for the device (default: false) |
| 3311 | # |
| 3312 | # Since: 2.9 |
| 3313 | ## |
| 3314 | { 'struct': 'BlockdevCacheOptions', |
| 3315 | 'data': { '*direct': 'bool', |
| 3316 | '*no-flush': 'bool' } } |
| 3317 | |
| 3318 | ## |
| 3319 | # @BlockdevDriver: |
| 3320 | # |
| 3321 | # Drivers that are supported in block device operations. |
| 3322 | # |
| 3323 | # @throttle: Since 2.11 |
| 3324 | # |
| 3325 | # @nvme: Since 2.12 |
| 3326 | # |
| 3327 | # @copy-on-read: Since 3.0 |
| 3328 | # |
| 3329 | # @blklogwrites: Since 3.0 |
| 3330 | # |
| 3331 | # @blkreplay: Since 4.2 |
| 3332 | # |
| 3333 | # @compress: Since 5.0 |
| 3334 | # |
| 3335 | # @copy-before-write: Since 6.2 |
| 3336 | # |
| 3337 | # @snapshot-access: Since 7.0 |
| 3338 | # |
| 3339 | # Since: 2.9 |
| 3340 | ## |
| 3341 | { 'enum': 'BlockdevDriver', |
| 3342 | 'data': [ 'blkdebug', 'blklogwrites', 'blkreplay', 'blkverify', 'bochs', |
| 3343 | 'cloop', 'compress', 'copy-before-write', 'copy-on-read', 'dmg', |
| 3344 | 'file', 'snapshot-access', 'ftp', 'ftps', |
| 3345 | {'name': 'host_cdrom', 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
| 3346 | {'name': 'host_device', 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
| 3347 | 'http', 'https', |
| 3348 | { 'name': 'io_uring', 'if': 'CONFIG_BLKIO' }, |
| 3349 | 'iscsi', |
| 3350 | 'luks', 'nbd', 'nfs', 'null-aio', 'null-co', 'nvme', |
| 3351 | { 'name': 'nvme-io_uring', 'if': 'CONFIG_BLKIO' }, |
| 3352 | 'parallels', 'preallocate', 'qcow', 'qcow2', 'qed', 'quorum', |
| 3353 | 'raw', 'rbd', |
| 3354 | { 'name': 'replication', 'if': 'CONFIG_REPLICATION' }, |
| 3355 | 'ssh', 'throttle', 'vdi', 'vhdx', |
| 3356 | { 'name': 'virtio-blk-vfio-pci', 'if': 'CONFIG_BLKIO' }, |
| 3357 | { 'name': 'virtio-blk-vhost-user', 'if': 'CONFIG_BLKIO' }, |
| 3358 | { 'name': 'virtio-blk-vhost-vdpa', 'if': 'CONFIG_BLKIO' }, |
| 3359 | 'vmdk', 'vpc', 'vvfat' ] } |
| 3360 | |
| 3361 | ## |
| 3362 | # @BlockdevOptionsFile: |
| 3363 | # |
| 3364 | # Driver specific block device options for the file backend. |
| 3365 | # |
| 3366 | # @filename: path to the image file |
| 3367 | # |
| 3368 | # @pr-manager: the id for the object that will handle persistent |
| 3369 | # reservations for this device (default: none, forward the |
| 3370 | # commands via SG_IO; since 2.11) |
| 3371 | # |
| 3372 | # @aio: AIO backend (default: threads) (since: 2.8) |
| 3373 | # |
| 3374 | # @aio-max-batch: maximum number of requests to batch together into a |
| 3375 | # single submission in the AIO backend. The smallest value |
| 3376 | # between this and the aio-max-batch value of the IOThread object |
| 3377 | # is chosen. 0 means that the AIO backend will handle it |
| 3378 | # automatically. (default: 0, since 6.2) |
| 3379 | # |
| 3380 | # @locking: whether to enable file locking. If set to 'auto', only |
| 3381 | # enable when Open File Descriptor (OFD) locking API is available |
| 3382 | # (default: auto, since 2.10) |
| 3383 | # |
| 3384 | # @drop-cache: invalidate page cache during live migration. This |
| 3385 | # prevents stale data on the migration destination with |
| 3386 | # cache.direct=off. Currently only supported on Linux hosts. |
| 3387 | # (default: on, since: 4.0) |
| 3388 | # |
| 3389 | # @x-check-cache-dropped: whether to check that page cache was dropped |
| 3390 | # on live migration. May cause noticeable delays if the image |
| 3391 | # file is large, do not use in production. (default: off) |
| 3392 | # (since: 3.0) |
| 3393 | # |
| 3394 | # Features: |
| 3395 | # |
| 3396 | # @dynamic-auto-read-only: If present, enabled auto-read-only means |
| 3397 | # that the driver will open the image read-only at first, |
| 3398 | # dynamically reopen the image file read-write when the first |
| 3399 | # writer is attached to the node and reopen read-only when the |
| 3400 | # last writer is detached. This allows giving QEMU write |
| 3401 | # permissions only on demand when an operation actually needs |
| 3402 | # write access. |
| 3403 | # |
| 3404 | # @unstable: Member x-check-cache-dropped is meant for debugging. |
| 3405 | # |
| 3406 | # Since: 2.9 |
| 3407 | ## |
| 3408 | { 'struct': 'BlockdevOptionsFile', |
| 3409 | 'data': { 'filename': 'str', |
| 3410 | '*pr-manager': 'str', |
| 3411 | '*locking': 'OnOffAuto', |
| 3412 | '*aio': 'BlockdevAioOptions', |
| 3413 | '*aio-max-batch': 'int', |
| 3414 | '*drop-cache': {'type': 'bool', |
| 3415 | 'if': 'CONFIG_LINUX'}, |
| 3416 | '*x-check-cache-dropped': { 'type': 'bool', |
| 3417 | 'features': [ 'unstable' ] } }, |
| 3418 | 'features': [ { 'name': 'dynamic-auto-read-only', |
| 3419 | 'if': 'CONFIG_POSIX' } ] } |
| 3420 | |
| 3421 | ## |
| 3422 | # @BlockdevOptionsNull: |
| 3423 | # |
| 3424 | # Driver specific block device options for the null backend. |
| 3425 | # |
| 3426 | # @size: size of the device in bytes. |
| 3427 | # |
| 3428 | # @latency-ns: emulated latency (in nanoseconds) in processing |
| 3429 | # requests. Default to zero which completes requests immediately. |
| 3430 | # (Since 2.4) |
| 3431 | # |
| 3432 | # @read-zeroes: if true, reads from the device produce zeroes; if |
| 3433 | # false, the buffer is left unchanged. |
| 3434 | # (default: false; since: 4.1) |
| 3435 | # |
| 3436 | # Since: 2.9 |
| 3437 | ## |
| 3438 | { 'struct': 'BlockdevOptionsNull', |
| 3439 | 'data': { '*size': 'int', '*latency-ns': 'uint64', '*read-zeroes': 'bool' } } |
| 3440 | |
| 3441 | ## |
| 3442 | # @BlockdevOptionsNVMe: |
| 3443 | # |
| 3444 | # Driver specific block device options for the NVMe backend. |
| 3445 | # |
| 3446 | # @device: PCI controller address of the NVMe device in format |
| 3447 | # hhhh:bb:ss.f (host:bus:slot.function) |
| 3448 | # |
| 3449 | # @namespace: namespace number of the device, starting from 1. |
| 3450 | # |
| 3451 | # Note that the PCI @device must have been unbound from any host |
| 3452 | # kernel driver before instructing QEMU to add the blockdev. |
| 3453 | # |
| 3454 | # Since: 2.12 |
| 3455 | ## |
| 3456 | { 'struct': 'BlockdevOptionsNVMe', |
| 3457 | 'data': { 'device': 'str', 'namespace': 'int' } } |
| 3458 | |
| 3459 | ## |
| 3460 | # @BlockdevOptionsVVFAT: |
| 3461 | # |
| 3462 | # Driver specific block device options for the vvfat protocol. |
| 3463 | # |
| 3464 | # @dir: directory to be exported as FAT image |
| 3465 | # |
| 3466 | # @fat-type: FAT type: 12, 16 or 32 |
| 3467 | # |
| 3468 | # @floppy: whether to export a floppy image (true) or partitioned hard |
| 3469 | # disk (false; default) |
| 3470 | # |
| 3471 | # @label: set the volume label, limited to 11 bytes. FAT16 and FAT32 |
| 3472 | # traditionally have some restrictions on labels, which are |
| 3473 | # ignored by most operating systems. Defaults to "QEMU VVFAT". |
| 3474 | # (since 2.4) |
| 3475 | # |
| 3476 | # @rw: whether to allow write operations (default: false) |
| 3477 | # |
| 3478 | # Since: 2.9 |
| 3479 | ## |
| 3480 | { 'struct': 'BlockdevOptionsVVFAT', |
| 3481 | 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool', |
| 3482 | '*label': 'str', '*rw': 'bool' } } |
| 3483 | |
| 3484 | ## |
| 3485 | # @BlockdevOptionsGenericFormat: |
| 3486 | # |
| 3487 | # Driver specific block device options for image format that have no |
| 3488 | # option besides their data source. |
| 3489 | # |
| 3490 | # @file: reference to or definition of the data source block device |
| 3491 | # |
| 3492 | # Since: 2.9 |
| 3493 | ## |
| 3494 | { 'struct': 'BlockdevOptionsGenericFormat', |
| 3495 | 'data': { 'file': 'BlockdevRef' } } |
| 3496 | |
| 3497 | ## |
| 3498 | # @BlockdevOptionsLUKS: |
| 3499 | # |
| 3500 | # Driver specific block device options for LUKS. |
| 3501 | # |
| 3502 | # @key-secret: the ID of a QCryptoSecret object providing the |
| 3503 | # decryption key. Mandatory except when doing a metadata-only |
| 3504 | # probe of the image. (since 2.6) |
| 3505 | # |
| 3506 | # @header: block device holding a detached LUKS header. (since 9.0) |
| 3507 | # |
| 3508 | # Since: 2.9 |
| 3509 | ## |
| 3510 | { 'struct': 'BlockdevOptionsLUKS', |
| 3511 | 'base': 'BlockdevOptionsGenericFormat', |
| 3512 | 'data': { '*key-secret': 'str', |
| 3513 | '*header': 'BlockdevRef'} } |
| 3514 | |
| 3515 | ## |
| 3516 | # @BlockdevOptionsGenericCOWFormat: |
| 3517 | # |
| 3518 | # Driver specific block device options for image format that have no |
| 3519 | # option besides their data source and an optional backing file. |
| 3520 | # |
| 3521 | # @backing: reference to or definition of the backing file block |
| 3522 | # device, null disables the backing file entirely. Defaults to |
| 3523 | # the backing file stored the image file. |
| 3524 | # |
| 3525 | # Since: 2.9 |
| 3526 | ## |
| 3527 | { 'struct': 'BlockdevOptionsGenericCOWFormat', |
| 3528 | 'base': 'BlockdevOptionsGenericFormat', |
| 3529 | 'data': { '*backing': 'BlockdevRefOrNull' } } |
| 3530 | |
| 3531 | ## |
| 3532 | # @Qcow2OverlapCheckMode: |
| 3533 | # |
| 3534 | # General overlap check modes. |
| 3535 | # |
| 3536 | # @none: Do not perform any checks |
| 3537 | # |
| 3538 | # @constant: Perform only checks which can be done in constant time |
| 3539 | # and without reading anything from disk |
| 3540 | # |
| 3541 | # @cached: Perform only checks which can be done without reading |
| 3542 | # anything from disk |
| 3543 | # |
| 3544 | # @all: Perform all available overlap checks |
| 3545 | # |
| 3546 | # Since: 2.9 |
| 3547 | ## |
| 3548 | { 'enum': 'Qcow2OverlapCheckMode', |
| 3549 | 'data': [ 'none', 'constant', 'cached', 'all' ] } |
| 3550 | |
| 3551 | ## |
| 3552 | # @Qcow2OverlapCheckFlags: |
| 3553 | # |
| 3554 | # Structure of flags for each metadata structure. Setting a field to |
| 3555 | # 'true' makes QEMU guard that Qcow2 format structure against |
| 3556 | # unintended overwriting. See Qcow2 format specification for detailed |
| 3557 | # information on these structures. The default value is chosen |
| 3558 | # according to the template given. |
| 3559 | # |
| 3560 | # @template: Specifies a template mode which can be adjusted using the |
| 3561 | # other flags, defaults to 'cached' |
| 3562 | # |
| 3563 | # @main-header: Qcow2 format header |
| 3564 | # |
| 3565 | # @active-l1: Qcow2 active L1 table |
| 3566 | # |
| 3567 | # @active-l2: Qcow2 active L2 table |
| 3568 | # |
| 3569 | # @refcount-table: Qcow2 refcount table |
| 3570 | # |
| 3571 | # @refcount-block: Qcow2 refcount blocks |
| 3572 | # |
| 3573 | # @snapshot-table: Qcow2 snapshot table |
| 3574 | # |
| 3575 | # @inactive-l1: Qcow2 inactive L1 tables |
| 3576 | # |
| 3577 | # @inactive-l2: Qcow2 inactive L2 tables |
| 3578 | # |
| 3579 | # @bitmap-directory: Qcow2 bitmap directory (since 3.0) |
| 3580 | # |
| 3581 | # Since: 2.9 |
| 3582 | ## |
| 3583 | { 'struct': 'Qcow2OverlapCheckFlags', |
| 3584 | 'data': { '*template': 'Qcow2OverlapCheckMode', |
| 3585 | '*main-header': 'bool', |
| 3586 | '*active-l1': 'bool', |
| 3587 | '*active-l2': 'bool', |
| 3588 | '*refcount-table': 'bool', |
| 3589 | '*refcount-block': 'bool', |
| 3590 | '*snapshot-table': 'bool', |
| 3591 | '*inactive-l1': 'bool', |
| 3592 | '*inactive-l2': 'bool', |
| 3593 | '*bitmap-directory': 'bool' } } |
| 3594 | |
| 3595 | ## |
| 3596 | # @Qcow2OverlapChecks: |
| 3597 | # |
| 3598 | # Specifies which metadata structures should be guarded against |
| 3599 | # unintended overwriting. |
| 3600 | # |
| 3601 | # @flags: set of flags for separate specification of each metadata |
| 3602 | # structure type |
| 3603 | # |
| 3604 | # @mode: named mode which chooses a specific set of flags |
| 3605 | # |
| 3606 | # Since: 2.9 |
| 3607 | ## |
| 3608 | { 'alternate': 'Qcow2OverlapChecks', |
| 3609 | 'data': { 'flags': 'Qcow2OverlapCheckFlags', |
| 3610 | 'mode': 'Qcow2OverlapCheckMode' } } |
| 3611 | |
| 3612 | ## |
| 3613 | # @BlockdevQcowEncryptionFormat: |
| 3614 | # |
| 3615 | # @aes: AES-CBC with plain64 initialization vectors |
| 3616 | # |
| 3617 | # Since: 2.10 |
| 3618 | ## |
| 3619 | { 'enum': 'BlockdevQcowEncryptionFormat', |
| 3620 | 'data': [ 'aes' ] } |
| 3621 | |
| 3622 | ## |
| 3623 | # @BlockdevQcowEncryption: |
| 3624 | # |
| 3625 | # @format: encryption format |
| 3626 | # |
| 3627 | # Since: 2.10 |
| 3628 | ## |
| 3629 | { 'union': 'BlockdevQcowEncryption', |
| 3630 | 'base': { 'format': 'BlockdevQcowEncryptionFormat' }, |
| 3631 | 'discriminator': 'format', |
| 3632 | 'data': { 'aes': 'QCryptoBlockOptionsQCow' } } |
| 3633 | |
| 3634 | ## |
| 3635 | # @BlockdevOptionsQcow: |
| 3636 | # |
| 3637 | # Driver specific block device options for qcow. |
| 3638 | # |
| 3639 | # @encrypt: Image decryption options. Mandatory for encrypted images, |
| 3640 | # except when doing a metadata-only probe of the image. |
| 3641 | # |
| 3642 | # Since: 2.10 |
| 3643 | ## |
| 3644 | { 'struct': 'BlockdevOptionsQcow', |
| 3645 | 'base': 'BlockdevOptionsGenericCOWFormat', |
| 3646 | 'data': { '*encrypt': 'BlockdevQcowEncryption' } } |
| 3647 | |
| 3648 | ## |
| 3649 | # @BlockdevQcow2EncryptionFormat: |
| 3650 | # |
| 3651 | # @aes: AES-CBC with plain64 initialization vectors |
| 3652 | # |
| 3653 | # Since: 2.10 |
| 3654 | ## |
| 3655 | { 'enum': 'BlockdevQcow2EncryptionFormat', |
| 3656 | 'data': [ 'aes', 'luks' ] } |
| 3657 | |
| 3658 | ## |
| 3659 | # @BlockdevQcow2Encryption: |
| 3660 | # |
| 3661 | # @format: encryption format |
| 3662 | # |
| 3663 | # Since: 2.10 |
| 3664 | ## |
| 3665 | { 'union': 'BlockdevQcow2Encryption', |
| 3666 | 'base': { 'format': 'BlockdevQcow2EncryptionFormat' }, |
| 3667 | 'discriminator': 'format', |
| 3668 | 'data': { 'aes': 'QCryptoBlockOptionsQCow', |
| 3669 | 'luks': 'QCryptoBlockOptionsLUKS'} } |
| 3670 | |
| 3671 | ## |
| 3672 | # @BlockdevOptionsPreallocate: |
| 3673 | # |
| 3674 | # Filter driver intended to be inserted between format and protocol |
| 3675 | # node and do preallocation in protocol node on write. |
| 3676 | # |
| 3677 | # @prealloc-align: on preallocation, align file length to this number, |
| 3678 | # default 1048576 (1M) |
| 3679 | # |
| 3680 | # @prealloc-size: how much to preallocate, default 134217728 (128M) |
| 3681 | # |
| 3682 | # Since: 6.0 |
| 3683 | ## |
| 3684 | { 'struct': 'BlockdevOptionsPreallocate', |
| 3685 | 'base': 'BlockdevOptionsGenericFormat', |
| 3686 | 'data': { '*prealloc-align': 'int', '*prealloc-size': 'int' } } |
| 3687 | |
| 3688 | ## |
| 3689 | # @BlockdevOptionsQcow2: |
| 3690 | # |
| 3691 | # Driver specific block device options for qcow2. |
| 3692 | # |
| 3693 | # @lazy-refcounts: whether to enable the lazy refcounts feature |
| 3694 | # (default is taken from the image file) |
| 3695 | # |
| 3696 | # @pass-discard-request: whether discard requests to the qcow2 device |
| 3697 | # should be forwarded to the data source |
| 3698 | # |
| 3699 | # @pass-discard-snapshot: whether discard requests for the data source |
| 3700 | # should be issued when a snapshot operation (e.g. deleting a |
| 3701 | # snapshot) frees clusters in the qcow2 file |
| 3702 | # |
| 3703 | # @pass-discard-other: whether discard requests for the data source |
| 3704 | # should be issued on other occasions where a cluster gets freed |
| 3705 | # |
| 3706 | # @discard-no-unref: when enabled, data clusters will remain |
| 3707 | # preallocated when they are no longer used, e.g. because they are |
| 3708 | # discarded or converted to zero clusters. As usual, whether the |
| 3709 | # old data is discarded or kept on the protocol level (i.e. in the |
| 3710 | # image file) depends on the setting of the pass-discard-request |
| 3711 | # option. Keeping the clusters preallocated prevents qcow2 |
| 3712 | # fragmentation that would otherwise be caused by freeing and |
| 3713 | # re-allocating them later. Besides potential performance |
| 3714 | # degradation, such fragmentation can lead to increased allocation |
| 3715 | # of clusters past the end of the image file, resulting in image |
| 3716 | # files whose file length can grow much larger than their guest |
| 3717 | # disk size would suggest. If image file length is of concern |
| 3718 | # (e.g. when storing qcow2 images directly on block devices), you |
| 3719 | # should consider enabling this option. (since 8.1) |
| 3720 | # |
| 3721 | # @overlap-check: which overlap checks to perform for writes to the |
| 3722 | # image, defaults to 'cached' (since 2.2) |
| 3723 | # |
| 3724 | # @cache-size: the maximum total size of the L2 table and refcount |
| 3725 | # block caches in bytes (since 2.2) |
| 3726 | # |
| 3727 | # @l2-cache-size: the maximum size of the L2 table cache in bytes |
| 3728 | # (since 2.2) |
| 3729 | # |
| 3730 | # @l2-cache-entry-size: the size of each entry in the L2 cache in |
| 3731 | # bytes. It must be a power of two between 512 and the cluster |
| 3732 | # size. The default value is the cluster size (since 2.12) |
| 3733 | # |
| 3734 | # @refcount-cache-size: the maximum size of the refcount block cache |
| 3735 | # in bytes (since 2.2) |
| 3736 | # |
| 3737 | # @cache-clean-interval: clean unused entries in the L2 and refcount |
| 3738 | # caches. The interval is in seconds. The default value is 600 |
| 3739 | # on supporting platforms, and 0 on other platforms. 0 disables |
| 3740 | # this feature. (since 2.5) |
| 3741 | # |
| 3742 | # @encrypt: Image decryption options. Mandatory for encrypted images, |
| 3743 | # except when doing a metadata-only probe of the image. |
| 3744 | # (since 2.10) |
| 3745 | # |
| 3746 | # @data-file: reference to or definition of the external data file. |
| 3747 | # This may only be specified for images that require an external |
| 3748 | # data file. If it is not specified for such an image, the data |
| 3749 | # file name is loaded from the image file. (since 4.0) |
| 3750 | # |
| 3751 | # Since: 2.9 |
| 3752 | ## |
| 3753 | { 'struct': 'BlockdevOptionsQcow2', |
| 3754 | 'base': 'BlockdevOptionsGenericCOWFormat', |
| 3755 | 'data': { '*lazy-refcounts': 'bool', |
| 3756 | '*pass-discard-request': 'bool', |
| 3757 | '*pass-discard-snapshot': 'bool', |
| 3758 | '*pass-discard-other': 'bool', |
| 3759 | '*discard-no-unref': 'bool', |
| 3760 | '*overlap-check': 'Qcow2OverlapChecks', |
| 3761 | '*cache-size': 'int', |
| 3762 | '*l2-cache-size': 'int', |
| 3763 | '*l2-cache-entry-size': 'int', |
| 3764 | '*refcount-cache-size': 'int', |
| 3765 | '*cache-clean-interval': 'int', |
| 3766 | '*encrypt': 'BlockdevQcow2Encryption', |
| 3767 | '*data-file': 'BlockdevRef' } } |
| 3768 | |
| 3769 | ## |
| 3770 | # @SshHostKeyCheckMode: |
| 3771 | # |
| 3772 | # @none: Don't check the host key at all |
| 3773 | # |
| 3774 | # @hash: Compare the host key with a given hash |
| 3775 | # |
| 3776 | # @known_hosts: Check the host key against the known_hosts file |
| 3777 | # |
| 3778 | # Since: 2.12 |
| 3779 | ## |
| 3780 | { 'enum': 'SshHostKeyCheckMode', |
| 3781 | 'data': [ 'none', 'hash', 'known_hosts' ] } |
| 3782 | |
| 3783 | ## |
| 3784 | # @SshHostKeyCheckHashType: |
| 3785 | # |
| 3786 | # @md5: The given hash is an md5 hash |
| 3787 | # |
| 3788 | # @sha1: The given hash is an sha1 hash |
| 3789 | # |
| 3790 | # @sha256: The given hash is an sha256 hash |
| 3791 | # |
| 3792 | # Since: 2.12 |
| 3793 | ## |
| 3794 | { 'enum': 'SshHostKeyCheckHashType', |
| 3795 | 'data': [ 'md5', 'sha1', 'sha256' ] } |
| 3796 | |
| 3797 | ## |
| 3798 | # @SshHostKeyHash: |
| 3799 | # |
| 3800 | # @type: The hash algorithm used for the hash |
| 3801 | # |
| 3802 | # @hash: The expected hash value |
| 3803 | # |
| 3804 | # Since: 2.12 |
| 3805 | ## |
| 3806 | { 'struct': 'SshHostKeyHash', |
| 3807 | 'data': { 'type': 'SshHostKeyCheckHashType', |
| 3808 | 'hash': 'str' }} |
| 3809 | |
| 3810 | ## |
| 3811 | # @SshHostKeyCheck: |
| 3812 | # |
| 3813 | # @mode: How to check the host key |
| 3814 | # |
| 3815 | # Since: 2.12 |
| 3816 | ## |
| 3817 | { 'union': 'SshHostKeyCheck', |
| 3818 | 'base': { 'mode': 'SshHostKeyCheckMode' }, |
| 3819 | 'discriminator': 'mode', |
| 3820 | 'data': { 'hash': 'SshHostKeyHash' } } |
| 3821 | |
| 3822 | ## |
| 3823 | # @BlockdevOptionsSsh: |
| 3824 | # |
| 3825 | # @server: host address |
| 3826 | # |
| 3827 | # @path: path to the image on the host |
| 3828 | # |
| 3829 | # @user: user as which to connect, defaults to current local user name |
| 3830 | # |
| 3831 | # @host-key-check: Defines how and what to check the host key against |
| 3832 | # (default: known_hosts) |
| 3833 | # |
| 3834 | # Since: 2.9 |
| 3835 | ## |
| 3836 | { 'struct': 'BlockdevOptionsSsh', |
| 3837 | 'data': { 'server': 'InetSocketAddress', |
| 3838 | 'path': 'str', |
| 3839 | '*user': 'str', |
| 3840 | '*host-key-check': 'SshHostKeyCheck' } } |
| 3841 | |
| 3842 | ## |
| 3843 | # @BlkdebugEvent: |
| 3844 | # |
| 3845 | # Trigger events supported by blkdebug. |
| 3846 | # |
| 3847 | # @l1_shrink_write_table: write zeros to the l1 table to shrink image. |
| 3848 | # (since 2.11) |
| 3849 | # |
| 3850 | # @l1_shrink_free_l2_clusters: discard the l2 tables. (since 2.11) |
| 3851 | # |
| 3852 | # @cor_write: a write due to copy-on-read (since 2.11) |
| 3853 | # |
| 3854 | # @cluster_alloc_space: an allocation of file space for a cluster |
| 3855 | # (since 4.1) |
| 3856 | # |
| 3857 | # @none: triggers once at creation of the blkdebug node (since 4.1) |
| 3858 | # |
| 3859 | # Since: 2.9 |
| 3860 | ## |
| 3861 | { 'enum': 'BlkdebugEvent', 'prefix': 'BLKDBG', |
| 3862 | 'data': [ 'l1_update', 'l1_grow_alloc_table', 'l1_grow_write_table', |
| 3863 | 'l1_grow_activate_table', 'l2_load', 'l2_update', |
| 3864 | 'l2_update_compressed', 'l2_alloc_cow_read', 'l2_alloc_write', |
| 3865 | 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio', |
| 3866 | 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read', |
| 3867 | 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update', |
| 3868 | 'refblock_load', 'refblock_update', 'refblock_update_part', |
| 3869 | 'refblock_alloc', 'refblock_alloc_hookup', 'refblock_alloc_write', |
| 3870 | 'refblock_alloc_write_blocks', 'refblock_alloc_write_table', |
| 3871 | 'refblock_alloc_switch_table', 'cluster_alloc', |
| 3872 | 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os', |
| 3873 | 'flush_to_disk', 'pwritev_rmw_head', 'pwritev_rmw_after_head', |
| 3874 | 'pwritev_rmw_tail', 'pwritev_rmw_after_tail', 'pwritev', |
| 3875 | 'pwritev_zero', 'pwritev_done', 'empty_image_prepare', |
| 3876 | 'l1_shrink_write_table', 'l1_shrink_free_l2_clusters', |
| 3877 | 'cor_write', 'cluster_alloc_space', 'none'] } |
| 3878 | |
| 3879 | ## |
| 3880 | # @BlkdebugIOType: |
| 3881 | # |
| 3882 | # Kinds of I/O that blkdebug can inject errors in. |
| 3883 | # |
| 3884 | # @read: .bdrv_co_preadv() |
| 3885 | # |
| 3886 | # @write: .bdrv_co_pwritev() |
| 3887 | # |
| 3888 | # @write-zeroes: .bdrv_co_pwrite_zeroes() |
| 3889 | # |
| 3890 | # @discard: .bdrv_co_pdiscard() |
| 3891 | # |
| 3892 | # @flush: .bdrv_co_flush_to_disk() |
| 3893 | # |
| 3894 | # @block-status: .bdrv_co_block_status() |
| 3895 | # |
| 3896 | # Since: 4.1 |
| 3897 | ## |
| 3898 | { 'enum': 'BlkdebugIOType', |
| 3899 | 'data': [ 'read', 'write', 'write-zeroes', 'discard', 'flush', |
| 3900 | 'block-status' ] } |
| 3901 | |
| 3902 | ## |
| 3903 | # @BlkdebugInjectErrorOptions: |
| 3904 | # |
| 3905 | # Describes a single error injection for blkdebug. |
| 3906 | # |
| 3907 | # @event: trigger event |
| 3908 | # |
| 3909 | # @state: the state identifier blkdebug needs to be in to actually |
| 3910 | # trigger the event; defaults to "any" |
| 3911 | # |
| 3912 | # @iotype: the type of I/O operations on which this error should be |
| 3913 | # injected; defaults to "all read, write, write-zeroes, discard, |
| 3914 | # and flush operations" (since: 4.1) |
| 3915 | # |
| 3916 | # @errno: error identifier (errno) to be returned; defaults to EIO |
| 3917 | # |
| 3918 | # @delay-ns: request delay before completion in nanoseconds |
| 3919 | # (default: 0, since: 11.1) |
| 3920 | # |
| 3921 | # @sector: specifies the sector index which has to be affected in |
| 3922 | # order to actually trigger the event; defaults to "any sector" |
| 3923 | # |
| 3924 | # @once: disables further events after this one has been triggered; |
| 3925 | # defaults to false |
| 3926 | # |
| 3927 | # @immediately: fail immediately; defaults to false |
| 3928 | # |
| 3929 | # Since: 2.9 |
| 3930 | ## |
| 3931 | { 'struct': 'BlkdebugInjectErrorOptions', |
| 3932 | 'data': { 'event': 'BlkdebugEvent', |
| 3933 | '*state': 'int', |
| 3934 | '*iotype': 'BlkdebugIOType', |
| 3935 | '*errno': 'int', |
| 3936 | '*delay-ns': 'int', |
| 3937 | '*sector': 'int', |
| 3938 | '*once': 'bool', |
| 3939 | '*immediately': 'bool' } } |
| 3940 | |
| 3941 | ## |
| 3942 | # @BlkdebugSetStateOptions: |
| 3943 | # |
| 3944 | # Describes a single state-change event for blkdebug. |
| 3945 | # |
| 3946 | # @event: trigger event |
| 3947 | # |
| 3948 | # @state: the current state identifier blkdebug needs to be in; |
| 3949 | # defaults to "any" |
| 3950 | # |
| 3951 | # @new_state: the state identifier blkdebug is supposed to assume if |
| 3952 | # this event is triggered |
| 3953 | # |
| 3954 | # Since: 2.9 |
| 3955 | ## |
| 3956 | { 'struct': 'BlkdebugSetStateOptions', |
| 3957 | 'data': { 'event': 'BlkdebugEvent', |
| 3958 | '*state': 'int', |
| 3959 | 'new_state': 'int' } } |
| 3960 | |
| 3961 | ## |
| 3962 | # @BlockdevOptionsBlkdebug: |
| 3963 | # |
| 3964 | # Driver specific block device options for blkdebug. |
| 3965 | # |
| 3966 | # @image: underlying raw block device (or image file) |
| 3967 | # |
| 3968 | # @config: filename of the configuration file |
| 3969 | # |
| 3970 | # @align: required alignment for requests in bytes, must be positive |
| 3971 | # power of 2, or 0 for default |
| 3972 | # |
| 3973 | # @max-transfer: maximum size for I/O transfers in bytes, must be |
| 3974 | # positive multiple of @align and of the underlying file's request |
| 3975 | # alignment (but need not be a power of 2), or 0 for default |
| 3976 | # (since 2.10) |
| 3977 | # |
| 3978 | # @opt-write-zero: preferred alignment for write zero requests in |
| 3979 | # bytes, must be positive multiple of @align and of the underlying |
| 3980 | # file's request alignment (but need not be a power of 2), or 0 |
| 3981 | # for default (since 2.10) |
| 3982 | # |
| 3983 | # @max-write-zero: maximum size for write zero requests in bytes, must |
| 3984 | # be positive multiple of @align, of @opt-write-zero, and of the |
| 3985 | # underlying file's request alignment (but need not be a power of |
| 3986 | # 2), or 0 for default (since 2.10) |
| 3987 | # |
| 3988 | # @opt-discard: preferred alignment for discard requests in bytes, |
| 3989 | # must be positive multiple of @align and of the underlying file's |
| 3990 | # request alignment (but need not be a power of 2), or 0 for |
| 3991 | # default (since 2.10) |
| 3992 | # |
| 3993 | # @max-discard: maximum size for discard requests in bytes, must be |
| 3994 | # positive multiple of @align, of @opt-discard, and of the |
| 3995 | # underlying file's request alignment (but need not be a power of |
| 3996 | # 2), or 0 for default (since 2.10) |
| 3997 | # |
| 3998 | # @inject-error: array of error injection descriptions |
| 3999 | # |
| 4000 | # @set-state: array of state-change descriptions |
| 4001 | # |
| 4002 | # @take-child-perms: Permissions to take on @image in addition to what |
| 4003 | # is necessary anyway (which depends on how the blkdebug node is |
| 4004 | # used). Defaults to none. (since 5.0) |
| 4005 | # |
| 4006 | # @unshare-child-perms: Permissions not to share on @image in addition |
| 4007 | # to what cannot be shared anyway (which depends on how the |
| 4008 | # blkdebug node is used). Defaults to none. (since 5.0) |
| 4009 | # |
| 4010 | # Since: 2.9 |
| 4011 | ## |
| 4012 | { 'struct': 'BlockdevOptionsBlkdebug', |
| 4013 | 'data': { 'image': 'BlockdevRef', |
| 4014 | '*config': 'str', |
| 4015 | '*align': 'int', '*max-transfer': 'int32', |
| 4016 | '*opt-write-zero': 'int32', '*max-write-zero': 'int32', |
| 4017 | '*opt-discard': 'int32', '*max-discard': 'int32', |
| 4018 | '*inject-error': ['BlkdebugInjectErrorOptions'], |
| 4019 | '*set-state': ['BlkdebugSetStateOptions'], |
| 4020 | '*take-child-perms': ['BlockPermission'], |
| 4021 | '*unshare-child-perms': ['BlockPermission'] } } |
| 4022 | |
| 4023 | ## |
| 4024 | # @BlockdevOptionsBlklogwrites: |
| 4025 | # |
| 4026 | # Driver specific block device options for blklogwrites. |
| 4027 | # |
| 4028 | # @file: block device |
| 4029 | # |
| 4030 | # @log: block device used to log writes to @file |
| 4031 | # |
| 4032 | # @log-sector-size: sector size used in logging writes to @file, |
| 4033 | # determines granularity of offsets and sizes of writes |
| 4034 | # (default: 512) |
| 4035 | # |
| 4036 | # @log-append: append to an existing log (default: false) |
| 4037 | # |
| 4038 | # @log-super-update-interval: interval of write requests after which |
| 4039 | # the log super block is updated to disk (default: 4096) |
| 4040 | # |
| 4041 | # Since: 3.0 |
| 4042 | ## |
| 4043 | { 'struct': 'BlockdevOptionsBlklogwrites', |
| 4044 | 'data': { 'file': 'BlockdevRef', |
| 4045 | 'log': 'BlockdevRef', |
| 4046 | '*log-sector-size': 'uint32', |
| 4047 | '*log-append': 'bool', |
| 4048 | '*log-super-update-interval': 'uint64' } } |
| 4049 | |
| 4050 | ## |
| 4051 | # @BlockdevOptionsBlkverify: |
| 4052 | # |
| 4053 | # Driver specific block device options for blkverify. |
| 4054 | # |
| 4055 | # @test: block device to be tested |
| 4056 | # |
| 4057 | # @raw: raw image used for verification |
| 4058 | # |
| 4059 | # Since: 2.9 |
| 4060 | ## |
| 4061 | { 'struct': 'BlockdevOptionsBlkverify', |
| 4062 | 'data': { 'test': 'BlockdevRef', |
| 4063 | 'raw': 'BlockdevRef' } } |
| 4064 | |
| 4065 | ## |
| 4066 | # @BlockdevOptionsBlkreplay: |
| 4067 | # |
| 4068 | # Driver specific block device options for blkreplay. |
| 4069 | # |
| 4070 | # @image: disk image which should be controlled with blkreplay |
| 4071 | # |
| 4072 | # Since: 4.2 |
| 4073 | ## |
| 4074 | { 'struct': 'BlockdevOptionsBlkreplay', |
| 4075 | 'data': { 'image': 'BlockdevRef' } } |
| 4076 | |
| 4077 | ## |
| 4078 | # @QuorumReadPattern: |
| 4079 | # |
| 4080 | # An enumeration of quorum read patterns. |
| 4081 | # |
| 4082 | # @quorum: read all the children and do a quorum vote on reads |
| 4083 | # |
| 4084 | # @fifo: read only from the first child that has not failed |
| 4085 | # |
| 4086 | # Since: 2.9 |
| 4087 | ## |
| 4088 | { 'enum': 'QuorumReadPattern', 'data': [ 'quorum', 'fifo' ] } |
| 4089 | |
| 4090 | ## |
| 4091 | # @BlockdevOptionsQuorum: |
| 4092 | # |
| 4093 | # Driver specific block device options for Quorum |
| 4094 | # |
| 4095 | # @blkverify: true if the driver must print content mismatch set to |
| 4096 | # false by default |
| 4097 | # |
| 4098 | # @children: the children block devices to use |
| 4099 | # |
| 4100 | # @vote-threshold: the vote limit under which a read will fail |
| 4101 | # |
| 4102 | # @rewrite-corrupted: rewrite corrupted data when quorum is reached |
| 4103 | # (Since 2.1) |
| 4104 | # |
| 4105 | # @read-pattern: choose read pattern and set to quorum by default |
| 4106 | # (Since 2.2) |
| 4107 | # |
| 4108 | # Since: 2.9 |
| 4109 | ## |
| 4110 | { 'struct': 'BlockdevOptionsQuorum', |
| 4111 | 'data': { '*blkverify': 'bool', |
| 4112 | 'children': [ 'BlockdevRef' ], |
| 4113 | 'vote-threshold': 'int', |
| 4114 | '*rewrite-corrupted': 'bool', |
| 4115 | '*read-pattern': 'QuorumReadPattern' } } |
| 4116 | |
| 4117 | ## |
| 4118 | # @BlockdevOptionsIoUring: |
| 4119 | # |
| 4120 | # Driver specific block device options for the io_uring backend. |
| 4121 | # |
| 4122 | # @filename: path to the image file |
| 4123 | # |
| 4124 | # Since: 7.2 |
| 4125 | ## |
| 4126 | { 'struct': 'BlockdevOptionsIoUring', |
| 4127 | 'data': { 'filename': 'str' }, |
| 4128 | 'if': 'CONFIG_BLKIO' } |
| 4129 | |
| 4130 | ## |
| 4131 | # @BlockdevOptionsNvmeIoUring: |
| 4132 | # |
| 4133 | # Driver specific block device options for the nvme-io_uring backend. |
| 4134 | # |
| 4135 | # @path: path to the NVMe namespace's character device (e.g. |
| 4136 | # /dev/ng0n1). |
| 4137 | # |
| 4138 | # Since: 7.2 |
| 4139 | ## |
| 4140 | { 'struct': 'BlockdevOptionsNvmeIoUring', |
| 4141 | 'data': { 'path': 'str' }, |
| 4142 | 'if': 'CONFIG_BLKIO' } |
| 4143 | |
| 4144 | ## |
| 4145 | # @BlockdevOptionsVirtioBlkVfioPci: |
| 4146 | # |
| 4147 | # Driver specific block device options for the virtio-blk-vfio-pci |
| 4148 | # backend. |
| 4149 | # |
| 4150 | # @path: path to the PCI device's sysfs directory (e.g. |
| 4151 | # /sys/bus/pci/devices/0000:00:01.0). |
| 4152 | # |
| 4153 | # Since: 7.2 |
| 4154 | ## |
| 4155 | { 'struct': 'BlockdevOptionsVirtioBlkVfioPci', |
| 4156 | 'data': { 'path': 'str' }, |
| 4157 | 'if': 'CONFIG_BLKIO' } |
| 4158 | |
| 4159 | ## |
| 4160 | # @BlockdevOptionsVirtioBlkVhostUser: |
| 4161 | # |
| 4162 | # Driver specific block device options for the virtio-blk-vhost-user |
| 4163 | # backend. |
| 4164 | # |
| 4165 | # @path: path to the vhost-user UNIX domain socket. |
| 4166 | # |
| 4167 | # Since: 7.2 |
| 4168 | ## |
| 4169 | { 'struct': 'BlockdevOptionsVirtioBlkVhostUser', |
| 4170 | 'data': { 'path': 'str' }, |
| 4171 | 'if': 'CONFIG_BLKIO' } |
| 4172 | |
| 4173 | ## |
| 4174 | # @BlockdevOptionsVirtioBlkVhostVdpa: |
| 4175 | # |
| 4176 | # Driver specific block device options for the virtio-blk-vhost-vdpa |
| 4177 | # backend. |
| 4178 | # |
| 4179 | # @path: path to the vhost-vdpa character device. |
| 4180 | # |
| 4181 | # Features: |
| 4182 | # |
| 4183 | # @fdset: Member @path supports the special "/dev/fdset/N" path |
| 4184 | # (since 8.1) |
| 4185 | # |
| 4186 | # Since: 7.2 |
| 4187 | ## |
| 4188 | { 'struct': 'BlockdevOptionsVirtioBlkVhostVdpa', |
| 4189 | 'data': { 'path': 'str' }, |
| 4190 | 'features': [ { 'name' :'fdset', |
| 4191 | 'if': 'CONFIG_BLKIO_VHOST_VDPA_FD' } ], |
| 4192 | 'if': 'CONFIG_BLKIO' } |
| 4193 | |
| 4194 | ## |
| 4195 | # @IscsiTransport: |
| 4196 | # |
| 4197 | # An enumeration of libiscsi transport types |
| 4198 | # |
| 4199 | # Since: 2.9 |
| 4200 | ## |
| 4201 | { 'enum': 'IscsiTransport', |
| 4202 | 'data': [ 'tcp', 'iser' ] } |
| 4203 | |
| 4204 | ## |
| 4205 | # @IscsiHeaderDigest: |
| 4206 | # |
| 4207 | # An enumeration of header digests supported by libiscsi |
| 4208 | # |
| 4209 | # Since: 2.9 |
| 4210 | ## |
| 4211 | { 'enum': 'IscsiHeaderDigest', |
| 4212 | 'prefix': 'QAPI_ISCSI_HEADER_DIGEST', |
| 4213 | 'data': [ 'crc32c', 'none', 'crc32c-none', 'none-crc32c' ] } |
| 4214 | |
| 4215 | ## |
| 4216 | # @BlockdevOptionsIscsi: |
| 4217 | # |
| 4218 | # Driver specific block device options for iscsi |
| 4219 | # |
| 4220 | # @transport: The iscsi transport type |
| 4221 | # |
| 4222 | # @portal: The address of the iscsi portal |
| 4223 | # |
| 4224 | # @target: The target iqn name |
| 4225 | # |
| 4226 | # @lun: LUN to connect to. Defaults to 0. |
| 4227 | # |
| 4228 | # @user: User name to log in with. If omitted, no CHAP authentication |
| 4229 | # is performed. |
| 4230 | # |
| 4231 | # @password-secret: The ID of a QCryptoSecret object providing the |
| 4232 | # password for the login. This option is required if @user is |
| 4233 | # specified. |
| 4234 | # |
| 4235 | # @initiator-name: The iqn name we want to identify to the target as. |
| 4236 | # If this option is not specified, an initiator name is generated |
| 4237 | # automatically. |
| 4238 | # |
| 4239 | # @header-digest: The desired header digest. Defaults to none-crc32c. |
| 4240 | # |
| 4241 | # @timeout: Timeout in seconds after which a request will timeout. 0 |
| 4242 | # means no timeout and is the default. |
| 4243 | # |
| 4244 | # Since: 2.9 |
| 4245 | ## |
| 4246 | { 'struct': 'BlockdevOptionsIscsi', |
| 4247 | 'data': { 'transport': 'IscsiTransport', |
| 4248 | 'portal': 'str', |
| 4249 | 'target': 'str', |
| 4250 | '*lun': 'int', |
| 4251 | '*user': 'str', |
| 4252 | '*password-secret': 'str', |
| 4253 | '*initiator-name': 'str', |
| 4254 | '*header-digest': 'IscsiHeaderDigest', |
| 4255 | '*timeout': 'int' } } |
| 4256 | |
| 4257 | ## |
| 4258 | # @RbdAuthMode: |
| 4259 | # |
| 4260 | # Since: 3.0 |
| 4261 | ## |
| 4262 | { 'enum': 'RbdAuthMode', |
| 4263 | 'data': [ 'cephx', 'none' ] } |
| 4264 | |
| 4265 | ## |
| 4266 | # @RbdImageEncryptionFormat: |
| 4267 | # |
| 4268 | # @luks-any: Used for opening either luks or luks2 (Since 8.0) |
| 4269 | # |
| 4270 | # Since: 6.1 |
| 4271 | ## |
| 4272 | { 'enum': 'RbdImageEncryptionFormat', |
| 4273 | 'data': [ 'luks', 'luks2', 'luks-any' ] } |
| 4274 | |
| 4275 | ## |
| 4276 | # @RbdEncryptionOptionsLUKSBase: |
| 4277 | # |
| 4278 | # @key-secret: ID of a QCryptoSecret object providing a passphrase for |
| 4279 | # unlocking the encryption |
| 4280 | # |
| 4281 | # Since: 6.1 |
| 4282 | ## |
| 4283 | { 'struct': 'RbdEncryptionOptionsLUKSBase', |
| 4284 | 'data': { 'key-secret': 'str' } } |
| 4285 | |
| 4286 | ## |
| 4287 | # @RbdEncryptionCreateOptionsLUKSBase: |
| 4288 | # |
| 4289 | # @cipher-alg: The encryption algorithm |
| 4290 | # |
| 4291 | # Since: 6.1 |
| 4292 | ## |
| 4293 | { 'struct': 'RbdEncryptionCreateOptionsLUKSBase', |
| 4294 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4295 | 'data': { '*cipher-alg': 'QCryptoCipherAlgo' } } |
| 4296 | |
| 4297 | ## |
| 4298 | # @RbdEncryptionOptionsLUKS: |
| 4299 | # |
| 4300 | # Since: 6.1 |
| 4301 | ## |
| 4302 | { 'struct': 'RbdEncryptionOptionsLUKS', |
| 4303 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4304 | 'data': { } } |
| 4305 | |
| 4306 | ## |
| 4307 | # @RbdEncryptionOptionsLUKS2: |
| 4308 | # |
| 4309 | # Since: 6.1 |
| 4310 | ## |
| 4311 | { 'struct': 'RbdEncryptionOptionsLUKS2', |
| 4312 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4313 | 'data': { } } |
| 4314 | |
| 4315 | ## |
| 4316 | # @RbdEncryptionOptionsLUKSAny: |
| 4317 | # |
| 4318 | # Since: 8.0 |
| 4319 | ## |
| 4320 | { 'struct': 'RbdEncryptionOptionsLUKSAny', |
| 4321 | 'base': 'RbdEncryptionOptionsLUKSBase', |
| 4322 | 'data': { } } |
| 4323 | |
| 4324 | ## |
| 4325 | # @RbdEncryptionCreateOptionsLUKS: |
| 4326 | # |
| 4327 | # Since: 6.1 |
| 4328 | ## |
| 4329 | { 'struct': 'RbdEncryptionCreateOptionsLUKS', |
| 4330 | 'base': 'RbdEncryptionCreateOptionsLUKSBase', |
| 4331 | 'data': { } } |
| 4332 | |
| 4333 | ## |
| 4334 | # @RbdEncryptionCreateOptionsLUKS2: |
| 4335 | # |
| 4336 | # Since: 6.1 |
| 4337 | ## |
| 4338 | { 'struct': 'RbdEncryptionCreateOptionsLUKS2', |
| 4339 | 'base': 'RbdEncryptionCreateOptionsLUKSBase', |
| 4340 | 'data': { } } |
| 4341 | |
| 4342 | ## |
| 4343 | # @RbdEncryptionOptions: |
| 4344 | # |
| 4345 | # @format: Encryption format. |
| 4346 | # |
| 4347 | # @parent: Parent image encryption options (for cloned images). Can |
| 4348 | # be left unspecified if this cloned image is encrypted using the |
| 4349 | # same format and secret as its parent image (i.e. not explicitly |
| 4350 | # formatted) or if its parent image is not encrypted. (Since 8.0) |
| 4351 | # |
| 4352 | # Since: 6.1 |
| 4353 | ## |
| 4354 | { 'union': 'RbdEncryptionOptions', |
| 4355 | 'base': { 'format': 'RbdImageEncryptionFormat', |
| 4356 | '*parent': 'RbdEncryptionOptions' }, |
| 4357 | 'discriminator': 'format', |
| 4358 | 'data': { 'luks': 'RbdEncryptionOptionsLUKS', |
| 4359 | 'luks2': 'RbdEncryptionOptionsLUKS2', |
| 4360 | 'luks-any': 'RbdEncryptionOptionsLUKSAny'} } |
| 4361 | |
| 4362 | ## |
| 4363 | # @RbdEncryptionCreateOptions: |
| 4364 | # |
| 4365 | # @format: Encryption format. |
| 4366 | # |
| 4367 | # Since: 6.1 |
| 4368 | ## |
| 4369 | { 'union': 'RbdEncryptionCreateOptions', |
| 4370 | 'base': { 'format': 'RbdImageEncryptionFormat' }, |
| 4371 | 'discriminator': 'format', |
| 4372 | 'data': { 'luks': 'RbdEncryptionCreateOptionsLUKS', |
| 4373 | 'luks2': 'RbdEncryptionCreateOptionsLUKS2' } } |
| 4374 | |
| 4375 | ## |
| 4376 | # @BlockdevOptionsRbd: |
| 4377 | # |
| 4378 | # @pool: Ceph pool name. |
| 4379 | # |
| 4380 | # @namespace: Rados namespace name in the Ceph pool. (Since 5.0) |
| 4381 | # |
| 4382 | # @image: Image name in the Ceph pool. |
| 4383 | # |
| 4384 | # @conf: path to Ceph configuration file. Values in the configuration |
| 4385 | # file will be overridden by options specified via QAPI. |
| 4386 | # |
| 4387 | # @snapshot: Ceph snapshot name. |
| 4388 | # |
| 4389 | # @encrypt: Image encryption options. (Since 6.1) |
| 4390 | # |
| 4391 | # @user: Ceph id name. |
| 4392 | # |
| 4393 | # @auth-client-required: Acceptable authentication modes. This maps |
| 4394 | # to Ceph configuration option "auth_client_required". |
| 4395 | # (Since 3.0) |
| 4396 | # |
| 4397 | # @key-secret: ID of a QCryptoSecret object providing a key for cephx |
| 4398 | # authentication. This maps to Ceph configuration option "key". |
| 4399 | # (Since 3.0) |
| 4400 | # |
| 4401 | # @server: Monitor host address and port. This maps to the "mon_host" |
| 4402 | # Ceph option. |
| 4403 | # |
| 4404 | # Since: 2.9 |
| 4405 | ## |
| 4406 | { 'struct': 'BlockdevOptionsRbd', |
| 4407 | 'data': { 'pool': 'str', |
| 4408 | '*namespace': 'str', |
| 4409 | 'image': 'str', |
| 4410 | '*conf': 'str', |
| 4411 | '*snapshot': 'str', |
| 4412 | '*encrypt': 'RbdEncryptionOptions', |
| 4413 | '*user': 'str', |
| 4414 | '*auth-client-required': ['RbdAuthMode'], |
| 4415 | '*key-secret': 'str', |
| 4416 | '*server': ['InetSocketAddressBase'] } } |
| 4417 | |
| 4418 | ## |
| 4419 | # @ReplicationMode: |
| 4420 | # |
| 4421 | # An enumeration of replication modes. |
| 4422 | # |
| 4423 | # @primary: Primary mode, the vm's state will be sent to secondary |
| 4424 | # QEMU. |
| 4425 | # |
| 4426 | # @secondary: Secondary mode, receive the vm's state from primary |
| 4427 | # QEMU. |
| 4428 | # |
| 4429 | # Since: 2.9 |
| 4430 | ## |
| 4431 | { 'enum' : 'ReplicationMode', 'data' : [ 'primary', 'secondary' ], |
| 4432 | 'if': 'CONFIG_REPLICATION' } |
| 4433 | |
| 4434 | ## |
| 4435 | # @BlockdevOptionsReplication: |
| 4436 | # |
| 4437 | # Driver specific block device options for replication |
| 4438 | # |
| 4439 | # @mode: the replication mode |
| 4440 | # |
| 4441 | # @top-id: In secondary mode, node name or device ID of the root node |
| 4442 | # who owns the replication node chain. Must not be given in |
| 4443 | # primary mode. |
| 4444 | # |
| 4445 | # Since: 2.9 |
| 4446 | ## |
| 4447 | { 'struct': 'BlockdevOptionsReplication', |
| 4448 | 'base': 'BlockdevOptionsGenericFormat', |
| 4449 | 'data': { 'mode': 'ReplicationMode', |
| 4450 | '*top-id': 'str' }, |
| 4451 | 'if': 'CONFIG_REPLICATION' } |
| 4452 | |
| 4453 | ## |
| 4454 | # @NFSTransport: |
| 4455 | # |
| 4456 | # An enumeration of NFS transport types |
| 4457 | # |
| 4458 | # @inet: TCP transport |
| 4459 | # |
| 4460 | # Since: 2.9 |
| 4461 | ## |
| 4462 | { 'enum': 'NFSTransport', |
| 4463 | 'data': [ 'inet' ] } |
| 4464 | |
| 4465 | ## |
| 4466 | # @NFSServer: |
| 4467 | # |
| 4468 | # Captures the address of the socket |
| 4469 | # |
| 4470 | # @type: transport type used for NFS (only TCP supported) |
| 4471 | # |
| 4472 | # @host: host address for NFS server |
| 4473 | # |
| 4474 | # Since: 2.9 |
| 4475 | ## |
| 4476 | { 'struct': 'NFSServer', |
| 4477 | 'data': { 'type': 'NFSTransport', |
| 4478 | 'host': 'str' } } |
| 4479 | |
| 4480 | ## |
| 4481 | # @BlockdevOptionsNfs: |
| 4482 | # |
| 4483 | # Driver specific block device option for NFS |
| 4484 | # |
| 4485 | # @server: host address |
| 4486 | # |
| 4487 | # @path: path of the image on the host |
| 4488 | # |
| 4489 | # @user: UID value to use when talking to the server (defaults to |
| 4490 | # 65534 on Windows and getuid() on unix) |
| 4491 | # |
| 4492 | # @group: GID value to use when talking to the server (defaults to |
| 4493 | # 65534 on Windows and getgid() in unix) |
| 4494 | # |
| 4495 | # @tcp-syn-count: number of SYNs during the session establishment |
| 4496 | # (defaults to libnfs default) |
| 4497 | # |
| 4498 | # @readahead-size: set the readahead size in bytes (defaults to libnfs |
| 4499 | # default) |
| 4500 | # |
| 4501 | # @page-cache-size: set the pagecache size in bytes (defaults to |
| 4502 | # libnfs default) |
| 4503 | # |
| 4504 | # @debug: set the NFS debug level (max 2) (defaults to libnfs default) |
| 4505 | # |
| 4506 | # Since: 2.9 |
| 4507 | ## |
| 4508 | { 'struct': 'BlockdevOptionsNfs', |
| 4509 | 'data': { 'server': 'NFSServer', |
| 4510 | 'path': 'str', |
| 4511 | '*user': 'int', |
| 4512 | '*group': 'int', |
| 4513 | '*tcp-syn-count': 'int', |
| 4514 | '*readahead-size': 'int', |
| 4515 | '*page-cache-size': 'int', |
| 4516 | '*debug': 'int' } } |
| 4517 | |
| 4518 | ## |
| 4519 | # @BlockdevOptionsCurlBase: |
| 4520 | # |
| 4521 | # Driver specific block device options shared by all protocols |
| 4522 | # supported by the curl backend. |
| 4523 | # |
| 4524 | # @url: URL of the image file |
| 4525 | # |
| 4526 | # @readahead: Size of the read-ahead cache; must be a multiple of 512 |
| 4527 | # (defaults to 256 kB) |
| 4528 | # |
| 4529 | # @timeout: Timeout for connections, in seconds (defaults to 5) |
| 4530 | # |
| 4531 | # @username: Username for authentication (defaults to none) |
| 4532 | # |
| 4533 | # @password-secret: ID of a QCryptoSecret object providing a password |
| 4534 | # for authentication (defaults to no password) |
| 4535 | # |
| 4536 | # @proxy-username: Username for proxy authentication (defaults to |
| 4537 | # none) |
| 4538 | # |
| 4539 | # @proxy-password-secret: ID of a QCryptoSecret object providing a |
| 4540 | # password for proxy authentication (defaults to no password) |
| 4541 | # |
| 4542 | # Since: 2.9 |
| 4543 | ## |
| 4544 | { 'struct': 'BlockdevOptionsCurlBase', |
| 4545 | 'data': { 'url': 'str', |
| 4546 | '*readahead': 'int', |
| 4547 | '*timeout': 'int', |
| 4548 | '*username': 'str', |
| 4549 | '*password-secret': 'str', |
| 4550 | '*proxy-username': 'str', |
| 4551 | '*proxy-password-secret': 'str' } } |
| 4552 | |
| 4553 | ## |
| 4554 | # @BlockdevOptionsCurlHttp: |
| 4555 | # |
| 4556 | # Driver specific block device options for HTTP connections over the |
| 4557 | # curl backend. URLs must start with "http://". |
| 4558 | # |
| 4559 | # @cookie: List of cookies to set; format is "name1=content1; |
| 4560 | # name2=content2;" as explained by CURLOPT_COOKIE(3). Defaults to |
| 4561 | # no cookies. |
| 4562 | # |
| 4563 | # @cookie-secret: ID of a QCryptoSecret object providing the cookie |
| 4564 | # data in a secure way. See @cookie for the format. (since 2.10) |
| 4565 | # |
| 4566 | # @force-range: Don't issue a HEAD HTTP request to discover if the |
| 4567 | # http server supports range requests and rely only on GET |
| 4568 | # requests. This is especially useful for S3 presigned URLs where |
| 4569 | # HEAD requests are unauthorized. (default: false; since 11.0) |
| 4570 | # |
| 4571 | # Since: 2.9 |
| 4572 | ## |
| 4573 | { 'struct': 'BlockdevOptionsCurlHttp', |
| 4574 | 'base': 'BlockdevOptionsCurlBase', |
| 4575 | 'data': { '*cookie': 'str', |
| 4576 | '*cookie-secret': 'str', |
| 4577 | '*force-range': 'bool'} } |
| 4578 | |
| 4579 | ## |
| 4580 | # @BlockdevOptionsCurlHttps: |
| 4581 | # |
| 4582 | # Driver specific block device options for HTTPS connections over the |
| 4583 | # curl backend. URLs must start with "https://". |
| 4584 | # |
| 4585 | # @sslverify: Whether to verify the SSL certificate's validity |
| 4586 | # (defaults to true) |
| 4587 | # |
| 4588 | # Since: 2.9 |
| 4589 | ## |
| 4590 | { 'struct': 'BlockdevOptionsCurlHttps', |
| 4591 | 'base': 'BlockdevOptionsCurlHttp', |
| 4592 | 'data': { '*sslverify': 'bool'} } |
| 4593 | |
| 4594 | ## |
| 4595 | # @BlockdevOptionsCurlFtp: |
| 4596 | # |
| 4597 | # Driver specific block device options for FTP connections over the |
| 4598 | # curl backend. URLs must start with "ftp://". |
| 4599 | # |
| 4600 | # Since: 2.9 |
| 4601 | ## |
| 4602 | { 'struct': 'BlockdevOptionsCurlFtp', |
| 4603 | 'base': 'BlockdevOptionsCurlBase', |
| 4604 | 'data': { } } |
| 4605 | |
| 4606 | ## |
| 4607 | # @BlockdevOptionsCurlFtps: |
| 4608 | # |
| 4609 | # Driver specific block device options for FTPS connections over the |
| 4610 | # curl backend. URLs must start with "ftps://". |
| 4611 | # |
| 4612 | # @sslverify: Whether to verify the SSL certificate's validity |
| 4613 | # (defaults to true) |
| 4614 | # |
| 4615 | # Since: 2.9 |
| 4616 | ## |
| 4617 | { 'struct': 'BlockdevOptionsCurlFtps', |
| 4618 | 'base': 'BlockdevOptionsCurlBase', |
| 4619 | 'data': { '*sslverify': 'bool' } } |
| 4620 | |
| 4621 | ## |
| 4622 | # @BlockdevOptionsNbd: |
| 4623 | # |
| 4624 | # Driver specific block device options for NBD. |
| 4625 | # |
| 4626 | # @server: NBD server address |
| 4627 | # |
| 4628 | # @export: export name |
| 4629 | # |
| 4630 | # @tls-creds: TLS credentials ID |
| 4631 | # |
| 4632 | # @tls-hostname: TLS hostname override for certificate validation |
| 4633 | # (Since 7.0) |
| 4634 | # |
| 4635 | # @x-dirty-bitmap: A metadata context name such as |
| 4636 | # "qemu:dirty-bitmap:NAME" or "qemu:allocation-depth" to query in |
| 4637 | # place of the traditional "base:allocation" block status (see |
| 4638 | # NBD_OPT_LIST_META_CONTEXT in the NBD protocol; and yes, naming |
| 4639 | # this option x-context would have made more sense) (since 3.0) |
| 4640 | # |
| 4641 | # @reconnect-delay: On an unexpected disconnect, the nbd client tries |
| 4642 | # to connect again until succeeding or encountering a serious |
| 4643 | # error. During the first @reconnect-delay seconds, all requests |
| 4644 | # are paused and will be rerun on a successful reconnect. After |
| 4645 | # that time, any delayed requests and all future requests before a |
| 4646 | # successful reconnect will immediately fail. Default 0 |
| 4647 | # (Since 4.2) |
| 4648 | # |
| 4649 | # @open-timeout: In seconds. If zero, the nbd driver tries the |
| 4650 | # connection only once, and fails to open if the connection fails. |
| 4651 | # If non-zero, the nbd driver will repeat connection attempts |
| 4652 | # until successful or until @open-timeout seconds have elapsed. |
| 4653 | # Default 0 (Since 7.0) |
| 4654 | # |
| 4655 | # Features: |
| 4656 | # |
| 4657 | # @unstable: Member @x-dirty-bitmap is experimental. |
| 4658 | # |
| 4659 | # Since: 2.9 |
| 4660 | ## |
| 4661 | { 'struct': 'BlockdevOptionsNbd', |
| 4662 | 'data': { 'server': 'SocketAddress', |
| 4663 | '*export': 'str', |
| 4664 | '*tls-creds': 'str', |
| 4665 | '*tls-hostname': 'str', |
| 4666 | '*x-dirty-bitmap': { 'type': 'str', 'features': [ 'unstable' ] }, |
| 4667 | '*reconnect-delay': 'uint32', |
| 4668 | '*open-timeout': 'uint32' } } |
| 4669 | |
| 4670 | ## |
| 4671 | # @BlockdevOptionsRaw: |
| 4672 | # |
| 4673 | # Driver specific block device options for the raw driver. |
| 4674 | # |
| 4675 | # @offset: position where the block device starts |
| 4676 | # |
| 4677 | # @size: the assumed size of the device |
| 4678 | # |
| 4679 | # Since: 2.9 |
| 4680 | ## |
| 4681 | { 'struct': 'BlockdevOptionsRaw', |
| 4682 | 'base': 'BlockdevOptionsGenericFormat', |
| 4683 | 'data': { '*offset': 'int', '*size': 'int' } } |
| 4684 | |
| 4685 | ## |
| 4686 | # @BlockdevOptionsThrottle: |
| 4687 | # |
| 4688 | # Driver specific block device options for the throttle driver |
| 4689 | # |
| 4690 | # @throttle-group: the name of the throttle-group object to use. It |
| 4691 | # must already exist. |
| 4692 | # |
| 4693 | # @file: reference to or definition of the data source block device |
| 4694 | # |
| 4695 | # Since: 2.11 |
| 4696 | ## |
| 4697 | { 'struct': 'BlockdevOptionsThrottle', |
| 4698 | 'data': { 'throttle-group': 'str', |
| 4699 | 'file' : 'BlockdevRef' |
| 4700 | } } |
| 4701 | |
| 4702 | ## |
| 4703 | # @BlockdevOptionsCor: |
| 4704 | # |
| 4705 | # Driver specific block device options for the copy-on-read driver. |
| 4706 | # |
| 4707 | # @bottom: The name of a non-filter node (allocation-bearing layer) |
| 4708 | # that limits the COR operations in the backing chain (inclusive), |
| 4709 | # so that no data below this node will be copied by this filter. |
| 4710 | # If option is absent, the limit is not applied, so that data from |
| 4711 | # all backing layers may be copied. |
| 4712 | # |
| 4713 | # Since: 6.0 |
| 4714 | ## |
| 4715 | { 'struct': 'BlockdevOptionsCor', |
| 4716 | 'base': 'BlockdevOptionsGenericFormat', |
| 4717 | 'data': { '*bottom': 'str' } } |
| 4718 | |
| 4719 | ## |
| 4720 | # @OnCbwError: |
| 4721 | # |
| 4722 | # An enumeration of possible behaviors for copy-before-write operation |
| 4723 | # failures. |
| 4724 | # |
| 4725 | # @break-guest-write: report the error to the guest. This way, the |
| 4726 | # guest will not be able to overwrite areas that cannot be backed |
| 4727 | # up, so the backup process remains valid. |
| 4728 | # |
| 4729 | # @break-snapshot: continue guest write. Doing so will make the |
| 4730 | # provided snapshot state invalid and any backup or export process |
| 4731 | # based on it will finally fail. |
| 4732 | # |
| 4733 | # Since: 7.1 |
| 4734 | ## |
| 4735 | { 'enum': 'OnCbwError', |
| 4736 | 'data': [ 'break-guest-write', 'break-snapshot' ] } |
| 4737 | |
| 4738 | ## |
| 4739 | # @BlockdevOptionsCbw: |
| 4740 | # |
| 4741 | # Driver specific block device options for the copy-before-write |
| 4742 | # driver, which does so called copy-before-write operations: when data |
| 4743 | # is written to the filter, the filter first reads corresponding |
| 4744 | # blocks from its file child and copies them to @target child. After |
| 4745 | # successfully copying, the write request is propagated to file child. |
| 4746 | # If copying fails, the original write request is failed too and no |
| 4747 | # data is written to file child. |
| 4748 | # |
| 4749 | # @target: The target for copy-before-write operations. |
| 4750 | # |
| 4751 | # @bitmap: If specified, copy-before-write filter will do |
| 4752 | # copy-before-write operations only for dirty regions of the |
| 4753 | # bitmap. Bitmap size must be equal to length of file and target |
| 4754 | # child of the filter. Note also, that bitmap is used only to |
| 4755 | # initialize internal bitmap of the process, so further |
| 4756 | # modifications (or removing) of specified bitmap doesn't |
| 4757 | # influence the filter. (Since 7.0) |
| 4758 | # |
| 4759 | # @on-cbw-error: Behavior on failure of copy-before-write operation. |
| 4760 | # Default is @break-guest-write. (Since 7.1) |
| 4761 | # |
| 4762 | # @cbw-timeout: Zero means no limit. Non-zero sets the timeout in |
| 4763 | # seconds for copy-before-write operation. When a timeout occurs, |
| 4764 | # the respective copy-before-write operation will fail, and the |
| 4765 | # @on-cbw-error parameter will decide how this failure is handled. |
| 4766 | # Default 0. (Since 7.1) |
| 4767 | # |
| 4768 | # @min-cluster-size: Minimum size of blocks used by copy-before-write |
| 4769 | # operations. Has to be a power of 2. No effect if smaller than |
| 4770 | # the maximum of the target's cluster size and 64 KiB. Default 0. |
| 4771 | # (Since 9.2) |
| 4772 | # |
| 4773 | # Since: 6.2 |
| 4774 | ## |
| 4775 | { 'struct': 'BlockdevOptionsCbw', |
| 4776 | 'base': 'BlockdevOptionsGenericFormat', |
| 4777 | 'data': { 'target': 'BlockdevRef', '*bitmap': 'BlockDirtyBitmap', |
| 4778 | '*on-cbw-error': 'OnCbwError', '*cbw-timeout': 'uint32', |
| 4779 | '*min-cluster-size': 'size' } } |
| 4780 | |
| 4781 | ## |
| 4782 | # @BlockdevOptions: |
| 4783 | # |
| 4784 | # Options for creating a block device. Many options are available for |
| 4785 | # all block devices, independent of the block driver: |
| 4786 | # |
| 4787 | # @driver: block driver name |
| 4788 | # |
| 4789 | # @node-name: the node name of the new node. This option is required |
| 4790 | # on the top level of `blockdev-add`. Valid node names start with |
| 4791 | # an alphabetic character and may contain only alphanumeric |
| 4792 | # characters, '-', '.' and '_'. Their maximum length is 31 |
| 4793 | # characters. (Since 2.0) |
| 4794 | # |
| 4795 | # @discard: discard-related options (default: ignore) |
| 4796 | # |
| 4797 | # @cache: cache-related options |
| 4798 | # |
| 4799 | # @active: whether the block node should be activated (default: true). |
| 4800 | # Having inactive block nodes is useful primarily for migration |
| 4801 | # because it allows opening an image on the destination while the |
| 4802 | # source is still holding locks for it. (Since 10.0) |
| 4803 | # |
| 4804 | # @read-only: whether the block device should be read-only (default: |
| 4805 | # false). Note that some block drivers support only read-only |
| 4806 | # access, either generally or in certain configurations. In this |
| 4807 | # case, the default value does not work and the option must be |
| 4808 | # specified explicitly. |
| 4809 | # |
| 4810 | # @auto-read-only: if true and @read-only is false, QEMU may |
| 4811 | # automatically decide not to open the image read-write as |
| 4812 | # requested, but fall back to read-only instead (and switch |
| 4813 | # between the modes later), e.g. depending on whether the image |
| 4814 | # file is writable or whether a writing user is attached to the |
| 4815 | # node (default: false, since 3.1) |
| 4816 | # |
| 4817 | # @detect-zeroes: detect and optimize zero writes (Since 2.1) |
| 4818 | # (default: off) |
| 4819 | # |
| 4820 | # @force-share: force share all permission on added nodes. Requires |
| 4821 | # read-only=true. (Since 2.10) |
| 4822 | # |
| 4823 | # Since: 2.9 |
| 4824 | ## |
| 4825 | { 'union': 'BlockdevOptions', |
| 4826 | 'base': { 'driver': 'BlockdevDriver', |
| 4827 | '*node-name': 'str', |
| 4828 | '*discard': 'BlockdevDiscardOptions', |
| 4829 | '*cache': 'BlockdevCacheOptions', |
| 4830 | '*active': 'bool', |
| 4831 | '*read-only': 'bool', |
| 4832 | '*auto-read-only': 'bool', |
| 4833 | '*force-share': 'bool', |
| 4834 | '*detect-zeroes': 'BlockdevDetectZeroesOptions' }, |
| 4835 | 'discriminator': 'driver', |
| 4836 | 'data': { |
| 4837 | 'blkdebug': 'BlockdevOptionsBlkdebug', |
| 4838 | 'blklogwrites':'BlockdevOptionsBlklogwrites', |
| 4839 | 'blkverify': 'BlockdevOptionsBlkverify', |
| 4840 | 'blkreplay': 'BlockdevOptionsBlkreplay', |
| 4841 | 'bochs': 'BlockdevOptionsGenericFormat', |
| 4842 | 'cloop': 'BlockdevOptionsGenericFormat', |
| 4843 | 'compress': 'BlockdevOptionsGenericFormat', |
| 4844 | 'copy-before-write':'BlockdevOptionsCbw', |
| 4845 | 'copy-on-read':'BlockdevOptionsCor', |
| 4846 | 'dmg': 'BlockdevOptionsGenericFormat', |
| 4847 | 'file': 'BlockdevOptionsFile', |
| 4848 | 'ftp': 'BlockdevOptionsCurlFtp', |
| 4849 | 'ftps': 'BlockdevOptionsCurlFtps', |
| 4850 | 'host_cdrom': { 'type': 'BlockdevOptionsFile', |
| 4851 | 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
| 4852 | 'host_device': { 'type': 'BlockdevOptionsFile', |
| 4853 | 'if': 'HAVE_HOST_BLOCK_DEVICE' }, |
| 4854 | 'http': 'BlockdevOptionsCurlHttp', |
| 4855 | 'https': 'BlockdevOptionsCurlHttps', |
| 4856 | 'io_uring': { 'type': 'BlockdevOptionsIoUring', |
| 4857 | 'if': 'CONFIG_BLKIO' }, |
| 4858 | 'iscsi': 'BlockdevOptionsIscsi', |
| 4859 | 'luks': 'BlockdevOptionsLUKS', |
| 4860 | 'nbd': 'BlockdevOptionsNbd', |
| 4861 | 'nfs': 'BlockdevOptionsNfs', |
| 4862 | 'null-aio': 'BlockdevOptionsNull', |
| 4863 | 'null-co': 'BlockdevOptionsNull', |
| 4864 | 'nvme': 'BlockdevOptionsNVMe', |
| 4865 | 'nvme-io_uring': { 'type': 'BlockdevOptionsNvmeIoUring', |
| 4866 | 'if': 'CONFIG_BLKIO' }, |
| 4867 | 'parallels': 'BlockdevOptionsGenericFormat', |
| 4868 | 'preallocate':'BlockdevOptionsPreallocate', |
| 4869 | 'qcow2': 'BlockdevOptionsQcow2', |
| 4870 | 'qcow': 'BlockdevOptionsQcow', |
| 4871 | 'qed': 'BlockdevOptionsGenericCOWFormat', |
| 4872 | 'quorum': 'BlockdevOptionsQuorum', |
| 4873 | 'raw': 'BlockdevOptionsRaw', |
| 4874 | 'rbd': 'BlockdevOptionsRbd', |
| 4875 | 'replication': { 'type': 'BlockdevOptionsReplication', |
| 4876 | 'if': 'CONFIG_REPLICATION' }, |
| 4877 | 'snapshot-access': 'BlockdevOptionsGenericFormat', |
| 4878 | 'ssh': 'BlockdevOptionsSsh', |
| 4879 | 'throttle': 'BlockdevOptionsThrottle', |
| 4880 | 'vdi': 'BlockdevOptionsGenericFormat', |
| 4881 | 'vhdx': 'BlockdevOptionsGenericFormat', |
| 4882 | 'virtio-blk-vfio-pci': |
| 4883 | { 'type': 'BlockdevOptionsVirtioBlkVfioPci', |
| 4884 | 'if': 'CONFIG_BLKIO' }, |
| 4885 | 'virtio-blk-vhost-user': |
| 4886 | { 'type': 'BlockdevOptionsVirtioBlkVhostUser', |
| 4887 | 'if': 'CONFIG_BLKIO' }, |
| 4888 | 'virtio-blk-vhost-vdpa': |
| 4889 | { 'type': 'BlockdevOptionsVirtioBlkVhostVdpa', |
| 4890 | 'if': 'CONFIG_BLKIO' }, |
| 4891 | 'vmdk': 'BlockdevOptionsGenericCOWFormat', |
| 4892 | 'vpc': 'BlockdevOptionsGenericFormat', |
| 4893 | 'vvfat': 'BlockdevOptionsVVFAT' |
| 4894 | } } |
| 4895 | |
| 4896 | ## |
| 4897 | # @BlockdevRef: |
| 4898 | # |
| 4899 | # Reference to a block device. |
| 4900 | # |
| 4901 | # @definition: defines a new block device inline |
| 4902 | # |
| 4903 | # @reference: references the ID of an existing block device |
| 4904 | # |
| 4905 | # Since: 2.9 |
| 4906 | ## |
| 4907 | { 'alternate': 'BlockdevRef', |
| 4908 | 'data': { 'definition': 'BlockdevOptions', |
| 4909 | 'reference': 'str' } } |
| 4910 | |
| 4911 | ## |
| 4912 | # @BlockdevRefOrNull: |
| 4913 | # |
| 4914 | # Reference to a block device. |
| 4915 | # |
| 4916 | # @definition: defines a new block device inline |
| 4917 | # |
| 4918 | # @reference: references the ID of an existing block device. An empty |
| 4919 | # string means that no block device should be referenced. |
| 4920 | # Deprecated; use null instead. |
| 4921 | # |
| 4922 | # @null: No block device should be referenced (since 2.10) |
| 4923 | # |
| 4924 | # Since: 2.9 |
| 4925 | ## |
| 4926 | { 'alternate': 'BlockdevRefOrNull', |
| 4927 | 'data': { 'definition': 'BlockdevOptions', |
| 4928 | 'reference': 'str', |
| 4929 | 'null': 'null' } } |
| 4930 | |
| 4931 | ## |
| 4932 | # @blockdev-add: |
| 4933 | # |
| 4934 | # Creates a new block device. |
| 4935 | # |
| 4936 | # Since: 2.9 |
| 4937 | # |
| 4938 | # .. qmp-example:: |
| 4939 | # |
| 4940 | # -> { "execute": "blockdev-add", |
| 4941 | # "arguments": { |
| 4942 | # "driver": "qcow2", |
| 4943 | # "node-name": "test1", |
| 4944 | # "file": { |
| 4945 | # "driver": "file", |
| 4946 | # "filename": "test.qcow2" |
| 4947 | # } |
| 4948 | # } |
| 4949 | # } |
| 4950 | # <- { "return": {} } |
| 4951 | # |
| 4952 | # .. qmp-example:: |
| 4953 | # |
| 4954 | # -> { "execute": "blockdev-add", |
| 4955 | # "arguments": { |
| 4956 | # "driver": "qcow2", |
| 4957 | # "node-name": "node0", |
| 4958 | # "discard": "unmap", |
| 4959 | # "cache": { |
| 4960 | # "direct": true |
| 4961 | # }, |
| 4962 | # "file": { |
| 4963 | # "driver": "file", |
| 4964 | # "filename": "/tmp/test.qcow2" |
| 4965 | # }, |
| 4966 | # "backing": { |
| 4967 | # "driver": "raw", |
| 4968 | # "file": { |
| 4969 | # "driver": "file", |
| 4970 | # "filename": "/dev/fdset/4" |
| 4971 | # } |
| 4972 | # } |
| 4973 | # } |
| 4974 | # } |
| 4975 | # |
| 4976 | # <- { "return": {} } |
| 4977 | ## |
| 4978 | { 'command': 'blockdev-add', 'data': 'BlockdevOptions', 'boxed': true, |
| 4979 | 'allow-preconfig': true } |
| 4980 | |
| 4981 | ## |
| 4982 | # @blockdev-reopen: |
| 4983 | # |
| 4984 | # Reopens one or more block devices using the given set of options. |
| 4985 | # Any option not specified will be reset to its default value |
| 4986 | # regardless of its previous status. If an option cannot be changed |
| 4987 | # or a particular driver does not support reopening then the command |
| 4988 | # will return an error. All devices in the list are reopened in one |
| 4989 | # transaction, so if one of them fails then the whole transaction is |
| 4990 | # cancelled. |
| 4991 | # |
| 4992 | # The command receives a list of block devices to reopen. For each |
| 4993 | # one of them, the top-level @node-name option (from |
| 4994 | # `BlockdevOptions`) must be specified and is used to select the block |
| 4995 | # device to be reopened. Other @node-name options must be either |
| 4996 | # omitted or set to the current name of the appropriate node. This |
| 4997 | # command won't change any node name and any attempt to do it will |
| 4998 | # result in an error. |
| 4999 | # |
| 5000 | # In the case of options that refer to child nodes, the behavior of |
Showing first 5,000 of 6,292 lines.
View raw