1 package qapi 2 3 // A fat type wrapping 'str', to be embedded in lists. 4 // 5 // Since: 1.2 6 type String struct { 7 Str string `json:"str"` 8 } 9 10 // Since: 6.2 11 type HumanReadableText struct { 12 HumanReadableText string `json:"human-readable-text"` // Formatted output intended for humans. 13 } 14 15 type InetSocketAddressBase struct { 16 Host string `json:"host"` // host part of the address 17 Port string `json:"port"` // port part of the address 18 } 19 20 // Captures a socket address or address range in the Internet namespace. 21 // 22 // Since: 1.3 23 type InetSocketAddress struct { 24 // Base type for this struct 25 InetSocketAddressBase 26 Numeric *bool `json:"numeric,omitempty"` // true if the host/port are guaranteed to be numeric, false if name resolution should be attempted. Defaults to false. (Since 2.9) 27 To *uint16 `json:"to,omitempty"` // If present, this is range of possible addresses, with port between @port and @to. 28 Ipv4 *bool `json:"ipv4,omitempty"` // whether to accept IPv4 addresses, default try both IPv4 and IPv6 29 Ipv6 *bool `json:"ipv6,omitempty"` // whether to accept IPv6 addresses, default try both IPv4 and IPv6 30 KeepAlive *bool `json:"keep-alive,omitempty"` // enable keep-alive when connecting to this socket. Not supported for passive sockets. (Since 4.2) 31 Mptcp *bool `json:"mptcp,omitempty"` // enable multi-path TCP. (Since 6.1) 32 } 33 34 // Captures a socket address in the local ("Unix socket") namespace. 35 // 36 // Since: 1.3 37 type UnixSocketAddress struct { 38 Path string `json:"path"` // filesystem path to use 39 Abstract *bool `json:"abstract,omitempty"` // if true, this is a Linux abstract socket address. @path will be prefixed by a null byte, and optionally padded with null bytes. Defaults to false. (Since 5.1) 40 Tight *bool `json:"tight,omitempty"` // if false, pad an abstract socket address with enough null bytes to make it fill struct sockaddr_un member sun_path. Defaults to true. (Since 5.1) 41 } 42 43 // Captures a socket address in the vsock namespace. 44 // 45 // Note: string types are used to allow for possible future hostname or 46 // service resolution support. 47 // 48 // Since: 2.8 49 type VsockSocketAddress struct { 50 Cid string `json:"cid"` // unique host identifier 51 Port string `json:"port"` // port 52 } 53 54 // Since: 1.3 55 type InetSocketAddressWrapper struct { 56 Data InetSocketAddress `json:"data"` 57 } 58 59 // Since: 1.3 60 type UnixSocketAddressWrapper struct { 61 Data UnixSocketAddress `json:"data"` 62 } 63 64 // Since: 2.8 65 type VsockSocketAddressWrapper struct { 66 Data VsockSocketAddress `json:"data"` 67 } 68 69 // Since: 1.3 70 type StringWrapper struct { 71 Data string `json:"data"` 72 } 73 74 // Information about VCPU run state 75 // 76 // Since: 0.14 77 // 78 // Notes: @singlestep is enabled through the GDB stub 79 type StatusInfo struct { 80 Running bool `json:"running"` // true if all VCPUs are runnable, false if not runnable 81 Singlestep bool `json:"singlestep"` // true if VCPUs are in single-step mode 82 Status RunState `json:"status"` // the virtual machine @RunState 83 } 84 85 // Hyper-V specific guest panic information (HV crash MSRs) 86 // 87 // Since: 2.9 88 type GuestPanicInformationHyperV struct { 89 Arg1 uint64 `json:"arg1"` 90 Arg2 uint64 `json:"arg2"` 91 Arg3 uint64 `json:"arg3"` 92 Arg4 uint64 `json:"arg4"` 93 Arg5 uint64 `json:"arg5"` 94 } 95 96 // S390 specific guest panic information (PSW) 97 // 98 // Since: 2.12 99 type GuestPanicInformationS390 struct { 100 Core uint32 `json:"core"` // core id of the CPU that crashed 101 PswMask uint64 `json:"psw-mask"` // control fields of guest PSW 102 PswAddr uint64 `json:"psw-addr"` // guest instruction address 103 Reason S390CrashReason `json:"reason"` // guest crash reason 104 } 105 106 // Additional information on memory failures. 107 // 108 // Since: 5.2 109 type MemoryFailureFlags struct { 110 ActionRequired bool `json:"action-required"` // whether a memory failure event is action-required or action-optional (e.g. a failure during memory scrub). 111 Recursive bool `json:"recursive"` // whether the failure occurred while the previous failure was still in progress. 112 } 113 114 // The common options that apply to all full disk 115 // encryption formats 116 // 117 // Since: 2.6 118 type QCryptoBlockOptionsBase struct { 119 Format QCryptoBlockFormat `json:"format"` // the encryption format 120 } 121 122 // The options that apply to QCow/QCow2 AES-CBC encryption format 123 // 124 // Since: 2.6 125 type QCryptoBlockOptionsQCow struct { 126 KeySecret *string `json:"key-secret,omitempty"` // the ID of a QCryptoSecret object providing the decryption key. Mandatory except when probing image for metadata only. 127 } 128 129 // The options that apply to LUKS encryption format 130 // 131 // Since: 2.6 132 type QCryptoBlockOptionsLUKS struct { 133 KeySecret *string `json:"key-secret,omitempty"` // the ID of a QCryptoSecret object providing the decryption key. Mandatory except when probing image for metadata only. 134 } 135 136 // The options that apply to LUKS encryption format initialization 137 // 138 // Since: 2.6 139 type QCryptoBlockCreateOptionsLUKS struct { 140 // Base type for this struct 141 QCryptoBlockOptionsLUKS 142 CipherAlg *QCryptoCipherAlgorithm `json:"cipher-alg,omitempty"` // the cipher algorithm for data encryption Currently defaults to 'aes-256'. 143 CipherMode *QCryptoCipherMode `json:"cipher-mode,omitempty"` // the cipher mode for data encryption Currently defaults to 'xts' 144 IvgenAlg *QCryptoIVGenAlgorithm `json:"ivgen-alg,omitempty"` // the initialization vector generator Currently defaults to 'plain64' 145 IvgenHashAlg *QCryptoHashAlgorithm `json:"ivgen-hash-alg,omitempty"` // the initialization vector generator hash Currently defaults to 'sha256' 146 HashAlg *QCryptoHashAlgorithm `json:"hash-alg,omitempty"` // the master key hash algorithm Currently defaults to 'sha256' 147 IterTime *int64 `json:"iter-time,omitempty"` // number of milliseconds to spend in PBKDF passphrase processing. Currently defaults to 2000. (since 2.8) 148 } 149 150 // The common information that applies to all full disk 151 // encryption formats 152 // 153 // Since: 2.7 154 type QCryptoBlockInfoBase struct { 155 Format QCryptoBlockFormat `json:"format"` // the encryption format 156 } 157 158 // Information about the LUKS block encryption key 159 // slot options 160 // 161 // Since: 2.7 162 type QCryptoBlockInfoLUKSSlot struct { 163 Active bool `json:"active"` // whether the key slot is currently in use 164 Iters *int64 `json:"iters,omitempty"` // number of PBKDF2 iterations for key material 165 Stripes *int64 `json:"stripes,omitempty"` // number of stripes for splitting key material 166 KeyOffset int64 `json:"key-offset"` // offset to the key material in bytes 167 } 168 169 // Information about the LUKS block encryption options 170 // 171 // Since: 2.7 172 type QCryptoBlockInfoLUKS struct { 173 CipherAlg QCryptoCipherAlgorithm `json:"cipher-alg"` // the cipher algorithm for data encryption 174 CipherMode QCryptoCipherMode `json:"cipher-mode"` // the cipher mode for data encryption 175 IvgenAlg QCryptoIVGenAlgorithm `json:"ivgen-alg"` // the initialization vector generator 176 IvgenHashAlg *QCryptoHashAlgorithm `json:"ivgen-hash-alg,omitempty"` // the initialization vector generator hash 177 HashAlg QCryptoHashAlgorithm `json:"hash-alg"` // the master key hash algorithm 178 PayloadOffset int64 `json:"payload-offset"` // offset to the payload data in bytes 179 MasterKeyIters int64 `json:"master-key-iters"` // number of PBKDF2 iterations for key material 180 Uuid string `json:"uuid"` // unique identifier for the volume 181 Slots []QCryptoBlockInfoLUKSSlot `json:"slots"` // information about each key slot 182 } 183 184 // This struct defines the update parameters that activate/de-activate set 185 // of keyslots 186 // 187 // None: Since 5.1 188 type QCryptoBlockAmendOptionsLUKS struct { 189 State QCryptoBlockLUKSKeyslotState `json:"state"` // the desired state of the keyslots 190 NewSecret *string `json:"new-secret,omitempty"` // The ID of a QCryptoSecret object providing the password to be written into added active keyslots 191 OldSecret *string `json:"old-secret,omitempty"` // Optional (for deactivation only) If given will deactivate all keyslots that match password located in QCryptoSecret with this ID 192 Keyslot *int64 `json:"keyslot,omitempty"` // Optional. ID of the keyslot to activate/deactivate. For keyslot activation, keyslot should not be active already (this is unsafe to update an active keyslot), but possible if 'force' parameter is given. If keyslot is not given, first free keyslot will be written. For keyslot deactivation, this parameter specifies the exact keyslot to deactivate 193 IterTime *int64 `json:"iter-time,omitempty"` // Optional (for activation only) Number of milliseconds to spend in PBKDF passphrase processing for the newly activated keyslot. Currently defaults to 2000. 194 Secret *string `json:"secret,omitempty"` // Optional. The ID of a QCryptoSecret object providing the password to use to retrieve current master key. Defaults to the same secret that was used to open the image 195 } 196 197 // Properties for objects of classes derived from secret-common. 198 // 199 // Since: 2.6 200 type SecretCommonProperties struct { 201 Loaded *bool `json:"loaded,omitempty"` // if true, the secret is loaded immediately when applying this option and will probably fail when processing the next option. Don't use; only provided for compatibility. (default: false) 202 Format *QCryptoSecretFormat `json:"format,omitempty"` // the data format that the secret is provided in (default: raw) 203 Keyid *string `json:"keyid,omitempty"` // the name of another secret that should be used to decrypt the provided data. If not present, the data is assumed to be unencrypted. 204 Iv *string `json:"iv,omitempty"` // the random initialization vector used for encryption of this particular secret. Should be a base64 encrypted string of the 16-byte IV. Mandatory if @keyid is given. Ignored if @keyid is absent. 205 } 206 207 // Properties for secret objects. 208 // 209 // Either @data or @file must be provided, but not both. 210 // 211 // Since: 2.6 212 type SecretProperties struct { 213 // Base type for this struct 214 SecretCommonProperties 215 Data *string `json:"data,omitempty"` // the associated with the secret from 216 File *string `json:"file,omitempty"` // the filename to load the data associated with the secret from 217 } 218 219 // Properties for secret_keyring objects. 220 // 221 // Since: 5.1 222 type SecretKeyringProperties struct { 223 // Base type for this struct 224 SecretCommonProperties 225 Serial int32 `json:"serial"` // serial number that identifies a key to get from the kernel 226 } 227 228 // Properties for objects of classes derived from tls-creds. 229 // 230 // Since: 2.5 231 type TlsCredsProperties struct { 232 VerifyPeer *bool `json:"verify-peer,omitempty"` // if true the peer credentials will be verified once the handshake is completed. This is a no-op for anonymous credentials. (default: true) 233 Dir *string `json:"dir,omitempty"` // the path of the directory that contains the credential files 234 Endpoint *QCryptoTLSCredsEndpoint `json:"endpoint,omitempty"` // whether the QEMU network backend that uses the credentials will be acting as a client or as a server (default: client) 235 Priority *string `json:"priority,omitempty"` // a gnutls priority string as described at https://gnutls.org/manual/html_node/Priority-Strings.html 236 } 237 238 // Properties for tls-creds-anon objects. 239 // 240 // Since: 2.5 241 type TlsCredsAnonProperties struct { 242 // Base type for this struct 243 TlsCredsProperties 244 Loaded *bool `json:"loaded,omitempty"` // if true, the credentials are loaded immediately when applying this option and will ignore options that are processed later. Don't use; only provided for compatibility. (default: false) 245 } 246 247 // Properties for tls-creds-psk objects. 248 // 249 // Since: 3.0 250 type TlsCredsPskProperties struct { 251 // Base type for this struct 252 TlsCredsProperties 253 Loaded *bool `json:"loaded,omitempty"` // if true, the credentials are loaded immediately when applying this option and will ignore options that are processed later. Don't use; only provided for compatibility. (default: false) 254 Username *string `json:"username,omitempty"` // the username which will be sent to the server. For clients only. If absent, "qemu" is sent and the property will read back as an empty string. 255 } 256 257 // Properties for tls-creds-x509 objects. 258 // 259 // Since: 2.5 260 type TlsCredsX509Properties struct { 261 // Base type for this struct 262 TlsCredsProperties 263 Loaded *bool `json:"loaded,omitempty"` // if true, the credentials are loaded immediately when applying this option and will ignore options that are processed later. Don't use; only provided for compatibility. (default: false) 264 SanityCheck *bool `json:"sanity-check,omitempty"` // if true, perform some sanity checks before using the credentials (default: true) 265 Passwordid *string `json:"passwordid,omitempty"` // For the server-key.pem and client-key.pem files which contain sensitive private keys, it is possible to use an encrypted version by providing the @passwordid parameter. This provides the ID of a previously created secret object containing the password for decryption. 266 } 267 268 // Information about a persistent reservation manager 269 // 270 // Since: 3.0 271 type PRManagerInfo struct { 272 Id string `json:"id"` // the identifier of the persistent reservation manager 273 Connected bool `json:"connected"` // true if the persistent reservation manager is connected to the underlying storage or helper 274 } 275 276 // Since: 1.3 277 type SnapshotInfo struct { 278 Id string `json:"id"` // unique snapshot id 279 Name string `json:"name"` // user chosen name 280 VmStateSize int64 `json:"vm-state-size"` // size of the VM state 281 DateSec int64 `json:"date-sec"` // UTC date of the snapshot in seconds 282 DateNsec int64 `json:"date-nsec"` // fractional part in nano seconds to be used with date-sec 283 VmClockSec int64 `json:"vm-clock-sec"` // VM clock relative to boot in seconds 284 VmClockNsec int64 `json:"vm-clock-nsec"` // fractional part in nano seconds to be used with vm-clock-sec 285 Icount *int64 `json:"icount,omitempty"` // Current instruction count. Appears when execution record/replay is enabled. Used for "time-traveling" to match the moment in the recorded execution with the snapshots. This counter may be obtained through @query-replay command (since 5.2) 286 } 287 288 // Since: 2.10 289 type ImageInfoSpecificQCow2EncryptionBase struct { 290 Format BlockdevQcow2EncryptionFormat `json:"format"` // The encryption format 291 } 292 293 // Since: 1.7 294 type ImageInfoSpecificQCow2 struct { 295 Compat string `json:"compat"` // compatibility level 296 DataFile *string `json:"data-file,omitempty"` // the filename of the external data file that is stored in the image and used as a default for opening the image (since: 4.0) 297 DataFileRaw *bool `json:"data-file-raw,omitempty"` // True if the external data file must stay valid as a standalone (read-only) raw image without looking at qcow2 metadata (since: 4.0) 298 ExtendedL2 *bool `json:"extended-l2,omitempty"` // true if the image has extended L2 entries; only valid for compat >= 1.1 (since 5.2) 299 LazyRefcounts *bool `json:"lazy-refcounts,omitempty"` // on or off; only valid for compat >= 1.1 300 Corrupt *bool `json:"corrupt,omitempty"` // true if the image has been marked corrupt; only valid for compat >= 1.1 (since 2.2) 301 RefcountBits int64 `json:"refcount-bits"` // width of a refcount entry in bits (since 2.3) 302 Encrypt *ImageInfoSpecificQCow2Encryption `json:"encrypt,omitempty"` // details about encryption parameters; only set if image is encrypted (since 2.10) 303 Bitmaps []Qcow2BitmapInfo `json:"bitmaps,omitempty"` // A list of qcow2 bitmap details (since 4.0) 304 CompressionType Qcow2CompressionType `json:"compression-type"` // the image cluster compression method (since 5.1) 305 } 306 307 // Since: 1.7 308 type ImageInfoSpecificVmdk struct { 309 CreateType string `json:"create-type"` // The create type of VMDK image 310 Cid int64 `json:"cid"` // Content id of image 311 ParentCid int64 `json:"parent-cid"` // Parent VMDK image's cid 312 Extents []ImageInfo `json:"extents"` // List of extent files 313 } 314 315 // Since: 6.1 316 type ImageInfoSpecificRbd struct { 317 EncryptionFormat *RbdImageEncryptionFormat `json:"encryption-format,omitempty"` // Image encryption format 318 } 319 320 // Since: 1.7 321 type ImageInfoSpecificQCow2Wrapper struct { 322 Data ImageInfoSpecificQCow2 `json:"data"` 323 } 324 325 // Since: 6.1 326 type ImageInfoSpecificVmdkWrapper struct { 327 Data ImageInfoSpecificVmdk `json:"data"` 328 } 329 330 // Since: 2.7 331 type ImageInfoSpecificLUKSWrapper struct { 332 Data QCryptoBlockInfoLUKS `json:"data"` 333 } 334 335 // Since: 6.1 336 type ImageInfoSpecificRbdWrapper struct { 337 Data ImageInfoSpecificRbd `json:"data"` 338 } 339 340 // Information about a QEMU image file 341 // 342 // Since: 1.3 343 type ImageInfo struct { 344 Filename string `json:"filename"` // name of the image file 345 Format string `json:"format"` // format of the image file 346 DirtyFlag *bool `json:"dirty-flag,omitempty"` // true if image is not cleanly closed 347 ActualSize *int64 `json:"actual-size,omitempty"` // actual size on disk in bytes of the image 348 VirtualSize int64 `json:"virtual-size"` // maximum capacity in bytes of the image 349 ClusterSize *int64 `json:"cluster-size,omitempty"` // size of a cluster in bytes 350 Encrypted *bool `json:"encrypted,omitempty"` // true if the image is encrypted 351 Compressed *bool `json:"compressed,omitempty"` // true if the image is compressed (Since 1.7) 352 BackingFilename *string `json:"backing-filename,omitempty"` // name of the backing file 353 FullBackingFilename *string `json:"full-backing-filename,omitempty"` // full path of the backing file 354 BackingFilenameFormat *string `json:"backing-filename-format,omitempty"` // the format of the backing file 355 Snapshots []SnapshotInfo `json:"snapshots,omitempty"` // list of VM snapshots 356 BackingImage *ImageInfo `json:"backing-image,omitempty"` // info of the backing image (since 1.6) 357 FormatSpecific *ImageInfoSpecific `json:"format-specific,omitempty"` // structure supplying additional format-specific information (since 1.7) 358 } 359 360 // Information about a QEMU image file check 361 // 362 // Since: 1.4 363 type ImageCheck struct { 364 Filename string `json:"filename"` // name of the image file checked 365 Format string `json:"format"` // format of the image file checked 366 CheckErrors int64 `json:"check-errors"` // number of unexpected errors occurred during check 367 ImageEndOffset *int64 `json:"image-end-offset,omitempty"` // offset (in bytes) where the image ends, this field is present if the driver for the image format supports it 368 Corruptions *int64 `json:"corruptions,omitempty"` // number of corruptions found during the check if any 369 Leaks *int64 `json:"leaks,omitempty"` // number of leaks found during the check if any 370 CorruptionsFixed *int64 `json:"corruptions-fixed,omitempty"` // number of corruptions fixed during the check if any 371 LeaksFixed *int64 `json:"leaks-fixed,omitempty"` // number of leaks fixed during the check if any 372 TotalClusters *int64 `json:"total-clusters,omitempty"` // total number of clusters, this field is present if the driver for the image format supports it 373 AllocatedClusters *int64 `json:"allocated-clusters,omitempty"` // total number of allocated clusters, this field is present if the driver for the image format supports it 374 FragmentedClusters *int64 `json:"fragmented-clusters,omitempty"` // total number of fragmented clusters, this field is present if the driver for the image format supports it 375 CompressedClusters *int64 `json:"compressed-clusters,omitempty"` // total number of compressed clusters, this field is present if the driver for the image format supports it 376 } 377 378 // Mapping information from a virtual block range to a host file range 379 // 380 // Since: 2.6 381 type MapEntry struct { 382 Start int64 `json:"start"` // virtual (guest) offset of the first byte described by this entry 383 Length int64 `json:"length"` // the number of bytes of the mapped virtual range 384 Data bool `json:"data"` // reading the image will actually read data from a file (in particular, if @offset is present this means that the sectors are not simply preallocated, but contain actual data in raw format) 385 Zero bool `json:"zero"` // whether the virtual blocks read as zeroes 386 Depth int64 `json:"depth"` // number of layers (0 = top image, 1 = top image's backing file, ..., n - 1 = bottom image (where n is the number of images in the chain)) before reaching one for which the range is allocated 387 Present bool `json:"present"` // true if this layer provides the data, false if adding a backing layer could impact this region (since 6.1) 388 Offset *int64 `json:"offset,omitempty"` // if present, the image file stores the data for this range in raw format at the given (host) offset 389 Filename *string `json:"filename,omitempty"` // filename that is referred to by @offset 390 } 391 392 // Cache mode information for a block device 393 // 394 // Since: 2.3 395 type BlockdevCacheInfo struct { 396 Writeback bool `json:"writeback"` // true if writeback mode is enabled 397 Direct bool `json:"direct"` // true if the host page cache is bypassed (O_DIRECT) 398 NoFlush bool `json:"no-flush"` // true if flush requests are ignored for the device 399 } 400 401 // Information about the backing device for a block device. 402 // 403 // Since: 0.14 404 type BlockDeviceInfo struct { 405 File string `json:"file"` // the filename of the backing device 406 NodeName *string `json:"node-name,omitempty"` // the name of the block driver node (Since 2.0) 407 Ro bool `json:"ro"` // true if the backing device was open read-only 408 Drv string `json:"drv"` // the name of the block format used to open the backing device. As of 0.14 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg', 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', 'http', 'https', 'luks', 'nbd', 'parallels', 'qcow', 'qcow2', 'raw', 'vdi', 'vmdk', 'vpc', 'vvfat' 2.2: 'archipelago' added, 'cow' dropped 2.3: 'host_floppy' deprecated 2.5: 'host_floppy' dropped 2.6: 'luks' added 2.8: 'replication' added, 'tftp' dropped 2.9: 'archipelago' dropped 409 BackingFile *string `json:"backing_file,omitempty"` // the name of the backing file (for copy-on-write) 410 BackingFileDepth int64 `json:"backing_file_depth"` // number of files in the backing file chain (since: 1.2) 411 Encrypted bool `json:"encrypted"` // true if the backing device is encrypted 412 DetectZeroes BlockdevDetectZeroesOptions `json:"detect_zeroes"` // detect and optimize zero writes (Since 2.1) 413 Bps int64 `json:"bps"` // total throughput limit in bytes per second is specified 414 BpsRd int64 `json:"bps_rd"` // read throughput limit in bytes per second is specified 415 BpsWr int64 `json:"bps_wr"` // write throughput limit in bytes per second is specified 416 Iops int64 `json:"iops"` // total I/O operations per second is specified 417 IopsRd int64 `json:"iops_rd"` // read I/O operations per second is specified 418 IopsWr int64 `json:"iops_wr"` // write I/O operations per second is specified 419 Image ImageInfo `json:"image"` // the info of image used (since: 1.6) 420 BpsMax *int64 `json:"bps_max,omitempty"` // total throughput limit during bursts, in bytes (Since 1.7) 421 BpsRdMax *int64 `json:"bps_rd_max,omitempty"` // read throughput limit during bursts, in bytes (Since 1.7) 422 BpsWrMax *int64 `json:"bps_wr_max,omitempty"` // write throughput limit during bursts, in bytes (Since 1.7) 423 IopsMax *int64 `json:"iops_max,omitempty"` // total I/O operations per second during bursts, in bytes (Since 1.7) 424 IopsRdMax *int64 `json:"iops_rd_max,omitempty"` // read I/O operations per second during bursts, in bytes (Since 1.7) 425 IopsWrMax *int64 `json:"iops_wr_max,omitempty"` // write I/O operations per second during bursts, in bytes (Since 1.7) 426 BpsMaxLength *int64 `json:"bps_max_length,omitempty"` // maximum length of the @bps_max burst period, in seconds. (Since 2.6) 427 BpsRdMaxLength *int64 `json:"bps_rd_max_length,omitempty"` // maximum length of the @bps_rd_max burst period, in seconds. (Since 2.6) 428 BpsWrMaxLength *int64 `json:"bps_wr_max_length,omitempty"` // maximum length of the @bps_wr_max burst period, in seconds. (Since 2.6) 429 IopsMaxLength *int64 `json:"iops_max_length,omitempty"` // maximum length of the @iops burst period, in seconds. (Since 2.6) 430 IopsRdMaxLength *int64 `json:"iops_rd_max_length,omitempty"` // maximum length of the @iops_rd_max burst period, in seconds. (Since 2.6) 431 IopsWrMaxLength *int64 `json:"iops_wr_max_length,omitempty"` // maximum length of the @iops_wr_max burst period, in seconds. (Since 2.6) 432 IopsSize *int64 `json:"iops_size,omitempty"` // an I/O size in bytes (Since 1.7) 433 Group *string `json:"group,omitempty"` // throttle group name (Since 2.4) 434 Cache BlockdevCacheInfo `json:"cache"` // the cache mode used for the block device (since: 2.3) 435 WriteThreshold int64 `json:"write_threshold"` // configured write threshold for the device. 0 if disabled. (Since 2.3) 436 DirtyBitmaps []BlockDirtyInfo `json:"dirty-bitmaps,omitempty"` // dirty bitmaps information (only present if node has one or more dirty bitmaps) (Since 4.2) 437 } 438 439 // Block dirty bitmap information. 440 // 441 // Since: 1.3 442 type BlockDirtyInfo struct { 443 Name *string `json:"name,omitempty"` // the name of the dirty bitmap (Since 2.4) 444 Count int64 `json:"count"` // number of dirty bytes according to the dirty bitmap 445 Granularity uint32 `json:"granularity"` // granularity of the dirty bitmap in bytes (since 1.4) 446 Recording bool `json:"recording"` // true if the bitmap is recording new writes from the guest. Replaces ``active`` and ``disabled`` statuses. (since 4.0) 447 Busy bool `json:"busy"` // true if the bitmap is in-use by some operation (NBD or jobs) and cannot be modified via QMP or used by another operation. Replaces ``locked`` and ``frozen`` statuses. (since 4.0) 448 Persistent bool `json:"persistent"` // true if the bitmap was stored on disk, is scheduled to be stored on disk, or both. (since 4.0) 449 Inconsistent *bool `json:"inconsistent,omitempty"` // true if this is a persistent bitmap that was improperly stored. Implies @persistent to be true; @recording and @busy to be false. This bitmap cannot be used. To remove it, use @block-dirty-bitmap-remove. (Since 4.0) 450 } 451 452 // Qcow2 bitmap information. 453 // 454 // Since: 4.0 455 type Qcow2BitmapInfo struct { 456 Name string `json:"name"` // the name of the bitmap 457 Granularity uint32 `json:"granularity"` // granularity of the bitmap in bytes 458 Flags []Qcow2BitmapInfoFlags `json:"flags"` // flags of the bitmap 459 } 460 461 // Block latency histogram. 462 // 463 // None: :: 464 // 465 // 5| * 466 // 4| * 467 // 3| * * 468 // 2| * * * 469 // 1| * * * * 470 // +------------------ 471 // 10 50 100 472 // 473 // Since: 4.0 474 type BlockLatencyHistogramInfo struct { 475 Boundaries []uint64 `json:"boundaries"` // list of interval boundary values in nanoseconds, all greater than zero and in ascending order. For example, the list [10, 50, 100] produces the following histogram intervals: [0, 10), [10, 50), [50, 100), [100, +inf). 476 Bins []uint64 `json:"bins"` // list of io request counts corresponding to histogram intervals. len(@bins) = len(@boundaries) + 1 For the example above, @bins may be something like [3, 1, 5, 2], and corresponding histogram looks like: 477 } 478 479 // Block device information. This structure describes a virtual device and 480 // the backing device associated with it. 481 // 482 // Since: 0.14 483 type BlockInfo struct { 484 Device string `json:"device"` // The device name associated with the virtual device. 485 Qdev *string `json:"qdev,omitempty"` // The qdev ID, or if no ID is assigned, the QOM path of the block device. (since 2.10) 486 Type string `json:"type"` // This field is returned only for compatibility reasons, it should not be used (always returns 'unknown') 487 Removable bool `json:"removable"` // True if the device supports removable media. 488 Locked bool `json:"locked"` // True if the guest has locked this device from having its media removed 489 Inserted *BlockDeviceInfo `json:"inserted,omitempty"` // @BlockDeviceInfo describing the device if media is present 490 TrayOpen *bool `json:"tray_open,omitempty"` // True if the device's tray is open (only present if it has a tray) 491 IoStatus *BlockDeviceIoStatus `json:"io-status,omitempty"` // @BlockDeviceIoStatus. Only present if the device supports it and the VM is configured to stop on errors (supported device models: virtio-blk, IDE, SCSI except scsi-generic) 492 } 493 494 // Image file size calculation information. This structure describes the size 495 // requirements for creating a new image file. 496 // 497 // The size requirements depend on the new image file format. File size always 498 // equals virtual disk size for the 'raw' format, even for sparse POSIX files. 499 // Compact formats such as 'qcow2' represent unallocated and zero regions 500 // efficiently so file size may be smaller than virtual disk size. 501 // 502 // The values are upper bounds that are guaranteed to fit the new image file. 503 // Subsequent modification, such as internal snapshot or further bitmap 504 // creation, may require additional space and is not covered here. 505 // 506 // Since: 2.10 507 type BlockMeasureInfo struct { 508 Required int64 `json:"required"` // Size required for a new image file, in bytes, when copying just allocated guest-visible contents. 509 FullyAllocated int64 `json:"fully-allocated"` // Image file size, in bytes, once data has been written to all sectors, when copying just guest-visible contents. 510 Bitmaps *int64 `json:"bitmaps,omitempty"` // Additional size required if all the top-level bitmap metadata in the source image were to be copied to the destination, present only when source and destination both support persistent bitmaps. (since 5.1) 511 } 512 513 // Statistics of a block device during a given interval of time. 514 // 515 // Since: 2.5 516 type BlockDeviceTimedStats struct { 517 IntervalLength int64 `json:"interval_length"` // Interval used for calculating the statistics, in seconds. 518 MinRdLatencyNs int64 `json:"min_rd_latency_ns"` // Minimum latency of read operations in the defined interval, in nanoseconds. 519 MaxRdLatencyNs int64 `json:"max_rd_latency_ns"` // Maximum latency of read operations in the defined interval, in nanoseconds. 520 AvgRdLatencyNs int64 `json:"avg_rd_latency_ns"` // Average latency of read operations in the defined interval, in nanoseconds. 521 MinWrLatencyNs int64 `json:"min_wr_latency_ns"` // Minimum latency of write operations in the defined interval, in nanoseconds. 522 MaxWrLatencyNs int64 `json:"max_wr_latency_ns"` // Maximum latency of write operations in the defined interval, in nanoseconds. 523 AvgWrLatencyNs int64 `json:"avg_wr_latency_ns"` // Average latency of write operations in the defined interval, in nanoseconds. 524 MinFlushLatencyNs int64 `json:"min_flush_latency_ns"` // Minimum latency of flush operations in the defined interval, in nanoseconds. 525 MaxFlushLatencyNs int64 `json:"max_flush_latency_ns"` // Maximum latency of flush operations in the defined interval, in nanoseconds. 526 AvgFlushLatencyNs int64 `json:"avg_flush_latency_ns"` // Average latency of flush operations in the defined interval, in nanoseconds. 527 AvgRdQueueDepth float64 `json:"avg_rd_queue_depth"` // Average number of pending read operations in the defined interval. 528 AvgWrQueueDepth float64 `json:"avg_wr_queue_depth"` // Average number of pending write operations in the defined interval. 529 } 530 531 // Statistics of a virtual block device or a block backing device. 532 // 533 // Since: 0.14 534 type BlockDeviceStats struct { 535 RdBytes int64 `json:"rd_bytes"` // The number of bytes read by the device. 536 WrBytes int64 `json:"wr_bytes"` // The number of bytes written by the device. 537 UnmapBytes int64 `json:"unmap_bytes"` // The number of bytes unmapped by the device (Since 4.2) 538 RdOperations int64 `json:"rd_operations"` // The number of read operations performed by the device. 539 WrOperations int64 `json:"wr_operations"` // The number of write operations performed by the device. 540 FlushOperations int64 `json:"flush_operations"` // The number of cache flush operations performed by the device (since 0.15) 541 UnmapOperations int64 `json:"unmap_operations"` // The number of unmap operations performed by the device (Since 4.2) 542 RdTotalTimeNs int64 `json:"rd_total_time_ns"` // Total time spent on reads in nanoseconds (since 0.15). 543 WrTotalTimeNs int64 `json:"wr_total_time_ns"` // Total time spent on writes in nanoseconds (since 0.15). 544 FlushTotalTimeNs int64 `json:"flush_total_time_ns"` // Total time spent on cache flushes in nanoseconds (since 0.15). 545 UnmapTotalTimeNs int64 `json:"unmap_total_time_ns"` // Total time spent on unmap operations in nanoseconds (Since 4.2) 546 WrHighestOffset int64 `json:"wr_highest_offset"` // The offset after the greatest byte written to the device. The intended use of this information is for growable sparse files (like qcow2) that are used on top of a physical device. 547 RdMerged int64 `json:"rd_merged"` // Number of read requests that have been merged into another request (Since 2.3). 548 WrMerged int64 `json:"wr_merged"` // Number of write requests that have been merged into another request (Since 2.3). 549 UnmapMerged int64 `json:"unmap_merged"` // Number of unmap requests that have been merged into another request (Since 4.2) 550 IdleTimeNs *int64 `json:"idle_time_ns,omitempty"` // Time since the last I/O operation, in nanoseconds. If the field is absent it means that there haven't been any operations yet (Since 2.5). 551 FailedRdOperations int64 `json:"failed_rd_operations"` // The number of failed read operations performed by the device (Since 2.5) 552 FailedWrOperations int64 `json:"failed_wr_operations"` // The number of failed write operations performed by the device (Since 2.5) 553 FailedFlushOperations int64 `json:"failed_flush_operations"` // The number of failed flush operations performed by the device (Since 2.5) 554 FailedUnmapOperations int64 `json:"failed_unmap_operations"` // The number of failed unmap operations performed by the device (Since 4.2) 555 InvalidRdOperations int64 `json:"invalid_rd_operations"` // The number of invalid read operations performed by the device (Since 2.5) 556 InvalidWrOperations int64 `json:"invalid_wr_operations"` // The number of invalid write operations performed by the device (Since 2.5) 557 InvalidFlushOperations int64 `json:"invalid_flush_operations"` // The number of invalid flush operations performed by the device (Since 2.5) 558 InvalidUnmapOperations int64 `json:"invalid_unmap_operations"` // The number of invalid unmap operations performed by the device (Since 4.2) 559 AccountInvalid bool `json:"account_invalid"` // Whether invalid operations are included in the last access statistics (Since 2.5) 560 AccountFailed bool `json:"account_failed"` // Whether failed operations are included in the latency and last access statistics (Since 2.5) 561 TimedStats []BlockDeviceTimedStats `json:"timed_stats"` // Statistics specific to the set of previously defined intervals of time (Since 2.5) 562 RdLatencyHistogram *BlockLatencyHistogramInfo `json:"rd_latency_histogram,omitempty"` // @BlockLatencyHistogramInfo. (Since 4.0) 563 WrLatencyHistogram *BlockLatencyHistogramInfo `json:"wr_latency_histogram,omitempty"` // @BlockLatencyHistogramInfo. (Since 4.0) 564 FlushLatencyHistogram *BlockLatencyHistogramInfo `json:"flush_latency_histogram,omitempty"` // @BlockLatencyHistogramInfo. (Since 4.0) 565 } 566 567 // File driver statistics 568 // 569 // Since: 4.2 570 type BlockStatsSpecificFile struct { 571 DiscardNbOk uint64 `json:"discard-nb-ok"` // The number of successful discard operations performed by the driver. 572 DiscardNbFailed uint64 `json:"discard-nb-failed"` // The number of failed discard operations performed by the driver. 573 DiscardBytesOk uint64 `json:"discard-bytes-ok"` // The number of bytes discarded by the driver. 574 } 575 576 // NVMe driver statistics 577 // 578 // Since: 5.2 579 type BlockStatsSpecificNvme struct { 580 CompletionErrors uint64 `json:"completion-errors"` // The number of completion errors. 581 AlignedAccesses uint64 `json:"aligned-accesses"` // The number of aligned accesses performed by the driver. 582 UnalignedAccesses uint64 `json:"unaligned-accesses"` // The number of unaligned accesses performed by the driver. 583 } 584 585 // Statistics of a virtual block device or a block backing device. 586 // 587 // Since: 0.14 588 type BlockStats struct { 589 Device *string `json:"device,omitempty"` // If the stats are for a virtual block device, the name corresponding to the virtual block device. 590 Qdev *string `json:"qdev,omitempty"` // The qdev ID, or if no ID is assigned, the QOM path of the block device. (since 3.0) 591 NodeName *string `json:"node-name,omitempty"` // The node name of the device. (Since 2.3) 592 Stats BlockDeviceStats `json:"stats"` // A @BlockDeviceStats for the device. 593 DriverSpecific *BlockStatsSpecific `json:"driver-specific,omitempty"` // Optional driver-specific stats. (Since 4.2) 594 Parent *BlockStats `json:"parent,omitempty"` // This describes the file block device if it has one. Contains recursively the statistics of the underlying protocol (e.g. the host file for a qcow2 image). If there is no underlying protocol, this field is omitted 595 Backing *BlockStats `json:"backing,omitempty"` // This describes the backing block device if it has one. (Since 2.0) 596 } 597 598 // Information about a long-running block device operation. 599 // 600 // Since: 1.1 601 type BlockJobInfo struct { 602 Type string `json:"type"` // the job type ('stream' for image streaming) 603 Device string `json:"device"` // The job identifier. Originally the device name but other values are allowed since QEMU 2.7 604 Len int64 `json:"len"` // Estimated @offset value at the completion of the job. This value can arbitrarily change while the job is running, in both directions. 605 Offset int64 `json:"offset"` // Progress made until now. The unit is arbitrary and the value can only meaningfully be used for the ratio of @offset to @len. The value is monotonically increasing. 606 Busy bool `json:"busy"` // false if the job is known to be in a quiescent state, with no pending I/O. Since 1.3. 607 Paused bool `json:"paused"` // whether the job is paused or, if @busy is true, will pause itself as soon as possible. Since 1.3. 608 Speed int64 `json:"speed"` // the rate limit, bytes per second 609 IoStatus BlockDeviceIoStatus `json:"io-status"` // the status of the job (since 1.3) 610 Ready bool `json:"ready"` // true if the job may be completed (since 2.2) 611 Status JobStatus `json:"status"` // Current job state/status (since 2.12) 612 AutoFinalize bool `json:"auto-finalize"` // Job will finalize itself when PENDING, moving to the CONCLUDED state. (since 2.12) 613 AutoDismiss bool `json:"auto-dismiss"` // Job will dismiss itself when CONCLUDED, moving to the NULL state and disappearing from the query list. (since 2.12) 614 Error *string `json:"error,omitempty"` // Error information if the job did not complete successfully. Not set if the job completed successfully. (since 2.12.1) 615 } 616 617 // Either @device or @node-name must be set but not both. 618 type BlockdevSnapshotSync struct { 619 Device *string `json:"device,omitempty"` // the name of the device to take a snapshot of. 620 NodeName *string `json:"node-name,omitempty"` // graph node name to generate the snapshot from (Since 2.0) 621 SnapshotFile string `json:"snapshot-file"` // the target of the new overlay image. If the file exists, or if it is a device, the overlay will be created in the existing file/device. Otherwise, a new file will be created. 622 SnapshotNodeName *string `json:"snapshot-node-name,omitempty"` // the graph node name of the new image (Since 2.0) 623 Format *string `json:"format,omitempty"` // the format of the overlay image, default is 'qcow2'. 624 Mode *NewImageMode `json:"mode,omitempty"` // whether and how QEMU should create a new image, default is 'absolute-paths'. 625 } 626 627 // Since: 2.5 628 type BlockdevSnapshot struct { 629 Node string `json:"node"` // device or node name that will have a snapshot taken. 630 Overlay string `json:"overlay"` // reference to the existing block device that will become the overlay of @node, as part of taking the snapshot. It must not have a current backing file (this can be achieved by passing "backing": null to blockdev-add). 631 } 632 633 // Optional parameters for backup. These parameters don't affect 634 // functionality, but may significantly affect performance. 635 // 636 // Since: 6.0 637 type BackupPerf struct { 638 UseCopyRange *bool `json:"use-copy-range,omitempty"` // Use copy offloading. Default false. 639 MaxWorkers *int64 `json:"max-workers,omitempty"` // Maximum number of parallel requests for the sustained background copying process. Doesn't influence copy-before-write operations. Default 64. 640 MaxChunk *int64 `json:"max-chunk,omitempty"` // Maximum request length for the sustained background copying process. Doesn't influence copy-before-write operations. 0 means unlimited. If max-chunk is non-zero then it should not be less than job cluster size which is calculated as maximum of target image cluster size and 64k. Default 0. 641 } 642 643 // Note: @on-source-error and @on-target-error only affect background 644 // I/O. If an error occurs during a guest write request, the device's 645 // rerror/werror actions will be used. 646 // 647 // Since: 4.2 648 type BackupCommon struct { 649 JobId *string `json:"job-id,omitempty"` // identifier for the newly-created block job. If omitted, the device name will be used. (Since 2.7) 650 Device string `json:"device"` // the device name or node-name of a root node which should be copied. 651 Sync MirrorSyncMode `json:"sync"` // what parts of the disk image should be copied to the destination (all the disk, only the sectors allocated in the topmost image, from a dirty bitmap, or only new I/O). 652 Speed *int64 `json:"speed,omitempty"` // the maximum speed, in bytes per second. The default is 0, for unlimited. 653 Bitmap *string `json:"bitmap,omitempty"` // The name of a dirty bitmap to use. Must be present if sync is "bitmap" or "incremental". Can be present if sync is "full" or "top". Must not be present otherwise. (Since 2.4 (drive-backup), 3.1 (blockdev-backup)) 654 BitmapMode *BitmapSyncMode `json:"bitmap-mode,omitempty"` // Specifies the type of data the bitmap should contain after the operation concludes. Must be present if a bitmap was provided, Must NOT be present otherwise. (Since 4.2) 655 Compress *bool `json:"compress,omitempty"` // true to compress data, if the target format supports it. (default: false) (since 2.8) 656 OnSourceError *BlockdevOnError `json:"on-source-error,omitempty"` // the action to take on an error on the source, default 'report'. 'stop' and 'enospc' can only be used if the block device supports io-status (see BlockInfo). 657 OnTargetError *BlockdevOnError `json:"on-target-error,omitempty"` // the action to take on an error on the target, default 'report' (no limitations, since this applies to a different block device than @device). 658 AutoFinalize *bool `json:"auto-finalize,omitempty"` // When false, this job will wait in a PENDING state after it has finished its work, waiting for @block-job-finalize before making any block graph changes. When true, this job will automatically perform its abort or commit actions. Defaults to true. (Since 2.12) 659 AutoDismiss *bool `json:"auto-dismiss,omitempty"` // When false, this job will wait in a CONCLUDED state after it has completely ceased all work, and awaits @block-job-dismiss. When true, this job will automatically disappear from the query list without user intervention. Defaults to true. (Since 2.12) 660 FilterNodeName *string `json:"filter-node-name,omitempty"` // the node name that should be assigned to the filter driver that the backup job inserts into the graph above node specified by @drive. If this option is not given, a node name is autogenerated. (Since: 4.2) 661 XPerf *BackupPerf `json:"x-perf,omitempty"` // Performance options. (Since 6.0) 662 } 663 664 // Since: 1.6 665 type DriveBackup struct { 666 // Base type for this struct 667 BackupCommon 668 Target string `json:"target"` // the target of the new image. If the file exists, or if it is a device, the existing file/device will be used as the new destination. If it does not exist, a new file will be created. 669 Format *string `json:"format,omitempty"` // the format of the new destination, default is to probe if @mode is 'existing', else the format of the source 670 Mode *NewImageMode `json:"mode,omitempty"` // whether and how QEMU should create a new image, default is 'absolute-paths'. 671 } 672 673 // Since: 2.3 674 type BlockdevBackup struct { 675 // Base type for this struct 676 BackupCommon 677 Target string `json:"target"` // the device name or node-name of the backup target node. 678 } 679 680 // Since: 4.0 681 type XDbgBlockGraphNode struct { 682 Id uint64 `json:"id"` // Block graph node identifier. This @id is generated only for x-debug-query-block-graph and does not relate to any other identifiers in Qemu. 683 Type XDbgBlockGraphNodeType `json:"type"` // Type of graph node. Can be one of block-backend, block-job or block-driver-state. 684 Name string `json:"name"` // Human readable name of the node. Corresponds to node-name for block-driver-state nodes; is not guaranteed to be unique in the whole graph (with block-jobs and block-backends). 685 } 686 687 // Block Graph edge description for x-debug-query-block-graph. 688 // 689 // Since: 4.0 690 type XDbgBlockGraphEdge struct { 691 Parent uint64 `json:"parent"` // parent id 692 Child uint64 `json:"child"` // child id 693 Name string `json:"name"` // name of the relation (examples are 'file' and 'backing') 694 Perm []BlockPermission `json:"perm"` // granted permissions for the parent operating on the child 695 SharedPerm []BlockPermission `json:"shared-perm"` // permissions that can still be granted to other users of the child while it is still attached to this parent 696 } 697 698 // Block Graph - list of nodes and list of edges. 699 // 700 // Since: 4.0 701 type XDbgBlockGraph struct { 702 Nodes []XDbgBlockGraphNode `json:"nodes"` 703 Edges []XDbgBlockGraphEdge `json:"edges"` 704 } 705 706 // A set of parameters describing drive mirror setup. 707 // 708 // Since: 1.3 709 type DriveMirror struct { 710 JobId *string `json:"job-id,omitempty"` // identifier for the newly-created block job. If omitted, the device name will be used. (Since 2.7) 711 Device string `json:"device"` // the device name or node-name of a root node whose writes should be mirrored. 712 Target string `json:"target"` // the target of the new image. If the file exists, or if it is a device, the existing file/device will be used as the new destination. If it does not exist, a new file will be created. 713 Format *string `json:"format,omitempty"` // the format of the new destination, default is to probe if @mode is 'existing', else the format of the source 714 NodeName *string `json:"node-name,omitempty"` // the new block driver state node name in the graph (Since 2.1) 715 Replaces *string `json:"replaces,omitempty"` // with sync=full graph node name to be replaced by the new image when a whole image copy is done. This can be used to repair broken Quorum files. By default, @device is replaced, although implicitly created filters on it are kept. (Since 2.1) 716 Sync MirrorSyncMode `json:"sync"` // what parts of the disk image should be copied to the destination (all the disk, only the sectors allocated in the topmost image, or only new I/O). 717 Mode *NewImageMode `json:"mode,omitempty"` // whether and how QEMU should create a new image, default is 'absolute-paths'. 718 Speed *int64 `json:"speed,omitempty"` // the maximum speed, in bytes per second 719 Granularity *uint32 `json:"granularity,omitempty"` // granularity of the dirty bitmap, default is 64K if the image format doesn't have clusters, 4K if the clusters are smaller than that, else the cluster size. Must be a power of 2 between 512 and 64M (since 1.4). 720 BufSize *int64 `json:"buf-size,omitempty"` // maximum amount of data in flight from source to target (since 1.4). 721 OnSourceError *BlockdevOnError `json:"on-source-error,omitempty"` // the action to take on an error on the source, default 'report'. 'stop' and 'enospc' can only be used if the block device supports io-status (see BlockInfo). 722 OnTargetError *BlockdevOnError `json:"on-target-error,omitempty"` // the action to take on an error on the target, default 'report' (no limitations, since this applies to a different block device than @device). 723 Unmap *bool `json:"unmap,omitempty"` // Whether to try to unmap target sectors where source has only zero. If true, and target unallocated sectors will read as zero, target image sectors will be unmapped; otherwise, zeroes will be written. Both will result in identical contents. Default is true. (Since 2.4) 724 CopyMode *MirrorCopyMode `json:"copy-mode,omitempty"` // when to copy data to the destination; defaults to 'background' (Since: 3.0) 725 AutoFinalize *bool `json:"auto-finalize,omitempty"` // When false, this job will wait in a PENDING state after it has finished its work, waiting for @block-job-finalize before making any block graph changes. When true, this job will automatically perform its abort or commit actions. Defaults to true. (Since 3.1) 726 AutoDismiss *bool `json:"auto-dismiss,omitempty"` // When false, this job will wait in a CONCLUDED state after it has completely ceased all work, and awaits @block-job-dismiss. When true, this job will automatically disappear from the query list without user intervention. Defaults to true. (Since 3.1) 727 } 728 729 // Since: 2.4 730 type BlockDirtyBitmap struct { 731 Node string `json:"node"` // name of device/node which the bitmap is tracking 732 Name string `json:"name"` // name of the dirty bitmap 733 } 734 735 // Since: 2.4 736 type BlockDirtyBitmapAdd struct { 737 Node string `json:"node"` // name of device/node which the bitmap is tracking 738 Name string `json:"name"` // name of the dirty bitmap (must be less than 1024 bytes) 739 Granularity *uint32 `json:"granularity,omitempty"` // the bitmap granularity, default is 64k for block-dirty-bitmap-add 740 Persistent *bool `json:"persistent,omitempty"` // the bitmap is persistent, i.e. it will be saved to the corresponding block device image file on its close. For now only Qcow2 disks support persistent bitmaps. Default is false for block-dirty-bitmap-add. (Since: 2.10) 741 Disabled *bool `json:"disabled,omitempty"` // the bitmap is created in the disabled state, which means that it will not track drive changes. The bitmap may be enabled with block-dirty-bitmap-enable. Default is false. (Since: 4.0) 742 } 743 744 // Since: 4.0 745 type BlockDirtyBitmapMerge struct { 746 Node string `json:"node"` // name of device/node which the @target bitmap is tracking 747 Target string `json:"target"` // name of the destination dirty bitmap 748 Bitmaps []BlockDirtyBitmapMergeSource `json:"bitmaps"` // name(s) of the source dirty bitmap(s) at @node and/or fully specified BlockDirtyBitmap elements. The latter are supported since 4.1. 749 } 750 751 // SHA256 hash of dirty bitmap data 752 // 753 // Since: 2.10 754 type BlockDirtyBitmapSha256 struct { 755 Sha256 string `json:"sha256"` // ASCII representation of SHA256 bitmap hash 756 } 757 758 // A set of parameters describing block throttling. 759 // 760 // Since: 1.1 761 type BlockIOThrottle struct { 762 Device *string `json:"device,omitempty"` // Block device name 763 Id *string `json:"id,omitempty"` // The name or QOM path of the guest device (since: 2.8) 764 Bps int64 `json:"bps"` // total throughput limit in bytes per second 765 BpsRd int64 `json:"bps_rd"` // read throughput limit in bytes per second 766 BpsWr int64 `json:"bps_wr"` // write throughput limit in bytes per second 767 Iops int64 `json:"iops"` // total I/O operations per second 768 IopsRd int64 `json:"iops_rd"` // read I/O operations per second 769 IopsWr int64 `json:"iops_wr"` // write I/O operations per second 770 BpsMax *int64 `json:"bps_max,omitempty"` // total throughput limit during bursts, in bytes (Since 1.7) 771 BpsRdMax *int64 `json:"bps_rd_max,omitempty"` // read throughput limit during bursts, in bytes (Since 1.7) 772 BpsWrMax *int64 `json:"bps_wr_max,omitempty"` // write throughput limit during bursts, in bytes (Since 1.7) 773 IopsMax *int64 `json:"iops_max,omitempty"` // total I/O operations per second during bursts, in bytes (Since 1.7) 774 IopsRdMax *int64 `json:"iops_rd_max,omitempty"` // read I/O operations per second during bursts, in bytes (Since 1.7) 775 IopsWrMax *int64 `json:"iops_wr_max,omitempty"` // write I/O operations per second during bursts, in bytes (Since 1.7) 776 BpsMaxLength *int64 `json:"bps_max_length,omitempty"` // maximum length of the @bps_max burst period, in seconds. It must only be set if @bps_max is set as well. Defaults to 1. (Since 2.6) 777 BpsRdMaxLength *int64 `json:"bps_rd_max_length,omitempty"` // maximum length of the @bps_rd_max burst period, in seconds. It must only be set if @bps_rd_max is set as well. Defaults to 1. (Since 2.6) 778 BpsWrMaxLength *int64 `json:"bps_wr_max_length,omitempty"` // maximum length of the @bps_wr_max burst period, in seconds. It must only be set if @bps_wr_max is set as well. Defaults to 1. (Since 2.6) 779 IopsMaxLength *int64 `json:"iops_max_length,omitempty"` // maximum length of the @iops burst period, in seconds. It must only be set if @iops_max is set as well. Defaults to 1. (Since 2.6) 780 IopsRdMaxLength *int64 `json:"iops_rd_max_length,omitempty"` // maximum length of the @iops_rd_max burst period, in seconds. It must only be set if @iops_rd_max is set as well. Defaults to 1. (Since 2.6) 781 IopsWrMaxLength *int64 `json:"iops_wr_max_length,omitempty"` // maximum length of the @iops_wr_max burst period, in seconds. It must only be set if @iops_wr_max is set as well. Defaults to 1. (Since 2.6) 782 IopsSize *int64 `json:"iops_size,omitempty"` // an I/O size in bytes (Since 1.7) 783 Group *string `json:"group,omitempty"` // throttle group name (Since 2.4) 784 } 785 786 // Limit parameters for throttling. 787 // Since some limit combinations are illegal, limits should always be set in one 788 // transaction. All fields are optional. When setting limits, if a field is 789 // missing the current value is not changed. 790 // 791 // Since: 2.11 792 type ThrottleLimits struct { 793 IopsTotal *int64 `json:"iops-total,omitempty"` // limit total I/O operations per second 794 IopsTotalMax *int64 `json:"iops-total-max,omitempty"` // I/O operations burst 795 IopsTotalMaxLength *int64 `json:"iops-total-max-length,omitempty"` // length of the iops-total-max burst period, in seconds It must only be set if @iops-total-max is set as well. 796 IopsRead *int64 `json:"iops-read,omitempty"` // limit read operations per second 797 IopsReadMax *int64 `json:"iops-read-max,omitempty"` // I/O operations read burst 798 IopsReadMaxLength *int64 `json:"iops-read-max-length,omitempty"` // length of the iops-read-max burst period, in seconds It must only be set if @iops-read-max is set as well. 799 IopsWrite *int64 `json:"iops-write,omitempty"` // limit write operations per second 800 IopsWriteMax *int64 `json:"iops-write-max,omitempty"` // I/O operations write burst 801 IopsWriteMaxLength *int64 `json:"iops-write-max-length,omitempty"` // length of the iops-write-max burst period, in seconds It must only be set if @iops-write-max is set as well. 802 BpsTotal *int64 `json:"bps-total,omitempty"` // limit total bytes per second 803 BpsTotalMax *int64 `json:"bps-total-max,omitempty"` // total bytes burst 804 BpsTotalMaxLength *int64 `json:"bps-total-max-length,omitempty"` // length of the bps-total-max burst period, in seconds. It must only be set if @bps-total-max is set as well. 805 BpsRead *int64 `json:"bps-read,omitempty"` // limit read bytes per second 806 BpsReadMax *int64 `json:"bps-read-max,omitempty"` // total bytes read burst 807 BpsReadMaxLength *int64 `json:"bps-read-max-length,omitempty"` // length of the bps-read-max burst period, in seconds It must only be set if @bps-read-max is set as well. 808 BpsWrite *int64 `json:"bps-write,omitempty"` // limit write bytes per second 809 BpsWriteMax *int64 `json:"bps-write-max,omitempty"` // total bytes write burst 810 BpsWriteMaxLength *int64 `json:"bps-write-max-length,omitempty"` // length of the bps-write-max burst period, in seconds It must only be set if @bps-write-max is set as well. 811 IopsSize *int64 `json:"iops-size,omitempty"` // when limiting by iops max size of an I/O in bytes 812 } 813 814 // Properties for throttle-group objects. 815 // 816 // Since: 2.11 817 type ThrottleGroupProperties struct { 818 Limits *ThrottleLimits `json:"limits,omitempty"` // limits to apply for this throttle group 819 XIopsTotal *int64 `json:"x-iops-total,omitempty"` 820 XIopsTotalMax *int64 `json:"x-iops-total-max,omitempty"` 821 XIopsTotalMaxLength *int64 `json:"x-iops-total-max-length,omitempty"` 822 XIopsRead *int64 `json:"x-iops-read,omitempty"` 823 XIopsReadMax *int64 `json:"x-iops-read-max,omitempty"` 824 XIopsReadMaxLength *int64 `json:"x-iops-read-max-length,omitempty"` 825 XIopsWrite *int64 `json:"x-iops-write,omitempty"` 826 XIopsWriteMax *int64 `json:"x-iops-write-max,omitempty"` 827 XIopsWriteMaxLength *int64 `json:"x-iops-write-max-length,omitempty"` 828 XBpsTotal *int64 `json:"x-bps-total,omitempty"` 829 XBpsTotalMax *int64 `json:"x-bps-total-max,omitempty"` 830 XBpsTotalMaxLength *int64 `json:"x-bps-total-max-length,omitempty"` 831 XBpsRead *int64 `json:"x-bps-read,omitempty"` 832 XBpsReadMax *int64 `json:"x-bps-read-max,omitempty"` 833 XBpsReadMaxLength *int64 `json:"x-bps-read-max-length,omitempty"` 834 XBpsWrite *int64 `json:"x-bps-write,omitempty"` 835 XBpsWriteMax *int64 `json:"x-bps-write-max,omitempty"` 836 XBpsWriteMaxLength *int64 `json:"x-bps-write-max-length,omitempty"` 837 XIopsSize *int64 `json:"x-iops-size,omitempty"` 838 } 839 840 // Includes cache-related options for block devices 841 // 842 // Since: 2.9 843 type BlockdevCacheOptions struct { 844 Direct *bool `json:"direct,omitempty"` // enables use of O_DIRECT (bypass the host page cache; default: false) 845 NoFlush *bool `json:"no-flush,omitempty"` // ignore any flush requests for the device (default: false) 846 } 847 848 // Driver specific block device options for the file backend. 849 // 850 // Since: 2.9 851 type BlockdevOptionsFile struct { 852 Filename string `json:"filename"` // path to the image file 853 PrManager *string `json:"pr-manager,omitempty"` // the id for the object that will handle persistent reservations for this device (default: none, forward the commands via SG_IO; since 2.11) 854 Locking *OnOffAuto `json:"locking,omitempty"` // whether to enable file locking. If set to 'auto', only enable when Open File Descriptor (OFD) locking API is available (default: auto, since 2.10) 855 Aio *BlockdevAioOptions `json:"aio,omitempty"` // AIO backend (default: threads) (since: 2.8) 856 AioMaxBatch *int64 `json:"aio-max-batch,omitempty"` // maximum number of requests to batch together into a single submission in the AIO backend. The smallest value between this and the aio-max-batch value of the IOThread object is chosen. 0 means that the AIO backend will handle it automatically. (default: 0, since 6.2) 857 DropCache *bool `json:"drop-cache,omitempty"` // invalidate page cache during live migration. This prevents stale data on the migration destination with cache.direct=off. Currently only supported on Linux hosts. (default: on, since: 4.0) 858 XCheckCacheDropped *bool `json:"x-check-cache-dropped,omitempty"` // whether to check that page cache was dropped on live migration. May cause noticeable delays if the image file is large, do not use in production. (default: off) (since: 3.0) 859 } 860 861 // Driver specific block device options for the null backend. 862 // 863 // Since: 2.9 864 type BlockdevOptionsNull struct { 865 Size *int64 `json:"size,omitempty"` // size of the device in bytes. 866 LatencyNs *uint64 `json:"latency-ns,omitempty"` // emulated latency (in nanoseconds) in processing requests. Default to zero which completes requests immediately. (Since 2.4) 867 ReadZeroes *bool `json:"read-zeroes,omitempty"` // if true, reads from the device produce zeroes; if false, the buffer is left unchanged. (default: false; since: 4.1) 868 } 869 870 // Driver specific block device options for the NVMe backend. 871 // 872 // None: Note that the PCI @device must have been unbound from any host 873 // kernel driver before instructing QEMU to add the blockdev. 874 // 875 // Since: 2.12 876 type BlockdevOptionsNVMe struct { 877 Device string `json:"device"` // PCI controller address of the NVMe device in format hhhh:bb:ss.f (host:bus:slot.function) 878 Namespace int64 `json:"namespace"` // namespace number of the device, starting from 1. 879 } 880 881 // Driver specific block device options for the vvfat protocol. 882 // 883 // Since: 2.9 884 type BlockdevOptionsVVFAT struct { 885 Dir string `json:"dir"` // directory to be exported as FAT image 886 FatType *int64 `json:"fat-type,omitempty"` // FAT type: 12, 16 or 32 887 Floppy *bool `json:"floppy,omitempty"` // whether to export a floppy image (true) or partitioned hard disk (false; default) 888 Label *string `json:"label,omitempty"` // set the volume label, limited to 11 bytes. FAT16 and FAT32 traditionally have some restrictions on labels, which are ignored by most operating systems. Defaults to "QEMU VVFAT". (since 2.4) 889 Rw *bool `json:"rw,omitempty"` // whether to allow write operations (default: false) 890 } 891 892 // Driver specific block device options for image format that have no option 893 // besides their data source. 894 // 895 // Since: 2.9 896 type BlockdevOptionsGenericFormat struct { 897 File BlockdevRef `json:"file"` // reference to or definition of the data source block device 898 } 899 900 // Driver specific block device options for LUKS. 901 // 902 // Since: 2.9 903 type BlockdevOptionsLUKS struct { 904 // Base type for this struct 905 BlockdevOptionsGenericFormat 906 KeySecret *string `json:"key-secret,omitempty"` // the ID of a QCryptoSecret object providing the decryption key (since 2.6). Mandatory except when doing a metadata-only probe of the image. 907 } 908 909 // Driver specific block device options for image format that have no option 910 // besides their data source and an optional backing file. 911 // 912 // Since: 2.9 913 type BlockdevOptionsGenericCOWFormat struct { 914 // Base type for this struct 915 BlockdevOptionsGenericFormat 916 Backing *BlockdevRefOrNull `json:"backing,omitempty"` // reference to or definition of the backing file block device, null disables the backing file entirely. Defaults to the backing file stored the image file. 917 } 918 919 // Structure of flags for each metadata structure. Setting a field to 'true' 920 // makes qemu guard that structure against unintended overwriting. The default 921 // value is chosen according to the template given. 922 // 923 // Since: 2.9 924 type Qcow2OverlapCheckFlags struct { 925 Template *Qcow2OverlapCheckMode `json:"template,omitempty"` // Specifies a template mode which can be adjusted using the other flags, defaults to 'cached' 926 MainHeader *bool `json:"main-header,omitempty"` 927 ActiveL1 *bool `json:"active-l1,omitempty"` 928 ActiveL2 *bool `json:"active-l2,omitempty"` 929 RefcountTable *bool `json:"refcount-table,omitempty"` 930 RefcountBlock *bool `json:"refcount-block,omitempty"` 931 SnapshotTable *bool `json:"snapshot-table,omitempty"` 932 InactiveL1 *bool `json:"inactive-l1,omitempty"` 933 InactiveL2 *bool `json:"inactive-l2,omitempty"` 934 BitmapDirectory *bool `json:"bitmap-directory,omitempty"` // since 3.0 935 } 936 937 // Driver specific block device options for qcow. 938 // 939 // Since: 2.10 940 type BlockdevOptionsQcow struct { 941 // Base type for this struct 942 BlockdevOptionsGenericCOWFormat 943 Encrypt *BlockdevQcowEncryption `json:"encrypt,omitempty"` // Image decryption options. Mandatory for encrypted images, except when doing a metadata-only probe of the image. 944 } 945 946 // Filter driver intended to be inserted between format and protocol node 947 // and do preallocation in protocol node on write. 948 // 949 // Since: 6.0 950 type BlockdevOptionsPreallocate struct { 951 // Base type for this struct 952 BlockdevOptionsGenericFormat 953 PreallocAlign *int64 `json:"prealloc-align,omitempty"` // on preallocation, align file length to this number, default 1048576 (1M) 954 PreallocSize *int64 `json:"prealloc-size,omitempty"` // how much to preallocate, default 134217728 (128M) 955 } 956 957 // Driver specific block device options for qcow2. 958 // 959 // Since: 2.9 960 type BlockdevOptionsQcow2 struct { 961 // Base type for this struct 962 BlockdevOptionsGenericCOWFormat 963 LazyRefcounts *bool `json:"lazy-refcounts,omitempty"` // whether to enable the lazy refcounts feature (default is taken from the image file) 964 PassDiscardRequest *bool `json:"pass-discard-request,omitempty"` // whether discard requests to the qcow2 device should be forwarded to the data source 965 PassDiscardSnapshot *bool `json:"pass-discard-snapshot,omitempty"` // whether discard requests for the data source should be issued when a snapshot operation (e.g. deleting a snapshot) frees clusters in the qcow2 file 966 PassDiscardOther *bool `json:"pass-discard-other,omitempty"` // whether discard requests for the data source should be issued on other occasions where a cluster gets freed 967 OverlapCheck *Qcow2OverlapChecks `json:"overlap-check,omitempty"` // which overlap checks to perform for writes to the image, defaults to 'cached' (since 2.2) 968 CacheSize *int64 `json:"cache-size,omitempty"` // the maximum total size of the L2 table and refcount block caches in bytes (since 2.2) 969 L2CacheSize *int64 `json:"l2-cache-size,omitempty"` // the maximum size of the L2 table cache in bytes (since 2.2) 970 L2CacheEntrySize *int64 `json:"l2-cache-entry-size,omitempty"` // the size of each entry in the L2 cache in bytes. It must be a power of two between 512 and the cluster size. The default value is the cluster size (since 2.12) 971 RefcountCacheSize *int64 `json:"refcount-cache-size,omitempty"` // the maximum size of the refcount block cache in bytes (since 2.2) 972 CacheCleanInterval *int64 `json:"cache-clean-interval,omitempty"` // clean unused entries in the L2 and refcount caches. The interval is in seconds. The default value is 600 on supporting platforms, and 0 on other platforms. 0 disables this feature. (since 2.5) 973 Encrypt *BlockdevQcow2Encryption `json:"encrypt,omitempty"` // Image decryption options. Mandatory for encrypted images, except when doing a metadata-only probe of the image. (since 2.10) 974 DataFile *BlockdevRef `json:"data-file,omitempty"` // reference to or definition of the external data file. This may only be specified for images that require an external data file. If it is not specified for such an image, the data file name is loaded from the image file. (since 4.0) 975 } 976 977 // Since: 2.12 978 type SshHostKeyHash struct { 979 Type SshHostKeyCheckHashType `json:"type"` // The hash algorithm used for the hash 980 Hash string `json:"hash"` // The expected hash value 981 } 982 983 // Since: 2.9 984 type BlockdevOptionsSsh struct { 985 Server InetSocketAddress `json:"server"` // host address 986 Path string `json:"path"` // path to the image on the host 987 User *string `json:"user,omitempty"` // user as which to connect, defaults to current local user name 988 HostKeyCheck *SshHostKeyCheck `json:"host-key-check,omitempty"` // Defines how and what to check the host key against (default: known_hosts) 989 } 990 991 // Describes a single error injection for blkdebug. 992 // 993 // Since: 2.9 994 type BlkdebugInjectErrorOptions struct { 995 Event BlkdebugEvent `json:"event"` // trigger event 996 State *int64 `json:"state,omitempty"` // the state identifier blkdebug needs to be in to actually trigger the event; defaults to "any" 997 Iotype *BlkdebugIOType `json:"iotype,omitempty"` // the type of I/O operations on which this error should be injected; defaults to "all read, write, write-zeroes, discard, and flush operations" (since: 4.1) 998 Errno *int64 `json:"errno,omitempty"` // error identifier (errno) to be returned; defaults to EIO 999 Sector *int64 `json:"sector,omitempty"` // specifies the sector index which has to be affected in order to actually trigger the event; defaults to "any sector" 1000 Once *bool `json:"once,omitempty"` // disables further events after this one has been triggered; defaults to false 1001 Immediately *bool `json:"immediately,omitempty"` // fail immediately; defaults to false 1002 } 1003 1004 // Describes a single state-change event for blkdebug. 1005 // 1006 // Since: 2.9 1007 type BlkdebugSetStateOptions struct { 1008 Event BlkdebugEvent `json:"event"` // trigger event 1009 State *int64 `json:"state,omitempty"` // the current state identifier blkdebug needs to be in; defaults to "any" 1010 NewState int64 `json:"new_state"` // the state identifier blkdebug is supposed to assume if this event is triggered 1011 } 1012 1013 // Driver specific block device options for blkdebug. 1014 // 1015 // Since: 2.9 1016 type BlockdevOptionsBlkdebug struct { 1017 Image BlockdevRef `json:"image"` // underlying raw block device (or image file) 1018 Config *string `json:"config,omitempty"` // filename of the configuration file 1019 Align *int64 `json:"align,omitempty"` // required alignment for requests in bytes, must be positive power of 2, or 0 for default 1020 MaxTransfer *int32 `json:"max-transfer,omitempty"` // maximum size for I/O transfers in bytes, must be positive multiple of @align and of the underlying file's request alignment (but need not be a power of 2), or 0 for default (since 2.10) 1021 OptWriteZero *int32 `json:"opt-write-zero,omitempty"` // preferred alignment for write zero requests in bytes, must be positive multiple of @align and of the underlying file's request alignment (but need not be a power of 2), or 0 for default (since 2.10) 1022 MaxWriteZero *int32 `json:"max-write-zero,omitempty"` // maximum size for write zero requests in bytes, must be positive multiple of @align, of @opt-write-zero, and of the underlying file's request alignment (but need not be a power of 2), or 0 for default (since 2.10) 1023 OptDiscard *int32 `json:"opt-discard,omitempty"` // preferred alignment for discard requests in bytes, must be positive multiple of @align and of the underlying file's request alignment (but need not be a power of 2), or 0 for default (since 2.10) 1024 MaxDiscard *int32 `json:"max-discard,omitempty"` // maximum size for discard requests in bytes, must be positive multiple of @align, of @opt-discard, and of the underlying file's request alignment (but need not be a power of 2), or 0 for default (since 2.10) 1025 InjectError []BlkdebugInjectErrorOptions `json:"inject-error,omitempty"` // array of error injection descriptions 1026 SetState []BlkdebugSetStateOptions `json:"set-state,omitempty"` // array of state-change descriptions 1027 TakeChildPerms []BlockPermission `json:"take-child-perms,omitempty"` // Permissions to take on @image in addition to what is necessary anyway (which depends on how the blkdebug node is used). Defaults to none. (since 5.0) 1028 UnshareChildPerms []BlockPermission `json:"unshare-child-perms,omitempty"` // Permissions not to share on @image in addition to what cannot be shared anyway (which depends on how the blkdebug node is used). Defaults to none. (since 5.0) 1029 } 1030 1031 // Driver specific block device options for blklogwrites. 1032 // 1033 // Since: 3.0 1034 type BlockdevOptionsBlklogwrites struct { 1035 File BlockdevRef `json:"file"` // block device 1036 Log BlockdevRef `json:"log"` // block device used to log writes to @file 1037 LogSectorSize *uint32 `json:"log-sector-size,omitempty"` // sector size used in logging writes to @file, determines granularity of offsets and sizes of writes (default: 512) 1038 LogAppend *bool `json:"log-append,omitempty"` // append to an existing log (default: false) 1039 LogSuperUpdateInterval *uint64 `json:"log-super-update-interval,omitempty"` // interval of write requests after which the log super block is updated to disk (default: 4096) 1040 } 1041 1042 // Driver specific block device options for blkverify. 1043 // 1044 // Since: 2.9 1045 type BlockdevOptionsBlkverify struct { 1046 Test BlockdevRef `json:"test"` // block device to be tested 1047 Raw BlockdevRef `json:"raw"` // raw image used for verification 1048 } 1049 1050 // Driver specific block device options for blkreplay. 1051 // 1052 // Since: 4.2 1053 type BlockdevOptionsBlkreplay struct { 1054 Image BlockdevRef `json:"image"` // disk image which should be controlled with blkreplay 1055 } 1056 1057 // Driver specific block device options for Quorum 1058 // 1059 // Since: 2.9 1060 type BlockdevOptionsQuorum struct { 1061 Blkverify *bool `json:"blkverify,omitempty"` // true if the driver must print content mismatch set to false by default 1062 Children []BlockdevRef `json:"children"` // the children block devices to use 1063 VoteThreshold int64 `json:"vote-threshold"` // the vote limit under which a read will fail 1064 RewriteCorrupted *bool `json:"rewrite-corrupted,omitempty"` // rewrite corrupted data when quorum is reached (Since 2.1) 1065 ReadPattern *QuorumReadPattern `json:"read-pattern,omitempty"` // choose read pattern and set to quorum by default (Since 2.2) 1066 } 1067 1068 // Driver specific block device options for Gluster 1069 // 1070 // Since: 2.9 1071 type BlockdevOptionsGluster struct { 1072 Volume string `json:"volume"` // name of gluster volume where VM image resides 1073 Path string `json:"path"` // absolute path to image file in gluster volume 1074 Server []SocketAddress `json:"server"` // gluster servers description 1075 Debug *int64 `json:"debug,omitempty"` // libgfapi log level (default '4' which is Error) (Since 2.8) 1076 Logfile *string `json:"logfile,omitempty"` // libgfapi log file (default /dev/stderr) (Since 2.8) 1077 } 1078 1079 // None: Driver specific block device options for iscsi 1080 // 1081 // Since: 2.9 1082 type BlockdevOptionsIscsi struct { 1083 Transport IscsiTransport `json:"transport"` // The iscsi transport type 1084 Portal string `json:"portal"` // The address of the iscsi portal 1085 Target string `json:"target"` // The target iqn name 1086 Lun *int64 `json:"lun,omitempty"` // LUN to connect to. Defaults to 0. 1087 User *string `json:"user,omitempty"` // User name to log in with. If omitted, no CHAP authentication is performed. 1088 PasswordSecret *string `json:"password-secret,omitempty"` // The ID of a QCryptoSecret object providing the password for the login. This option is required if @user is specified. 1089 InitiatorName *string `json:"initiator-name,omitempty"` // The iqn name we want to identify to the target as. If this option is not specified, an initiator name is generated automatically. 1090 HeaderDigest *IscsiHeaderDigest `json:"header-digest,omitempty"` // The desired header digest. Defaults to none-crc32c. 1091 Timeout *int64 `json:"timeout,omitempty"` // Timeout in seconds after which a request will timeout. 0 means no timeout and is the default. 1092 } 1093 1094 // Since: 6.1 1095 type RbdEncryptionOptionsLUKSBase struct { 1096 KeySecret string `json:"key-secret"` // ID of a QCryptoSecret object providing a passphrase for unlocking the encryption 1097 } 1098 1099 // Since: 6.1 1100 type RbdEncryptionCreateOptionsLUKSBase struct { 1101 // Base type for this struct 1102 RbdEncryptionOptionsLUKSBase 1103 CipherAlg *QCryptoCipherAlgorithm `json:"cipher-alg,omitempty"` // The encryption algorithm 1104 } 1105 1106 // Since: 6.1 1107 type RbdEncryptionOptionsLUKS struct { 1108 // Base type for this struct 1109 RbdEncryptionOptionsLUKSBase 1110 } 1111 1112 // Since: 6.1 1113 type RbdEncryptionOptionsLUKS2 struct { 1114 // Base type for this struct 1115 RbdEncryptionOptionsLUKSBase 1116 } 1117 1118 // Since: 6.1 1119 type RbdEncryptionCreateOptionsLUKS struct { 1120 // Base type for this struct 1121 RbdEncryptionCreateOptionsLUKSBase 1122 } 1123 1124 // Since: 6.1 1125 type RbdEncryptionCreateOptionsLUKS2 struct { 1126 // Base type for this struct 1127 RbdEncryptionCreateOptionsLUKSBase 1128 } 1129 1130 // Since: 2.9 1131 type BlockdevOptionsRbd struct { 1132 Pool string `json:"pool"` // Ceph pool name. 1133 Namespace *string `json:"namespace,omitempty"` // Rados namespace name in the Ceph pool. (Since 5.0) 1134 Image string `json:"image"` // Image name in the Ceph pool. 1135 Conf *string `json:"conf,omitempty"` // path to Ceph configuration file. Values in the configuration file will be overridden by options specified via QAPI. 1136 Snapshot *string `json:"snapshot,omitempty"` // Ceph snapshot name. 1137 Encrypt *RbdEncryptionOptions `json:"encrypt,omitempty"` // Image encryption options. (Since 6.1) 1138 User *string `json:"user,omitempty"` // Ceph id name. 1139 AuthClientRequired []RbdAuthMode `json:"auth-client-required,omitempty"` // Acceptable authentication modes. This maps to Ceph configuration option "auth_client_required". (Since 3.0) 1140 KeySecret *string `json:"key-secret,omitempty"` // ID of a QCryptoSecret object providing a key for cephx authentication. This maps to Ceph configuration option "key". (Since 3.0) 1141 Server []InetSocketAddressBase `json:"server,omitempty"` // Monitor host address and port. This maps to the "mon_host" Ceph option. 1142 } 1143 1144 // Driver specific block device options for replication 1145 // 1146 // Since: 2.9 1147 type BlockdevOptionsReplication struct { 1148 // Base type for this struct 1149 BlockdevOptionsGenericFormat 1150 Mode ReplicationMode `json:"mode"` // the replication mode 1151 TopId *string `json:"top-id,omitempty"` // In secondary mode, node name or device ID of the root node who owns the replication node chain. Must not be given in primary mode. 1152 } 1153 1154 // Captures the address of the socket 1155 // 1156 // Since: 2.9 1157 type NFSServer struct { 1158 Type NFSTransport `json:"type"` // transport type used for NFS (only TCP supported) 1159 Host string `json:"host"` // host address for NFS server 1160 } 1161 1162 // Driver specific block device option for NFS 1163 // 1164 // Since: 2.9 1165 type BlockdevOptionsNfs struct { 1166 Server NFSServer `json:"server"` // host address 1167 Path string `json:"path"` // path of the image on the host 1168 User *int64 `json:"user,omitempty"` // UID value to use when talking to the server (defaults to 65534 on Windows and getuid() on unix) 1169 Group *int64 `json:"group,omitempty"` // GID value to use when talking to the server (defaults to 65534 on Windows and getgid() in unix) 1170 TcpSynCount *int64 `json:"tcp-syn-count,omitempty"` // number of SYNs during the session establishment (defaults to libnfs default) 1171 ReadaheadSize *int64 `json:"readahead-size,omitempty"` // set the readahead size in bytes (defaults to libnfs default) 1172 PageCacheSize *int64 `json:"page-cache-size,omitempty"` // set the pagecache size in bytes (defaults to libnfs default) 1173 Debug *int64 `json:"debug,omitempty"` // set the NFS debug level (max 2) (defaults to libnfs default) 1174 } 1175 1176 // Driver specific block device options shared by all protocols supported by the 1177 // curl backend. 1178 // 1179 // Since: 2.9 1180 type BlockdevOptionsCurlBase struct { 1181 Url string `json:"url"` // URL of the image file 1182 Readahead *int64 `json:"readahead,omitempty"` // Size of the read-ahead cache; must be a multiple of 512 (defaults to 256 kB) 1183 Timeout *int64 `json:"timeout,omitempty"` // Timeout for connections, in seconds (defaults to 5) 1184 Username *string `json:"username,omitempty"` // Username for authentication (defaults to none) 1185 PasswordSecret *string `json:"password-secret,omitempty"` // ID of a QCryptoSecret object providing a password for authentication (defaults to no password) 1186 ProxyUsername *string `json:"proxy-username,omitempty"` // Username for proxy authentication (defaults to none) 1187 ProxyPasswordSecret *string `json:"proxy-password-secret,omitempty"` // ID of a QCryptoSecret object providing a password for proxy authentication (defaults to no password) 1188 } 1189 1190 // Driver specific block device options for HTTP connections over the curl 1191 // backend. URLs must start with "http://". 1192 // 1193 // Since: 2.9 1194 type BlockdevOptionsCurlHttp struct { 1195 // Base type for this struct 1196 BlockdevOptionsCurlBase 1197 Cookie *string `json:"cookie,omitempty"` // List of cookies to set; format is "name1=content1; name2=content2;" as explained by CURLOPT_COOKIE(3). Defaults to no cookies. 1198 CookieSecret *string `json:"cookie-secret,omitempty"` // ID of a QCryptoSecret object providing the cookie data in a secure way. See @cookie for the format. (since 2.10) 1199 } 1200 1201 // Driver specific block device options for HTTPS connections over the curl 1202 // backend. URLs must start with "https://". 1203 // 1204 // Since: 2.9 1205 type BlockdevOptionsCurlHttps struct { 1206 // Base type for this struct 1207 BlockdevOptionsCurlBase 1208 Cookie *string `json:"cookie,omitempty"` // List of cookies to set; format is "name1=content1; name2=content2;" as explained by CURLOPT_COOKIE(3). Defaults to no cookies. 1209 Sslverify *bool `json:"sslverify,omitempty"` // Whether to verify the SSL certificate's validity (defaults to true) 1210 CookieSecret *string `json:"cookie-secret,omitempty"` // ID of a QCryptoSecret object providing the cookie data in a secure way. See @cookie for the format. (since 2.10) 1211 } 1212 1213 // Driver specific block device options for FTP connections over the curl 1214 // backend. URLs must start with "ftp://". 1215 // 1216 // Since: 2.9 1217 type BlockdevOptionsCurlFtp struct { 1218 // Base type for this struct 1219 BlockdevOptionsCurlBase 1220 } 1221 1222 // Driver specific block device options for FTPS connections over the curl 1223 // backend. URLs must start with "ftps://". 1224 // 1225 // Since: 2.9 1226 type BlockdevOptionsCurlFtps struct { 1227 // Base type for this struct 1228 BlockdevOptionsCurlBase 1229 Sslverify *bool `json:"sslverify,omitempty"` // Whether to verify the SSL certificate's validity (defaults to true) 1230 } 1231 1232 // Driver specific block device options for NBD. 1233 // 1234 // Since: 2.9 1235 type BlockdevOptionsNbd struct { 1236 Server SocketAddress `json:"server"` // NBD server address 1237 Export *string `json:"export,omitempty"` // export name 1238 TlsCreds *string `json:"tls-creds,omitempty"` // TLS credentials ID 1239 TlsHostname *string `json:"tls-hostname,omitempty"` // TLS hostname override for certificate validation (Since 7.0) 1240 XDirtyBitmap *string `json:"x-dirty-bitmap,omitempty"` // A metadata context name such as "qemu:dirty-bitmap:NAME" or "qemu:allocation-depth" to query in place of the traditional "base:allocation" block status (see NBD_OPT_LIST_META_CONTEXT in the NBD protocol; and yes, naming this option x-context would have made more sense) (since 3.0) 1241 ReconnectDelay *uint32 `json:"reconnect-delay,omitempty"` // On an unexpected disconnect, the nbd client tries to connect again until succeeding or encountering a serious error. During the first @reconnect-delay seconds, all requests are paused and will be rerun on a successful reconnect. After that time, any delayed requests and all future requests before a successful reconnect will immediately fail. Default 0 (Since 4.2) 1242 OpenTimeout *uint32 `json:"open-timeout,omitempty"` // In seconds. If zero, the nbd driver tries the connection only once, and fails to open if the connection fails. If non-zero, the nbd driver will repeat connection attempts until successful or until @open-timeout seconds have elapsed. Default 0 (Since 7.0) 1243 } 1244 1245 // Driver specific block device options for the raw driver. 1246 // 1247 // Since: 2.9 1248 type BlockdevOptionsRaw struct { 1249 // Base type for this struct 1250 BlockdevOptionsGenericFormat 1251 Offset *int64 `json:"offset,omitempty"` // position where the block device starts 1252 Size *int64 `json:"size,omitempty"` // the assumed size of the device 1253 } 1254 1255 // Driver specific block device options for the throttle driver 1256 // 1257 // Since: 2.11 1258 type BlockdevOptionsThrottle struct { 1259 ThrottleGroup string `json:"throttle-group"` // the name of the throttle-group object to use. It must already exist. 1260 File BlockdevRef `json:"file"` // reference to or definition of the data source block device 1261 } 1262 1263 // Driver specific block device options for the copy-on-read driver. 1264 // 1265 // Since: 6.0 1266 type BlockdevOptionsCor struct { 1267 // Base type for this struct 1268 BlockdevOptionsGenericFormat 1269 Bottom *string `json:"bottom,omitempty"` // The name of a non-filter node (allocation-bearing layer) that limits the COR operations in the backing chain (inclusive), so that no data below this node will be copied by this filter. If option is absent, the limit is not applied, so that data from all backing layers may be copied. 1270 } 1271 1272 // Driver specific block device options for the copy-before-write driver, 1273 // which does so called copy-before-write operations: when data is 1274 // written to the filter, the filter first reads corresponding blocks 1275 // from its file child and copies them to @target child. After successfully 1276 // copying, the write request is propagated to file child. If copying 1277 // fails, the original write request is failed too and no data is written 1278 // to file child. 1279 // 1280 // Since: 6.2 1281 type BlockdevOptionsCbw struct { 1282 // Base type for this struct 1283 BlockdevOptionsGenericFormat 1284 Target BlockdevRef `json:"target"` // The target for copy-before-write operations. 1285 Bitmap *BlockDirtyBitmap `json:"bitmap,omitempty"` // If specified, copy-before-write filter will do copy-before-write operations only for dirty regions of the bitmap. Bitmap size must be equal to length of file and target child of the filter. Note also, that bitmap is used only to initialize internal bitmap of the process, so further modifications (or removing) of specified bitmap doesn't influence the filter. (Since 7.0) 1286 } 1287 1288 // Driver specific image creation options for file. 1289 // 1290 // Since: 2.12 1291 type BlockdevCreateOptionsFile struct { 1292 Filename string `json:"filename"` // Filename for the new image file 1293 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1294 Preallocation *PreallocMode `json:"preallocation,omitempty"` // Preallocation mode for the new image (default: off; allowed values: off, falloc (if CONFIG_POSIX_FALLOCATE), full (if CONFIG_POSIX)) 1295 Nocow *bool `json:"nocow,omitempty"` // Turn off copy-on-write (valid only on btrfs; default: off) 1296 ExtentSizeHint *uint64 `json:"extent-size-hint,omitempty"` // Extent size hint to add to the image file; 0 for not adding an extent size hint (default: 1 MB, since 5.1) 1297 } 1298 1299 // Driver specific image creation options for gluster. 1300 // 1301 // Since: 2.12 1302 type BlockdevCreateOptionsGluster struct { 1303 Location BlockdevOptionsGluster `json:"location"` // Where to store the new image file 1304 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1305 Preallocation *PreallocMode `json:"preallocation,omitempty"` // Preallocation mode for the new image (default: off; allowed values: off, falloc (if CONFIG_GLUSTERFS_FALLOCATE), full (if CONFIG_GLUSTERFS_ZEROFILL)) 1306 } 1307 1308 // Driver specific image creation options for LUKS. 1309 // 1310 // Since: 2.12 1311 type BlockdevCreateOptionsLUKS struct { 1312 // Base type for this struct 1313 QCryptoBlockCreateOptionsLUKS 1314 File BlockdevRef `json:"file"` // Node to create the image format on 1315 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1316 Preallocation *PreallocMode `json:"preallocation,omitempty"` // Preallocation mode for the new image (since: 4.2) (default: off; allowed values: off, metadata, falloc, full) 1317 } 1318 1319 // Driver specific image creation options for NFS. 1320 // 1321 // Since: 2.12 1322 type BlockdevCreateOptionsNfs struct { 1323 Location BlockdevOptionsNfs `json:"location"` // Where to store the new image file 1324 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1325 } 1326 1327 // Driver specific image creation options for parallels. 1328 // 1329 // Since: 2.12 1330 type BlockdevCreateOptionsParallels struct { 1331 File BlockdevRef `json:"file"` // Node to create the image format on 1332 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1333 ClusterSize *uint64 `json:"cluster-size,omitempty"` // Cluster size in bytes (default: 1 MB) 1334 } 1335 1336 // Driver specific image creation options for qcow. 1337 // 1338 // Since: 2.12 1339 type BlockdevCreateOptionsQcow struct { 1340 File BlockdevRef `json:"file"` // Node to create the image format on 1341 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1342 BackingFile *string `json:"backing-file,omitempty"` // File name of the backing file if a backing file should be used 1343 Encrypt *QCryptoBlockCreateOptions `json:"encrypt,omitempty"` // Encryption options if the image should be encrypted 1344 } 1345 1346 // Driver specific image creation options for qcow2. 1347 // 1348 // Since: 2.12 1349 type BlockdevCreateOptionsQcow2 struct { 1350 File BlockdevRef `json:"file"` // Node to create the image format on 1351 DataFile *BlockdevRef `json:"data-file,omitempty"` // Node to use as an external data file in which all guest data is stored so that only metadata remains in the qcow2 file (since: 4.0) 1352 DataFileRaw *bool `json:"data-file-raw,omitempty"` // True if the external data file must stay valid as a standalone (read-only) raw image without looking at qcow2 metadata (default: false; since: 4.0) 1353 ExtendedL2 *bool `json:"extended-l2,omitempty"` // True to make the image have extended L2 entries (default: false; since 5.2) 1354 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1355 Version *BlockdevQcow2Version `json:"version,omitempty"` // Compatibility level (default: v3) 1356 BackingFile *string `json:"backing-file,omitempty"` // File name of the backing file if a backing file should be used 1357 BackingFmt *BlockdevDriver `json:"backing-fmt,omitempty"` // Name of the block driver to use for the backing file 1358 Encrypt *QCryptoBlockCreateOptions `json:"encrypt,omitempty"` // Encryption options if the image should be encrypted 1359 ClusterSize *uint64 `json:"cluster-size,omitempty"` // qcow2 cluster size in bytes (default: 65536) 1360 Preallocation *PreallocMode `json:"preallocation,omitempty"` // Preallocation mode for the new image (default: off; allowed values: off, falloc, full, metadata) 1361 LazyRefcounts *bool `json:"lazy-refcounts,omitempty"` // True if refcounts may be updated lazily (default: off) 1362 RefcountBits *int64 `json:"refcount-bits,omitempty"` // Width of reference counts in bits (default: 16) 1363 CompressionType *Qcow2CompressionType `json:"compression-type,omitempty"` // The image cluster compression method (default: zlib, since 5.1) 1364 } 1365 1366 // Driver specific image creation options for qed. 1367 // 1368 // Since: 2.12 1369 type BlockdevCreateOptionsQed struct { 1370 File BlockdevRef `json:"file"` // Node to create the image format on 1371 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1372 BackingFile *string `json:"backing-file,omitempty"` // File name of the backing file if a backing file should be used 1373 BackingFmt *BlockdevDriver `json:"backing-fmt,omitempty"` // Name of the block driver to use for the backing file 1374 ClusterSize *uint64 `json:"cluster-size,omitempty"` // Cluster size in bytes (default: 65536) 1375 TableSize *int64 `json:"table-size,omitempty"` // L1/L2 table size (in clusters) 1376 } 1377 1378 // Driver specific image creation options for rbd/Ceph. 1379 // 1380 // Since: 2.12 1381 type BlockdevCreateOptionsRbd struct { 1382 Location BlockdevOptionsRbd `json:"location"` // Where to store the new image file. This location cannot point to a snapshot. 1383 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1384 ClusterSize *uint64 `json:"cluster-size,omitempty"` // RBD object size 1385 Encrypt *RbdEncryptionCreateOptions `json:"encrypt,omitempty"` // Image encryption options. (Since 6.1) 1386 } 1387 1388 // Driver specific image creation options for VMDK. 1389 // 1390 // Since: 4.0 1391 type BlockdevCreateOptionsVmdk struct { 1392 File BlockdevRef `json:"file"` // Where to store the new image file. This refers to the image file for monolithcSparse and streamOptimized format, or the descriptor file for other formats. 1393 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1394 Extents []BlockdevRef `json:"extents,omitempty"` // Where to store the data extents. Required for monolithcFlat, twoGbMaxExtentSparse and twoGbMaxExtentFlat formats. For monolithicFlat, only one entry is required; for twoGbMaxExtent* formats, the number of entries required is calculated as extent_number = virtual_size / 2GB. Providing more extents than will be used is an error. 1395 Subformat *BlockdevVmdkSubformat `json:"subformat,omitempty"` // The subformat of the VMDK image. Default: "monolithicSparse". 1396 BackingFile *string `json:"backing-file,omitempty"` // The path of backing file. Default: no backing file is used. 1397 AdapterType *BlockdevVmdkAdapterType `json:"adapter-type,omitempty"` // The adapter type used to fill in the descriptor. Default: ide. 1398 Hwversion *string `json:"hwversion,omitempty"` // Hardware version. The meaningful options are "4" or "6". Default: "4". 1399 Toolsversion *string `json:"toolsversion,omitempty"` // VMware guest tools version. Default: "2147483647" (Since 6.2) 1400 ZeroedGrain *bool `json:"zeroed-grain,omitempty"` // Whether to enable zeroed-grain feature for sparse subformats. Default: false. 1401 } 1402 1403 // Driver specific image creation options for SSH. 1404 // 1405 // Since: 2.12 1406 type BlockdevCreateOptionsSsh struct { 1407 Location BlockdevOptionsSsh `json:"location"` // Where to store the new image file 1408 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1409 } 1410 1411 // Driver specific image creation options for VDI. 1412 // 1413 // Since: 2.12 1414 type BlockdevCreateOptionsVdi struct { 1415 File BlockdevRef `json:"file"` // Node to create the image format on 1416 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1417 Preallocation *PreallocMode `json:"preallocation,omitempty"` // Preallocation mode for the new image (default: off; allowed values: off, metadata) 1418 } 1419 1420 // Driver specific image creation options for vhdx. 1421 // 1422 // Since: 2.12 1423 type BlockdevCreateOptionsVhdx struct { 1424 File BlockdevRef `json:"file"` // Node to create the image format on 1425 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1426 LogSize *uint64 `json:"log-size,omitempty"` // Log size in bytes, must be a multiple of 1 MB (default: 1 MB) 1427 BlockSize *uint64 `json:"block-size,omitempty"` // Block size in bytes, must be a multiple of 1 MB and not larger than 256 MB (default: automatically choose a block size depending on the image size) 1428 Subformat *BlockdevVhdxSubformat `json:"subformat,omitempty"` // vhdx subformat (default: dynamic) 1429 BlockStateZero *bool `json:"block-state-zero,omitempty"` // Force use of payload blocks of type 'ZERO'. Non-standard, but default. Do not set to 'off' when using 'qemu-img convert' with subformat=dynamic. 1430 } 1431 1432 // Driver specific image creation options for vpc (VHD). 1433 // 1434 // Since: 2.12 1435 type BlockdevCreateOptionsVpc struct { 1436 File BlockdevRef `json:"file"` // Node to create the image format on 1437 Size uint64 `json:"size"` // Size of the virtual disk in bytes 1438 Subformat *BlockdevVpcSubformat `json:"subformat,omitempty"` // vhdx subformat (default: dynamic) 1439 ForceSize *bool `json:"force-size,omitempty"` // Force use of the exact byte size instead of rounding to the next size that can be represented in CHS geometry (default: false) 1440 } 1441 1442 // Driver specific image amend options for LUKS. 1443 // 1444 // Since: 5.1 1445 type BlockdevAmendOptionsLUKS struct { 1446 // Base type for this struct 1447 QCryptoBlockAmendOptionsLUKS 1448 } 1449 1450 // Driver specific image amend options for qcow2. 1451 // For now, only encryption options can be amended 1452 // 1453 // @encrypt Encryption options to be amended 1454 // 1455 // Since: 5.1 1456 type BlockdevAmendOptionsQcow2 struct { 1457 Encrypt *QCryptoBlockAmendOptions `json:"encrypt,omitempty"` 1458 } 1459 1460 // Notes: In transaction, if @name is empty, or any snapshot matching @name 1461 // exists, the operation will fail. Only some image formats support it, 1462 // for example, qcow2, and rbd. 1463 // 1464 // Since: 1.7 1465 type BlockdevSnapshotInternal struct { 1466 Device string `json:"device"` // the device name or node-name of a root node to generate the snapshot from 1467 Name string `json:"name"` // the name of the internal snapshot to be created 1468 } 1469 1470 // Information about a job. 1471 // 1472 // Since: 3.0 1473 type JobInfo struct { 1474 Id string `json:"id"` // The job identifier 1475 Type JobType `json:"type"` // The kind of job that is being performed 1476 Status JobStatus `json:"status"` // Current job state/status 1477 CurrentProgress int64 `json:"current-progress"` // Progress made until now. The unit is arbitrary and the value can only meaningfully be used for the ratio of @current-progress to @total-progress. The value is monotonically increasing. 1478 TotalProgress int64 `json:"total-progress"` // Estimated @current-progress value at the completion of the job. This value can arbitrarily change while the job is running, in both directions. 1479 Error *string `json:"error,omitempty"` // If this field is present, the job failed; if it is still missing in the CONCLUDED state, this indicates successful completion. The value is a human-readable error message to describe the reason for the job failure. It should not be parsed by applications. 1480 } 1481 1482 // Keep this type consistent with the nbd-server-start arguments. The only 1483 // intended difference is using SocketAddress instead of SocketAddressLegacy. 1484 // 1485 // Since: 4.2 1486 type NbdServerOptions struct { 1487 Addr SocketAddress `json:"addr"` // Address on which to listen. 1488 TlsCreds *string `json:"tls-creds,omitempty"` // ID of the TLS credentials object (since 2.6). 1489 TlsAuthz *string `json:"tls-authz,omitempty"` // ID of the QAuthZ authorization object used to validate the client's x509 distinguished name. This object is is only resolved at time of use, so can be deleted and recreated on the fly while the NBD server is active. If missing, it will default to denying access (since 4.0). 1490 MaxConnections *uint32 `json:"max-connections,omitempty"` // The maximum number of connections to allow at the same time, 0 for unlimited. (since 5.2; default: 0) 1491 } 1492 1493 // An NBD block export (common options shared between nbd-server-add and 1494 // the NBD branch of block-export-add). 1495 // 1496 // Since: 5.0 1497 type BlockExportOptionsNbdBase struct { 1498 Name *string `json:"name,omitempty"` // Export name. If unspecified, the @device parameter is used as the export name. (Since 2.12) 1499 Description *string `json:"description,omitempty"` // Free-form description of the export, up to 4096 bytes. (Since 5.0) 1500 } 1501 1502 // An NBD block export (distinct options used in the NBD branch of 1503 // block-export-add). 1504 // 1505 // Since: 5.2 1506 type BlockExportOptionsNbd struct { 1507 // Base type for this struct 1508 BlockExportOptionsNbdBase 1509 Bitmaps []string `json:"bitmaps,omitempty"` // Also export each of the named dirty bitmaps reachable from @device, so the NBD client can use NBD_OPT_SET_META_CONTEXT with the metadata context name "qemu:dirty-bitmap:BITMAP" to inspect each bitmap. 1510 AllocationDepth *bool `json:"allocation-depth,omitempty"` // Also export the allocation depth map for @device, so the NBD client can use NBD_OPT_SET_META_CONTEXT with the metadata context name "qemu:allocation-depth" to inspect allocation details. (since 5.2) 1511 } 1512 1513 // A vhost-user-blk block export. 1514 // 1515 // Since: 5.2 1516 type BlockExportOptionsVhostUserBlk struct { 1517 Addr SocketAddress `json:"addr"` // The vhost-user socket on which to listen. Both 'unix' and 'fd' SocketAddress types are supported. Passed fds must be UNIX domain sockets. 1518 LogicalBlockSize *uint64 `json:"logical-block-size,omitempty"` // Logical block size in bytes. Defaults to 512 bytes. 1519 NumQueues *uint16 `json:"num-queues,omitempty"` // Number of request virtqueues. Must be greater than 0. Defaults to 1. 1520 } 1521 1522 // Options for exporting a block graph node on some (file) mountpoint 1523 // as a raw image. 1524 // 1525 // Since: 6.0 1526 type BlockExportOptionsFuse struct { 1527 Mountpoint string `json:"mountpoint"` // Path on which to export the block device via FUSE. This must point to an existing regular file. 1528 Growable *bool `json:"growable,omitempty"` // Whether writes beyond the EOF should grow the block node accordingly. (default: false) 1529 AllowOther *FuseExportAllowOther `json:"allow-other,omitempty"` // If this is off, only qemu's user is allowed access to this export. That cannot be changed even with chmod or chown. Enabling this option will allow other users access to the export with the FUSE mount option "allow_other". Note that using allow_other as a non-root user requires user_allow_other to be enabled in the global fuse.conf configuration file. In auto mode (the default), the FUSE export driver will first attempt to mount the export with allow_other, and if that fails, try again without. (since 6.1; default: auto) 1530 } 1531 1532 // An NBD block export, per legacy nbd-server-add command. 1533 // 1534 // Since: 5.0 1535 type NbdServerAddOptions struct { 1536 // Base type for this struct 1537 BlockExportOptionsNbdBase 1538 Device string `json:"device"` // The device name or node name of the node to be exported 1539 Writable *bool `json:"writable,omitempty"` // Whether clients should be able to write to the device via the NBD connection (default false). 1540 Bitmap *string `json:"bitmap,omitempty"` // Also export a single dirty bitmap reachable from @device, so the NBD client can use NBD_OPT_SET_META_CONTEXT with the metadata context name "qemu:dirty-bitmap:BITMAP" to inspect the bitmap (since 4.0). 1541 } 1542 1543 // Information about a single block export. 1544 // 1545 // Since: 5.2 1546 type BlockExportInfo struct { 1547 Id string `json:"id"` // The unique identifier for the block export 1548 Type BlockExportType `json:"type"` // The block export type 1549 NodeName string `json:"node-name"` // The node name of the block node that is exported 1550 ShuttingDown bool `json:"shutting-down"` // True if the export is shutting down (e.g. after a block-export-del command, but before the shutdown has completed) 1551 } 1552 1553 // Information about a character device. 1554 // 1555 // Notes: @filename is encoded using the QEMU command line character device 1556 // encoding. See the QEMU man page for details. 1557 // 1558 // Since: 0.14 1559 type ChardevInfo struct { 1560 Label string `json:"label"` // the label of the character device 1561 Filename string `json:"filename"` // the filename of the character device 1562 FrontendOpen bool `json:"frontend-open"` // shows whether the frontend device attached to this backend (eg. with the chardev=... option) is in open or closed state (since 2.1) 1563 } 1564 1565 // Information about a character device backend 1566 // 1567 // Since: 2.0 1568 type ChardevBackendInfo struct { 1569 Name string `json:"name"` // The backend name 1570 } 1571 1572 // Configuration shared across all chardev backends 1573 // 1574 // Since: 2.6 1575 type ChardevCommon struct { 1576 Logfile *string `json:"logfile,omitempty"` // The name of a logfile to save output 1577 Logappend *bool `json:"logappend,omitempty"` // true to append instead of truncate (default to false to truncate) 1578 } 1579 1580 // Configuration info for file chardevs. 1581 // 1582 // Since: 1.4 1583 type ChardevFile struct { 1584 // Base type for this struct 1585 ChardevCommon 1586 In *string `json:"in,omitempty"` // The name of the input file 1587 Out string `json:"out"` // The name of the output file 1588 Append *bool `json:"append,omitempty"` // Open the file in append mode (default false to truncate) (Since 2.6) 1589 } 1590 1591 // Configuration info for device and pipe chardevs. 1592 // 1593 // Since: 1.4 1594 type ChardevHostdev struct { 1595 // Base type for this struct 1596 ChardevCommon 1597 Device string `json:"device"` // The name of the special file for the device, i.e. /dev/ttyS0 on Unix or COM1: on Windows 1598 } 1599 1600 // Configuration info for (stream) socket chardevs. 1601 // 1602 // Since: 1.4 1603 type ChardevSocket struct { 1604 // Base type for this struct 1605 ChardevCommon 1606 Addr SocketAddressLegacy `json:"addr"` // socket address to listen on (server=true) or connect to (server=false) 1607 TlsCreds *string `json:"tls-creds,omitempty"` // the ID of the TLS credentials object (since 2.6) 1608 TlsAuthz *string `json:"tls-authz,omitempty"` // the ID of the QAuthZ authorization object against which the client's x509 distinguished name will be validated. This object is only resolved at time of use, so can be deleted and recreated on the fly while the chardev server is active. If missing, it will default to denying access (since 4.0) 1609 Server *bool `json:"server,omitempty"` // create server socket (default: true) 1610 Wait *bool `json:"wait,omitempty"` // wait for incoming connection on server sockets (default: false). Silently ignored with server: false. This use is deprecated. 1611 Nodelay *bool `json:"nodelay,omitempty"` // set TCP_NODELAY socket option (default: false) 1612 Telnet *bool `json:"telnet,omitempty"` // enable telnet protocol on server sockets (default: false) 1613 Tn3270 *bool `json:"tn3270,omitempty"` // enable tn3270 protocol on server sockets (default: false) (Since: 2.10) 1614 Websocket *bool `json:"websocket,omitempty"` // enable websocket protocol on server sockets (default: false) (Since: 3.1) 1615 Reconnect *int64 `json:"reconnect,omitempty"` // For a client socket, if a socket is disconnected, then attempt a reconnect after the given number of seconds. Setting this to zero disables this function. (default: 0) (Since: 2.2) 1616 } 1617 1618 // Configuration info for datagram socket chardevs. 1619 // 1620 // Since: 1.5 1621 type ChardevUdp struct { 1622 // Base type for this struct 1623 ChardevCommon 1624 Remote SocketAddressLegacy `json:"remote"` // remote address 1625 Local *SocketAddressLegacy `json:"local,omitempty"` // local address 1626 } 1627 1628 // Configuration info for mux chardevs. 1629 // 1630 // Since: 1.5 1631 type ChardevMux struct { 1632 // Base type for this struct 1633 ChardevCommon 1634 Chardev string `json:"chardev"` // name of the base chardev. 1635 } 1636 1637 // Configuration info for stdio chardevs. 1638 // 1639 // Since: 1.5 1640 type ChardevStdio struct { 1641 // Base type for this struct 1642 ChardevCommon 1643 Signal *bool `json:"signal,omitempty"` // Allow signals (such as SIGINT triggered by ^C) be delivered to qemu. Default: true. 1644 } 1645 1646 // Configuration info for spice vm channel chardevs. 1647 // 1648 // Since: 1.5 1649 type ChardevSpiceChannel struct { 1650 // Base type for this struct 1651 ChardevCommon 1652 Type string `json:"type"` // kind of channel (for example vdagent). 1653 } 1654 1655 // Configuration info for spice port chardevs. 1656 // 1657 // Since: 1.5 1658 type ChardevSpicePort struct { 1659 // Base type for this struct 1660 ChardevCommon 1661 Fqdn string `json:"fqdn"` // name of the channel (see docs/spice-port-fqdn.txt) 1662 } 1663 1664 // Configuration info for DBus chardevs. 1665 // 1666 // Since: 7.0 1667 type ChardevDBus struct { 1668 // Base type for this struct 1669 ChardevCommon 1670 Name string `json:"name"` // name of the channel (following docs/spice-port-fqdn.txt) 1671 } 1672 1673 // Configuration info for virtual console chardevs. 1674 // 1675 // Since: 1.5 1676 type ChardevVC struct { 1677 // Base type for this struct 1678 ChardevCommon 1679 Width *int64 `json:"width,omitempty"` // console width, in pixels 1680 Height *int64 `json:"height,omitempty"` // console height, in pixels 1681 Cols *int64 `json:"cols,omitempty"` // console width, in chars 1682 Rows *int64 `json:"rows,omitempty"` // console height, in chars 1683 } 1684 1685 // Configuration info for ring buffer chardevs. 1686 // 1687 // Since: 1.5 1688 type ChardevRingbuf struct { 1689 // Base type for this struct 1690 ChardevCommon 1691 Size *int64 `json:"size,omitempty"` // ring buffer size, must be power of two, default is 65536 1692 } 1693 1694 // Configuration info for qemu vdagent implementation. 1695 // 1696 // Since: 6.1 1697 type ChardevQemuVDAgent struct { 1698 // Base type for this struct 1699 ChardevCommon 1700 Mouse *bool `json:"mouse,omitempty"` // enable/disable mouse, default is enabled. 1701 Clipboard *bool `json:"clipboard,omitempty"` // enable/disable clipboard, default is disabled. 1702 } 1703 1704 // Since: 1.4 1705 type ChardevFileWrapper struct { 1706 Data ChardevFile `json:"data"` 1707 } 1708 1709 // Since: 1.4 1710 type ChardevHostdevWrapper struct { 1711 Data ChardevHostdev `json:"data"` 1712 } 1713 1714 // Since: 1.4 1715 type ChardevSocketWrapper struct { 1716 Data ChardevSocket `json:"data"` 1717 } 1718 1719 // Since: 1.5 1720 type ChardevUdpWrapper struct { 1721 Data ChardevUdp `json:"data"` 1722 } 1723 1724 // Since: 2.6 1725 type ChardevCommonWrapper struct { 1726 Data ChardevCommon `json:"data"` 1727 } 1728 1729 // Since: 1.5 1730 type ChardevMuxWrapper struct { 1731 Data ChardevMux `json:"data"` 1732 } 1733 1734 // Since: 1.5 1735 type ChardevStdioWrapper struct { 1736 Data ChardevStdio `json:"data"` 1737 } 1738 1739 // Since: 1.5 1740 type ChardevSpiceChannelWrapper struct { 1741 Data ChardevSpiceChannel `json:"data"` 1742 } 1743 1744 // Since: 1.5 1745 type ChardevSpicePortWrapper struct { 1746 Data ChardevSpicePort `json:"data"` 1747 } 1748 1749 // Since: 6.1 1750 type ChardevQemuVDAgentWrapper struct { 1751 Data ChardevQemuVDAgent `json:"data"` 1752 } 1753 1754 // Since: 7.0 1755 type ChardevDBusWrapper struct { 1756 Data ChardevDBus `json:"data"` 1757 } 1758 1759 // Since: 1.5 1760 type ChardevVCWrapper struct { 1761 Data ChardevVC `json:"data"` 1762 } 1763 1764 // Since: 1.5 1765 type ChardevRingbufWrapper struct { 1766 Data ChardevRingbuf `json:"data"` 1767 } 1768 1769 // Return info about the chardev backend just created. 1770 // 1771 // Since: 1.4 1772 type ChardevReturn struct { 1773 Pty *string `json:"pty,omitempty"` // name of the slave pseudoterminal device, present if and only if a chardev of type 'pty' was created 1774 } 1775 1776 // The result format for 'query-dump'. 1777 // 1778 // Since: 2.6 1779 type DumpQueryResult struct { 1780 Status DumpStatus `json:"status"` // enum of @DumpStatus, which shows current dump status 1781 Completed int64 `json:"completed"` // bytes written in latest dump (uncompressed) 1782 Total int64 `json:"total"` // total bytes to be written in latest dump (uncompressed) 1783 } 1784 1785 // A list of the available formats for dump-guest-memory 1786 // 1787 // Since: 2.0 1788 type DumpGuestMemoryCapability struct { 1789 Formats []DumpGuestMemoryFormat `json:"formats"` 1790 } 1791 1792 // Create a new Network Interface Card. 1793 // 1794 // Since: 1.2 1795 type NetLegacyNicOptions struct { 1796 Netdev *string `json:"netdev,omitempty"` // id of -netdev to connect to 1797 Macaddr *string `json:"macaddr,omitempty"` // MAC address 1798 Model *string `json:"model,omitempty"` // device model (e1000, rtl8139, virtio etc.) 1799 Addr *string `json:"addr,omitempty"` // PCI device address 1800 Vectors *uint32 `json:"vectors,omitempty"` // number of MSI-x vectors, 0 to disable MSI-X 1801 } 1802 1803 // Use the user mode network stack which requires no administrator privilege to 1804 // run. 1805 // 1806 // Since: 1.2 1807 type NetdevUserOptions struct { 1808 Hostname *string `json:"hostname,omitempty"` // client hostname reported by the builtin DHCP server 1809 Restrict *bool `json:"restrict,omitempty"` // isolate the guest from the host 1810 Ipv4 *bool `json:"ipv4,omitempty"` // whether to support IPv4, default true for enabled (since 2.6) 1811 Ipv6 *bool `json:"ipv6,omitempty"` // whether to support IPv6, default true for enabled (since 2.6) 1812 Ip *string `json:"ip,omitempty"` // legacy parameter, use net= instead 1813 Net *string `json:"net,omitempty"` // IP network address that the guest will see, in the form addr[/netmask] The netmask is optional, and can be either in the form a.b.c.d or as a number of valid top-most bits. Default is 10.0.2.0/24. 1814 Host *string `json:"host,omitempty"` // guest-visible address of the host 1815 Tftp *string `json:"tftp,omitempty"` // root directory of the built-in TFTP server 1816 Bootfile *string `json:"bootfile,omitempty"` // BOOTP filename, for use with tftp= 1817 Dhcpstart *string `json:"dhcpstart,omitempty"` // the first of the 16 IPs the built-in DHCP server can assign 1818 Dns *string `json:"dns,omitempty"` // guest-visible address of the virtual nameserver 1819 Dnssearch []string `json:"dnssearch,omitempty"` // list of DNS suffixes to search, passed as DHCP option to the guest 1820 Domainname *string `json:"domainname,omitempty"` // guest-visible domain name of the virtual nameserver (since 3.0) 1821 Ipv6Prefix *string `json:"ipv6-prefix,omitempty"` // IPv6 network prefix (default is fec0::) (since 2.6). The network prefix is given in the usual hexadecimal IPv6 address notation. 1822 Ipv6Prefixlen *int64 `json:"ipv6-prefixlen,omitempty"` // IPv6 network prefix length (default is 64) (since 2.6) 1823 Ipv6Host *string `json:"ipv6-host,omitempty"` // guest-visible IPv6 address of the host (since 2.6) 1824 Ipv6Dns *string `json:"ipv6-dns,omitempty"` // guest-visible IPv6 address of the virtual nameserver (since 2.6) 1825 Smb *string `json:"smb,omitempty"` // root directory of the built-in SMB server 1826 Smbserver *string `json:"smbserver,omitempty"` // IP address of the built-in SMB server 1827 Hostfwd []string `json:"hostfwd,omitempty"` // redirect incoming TCP or UDP host connections to guest endpoints 1828 Guestfwd []string `json:"guestfwd,omitempty"` // forward guest TCP connections 1829 TftpServerName *string `json:"tftp-server-name,omitempty"` // RFC2132 "TFTP server name" string (Since 3.1) 1830 } 1831 1832 // Used to configure a host TAP network interface backend. 1833 // 1834 // Since: 1.2 1835 type NetdevTapOptions struct { 1836 Ifname *string `json:"ifname,omitempty"` // interface name 1837 Fd *string `json:"fd,omitempty"` // file descriptor of an already opened tap 1838 Fds *string `json:"fds,omitempty"` // multiple file descriptors of already opened multiqueue capable tap 1839 Script *string `json:"script,omitempty"` // script to initialize the interface 1840 Downscript *string `json:"downscript,omitempty"` // script to shut down the interface 1841 Br *string `json:"br,omitempty"` // bridge name (since 2.8) 1842 Helper *string `json:"helper,omitempty"` // command to execute to configure bridge 1843 Sndbuf *uint64 `json:"sndbuf,omitempty"` // send buffer limit. Understands [TGMKkb] suffixes. 1844 VnetHdr *bool `json:"vnet_hdr,omitempty"` // enable the IFF_VNET_HDR flag on the tap interface 1845 Vhost *bool `json:"vhost,omitempty"` // enable vhost-net network accelerator 1846 Vhostfd *string `json:"vhostfd,omitempty"` // file descriptor of an already opened vhost net device 1847 Vhostfds *string `json:"vhostfds,omitempty"` // file descriptors of multiple already opened vhost net devices 1848 Vhostforce *bool `json:"vhostforce,omitempty"` // vhost on for non-MSIX virtio guests 1849 Queues *uint32 `json:"queues,omitempty"` // number of queues to be created for multiqueue capable tap 1850 PollUs *uint32 `json:"poll-us,omitempty"` // maximum number of microseconds that could be spent on busy polling for tap (since 2.7) 1851 } 1852 1853 // Socket netdevs are used to establish a network connection to another 1854 // QEMU virtual machine via a TCP socket. 1855 // 1856 // Since: 1.2 1857 type NetdevSocketOptions struct { 1858 Fd *string `json:"fd,omitempty"` // file descriptor of an already opened socket 1859 Listen *string `json:"listen,omitempty"` // port number, and optional hostname, to listen on 1860 Connect *string `json:"connect,omitempty"` // port number, and optional hostname, to connect to 1861 Mcast *string `json:"mcast,omitempty"` // UDP multicast address and port number 1862 Localaddr *string `json:"localaddr,omitempty"` // source address and port for multicast and udp packets 1863 Udp *string `json:"udp,omitempty"` // UDP unicast address and port number 1864 } 1865 1866 // Configure an Ethernet over L2TPv3 tunnel. 1867 // 1868 // Since: 2.1 1869 type NetdevL2TPv3Options struct { 1870 Src string `json:"src"` // source address 1871 Dst string `json:"dst"` // destination address 1872 Srcport *string `json:"srcport,omitempty"` // source port - mandatory for udp, optional for ip 1873 Dstport *string `json:"dstport,omitempty"` // destination port - mandatory for udp, optional for ip 1874 Ipv6 *bool `json:"ipv6,omitempty"` // force the use of ipv6 1875 Udp *bool `json:"udp,omitempty"` // use the udp version of l2tpv3 encapsulation 1876 Cookie64 *bool `json:"cookie64,omitempty"` // use 64 bit coookies 1877 Counter *bool `json:"counter,omitempty"` // have sequence counter 1878 Pincounter *bool `json:"pincounter,omitempty"` // pin sequence counter to zero - workaround for buggy implementations or networks with packet reorder 1879 Txcookie *uint64 `json:"txcookie,omitempty"` // 32 or 64 bit transmit cookie 1880 Rxcookie *uint64 `json:"rxcookie,omitempty"` // 32 or 64 bit receive cookie 1881 Txsession uint32 `json:"txsession"` // 32 bit transmit session 1882 Rxsession *uint32 `json:"rxsession,omitempty"` // 32 bit receive session - if not specified set to the same value as transmit 1883 Offset *uint32 `json:"offset,omitempty"` // additional offset - allows the insertion of additional application-specific data before the packet payload 1884 } 1885 1886 // Connect to a vde switch running on the host. 1887 // 1888 // Since: 1.2 1889 type NetdevVdeOptions struct { 1890 Sock *string `json:"sock,omitempty"` // socket path 1891 Port *uint16 `json:"port,omitempty"` // port number 1892 Group *string `json:"group,omitempty"` // group owner of socket 1893 Mode *uint16 `json:"mode,omitempty"` // permissions for socket 1894 } 1895 1896 // Connect a host TAP network interface to a host bridge device. 1897 // 1898 // Since: 1.2 1899 type NetdevBridgeOptions struct { 1900 Br *string `json:"br,omitempty"` // bridge name 1901 Helper *string `json:"helper,omitempty"` // command to execute to configure bridge 1902 } 1903 1904 // Connect two or more net clients through a software hub. 1905 // 1906 // Since: 1.2 1907 type NetdevHubPortOptions struct { 1908 Hubid int32 `json:"hubid"` // hub identifier number 1909 Netdev *string `json:"netdev,omitempty"` // used to connect hub to a netdev instead of a device (since 2.12) 1910 } 1911 1912 // Connect a client to a netmap-enabled NIC or to a VALE switch port 1913 // 1914 // Since: 2.0 1915 type NetdevNetmapOptions struct { 1916 Ifname string `json:"ifname"` // Either the name of an existing network interface supported by netmap, or the name of a VALE port (created on the fly). A VALE port name is in the form 'valeXXX:YYY', where XXX and YYY are non-negative integers. XXX identifies a switch and YYY identifies a port of the switch. VALE ports having the same XXX are therefore connected to the same switch. 1917 Devname *string `json:"devname,omitempty"` // path of the netmap device (default: '/dev/netmap'). 1918 } 1919 1920 // Vhost-user network backend 1921 // 1922 // Since: 2.1 1923 type NetdevVhostUserOptions struct { 1924 Chardev string `json:"chardev"` // name of a unix socket chardev 1925 Vhostforce *bool `json:"vhostforce,omitempty"` // vhost on for non-MSIX virtio guests (default: false). 1926 Queues *int64 `json:"queues,omitempty"` // number of queues to be created for multiqueue vhost-user (default: 1) (Since 2.5) 1927 } 1928 1929 // Vhost-vdpa network backend 1930 // 1931 // vDPA device is a device that uses a datapath which complies with the virtio 1932 // specifications with a vendor specific control path. 1933 // 1934 // Since: 5.1 1935 type NetdevVhostVDPAOptions struct { 1936 Vhostdev *string `json:"vhostdev,omitempty"` // path of vhost-vdpa device (default:'/dev/vhost-vdpa-0') 1937 Queues *int64 `json:"queues,omitempty"` // number of queues to be created for multiqueue vhost-vdpa (default: 1) 1938 } 1939 1940 // Rx-filter information for a NIC. 1941 // 1942 // Since: 1.6 1943 type RxFilterInfo struct { 1944 Name string `json:"name"` // net client name 1945 Promiscuous bool `json:"promiscuous"` // whether promiscuous mode is enabled 1946 Multicast RxState `json:"multicast"` // multicast receive state 1947 Unicast RxState `json:"unicast"` // unicast receive state 1948 Vlan RxState `json:"vlan"` // vlan receive state (Since 2.0) 1949 BroadcastAllowed bool `json:"broadcast-allowed"` // whether to receive broadcast 1950 MulticastOverflow bool `json:"multicast-overflow"` // multicast table is overflowed or not 1951 UnicastOverflow bool `json:"unicast-overflow"` // unicast table is overflowed or not 1952 MainMac string `json:"main-mac"` // the main macaddr string 1953 VlanTable []int64 `json:"vlan-table"` // a list of active vlan id 1954 UnicastTable []string `json:"unicast-table"` // a list of unicast macaddr string 1955 MulticastTable []string `json:"multicast-table"` // a list of multicast macaddr string 1956 } 1957 1958 // Parameters for self-announce timers 1959 // 1960 // Since: 4.0 1961 type AnnounceParameters struct { 1962 Initial int64 `json:"initial"` // Initial delay (in ms) before sending the first GARP/RARP announcement 1963 Max int64 `json:"max"` // Maximum delay (in ms) between GARP/RARP announcement packets 1964 Rounds int64 `json:"rounds"` // Number of self-announcement attempts 1965 Step int64 `json:"step"` // Delay increase (in ms) after each self-announcement attempt 1966 Interfaces []string `json:"interfaces,omitempty"` // An optional list of interface names, which restricts the announcement to the listed interfaces. (Since 4.1) 1967 Id *string `json:"id,omitempty"` // A name to be used to identify an instance of announce-timers and to allow it to modified later. Not for use as part of the migration parameters. (Since 4.1) 1968 } 1969 1970 // Rocker switch information. 1971 // 1972 // Since: 2.4 1973 type RockerSwitch struct { 1974 Name string `json:"name"` // switch name 1975 Id uint64 `json:"id"` // switch ID 1976 Ports uint32 `json:"ports"` // number of front-panel ports 1977 } 1978 1979 // Rocker switch port information. 1980 // 1981 // Since: 2.4 1982 type RockerPort struct { 1983 Name string `json:"name"` // port name 1984 Enabled bool `json:"enabled"` // port is enabled for I/O 1985 LinkUp bool `json:"link-up"` // physical link is UP on port 1986 Speed uint32 `json:"speed"` // port link speed in Mbps 1987 Duplex RockerPortDuplex `json:"duplex"` // port link duplex 1988 Autoneg RockerPortAutoneg `json:"autoneg"` // port link autoneg 1989 } 1990 1991 // Rocker switch OF-DPA flow key 1992 // 1993 // Note: optional members may or may not appear in the flow key 1994 // depending if they're relevant to the flow key. 1995 // 1996 // Since: 2.4 1997 type RockerOfDpaFlowKey struct { 1998 Priority uint32 `json:"priority"` // key priority, 0 being lowest priority 1999 TblId uint32 `json:"tbl-id"` // flow table ID 2000 InPport *uint32 `json:"in-pport,omitempty"` // physical input port 2001 TunnelId *uint32 `json:"tunnel-id,omitempty"` // tunnel ID 2002 VlanId *uint16 `json:"vlan-id,omitempty"` // VLAN ID 2003 EthType *uint16 `json:"eth-type,omitempty"` // Ethernet header type 2004 EthSrc *string `json:"eth-src,omitempty"` // Ethernet header source MAC address 2005 EthDst *string `json:"eth-dst,omitempty"` // Ethernet header destination MAC address 2006 IpProto *uint8 `json:"ip-proto,omitempty"` // IP Header protocol field 2007 IpTos *uint8 `json:"ip-tos,omitempty"` // IP header TOS field 2008 IpDst *string `json:"ip-dst,omitempty"` // IP header destination address 2009 } 2010 2011 // Rocker switch OF-DPA flow mask 2012 // 2013 // Note: optional members may or may not appear in the flow mask 2014 // depending if they're relevant to the flow mask. 2015 // 2016 // Since: 2.4 2017 type RockerOfDpaFlowMask struct { 2018 InPport *uint32 `json:"in-pport,omitempty"` // physical input port 2019 TunnelId *uint32 `json:"tunnel-id,omitempty"` // tunnel ID 2020 VlanId *uint16 `json:"vlan-id,omitempty"` // VLAN ID 2021 EthSrc *string `json:"eth-src,omitempty"` // Ethernet header source MAC address 2022 EthDst *string `json:"eth-dst,omitempty"` // Ethernet header destination MAC address 2023 IpProto *uint8 `json:"ip-proto,omitempty"` // IP Header protocol field 2024 IpTos *uint8 `json:"ip-tos,omitempty"` // IP header TOS field 2025 } 2026 2027 // Rocker switch OF-DPA flow action 2028 // 2029 // Note: optional members may or may not appear in the flow action 2030 // depending if they're relevant to the flow action. 2031 // 2032 // Since: 2.4 2033 type RockerOfDpaFlowAction struct { 2034 GotoTbl *uint32 `json:"goto-tbl,omitempty"` // next table ID 2035 GroupId *uint32 `json:"group-id,omitempty"` // group ID 2036 TunnelLport *uint32 `json:"tunnel-lport,omitempty"` // tunnel logical port ID 2037 VlanId *uint16 `json:"vlan-id,omitempty"` // VLAN ID 2038 NewVlanId *uint16 `json:"new-vlan-id,omitempty"` // new VLAN ID 2039 OutPport *uint32 `json:"out-pport,omitempty"` // physical output port 2040 } 2041 2042 // Rocker switch OF-DPA flow 2043 // 2044 // Since: 2.4 2045 type RockerOfDpaFlow struct { 2046 Cookie uint64 `json:"cookie"` // flow unique cookie ID 2047 Hits uint64 `json:"hits"` // count of matches (hits) on flow 2048 Key RockerOfDpaFlowKey `json:"key"` // flow key 2049 Mask RockerOfDpaFlowMask `json:"mask"` // flow mask 2050 Action RockerOfDpaFlowAction `json:"action"` // flow action 2051 } 2052 2053 // Rocker switch OF-DPA group 2054 // 2055 // Note: optional members may or may not appear in the group depending 2056 // if they're relevant to the group type. 2057 // 2058 // Since: 2.4 2059 type RockerOfDpaGroup struct { 2060 Id uint32 `json:"id"` // group unique ID 2061 Type uint8 `json:"type"` // group type 2062 VlanId *uint16 `json:"vlan-id,omitempty"` // VLAN ID 2063 Pport *uint32 `json:"pport,omitempty"` // physical port number 2064 Index *uint32 `json:"index,omitempty"` // group index, unique with group type 2065 OutPport *uint32 `json:"out-pport,omitempty"` // output physical port number 2066 GroupId *uint32 `json:"group-id,omitempty"` // next group ID 2067 SetVlanId *uint16 `json:"set-vlan-id,omitempty"` // VLAN ID to set 2068 PopVlan *uint8 `json:"pop-vlan,omitempty"` // pop VLAN headr from packet 2069 GroupIds []uint32 `json:"group-ids,omitempty"` // list of next group IDs 2070 SetEthSrc *string `json:"set-eth-src,omitempty"` // set source MAC address in Ethernet header 2071 SetEthDst *string `json:"set-eth-dst,omitempty"` // set destination MAC address in Ethernet header 2072 TtlCheck *uint8 `json:"ttl-check,omitempty"` // perform TTL check 2073 } 2074 2075 // Information about the TPM passthrough type 2076 // 2077 // Since: 1.5 2078 type TPMPassthroughOptions struct { 2079 Path *string `json:"path,omitempty"` // string describing the path used for accessing the TPM device 2080 CancelPath *string `json:"cancel-path,omitempty"` // string showing the TPM's sysfs cancel file for cancellation of TPM commands while they are executing 2081 } 2082 2083 // Information about the TPM emulator type 2084 // 2085 // Since: 2.11 2086 type TPMEmulatorOptions struct { 2087 Chardev string `json:"chardev"` // Name of a unix socket chardev 2088 } 2089 2090 // Since: 1.5 2091 type TPMPassthroughOptionsWrapper struct { 2092 Data TPMPassthroughOptions `json:"data"` 2093 } 2094 2095 // Since: 2.11 2096 type TPMEmulatorOptionsWrapper struct { 2097 Data TPMEmulatorOptions `json:"data"` 2098 } 2099 2100 // Information about the TPM 2101 // 2102 // Since: 1.5 2103 type TPMInfo struct { 2104 Id string `json:"id"` // The Id of the TPM 2105 Model TpmModel `json:"model"` // The TPM frontend model 2106 Options TpmTypeOptions `json:"options"` // The TPM (backend) type configuration options 2107 } 2108 2109 // Options for set_password specific to the VNC procotol. 2110 // 2111 // Since: 7.0 2112 type SetPasswordOptionsVnc struct { 2113 Display *string `json:"display,omitempty"` // The id of the display where the password should be changed. Defaults to the first. 2114 } 2115 2116 // Options for expire_password specific to the VNC procotol. 2117 // 2118 // Since: 7.0 2119 type ExpirePasswordOptionsVnc struct { 2120 Display *string `json:"display,omitempty"` // The id of the display where the expiration should be changed. Defaults to the first. 2121 } 2122 2123 // The basic information for SPICE network connection 2124 // 2125 // Since: 2.1 2126 type SpiceBasicInfo struct { 2127 Host string `json:"host"` // IP address 2128 Port string `json:"port"` // port number 2129 Family NetworkAddressFamily `json:"family"` // address family 2130 } 2131 2132 // Information about a SPICE server 2133 // 2134 // Since: 2.1 2135 type SpiceServerInfo struct { 2136 // Base type for this struct 2137 SpiceBasicInfo 2138 Auth *string `json:"auth,omitempty"` // authentication method 2139 } 2140 2141 // Information about a SPICE client channel. 2142 // 2143 // Since: 0.14 2144 type SpiceChannel struct { 2145 // Base type for this struct 2146 SpiceBasicInfo 2147 ConnectionId int64 `json:"connection-id"` // SPICE connection id number. All channels with the same id belong to the same SPICE session. 2148 ChannelType int64 `json:"channel-type"` // SPICE channel type number. "1" is the main control channel, filter for this one if you want to track spice sessions only 2149 ChannelId int64 `json:"channel-id"` // SPICE channel ID number. Usually "0", might be different when multiple channels of the same type exist, such as multiple display channels in a multihead setup 2150 Tls bool `json:"tls"` // true if the channel is encrypted, false otherwise. 2151 } 2152 2153 // Information about the SPICE session. 2154 // 2155 // Since: 0.14 2156 type SpiceInfo struct { 2157 Enabled bool `json:"enabled"` // true if the SPICE server is enabled, false otherwise 2158 Migrated bool `json:"migrated"` // true if the last guest migration completed and spice migration had completed as well. false otherwise. (since 1.4) 2159 Host *string `json:"host,omitempty"` // The hostname the SPICE server is bound to. This depends on the name resolution on the host and may be an IP address. 2160 Port *int64 `json:"port,omitempty"` // The SPICE server's port number. 2161 TlsPort *int64 `json:"tls-port,omitempty"` // The SPICE server's TLS port number. 2162 Auth *string `json:"auth,omitempty"` // the current authentication type used by the server - 'none' if no authentication is being used - 'spice' uses SASL or direct TLS authentication, depending on command line options 2163 CompiledVersion *string `json:"compiled-version,omitempty"` // SPICE server version. 2164 MouseMode SpiceQueryMouseMode `json:"mouse-mode"` // The mode in which the mouse cursor is displayed currently. Can be determined by the client or the server, or unknown if spice server doesn't provide this information. (since: 1.1) 2165 Channels []SpiceChannel `json:"channels,omitempty"` // a list of @SpiceChannel for each active spice channel 2166 } 2167 2168 // The basic information for vnc network connection 2169 // 2170 // Since: 2.1 2171 type VncBasicInfo struct { 2172 Host string `json:"host"` // IP address 2173 Service string `json:"service"` // The service name of the vnc port. This may depend on the host system's service database so symbolic names should not be relied on. 2174 Family NetworkAddressFamily `json:"family"` // address family 2175 Websocket bool `json:"websocket"` // true in case the socket is a websocket (since 2.3). 2176 } 2177 2178 // The network connection information for server 2179 // 2180 // Since: 2.1 2181 type VncServerInfo struct { 2182 // Base type for this struct 2183 VncBasicInfo 2184 Auth *string `json:"auth,omitempty"` // authentication method used for the plain (non-websocket) VNC server 2185 } 2186 2187 // Information about a connected VNC client. 2188 // 2189 // Since: 0.14 2190 type VncClientInfo struct { 2191 // Base type for this struct 2192 VncBasicInfo 2193 X509Dname *string `json:"x509_dname,omitempty"` // If x509 authentication is in use, the Distinguished Name of the client. 2194 SaslUsername *string `json:"sasl_username,omitempty"` // If SASL authentication is in use, the SASL username used for authentication. 2195 } 2196 2197 // Information about the VNC session. 2198 // 2199 // Since: 0.14 2200 type VncInfo struct { 2201 Enabled bool `json:"enabled"` // true if the VNC server is enabled, false otherwise 2202 Host *string `json:"host,omitempty"` // The hostname the VNC server is bound to. This depends on the name resolution on the host and may be an IP address. 2203 Family *NetworkAddressFamily `json:"family,omitempty"` // - 'ipv6' if the host is listening for IPv6 connections - 'ipv4' if the host is listening for IPv4 connections - 'unix' if the host is listening on a unix domain socket - 'unknown' otherwise 2204 Service *string `json:"service,omitempty"` // The service name of the server's port. This may depends on the host system's service database so symbolic names should not be relied on. 2205 Auth *string `json:"auth,omitempty"` // the current authentication type used by the server - 'none' if no authentication is being used - 'vnc' if VNC authentication is being used - 'vencrypt+plain' if VEncrypt is used with plain text authentication - 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication - 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication - 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth - 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth - 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth - 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth - 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth - 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth 2206 Clients []VncClientInfo `json:"clients,omitempty"` // a list of @VncClientInfo of all currently connected clients 2207 } 2208 2209 // The network connection information for server 2210 // 2211 // Since: 2.9 2212 type VncServerInfo2 struct { 2213 // Base type for this struct 2214 VncBasicInfo 2215 Auth VncPrimaryAuth `json:"auth"` // The current authentication type used by the servers 2216 Vencrypt *VncVencryptSubAuth `json:"vencrypt,omitempty"` // The vencrypt sub authentication type used by the servers, only specified in case auth == vencrypt. 2217 } 2218 2219 // Information about a vnc server 2220 // 2221 // Since: 2.3 2222 type VncInfo2 struct { 2223 Id string `json:"id"` // vnc server name. 2224 Server []VncServerInfo2 `json:"server"` // A list of @VncBasincInfo describing all listening sockets. The list can be empty (in case the vnc server is disabled). It also may have multiple entries: normal + websocket, possibly also ipv4 + ipv6 in the future. 2225 Clients []VncClientInfo `json:"clients"` // A list of @VncClientInfo of all currently connected clients. The list can be empty, for obvious reasons. 2226 Auth VncPrimaryAuth `json:"auth"` // The current authentication type used by the non-websockets servers 2227 Vencrypt *VncVencryptSubAuth `json:"vencrypt,omitempty"` // The vencrypt authentication type used by the servers, only specified in case auth == vencrypt. 2228 Display *string `json:"display,omitempty"` // The display device the vnc server is linked to. 2229 } 2230 2231 // Information about a mouse device. 2232 // 2233 // Since: 0.14 2234 type MouseInfo struct { 2235 Name string `json:"name"` // the name of the mouse device 2236 Index int64 `json:"index"` // the index of the mouse device 2237 Current bool `json:"current"` // true if this device is currently receiving mouse events 2238 Absolute bool `json:"absolute"` // true if this device supports absolute coordinates as input 2239 } 2240 2241 // Since: 1.3 2242 type IntWrapper struct { 2243 Data int64 `json:"data"` 2244 } 2245 2246 // Since: 1.3 2247 type QKeyCodeWrapper struct { 2248 Data QKeyCode `json:"data"` 2249 } 2250 2251 // Keyboard input event. 2252 // 2253 // Since: 2.0 2254 type InputKeyEvent struct { 2255 Key KeyValue `json:"key"` // Which key this event is for. 2256 Down bool `json:"down"` // True for key-down and false for key-up events. 2257 } 2258 2259 // Pointer button input event. 2260 // 2261 // Since: 2.0 2262 type InputBtnEvent struct { 2263 Button InputButton `json:"button"` // Which button this event is for. 2264 Down bool `json:"down"` // True for key-down and false for key-up events. 2265 } 2266 2267 // Pointer motion input event. 2268 // 2269 // Since: 2.0 2270 type InputMoveEvent struct { 2271 Axis InputAxis `json:"axis"` // Which axis is referenced by @value. 2272 Value int64 `json:"value"` // Pointer position. For absolute coordinates the valid range is 0 -> 0x7ffff 2273 } 2274 2275 // Since: 2.0 2276 type InputKeyEventWrapper struct { 2277 Data InputKeyEvent `json:"data"` 2278 } 2279 2280 // Since: 2.0 2281 type InputBtnEventWrapper struct { 2282 Data InputBtnEvent `json:"data"` 2283 } 2284 2285 // Since: 2.0 2286 type InputMoveEventWrapper struct { 2287 Data InputMoveEvent `json:"data"` 2288 } 2289 2290 // GTK display options. 2291 // 2292 // Since: 2.12 2293 type DisplayGTK struct { 2294 GrabOnHover *bool `json:"grab-on-hover,omitempty"` // Grab keyboard input on mouse hover. 2295 ZoomToFit *bool `json:"zoom-to-fit,omitempty"` // Zoom guest display to fit into the host window. When turned off the host window will be resized instead. In case the display device can notify the guest on window resizes (virtio-gpu) this will default to "on", assuming the guest will resize the display to match the window size then. Otherwise it defaults to "off". Since 3.1 2296 } 2297 2298 // EGL headless display options. 2299 // 2300 // Since: 3.1 2301 type DisplayEGLHeadless struct { 2302 Rendernode *string `json:"rendernode,omitempty"` // Which DRM render node should be used. Default is the first available node on the host. 2303 } 2304 2305 // DBus display options. 2306 // 2307 // Since: 7.0 2308 type DisplayDBus struct { 2309 Rendernode *string `json:"rendernode,omitempty"` // Which DRM render node should be used. Default is the first available node on the host. 2310 Addr *string `json:"addr,omitempty"` // The D-Bus bus address (default to the session bus). 2311 P2P *bool `json:"p2p,omitempty"` // Whether to use peer-to-peer connections (accepted through ``add_client``). 2312 Audiodev *string `json:"audiodev,omitempty"` // Use the specified DBus audiodev to export audio. 2313 } 2314 2315 // Curses display options. 2316 // 2317 // Since: 4.0 2318 type DisplayCurses struct { 2319 Charset *string `json:"charset,omitempty"` // Font charset used by guest (default: CP437). 2320 } 2321 2322 // Cocoa display options. 2323 // 2324 // Since: 7.0 2325 type DisplayCocoa struct { 2326 LeftCommandKey *bool `json:"left-command-key,omitempty"` // Enable/disable forwarding of left command key to guest. Allows command-tab window switching on the host without sending this key to the guest when "off". Defaults to "on" 2327 FullGrab *bool `json:"full-grab,omitempty"` // Capture all key presses, including system combos. This requires accessibility permissions, since it performs a global grab on key events. (default: off) See https://support.apple.com/en-in/guide/mac-help/mh32356/mac 2328 SwapOptCmd *bool `json:"swap-opt-cmd,omitempty"` // Swap the Option and Command keys so that their key codes match their position on non-Mac keyboards and you can use Meta/Super and Alt where you expect them. (default: off) 2329 } 2330 2331 // Specify the VNC reload options. 2332 // 2333 // Since: 6.0 2334 type DisplayReloadOptionsVNC struct { 2335 TlsCerts *bool `json:"tls-certs,omitempty"` // reload tls certs or not. 2336 } 2337 2338 // A single authorization rule. 2339 // 2340 // Since: 4.0 2341 type QAuthZListRule struct { 2342 Match string `json:"match"` // a string or glob to match against a user identity 2343 Policy QAuthZListPolicy `json:"policy"` // the result to return if @match evaluates to true 2344 Format *QAuthZListFormat `json:"format,omitempty"` // the format of the @match rule (default 'exact') 2345 } 2346 2347 // Properties for authz-list objects. 2348 // 2349 // Since: 4.0 2350 type AuthZListProperties struct { 2351 Policy *QAuthZListPolicy `json:"policy,omitempty"` // Default policy to apply when no rule matches (default: deny) 2352 Rules []QAuthZListRule `json:"rules,omitempty"` // Authorization rules based on matching user 2353 } 2354 2355 // Properties for authz-listfile objects. 2356 // 2357 // Since: 4.0 2358 type AuthZListFileProperties struct { 2359 Filename string `json:"filename"` // File name to load the configuration from. The file must contain valid JSON for AuthZListProperties. 2360 Refresh *bool `json:"refresh,omitempty"` // If true, inotify is used to monitor the file, automatically reloading changes. If an error occurs during reloading, all authorizations will fail until the file is next successfully loaded. (default: true if the binary was built with CONFIG_INOTIFY1, false otherwise) 2361 } 2362 2363 // Properties for authz-pam objects. 2364 // 2365 // Since: 4.0 2366 type AuthZPAMProperties struct { 2367 Service string `json:"service"` // PAM service name to use for authorization 2368 } 2369 2370 // Properties for authz-simple objects. 2371 // 2372 // Since: 4.0 2373 type AuthZSimpleProperties struct { 2374 Identity string `json:"identity"` // Identifies the allowed user. Its format depends on the network service that authorization object is associated with. For authorizing based on TLS x509 certificates, the identity must be the x509 distinguished name. 2375 } 2376 2377 // Detailed migration status. 2378 // 2379 // Since: 0.14 2380 type MigrationStats struct { 2381 Transferred int64 `json:"transferred"` // amount of bytes already transferred to the target VM 2382 Remaining int64 `json:"remaining"` // amount of bytes remaining to be transferred to the target VM 2383 Total int64 `json:"total"` // total amount of bytes involved in the migration process 2384 Duplicate int64 `json:"duplicate"` // number of duplicate (zero) pages (since 1.2) 2385 Skipped int64 `json:"skipped"` // number of skipped zero pages (since 1.5) 2386 Normal int64 `json:"normal"` // number of normal pages (since 1.2) 2387 NormalBytes int64 `json:"normal-bytes"` // number of normal bytes sent (since 1.2) 2388 DirtyPagesRate int64 `json:"dirty-pages-rate"` // number of pages dirtied by second by the guest (since 1.3) 2389 Mbps float64 `json:"mbps"` // throughput in megabits/sec. (since 1.6) 2390 DirtySyncCount int64 `json:"dirty-sync-count"` // number of times that dirty ram was synchronized (since 2.1) 2391 PostcopyRequests int64 `json:"postcopy-requests"` // The number of page requests received from the destination (since 2.7) 2392 PageSize int64 `json:"page-size"` // The number of bytes per page for the various page-based statistics (since 2.10) 2393 MultifdBytes uint64 `json:"multifd-bytes"` // The number of bytes sent through multifd (since 3.0) 2394 PagesPerSecond uint64 `json:"pages-per-second"` // the number of memory pages transferred per second (Since 4.0) 2395 PrecopyBytes uint64 `json:"precopy-bytes"` // The number of bytes sent in the pre-copy phase (since 7.0). 2396 DowntimeBytes uint64 `json:"downtime-bytes"` // The number of bytes sent while the guest is paused (since 7.0). 2397 PostcopyBytes uint64 `json:"postcopy-bytes"` // The number of bytes sent during the post-copy phase (since 7.0). 2398 } 2399 2400 // Detailed XBZRLE migration cache statistics 2401 // 2402 // Since: 1.2 2403 type XBZRLECacheStats struct { 2404 CacheSize uint64 `json:"cache-size"` // XBZRLE cache size 2405 Bytes int64 `json:"bytes"` // amount of bytes already transferred to the target VM 2406 Pages int64 `json:"pages"` // amount of pages transferred to the target VM 2407 CacheMiss int64 `json:"cache-miss"` // number of cache miss 2408 CacheMissRate float64 `json:"cache-miss-rate"` // rate of cache miss (since 2.1) 2409 EncodingRate float64 `json:"encoding-rate"` // rate of encoded bytes (since 5.1) 2410 Overflow int64 `json:"overflow"` // number of overflows 2411 } 2412 2413 // Detailed migration compression statistics 2414 // 2415 // Since: 3.1 2416 type CompressionStats struct { 2417 Pages int64 `json:"pages"` // amount of pages compressed and transferred to the target VM 2418 Busy int64 `json:"busy"` // count of times that no free thread was available to compress data 2419 BusyRate float64 `json:"busy-rate"` // rate of thread busy 2420 CompressedSize int64 `json:"compressed-size"` // amount of bytes after compression 2421 CompressionRate float64 `json:"compression-rate"` // rate of compressed size 2422 } 2423 2424 // Detailed VFIO devices migration statistics 2425 // 2426 // Since: 5.2 2427 type VfioStats struct { 2428 Transferred int64 `json:"transferred"` // amount of bytes transferred to the target VM by VFIO devices 2429 } 2430 2431 // Information about current migration process. 2432 // 2433 // Since: 0.14 2434 type MigrationInfo struct { 2435 Status *MigrationStatus `json:"status,omitempty"` // @MigrationStatus describing the current migration status. If this field is not returned, no migration process has been initiated 2436 Ram *MigrationStats `json:"ram,omitempty"` // @MigrationStats containing detailed migration status, only returned if status is 'active' or 'completed'(since 1.2) 2437 Disk *MigrationStats `json:"disk,omitempty"` // @MigrationStats containing detailed disk migration status, only returned if status is 'active' and it is a block migration 2438 Vfio *VfioStats `json:"vfio,omitempty"` // @VfioStats containing detailed VFIO devices migration statistics, only returned if VFIO device is present, migration is supported by all VFIO devices and status is 'active' or 'completed' (since 5.2) 2439 XbzrleCache *XBZRLECacheStats `json:"xbzrle-cache,omitempty"` // @XBZRLECacheStats containing detailed XBZRLE migration statistics, only returned if XBZRLE feature is on and status is 'active' or 'completed' (since 1.2) 2440 TotalTime *int64 `json:"total-time,omitempty"` // total amount of milliseconds since migration started. If migration has ended, it returns the total migration time. (since 1.2) 2441 ExpectedDowntime *int64 `json:"expected-downtime,omitempty"` // only present while migration is active expected downtime in milliseconds for the guest in last walk of the dirty bitmap. (since 1.3) 2442 Downtime *int64 `json:"downtime,omitempty"` // only present when migration finishes correctly total downtime in milliseconds for the guest. (since 1.3) 2443 SetupTime *int64 `json:"setup-time,omitempty"` // amount of setup time in milliseconds *before* the iterations begin but *after* the QMP command is issued. This is designed to provide an accounting of any activities (such as RDMA pinning) which may be expensive, but do not actually occur during the iterative migration rounds themselves. (since 1.6) 2444 CpuThrottlePercentage *int64 `json:"cpu-throttle-percentage,omitempty"` // percentage of time guest cpus are being throttled during auto-converge. This is only present when auto-converge has started throttling guest cpus. (Since 2.7) 2445 ErrorDesc *string `json:"error-desc,omitempty"` // the human readable error description string, when @status is 'failed'. Clients should not attempt to parse the error strings. (Since 2.7) 2446 BlockedReasons []string `json:"blocked-reasons,omitempty"` // A list of reasons an outgoing migration is blocked. Present and non-empty when migration is blocked. (since 6.0) 2447 PostcopyBlocktime *uint32 `json:"postcopy-blocktime,omitempty"` // total time when all vCPU were blocked during postcopy live migration. This is only present when the postcopy-blocktime migration capability is enabled. (Since 3.0) 2448 PostcopyVcpuBlocktime []uint32 `json:"postcopy-vcpu-blocktime,omitempty"` // list of the postcopy blocktime per vCPU. This is only present when the postcopy-blocktime migration capability is enabled. (Since 3.0) 2449 Compression *CompressionStats `json:"compression,omitempty"` // migration compression statistics, only returned if compression feature is on and status is 'active' or 'completed' (Since 3.1) 2450 SocketAddress []SocketAddress `json:"socket-address,omitempty"` // Only used for tcp, to know what the real port is (Since 4.0) 2451 } 2452 2453 // Migration capability information 2454 // 2455 // Since: 1.2 2456 type MigrationCapabilityStatus struct { 2457 Capability MigrationCapability `json:"capability"` // capability enum 2458 State bool `json:"state"` // capability state bool 2459 } 2460 2461 // Since: 6.0 2462 type BitmapMigrationBitmapAliasTransform struct { 2463 Persistent *bool `json:"persistent,omitempty"` // If present, the bitmap will be made persistent or transient depending on this parameter. 2464 } 2465 2466 // Since: 5.2 2467 type BitmapMigrationBitmapAlias struct { 2468 Name string `json:"name"` // The name of the bitmap. 2469 Alias string `json:"alias"` // An alias name for migration (for example the bitmap name on the opposite site). 2470 Transform *BitmapMigrationBitmapAliasTransform `json:"transform,omitempty"` // Allows the modification of the migrated bitmap. (since 6.0) 2471 } 2472 2473 // Maps a block node name and the bitmaps it has to aliases for dirty 2474 // bitmap migration. 2475 // 2476 // Since: 5.2 2477 type BitmapMigrationNodeAlias struct { 2478 NodeName string `json:"node-name"` // A block node name. 2479 Alias string `json:"alias"` // An alias block node name for migration (for example the node name on the opposite site). 2480 Bitmaps []BitmapMigrationBitmapAlias `json:"bitmaps"` // Mappings for the bitmaps on this node. 2481 } 2482 2483 // Since: 2.4 2484 type MigrateSetParameters struct { 2485 AnnounceInitial *uint64 `json:"announce-initial,omitempty"` // Initial delay (in milliseconds) before sending the first announce (Since 4.0) 2486 AnnounceMax *uint64 `json:"announce-max,omitempty"` // Maximum delay (in milliseconds) between packets in the announcement (Since 4.0) 2487 AnnounceRounds *uint64 `json:"announce-rounds,omitempty"` // Number of self-announce packets sent after migration (Since 4.0) 2488 AnnounceStep *uint64 `json:"announce-step,omitempty"` // Increase in delay (in milliseconds) between subsequent packets in the announcement (Since 4.0) 2489 CompressLevel *uint8 `json:"compress-level,omitempty"` // compression level 2490 CompressThreads *uint8 `json:"compress-threads,omitempty"` // compression thread count 2491 CompressWaitThread *bool `json:"compress-wait-thread,omitempty"` // Controls behavior when all compression threads are currently busy. If true (default), wait for a free compression thread to become available; otherwise, send the page uncompressed. (Since 3.1) 2492 DecompressThreads *uint8 `json:"decompress-threads,omitempty"` // decompression thread count 2493 ThrottleTriggerThreshold *uint8 `json:"throttle-trigger-threshold,omitempty"` // The ratio of bytes_dirty_period and bytes_xfer_period to trigger throttling. It is expressed as percentage. The default value is 50. (Since 5.0) 2494 CpuThrottleInitial *uint8 `json:"cpu-throttle-initial,omitempty"` // Initial percentage of time guest cpus are throttled when migration auto-converge is activated. The default value is 20. (Since 2.7) 2495 CpuThrottleIncrement *uint8 `json:"cpu-throttle-increment,omitempty"` // throttle percentage increase each time auto-converge detects that migration is not making progress. The default value is 10. (Since 2.7) 2496 CpuThrottleTailslow *bool `json:"cpu-throttle-tailslow,omitempty"` // Make CPU throttling slower at tail stage At the tail stage of throttling, the Guest is very sensitive to CPU percentage while the @cpu-throttle -increment is excessive usually at tail stage. If this parameter is true, we will compute the ideal CPU percentage used by the Guest, which may exactly make the dirty rate match the dirty rate threshold. Then we will choose a smaller throttle increment between the one specified by @cpu-throttle-increment and the one generated by ideal CPU percentage. Therefore, it is compatible to traditional throttling, meanwhile the throttle increment won't be excessive at tail stage. The default value is false. (Since 5.1) 2497 TlsCreds *StrOrNull `json:"tls-creds,omitempty"` // ID of the 'tls-creds' object that provides credentials for establishing a TLS connection over the migration data channel. On the outgoing side of the migration, the credentials must be for a 'client' endpoint, while for the incoming side the credentials must be for a 'server' endpoint. Setting this to a non-empty string enables TLS for all migrations. An empty string means that QEMU will use plain text mode for migration, rather than TLS (Since 2.9) Previously (since 2.7), this was reported by omitting tls-creds instead. 2498 TlsHostname *StrOrNull `json:"tls-hostname,omitempty"` // hostname of the target host for the migration. This is required when using x509 based TLS credentials and the migration URI does not already include a hostname. For example if using fd: or exec: based migration, the hostname must be provided so that the server's x509 certificate identity can be validated. (Since 2.7) An empty string means that QEMU will use the hostname associated with the migration URI, if any. (Since 2.9) Previously (since 2.7), this was reported by omitting tls-hostname instead. 2499 TlsAuthz *StrOrNull `json:"tls-authz,omitempty"` 2500 MaxBandwidth *uint64 `json:"max-bandwidth,omitempty"` // to set maximum speed for migration. maximum speed in bytes per second. (Since 2.8) 2501 DowntimeLimit *uint64 `json:"downtime-limit,omitempty"` // set maximum tolerated downtime for migration. maximum downtime in milliseconds (Since 2.8) 2502 XCheckpointDelay *uint32 `json:"x-checkpoint-delay,omitempty"` // the delay time between two COLO checkpoints. (Since 2.8) 2503 BlockIncremental *bool `json:"block-incremental,omitempty"` // Affects how much storage is migrated when the block migration capability is enabled. When false, the entire storage backing chain is migrated into a flattened image at the destination; when true, only the active qcow2 layer is migrated and the destination must already have access to the same backing chain as was used on the source. (since 2.10) 2504 MultifdChannels *uint8 `json:"multifd-channels,omitempty"` // Number of channels used to migrate data in parallel. This is the same number that the number of sockets used for migration. The default value is 2 (since 4.0) 2505 XbzrleCacheSize *uint64 `json:"xbzrle-cache-size,omitempty"` // cache size to be used by XBZRLE migration. It needs to be a multiple of the target page size and a power of 2 (Since 2.11) 2506 MaxPostcopyBandwidth *uint64 `json:"max-postcopy-bandwidth,omitempty"` // Background transfer bandwidth during postcopy. Defaults to 0 (unlimited). In bytes per second. (Since 3.0) 2507 MaxCpuThrottle *uint8 `json:"max-cpu-throttle,omitempty"` // maximum cpu throttle percentage. The default value is 99. (Since 3.1) 2508 MultifdCompression *MultiFDCompression `json:"multifd-compression,omitempty"` // Which compression method to use. Defaults to none. (Since 5.0) 2509 MultifdZlibLevel *uint8 `json:"multifd-zlib-level,omitempty"` // Set the compression level to be used in live migration, the compression level is an integer between 0 and 9, where 0 means no compression, 1 means the best compression speed, and 9 means best compression ratio which will consume more CPU. Defaults to 1. (Since 5.0) 2510 MultifdZstdLevel *uint8 `json:"multifd-zstd-level,omitempty"` // Set the compression level to be used in live migration, the compression level is an integer between 0 and 20, where 0 means no compression, 1 means the best compression speed, and 20 means best compression ratio which will consume more CPU. Defaults to 1. (Since 5.0) 2511 BlockBitmapMapping []BitmapMigrationNodeAlias `json:"block-bitmap-mapping,omitempty"` // Maps block nodes and bitmaps on them to aliases for the purpose of dirty bitmap migration. Such aliases may for example be the corresponding names on the opposite site. The mapping must be one-to-one, but not necessarily complete: On the source, unmapped bitmaps and all bitmaps on unmapped nodes will be ignored. On the destination, encountering an unmapped alias in the incoming migration stream will result in a report, and all further bitmap migration data will then be discarded. Note that the destination does not know about bitmaps it does not receive, so there is no limitation or requirement regarding the number of bitmaps received, or how they are named, or on which nodes they are placed. By default (when this parameter has never been set), bitmap names are mapped to themselves. Nodes are mapped to their block device name if there is one, and to their node name otherwise. (Since 5.2) 2512 } 2513 2514 // The optional members aren't actually optional. 2515 // 2516 // Since: 2.4 2517 type MigrationParameters struct { 2518 AnnounceInitial *uint64 `json:"announce-initial,omitempty"` // Initial delay (in milliseconds) before sending the first announce (Since 4.0) 2519 AnnounceMax *uint64 `json:"announce-max,omitempty"` // Maximum delay (in milliseconds) between packets in the announcement (Since 4.0) 2520 AnnounceRounds *uint64 `json:"announce-rounds,omitempty"` // Number of self-announce packets sent after migration (Since 4.0) 2521 AnnounceStep *uint64 `json:"announce-step,omitempty"` // Increase in delay (in milliseconds) between subsequent packets in the announcement (Since 4.0) 2522 CompressLevel *uint8 `json:"compress-level,omitempty"` // compression level 2523 CompressThreads *uint8 `json:"compress-threads,omitempty"` // compression thread count 2524 CompressWaitThread *bool `json:"compress-wait-thread,omitempty"` // Controls behavior when all compression threads are currently busy. If true (default), wait for a free compression thread to become available; otherwise, send the page uncompressed. (Since 3.1) 2525 DecompressThreads *uint8 `json:"decompress-threads,omitempty"` // decompression thread count 2526 ThrottleTriggerThreshold *uint8 `json:"throttle-trigger-threshold,omitempty"` // The ratio of bytes_dirty_period and bytes_xfer_period to trigger throttling. It is expressed as percentage. The default value is 50. (Since 5.0) 2527 CpuThrottleInitial *uint8 `json:"cpu-throttle-initial,omitempty"` // Initial percentage of time guest cpus are throttled when migration auto-converge is activated. (Since 2.7) 2528 CpuThrottleIncrement *uint8 `json:"cpu-throttle-increment,omitempty"` // throttle percentage increase each time auto-converge detects that migration is not making progress. (Since 2.7) 2529 CpuThrottleTailslow *bool `json:"cpu-throttle-tailslow,omitempty"` // Make CPU throttling slower at tail stage At the tail stage of throttling, the Guest is very sensitive to CPU percentage while the @cpu-throttle -increment is excessive usually at tail stage. If this parameter is true, we will compute the ideal CPU percentage used by the Guest, which may exactly make the dirty rate match the dirty rate threshold. Then we will choose a smaller throttle increment between the one specified by @cpu-throttle-increment and the one generated by ideal CPU percentage. Therefore, it is compatible to traditional throttling, meanwhile the throttle increment won't be excessive at tail stage. The default value is false. (Since 5.1) 2530 TlsCreds *string `json:"tls-creds,omitempty"` // ID of the 'tls-creds' object that provides credentials for establishing a TLS connection over the migration data channel. On the outgoing side of the migration, the credentials must be for a 'client' endpoint, while for the incoming side the credentials must be for a 'server' endpoint. An empty string means that QEMU will use plain text mode for migration, rather than TLS (Since 2.7) Note: 2.8 reports this by omitting tls-creds instead. 2531 TlsHostname *string `json:"tls-hostname,omitempty"` // hostname of the target host for the migration. This is required when using x509 based TLS credentials and the migration URI does not already include a hostname. For example if using fd: or exec: based migration, the hostname must be provided so that the server's x509 certificate identity can be validated. (Since 2.7) An empty string means that QEMU will use the hostname associated with the migration URI, if any. (Since 2.9) Note: 2.8 reports this by omitting tls-hostname instead. 2532 TlsAuthz *string `json:"tls-authz,omitempty"` // ID of the 'authz' object subclass that provides access control checking of the TLS x509 certificate distinguished name. (Since 4.0) 2533 MaxBandwidth *uint64 `json:"max-bandwidth,omitempty"` // to set maximum speed for migration. maximum speed in bytes per second. (Since 2.8) 2534 DowntimeLimit *uint64 `json:"downtime-limit,omitempty"` // set maximum tolerated downtime for migration. maximum downtime in milliseconds (Since 2.8) 2535 XCheckpointDelay *uint32 `json:"x-checkpoint-delay,omitempty"` // the delay time between two COLO checkpoints. (Since 2.8) 2536 BlockIncremental *bool `json:"block-incremental,omitempty"` // Affects how much storage is migrated when the block migration capability is enabled. When false, the entire storage backing chain is migrated into a flattened image at the destination; when true, only the active qcow2 layer is migrated and the destination must already have access to the same backing chain as was used on the source. (since 2.10) 2537 MultifdChannels *uint8 `json:"multifd-channels,omitempty"` // Number of channels used to migrate data in parallel. This is the same number that the number of sockets used for migration. The default value is 2 (since 4.0) 2538 XbzrleCacheSize *uint64 `json:"xbzrle-cache-size,omitempty"` // cache size to be used by XBZRLE migration. It needs to be a multiple of the target page size and a power of 2 (Since 2.11) 2539 MaxPostcopyBandwidth *uint64 `json:"max-postcopy-bandwidth,omitempty"` // Background transfer bandwidth during postcopy. Defaults to 0 (unlimited). In bytes per second. (Since 3.0) 2540 MaxCpuThrottle *uint8 `json:"max-cpu-throttle,omitempty"` // maximum cpu throttle percentage. Defaults to 99. (Since 3.1) 2541 MultifdCompression *MultiFDCompression `json:"multifd-compression,omitempty"` // Which compression method to use. Defaults to none. (Since 5.0) 2542 MultifdZlibLevel *uint8 `json:"multifd-zlib-level,omitempty"` // Set the compression level to be used in live migration, the compression level is an integer between 0 and 9, where 0 means no compression, 1 means the best compression speed, and 9 means best compression ratio which will consume more CPU. Defaults to 1. (Since 5.0) 2543 MultifdZstdLevel *uint8 `json:"multifd-zstd-level,omitempty"` // Set the compression level to be used in live migration, the compression level is an integer between 0 and 20, where 0 means no compression, 1 means the best compression speed, and 20 means best compression ratio which will consume more CPU. Defaults to 1. (Since 5.0) 2544 BlockBitmapMapping []BitmapMigrationNodeAlias `json:"block-bitmap-mapping,omitempty"` // Maps block nodes and bitmaps on them to aliases for the purpose of dirty bitmap migration. Such aliases may for example be the corresponding names on the opposite site. The mapping must be one-to-one, but not necessarily complete: On the source, unmapped bitmaps and all bitmaps on unmapped nodes will be ignored. On the destination, encountering an unmapped alias in the incoming migration stream will result in a report, and all further bitmap migration data will then be discarded. Note that the destination does not know about bitmaps it does not receive, so there is no limitation or requirement regarding the number of bitmaps received, or how they are named, or on which nodes they are placed. By default (when this parameter has never been set), bitmap names are mapped to themselves. Nodes are mapped to their block device name if there is one, and to their node name otherwise. (Since 5.2) 2545 } 2546 2547 // The result format for 'query-xen-replication-status'. 2548 // 2549 // Since: 2.9 2550 type ReplicationStatus struct { 2551 Error bool `json:"error"` // true if an error happened, false if replication is normal. 2552 Desc *string `json:"desc,omitempty"` // the human readable error description string, when @error is 'true'. 2553 } 2554 2555 // The result format for 'query-colo-status'. 2556 // 2557 // Since: 3.1 2558 type COLOStatus struct { 2559 Mode COLOMode `json:"mode"` // COLO running mode. If COLO is running, this field will return 'primary' or 'secondary'. 2560 LastMode COLOMode `json:"last-mode"` // COLO last running mode. If COLO is running, this field will return same like mode field, after failover we can use this field to get last colo mode. (since 4.0) 2561 Reason COLOExitReason `json:"reason"` // describes the reason for the COLO exit. 2562 } 2563 2564 // Dirty rate of vcpu. 2565 // 2566 // Since: 6.2 2567 type DirtyRateVcpu struct { 2568 Id int64 `json:"id"` // vcpu index. 2569 DirtyRate int64 `json:"dirty-rate"` // dirty rate. 2570 } 2571 2572 // Information about current dirty page rate of vm. 2573 // 2574 // Since: 5.2 2575 type DirtyRateInfo struct { 2576 DirtyRate *int64 `json:"dirty-rate,omitempty"` // an estimate of the dirty page rate of the VM in units of MB/s, present only when estimating the rate has completed. 2577 Status DirtyRateStatus `json:"status"` // status containing dirtyrate query status includes 'unstarted' or 'measuring' or 'measured' 2578 StartTime int64 `json:"start-time"` // start time in units of second for calculation 2579 CalcTime int64 `json:"calc-time"` // time in units of second for sample dirty pages 2580 SamplePages uint64 `json:"sample-pages"` // page count per GB for sample dirty pages the default value is 512 (since 6.1) 2581 Mode DirtyRateMeasureMode `json:"mode"` // mode containing method of calculate dirtyrate includes 'page-sampling' and 'dirty-ring' (Since 6.2) 2582 VcpuDirtyRate []DirtyRateVcpu `json:"vcpu-dirty-rate,omitempty"` // dirtyrate for each vcpu if dirty-ring mode specified (Since 6.2) 2583 } 2584 2585 // This action can be used to test transaction failure. 2586 // 2587 // Since: 1.6 2588 type Abort struct{} 2589 2590 // Since: 1.6 2591 type AbortWrapper struct { 2592 Data Abort `json:"data"` 2593 } 2594 2595 // Since: 2.5 2596 type BlockDirtyBitmapAddWrapper struct { 2597 Data BlockDirtyBitmapAdd `json:"data"` 2598 } 2599 2600 // Since: 2.5 2601 type BlockDirtyBitmapWrapper struct { 2602 Data BlockDirtyBitmap `json:"data"` 2603 } 2604 2605 // Since: 4.0 2606 type BlockDirtyBitmapMergeWrapper struct { 2607 Data BlockDirtyBitmapMerge `json:"data"` 2608 } 2609 2610 // Since: 2.3 2611 type BlockdevBackupWrapper struct { 2612 Data BlockdevBackup `json:"data"` 2613 } 2614 2615 // Since: 2.5 2616 type BlockdevSnapshotWrapper struct { 2617 Data BlockdevSnapshot `json:"data"` 2618 } 2619 2620 // Since: 1.7 2621 type BlockdevSnapshotInternalWrapper struct { 2622 Data BlockdevSnapshotInternal `json:"data"` 2623 } 2624 2625 // Since: 1.1 2626 type BlockdevSnapshotSyncWrapper struct { 2627 Data BlockdevSnapshotSync `json:"data"` 2628 } 2629 2630 // Since: 1.6 2631 type DriveBackupWrapper struct { 2632 Data DriveBackup `json:"data"` 2633 } 2634 2635 // Optional arguments to modify the behavior of a Transaction. 2636 // 2637 // Since: 2.5 2638 type TransactionProperties struct { 2639 CompletionMode *ActionCompletionMode `json:"completion-mode,omitempty"` // Controls how jobs launched asynchronously by Actions will complete or fail as a group. See @ActionCompletionMode for details. 2640 } 2641 2642 // Information of a tracing event. 2643 // 2644 // None: An event is per-vCPU if it has the "vcpu" property in the "trace-events" 2645 // files. 2646 // 2647 // Since: 2.2 2648 type TraceEventInfo struct { 2649 Name string `json:"name"` // Event name. 2650 State TraceEventState `json:"state"` // Tracing state. 2651 Vcpu bool `json:"vcpu"` // Whether this is a per-vCPU event (since 2.7). 2652 } 2653 2654 // Policy for handling deprecated management interfaces. 2655 // 2656 // This is intended for testing users of the management interfaces. 2657 // 2658 // Limitation: covers only syntactic aspects of QMP, i.e. stuff tagged 2659 // with feature 'deprecated'. We may want to extend it to cover 2660 // semantic aspects and CLI. 2661 // 2662 // Limitation: deprecated-output policy @hide is not implemented for 2663 // enumeration values. They behave the same as with policy @accept. 2664 // 2665 // Since: 6.0 2666 type CompatPolicy struct { 2667 DeprecatedInput *CompatPolicyInput `json:"deprecated-input,omitempty"` // how to handle deprecated input (default 'accept') 2668 DeprecatedOutput *CompatPolicyOutput `json:"deprecated-output,omitempty"` // how to handle deprecated output (default 'accept') 2669 UnstableInput *CompatPolicyInput `json:"unstable-input,omitempty"` // how to handle unstable input (default 'accept') (since 6.2) 2670 UnstableOutput *CompatPolicyOutput `json:"unstable-output,omitempty"` // how to handle unstable output (default 'accept') (since 6.2) 2671 } 2672 2673 // A three-part version number. 2674 // 2675 // Since: 2.4 2676 type VersionTriple struct { 2677 Major int64 `json:"major"` // The major version number. 2678 Minor int64 `json:"minor"` // The minor version number. 2679 Micro int64 `json:"micro"` // The micro version number. 2680 } 2681 2682 // A description of QEMU's version. 2683 // 2684 // Since: 0.14 2685 type VersionInfo struct { 2686 Qemu VersionTriple `json:"qemu"` // The version of QEMU. By current convention, a micro version of 50 signifies a development branch. A micro version greater than or equal to 90 signifies a release candidate for the next minor version. A micro version of less than 50 signifies a stable release. 2687 Package string `json:"package"` // QEMU will always set this field to an empty string. Downstream versions of QEMU should set this to a non-empty string. The exact format depends on the downstream however it highly recommended that a unique name is used. 2688 } 2689 2690 // Information about a QMP command 2691 // 2692 // Since: 0.14 2693 type CommandInfo struct { 2694 Name string `json:"name"` // The command name 2695 } 2696 2697 // Options to be used for adding a new monitor. 2698 // 2699 // Since: 5.0 2700 type MonitorOptions struct { 2701 Id *string `json:"id,omitempty"` // Name of the monitor 2702 Mode *MonitorMode `json:"mode,omitempty"` // Selects the monitor mode (default: readline in the system emulator, control in qemu-storage-daemon) 2703 Pretty *bool `json:"pretty,omitempty"` // Enables pretty printing (QMP only) 2704 Chardev string `json:"chardev"` // Name of a character device to expose the monitor on 2705 } 2706 2707 // Additional SchemaInfo members for meta-type 'builtin'. 2708 // 2709 // Since: 2.5 2710 type SchemaInfoBuiltin struct { 2711 JsonType JSONType `json:"json-type"` // the JSON type used for this type on the wire. 2712 } 2713 2714 // Additional SchemaInfo members for meta-type 'enum'. 2715 // 2716 // None: Values of this type are JSON string on the wire. 2717 // 2718 // Since: 2.5 2719 type SchemaInfoEnum struct { 2720 Members []SchemaInfoEnumMember `json:"members"` // the enum type's members, in no particular order (since 6.2). 2721 Values []string `json:"values"` // the enumeration type's member names, in no particular order. Redundant with @members. Just for backward compatibility. 2722 } 2723 2724 // An object member. 2725 // 2726 // Since: 6.2 2727 type SchemaInfoEnumMember struct { 2728 Name string `json:"name"` // the member's name, as defined in the QAPI schema. 2729 Features []string `json:"features,omitempty"` // names of features associated with the member, in no particular order. 2730 } 2731 2732 // Additional SchemaInfo members for meta-type 'array'. 2733 // 2734 // None: Values of this type are JSON array on the wire. 2735 // 2736 // Since: 2.5 2737 type SchemaInfoArray struct { 2738 ElementType string `json:"element-type"` // the array type's element type. 2739 } 2740 2741 // Additional SchemaInfo members for meta-type 'object'. 2742 // 2743 // None: Values of this type are JSON object on the wire. 2744 // 2745 // Since: 2.5 2746 type SchemaInfoObject struct { 2747 Members []SchemaInfoObjectMember `json:"members"` // the object type's (non-variant) members, in no particular order. 2748 Tag *string `json:"tag,omitempty"` // the name of the member serving as type tag. An element of @members with this name must exist. 2749 Variants []SchemaInfoObjectVariant `json:"variants,omitempty"` // variant members, i.e. additional members that depend on the type tag's value. Present exactly when @tag is present. The variants are in no particular order, and may even differ from the order of the values of the enum type of the @tag. 2750 } 2751 2752 // An object member. 2753 // 2754 // Since: 2.5 2755 type SchemaInfoObjectMember struct { 2756 Name string `json:"name"` // the member's name, as defined in the QAPI schema. 2757 Type string `json:"type"` // the name of the member's type. 2758 Default *Any `json:"default,omitempty"` // default when used as command parameter. If absent, the parameter is mandatory. If present, the value must be null. The parameter is optional, and behavior when it's missing is not specified here. Future extension: if present and non-null, the parameter is optional, and defaults to this value. 2759 Features []string `json:"features,omitempty"` // names of features associated with the member, in no particular order. (since 5.0) 2760 } 2761 2762 // The variant members for a value of the type tag. 2763 // 2764 // Since: 2.5 2765 type SchemaInfoObjectVariant struct { 2766 Case string `json:"case"` // a value of the type tag. 2767 Type string `json:"type"` // the name of the object type that provides the variant members when the type tag has value @case. 2768 } 2769 2770 // Additional SchemaInfo members for meta-type 'alternate'. 2771 // 2772 // None: On the wire, this can be any of the members. 2773 // 2774 // Since: 2.5 2775 type SchemaInfoAlternate struct { 2776 Members []SchemaInfoAlternateMember `json:"members"` // the alternate type's members, in no particular order. The members' wire encoding is distinct, see docs/devel/qapi-code-gen.txt section Alternate types. 2777 } 2778 2779 // An alternate member. 2780 // 2781 // Since: 2.5 2782 type SchemaInfoAlternateMember struct { 2783 Type string `json:"type"` // the name of the member's type. 2784 } 2785 2786 // Additional SchemaInfo members for meta-type 'command'. 2787 // 2788 // Since: 2.5 2789 type SchemaInfoCommand struct { 2790 ArgType string `json:"arg-type"` // the name of the object type that provides the command's parameters. 2791 RetType string `json:"ret-type"` // the name of the command's result type. 2792 AllowOob *bool `json:"allow-oob,omitempty"` // whether the command allows out-of-band execution, defaults to false (Since: 2.12) 2793 } 2794 2795 // Additional SchemaInfo members for meta-type 'event'. 2796 // 2797 // Since: 2.5 2798 type SchemaInfoEvent struct { 2799 ArgType string `json:"arg-type"` // the name of the object type that provides the event's parameters. 2800 } 2801 2802 // Since: 1.2 2803 type ObjectPropertyInfo struct { 2804 Name string `json:"name"` // the name of the property 2805 Type string `json:"type"` // the type of the property. This will typically come in one of four forms: 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. These types are mapped to the appropriate JSON type. 2) A child type in the form 'child<subtype>' where subtype is a qdev device type name. Child properties create the composition tree. 3) A link type in the form 'link<subtype>' where subtype is a qdev device type name. Link properties form the device model graph. 2806 Description *string `json:"description,omitempty"` // if specified, the description of the property. 2807 DefaultValue *Any `json:"default-value,omitempty"` // the default value, if any (since 5.0) 2808 } 2809 2810 // This structure describes a search result from @qom-list-types 2811 // 2812 // Since: 1.1 2813 type ObjectTypeInfo struct { 2814 Name string `json:"name"` // the type name found in the search 2815 Abstract *bool `json:"abstract,omitempty"` // the type is abstract and can't be directly instantiated. Omitted if false. (since 2.10) 2816 Parent *string `json:"parent,omitempty"` // Name of parent type, if any (since 2.10) 2817 } 2818 2819 // Properties for can-host-socketcan objects. 2820 // 2821 // Since: 2.12 2822 type CanHostSocketcanProperties struct { 2823 If string `json:"if"` // interface name of the host system CAN bus to connect to 2824 Canbus string `json:"canbus"` // object ID of the can-bus object to connect to the host interface 2825 } 2826 2827 // Properties for colo-compare objects. 2828 // 2829 // Since: 2.8 2830 type ColoCompareProperties struct { 2831 PrimaryIn string `json:"primary_in"` // name of the character device backend to use for the primary input (incoming packets are redirected to @outdev) 2832 SecondaryIn string `json:"secondary_in"` // name of the character device backend to use for secondary input (incoming packets are only compared to the input on @primary_in and then dropped) 2833 Outdev string `json:"outdev"` // name of the character device backend to use for output 2834 Iothread string `json:"iothread"` // name of the iothread to run in 2835 NotifyDev *string `json:"notify_dev,omitempty"` // name of the character device backend to be used to communicate with the remote colo-frame (only for Xen COLO) 2836 CompareTimeout *uint64 `json:"compare_timeout,omitempty"` // the maximum time to hold a packet from @primary_in for comparison with an incoming packet on @secondary_in in milliseconds (default: 3000) 2837 ExpiredScanCycle *uint32 `json:"expired_scan_cycle,omitempty"` // the interval at which colo-compare checks whether packets from @primary have timed out, in milliseconds (default: 3000) 2838 MaxQueueSize *uint32 `json:"max_queue_size,omitempty"` // the maximum number of packets to keep in the queue for comparing with incoming packets from @secondary_in. If the queue is full and additional packets are received, the additional packets are dropped. (default: 1024) 2839 VnetHdrSupport *bool `json:"vnet_hdr_support,omitempty"` // if true, vnet header support is enabled (default: false) 2840 } 2841 2842 // Properties for cryptodev-backend and cryptodev-backend-builtin objects. 2843 // 2844 // Since: 2.8 2845 type CryptodevBackendProperties struct { 2846 Queues *uint32 `json:"queues,omitempty"` // the number of queues for the cryptodev backend. Ignored for cryptodev-backend and must be 1 for cryptodev-backend-builtin. (default: 1) 2847 } 2848 2849 // Properties for cryptodev-vhost-user objects. 2850 // 2851 // Since: 2.12 2852 type CryptodevVhostUserProperties struct { 2853 // Base type for this struct 2854 CryptodevBackendProperties 2855 Chardev string `json:"chardev"` // the name of a Unix domain socket character device that connects to the vhost-user server 2856 } 2857 2858 // Properties for dbus-vmstate objects. 2859 // 2860 // Since: 5.0 2861 type DBusVMStateProperties struct { 2862 Addr string `json:"addr"` // the name of the DBus bus to connect to 2863 IdList *string `json:"id-list,omitempty"` // a comma separated list of DBus IDs of helpers whose data should be included in the VM state on migration 2864 } 2865 2866 // Properties for objects of classes derived from netfilter. 2867 // 2868 // Since: 2.5 2869 type NetfilterProperties struct { 2870 Netdev string `json:"netdev"` // id of the network device backend to filter 2871 Queue *NetFilterDirection `json:"queue,omitempty"` // indicates which queue(s) to filter (default: all) 2872 Status *string `json:"status,omitempty"` // indicates whether the filter is enabled ("on") or disabled ("off") (default: "on") 2873 Position *string `json:"position,omitempty"` // specifies where the filter should be inserted in the filter list. "head" means the filter is inserted at the head of the filter list, before any existing filters. "tail" means the filter is inserted at the tail of the filter list, behind any existing filters (default). "id=<id>" means the filter is inserted before or behind the filter specified by <id>, depending on the @insert property. (default: "tail") 2874 Insert *NetfilterInsert `json:"insert,omitempty"` // where to insert the filter relative to the filter given in @position. Ignored if @position is "head" or "tail". (default: behind) 2875 } 2876 2877 // Properties for filter-buffer objects. 2878 // 2879 // Since: 2.5 2880 type FilterBufferProperties struct { 2881 // Base type for this struct 2882 NetfilterProperties 2883 Interval uint32 `json:"interval"` // a non-zero interval in microseconds. All packets arriving in the given interval are delayed until the end of the interval. 2884 } 2885 2886 // Properties for filter-dump objects. 2887 // 2888 // Since: 2.5 2889 type FilterDumpProperties struct { 2890 // Base type for this struct 2891 NetfilterProperties 2892 File string `json:"file"` // the filename where the dumped packets should be stored 2893 Maxlen *uint32 `json:"maxlen,omitempty"` // maximum number of bytes in a packet that are stored (default: 65536) 2894 } 2895 2896 // Properties for filter-mirror objects. 2897 // 2898 // Since: 2.6 2899 type FilterMirrorProperties struct { 2900 // Base type for this struct 2901 NetfilterProperties 2902 Outdev string `json:"outdev"` // the name of a character device backend to which all incoming packets are mirrored 2903 VnetHdrSupport *bool `json:"vnet_hdr_support,omitempty"` // if true, vnet header support is enabled (default: false) 2904 } 2905 2906 // Properties for filter-redirector objects. 2907 // 2908 // At least one of @indev or @outdev must be present. If both are present, they 2909 // must not refer to the same character device backend. 2910 // 2911 // Since: 2.6 2912 type FilterRedirectorProperties struct { 2913 // Base type for this struct 2914 NetfilterProperties 2915 Indev *string `json:"indev,omitempty"` // the name of a character device backend from which packets are received and redirected to the filtered network device 2916 Outdev *string `json:"outdev,omitempty"` // the name of a character device backend to which all incoming packets are redirected 2917 VnetHdrSupport *bool `json:"vnet_hdr_support,omitempty"` // if true, vnet header support is enabled (default: false) 2918 } 2919 2920 // Properties for filter-rewriter objects. 2921 // 2922 // Since: 2.8 2923 type FilterRewriterProperties struct { 2924 // Base type for this struct 2925 NetfilterProperties 2926 VnetHdrSupport *bool `json:"vnet_hdr_support,omitempty"` // if true, vnet header support is enabled (default: false) 2927 } 2928 2929 // Properties for input-barrier objects. 2930 // 2931 // Since: 4.2 2932 type InputBarrierProperties struct { 2933 Name string `json:"name"` // the screen name as declared in the screens section of barrier.conf 2934 Server *string `json:"server,omitempty"` // hostname of the Barrier server (default: "localhost") 2935 Port *string `json:"port,omitempty"` // TCP port of the Barrier server (default: "24800") 2936 XOrigin *string `json:"x-origin,omitempty"` // x coordinate of the leftmost pixel on the guest screen (default: "0") 2937 YOrigin *string `json:"y-origin,omitempty"` // y coordinate of the topmost pixel on the guest screen (default: "0") 2938 Width *string `json:"width,omitempty"` // the width of secondary screen in pixels (default: "1920") 2939 Height *string `json:"height,omitempty"` // the height of secondary screen in pixels (default: "1080") 2940 } 2941 2942 // Properties for input-linux objects. 2943 // 2944 // Since: 2.6 2945 type InputLinuxProperties struct { 2946 Evdev string `json:"evdev"` // the path of the host evdev device to use 2947 GrabAll *bool `json:"grab_all,omitempty"` // if true, grab is toggled for all devices (e.g. both keyboard and mouse) instead of just one device (default: false) 2948 Repeat *bool `json:"repeat,omitempty"` // enables auto-repeat events (default: false) 2949 GrabToggle *GrabToggleKeys `json:"grab-toggle,omitempty"` // the key or key combination that toggles device grab (default: ctrl-ctrl) 2950 } 2951 2952 // Properties for iothread objects. 2953 // 2954 // Since: 2.0 2955 type IothreadProperties struct { 2956 PollMaxNs *int64 `json:"poll-max-ns,omitempty"` // the maximum number of nanoseconds to busy wait for events. 0 means polling is disabled (default: 32768 on POSIX hosts, 0 otherwise) 2957 PollGrow *int64 `json:"poll-grow,omitempty"` // the multiplier used to increase the polling time when the algorithm detects it is missing events due to not polling long enough. 0 selects a default behaviour (default: 0) 2958 PollShrink *int64 `json:"poll-shrink,omitempty"` // the divisor used to decrease the polling time when the algorithm detects it is spending too long polling without encountering events. 0 selects a default behaviour (default: 0) 2959 AioMaxBatch *int64 `json:"aio-max-batch,omitempty"` // maximum number of requests in a batch for the AIO engine, 0 means that the engine will use its default (default:0, since 6.1) 2960 } 2961 2962 // Properties for objects of classes derived from memory-backend. 2963 // 2964 // Note: prealloc=true and reserve=false cannot be set at the same time. With 2965 // reserve=true, the behavior depends on the operating system: for example, 2966 // Linux will not reserve swap space for shared file mappings -- 2967 // "not applicable". In contrast, reserve=false will bail out if it cannot 2968 // be configured accordingly. 2969 // 2970 // Since: 2.1 2971 type MemoryBackendProperties struct { 2972 Dump *bool `json:"dump,omitempty"` // if true, include the memory in core dumps (default depends on the machine type) 2973 HostNodes []uint16 `json:"host-nodes,omitempty"` // the list of NUMA host nodes to bind the memory to 2974 Merge *bool `json:"merge,omitempty"` // if true, mark the memory as mergeable (default depends on the machine type) 2975 Policy *HostMemPolicy `json:"policy,omitempty"` // the NUMA policy (default: 'default') 2976 Prealloc *bool `json:"prealloc,omitempty"` // if true, preallocate memory (default: false) 2977 PreallocThreads *uint32 `json:"prealloc-threads,omitempty"` // number of CPU threads to use for prealloc (default: 1) 2978 Share *bool `json:"share,omitempty"` // if false, the memory is private to QEMU; if true, it is shared (default: false) 2979 Reserve *bool `json:"reserve,omitempty"` // if true, reserve swap space (or huge pages) if applicable (default: true) (since 6.1) 2980 Size uint64 `json:"size"` // size of the memory region in bytes 2981 XUseCanonicalPathForRamblockId *bool `json:"x-use-canonical-path-for-ramblock-id,omitempty"` // if true, the canoncial path is used for ramblock-id. Disable this for 4.0 machine types or older to allow migration with newer QEMU versions. (default: false generally, but true for machine types <= 4.0) 2982 } 2983 2984 // Properties for memory-backend-file objects. 2985 // 2986 // Since: 2.1 2987 type MemoryBackendFileProperties struct { 2988 // Base type for this struct 2989 MemoryBackendProperties 2990 Align *uint64 `json:"align,omitempty"` // the base address alignment when QEMU mmap(2)s @mem-path. Some backend stores specified by @mem-path require an alignment different than the default one used by QEMU, e.g. the device DAX /dev/dax0.0 requires 2M alignment rather than 4K. In such cases, users can specify the required alignment via this option. 0 selects a default alignment (currently the page size). (default: 0) 2991 DiscardData *bool `json:"discard-data,omitempty"` // if true, the file contents can be destroyed when QEMU exits, to avoid unnecessarily flushing data to the backing file. Note that ``discard-data`` is only an optimization, and QEMU might not discard file contents if it aborts unexpectedly or is terminated using SIGKILL. (default: false) 2992 MemPath string `json:"mem-path"` // the path to either a shared memory or huge page filesystem mount 2993 Pmem *bool `json:"pmem,omitempty"` // specifies whether the backing file specified by @mem-path is in host persistent memory that can be accessed using the SNIA NVM programming model (e.g. Intel NVDIMM). 2994 Readonly *bool `json:"readonly,omitempty"` // if true, the backing file is opened read-only; if false, it is opened read-write. (default: false) 2995 } 2996 2997 // Properties for memory-backend-memfd objects. 2998 // 2999 // The @share boolean option is true by default with memfd. 3000 // 3001 // Since: 2.12 3002 type MemoryBackendMemfdProperties struct { 3003 // Base type for this struct 3004 MemoryBackendProperties 3005 Hugetlb *bool `json:"hugetlb,omitempty"` // if true, the file to be created resides in the hugetlbfs filesystem (default: false) 3006 Hugetlbsize *uint64 `json:"hugetlbsize,omitempty"` // the hugetlb page size on systems that support multiple hugetlb page sizes (it must be a power of 2 value supported by the system). 0 selects a default page size. This option is ignored if @hugetlb is false. (default: 0) 3007 Seal *bool `json:"seal,omitempty"` // if true, create a sealed-file, which will block further resizing of the memory (default: true) 3008 } 3009 3010 // Properties for memory-backend-epc objects. 3011 // 3012 // The @share boolean option is true by default with epc 3013 // 3014 // The @merge boolean option is false by default with epc 3015 // 3016 // The @dump boolean option is false by default with epc 3017 // 3018 // Since: 6.2 3019 type MemoryBackendEpcProperties struct { 3020 // Base type for this struct 3021 MemoryBackendProperties 3022 } 3023 3024 // Properties for pr-manager-helper objects. 3025 // 3026 // Since: 2.11 3027 type PrManagerHelperProperties struct { 3028 Path string `json:"path"` // the path to a Unix domain socket for connecting to the external helper 3029 } 3030 3031 // Properties for qtest objects. 3032 // 3033 // Since: 6.0 3034 type QtestProperties struct { 3035 Chardev string `json:"chardev"` // the chardev to be used to receive qtest commands on. 3036 Log *string `json:"log,omitempty"` // the path to a log file 3037 } 3038 3039 // Properties for x-remote-object objects. 3040 // 3041 // Since: 6.0 3042 type RemoteObjectProperties struct { 3043 Fd string `json:"fd"` // file descriptor name previously passed via 'getfd' command 3044 Devid string `json:"devid"` // the id of the device to be associated with the file descriptor 3045 } 3046 3047 // Properties for objects of classes derived from rng. 3048 // 3049 // Since: 1.3 3050 type RngProperties struct { 3051 Opened *bool `json:"opened,omitempty"` // if true, the device is opened immediately when applying this option and will probably fail when processing the next option. Don't use; only provided for compatibility. (default: false) 3052 } 3053 3054 // Properties for rng-egd objects. 3055 // 3056 // Since: 1.3 3057 type RngEgdProperties struct { 3058 // Base type for this struct 3059 RngProperties 3060 Chardev string `json:"chardev"` // the name of a character device backend that provides the connection to the RNG daemon 3061 } 3062 3063 // Properties for rng-random objects. 3064 // 3065 // Since: 1.3 3066 type RngRandomProperties struct { 3067 // Base type for this struct 3068 RngProperties 3069 Filename *string `json:"filename,omitempty"` // the filename of the device on the host to obtain entropy from (default: "/dev/urandom") 3070 } 3071 3072 // Properties for sev-guest objects. 3073 // 3074 // Since: 2.12 3075 type SevGuestProperties struct { 3076 SevDevice *string `json:"sev-device,omitempty"` // SEV device to use (default: "/dev/sev") 3077 DhCertFile *string `json:"dh-cert-file,omitempty"` // guest owners DH certificate (encoded with base64) 3078 SessionFile *string `json:"session-file,omitempty"` // guest owners session parameters (encoded with base64) 3079 Policy *uint32 `json:"policy,omitempty"` // SEV policy value (default: 0x1) 3080 Handle *uint32 `json:"handle,omitempty"` // SEV firmware handle (default: 0) 3081 Cbitpos *uint32 `json:"cbitpos,omitempty"` // C-bit location in page table entry (default: 0) 3082 ReducedPhysBits uint32 `json:"reduced-phys-bits"` // number of bits in physical addresses that become unavailable when SEV is enabled 3083 KernelHashes *bool `json:"kernel-hashes,omitempty"` // if true, add hashes of kernel/initrd/cmdline to a designated guest firmware page for measured boot with -kernel (default: false) (since 6.2) 3084 } 3085 3086 // Additional information about a virtual S390 CPU 3087 // 3088 // Since: 2.12 3089 type CpuInfoS390 struct { 3090 CpuState CpuS390State `json:"cpu-state"` // the virtual CPU's state 3091 } 3092 3093 // Information describing a machine. 3094 // 3095 // Since: 1.2 3096 type MachineInfo struct { 3097 Name string `json:"name"` // the name of the machine 3098 Alias *string `json:"alias,omitempty"` // an alias for the machine name 3099 IsDefault *bool `json:"is-default,omitempty"` // whether the machine is default 3100 CpuMax int64 `json:"cpu-max"` // maximum number of CPUs supported by the machine type (since 1.5) 3101 HotpluggableCpus bool `json:"hotpluggable-cpus"` // cpu hotplug via -device is supported (since 2.7) 3102 NumaMemSupported bool `json:"numa-mem-supported"` // true if '-numa node,mem' option is supported by the machine type and false otherwise (since 4.1) 3103 Deprecated bool `json:"deprecated"` // if true, the machine type is deprecated and may be removed in future versions of QEMU according to the QEMU deprecation policy (since 4.1) 3104 DefaultCpuType *string `json:"default-cpu-type,omitempty"` // default CPU model typename if none is requested via the -cpu argument. (since 4.2) 3105 DefaultRamId *string `json:"default-ram-id,omitempty"` // the default ID of initial RAM memory backend (since 5.2) 3106 } 3107 3108 // Information describing the running machine parameters. 3109 // 3110 // Since: 4.0 3111 type CurrentMachineParams struct { 3112 WakeupSuspendSupport bool `json:"wakeup-suspend-support"` // true if the machine supports wake up from suspend 3113 } 3114 3115 // Information describing the QEMU target. 3116 // 3117 // Since: 1.2 3118 type TargetInfo struct { 3119 Arch SysEmuTarget `json:"arch"` // the target architecture 3120 } 3121 3122 // Guest UUID information (Universally Unique Identifier). 3123 // 3124 // Since: 0.14 3125 // 3126 // Notes: If no UUID was specified for the guest, a null UUID is returned. 3127 type UuidInfo struct { 3128 Uuid string `json:"UUID"` // the UUID of the guest 3129 } 3130 3131 // GUID information. 3132 // 3133 // Since: 2.9 3134 type GuidInfo struct { 3135 Guid string `json:"guid"` // the globally unique identifier 3136 } 3137 3138 // Information about support for KVM acceleration 3139 // 3140 // Since: 0.14 3141 type KvmInfo struct { 3142 Enabled bool `json:"enabled"` // true if KVM acceleration is active 3143 Present bool `json:"present"` // true if KVM acceleration is built into this executable 3144 } 3145 3146 // Create a guest NUMA node. (for OptsVisitor) 3147 // 3148 // Since: 2.1 3149 type NumaNodeOptions struct { 3150 Nodeid *uint16 `json:"nodeid,omitempty"` // NUMA node ID (increase by 1 from 0 if omitted) 3151 Cpus []uint16 `json:"cpus,omitempty"` // VCPUs belonging to this node (assign VCPUS round-robin if omitted) 3152 Mem *uint64 `json:"mem,omitempty"` // memory size of this node; mutually exclusive with @memdev. Equally divide total memory among nodes if both @mem and @memdev are omitted. 3153 Memdev *string `json:"memdev,omitempty"` // memory backend object. If specified for one node, it must be specified for all nodes. 3154 Initiator *uint16 `json:"initiator,omitempty"` // defined in ACPI 6.3 Chapter 5.2.27.3 Table 5-145, points to the nodeid which has the memory controller responsible for this NUMA node. This field provides additional information as to the initiator node that is closest (as in directly attached) to this node, and therefore has the best performance (since 5.0) 3155 } 3156 3157 // Set the distance between 2 NUMA nodes. 3158 // 3159 // Since: 2.10 3160 type NumaDistOptions struct { 3161 Src uint16 `json:"src"` // source NUMA node. 3162 Dst uint16 `json:"dst"` // destination NUMA node. 3163 Val uint8 `json:"val"` // NUMA distance from source node to destination node. When a node is unreachable from another node, set the distance between them to 255. 3164 } 3165 3166 // Information about a X86 CPU feature word 3167 // 3168 // Since: 1.5 3169 type X86CPUFeatureWordInfo struct { 3170 CpuidInputEax int64 `json:"cpuid-input-eax"` // Input EAX value for CPUID instruction for that feature word 3171 CpuidInputEcx *int64 `json:"cpuid-input-ecx,omitempty"` // Input ECX value for CPUID instruction for that feature word 3172 CpuidRegister X86CPURegister32 `json:"cpuid-register"` // Output register containing the feature bits 3173 Features int64 `json:"features"` // value of output register, containing the feature bits 3174 } 3175 3176 // Not used by QMP; hack to let us use X86CPUFeatureWordInfoList internally 3177 // 3178 // Since: 2.5 3179 type DummyForceArrays struct { 3180 Unused []X86CPUFeatureWordInfo `json:"unused"` 3181 } 3182 3183 // Option "-numa cpu" overrides default cpu to node mapping. 3184 // It accepts the same set of cpu properties as returned by 3185 // query-hotpluggable-cpus[].props, where node-id could be used to 3186 // override default node mapping. 3187 // 3188 // Since: 2.10 3189 type NumaCpuOptions struct { 3190 // Base type for this struct 3191 CpuInstanceProperties 3192 } 3193 3194 // Set the system locality latency and bandwidth information 3195 // between Initiator and Target proximity Domains. 3196 // 3197 // For more information about @NumaHmatLBOptions, see chapter 3198 // 5.2.27.4: Table 5-146 of ACPI 6.3 spec. 3199 // 3200 // Since: 5.0 3201 type NumaHmatLBOptions struct { 3202 Initiator uint16 `json:"initiator"` // the Initiator Proximity Domain. 3203 Target uint16 `json:"target"` // the Target Proximity Domain. 3204 Hierarchy HmatLBMemoryHierarchy `json:"hierarchy"` // the Memory Hierarchy. Indicates the performance of memory or side cache. 3205 DataType HmatLBDataType `json:"data-type"` // presents the type of data, access/read/write latency or hit latency. 3206 Latency *uint64 `json:"latency,omitempty"` // the value of latency from @initiator to @target proximity domain, the latency unit is "ns(nanosecond)". 3207 Bandwidth *uint64 `json:"bandwidth,omitempty"` // the value of bandwidth between @initiator and @target proximity domain, the bandwidth unit is "Bytes per second". 3208 } 3209 3210 // Set the memory side cache information for a given memory domain. 3211 // 3212 // For more information of @NumaHmatCacheOptions, see chapter 3213 // 5.2.27.5: Table 5-147: Field "Cache Attributes" of ACPI 6.3 spec. 3214 // 3215 // Since: 5.0 3216 type NumaHmatCacheOptions struct { 3217 NodeId uint32 `json:"node-id"` // the memory proximity domain to which the memory belongs. 3218 Size uint64 `json:"size"` // the size of memory side cache in bytes. 3219 Level uint8 `json:"level"` // the cache level described in this structure. 3220 Associativity HmatCacheAssociativity `json:"associativity"` // the cache associativity, none/direct-mapped/complex(complex cache indexing). 3221 Policy HmatCacheWritePolicy `json:"policy"` // the write policy, none/write-back/write-through. 3222 Line uint16 `json:"line"` // the cache Line size in bytes. 3223 } 3224 3225 // Information about memory backend 3226 // 3227 // Since: 2.1 3228 type Memdev struct { 3229 Id *string `json:"id,omitempty"` // backend's ID if backend has 'id' property (since 2.9) 3230 Size uint64 `json:"size"` // memory backend size 3231 Merge bool `json:"merge"` // whether memory merge support is enabled 3232 Dump bool `json:"dump"` // whether memory backend's memory is included in a core dump 3233 Prealloc bool `json:"prealloc"` // whether memory was preallocated 3234 Share bool `json:"share"` // whether memory is private to QEMU or shared (since 6.1) 3235 Reserve *bool `json:"reserve,omitempty"` // whether swap space (or huge pages) was reserved if applicable. This corresponds to the user configuration and not the actual behavior implemented in the OS to perform the reservation. For example, Linux will never reserve swap space for shared file mappings. (since 6.1) 3236 HostNodes []uint16 `json:"host-nodes"` // host nodes for its memory policy 3237 Policy HostMemPolicy `json:"policy"` // memory policy of memory backend 3238 } 3239 3240 // List of properties to be used for hotplugging a CPU instance, 3241 // it should be passed by management with device_add command when 3242 // a CPU is being hotplugged. 3243 // 3244 // Note: currently there are 5 properties that could be present 3245 // but management should be prepared to pass through other 3246 // properties with device_add command to allow for future 3247 // interface extension. This also requires the filed names to be kept in 3248 // sync with the properties passed to -device/device_add. 3249 // 3250 // Since: 2.7 3251 type CpuInstanceProperties struct { 3252 NodeId *int64 `json:"node-id,omitempty"` // NUMA node ID the CPU belongs to 3253 SocketId *int64 `json:"socket-id,omitempty"` // socket number within node/board the CPU belongs to 3254 DieId *int64 `json:"die-id,omitempty"` // die number within socket the CPU belongs to (since 4.1) 3255 CoreId *int64 `json:"core-id,omitempty"` // core number within die the CPU belongs to 3256 ThreadId *int64 `json:"thread-id,omitempty"` // thread number within core the CPU belongs to 3257 } 3258 3259 // Since: 2.7 3260 type HotpluggableCPU struct { 3261 Type string `json:"type"` // CPU object type for usage with device_add command 3262 VcpusCount int64 `json:"vcpus-count"` // number of logical VCPU threads @HotpluggableCPU provides 3263 Props CpuInstanceProperties `json:"props"` // list of properties to be used for hotplugging CPU 3264 QomPath *string `json:"qom-path,omitempty"` // link to existing CPU object if CPU is present or omitted if CPU is not present. 3265 } 3266 3267 // Information about the guest balloon device. 3268 // 3269 // Since: 0.14 3270 type BalloonInfo struct { 3271 Actual int64 `json:"actual"` // the logical size of the VM in bytes Formula used: logical_vm_size = vm_ram_size - balloon_size 3272 } 3273 3274 // Actual memory information in bytes. 3275 // 3276 // Since: 2.11 3277 type MemoryInfo struct { 3278 BaseMemory uint64 `json:"base-memory"` // size of "base" memory specified with command line option -m. 3279 PluggedMemory *uint64 `json:"plugged-memory,omitempty"` // size of memory that can be hot-unplugged. This field is omitted if target doesn't support memory hotplug (i.e. CONFIG_MEM_DEVICE not defined at build time). 3280 } 3281 3282 // PCDIMMDevice state information 3283 // 3284 // Since: 2.1 3285 type PCDIMMDeviceInfo struct { 3286 Id *string `json:"id,omitempty"` // device's ID 3287 Addr int64 `json:"addr"` // physical address, where device is mapped 3288 Size int64 `json:"size"` // size of memory that the device provides 3289 Slot int64 `json:"slot"` // slot number at which device is plugged in 3290 Node int64 `json:"node"` // NUMA node number where device is plugged in 3291 Memdev string `json:"memdev"` // memory backend linked with device 3292 Hotplugged bool `json:"hotplugged"` // true if device was hotplugged 3293 Hotpluggable bool `json:"hotpluggable"` // true if device if could be added/removed while machine is running 3294 } 3295 3296 // VirtioPMEM state information 3297 // 3298 // Since: 4.1 3299 type VirtioPMEMDeviceInfo struct { 3300 Id *string `json:"id,omitempty"` // device's ID 3301 Memaddr uint64 `json:"memaddr"` // physical address in memory, where device is mapped 3302 Size uint64 `json:"size"` // size of memory that the device provides 3303 Memdev string `json:"memdev"` // memory backend linked with device 3304 } 3305 3306 // VirtioMEMDevice state information 3307 // 3308 // Since: 5.1 3309 type VirtioMEMDeviceInfo struct { 3310 Id *string `json:"id,omitempty"` // device's ID 3311 Memaddr uint64 `json:"memaddr"` // physical address in memory, where device is mapped 3312 RequestedSize uint64 `json:"requested-size"` // the user requested size of the device 3313 Size uint64 `json:"size"` // the (current) size of memory that the device provides 3314 MaxSize uint64 `json:"max-size"` // the maximum size of memory that the device can provide 3315 BlockSize uint64 `json:"block-size"` // the block size of memory that the device provides 3316 Node int64 `json:"node"` // NUMA node number where device is assigned to 3317 Memdev string `json:"memdev"` // memory backend linked with the region 3318 } 3319 3320 // Sgx EPC state information 3321 // 3322 // Since: 6.2 3323 type SgxEPCDeviceInfo struct { 3324 Id *string `json:"id,omitempty"` // device's ID 3325 Memaddr uint64 `json:"memaddr"` // physical address in memory, where device is mapped 3326 Size uint64 `json:"size"` // size of memory that the device provides 3327 Node int64 `json:"node"` // the numa node (Since: 7.0) 3328 Memdev string `json:"memdev"` // memory backend linked with device 3329 } 3330 3331 // Since: 2.1 3332 type PCDIMMDeviceInfoWrapper struct { 3333 Data PCDIMMDeviceInfo `json:"data"` 3334 } 3335 3336 // Since: 2.1 3337 type VirtioPMEMDeviceInfoWrapper struct { 3338 Data VirtioPMEMDeviceInfo `json:"data"` 3339 } 3340 3341 // Since: 2.1 3342 type VirtioMEMDeviceInfoWrapper struct { 3343 Data VirtioMEMDeviceInfo `json:"data"` 3344 } 3345 3346 // Since: 6.2 3347 type SgxEPCDeviceInfoWrapper struct { 3348 Data SgxEPCDeviceInfo `json:"data"` 3349 } 3350 3351 // Sgx EPC cmdline information 3352 // 3353 // Since: 6.2 3354 type SgxEPC struct { 3355 Memdev string `json:"memdev"` // memory backend linked with device 3356 Node int64 `json:"node"` // the numa node (Since: 7.0) 3357 } 3358 3359 // SGX properties of machine types. 3360 // 3361 // Since: 6.2 3362 type SgxEPCProperties struct { 3363 SgxEpc []SgxEPC `json:"sgx-epc"` // list of ids of memory-backend-epc objects. 3364 } 3365 3366 // Schema for CPU topology configuration. A missing value lets 3367 // QEMU figure out a suitable value based on the ones that are provided. 3368 // 3369 // Since: 6.1 3370 type SMPConfiguration struct { 3371 Cpus *int64 `json:"cpus,omitempty"` // number of virtual CPUs in the virtual machine 3372 Sockets *int64 `json:"sockets,omitempty"` // number of sockets in the CPU topology 3373 Dies *int64 `json:"dies,omitempty"` // number of dies per socket in the CPU topology 3374 Clusters *int64 `json:"clusters,omitempty"` // number of clusters per die in the CPU topology (since 7.0) 3375 Cores *int64 `json:"cores,omitempty"` // number of cores per cluster in the CPU topology 3376 Threads *int64 `json:"threads,omitempty"` // number of threads per core in the CPU topology 3377 Maxcpus *int64 `json:"maxcpus,omitempty"` // maximum number of hotpluggable virtual CPUs in the virtual machine 3378 } 3379 3380 // Virtual CPU model. 3381 // 3382 // A CPU model consists of the name of a CPU definition, to which 3383 // delta changes are applied (e.g. features added/removed). Most magic values 3384 // that an architecture might require should be hidden behind the name. 3385 // However, if required, architectures can expose relevant properties. 3386 // 3387 // Since: 2.8 3388 type CpuModelInfo struct { 3389 Name string `json:"name"` // the name of the CPU definition the model is based on 3390 Props *Any `json:"props,omitempty"` // a dictionary of QOM properties to be applied 3391 } 3392 3393 // The result of a CPU model baseline. 3394 // 3395 // Since: 2.8 3396 type CpuModelBaselineInfo struct { 3397 Model CpuModelInfo `json:"model"` // the baselined CpuModelInfo. 3398 } 3399 3400 // The result of a CPU model comparison. 3401 // 3402 // None: @responsible-properties is a list of QOM property names that led to 3403 // both CPUs not being detected as identical. For identical models, this 3404 // list is empty. 3405 // If a QOM property is read-only, that means there's no known way to make the 3406 // CPU models identical. If the special property name "type" is included, the 3407 // models are by definition not identical and cannot be made identical. 3408 // 3409 // Since: 2.8 3410 type CpuModelCompareInfo struct { 3411 Result CpuModelCompareResult `json:"result"` // The result of the compare operation. 3412 ResponsibleProperties []string `json:"responsible-properties"` // List of properties that led to the comparison result not being identical. 3413 } 3414 3415 // The result of a cpu model expansion. 3416 // 3417 // Since: 2.8 3418 type CpuModelExpansionInfo struct { 3419 Model CpuModelInfo `json:"model"` // the expanded CpuModelInfo. 3420 } 3421 3422 // Virtual CPU definition. 3423 // 3424 // None: @unavailable-features is a list of QOM property names that 3425 // represent CPU model attributes that prevent the CPU from running. 3426 // If the QOM property is read-only, that means there's no known 3427 // way to make the CPU model run in the current host. Implementations 3428 // that choose not to provide specific information return the 3429 // property name "type". 3430 // If the property is read-write, it means that it MAY be possible 3431 // to run the CPU model in the current host if that property is 3432 // changed. Management software can use it as hints to suggest or 3433 // choose an alternative for the user, or just to generate meaningful 3434 // error messages explaining why the CPU model can't be used. 3435 // If @unavailable-features is an empty list, the CPU model is 3436 // runnable using the current host and machine-type. 3437 // If @unavailable-features is not present, runnability 3438 // information for the CPU is not available. 3439 // 3440 // Since: 1.2 3441 type CpuDefinitionInfo struct { 3442 Name string `json:"name"` // the name of the CPU definition 3443 MigrationSafe *bool `json:"migration-safe,omitempty"` // whether a CPU definition can be safely used for migration in combination with a QEMU compatibility machine when migrating between different QEMU versions and between hosts with different sets of (hardware or software) capabilities. If not provided, information is not available and callers should not assume the CPU definition to be migration-safe. (since 2.8) 3444 Static bool `json:"static"` // whether a CPU definition is static and will not change depending on QEMU version, machine type, machine options and accelerator options. A static model is always migration-safe. (since 2.8) 3445 UnavailableFeatures []string `json:"unavailable-features,omitempty"` // List of properties that prevent the CPU model from running in the current host. (since 2.8) 3446 Typename string `json:"typename"` // Type name that can be used as argument to @device-list-properties, to introspect properties configurable using -cpu or -global. (since 2.9) 3447 AliasOf *string `json:"alias-of,omitempty"` // Name of CPU model this model is an alias for. The target of the CPU model alias may change depending on the machine type. Management software is supposed to translate CPU model aliases in the VM configuration, because aliases may stop being migration-safe in the future (since 4.1) 3448 Deprecated bool `json:"deprecated"` // If true, this CPU model is deprecated and may be removed in in some future version of QEMU according to the QEMU deprecation policy. (since 5.2) 3449 } 3450 3451 // Record/replay information. 3452 // 3453 // Since: 5.2 3454 type ReplayInfo struct { 3455 Mode ReplayMode `json:"mode"` // current mode. 3456 Filename *string `json:"filename,omitempty"` // name of the record/replay log file. It is present only in record or replay modes, when the log is recorded or replayed. 3457 Icount int64 `json:"icount"` // current number of executed instructions. 3458 } 3459 3460 // Specifies which block graph node to yank. See @YankInstance for more 3461 // information. 3462 // 3463 // Since: 6.0 3464 type YankInstanceBlockNode struct { 3465 NodeName string `json:"node-name"` // the name of the block graph node 3466 } 3467 3468 // Specifies which character device to yank. See @YankInstance for more 3469 // information. 3470 // 3471 // Since: 6.0 3472 type YankInstanceChardev struct { 3473 Id string `json:"id"` // the chardev's ID 3474 } 3475 3476 // Guest name information. 3477 // 3478 // Since: 0.14 3479 type NameInfo struct { 3480 Name *string `json:"name,omitempty"` // The name of the guest 3481 } 3482 3483 // Information about an iothread 3484 // 3485 // Since: 2.0 3486 type IOThreadInfo struct { 3487 Id string `json:"id"` // the identifier of the iothread 3488 ThreadId int64 `json:"thread-id"` // ID of the underlying host thread 3489 PollMaxNs int64 `json:"poll-max-ns"` // maximum polling time in ns, 0 means polling is disabled (since 2.9) 3490 PollGrow int64 `json:"poll-grow"` // how many ns will be added to polling time, 0 means that it's not configured (since 2.9) 3491 PollShrink int64 `json:"poll-shrink"` // how many ns will be removed from polling time, 0 means that it's not configured (since 2.9) 3492 AioMaxBatch int64 `json:"aio-max-batch"` // maximum number of requests in a batch for the AIO engine, 0 means that the engine will use its default (since 6.1) 3493 } 3494 3495 // Information about a file descriptor that was added to an fd set. 3496 // 3497 // Since: 1.2 3498 type AddfdInfo struct { 3499 FdsetId int64 `json:"fdset-id"` // The ID of the fd set that @fd was added to. 3500 Fd int64 `json:"fd"` // The file descriptor that was received via SCM rights and added to the fd set. 3501 } 3502 3503 // Information about a file descriptor that belongs to an fd set. 3504 // 3505 // Since: 1.2 3506 type FdsetFdInfo struct { 3507 Fd int64 `json:"fd"` // The file descriptor value. 3508 Opaque *string `json:"opaque,omitempty"` // A free-form string that can be used to describe the fd. 3509 } 3510 3511 // Information about an fd set. 3512 // 3513 // Since: 1.2 3514 type FdsetInfo struct { 3515 FdsetId int64 `json:"fdset-id"` // The ID of the fd set. 3516 Fds []FdsetFdInfo `json:"fds"` // A list of file descriptors that belong to this fd set. 3517 } 3518 3519 // Details about a single parameter of a command line option. 3520 // 3521 // Since: 1.5 3522 type CommandLineParameterInfo struct { 3523 Name string `json:"name"` // parameter name 3524 Type CommandLineParameterType `json:"type"` // parameter @CommandLineParameterType 3525 Help *string `json:"help,omitempty"` // human readable text string, not suitable for parsing. 3526 Default *string `json:"default,omitempty"` // default value string (since 2.1) 3527 } 3528 3529 // Details about a command line option, including its list of parameter details 3530 // 3531 // Since: 1.5 3532 type CommandLineOptionInfo struct { 3533 Option string `json:"option"` // option name 3534 Parameters []CommandLineParameterInfo `json:"parameters"` // an array of @CommandLineParameterInfo 3535 } 3536 3537 // Information about Secure Encrypted Virtualization (SEV) support 3538 // 3539 // Since: 2.12 3540 type SevInfo struct { 3541 Enabled bool `json:"enabled"` // true if SEV is active 3542 ApiMajor uint8 `json:"api-major"` // SEV API major version 3543 ApiMinor uint8 `json:"api-minor"` // SEV API minor version 3544 BuildId uint8 `json:"build-id"` // SEV FW build id 3545 Policy uint32 `json:"policy"` // SEV policy value 3546 State SevState `json:"state"` // SEV guest state 3547 Handle uint32 `json:"handle"` // SEV firmware handle 3548 } 3549 3550 // SEV Guest Launch measurement information 3551 // 3552 // Since: 2.12 3553 type SevLaunchMeasureInfo struct { 3554 Data string `json:"data"` // the measurement value encoded in base64 3555 } 3556 3557 // The struct describes capability for a Secure Encrypted Virtualization 3558 // feature. 3559 // 3560 // Since: 2.12 3561 type SevCapability struct { 3562 Pdh string `json:"pdh"` // Platform Diffie-Hellman key (base64 encoded) 3563 CertChain string `json:"cert-chain"` // PDH certificate chain (base64 encoded) 3564 Cbitpos int64 `json:"cbitpos"` // C-bit location in page table entry 3565 ReducedPhysBits int64 `json:"reduced-phys-bits"` // Number of physical Address bit reduction when SEV is enabled 3566 } 3567 3568 // The struct describes attestation report for a Secure Encrypted 3569 // Virtualization feature. 3570 // 3571 // Since: 6.1 3572 type SevAttestationReport struct { 3573 Data string `json:"data"` // guest attestation report (base64 encoded) 3574 } 3575 3576 // The struct describes capability for a specific GIC (Generic 3577 // Interrupt Controller) version. These bits are not only decided by 3578 // QEMU/KVM software version, but also decided by the hardware that 3579 // the program is running upon. 3580 // 3581 // Since: 2.6 3582 type GICCapability struct { 3583 Version int64 `json:"version"` // version of GIC to be described. Currently, only 2 and 3 are supported. 3584 Emulated bool `json:"emulated"` // whether current QEMU/hardware supports emulated GIC device in user space. 3585 Kernel bool `json:"kernel"` // whether current QEMU/hardware supports hardware accelerated GIC device in kernel. 3586 } 3587 3588 // Information about intel SGX EPC section info 3589 // 3590 // Since: 7.0 3591 type SGXEPCSection struct { 3592 Node int64 `json:"node"` // the numa node 3593 Size uint64 `json:"size"` // the size of EPC section 3594 } 3595 3596 // Information about intel Safe Guard eXtension (SGX) support 3597 // 3598 // Since: 6.2 3599 type SGXInfo struct { 3600 Sgx bool `json:"sgx"` // true if SGX is supported 3601 Sgx1 bool `json:"sgx1"` // true if SGX1 is supported 3602 Sgx2 bool `json:"sgx2"` // true if SGX2 is supported 3603 Flc bool `json:"flc"` // true if FLC is supported 3604 SectionSize uint64 `json:"section-size"` // The EPC section size for guest Redundant with @sections. Just for backward compatibility. 3605 Sections []SGXEPCSection `json:"sections"` // The EPC sections info for guest (Since: 7.0) 3606 } 3607 3608 // General audio backend options that are used for both playback and 3609 // recording. 3610 // 3611 // Since: 4.0 3612 type AudiodevPerDirectionOptions struct { 3613 MixingEngine *bool `json:"mixing-engine,omitempty"` // use QEMU's mixing engine to mix all streams inside QEMU and convert audio formats when not supported by the backend. When set to off, fixed-settings must be also off (default on, since 4.2) 3614 FixedSettings *bool `json:"fixed-settings,omitempty"` // use fixed settings for host input/output. When off, frequency, channels and format must not be specified (default true) 3615 Frequency *uint32 `json:"frequency,omitempty"` // frequency to use when using fixed settings (default 44100) 3616 Channels *uint32 `json:"channels,omitempty"` // number of channels when using fixed settings (default 2) 3617 Voices *uint32 `json:"voices,omitempty"` // number of voices to use (default 1) 3618 Format *AudioFormat `json:"format,omitempty"` // sample format to use when using fixed settings (default s16) 3619 BufferLength *uint32 `json:"buffer-length,omitempty"` // the buffer length in microseconds 3620 } 3621 3622 // Generic driver-specific options. 3623 // 3624 // Since: 4.0 3625 type AudiodevGenericOptions struct { 3626 In *AudiodevPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3627 Out *AudiodevPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3628 } 3629 3630 // Options of the ALSA backend that are used for both playback and 3631 // recording. 3632 // 3633 // Since: 4.0 3634 type AudiodevAlsaPerDirectionOptions struct { 3635 // Base type for this struct 3636 AudiodevPerDirectionOptions 3637 Dev *string `json:"dev,omitempty"` // the name of the ALSA device to use (default 'default') 3638 PeriodLength *uint32 `json:"period-length,omitempty"` // the period length in microseconds 3639 TryPoll *bool `json:"try-poll,omitempty"` // attempt to use poll mode, falling back to non-polling access on failure (default true) 3640 } 3641 3642 // Options of the ALSA audio backend. 3643 // 3644 // Since: 4.0 3645 type AudiodevAlsaOptions struct { 3646 In *AudiodevAlsaPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3647 Out *AudiodevAlsaPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3648 Threshold *uint32 `json:"threshold,omitempty"` // set the threshold (in microseconds) when playback starts 3649 } 3650 3651 // Options of the Core Audio backend that are used for both playback and 3652 // recording. 3653 // 3654 // Since: 4.0 3655 type AudiodevCoreaudioPerDirectionOptions struct { 3656 // Base type for this struct 3657 AudiodevPerDirectionOptions 3658 BufferCount *uint32 `json:"buffer-count,omitempty"` // number of buffers 3659 } 3660 3661 // Options of the coreaudio audio backend. 3662 // 3663 // Since: 4.0 3664 type AudiodevCoreaudioOptions struct { 3665 In *AudiodevCoreaudioPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3666 Out *AudiodevCoreaudioPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3667 } 3668 3669 // Options of the DirectSound audio backend. 3670 // 3671 // Since: 4.0 3672 type AudiodevDsoundOptions struct { 3673 In *AudiodevPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3674 Out *AudiodevPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3675 Latency *uint32 `json:"latency,omitempty"` // add extra latency to playback in microseconds (default 10000) 3676 } 3677 3678 // Options of the JACK backend that are used for both playback and 3679 // recording. 3680 // 3681 // Since: 5.1 3682 type AudiodevJackPerDirectionOptions struct { 3683 // Base type for this struct 3684 AudiodevPerDirectionOptions 3685 ServerName *string `json:"server-name,omitempty"` // select from among several possible concurrent server instances (default: environment variable $JACK_DEFAULT_SERVER if set, else "default") 3686 ClientName *string `json:"client-name,omitempty"` // the client name to use. The server will modify this name to create a unique variant, if needed unless @exact-name is true (default: the guest's name) 3687 ConnectPorts *string `json:"connect-ports,omitempty"` // if set, a regular expression of JACK client port name(s) to monitor for and automatically connect to 3688 StartServer *bool `json:"start-server,omitempty"` // start a jack server process if one is not already present (default: false) 3689 ExactName *bool `json:"exact-name,omitempty"` // use the exact name requested otherwise JACK automatically generates a unique one, if needed (default: false) 3690 } 3691 3692 // Options of the JACK audio backend. 3693 // 3694 // Since: 5.1 3695 type AudiodevJackOptions struct { 3696 In *AudiodevJackPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3697 Out *AudiodevJackPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3698 } 3699 3700 // Options of the OSS backend that are used for both playback and 3701 // recording. 3702 // 3703 // Since: 4.0 3704 type AudiodevOssPerDirectionOptions struct { 3705 // Base type for this struct 3706 AudiodevPerDirectionOptions 3707 Dev *string `json:"dev,omitempty"` // file name of the OSS device (default '/dev/dsp') 3708 BufferCount *uint32 `json:"buffer-count,omitempty"` // number of buffers 3709 TryPoll *bool `json:"try-poll,omitempty"` // attempt to use poll mode, falling back to non-polling access on failure (default true) 3710 } 3711 3712 // Options of the OSS audio backend. 3713 // 3714 // Since: 4.0 3715 type AudiodevOssOptions struct { 3716 In *AudiodevOssPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3717 Out *AudiodevOssPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3718 TryMmap *bool `json:"try-mmap,omitempty"` // try using memory-mapped access, falling back to non-memory-mapped access on failure (default true) 3719 Exclusive *bool `json:"exclusive,omitempty"` // open device in exclusive mode (vmix won't work) (default false) 3720 DspPolicy *uint32 `json:"dsp-policy,omitempty"` // set the timing policy of the device (between 0 and 10, where smaller number means smaller latency but higher CPU usage) or -1 to use fragment mode (option ignored on some platforms) (default 5) 3721 } 3722 3723 // Options of the Pulseaudio backend that are used for both playback and 3724 // recording. 3725 // 3726 // Since: 4.0 3727 type AudiodevPaPerDirectionOptions struct { 3728 // Base type for this struct 3729 AudiodevPerDirectionOptions 3730 Name *string `json:"name,omitempty"` // name of the sink/source to use 3731 StreamName *string `json:"stream-name,omitempty"` // name of the PulseAudio stream created by qemu. Can be used to identify the stream in PulseAudio when you create multiple PulseAudio devices or run multiple qemu instances (default: audiodev's id, since 4.2) 3732 Latency *uint32 `json:"latency,omitempty"` // latency you want PulseAudio to achieve in microseconds (default 15000) 3733 } 3734 3735 // Options of the PulseAudio audio backend. 3736 // 3737 // Since: 4.0 3738 type AudiodevPaOptions struct { 3739 In *AudiodevPaPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3740 Out *AudiodevPaPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3741 Server *string `json:"server,omitempty"` // PulseAudio server address (default: let PulseAudio choose) 3742 } 3743 3744 // Options of the SDL audio backend that are used for both playback and 3745 // recording. 3746 // 3747 // Since: 6.0 3748 type AudiodevSdlPerDirectionOptions struct { 3749 // Base type for this struct 3750 AudiodevPerDirectionOptions 3751 BufferCount *uint32 `json:"buffer-count,omitempty"` // number of buffers (default 4) 3752 } 3753 3754 // Options of the SDL audio backend. 3755 // 3756 // Since: 6.0 3757 type AudiodevSdlOptions struct { 3758 In *AudiodevSdlPerDirectionOptions `json:"in,omitempty"` // options of the recording stream 3759 Out *AudiodevSdlPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3760 } 3761 3762 // Options of the wav audio backend. 3763 // 3764 // Since: 4.0 3765 type AudiodevWavOptions struct { 3766 In *AudiodevPerDirectionOptions `json:"in,omitempty"` // options of the capture stream 3767 Out *AudiodevPerDirectionOptions `json:"out,omitempty"` // options of the playback stream 3768 Path *string `json:"path,omitempty"` // name of the wav file to record (default 'qemu.wav') 3769 } 3770 3771 // Specify an ACPI table on the command line to load. 3772 // 3773 // At most one of @file and @data can be specified. The list of files specified 3774 // by any one of them is loaded and concatenated in order. If both are omitted, 3775 // @data is implied. 3776 // 3777 // Other fields / optargs can be used to override fields of the generic ACPI 3778 // table header; refer to the ACPI specification 5.0, section 5.2.6 System 3779 // Description Table Header. If a header field is not overridden, then the 3780 // corresponding value from the concatenated blob is used (in case of @file), or 3781 // it is filled in with a hard-coded value (in case of @data). 3782 // 3783 // String fields are copied into the matching ACPI member from lowest address 3784 // upwards, and silently truncated / NUL-padded to length. 3785 // 3786 // Since: 1.5 3787 type AcpiTableOptions struct { 3788 Sig *string `json:"sig,omitempty"` // table signature / identifier (4 bytes) 3789 Rev *uint8 `json:"rev,omitempty"` // table revision number (dependent on signature, 1 byte) 3790 OemId *string `json:"oem_id,omitempty"` // OEM identifier (6 bytes) 3791 OemTableId *string `json:"oem_table_id,omitempty"` // OEM table identifier (8 bytes) 3792 OemRev *uint32 `json:"oem_rev,omitempty"` // OEM-supplied revision number (4 bytes) 3793 AslCompilerId *string `json:"asl_compiler_id,omitempty"` // identifier of the utility that created the table (4 bytes) 3794 AslCompilerRev *uint32 `json:"asl_compiler_rev,omitempty"` // revision number of the utility that created the table (4 bytes) 3795 File *string `json:"file,omitempty"` // colon (:) separated list of pathnames to load and concatenate as table data. The resultant binary blob is expected to have an ACPI table header. At least one file is required. This field excludes @data. 3796 Data *string `json:"data,omitempty"` // colon (:) separated list of pathnames to load and concatenate as table data. The resultant binary blob must not have an ACPI table header. At least one file is required. This field excludes @file. 3797 } 3798 3799 // OSPM Status Indication for a device 3800 // For description of possible values of @source and @status fields 3801 // see "_OST (OSPM Status Indication)" chapter of ACPI5.0 spec. 3802 // 3803 // Since: 2.1 3804 type ACPIOSTInfo struct { 3805 Device *string `json:"device,omitempty"` // device ID associated with slot 3806 Slot string `json:"slot"` // slot ID, unique per slot of a given @slot-type 3807 SlotType ACPISlotType `json:"slot-type"` // type of the slot 3808 Source int64 `json:"source"` // an integer containing the source event 3809 Status int64 `json:"status"` // an integer containing the status code 3810 } 3811 3812 // A PCI device memory region 3813 // 3814 // Since: 0.14 3815 type PciMemoryRange struct { 3816 Base int64 `json:"base"` // the starting address (guest physical) 3817 Limit int64 `json:"limit"` // the ending address (guest physical) 3818 } 3819 3820 // Information about a PCI device I/O region. 3821 // 3822 // Since: 0.14 3823 type PciMemoryRegion struct { 3824 Bar int64 `json:"bar"` // the index of the Base Address Register for this region 3825 Type string `json:"type"` // - 'io' if the region is a PIO region - 'memory' if the region is a MMIO region 3826 Address int64 `json:"address"` 3827 Size int64 `json:"size"` // memory size 3828 Prefetch *bool `json:"prefetch,omitempty"` // if @type is 'memory', true if the memory is prefetchable 3829 MemType64 *bool `json:"mem_type_64,omitempty"` // if @type is 'memory', true if the BAR is 64-bit 3830 } 3831 3832 // Information about a bus of a PCI Bridge device 3833 // 3834 // Since: 2.4 3835 type PciBusInfo struct { 3836 Number int64 `json:"number"` // primary bus interface number. This should be the number of the bus the device resides on. 3837 Secondary int64 `json:"secondary"` // secondary bus interface number. This is the number of the main bus for the bridge 3838 Subordinate int64 `json:"subordinate"` // This is the highest number bus that resides below the bridge. 3839 IoRange PciMemoryRange `json:"io_range"` // The PIO range for all devices on this bridge 3840 MemoryRange PciMemoryRange `json:"memory_range"` // The MMIO range for all devices on this bridge 3841 PrefetchableRange PciMemoryRange `json:"prefetchable_range"` // The range of prefetchable MMIO for all devices on this bridge 3842 } 3843 3844 // Information about a PCI Bridge device 3845 // 3846 // Since: 0.14 3847 type PciBridgeInfo struct { 3848 Bus PciBusInfo `json:"bus"` // information about the bus the device resides on 3849 Devices []PciDeviceInfo `json:"devices,omitempty"` // a list of @PciDeviceInfo for each device on this bridge 3850 } 3851 3852 // Information about the Class of a PCI device 3853 // 3854 // Since: 2.4 3855 type PciDeviceClass struct { 3856 Desc *string `json:"desc,omitempty"` // a string description of the device's class 3857 Class int64 `json:"class"` // the class code of the device 3858 } 3859 3860 // Information about the Id of a PCI device 3861 // 3862 // Since: 2.4 3863 type PciDeviceId struct { 3864 Device int64 `json:"device"` // the PCI device id 3865 Vendor int64 `json:"vendor"` // the PCI vendor id 3866 Subsystem *int64 `json:"subsystem,omitempty"` // the PCI subsystem id (since 3.1) 3867 SubsystemVendor *int64 `json:"subsystem-vendor,omitempty"` // the PCI subsystem vendor id (since 3.1) 3868 } 3869 3870 // Information about a PCI device 3871 // 3872 // Notes: the contents of @class_info.desc are not stable and should only be 3873 // treated as informational. 3874 // 3875 // Since: 0.14 3876 type PciDeviceInfo struct { 3877 Bus int64 `json:"bus"` // the bus number of the device 3878 Slot int64 `json:"slot"` // the slot the device is located in 3879 Function int64 `json:"function"` // the function of the slot used by the device 3880 ClassInfo PciDeviceClass `json:"class_info"` // the class of the device 3881 Id PciDeviceId `json:"id"` // the PCI device id 3882 Irq *int64 `json:"irq,omitempty"` // if an IRQ is assigned to the device, the IRQ number 3883 IrqPin int64 `json:"irq_pin"` // the IRQ pin, zero means no IRQ (since 5.1) 3884 QdevId string `json:"qdev_id"` // the device name of the PCI device 3885 PciBridge *PciBridgeInfo `json:"pci_bridge,omitempty"` // if the device is a PCI bridge, the bridge information 3886 Regions []PciMemoryRegion `json:"regions"` // a list of the PCI I/O regions associated with the device 3887 } 3888 3889 // Information about a PCI bus 3890 // 3891 // Since: 0.14 3892 type PciInfo struct { 3893 Bus int64 `json:"bus"` // the bus index 3894 Devices []PciDeviceInfo `json:"devices"` // a list of devices on this bus 3895 } 3896