Anthony Liguori | e319360 | 2011-09-02 12:34:47 -0500 | [diff] [blame] | 1 | # -*- Mode: Python -*- |
| 2 | # |
| 3 | # QAPI Schema |
Anthony Liguori | 48a32be | 2011-09-02 12:34:48 -0500 | [diff] [blame] | 4 | |
| 5 | ## |
Luiz Capitulino | dcafd32 | 2012-07-27 09:34:50 -0300 | [diff] [blame] | 6 | # @ErrorClass |
| 7 | # |
| 8 | # QEMU error classes |
| 9 | # |
| 10 | # @GenericError: this is used for errors that don't require a specific error |
| 11 | # class. This should be the default case for most errors |
| 12 | # |
| 13 | # @CommandNotFound: the requested command has not been found |
| 14 | # |
| 15 | # @DeviceEncrypted: the requested operation can't be fulfilled because the |
| 16 | # selected device is encrypted |
| 17 | # |
| 18 | # @DeviceNotActive: a device has failed to be become active |
| 19 | # |
| 20 | # @DeviceNotFound: the requested device has not been found |
| 21 | # |
| 22 | # @KVMMissingCap: the requested operation can't be fulfilled because a |
| 23 | # required KVM capability is missing |
| 24 | # |
Luiz Capitulino | dcafd32 | 2012-07-27 09:34:50 -0300 | [diff] [blame] | 25 | # Since: 1.2 |
| 26 | ## |
| 27 | { 'enum': 'ErrorClass', |
| 28 | 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted', |
Paolo Bonzini | 1e99814 | 2012-10-23 14:54:21 +0200 | [diff] [blame] | 29 | 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] } |
Luiz Capitulino | dcafd32 | 2012-07-27 09:34:50 -0300 | [diff] [blame] | 30 | |
| 31 | ## |
Luiz Capitulino | b224e5e | 2012-09-13 16:52:20 -0300 | [diff] [blame] | 32 | # @add_client |
| 33 | # |
| 34 | # Allow client connections for VNC, Spice and socket based |
| 35 | # character devices to be passed in to QEMU via SCM_RIGHTS. |
| 36 | # |
| 37 | # @protocol: protocol name. Valid names are "vnc", "spice" or the |
| 38 | # name of a character device (eg. from -chardev id=XXXX) |
| 39 | # |
| 40 | # @fdname: file descriptor name previously passed via 'getfd' command |
| 41 | # |
| 42 | # @skipauth: #optional whether to skip authentication. Only applies |
| 43 | # to "vnc" and "spice" protocols |
| 44 | # |
| 45 | # @tls: #optional whether to perform TLS. Only applies to the "spice" |
| 46 | # protocol |
| 47 | # |
| 48 | # Returns: nothing on success. |
| 49 | # |
| 50 | # Since: 0.14.0 |
| 51 | ## |
| 52 | { 'command': 'add_client', |
| 53 | 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', |
| 54 | '*tls': 'bool' } } |
| 55 | |
| 56 | ## |
Anthony Liguori | 48a32be | 2011-09-02 12:34:48 -0500 | [diff] [blame] | 57 | # @NameInfo: |
| 58 | # |
| 59 | # Guest name information. |
| 60 | # |
| 61 | # @name: #optional The name of the guest |
| 62 | # |
| 63 | # Since 0.14.0 |
| 64 | ## |
| 65 | { 'type': 'NameInfo', 'data': {'*name': 'str'} } |
| 66 | |
| 67 | ## |
| 68 | # @query-name: |
| 69 | # |
| 70 | # Return the name information of a guest. |
| 71 | # |
| 72 | # Returns: @NameInfo of the guest |
| 73 | # |
| 74 | # Since 0.14.0 |
| 75 | ## |
| 76 | { 'command': 'query-name', 'returns': 'NameInfo' } |
Luiz Capitulino | b9c15f1 | 2011-08-26 17:38:13 -0300 | [diff] [blame] | 77 | |
| 78 | ## |
| 79 | # @VersionInfo: |
| 80 | # |
| 81 | # A description of QEMU's version. |
| 82 | # |
| 83 | # @qemu.major: The major version of QEMU |
| 84 | # |
| 85 | # @qemu.minor: The minor version of QEMU |
| 86 | # |
| 87 | # @qemu.micro: The micro version of QEMU. By current convention, a micro |
| 88 | # version of 50 signifies a development branch. A micro version |
| 89 | # greater than or equal to 90 signifies a release candidate for |
| 90 | # the next minor version. A micro version of less than 50 |
| 91 | # signifies a stable release. |
| 92 | # |
| 93 | # @package: QEMU will always set this field to an empty string. Downstream |
| 94 | # versions of QEMU should set this to a non-empty string. The |
| 95 | # exact format depends on the downstream however it highly |
| 96 | # recommended that a unique name is used. |
| 97 | # |
| 98 | # Since: 0.14.0 |
| 99 | ## |
| 100 | { 'type': 'VersionInfo', |
| 101 | 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, |
| 102 | 'package': 'str'} } |
| 103 | |
| 104 | ## |
| 105 | # @query-version: |
| 106 | # |
| 107 | # Returns the current version of QEMU. |
| 108 | # |
| 109 | # Returns: A @VersionInfo object describing the current version of QEMU. |
| 110 | # |
| 111 | # Since: 0.14.0 |
| 112 | ## |
| 113 | { 'command': 'query-version', 'returns': 'VersionInfo' } |
Luiz Capitulino | 292a260 | 2011-09-12 15:10:53 -0300 | [diff] [blame] | 114 | |
| 115 | ## |
| 116 | # @KvmInfo: |
| 117 | # |
| 118 | # Information about support for KVM acceleration |
| 119 | # |
| 120 | # @enabled: true if KVM acceleration is active |
| 121 | # |
| 122 | # @present: true if KVM acceleration is built into this executable |
| 123 | # |
| 124 | # Since: 0.14.0 |
| 125 | ## |
| 126 | { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } |
| 127 | |
| 128 | ## |
| 129 | # @query-kvm: |
| 130 | # |
| 131 | # Returns information about KVM acceleration |
| 132 | # |
| 133 | # Returns: @KvmInfo |
| 134 | # |
| 135 | # Since: 0.14.0 |
| 136 | ## |
| 137 | { 'command': 'query-kvm', 'returns': 'KvmInfo' } |
| 138 | |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 139 | ## |
| 140 | # @RunState |
| 141 | # |
Lei Li | 6932a69 | 2012-08-23 13:14:25 +0800 | [diff] [blame] | 142 | # An enumeration of VM run states. |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 143 | # |
| 144 | # @debug: QEMU is running on a debugger |
| 145 | # |
Luiz Capitulino | 0a24c7b | 2012-04-27 13:16:41 -0300 | [diff] [blame] | 146 | # @finish-migrate: guest is paused to finish the migration process |
| 147 | # |
Paolo Bonzini | 1e99814 | 2012-10-23 14:54:21 +0200 | [diff] [blame] | 148 | # @inmigrate: guest is paused waiting for an incoming migration. Note |
| 149 | # that this state does not tell whether the machine will start at the |
| 150 | # end of the migration. This depends on the command-line -S option and |
| 151 | # any invocation of 'stop' or 'cont' that has happened since QEMU was |
| 152 | # started. |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 153 | # |
| 154 | # @internal-error: An internal error that prevents further guest execution |
| 155 | # has occurred |
| 156 | # |
| 157 | # @io-error: the last IOP has failed and the device is configured to pause |
| 158 | # on I/O errors |
| 159 | # |
| 160 | # @paused: guest has been paused via the 'stop' command |
| 161 | # |
| 162 | # @postmigrate: guest is paused following a successful 'migrate' |
| 163 | # |
| 164 | # @prelaunch: QEMU was started with -S and guest has not started |
| 165 | # |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 166 | # @restore-vm: guest is paused to restore VM state |
| 167 | # |
| 168 | # @running: guest is actively running |
| 169 | # |
| 170 | # @save-vm: guest is paused to save the VM state |
| 171 | # |
| 172 | # @shutdown: guest is shut down (and -no-shutdown is in use) |
| 173 | # |
Luiz Capitulino | ad02b96 | 2012-04-27 13:33:36 -0300 | [diff] [blame] | 174 | # @suspended: guest is suspended (ACPI S3) |
| 175 | # |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 176 | # @watchdog: the watchdog action is configured to pause and has been triggered |
| 177 | ## |
| 178 | { 'enum': 'RunState', |
| 179 | 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', |
| 180 | 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', |
Luiz Capitulino | ad02b96 | 2012-04-27 13:33:36 -0300 | [diff] [blame] | 181 | 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] } |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 182 | |
| 183 | ## |
Benoît Canet | c249ee6 | 2012-09-05 13:09:01 +0200 | [diff] [blame] | 184 | # @SnapshotInfo |
| 185 | # |
| 186 | # @id: unique snapshot id |
| 187 | # |
| 188 | # @name: user chosen name |
| 189 | # |
| 190 | # @vm-state-size: size of the VM state |
| 191 | # |
| 192 | # @date-sec: UTC date of the snapshot in seconds |
| 193 | # |
| 194 | # @date-nsec: fractional part in nano seconds to be used with date-sec |
| 195 | # |
| 196 | # @vm-clock-sec: VM clock relative to boot in seconds |
| 197 | # |
| 198 | # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec |
| 199 | # |
| 200 | # Since: 1.3 |
| 201 | # |
| 202 | ## |
| 203 | |
| 204 | { 'type': 'SnapshotInfo', |
| 205 | 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int', |
| 206 | 'date-sec': 'int', 'date-nsec': 'int', |
| 207 | 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } } |
| 208 | |
| 209 | ## |
| 210 | # @ImageInfo: |
| 211 | # |
| 212 | # Information about a QEMU image file |
| 213 | # |
| 214 | # @filename: name of the image file |
| 215 | # |
| 216 | # @format: format of the image file |
| 217 | # |
| 218 | # @virtual-size: maximum capacity in bytes of the image |
| 219 | # |
| 220 | # @actual-size: #optional actual size on disk in bytes of the image |
| 221 | # |
| 222 | # @dirty-flag: #optional true if image is not cleanly closed |
| 223 | # |
| 224 | # @cluster-size: #optional size of a cluster in bytes |
| 225 | # |
| 226 | # @encrypted: #optional true if the image is encrypted |
| 227 | # |
| 228 | # @backing-filename: #optional name of the backing file |
| 229 | # |
| 230 | # @full-backing-filename: #optional full path of the backing file |
| 231 | # |
| 232 | # @backing-filename-format: #optional the format of the backing file |
| 233 | # |
| 234 | # @snapshots: #optional list of VM snapshots |
| 235 | # |
| 236 | # Since: 1.3 |
| 237 | # |
| 238 | ## |
| 239 | |
| 240 | { 'type': 'ImageInfo', |
| 241 | 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool', |
| 242 | '*actual-size': 'int', 'virtual-size': 'int', |
| 243 | '*cluster-size': 'int', '*encrypted': 'bool', |
| 244 | '*backing-filename': 'str', '*full-backing-filename': 'str', |
| 245 | '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } } |
| 246 | |
| 247 | ## |
Federico Simoncelli | 8599ea4 | 2013-01-28 06:59:47 -0500 | [diff] [blame] | 248 | # @ImageCheck: |
| 249 | # |
| 250 | # Information about a QEMU image file check |
| 251 | # |
| 252 | # @filename: name of the image file checked |
| 253 | # |
| 254 | # @format: format of the image file checked |
| 255 | # |
| 256 | # @check-errors: number of unexpected errors occurred during check |
| 257 | # |
| 258 | # @image-end-offset: #optional offset (in bytes) where the image ends, this |
| 259 | # field is present if the driver for the image format |
| 260 | # supports it |
| 261 | # |
| 262 | # @corruptions: #optional number of corruptions found during the check if any |
| 263 | # |
| 264 | # @leaks: #optional number of leaks found during the check if any |
| 265 | # |
| 266 | # @corruptions-fixed: #optional number of corruptions fixed during the check |
| 267 | # if any |
| 268 | # |
| 269 | # @leaks-fixed: #optional number of leaks fixed during the check if any |
| 270 | # |
| 271 | # @total-clusters: #optional total number of clusters, this field is present |
| 272 | # if the driver for the image format supports it |
| 273 | # |
| 274 | # @allocated-clusters: #optional total number of allocated clusters, this |
| 275 | # field is present if the driver for the image format |
| 276 | # supports it |
| 277 | # |
| 278 | # @fragmented-clusters: #optional total number of fragmented clusters, this |
| 279 | # field is present if the driver for the image format |
| 280 | # supports it |
| 281 | # |
Stefan Hajnoczi | e6439d7 | 2013-02-07 17:15:04 +0100 | [diff] [blame] | 282 | # @compressed-clusters: #optional total number of compressed clusters, this |
| 283 | # field is present if the driver for the image format |
| 284 | # supports it |
| 285 | # |
Federico Simoncelli | 8599ea4 | 2013-01-28 06:59:47 -0500 | [diff] [blame] | 286 | # Since: 1.4 |
| 287 | # |
| 288 | ## |
| 289 | |
| 290 | { 'type': 'ImageCheck', |
| 291 | 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int', |
| 292 | '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int', |
| 293 | '*corruptions-fixed': 'int', '*leaks-fixed': 'int', |
| 294 | '*total-clusters': 'int', '*allocated-clusters': 'int', |
Stefan Hajnoczi | e6439d7 | 2013-02-07 17:15:04 +0100 | [diff] [blame] | 295 | '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } } |
Federico Simoncelli | 8599ea4 | 2013-01-28 06:59:47 -0500 | [diff] [blame] | 296 | |
| 297 | ## |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 298 | # @StatusInfo: |
| 299 | # |
| 300 | # Information about VCPU run state |
| 301 | # |
| 302 | # @running: true if all VCPUs are runnable, false if not runnable |
| 303 | # |
| 304 | # @singlestep: true if VCPUs are in single-step mode |
| 305 | # |
| 306 | # @status: the virtual machine @RunState |
| 307 | # |
| 308 | # Since: 0.14.0 |
| 309 | # |
| 310 | # Notes: @singlestep is enabled through the GDB stub |
| 311 | ## |
| 312 | { 'type': 'StatusInfo', |
| 313 | 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} } |
| 314 | |
| 315 | ## |
| 316 | # @query-status: |
| 317 | # |
| 318 | # Query the run status of all VCPUs |
| 319 | # |
| 320 | # Returns: @StatusInfo reflecting all VCPUs |
| 321 | # |
| 322 | # Since: 0.14.0 |
| 323 | ## |
| 324 | { 'command': 'query-status', 'returns': 'StatusInfo' } |
| 325 | |
Luiz Capitulino | efab767 | 2011-09-13 17:16:25 -0300 | [diff] [blame] | 326 | ## |
| 327 | # @UuidInfo: |
| 328 | # |
| 329 | # Guest UUID information. |
| 330 | # |
| 331 | # @UUID: the UUID of the guest |
| 332 | # |
| 333 | # Since: 0.14.0 |
| 334 | # |
| 335 | # Notes: If no UUID was specified for the guest, a null UUID is returned. |
| 336 | ## |
| 337 | { 'type': 'UuidInfo', 'data': {'UUID': 'str'} } |
| 338 | |
| 339 | ## |
| 340 | # @query-uuid: |
| 341 | # |
| 342 | # Query the guest UUID information. |
| 343 | # |
| 344 | # Returns: The @UuidInfo for the guest |
| 345 | # |
| 346 | # Since 0.14.0 |
| 347 | ## |
| 348 | { 'command': 'query-uuid', 'returns': 'UuidInfo' } |
| 349 | |
Luiz Capitulino | c5a415a | 2011-09-14 16:05:49 -0300 | [diff] [blame] | 350 | ## |
| 351 | # @ChardevInfo: |
| 352 | # |
| 353 | # Information about a character device. |
| 354 | # |
| 355 | # @label: the label of the character device |
| 356 | # |
| 357 | # @filename: the filename of the character device |
| 358 | # |
| 359 | # Notes: @filename is encoded using the QEMU command line character device |
| 360 | # encoding. See the QEMU man page for details. |
| 361 | # |
| 362 | # Since: 0.14.0 |
| 363 | ## |
| 364 | { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} } |
| 365 | |
| 366 | ## |
| 367 | # @query-chardev: |
| 368 | # |
| 369 | # Returns information about current character devices. |
| 370 | # |
| 371 | # Returns: a list of @ChardevInfo |
| 372 | # |
| 373 | # Since: 0.14.0 |
| 374 | ## |
| 375 | { 'command': 'query-chardev', 'returns': ['ChardevInfo'] } |
Luiz Capitulino | aa9b79b | 2011-09-21 14:31:51 -0300 | [diff] [blame] | 376 | |
| 377 | ## |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 378 | # @DataFormat: |
| 379 | # |
| 380 | # An enumeration of data format. |
| 381 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 382 | # @utf8: Data is a UTF-8 string (RFC 3629) |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 383 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 384 | # @base64: Data is Base64 encoded binary (RFC 3548) |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 385 | # |
| 386 | # Since: 1.4 |
| 387 | ## |
| 388 | { 'enum': 'DataFormat' |
| 389 | 'data': [ 'utf8', 'base64' ] } |
| 390 | |
| 391 | ## |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 392 | # @ringbuf-write: |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 393 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 394 | # Write to a ring buffer character device. |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 395 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 396 | # @device: the ring buffer character device name |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 397 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 398 | # @data: data to write |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 399 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 400 | # @format: #optional data encoding (default 'utf8'). |
| 401 | # - base64: data must be base64 encoded text. Its binary |
| 402 | # decoding gets written. |
| 403 | # Bug: invalid base64 is currently not rejected. |
| 404 | # Whitespace *is* invalid. |
| 405 | # - utf8: data's UTF-8 encoding is written |
| 406 | # - data itself is always Unicode regardless of format, like |
| 407 | # any other string. |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 408 | # |
| 409 | # Returns: Nothing on success |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 410 | # |
| 411 | # Since: 1.4 |
| 412 | ## |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 413 | { 'command': 'ringbuf-write', |
Markus Armbruster | 82e59a6 | 2013-02-06 21:27:14 +0100 | [diff] [blame] | 414 | 'data': {'device': 'str', 'data': 'str', |
Lei Li | 1f590cf | 2013-01-25 00:03:20 +0800 | [diff] [blame] | 415 | '*format': 'DataFormat'} } |
| 416 | |
| 417 | ## |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 418 | # @ringbuf-read: |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 419 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 420 | # Read from a ring buffer character device. |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 421 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 422 | # @device: the ring buffer character device name |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 423 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 424 | # @size: how many bytes to read at most |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 425 | # |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 426 | # @format: #optional data encoding (default 'utf8'). |
| 427 | # - base64: the data read is returned in base64 encoding. |
| 428 | # - utf8: the data read is interpreted as UTF-8. |
| 429 | # Bug: can screw up when the buffer contains invalid UTF-8 |
| 430 | # sequences, NUL characters, after the ring buffer lost |
| 431 | # data, and when reading stops because the size limit is |
| 432 | # reached. |
| 433 | # - The return value is always Unicode regardless of format, |
| 434 | # like any other string. |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 435 | # |
Markus Armbruster | 3ab651f | 2013-02-06 21:27:15 +0100 | [diff] [blame] | 436 | # Returns: data read from the device |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 437 | # |
| 438 | # Since: 1.4 |
| 439 | ## |
Markus Armbruster | 3949e59 | 2013-02-06 21:27:24 +0100 | [diff] [blame] | 440 | { 'command': 'ringbuf-read', |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 441 | 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'}, |
Markus Armbruster | 3ab651f | 2013-02-06 21:27:15 +0100 | [diff] [blame] | 442 | 'returns': 'str' } |
Lei Li | 49b6d72 | 2013-01-25 00:03:21 +0800 | [diff] [blame] | 443 | |
| 444 | ## |
Luiz Capitulino | aa9b79b | 2011-09-21 14:31:51 -0300 | [diff] [blame] | 445 | # @CommandInfo: |
| 446 | # |
| 447 | # Information about a QMP command |
| 448 | # |
| 449 | # @name: The command name |
| 450 | # |
| 451 | # Since: 0.14.0 |
| 452 | ## |
| 453 | { 'type': 'CommandInfo', 'data': {'name': 'str'} } |
| 454 | |
| 455 | ## |
| 456 | # @query-commands: |
| 457 | # |
| 458 | # Return a list of supported QMP commands by this server |
| 459 | # |
| 460 | # Returns: A list of @CommandInfo for all supported commands |
| 461 | # |
| 462 | # Since: 0.14.0 |
| 463 | ## |
| 464 | { 'command': 'query-commands', 'returns': ['CommandInfo'] } |
| 465 | |
Luiz Capitulino | 7a7f325 | 2011-09-15 14:20:28 -0300 | [diff] [blame] | 466 | ## |
Daniel P. Berrange | 4860853 | 2012-05-21 17:59:51 +0100 | [diff] [blame] | 467 | # @EventInfo: |
| 468 | # |
| 469 | # Information about a QMP event |
| 470 | # |
| 471 | # @name: The event name |
| 472 | # |
| 473 | # Since: 1.2.0 |
| 474 | ## |
| 475 | { 'type': 'EventInfo', 'data': {'name': 'str'} } |
| 476 | |
| 477 | ## |
| 478 | # @query-events: |
| 479 | # |
| 480 | # Return a list of supported QMP events by this server |
| 481 | # |
| 482 | # Returns: A list of @EventInfo for all supported events |
| 483 | # |
| 484 | # Since: 1.2.0 |
| 485 | ## |
| 486 | { 'command': 'query-events', 'returns': ['EventInfo'] } |
| 487 | |
| 488 | ## |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 489 | # @MigrationStats |
| 490 | # |
| 491 | # Detailed migration status. |
| 492 | # |
| 493 | # @transferred: amount of bytes already transferred to the target VM |
| 494 | # |
| 495 | # @remaining: amount of bytes remaining to be transferred to the target VM |
| 496 | # |
| 497 | # @total: total amount of bytes involved in the migration process |
| 498 | # |
Orit Wasserman | 004d4c1 | 2012-08-06 21:42:56 +0300 | [diff] [blame] | 499 | # @duplicate: number of duplicate pages (since 1.2) |
| 500 | # |
| 501 | # @normal : number of normal pages (since 1.2) |
| 502 | # |
Juan Quintela | 8d01719 | 2012-08-13 12:31:25 +0200 | [diff] [blame] | 503 | # @normal-bytes: number of normal bytes sent (since 1.2) |
| 504 | # |
| 505 | # @dirty-pages-rate: number of pages dirtied by second by the |
| 506 | # guest (since 1.3) |
Orit Wasserman | 004d4c1 | 2012-08-06 21:42:56 +0300 | [diff] [blame] | 507 | # |
| 508 | # Since: 0.14.0 |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 509 | ## |
| 510 | { 'type': 'MigrationStats', |
Juan Quintela | d5f8a57 | 2012-05-21 22:01:07 +0200 | [diff] [blame] | 511 | 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , |
Juan Quintela | 8d01719 | 2012-08-13 12:31:25 +0200 | [diff] [blame] | 512 | 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int', |
| 513 | 'dirty-pages-rate' : 'int' } } |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 514 | |
| 515 | ## |
Orit Wasserman | f36d55a | 2012-08-06 21:42:57 +0300 | [diff] [blame] | 516 | # @XBZRLECacheStats |
| 517 | # |
| 518 | # Detailed XBZRLE migration cache statistics |
| 519 | # |
| 520 | # @cache-size: XBZRLE cache size |
| 521 | # |
| 522 | # @bytes: amount of bytes already transferred to the target VM |
| 523 | # |
| 524 | # @pages: amount of pages transferred to the target VM |
| 525 | # |
| 526 | # @cache-miss: number of cache miss |
| 527 | # |
| 528 | # @overflow: number of overflows |
| 529 | # |
| 530 | # Since: 1.2 |
| 531 | ## |
| 532 | { 'type': 'XBZRLECacheStats', |
| 533 | 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int', |
| 534 | 'cache-miss': 'int', 'overflow': 'int' } } |
| 535 | |
| 536 | ## |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 537 | # @MigrationInfo |
| 538 | # |
| 539 | # Information about current migration process. |
| 540 | # |
| 541 | # @status: #optional string describing the current migration status. |
| 542 | # As of 0.14.0 this can be 'active', 'completed', 'failed' or |
| 543 | # 'cancelled'. If this field is not returned, no migration process |
| 544 | # has been initiated |
| 545 | # |
Juan Quintela | d5f8a57 | 2012-05-21 22:01:07 +0200 | [diff] [blame] | 546 | # @ram: #optional @MigrationStats containing detailed migration |
| 547 | # status, only returned if status is 'active' or |
| 548 | # 'completed'. 'comppleted' (since 1.2) |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 549 | # |
| 550 | # @disk: #optional @MigrationStats containing detailed disk migration |
| 551 | # status, only returned if status is 'active' and it is a block |
| 552 | # migration |
| 553 | # |
Orit Wasserman | f36d55a | 2012-08-06 21:42:57 +0300 | [diff] [blame] | 554 | # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE |
| 555 | # migration statistics, only returned if XBZRLE feature is on and |
| 556 | # status is 'active' or 'completed' (since 1.2) |
| 557 | # |
Juan Quintela | 7aa939a | 2012-08-18 13:17:10 +0200 | [diff] [blame] | 558 | # @total-time: #optional total amount of milliseconds since migration started. |
| 559 | # If migration has ended, it returns the total migration |
| 560 | # time. (since 1.2) |
| 561 | # |
Juan Quintela | 9c5a9fc | 2012-08-13 09:35:16 +0200 | [diff] [blame] | 562 | # @downtime: #optional only present when migration finishes correctly |
| 563 | # total downtime in milliseconds for the guest. |
| 564 | # (since 1.3) |
| 565 | # |
Juan Quintela | 2c52ddf | 2012-08-13 09:53:12 +0200 | [diff] [blame] | 566 | # @expected-downtime: #optional only present while migration is active |
| 567 | # expected downtime in milliseconds for the guest in last walk |
| 568 | # of the dirty bitmap. (since 1.3) |
| 569 | # |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 570 | # Since: 0.14.0 |
| 571 | ## |
| 572 | { 'type': 'MigrationInfo', |
| 573 | 'data': {'*status': 'str', '*ram': 'MigrationStats', |
Orit Wasserman | f36d55a | 2012-08-06 21:42:57 +0300 | [diff] [blame] | 574 | '*disk': 'MigrationStats', |
Juan Quintela | 7aa939a | 2012-08-18 13:17:10 +0200 | [diff] [blame] | 575 | '*xbzrle-cache': 'XBZRLECacheStats', |
Juan Quintela | 9c5a9fc | 2012-08-13 09:35:16 +0200 | [diff] [blame] | 576 | '*total-time': 'int', |
Juan Quintela | 2c52ddf | 2012-08-13 09:53:12 +0200 | [diff] [blame] | 577 | '*expected-downtime': 'int', |
Juan Quintela | 9c5a9fc | 2012-08-13 09:35:16 +0200 | [diff] [blame] | 578 | '*downtime': 'int'} } |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 579 | |
| 580 | ## |
| 581 | # @query-migrate |
| 582 | # |
| 583 | # Returns information about current migration process. |
| 584 | # |
| 585 | # Returns: @MigrationInfo |
| 586 | # |
| 587 | # Since: 0.14.0 |
| 588 | ## |
| 589 | { 'command': 'query-migrate', 'returns': 'MigrationInfo' } |
| 590 | |
| 591 | ## |
Orit Wasserman | bbf6da3 | 2012-08-06 21:42:47 +0300 | [diff] [blame] | 592 | # @MigrationCapability |
| 593 | # |
| 594 | # Migration capabilities enumeration |
| 595 | # |
| 596 | # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding). |
| 597 | # This feature allows us to minimize migration traffic for certain work |
| 598 | # loads, by sending compressed difference of the pages |
| 599 | # |
| 600 | # Since: 1.2 |
| 601 | ## |
| 602 | { 'enum': 'MigrationCapability', |
| 603 | 'data': ['xbzrle'] } |
| 604 | |
| 605 | ## |
| 606 | # @MigrationCapabilityStatus |
| 607 | # |
| 608 | # Migration capability information |
| 609 | # |
| 610 | # @capability: capability enum |
| 611 | # |
| 612 | # @state: capability state bool |
| 613 | # |
| 614 | # Since: 1.2 |
| 615 | ## |
| 616 | { 'type': 'MigrationCapabilityStatus', |
| 617 | 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } } |
| 618 | |
| 619 | ## |
Orit Wasserman | 0045843 | 2012-08-06 21:42:48 +0300 | [diff] [blame] | 620 | # @migrate-set-capabilities |
| 621 | # |
| 622 | # Enable/Disable the following migration capabilities (like xbzrle) |
| 623 | # |
| 624 | # @capabilities: json array of capability modifications to make |
| 625 | # |
| 626 | # Since: 1.2 |
| 627 | ## |
| 628 | { 'command': 'migrate-set-capabilities', |
| 629 | 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } |
| 630 | |
| 631 | ## |
Orit Wasserman | bbf6da3 | 2012-08-06 21:42:47 +0300 | [diff] [blame] | 632 | # @query-migrate-capabilities |
| 633 | # |
| 634 | # Returns information about the current migration capabilities status |
| 635 | # |
| 636 | # Returns: @MigrationCapabilitiesStatus |
| 637 | # |
| 638 | # Since: 1.2 |
| 639 | ## |
| 640 | { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} |
| 641 | |
| 642 | ## |
Luiz Capitulino | e235cec | 2011-09-21 15:29:55 -0300 | [diff] [blame] | 643 | # @MouseInfo: |
| 644 | # |
| 645 | # Information about a mouse device. |
| 646 | # |
| 647 | # @name: the name of the mouse device |
| 648 | # |
| 649 | # @index: the index of the mouse device |
| 650 | # |
| 651 | # @current: true if this device is currently receiving mouse events |
| 652 | # |
| 653 | # @absolute: true if this device supports absolute coordinates as input |
| 654 | # |
| 655 | # Since: 0.14.0 |
| 656 | ## |
| 657 | { 'type': 'MouseInfo', |
| 658 | 'data': {'name': 'str', 'index': 'int', 'current': 'bool', |
| 659 | 'absolute': 'bool'} } |
| 660 | |
| 661 | ## |
| 662 | # @query-mice: |
| 663 | # |
| 664 | # Returns information about each active mouse device |
| 665 | # |
| 666 | # Returns: a list of @MouseInfo for each device |
| 667 | # |
| 668 | # Since: 0.14.0 |
| 669 | ## |
| 670 | { 'command': 'query-mice', 'returns': ['MouseInfo'] } |
| 671 | |
| 672 | ## |
Luiz Capitulino | de0b36b | 2011-09-21 16:38:35 -0300 | [diff] [blame] | 673 | # @CpuInfo: |
| 674 | # |
| 675 | # Information about a virtual CPU |
| 676 | # |
| 677 | # @CPU: the index of the virtual CPU |
| 678 | # |
| 679 | # @current: this only exists for backwards compatible and should be ignored |
Laszlo Ersek | b80e560 | 2012-07-17 16:17:10 +0200 | [diff] [blame] | 680 | # |
Luiz Capitulino | de0b36b | 2011-09-21 16:38:35 -0300 | [diff] [blame] | 681 | # @halted: true if the virtual CPU is in the halt state. Halt usually refers |
| 682 | # to a processor specific low power mode. |
| 683 | # |
| 684 | # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction |
| 685 | # pointer. |
| 686 | # If the target is Sparc, this is the PC component of the |
| 687 | # instruction pointer. |
| 688 | # |
| 689 | # @nip: #optional If the target is PPC, the instruction pointer |
| 690 | # |
| 691 | # @npc: #optional If the target is Sparc, the NPC component of the instruction |
| 692 | # pointer |
| 693 | # |
| 694 | # @PC: #optional If the target is MIPS, the instruction pointer |
| 695 | # |
| 696 | # @thread_id: ID of the underlying host thread |
| 697 | # |
| 698 | # Since: 0.14.0 |
| 699 | # |
| 700 | # Notes: @halted is a transient state that changes frequently. By the time the |
| 701 | # data is sent to the client, the guest may no longer be halted. |
| 702 | ## |
| 703 | { 'type': 'CpuInfo', |
| 704 | 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int', |
| 705 | '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} } |
| 706 | |
| 707 | ## |
| 708 | # @query-cpus: |
| 709 | # |
| 710 | # Returns a list of information about each virtual CPU. |
| 711 | # |
| 712 | # Returns: a list of @CpuInfo for each virtual CPU |
| 713 | # |
| 714 | # Since: 0.14.0 |
| 715 | ## |
| 716 | { 'command': 'query-cpus', 'returns': ['CpuInfo'] } |
| 717 | |
| 718 | ## |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 719 | # @BlockDeviceInfo: |
| 720 | # |
| 721 | # Information about the backing device for a block device. |
| 722 | # |
| 723 | # @file: the filename of the backing device |
| 724 | # |
| 725 | # @ro: true if the backing device was open read-only |
| 726 | # |
| 727 | # @drv: the name of the block format used to open the backing device. As of |
| 728 | # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg', |
| 729 | # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', |
| 730 | # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow', |
| 731 | # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat' |
| 732 | # |
| 733 | # @backing_file: #optional the name of the backing file (for copy-on-write) |
| 734 | # |
Benoît Canet | 2e3e331 | 2012-08-02 10:22:48 +0200 | [diff] [blame] | 735 | # @backing_file_depth: number of files in the backing file chain (since: 1.2) |
| 736 | # |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 737 | # @encrypted: true if the backing device is encrypted |
| 738 | # |
Luiz Capitulino | c75a1a8 | 2012-07-26 20:28:44 -0300 | [diff] [blame] | 739 | # @encryption_key_missing: true if the backing device is encrypted but an |
| 740 | # valid encryption key is missing |
| 741 | # |
Zhi Yong Wu | 727f005 | 2011-11-08 13:00:31 +0800 | [diff] [blame] | 742 | # @bps: total throughput limit in bytes per second is specified |
| 743 | # |
| 744 | # @bps_rd: read throughput limit in bytes per second is specified |
| 745 | # |
| 746 | # @bps_wr: write throughput limit in bytes per second is specified |
| 747 | # |
| 748 | # @iops: total I/O operations per second is specified |
| 749 | # |
| 750 | # @iops_rd: read I/O operations per second is specified |
| 751 | # |
| 752 | # @iops_wr: write I/O operations per second is specified |
| 753 | # |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 754 | # Since: 0.14.0 |
| 755 | # |
| 756 | # Notes: This interface is only found in @BlockInfo. |
| 757 | ## |
| 758 | { 'type': 'BlockDeviceInfo', |
| 759 | 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str', |
Benoît Canet | 2e3e331 | 2012-08-02 10:22:48 +0200 | [diff] [blame] | 760 | '*backing_file': 'str', 'backing_file_depth': 'int', |
Luiz Capitulino | c75a1a8 | 2012-07-26 20:28:44 -0300 | [diff] [blame] | 761 | 'encrypted': 'bool', 'encryption_key_missing': 'bool', |
| 762 | 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', |
| 763 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} } |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 764 | |
| 765 | ## |
| 766 | # @BlockDeviceIoStatus: |
| 767 | # |
| 768 | # An enumeration of block device I/O status. |
| 769 | # |
| 770 | # @ok: The last I/O operation has succeeded |
| 771 | # |
| 772 | # @failed: The last I/O operation has failed |
| 773 | # |
| 774 | # @nospace: The last I/O operation has failed due to a no-space condition |
| 775 | # |
| 776 | # Since: 1.0 |
| 777 | ## |
| 778 | { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } |
| 779 | |
| 780 | ## |
Paolo Bonzini | b9a9b3a | 2012-08-01 15:23:44 +0200 | [diff] [blame] | 781 | # @BlockDirtyInfo: |
| 782 | # |
| 783 | # Block dirty bitmap information. |
| 784 | # |
| 785 | # @count: number of dirty bytes according to the dirty bitmap |
| 786 | # |
Paolo Bonzini | 50717e9 | 2013-01-21 17:09:45 +0100 | [diff] [blame] | 787 | # @granularity: granularity of the dirty bitmap in bytes (since 1.4) |
| 788 | # |
Paolo Bonzini | b9a9b3a | 2012-08-01 15:23:44 +0200 | [diff] [blame] | 789 | # Since: 1.3 |
| 790 | ## |
| 791 | { 'type': 'BlockDirtyInfo', |
Paolo Bonzini | 50717e9 | 2013-01-21 17:09:45 +0100 | [diff] [blame] | 792 | 'data': {'count': 'int', 'granularity': 'int'} } |
Paolo Bonzini | b9a9b3a | 2012-08-01 15:23:44 +0200 | [diff] [blame] | 793 | |
| 794 | ## |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 795 | # @BlockInfo: |
| 796 | # |
| 797 | # Block device information. This structure describes a virtual device and |
| 798 | # the backing device associated with it. |
| 799 | # |
| 800 | # @device: The device name associated with the virtual device. |
| 801 | # |
| 802 | # @type: This field is returned only for compatibility reasons, it should |
| 803 | # not be used (always returns 'unknown') |
| 804 | # |
| 805 | # @removable: True if the device supports removable media. |
| 806 | # |
| 807 | # @locked: True if the guest has locked this device from having its media |
| 808 | # removed |
| 809 | # |
| 810 | # @tray_open: #optional True if the device has a tray and it is open |
| 811 | # (only present if removable is true) |
| 812 | # |
Paolo Bonzini | b9a9b3a | 2012-08-01 15:23:44 +0200 | [diff] [blame] | 813 | # @dirty: #optional dirty bitmap information (only present if the dirty |
| 814 | # bitmap is enabled) |
| 815 | # |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 816 | # @io-status: #optional @BlockDeviceIoStatus. Only present if the device |
| 817 | # supports it and the VM is configured to stop on errors |
| 818 | # |
| 819 | # @inserted: #optional @BlockDeviceInfo describing the device if media is |
| 820 | # present |
| 821 | # |
| 822 | # Since: 0.14.0 |
| 823 | ## |
| 824 | { 'type': 'BlockInfo', |
| 825 | 'data': {'device': 'str', 'type': 'str', 'removable': 'bool', |
| 826 | 'locked': 'bool', '*inserted': 'BlockDeviceInfo', |
Paolo Bonzini | b9a9b3a | 2012-08-01 15:23:44 +0200 | [diff] [blame] | 827 | '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus', |
| 828 | '*dirty': 'BlockDirtyInfo' } } |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 829 | |
| 830 | ## |
| 831 | # @query-block: |
| 832 | # |
| 833 | # Get a list of BlockInfo for all virtual block devices. |
| 834 | # |
| 835 | # Returns: a list of @BlockInfo describing each virtual block device |
| 836 | # |
| 837 | # Since: 0.14.0 |
| 838 | ## |
| 839 | { 'command': 'query-block', 'returns': ['BlockInfo'] } |
| 840 | |
| 841 | ## |
Luiz Capitulino | f11f57e | 2011-09-22 15:56:36 -0300 | [diff] [blame] | 842 | # @BlockDeviceStats: |
| 843 | # |
| 844 | # Statistics of a virtual block device or a block backing device. |
| 845 | # |
| 846 | # @rd_bytes: The number of bytes read by the device. |
| 847 | # |
| 848 | # @wr_bytes: The number of bytes written by the device. |
| 849 | # |
| 850 | # @rd_operations: The number of read operations performed by the device. |
| 851 | # |
| 852 | # @wr_operations: The number of write operations performed by the device. |
| 853 | # |
| 854 | # @flush_operations: The number of cache flush operations performed by the |
| 855 | # device (since 0.15.0) |
| 856 | # |
| 857 | # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds |
| 858 | # (since 0.15.0). |
| 859 | # |
| 860 | # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0). |
| 861 | # |
| 862 | # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0). |
| 863 | # |
| 864 | # @wr_highest_offset: The offset after the greatest byte written to the |
| 865 | # device. The intended use of this information is for |
| 866 | # growable sparse files (like qcow2) that are used on top |
| 867 | # of a physical device. |
| 868 | # |
| 869 | # Since: 0.14.0 |
| 870 | ## |
| 871 | { 'type': 'BlockDeviceStats', |
| 872 | 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int', |
| 873 | 'wr_operations': 'int', 'flush_operations': 'int', |
| 874 | 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int', |
| 875 | 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } } |
| 876 | |
| 877 | ## |
| 878 | # @BlockStats: |
| 879 | # |
| 880 | # Statistics of a virtual block device or a block backing device. |
| 881 | # |
| 882 | # @device: #optional If the stats are for a virtual block device, the name |
| 883 | # corresponding to the virtual block device. |
| 884 | # |
| 885 | # @stats: A @BlockDeviceStats for the device. |
| 886 | # |
| 887 | # @parent: #optional This may point to the backing block device if this is a |
| 888 | # a virtual block device. If it's a backing block, this will point |
| 889 | # to the backing file is one is present. |
| 890 | # |
| 891 | # Since: 0.14.0 |
| 892 | ## |
| 893 | { 'type': 'BlockStats', |
| 894 | 'data': {'*device': 'str', 'stats': 'BlockDeviceStats', |
| 895 | '*parent': 'BlockStats'} } |
| 896 | |
| 897 | ## |
| 898 | # @query-blockstats: |
| 899 | # |
| 900 | # Query the @BlockStats for all virtual block devices. |
| 901 | # |
| 902 | # Returns: A list of @BlockStats for each virtual block devices. |
| 903 | # |
| 904 | # Since: 0.14.0 |
| 905 | ## |
| 906 | { 'command': 'query-blockstats', 'returns': ['BlockStats'] } |
| 907 | |
| 908 | ## |
Luiz Capitulino | 2b54aa8 | 2011-10-17 16:41:22 -0200 | [diff] [blame] | 909 | # @VncClientInfo: |
| 910 | # |
| 911 | # Information about a connected VNC client. |
| 912 | # |
| 913 | # @host: The host name of the client. QEMU tries to resolve this to a DNS name |
| 914 | # when possible. |
| 915 | # |
| 916 | # @family: 'ipv6' if the client is connected via IPv6 and TCP |
| 917 | # 'ipv4' if the client is connected via IPv4 and TCP |
| 918 | # 'unix' if the client is connected via a unix domain socket |
| 919 | # 'unknown' otherwise |
| 920 | # |
| 921 | # @service: The service name of the client's port. This may depends on the |
| 922 | # host system's service database so symbolic names should not be |
| 923 | # relied on. |
| 924 | # |
| 925 | # @x509_dname: #optional If x509 authentication is in use, the Distinguished |
| 926 | # Name of the client. |
| 927 | # |
| 928 | # @sasl_username: #optional If SASL authentication is in use, the SASL username |
| 929 | # used for authentication. |
| 930 | # |
| 931 | # Since: 0.14.0 |
| 932 | ## |
| 933 | { 'type': 'VncClientInfo', |
| 934 | 'data': {'host': 'str', 'family': 'str', 'service': 'str', |
| 935 | '*x509_dname': 'str', '*sasl_username': 'str'} } |
| 936 | |
| 937 | ## |
| 938 | # @VncInfo: |
| 939 | # |
| 940 | # Information about the VNC session. |
| 941 | # |
| 942 | # @enabled: true if the VNC server is enabled, false otherwise |
| 943 | # |
| 944 | # @host: #optional The hostname the VNC server is bound to. This depends on |
| 945 | # the name resolution on the host and may be an IP address. |
| 946 | # |
| 947 | # @family: #optional 'ipv6' if the host is listening for IPv6 connections |
| 948 | # 'ipv4' if the host is listening for IPv4 connections |
| 949 | # 'unix' if the host is listening on a unix domain socket |
| 950 | # 'unknown' otherwise |
| 951 | # |
| 952 | # @service: #optional The service name of the server's port. This may depends |
| 953 | # on the host system's service database so symbolic names should not |
| 954 | # be relied on. |
| 955 | # |
| 956 | # @auth: #optional the current authentication type used by the server |
| 957 | # 'none' if no authentication is being used |
| 958 | # 'vnc' if VNC authentication is being used |
| 959 | # 'vencrypt+plain' if VEncrypt is used with plain text authentication |
| 960 | # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication |
| 961 | # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication |
| 962 | # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth |
| 963 | # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth |
| 964 | # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth |
| 965 | # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth |
| 966 | # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth |
| 967 | # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth |
| 968 | # |
| 969 | # @clients: a list of @VncClientInfo of all currently connected clients |
| 970 | # |
| 971 | # Since: 0.14.0 |
| 972 | ## |
| 973 | { 'type': 'VncInfo', |
| 974 | 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str', |
| 975 | '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} } |
| 976 | |
| 977 | ## |
| 978 | # @query-vnc: |
| 979 | # |
| 980 | # Returns information about the current VNC server |
| 981 | # |
| 982 | # Returns: @VncInfo |
Luiz Capitulino | 2b54aa8 | 2011-10-17 16:41:22 -0200 | [diff] [blame] | 983 | # |
| 984 | # Since: 0.14.0 |
| 985 | ## |
| 986 | { 'command': 'query-vnc', 'returns': 'VncInfo' } |
| 987 | |
| 988 | ## |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 989 | # @SpiceChannel |
| 990 | # |
| 991 | # Information about a SPICE client channel. |
| 992 | # |
| 993 | # @host: The host name of the client. QEMU tries to resolve this to a DNS name |
| 994 | # when possible. |
| 995 | # |
| 996 | # @family: 'ipv6' if the client is connected via IPv6 and TCP |
| 997 | # 'ipv4' if the client is connected via IPv4 and TCP |
| 998 | # 'unix' if the client is connected via a unix domain socket |
| 999 | # 'unknown' otherwise |
| 1000 | # |
| 1001 | # @port: The client's port number. |
| 1002 | # |
| 1003 | # @connection-id: SPICE connection id number. All channels with the same id |
| 1004 | # belong to the same SPICE session. |
| 1005 | # |
Alon Levy | 419e1bd | 2012-03-05 15:13:27 +0200 | [diff] [blame] | 1006 | # @connection-type: SPICE channel type number. "1" is the main control |
| 1007 | # channel, filter for this one if you want to track spice |
| 1008 | # sessions only |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1009 | # |
Alon Levy | 419e1bd | 2012-03-05 15:13:27 +0200 | [diff] [blame] | 1010 | # @channel-id: SPICE channel ID number. Usually "0", might be different when |
| 1011 | # multiple channels of the same type exist, such as multiple |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1012 | # display channels in a multihead setup |
| 1013 | # |
| 1014 | # @tls: true if the channel is encrypted, false otherwise. |
| 1015 | # |
| 1016 | # Since: 0.14.0 |
| 1017 | ## |
| 1018 | { 'type': 'SpiceChannel', |
| 1019 | 'data': {'host': 'str', 'family': 'str', 'port': 'str', |
| 1020 | 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', |
| 1021 | 'tls': 'bool'} } |
| 1022 | |
| 1023 | ## |
Alon Levy | 4efee02 | 2012-03-29 23:23:14 +0200 | [diff] [blame] | 1024 | # @SpiceQueryMouseMode |
| 1025 | # |
Lei Li | 6932a69 | 2012-08-23 13:14:25 +0800 | [diff] [blame] | 1026 | # An enumeration of Spice mouse states. |
Alon Levy | 4efee02 | 2012-03-29 23:23:14 +0200 | [diff] [blame] | 1027 | # |
| 1028 | # @client: Mouse cursor position is determined by the client. |
| 1029 | # |
| 1030 | # @server: Mouse cursor position is determined by the server. |
| 1031 | # |
| 1032 | # @unknown: No information is available about mouse mode used by |
| 1033 | # the spice server. |
| 1034 | # |
| 1035 | # Note: spice/enums.h has a SpiceMouseMode already, hence the name. |
| 1036 | # |
| 1037 | # Since: 1.1 |
| 1038 | ## |
| 1039 | { 'enum': 'SpiceQueryMouseMode', |
| 1040 | 'data': [ 'client', 'server', 'unknown' ] } |
| 1041 | |
| 1042 | ## |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1043 | # @SpiceInfo |
| 1044 | # |
| 1045 | # Information about the SPICE session. |
Laszlo Ersek | b80e560 | 2012-07-17 16:17:10 +0200 | [diff] [blame] | 1046 | # |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1047 | # @enabled: true if the SPICE server is enabled, false otherwise |
| 1048 | # |
Yonit Halperin | 61c4efe | 2012-08-21 11:51:58 +0300 | [diff] [blame] | 1049 | # @migrated: true if the last guest migration completed and spice |
| 1050 | # migration had completed as well. false otherwise. |
| 1051 | # |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1052 | # @host: #optional The hostname the SPICE server is bound to. This depends on |
| 1053 | # the name resolution on the host and may be an IP address. |
| 1054 | # |
| 1055 | # @port: #optional The SPICE server's port number. |
| 1056 | # |
| 1057 | # @compiled-version: #optional SPICE server version. |
| 1058 | # |
| 1059 | # @tls-port: #optional The SPICE server's TLS port number. |
| 1060 | # |
| 1061 | # @auth: #optional the current authentication type used by the server |
Alon Levy | 419e1bd | 2012-03-05 15:13:27 +0200 | [diff] [blame] | 1062 | # 'none' if no authentication is being used |
| 1063 | # 'spice' uses SASL or direct TLS authentication, depending on command |
| 1064 | # line options |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1065 | # |
Alon Levy | 4efee02 | 2012-03-29 23:23:14 +0200 | [diff] [blame] | 1066 | # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can |
| 1067 | # be determined by the client or the server, or unknown if spice |
| 1068 | # server doesn't provide this information. |
| 1069 | # |
| 1070 | # Since: 1.1 |
| 1071 | # |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1072 | # @channels: a list of @SpiceChannel for each active spice channel |
| 1073 | # |
| 1074 | # Since: 0.14.0 |
| 1075 | ## |
| 1076 | { 'type': 'SpiceInfo', |
Yonit Halperin | 61c4efe | 2012-08-21 11:51:58 +0300 | [diff] [blame] | 1077 | 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int', |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1078 | '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str', |
Alon Levy | 4efee02 | 2012-03-29 23:23:14 +0200 | [diff] [blame] | 1079 | 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} } |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 1080 | |
| 1081 | ## |
| 1082 | # @query-spice |
| 1083 | # |
| 1084 | # Returns information about the current SPICE server |
| 1085 | # |
| 1086 | # Returns: @SpiceInfo |
| 1087 | # |
| 1088 | # Since: 0.14.0 |
| 1089 | ## |
| 1090 | { 'command': 'query-spice', 'returns': 'SpiceInfo' } |
| 1091 | |
| 1092 | ## |
Luiz Capitulino | 96637bc | 2011-10-21 11:41:37 -0200 | [diff] [blame] | 1093 | # @BalloonInfo: |
| 1094 | # |
| 1095 | # Information about the guest balloon device. |
| 1096 | # |
| 1097 | # @actual: the number of bytes the balloon currently contains |
| 1098 | # |
Luiz Capitulino | 96637bc | 2011-10-21 11:41:37 -0200 | [diff] [blame] | 1099 | # Since: 0.14.0 |
| 1100 | # |
Luiz Capitulino | 96637bc | 2011-10-21 11:41:37 -0200 | [diff] [blame] | 1101 | ## |
Luiz Capitulino | 01ceb97 | 2012-12-03 15:56:41 -0200 | [diff] [blame] | 1102 | { 'type': 'BalloonInfo', 'data': {'actual': 'int' } } |
Luiz Capitulino | 96637bc | 2011-10-21 11:41:37 -0200 | [diff] [blame] | 1103 | |
| 1104 | ## |
| 1105 | # @query-balloon: |
| 1106 | # |
| 1107 | # Return information about the balloon device. |
| 1108 | # |
| 1109 | # Returns: @BalloonInfo on success |
| 1110 | # If the balloon driver is enabled but not functional because the KVM |
| 1111 | # kernel module cannot support it, KvmMissingCap |
| 1112 | # If no balloon device is present, DeviceNotActive |
| 1113 | # |
| 1114 | # Since: 0.14.0 |
| 1115 | ## |
| 1116 | { 'command': 'query-balloon', 'returns': 'BalloonInfo' } |
| 1117 | |
| 1118 | ## |
Luiz Capitulino | 7962747 | 2011-10-21 14:15:33 -0200 | [diff] [blame] | 1119 | # @PciMemoryRange: |
| 1120 | # |
| 1121 | # A PCI device memory region |
| 1122 | # |
| 1123 | # @base: the starting address (guest physical) |
| 1124 | # |
| 1125 | # @limit: the ending address (guest physical) |
| 1126 | # |
| 1127 | # Since: 0.14.0 |
| 1128 | ## |
| 1129 | { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} } |
| 1130 | |
| 1131 | ## |
| 1132 | # @PciMemoryRegion |
| 1133 | # |
| 1134 | # Information about a PCI device I/O region. |
| 1135 | # |
| 1136 | # @bar: the index of the Base Address Register for this region |
| 1137 | # |
| 1138 | # @type: 'io' if the region is a PIO region |
| 1139 | # 'memory' if the region is a MMIO region |
| 1140 | # |
| 1141 | # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable |
| 1142 | # |
| 1143 | # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit |
| 1144 | # |
| 1145 | # Since: 0.14.0 |
| 1146 | ## |
| 1147 | { 'type': 'PciMemoryRegion', |
| 1148 | 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int', |
| 1149 | '*prefetch': 'bool', '*mem_type_64': 'bool' } } |
| 1150 | |
| 1151 | ## |
| 1152 | # @PciBridgeInfo: |
| 1153 | # |
| 1154 | # Information about a PCI Bridge device |
| 1155 | # |
| 1156 | # @bus.number: primary bus interface number. This should be the number of the |
| 1157 | # bus the device resides on. |
| 1158 | # |
| 1159 | # @bus.secondary: secondary bus interface number. This is the number of the |
| 1160 | # main bus for the bridge |
| 1161 | # |
| 1162 | # @bus.subordinate: This is the highest number bus that resides below the |
| 1163 | # bridge. |
| 1164 | # |
| 1165 | # @bus.io_range: The PIO range for all devices on this bridge |
| 1166 | # |
| 1167 | # @bus.memory_range: The MMIO range for all devices on this bridge |
| 1168 | # |
| 1169 | # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on |
| 1170 | # this bridge |
| 1171 | # |
| 1172 | # @devices: a list of @PciDeviceInfo for each device on this bridge |
| 1173 | # |
| 1174 | # Since: 0.14.0 |
| 1175 | ## |
| 1176 | { 'type': 'PciBridgeInfo', |
| 1177 | 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int', |
| 1178 | 'io_range': 'PciMemoryRange', |
| 1179 | 'memory_range': 'PciMemoryRange', |
| 1180 | 'prefetchable_range': 'PciMemoryRange' }, |
| 1181 | '*devices': ['PciDeviceInfo']} } |
| 1182 | |
| 1183 | ## |
| 1184 | # @PciDeviceInfo: |
| 1185 | # |
| 1186 | # Information about a PCI device |
| 1187 | # |
| 1188 | # @bus: the bus number of the device |
| 1189 | # |
| 1190 | # @slot: the slot the device is located in |
| 1191 | # |
| 1192 | # @function: the function of the slot used by the device |
| 1193 | # |
| 1194 | # @class_info.desc: #optional a string description of the device's class |
| 1195 | # |
| 1196 | # @class_info.class: the class code of the device |
| 1197 | # |
| 1198 | # @id.device: the PCI device id |
| 1199 | # |
| 1200 | # @id.vendor: the PCI vendor id |
| 1201 | # |
| 1202 | # @irq: #optional if an IRQ is assigned to the device, the IRQ number |
| 1203 | # |
| 1204 | # @qdev_id: the device name of the PCI device |
| 1205 | # |
| 1206 | # @pci_bridge: if the device is a PCI bridge, the bridge information |
| 1207 | # |
| 1208 | # @regions: a list of the PCI I/O regions associated with the device |
| 1209 | # |
| 1210 | # Notes: the contents of @class_info.desc are not stable and should only be |
| 1211 | # treated as informational. |
| 1212 | # |
| 1213 | # Since: 0.14.0 |
| 1214 | ## |
| 1215 | { 'type': 'PciDeviceInfo', |
| 1216 | 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', |
| 1217 | 'class_info': {'*desc': 'str', 'class': 'int'}, |
| 1218 | 'id': {'device': 'int', 'vendor': 'int'}, |
| 1219 | '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', |
| 1220 | 'regions': ['PciMemoryRegion']} } |
| 1221 | |
| 1222 | ## |
| 1223 | # @PciInfo: |
| 1224 | # |
| 1225 | # Information about a PCI bus |
| 1226 | # |
| 1227 | # @bus: the bus index |
| 1228 | # |
| 1229 | # @devices: a list of devices on this bus |
| 1230 | # |
| 1231 | # Since: 0.14.0 |
| 1232 | ## |
| 1233 | { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} } |
| 1234 | |
| 1235 | ## |
| 1236 | # @query-pci: |
| 1237 | # |
| 1238 | # Return information about the PCI bus topology of the guest. |
| 1239 | # |
| 1240 | # Returns: a list of @PciInfo for each PCI bus |
| 1241 | # |
| 1242 | # Since: 0.14.0 |
| 1243 | ## |
| 1244 | { 'command': 'query-pci', 'returns': ['PciInfo'] } |
| 1245 | |
| 1246 | ## |
Paolo Bonzini | 92aa5c6 | 2012-09-28 17:22:55 +0200 | [diff] [blame] | 1247 | # @BlockdevOnError: |
| 1248 | # |
| 1249 | # An enumeration of possible behaviors for errors on I/O operations. |
| 1250 | # The exact meaning depends on whether the I/O was initiated by a guest |
| 1251 | # or by a block job |
| 1252 | # |
| 1253 | # @report: for guest operations, report the error to the guest; |
| 1254 | # for jobs, cancel the job |
| 1255 | # |
| 1256 | # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR |
| 1257 | # or BLOCK_JOB_ERROR) |
| 1258 | # |
| 1259 | # @enospc: same as @stop on ENOSPC, same as @report otherwise. |
| 1260 | # |
| 1261 | # @stop: for guest operations, stop the virtual machine; |
| 1262 | # for jobs, pause the job |
| 1263 | # |
| 1264 | # Since: 1.3 |
| 1265 | ## |
| 1266 | { 'enum': 'BlockdevOnError', |
| 1267 | 'data': ['report', 'ignore', 'enospc', 'stop'] } |
| 1268 | |
| 1269 | ## |
Paolo Bonzini | 893f7eb | 2012-10-18 16:49:23 +0200 | [diff] [blame] | 1270 | # @MirrorSyncMode: |
| 1271 | # |
| 1272 | # An enumeration of possible behaviors for the initial synchronization |
| 1273 | # phase of storage mirroring. |
| 1274 | # |
| 1275 | # @top: copies data in the topmost image to the destination |
| 1276 | # |
| 1277 | # @full: copies data from all images to the destination |
| 1278 | # |
| 1279 | # @none: only copy data written from now on |
| 1280 | # |
| 1281 | # Since: 1.3 |
| 1282 | ## |
| 1283 | { 'enum': 'MirrorSyncMode', |
| 1284 | 'data': ['top', 'full', 'none'] } |
| 1285 | |
| 1286 | ## |
Stefan Hajnoczi | fb5458c | 2012-01-18 14:40:49 +0000 | [diff] [blame] | 1287 | # @BlockJobInfo: |
| 1288 | # |
| 1289 | # Information about a long-running block device operation. |
| 1290 | # |
| 1291 | # @type: the job type ('stream' for image streaming) |
| 1292 | # |
| 1293 | # @device: the block device name |
| 1294 | # |
| 1295 | # @len: the maximum progress value |
| 1296 | # |
Paolo Bonzini | 8d65883 | 2012-09-28 17:22:49 +0200 | [diff] [blame] | 1297 | # @busy: false if the job is known to be in a quiescent state, with |
| 1298 | # no pending I/O. Since 1.3. |
| 1299 | # |
Paolo Bonzini | 8acc72a | 2012-09-28 17:22:50 +0200 | [diff] [blame] | 1300 | # @paused: whether the job is paused or, if @busy is true, will |
| 1301 | # pause itself as soon as possible. Since 1.3. |
| 1302 | # |
Stefan Hajnoczi | fb5458c | 2012-01-18 14:40:49 +0000 | [diff] [blame] | 1303 | # @offset: the current progress value |
| 1304 | # |
| 1305 | # @speed: the rate limit, bytes per second |
| 1306 | # |
Paolo Bonzini | 32c81a4 | 2012-09-28 17:22:58 +0200 | [diff] [blame] | 1307 | # @io-status: the status of the job (since 1.3) |
| 1308 | # |
Stefan Hajnoczi | fb5458c | 2012-01-18 14:40:49 +0000 | [diff] [blame] | 1309 | # Since: 1.1 |
| 1310 | ## |
| 1311 | { 'type': 'BlockJobInfo', |
| 1312 | 'data': {'type': 'str', 'device': 'str', 'len': 'int', |
Paolo Bonzini | 32c81a4 | 2012-09-28 17:22:58 +0200 | [diff] [blame] | 1313 | 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int', |
| 1314 | 'io-status': 'BlockDeviceIoStatus'} } |
Stefan Hajnoczi | fb5458c | 2012-01-18 14:40:49 +0000 | [diff] [blame] | 1315 | |
| 1316 | ## |
| 1317 | # @query-block-jobs: |
| 1318 | # |
| 1319 | # Return information about long-running block device operations. |
| 1320 | # |
| 1321 | # Returns: a list of @BlockJobInfo for each active block job |
| 1322 | # |
| 1323 | # Since: 1.1 |
| 1324 | ## |
| 1325 | { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] } |
| 1326 | |
| 1327 | ## |
Luiz Capitulino | 7a7f325 | 2011-09-15 14:20:28 -0300 | [diff] [blame] | 1328 | # @quit: |
| 1329 | # |
| 1330 | # This command will cause the QEMU process to exit gracefully. While every |
| 1331 | # attempt is made to send the QMP response before terminating, this is not |
| 1332 | # guaranteed. When using this interface, a premature EOF would not be |
| 1333 | # unexpected. |
| 1334 | # |
| 1335 | # Since: 0.14.0 |
| 1336 | ## |
| 1337 | { 'command': 'quit' } |
Luiz Capitulino | 5f158f2 | 2011-09-15 14:34:39 -0300 | [diff] [blame] | 1338 | |
| 1339 | ## |
| 1340 | # @stop: |
| 1341 | # |
| 1342 | # Stop all guest VCPU execution. |
| 1343 | # |
| 1344 | # Since: 0.14.0 |
| 1345 | # |
| 1346 | # Notes: This function will succeed even if the guest is already in the stopped |
Paolo Bonzini | 1e99814 | 2012-10-23 14:54:21 +0200 | [diff] [blame] | 1347 | # state. In "inmigrate" state, it will ensure that the guest |
| 1348 | # remains paused once migration finishes, as if the -S option was |
| 1349 | # passed on the command line. |
Luiz Capitulino | 5f158f2 | 2011-09-15 14:34:39 -0300 | [diff] [blame] | 1350 | ## |
| 1351 | { 'command': 'stop' } |
Luiz Capitulino | 38d2265 | 2011-09-15 14:41:46 -0300 | [diff] [blame] | 1352 | |
| 1353 | ## |
| 1354 | # @system_reset: |
| 1355 | # |
| 1356 | # Performs a hard reset of a guest. |
| 1357 | # |
| 1358 | # Since: 0.14.0 |
| 1359 | ## |
| 1360 | { 'command': 'system_reset' } |
Luiz Capitulino | 5bc465e | 2011-09-28 11:06:15 -0300 | [diff] [blame] | 1361 | |
| 1362 | ## |
| 1363 | # @system_powerdown: |
| 1364 | # |
| 1365 | # Requests that a guest perform a powerdown operation. |
| 1366 | # |
| 1367 | # Since: 0.14.0 |
| 1368 | # |
| 1369 | # Notes: A guest may or may not respond to this command. This command |
| 1370 | # returning does not indicate that a guest has accepted the request or |
| 1371 | # that it has shut down. Many guests will respond to this command by |
| 1372 | # prompting the user in some way. |
| 1373 | ## |
| 1374 | { 'command': 'system_powerdown' } |
Luiz Capitulino | 755f196 | 2011-10-06 14:31:39 -0300 | [diff] [blame] | 1375 | |
| 1376 | ## |
| 1377 | # @cpu: |
| 1378 | # |
| 1379 | # This command is a nop that is only provided for the purposes of compatibility. |
| 1380 | # |
| 1381 | # Since: 0.14.0 |
| 1382 | # |
| 1383 | # Notes: Do not use this command. |
| 1384 | ## |
| 1385 | { 'command': 'cpu', 'data': {'index': 'int'} } |
Luiz Capitulino | 0cfd6a9 | 2011-11-22 16:32:37 -0200 | [diff] [blame] | 1386 | |
| 1387 | ## |
| 1388 | # @memsave: |
| 1389 | # |
| 1390 | # Save a portion of guest memory to a file. |
| 1391 | # |
| 1392 | # @val: the virtual address of the guest to start from |
| 1393 | # |
| 1394 | # @size: the size of memory region to save |
| 1395 | # |
| 1396 | # @filename: the file to save the memory to as binary data |
| 1397 | # |
| 1398 | # @cpu-index: #optional the index of the virtual CPU to use for translating the |
| 1399 | # virtual address (defaults to CPU 0) |
| 1400 | # |
| 1401 | # Returns: Nothing on success |
Luiz Capitulino | 0cfd6a9 | 2011-11-22 16:32:37 -0200 | [diff] [blame] | 1402 | # |
| 1403 | # Since: 0.14.0 |
| 1404 | # |
| 1405 | # Notes: Errors were not reliably returned until 1.1 |
| 1406 | ## |
| 1407 | { 'command': 'memsave', |
| 1408 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } |
Luiz Capitulino | 6d3962b | 2011-11-22 17:26:46 -0200 | [diff] [blame] | 1409 | |
| 1410 | ## |
| 1411 | # @pmemsave: |
| 1412 | # |
| 1413 | # Save a portion of guest physical memory to a file. |
| 1414 | # |
| 1415 | # @val: the physical address of the guest to start from |
| 1416 | # |
| 1417 | # @size: the size of memory region to save |
| 1418 | # |
| 1419 | # @filename: the file to save the memory to as binary data |
| 1420 | # |
| 1421 | # Returns: Nothing on success |
Luiz Capitulino | 6d3962b | 2011-11-22 17:26:46 -0200 | [diff] [blame] | 1422 | # |
| 1423 | # Since: 0.14.0 |
| 1424 | # |
| 1425 | # Notes: Errors were not reliably returned until 1.1 |
| 1426 | ## |
| 1427 | { 'command': 'pmemsave', |
| 1428 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } |
Luiz Capitulino | e42e818 | 2011-11-22 17:58:31 -0200 | [diff] [blame] | 1429 | |
| 1430 | ## |
| 1431 | # @cont: |
| 1432 | # |
| 1433 | # Resume guest VCPU execution. |
| 1434 | # |
| 1435 | # Since: 0.14.0 |
| 1436 | # |
| 1437 | # Returns: If successful, nothing |
Luiz Capitulino | e42e818 | 2011-11-22 17:58:31 -0200 | [diff] [blame] | 1438 | # If QEMU was started with an encrypted block device and a key has |
| 1439 | # not yet been set, DeviceEncrypted. |
| 1440 | # |
Paolo Bonzini | 1e99814 | 2012-10-23 14:54:21 +0200 | [diff] [blame] | 1441 | # Notes: This command will succeed if the guest is currently running. It |
| 1442 | # will also succeed if the guest is in the "inmigrate" state; in |
| 1443 | # this case, the effect of the command is to make sure the guest |
| 1444 | # starts once migration finishes, removing the effect of the -S |
| 1445 | # command line option if it was passed. |
Luiz Capitulino | e42e818 | 2011-11-22 17:58:31 -0200 | [diff] [blame] | 1446 | ## |
| 1447 | { 'command': 'cont' } |
| 1448 | |
Luiz Capitulino | ab49ab5 | 2011-11-23 12:55:53 -0200 | [diff] [blame] | 1449 | ## |
Gerd Hoffmann | 9b9df25 | 2012-02-23 13:45:21 +0100 | [diff] [blame] | 1450 | # @system_wakeup: |
| 1451 | # |
| 1452 | # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. |
| 1453 | # |
| 1454 | # Since: 1.1 |
| 1455 | # |
| 1456 | # Returns: nothing. |
| 1457 | ## |
| 1458 | { 'command': 'system_wakeup' } |
| 1459 | |
| 1460 | ## |
Luiz Capitulino | ab49ab5 | 2011-11-23 12:55:53 -0200 | [diff] [blame] | 1461 | # @inject-nmi: |
| 1462 | # |
| 1463 | # Injects an Non-Maskable Interrupt into all guest's VCPUs. |
| 1464 | # |
| 1465 | # Returns: If successful, nothing |
Luiz Capitulino | ab49ab5 | 2011-11-23 12:55:53 -0200 | [diff] [blame] | 1466 | # |
| 1467 | # Since: 0.14.0 |
| 1468 | # |
| 1469 | # Notes: Only x86 Virtual Machines support this command. |
| 1470 | ## |
| 1471 | { 'command': 'inject-nmi' } |
Luiz Capitulino | 4b37156 | 2011-11-23 13:11:55 -0200 | [diff] [blame] | 1472 | |
| 1473 | ## |
| 1474 | # @set_link: |
| 1475 | # |
| 1476 | # Sets the link status of a virtual network adapter. |
| 1477 | # |
| 1478 | # @name: the device name of the virtual network adapter |
| 1479 | # |
| 1480 | # @up: true to set the link status to be up |
| 1481 | # |
| 1482 | # Returns: Nothing on success |
| 1483 | # If @name is not a valid network device, DeviceNotFound |
| 1484 | # |
| 1485 | # Since: 0.14.0 |
| 1486 | # |
| 1487 | # Notes: Not all network adapters support setting link status. This command |
| 1488 | # will succeed even if the network adapter does not support link status |
| 1489 | # notification. |
| 1490 | ## |
| 1491 | { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } |
Luiz Capitulino | a4dea8a | 2011-11-23 13:28:21 -0200 | [diff] [blame] | 1492 | |
| 1493 | ## |
| 1494 | # @block_passwd: |
| 1495 | # |
| 1496 | # This command sets the password of a block device that has not been open |
| 1497 | # with a password and requires one. |
| 1498 | # |
| 1499 | # The two cases where this can happen are a block device is created through |
| 1500 | # QEMU's initial command line or a block device is changed through the legacy |
| 1501 | # @change interface. |
| 1502 | # |
| 1503 | # In the event that the block device is created through the initial command |
| 1504 | # line, the VM will start in the stopped state regardless of whether '-S' is |
| 1505 | # used. The intention is for a management tool to query the block devices to |
| 1506 | # determine which ones are encrypted, set the passwords with this command, and |
| 1507 | # then start the guest with the @cont command. |
| 1508 | # |
| 1509 | # @device: the name of the device to set the password on |
| 1510 | # |
| 1511 | # @password: the password to use for the device |
| 1512 | # |
| 1513 | # Returns: nothing on success |
| 1514 | # If @device is not a valid block device, DeviceNotFound |
| 1515 | # If @device is not encrypted, DeviceNotEncrypted |
Luiz Capitulino | a4dea8a | 2011-11-23 13:28:21 -0200 | [diff] [blame] | 1516 | # |
| 1517 | # Notes: Not all block formats support encryption and some that do are not |
| 1518 | # able to validate that a password is correct. Disk corruption may |
| 1519 | # occur if an invalid password is specified. |
| 1520 | # |
| 1521 | # Since: 0.14.0 |
| 1522 | ## |
| 1523 | { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} } |
Luiz Capitulino | d72f326 | 2011-11-25 14:38:09 -0200 | [diff] [blame] | 1524 | |
| 1525 | ## |
| 1526 | # @balloon: |
| 1527 | # |
| 1528 | # Request the balloon driver to change its balloon size. |
| 1529 | # |
| 1530 | # @value: the target size of the balloon in bytes |
| 1531 | # |
| 1532 | # Returns: Nothing on success |
| 1533 | # If the balloon driver is enabled but not functional because the KVM |
| 1534 | # kernel module cannot support it, KvmMissingCap |
| 1535 | # If no balloon device is present, DeviceNotActive |
| 1536 | # |
| 1537 | # Notes: This command just issues a request to the guest. When it returns, |
| 1538 | # the balloon size may not have changed. A guest can change the balloon |
| 1539 | # size independent of this command. |
| 1540 | # |
| 1541 | # Since: 0.14.0 |
| 1542 | ## |
| 1543 | { 'command': 'balloon', 'data': {'value': 'int'} } |
Luiz Capitulino | 5e7caac | 2011-11-25 14:57:10 -0200 | [diff] [blame] | 1544 | |
| 1545 | ## |
| 1546 | # @block_resize |
| 1547 | # |
| 1548 | # Resize a block image while a guest is running. |
| 1549 | # |
| 1550 | # @device: the name of the device to get the image resized |
| 1551 | # |
| 1552 | # @size: new image size in bytes |
| 1553 | # |
| 1554 | # Returns: nothing on success |
| 1555 | # If @device is not a valid block device, DeviceNotFound |
Luiz Capitulino | 5e7caac | 2011-11-25 14:57:10 -0200 | [diff] [blame] | 1556 | # |
| 1557 | # Since: 0.14.0 |
| 1558 | ## |
| 1559 | { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }} |
Luiz Capitulino | 6106e24 | 2011-11-25 16:15:19 -0200 | [diff] [blame] | 1560 | |
| 1561 | ## |
Paolo Bonzini | bc8b094 | 2012-03-06 18:55:58 +0100 | [diff] [blame] | 1562 | # @NewImageMode |
| 1563 | # |
| 1564 | # An enumeration that tells QEMU how to set the backing file path in |
| 1565 | # a new image file. |
| 1566 | # |
| 1567 | # @existing: QEMU should look for an existing image file. |
| 1568 | # |
| 1569 | # @absolute-paths: QEMU should create a new image with absolute paths |
| 1570 | # for the backing file. |
| 1571 | # |
| 1572 | # Since: 1.1 |
| 1573 | ## |
| 1574 | { 'enum': 'NewImageMode' |
| 1575 | 'data': [ 'existing', 'absolute-paths' ] } |
| 1576 | |
| 1577 | ## |
Paolo Bonzini | 52e7c24 | 2012-03-06 18:55:57 +0100 | [diff] [blame] | 1578 | # @BlockdevSnapshot |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1579 | # |
| 1580 | # @device: the name of the device to generate the snapshot from. |
| 1581 | # |
| 1582 | # @snapshot-file: the target of the new image. A new file will be created. |
| 1583 | # |
| 1584 | # @format: #optional the format of the snapshot image, default is 'qcow2'. |
Paolo Bonzini | 6cc2a41 | 2012-03-06 18:55:59 +0100 | [diff] [blame] | 1585 | # |
| 1586 | # @mode: #optional whether and how QEMU should create a new image, default is |
Paolo Bonzini | 8bde9b6 | 2012-09-26 16:34:29 +0200 | [diff] [blame] | 1587 | # 'absolute-paths'. |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1588 | ## |
Paolo Bonzini | 52e7c24 | 2012-03-06 18:55:57 +0100 | [diff] [blame] | 1589 | { 'type': 'BlockdevSnapshot', |
Paolo Bonzini | bc8b094 | 2012-03-06 18:55:58 +0100 | [diff] [blame] | 1590 | 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str', |
| 1591 | '*mode': 'NewImageMode' } } |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1592 | |
| 1593 | ## |
Paolo Bonzini | 52e7c24 | 2012-03-06 18:55:57 +0100 | [diff] [blame] | 1594 | # @BlockdevAction |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1595 | # |
Paolo Bonzini | 52e7c24 | 2012-03-06 18:55:57 +0100 | [diff] [blame] | 1596 | # A discriminated record of operations that can be performed with |
| 1597 | # @transaction. |
| 1598 | ## |
| 1599 | { 'union': 'BlockdevAction', |
| 1600 | 'data': { |
| 1601 | 'blockdev-snapshot-sync': 'BlockdevSnapshot', |
| 1602 | } } |
| 1603 | |
| 1604 | ## |
| 1605 | # @transaction |
| 1606 | # |
| 1607 | # Atomically operate on a group of one or more block devices. If |
| 1608 | # any operation fails, then the entire set of actions will be |
| 1609 | # abandoned and the appropriate error returned. The only operation |
| 1610 | # supported is currently blockdev-snapshot-sync. |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1611 | # |
| 1612 | # List of: |
Paolo Bonzini | 52e7c24 | 2012-03-06 18:55:57 +0100 | [diff] [blame] | 1613 | # @BlockdevAction: information needed for the device snapshot |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1614 | # |
| 1615 | # Returns: nothing on success |
| 1616 | # If @device is not a valid block device, DeviceNotFound |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1617 | # |
Paolo Bonzini | 52e7c24 | 2012-03-06 18:55:57 +0100 | [diff] [blame] | 1618 | # Note: The transaction aborts on the first failure. Therefore, there will |
| 1619 | # be only one device or snapshot file returned in an error condition, and |
| 1620 | # subsequent actions will not have been attempted. |
| 1621 | # |
| 1622 | # Since 1.1 |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1623 | ## |
Paolo Bonzini | 52e7c24 | 2012-03-06 18:55:57 +0100 | [diff] [blame] | 1624 | { 'command': 'transaction', |
| 1625 | 'data': { 'actions': [ 'BlockdevAction' ] } } |
Jeff Cody | 8802d1f | 2012-02-28 15:54:06 -0500 | [diff] [blame] | 1626 | |
| 1627 | ## |
Luiz Capitulino | 6106e24 | 2011-11-25 16:15:19 -0200 | [diff] [blame] | 1628 | # @blockdev-snapshot-sync |
| 1629 | # |
| 1630 | # Generates a synchronous snapshot of a block device. |
| 1631 | # |
| 1632 | # @device: the name of the device to generate the snapshot from. |
| 1633 | # |
| 1634 | # @snapshot-file: the target of the new image. If the file exists, or if it |
| 1635 | # is a device, the snapshot will be created in the existing |
| 1636 | # file/device. If does not exist, a new file will be created. |
| 1637 | # |
| 1638 | # @format: #optional the format of the snapshot image, default is 'qcow2'. |
| 1639 | # |
Paolo Bonzini | 6cc2a41 | 2012-03-06 18:55:59 +0100 | [diff] [blame] | 1640 | # @mode: #optional whether and how QEMU should create a new image, default is |
Paolo Bonzini | 8bde9b6 | 2012-09-26 16:34:29 +0200 | [diff] [blame] | 1641 | # 'absolute-paths'. |
Paolo Bonzini | 6cc2a41 | 2012-03-06 18:55:59 +0100 | [diff] [blame] | 1642 | # |
Luiz Capitulino | 6106e24 | 2011-11-25 16:15:19 -0200 | [diff] [blame] | 1643 | # Returns: nothing on success |
| 1644 | # If @device is not a valid block device, DeviceNotFound |
Luiz Capitulino | 6106e24 | 2011-11-25 16:15:19 -0200 | [diff] [blame] | 1645 | # |
Luiz Capitulino | 6106e24 | 2011-11-25 16:15:19 -0200 | [diff] [blame] | 1646 | # Since 0.14.0 |
| 1647 | ## |
| 1648 | { 'command': 'blockdev-snapshot-sync', |
Paolo Bonzini | 6cc2a41 | 2012-03-06 18:55:59 +0100 | [diff] [blame] | 1649 | 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str', |
| 1650 | '*mode': 'NewImageMode'} } |
Luiz Capitulino | d51a67b | 2011-11-25 17:52:45 -0200 | [diff] [blame] | 1651 | |
| 1652 | ## |
| 1653 | # @human-monitor-command: |
| 1654 | # |
| 1655 | # Execute a command on the human monitor and return the output. |
| 1656 | # |
| 1657 | # @command-line: the command to execute in the human monitor |
| 1658 | # |
| 1659 | # @cpu-index: #optional The CPU to use for commands that require an implicit CPU |
| 1660 | # |
| 1661 | # Returns: the output of the command as a string |
| 1662 | # |
| 1663 | # Since: 0.14.0 |
| 1664 | # |
| 1665 | # Notes: This command only exists as a stop-gap. It's use is highly |
| 1666 | # discouraged. The semantics of this command are not guaranteed. |
| 1667 | # |
| 1668 | # Known limitations: |
| 1669 | # |
| 1670 | # o This command is stateless, this means that commands that depend |
| 1671 | # on state information (such as getfd) might not work |
| 1672 | # |
| 1673 | # o Commands that prompt the user for data (eg. 'cont' when the block |
| 1674 | # device is encrypted) don't currently work |
| 1675 | ## |
| 1676 | { 'command': 'human-monitor-command', |
| 1677 | 'data': {'command-line': 'str', '*cpu-index': 'int'}, |
Laszlo Ersek | b80e560 | 2012-07-17 16:17:10 +0200 | [diff] [blame] | 1678 | 'returns': 'str' } |
Luiz Capitulino | 6cdedb0 | 2011-11-27 22:54:09 -0200 | [diff] [blame] | 1679 | |
| 1680 | ## |
Jeff Cody | ed61fc1 | 2012-09-27 13:29:16 -0400 | [diff] [blame] | 1681 | # @block-commit |
| 1682 | # |
| 1683 | # Live commit of data from overlay image nodes into backing nodes - i.e., |
| 1684 | # writes data between 'top' and 'base' into 'base'. |
| 1685 | # |
| 1686 | # @device: the name of the device |
| 1687 | # |
| 1688 | # @base: #optional The file name of the backing image to write data into. |
| 1689 | # If not specified, this is the deepest backing image |
| 1690 | # |
| 1691 | # @top: The file name of the backing image within the image chain, |
| 1692 | # which contains the topmost data to be committed down. |
| 1693 | # Note, the active layer as 'top' is currently unsupported. |
| 1694 | # |
| 1695 | # If top == base, that is an error. |
| 1696 | # |
| 1697 | # |
| 1698 | # @speed: #optional the maximum speed, in bytes per second |
| 1699 | # |
| 1700 | # Returns: Nothing on success |
| 1701 | # If commit or stream is already active on this device, DeviceInUse |
| 1702 | # If @device does not exist, DeviceNotFound |
| 1703 | # If image commit is not supported by this device, NotSupported |
| 1704 | # If @base or @top is invalid, a generic error is returned |
| 1705 | # If @top is the active layer, or omitted, a generic error is returned |
| 1706 | # If @speed is invalid, InvalidParameter |
| 1707 | # |
| 1708 | # Since: 1.3 |
| 1709 | # |
| 1710 | ## |
| 1711 | { 'command': 'block-commit', |
| 1712 | 'data': { 'device': 'str', '*base': 'str', 'top': 'str', |
| 1713 | '*speed': 'int' } } |
| 1714 | |
Paolo Bonzini | d9b902d | 2012-10-18 16:49:24 +0200 | [diff] [blame] | 1715 | ## |
| 1716 | # @drive-mirror |
| 1717 | # |
| 1718 | # Start mirroring a block device's writes to a new destination. |
| 1719 | # |
| 1720 | # @device: the name of the device whose writes should be mirrored. |
| 1721 | # |
| 1722 | # @target: the target of the new image. If the file exists, or if it |
| 1723 | # is a device, the existing file/device will be used as the new |
| 1724 | # destination. If it does not exist, a new file will be created. |
| 1725 | # |
| 1726 | # @format: #optional the format of the new destination, default is to |
| 1727 | # probe if @mode is 'existing', else the format of the source |
| 1728 | # |
| 1729 | # @mode: #optional whether and how QEMU should create a new image, default is |
| 1730 | # 'absolute-paths'. |
| 1731 | # |
| 1732 | # @speed: #optional the maximum speed, in bytes per second |
| 1733 | # |
| 1734 | # @sync: what parts of the disk image should be copied to the destination |
| 1735 | # (all the disk, only the sectors allocated in the topmost image, or |
| 1736 | # only new I/O). |
| 1737 | # |
Paolo Bonzini | eee13df | 2013-01-21 17:09:46 +0100 | [diff] [blame] | 1738 | # @granularity: #optional granularity of the dirty bitmap, default is 64K |
| 1739 | # if the image format doesn't have clusters, 4K if the clusters |
| 1740 | # are smaller than that, else the cluster size. Must be a |
| 1741 | # power of 2 between 512 and 64M (since 1.4). |
| 1742 | # |
Paolo Bonzini | 08e4ed6 | 2013-01-22 09:03:13 +0100 | [diff] [blame] | 1743 | # @buf-size: #optional maximum amount of data in flight from source to |
| 1744 | # target (since 1.4). |
| 1745 | # |
Paolo Bonzini | b952b55 | 2012-10-18 16:49:28 +0200 | [diff] [blame] | 1746 | # @on-source-error: #optional the action to take on an error on the source, |
| 1747 | # default 'report'. 'stop' and 'enospc' can only be used |
| 1748 | # if the block device supports io-status (see BlockInfo). |
| 1749 | # |
| 1750 | # @on-target-error: #optional the action to take on an error on the target, |
| 1751 | # default 'report' (no limitations, since this applies to |
| 1752 | # a different block device than @device). |
| 1753 | # |
Paolo Bonzini | d9b902d | 2012-10-18 16:49:24 +0200 | [diff] [blame] | 1754 | # Returns: nothing on success |
| 1755 | # If @device is not a valid block device, DeviceNotFound |
| 1756 | # |
| 1757 | # Since 1.3 |
| 1758 | ## |
| 1759 | { 'command': 'drive-mirror', |
| 1760 | 'data': { 'device': 'str', 'target': 'str', '*format': 'str', |
| 1761 | 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode', |
Paolo Bonzini | eee13df | 2013-01-21 17:09:46 +0100 | [diff] [blame] | 1762 | '*speed': 'int', '*granularity': 'uint32', |
Paolo Bonzini | 08e4ed6 | 2013-01-22 09:03:13 +0100 | [diff] [blame] | 1763 | '*buf-size': 'int', '*on-source-error': 'BlockdevOnError', |
Paolo Bonzini | b952b55 | 2012-10-18 16:49:28 +0200 | [diff] [blame] | 1764 | '*on-target-error': 'BlockdevOnError' } } |
Paolo Bonzini | d9b902d | 2012-10-18 16:49:24 +0200 | [diff] [blame] | 1765 | |
| 1766 | ## |
Luiz Capitulino | 6cdedb0 | 2011-11-27 22:54:09 -0200 | [diff] [blame] | 1767 | # @migrate_cancel |
| 1768 | # |
| 1769 | # Cancel the current executing migration process. |
| 1770 | # |
| 1771 | # Returns: nothing on success |
| 1772 | # |
| 1773 | # Notes: This command succeeds even if there is no migration process running. |
| 1774 | # |
| 1775 | # Since: 0.14.0 |
| 1776 | ## |
| 1777 | { 'command': 'migrate_cancel' } |
Luiz Capitulino | 4f0a993 | 2011-11-27 23:18:01 -0200 | [diff] [blame] | 1778 | |
| 1779 | ## |
| 1780 | # @migrate_set_downtime |
| 1781 | # |
| 1782 | # Set maximum tolerated downtime for migration. |
| 1783 | # |
| 1784 | # @value: maximum downtime in seconds |
| 1785 | # |
| 1786 | # Returns: nothing on success |
| 1787 | # |
| 1788 | # Since: 0.14.0 |
| 1789 | ## |
| 1790 | { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } |
Luiz Capitulino | 3dc8538 | 2011-11-28 11:59:37 -0200 | [diff] [blame] | 1791 | |
| 1792 | ## |
| 1793 | # @migrate_set_speed |
| 1794 | # |
| 1795 | # Set maximum speed for migration. |
| 1796 | # |
| 1797 | # @value: maximum speed in bytes. |
| 1798 | # |
| 1799 | # Returns: nothing on success |
| 1800 | # |
| 1801 | # Notes: A value lesser than zero will be automatically round up to zero. |
| 1802 | # |
| 1803 | # Since: 0.14.0 |
| 1804 | ## |
| 1805 | { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1806 | |
| 1807 | ## |
Orit Wasserman | 9e1ba4c | 2012-08-06 21:42:54 +0300 | [diff] [blame] | 1808 | # @migrate-set-cache-size |
| 1809 | # |
| 1810 | # Set XBZRLE cache size |
| 1811 | # |
| 1812 | # @value: cache size in bytes |
| 1813 | # |
| 1814 | # The size will be rounded down to the nearest power of 2. |
| 1815 | # The cache size can be modified before and during ongoing migration |
| 1816 | # |
| 1817 | # Returns: nothing on success |
| 1818 | # |
| 1819 | # Since: 1.2 |
| 1820 | ## |
| 1821 | { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } |
| 1822 | |
| 1823 | ## |
| 1824 | # @query-migrate-cache-size |
| 1825 | # |
| 1826 | # query XBZRLE cache size |
| 1827 | # |
| 1828 | # Returns: XBZRLE cache size in bytes |
| 1829 | # |
| 1830 | # Since: 1.2 |
| 1831 | ## |
| 1832 | { 'command': 'query-migrate-cache-size', 'returns': 'int' } |
| 1833 | |
| 1834 | ## |
Alon Levy | d03ee40 | 2012-03-05 15:13:28 +0200 | [diff] [blame] | 1835 | # @ObjectPropertyInfo: |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1836 | # |
| 1837 | # @name: the name of the property |
| 1838 | # |
| 1839 | # @type: the type of the property. This will typically come in one of four |
| 1840 | # forms: |
| 1841 | # |
| 1842 | # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. |
| 1843 | # These types are mapped to the appropriate JSON type. |
| 1844 | # |
| 1845 | # 2) A legacy type in the form 'legacy<subtype>' where subtype is the |
| 1846 | # legacy qdev typename. These types are always treated as strings. |
| 1847 | # |
| 1848 | # 3) A child type in the form 'child<subtype>' where subtype is a qdev |
| 1849 | # device type name. Child properties create the composition tree. |
| 1850 | # |
| 1851 | # 4) A link type in the form 'link<subtype>' where subtype is a qdev |
| 1852 | # device type name. Link properties form the device model graph. |
| 1853 | # |
Anthony Liguori | 5192082 | 2012-08-10 11:04:10 -0500 | [diff] [blame] | 1854 | # Since: 1.2 |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1855 | ## |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1856 | { 'type': 'ObjectPropertyInfo', |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1857 | 'data': { 'name': 'str', 'type': 'str' } } |
| 1858 | |
| 1859 | ## |
| 1860 | # @qom-list: |
| 1861 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1862 | # This command will list any properties of a object given a path in the object |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1863 | # model. |
| 1864 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1865 | # @path: the path within the object model. See @qom-get for a description of |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1866 | # this parameter. |
| 1867 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1868 | # Returns: a list of @ObjectPropertyInfo that describe the properties of the |
| 1869 | # object. |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1870 | # |
Anthony Liguori | 5192082 | 2012-08-10 11:04:10 -0500 | [diff] [blame] | 1871 | # Since: 1.2 |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1872 | ## |
| 1873 | { 'command': 'qom-list', |
| 1874 | 'data': { 'path': 'str' }, |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1875 | 'returns': [ 'ObjectPropertyInfo' ] } |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1876 | |
| 1877 | ## |
| 1878 | # @qom-get: |
| 1879 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1880 | # This command will get a property from a object model path and return the |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1881 | # value. |
| 1882 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1883 | # @path: The path within the object model. There are two forms of supported |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1884 | # paths--absolute and partial paths. |
| 1885 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1886 | # Absolute paths are derived from the root object and can follow child<> |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1887 | # or link<> properties. Since they can follow link<> properties, they |
| 1888 | # can be arbitrarily long. Absolute paths look like absolute filenames |
| 1889 | # and are prefixed with a leading slash. |
| 1890 | # |
| 1891 | # Partial paths look like relative filenames. They do not begin |
| 1892 | # with a prefix. The matching rules for partial paths are subtle but |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1893 | # designed to make specifying objects easy. At each level of the |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1894 | # composition tree, the partial path is matched as an absolute path. |
| 1895 | # The first match is not returned. At least two matches are searched |
| 1896 | # for. A successful result is only returned if only one match is |
| 1897 | # found. If more than one match is found, a flag is return to |
| 1898 | # indicate that the match was ambiguous. |
| 1899 | # |
| 1900 | # @property: The property name to read |
| 1901 | # |
| 1902 | # Returns: The property value. The type depends on the property type. legacy<> |
| 1903 | # properties are returned as #str. child<> and link<> properties are |
| 1904 | # returns as #str pathnames. All integer property types (u8, u16, etc) |
| 1905 | # are returned as #int. |
| 1906 | # |
Anthony Liguori | 5192082 | 2012-08-10 11:04:10 -0500 | [diff] [blame] | 1907 | # Since: 1.2 |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1908 | ## |
| 1909 | { 'command': 'qom-get', |
| 1910 | 'data': { 'path': 'str', 'property': 'str' }, |
| 1911 | 'returns': 'visitor', |
| 1912 | 'gen': 'no' } |
| 1913 | |
| 1914 | ## |
| 1915 | # @qom-set: |
| 1916 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1917 | # This command will set a property from a object model path. |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1918 | # |
| 1919 | # @path: see @qom-get for a description of this parameter |
| 1920 | # |
| 1921 | # @property: the property name to set |
| 1922 | # |
| 1923 | # @value: a value who's type is appropriate for the property type. See @qom-get |
| 1924 | # for a description of type mapping. |
| 1925 | # |
Anthony Liguori | 5192082 | 2012-08-10 11:04:10 -0500 | [diff] [blame] | 1926 | # Since: 1.2 |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1927 | ## |
| 1928 | { 'command': 'qom-set', |
| 1929 | 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' }, |
| 1930 | 'gen': 'no' } |
Luiz Capitulino | fbf796f | 2011-12-07 11:17:51 -0200 | [diff] [blame] | 1931 | |
| 1932 | ## |
| 1933 | # @set_password: |
| 1934 | # |
| 1935 | # Sets the password of a remote display session. |
| 1936 | # |
| 1937 | # @protocol: `vnc' to modify the VNC server password |
| 1938 | # `spice' to modify the Spice server password |
| 1939 | # |
| 1940 | # @password: the new password |
| 1941 | # |
| 1942 | # @connected: #optional how to handle existing clients when changing the |
Laszlo Ersek | b80e560 | 2012-07-17 16:17:10 +0200 | [diff] [blame] | 1943 | # password. If nothing is specified, defaults to `keep' |
Luiz Capitulino | fbf796f | 2011-12-07 11:17:51 -0200 | [diff] [blame] | 1944 | # `fail' to fail the command if clients are connected |
| 1945 | # `disconnect' to disconnect existing clients |
| 1946 | # `keep' to maintain existing clients |
| 1947 | # |
| 1948 | # Returns: Nothing on success |
| 1949 | # If Spice is not enabled, DeviceNotFound |
Luiz Capitulino | fbf796f | 2011-12-07 11:17:51 -0200 | [diff] [blame] | 1950 | # |
| 1951 | # Since: 0.14.0 |
| 1952 | ## |
| 1953 | { 'command': 'set_password', |
| 1954 | 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} } |
Luiz Capitulino | 9ad5372 | 2011-12-07 11:47:57 -0200 | [diff] [blame] | 1955 | |
| 1956 | ## |
| 1957 | # @expire_password: |
| 1958 | # |
| 1959 | # Expire the password of a remote display server. |
| 1960 | # |
| 1961 | # @protocol: the name of the remote display protocol `vnc' or `spice' |
| 1962 | # |
| 1963 | # @time: when to expire the password. |
| 1964 | # `now' to expire the password immediately |
| 1965 | # `never' to cancel password expiration |
| 1966 | # `+INT' where INT is the number of seconds from now (integer) |
| 1967 | # `INT' where INT is the absolute time in seconds |
| 1968 | # |
| 1969 | # Returns: Nothing on success |
| 1970 | # If @protocol is `spice' and Spice is not active, DeviceNotFound |
Luiz Capitulino | 9ad5372 | 2011-12-07 11:47:57 -0200 | [diff] [blame] | 1971 | # |
| 1972 | # Since: 0.14.0 |
| 1973 | # |
| 1974 | # Notes: Time is relative to the server and currently there is no way to |
| 1975 | # coordinate server time with client time. It is not recommended to |
| 1976 | # use the absolute time version of the @time parameter unless you're |
| 1977 | # sure you are on the same machine as the QEMU instance. |
| 1978 | ## |
| 1979 | { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} } |
Luiz Capitulino | c245b6a | 2011-12-07 16:02:36 -0200 | [diff] [blame] | 1980 | |
| 1981 | ## |
| 1982 | # @eject: |
| 1983 | # |
| 1984 | # Ejects a device from a removable drive. |
| 1985 | # |
| 1986 | # @device: The name of the device |
| 1987 | # |
| 1988 | # @force: @optional If true, eject regardless of whether the drive is locked. |
| 1989 | # If not specified, the default value is false. |
| 1990 | # |
| 1991 | # Returns: Nothing on success |
| 1992 | # If @device is not a valid block device, DeviceNotFound |
Luiz Capitulino | c245b6a | 2011-12-07 16:02:36 -0200 | [diff] [blame] | 1993 | # |
| 1994 | # Notes: Ejecting a device will no media results in success |
| 1995 | # |
| 1996 | # Since: 0.14.0 |
| 1997 | ## |
| 1998 | { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} } |
Luiz Capitulino | 270b243 | 2011-12-08 11:45:55 -0200 | [diff] [blame] | 1999 | |
| 2000 | ## |
| 2001 | # @change-vnc-password: |
| 2002 | # |
| 2003 | # Change the VNC server password. |
| 2004 | # |
| 2005 | # @target: the new password to use with VNC authentication |
| 2006 | # |
| 2007 | # Since: 1.1 |
| 2008 | # |
| 2009 | # Notes: An empty password in this command will set the password to the empty |
| 2010 | # string. Existing clients are unaffected by executing this command. |
| 2011 | ## |
| 2012 | { 'command': 'change-vnc-password', 'data': {'password': 'str'} } |
Luiz Capitulino | 333a96e | 2011-12-08 11:13:50 -0200 | [diff] [blame] | 2013 | |
| 2014 | ## |
| 2015 | # @change: |
| 2016 | # |
| 2017 | # This command is multiple commands multiplexed together. |
| 2018 | # |
| 2019 | # @device: This is normally the name of a block device but it may also be 'vnc'. |
| 2020 | # when it's 'vnc', then sub command depends on @target |
| 2021 | # |
| 2022 | # @target: If @device is a block device, then this is the new filename. |
| 2023 | # If @device is 'vnc', then if the value 'password' selects the vnc |
| 2024 | # change password command. Otherwise, this specifies a new server URI |
| 2025 | # address to listen to for VNC connections. |
| 2026 | # |
| 2027 | # @arg: If @device is a block device, then this is an optional format to open |
| 2028 | # the device with. |
| 2029 | # If @device is 'vnc' and @target is 'password', this is the new VNC |
| 2030 | # password to set. If this argument is an empty string, then no future |
| 2031 | # logins will be allowed. |
| 2032 | # |
| 2033 | # Returns: Nothing on success. |
| 2034 | # If @device is not a valid block device, DeviceNotFound |
Luiz Capitulino | 333a96e | 2011-12-08 11:13:50 -0200 | [diff] [blame] | 2035 | # If the new block device is encrypted, DeviceEncrypted. Note that |
| 2036 | # if this error is returned, the device has been opened successfully |
| 2037 | # and an additional call to @block_passwd is required to set the |
| 2038 | # device's password. The behavior of reads and writes to the block |
| 2039 | # device between when these calls are executed is undefined. |
| 2040 | # |
| 2041 | # Notes: It is strongly recommended that this interface is not used especially |
| 2042 | # for changing block devices. |
| 2043 | # |
| 2044 | # Since: 0.14.0 |
| 2045 | ## |
| 2046 | { 'command': 'change', |
| 2047 | 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } |
Luiz Capitulino | 80047da | 2011-12-14 16:49:14 -0200 | [diff] [blame] | 2048 | |
| 2049 | ## |
| 2050 | # @block_set_io_throttle: |
| 2051 | # |
| 2052 | # Change I/O throttle limits for a block drive. |
| 2053 | # |
| 2054 | # @device: The name of the device |
| 2055 | # |
| 2056 | # @bps: total throughput limit in bytes per second |
| 2057 | # |
| 2058 | # @bps_rd: read throughput limit in bytes per second |
| 2059 | # |
| 2060 | # @bps_wr: write throughput limit in bytes per second |
| 2061 | # |
| 2062 | # @iops: total I/O operations per second |
| 2063 | # |
| 2064 | # @ops_rd: read I/O operations per second |
| 2065 | # |
| 2066 | # @iops_wr: write I/O operations per second |
| 2067 | # |
| 2068 | # Returns: Nothing on success |
| 2069 | # If @device is not a valid block device, DeviceNotFound |
Luiz Capitulino | 80047da | 2011-12-14 16:49:14 -0200 | [diff] [blame] | 2070 | # |
| 2071 | # Since: 1.1 |
Laszlo Ersek | b80e560 | 2012-07-17 16:17:10 +0200 | [diff] [blame] | 2072 | ## |
Luiz Capitulino | 80047da | 2011-12-14 16:49:14 -0200 | [diff] [blame] | 2073 | { 'command': 'block_set_io_throttle', |
| 2074 | 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', |
| 2075 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } } |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 2076 | |
Stefan Hajnoczi | db58f9c | 2012-04-11 16:27:10 +0100 | [diff] [blame] | 2077 | ## |
| 2078 | # @block-stream: |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 2079 | # |
| 2080 | # Copy data from a backing file into a block device. |
| 2081 | # |
| 2082 | # The block streaming operation is performed in the background until the entire |
| 2083 | # backing file has been copied. This command returns immediately once streaming |
| 2084 | # has started. The status of ongoing block streaming operations can be checked |
| 2085 | # with query-block-jobs. The operation can be stopped before it has completed |
Stefan Hajnoczi | db58f9c | 2012-04-11 16:27:10 +0100 | [diff] [blame] | 2086 | # using the block-job-cancel command. |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 2087 | # |
| 2088 | # If a base file is specified then sectors are not copied from that base file and |
| 2089 | # its backing chain. When streaming completes the image file will have the base |
| 2090 | # file as its backing file. This can be used to stream a subset of the backing |
| 2091 | # file chain instead of flattening the entire image. |
| 2092 | # |
| 2093 | # On successful completion the image file is updated to drop the backing file |
| 2094 | # and the BLOCK_JOB_COMPLETED event is emitted. |
| 2095 | # |
| 2096 | # @device: the device name |
| 2097 | # |
| 2098 | # @base: #optional the common backing file name |
| 2099 | # |
Stefan Hajnoczi | c83c66c | 2012-04-25 16:51:03 +0100 | [diff] [blame] | 2100 | # @speed: #optional the maximum speed, in bytes per second |
| 2101 | # |
Paolo Bonzini | 1d80909 | 2012-09-28 17:22:59 +0200 | [diff] [blame] | 2102 | # @on-error: #optional the action to take on an error (default report). |
| 2103 | # 'stop' and 'enospc' can only be used if the block device |
| 2104 | # supports io-status (see BlockInfo). Since 1.3. |
| 2105 | # |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 2106 | # Returns: Nothing on success |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 2107 | # If @device does not exist, DeviceNotFound |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 2108 | # |
| 2109 | # Since: 1.1 |
| 2110 | ## |
Paolo Bonzini | 1d80909 | 2012-09-28 17:22:59 +0200 | [diff] [blame] | 2111 | { 'command': 'block-stream', |
| 2112 | 'data': { 'device': 'str', '*base': 'str', '*speed': 'int', |
| 2113 | '*on-error': 'BlockdevOnError' } } |
Stefan Hajnoczi | 2d47c6e | 2012-01-18 14:40:47 +0000 | [diff] [blame] | 2114 | |
| 2115 | ## |
Stefan Hajnoczi | db58f9c | 2012-04-11 16:27:10 +0100 | [diff] [blame] | 2116 | # @block-job-set-speed: |
Stefan Hajnoczi | 2d47c6e | 2012-01-18 14:40:47 +0000 | [diff] [blame] | 2117 | # |
| 2118 | # Set maximum speed for a background block operation. |
| 2119 | # |
| 2120 | # This command can only be issued when there is an active block job. |
| 2121 | # |
| 2122 | # Throttling can be disabled by setting the speed to 0. |
| 2123 | # |
| 2124 | # @device: the device name |
| 2125 | # |
Stefan Hajnoczi | c83c66c | 2012-04-25 16:51:03 +0100 | [diff] [blame] | 2126 | # @speed: the maximum speed, in bytes per second, or 0 for unlimited. |
| 2127 | # Defaults to 0. |
Stefan Hajnoczi | 2d47c6e | 2012-01-18 14:40:47 +0000 | [diff] [blame] | 2128 | # |
| 2129 | # Returns: Nothing on success |
Paolo Bonzini | 05290d8 | 2012-07-24 13:03:39 +0200 | [diff] [blame] | 2130 | # If no background operation is active on this device, DeviceNotActive |
Stefan Hajnoczi | 2d47c6e | 2012-01-18 14:40:47 +0000 | [diff] [blame] | 2131 | # |
| 2132 | # Since: 1.1 |
| 2133 | ## |
Stefan Hajnoczi | db58f9c | 2012-04-11 16:27:10 +0100 | [diff] [blame] | 2134 | { 'command': 'block-job-set-speed', |
Stefan Hajnoczi | 882ec7c | 2012-04-25 16:51:02 +0100 | [diff] [blame] | 2135 | 'data': { 'device': 'str', 'speed': 'int' } } |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 2136 | |
| 2137 | ## |
Stefan Hajnoczi | db58f9c | 2012-04-11 16:27:10 +0100 | [diff] [blame] | 2138 | # @block-job-cancel: |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 2139 | # |
Paolo Bonzini | 05290d8 | 2012-07-24 13:03:39 +0200 | [diff] [blame] | 2140 | # Stop an active background block operation. |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 2141 | # |
Paolo Bonzini | 05290d8 | 2012-07-24 13:03:39 +0200 | [diff] [blame] | 2142 | # This command returns immediately after marking the active background block |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 2143 | # operation for cancellation. It is an error to call this command if no |
| 2144 | # operation is in progress. |
| 2145 | # |
| 2146 | # The operation will cancel as soon as possible and then emit the |
| 2147 | # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when |
| 2148 | # enumerated using query-block-jobs. |
| 2149 | # |
Paolo Bonzini | 05290d8 | 2012-07-24 13:03:39 +0200 | [diff] [blame] | 2150 | # For streaming, the image file retains its backing file unless the streaming |
| 2151 | # operation happens to complete just as it is being cancelled. A new streaming |
| 2152 | # operation can be started at a later time to finish copying all data from the |
| 2153 | # backing file. |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 2154 | # |
| 2155 | # @device: the device name |
| 2156 | # |
Paolo Bonzini | 6e37fb8 | 2012-09-28 17:22:51 +0200 | [diff] [blame] | 2157 | # @force: #optional whether to allow cancellation of a paused job (default |
| 2158 | # false). Since 1.3. |
| 2159 | # |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 2160 | # Returns: Nothing on success |
Paolo Bonzini | 05290d8 | 2012-07-24 13:03:39 +0200 | [diff] [blame] | 2161 | # If no background operation is active on this device, DeviceNotActive |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 2162 | # |
| 2163 | # Since: 1.1 |
| 2164 | ## |
Paolo Bonzini | 6e37fb8 | 2012-09-28 17:22:51 +0200 | [diff] [blame] | 2165 | { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } } |
| 2166 | |
| 2167 | ## |
| 2168 | # @block-job-pause: |
| 2169 | # |
| 2170 | # Pause an active background block operation. |
| 2171 | # |
| 2172 | # This command returns immediately after marking the active background block |
| 2173 | # operation for pausing. It is an error to call this command if no |
| 2174 | # operation is in progress. Pausing an already paused job has no cumulative |
| 2175 | # effect; a single block-job-resume command will resume the job. |
| 2176 | # |
| 2177 | # The operation will pause as soon as possible. No event is emitted when |
| 2178 | # the operation is actually paused. Cancelling a paused job automatically |
| 2179 | # resumes it. |
| 2180 | # |
| 2181 | # @device: the device name |
| 2182 | # |
| 2183 | # Returns: Nothing on success |
| 2184 | # If no background operation is active on this device, DeviceNotActive |
| 2185 | # |
| 2186 | # Since: 1.3 |
| 2187 | ## |
| 2188 | { 'command': 'block-job-pause', 'data': { 'device': 'str' } } |
| 2189 | |
| 2190 | ## |
| 2191 | # @block-job-resume: |
| 2192 | # |
| 2193 | # Resume an active background block operation. |
| 2194 | # |
| 2195 | # This command returns immediately after resuming a paused background block |
| 2196 | # operation. It is an error to call this command if no operation is in |
| 2197 | # progress. Resuming an already running job is not an error. |
| 2198 | # |
Paolo Bonzini | 32c81a4 | 2012-09-28 17:22:58 +0200 | [diff] [blame] | 2199 | # This command also clears the error status of the job. |
| 2200 | # |
Paolo Bonzini | 6e37fb8 | 2012-09-28 17:22:51 +0200 | [diff] [blame] | 2201 | # @device: the device name |
| 2202 | # |
| 2203 | # Returns: Nothing on success |
| 2204 | # If no background operation is active on this device, DeviceNotActive |
| 2205 | # |
| 2206 | # Since: 1.3 |
| 2207 | ## |
| 2208 | { 'command': 'block-job-resume', 'data': { 'device': 'str' } } |
Anthony Liguori | 5eeee3f | 2011-12-22 14:40:54 -0600 | [diff] [blame] | 2209 | |
| 2210 | ## |
Paolo Bonzini | aeae883 | 2012-10-18 16:49:21 +0200 | [diff] [blame] | 2211 | # @block-job-complete: |
| 2212 | # |
| 2213 | # Manually trigger completion of an active background block operation. This |
| 2214 | # is supported for drive mirroring, where it also switches the device to |
Paolo Bonzini | a66a2a3 | 2012-07-23 15:15:47 +0200 | [diff] [blame] | 2215 | # write to the target path only. The ability to complete is signaled with |
| 2216 | # a BLOCK_JOB_READY event. |
Paolo Bonzini | aeae883 | 2012-10-18 16:49:21 +0200 | [diff] [blame] | 2217 | # |
| 2218 | # This command completes an active background block operation synchronously. |
| 2219 | # The ordering of this command's return with the BLOCK_JOB_COMPLETED event |
| 2220 | # is not defined. Note that if an I/O error occurs during the processing of |
| 2221 | # this command: 1) the command itself will fail; 2) the error will be processed |
| 2222 | # according to the rerror/werror arguments that were specified when starting |
| 2223 | # the operation. |
| 2224 | # |
| 2225 | # A cancelled or paused job cannot be completed. |
| 2226 | # |
| 2227 | # @device: the device name |
| 2228 | # |
| 2229 | # Returns: Nothing on success |
| 2230 | # If no background operation is active on this device, DeviceNotActive |
| 2231 | # |
| 2232 | # Since: 1.3 |
| 2233 | ## |
| 2234 | { 'command': 'block-job-complete', 'data': { 'device': 'str' } } |
| 2235 | |
| 2236 | ## |
Anthony Liguori | 5eeee3f | 2011-12-22 14:40:54 -0600 | [diff] [blame] | 2237 | # @ObjectTypeInfo: |
| 2238 | # |
| 2239 | # This structure describes a search result from @qom-list-types |
| 2240 | # |
| 2241 | # @name: the type name found in the search |
| 2242 | # |
| 2243 | # Since: 1.1 |
| 2244 | # |
| 2245 | # Notes: This command is experimental and may change syntax in future releases. |
| 2246 | ## |
| 2247 | { 'type': 'ObjectTypeInfo', |
| 2248 | 'data': { 'name': 'str' } } |
| 2249 | |
| 2250 | ## |
| 2251 | # @qom-list-types: |
| 2252 | # |
| 2253 | # This command will return a list of types given search parameters |
| 2254 | # |
| 2255 | # @implements: if specified, only return types that implement this type name |
| 2256 | # |
| 2257 | # @abstract: if true, include abstract types in the results |
| 2258 | # |
| 2259 | # Returns: a list of @ObjectTypeInfo or an empty list if no results are found |
| 2260 | # |
| 2261 | # Since: 1.1 |
Anthony Liguori | 5eeee3f | 2011-12-22 14:40:54 -0600 | [diff] [blame] | 2262 | ## |
| 2263 | { 'command': 'qom-list-types', |
| 2264 | 'data': { '*implements': 'str', '*abstract': 'bool' }, |
| 2265 | 'returns': [ 'ObjectTypeInfo' ] } |
Luiz Capitulino | e1c37d0 | 2011-12-05 14:48:01 -0200 | [diff] [blame] | 2266 | |
| 2267 | ## |
Anthony Liguori | 1daa31b | 2012-08-10 11:04:09 -0500 | [diff] [blame] | 2268 | # @DevicePropertyInfo: |
| 2269 | # |
| 2270 | # Information about device properties. |
| 2271 | # |
| 2272 | # @name: the name of the property |
| 2273 | # @type: the typename of the property |
| 2274 | # |
| 2275 | # Since: 1.2 |
| 2276 | ## |
| 2277 | { 'type': 'DevicePropertyInfo', |
| 2278 | 'data': { 'name': 'str', 'type': 'str' } } |
| 2279 | |
| 2280 | ## |
| 2281 | # @device-list-properties: |
| 2282 | # |
| 2283 | # List properties associated with a device. |
| 2284 | # |
| 2285 | # @typename: the type name of a device |
| 2286 | # |
| 2287 | # Returns: a list of DevicePropertyInfo describing a devices properties |
| 2288 | # |
| 2289 | # Since: 1.2 |
| 2290 | ## |
| 2291 | { 'command': 'device-list-properties', |
| 2292 | 'data': { 'typename': 'str'}, |
| 2293 | 'returns': [ 'DevicePropertyInfo' ] } |
| 2294 | |
| 2295 | ## |
Luiz Capitulino | e1c37d0 | 2011-12-05 14:48:01 -0200 | [diff] [blame] | 2296 | # @migrate |
| 2297 | # |
| 2298 | # Migrates the current running guest to another Virtual Machine. |
| 2299 | # |
| 2300 | # @uri: the Uniform Resource Identifier of the destination VM |
| 2301 | # |
| 2302 | # @blk: #optional do block migration (full disk copy) |
| 2303 | # |
| 2304 | # @inc: #optional incremental disk copy migration |
| 2305 | # |
| 2306 | # @detach: this argument exists only for compatibility reasons and |
| 2307 | # is ignored by QEMU |
| 2308 | # |
| 2309 | # Returns: nothing on success |
| 2310 | # |
| 2311 | # Since: 0.14.0 |
| 2312 | ## |
| 2313 | { 'command': 'migrate', |
| 2314 | 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } } |
Anthony Liguori | 33cf629 | 2012-03-19 13:39:42 -0500 | [diff] [blame] | 2315 | |
Stefano Stabellini | a7ae835 | 2012-01-25 12:24:51 +0000 | [diff] [blame] | 2316 | # @xen-save-devices-state: |
| 2317 | # |
| 2318 | # Save the state of all devices to file. The RAM and the block devices |
| 2319 | # of the VM are not saved by this command. |
| 2320 | # |
| 2321 | # @filename: the file to save the state of the devices to as binary |
| 2322 | # data. See xen-save-devices-state.txt for a description of the binary |
| 2323 | # format. |
| 2324 | # |
| 2325 | # Returns: Nothing on success |
Stefano Stabellini | a7ae835 | 2012-01-25 12:24:51 +0000 | [diff] [blame] | 2326 | # |
| 2327 | # Since: 1.1 |
| 2328 | ## |
| 2329 | { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} } |
Luiz Capitulino | a15fef2 | 2012-03-29 12:38:50 -0300 | [diff] [blame] | 2330 | |
| 2331 | ## |
Anthony PERARD | 39f4243 | 2012-10-03 13:48:19 +0000 | [diff] [blame] | 2332 | # @xen-set-global-dirty-log |
| 2333 | # |
| 2334 | # Enable or disable the global dirty log mode. |
| 2335 | # |
| 2336 | # @enable: true to enable, false to disable. |
| 2337 | # |
| 2338 | # Returns: nothing |
| 2339 | # |
| 2340 | # Since: 1.3 |
| 2341 | ## |
| 2342 | { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } |
| 2343 | |
| 2344 | ## |
Luiz Capitulino | a15fef2 | 2012-03-29 12:38:50 -0300 | [diff] [blame] | 2345 | # @device_del: |
| 2346 | # |
| 2347 | # Remove a device from a guest |
| 2348 | # |
| 2349 | # @id: the name of the device |
| 2350 | # |
| 2351 | # Returns: Nothing on success |
| 2352 | # If @id is not a valid device, DeviceNotFound |
Luiz Capitulino | a15fef2 | 2012-03-29 12:38:50 -0300 | [diff] [blame] | 2353 | # |
| 2354 | # Notes: When this command completes, the device may not be removed from the |
| 2355 | # guest. Hot removal is an operation that requires guest cooperation. |
| 2356 | # This command merely requests that the guest begin the hot removal |
| 2357 | # process. |
| 2358 | # |
| 2359 | # Since: 0.14.0 |
| 2360 | ## |
| 2361 | { 'command': 'device_del', 'data': {'id': 'str'} } |
Wen Congyang | 783e9b4 | 2012-05-07 12:10:47 +0800 | [diff] [blame] | 2362 | |
| 2363 | ## |
| 2364 | # @dump-guest-memory |
| 2365 | # |
| 2366 | # Dump guest's memory to vmcore. It is a synchronous operation that can take |
| 2367 | # very long depending on the amount of guest memory. This command is only |
Luiz Capitulino | f5b0d93 | 2012-06-28 11:59:15 -0300 | [diff] [blame] | 2368 | # supported on i386 and x86_64. |
Wen Congyang | 783e9b4 | 2012-05-07 12:10:47 +0800 | [diff] [blame] | 2369 | # |
Luiz Capitulino | f5b0d93 | 2012-06-28 11:59:15 -0300 | [diff] [blame] | 2370 | # @paging: if true, do paging to get guest's memory mapping. This allows |
Luiz Capitulino | d691180 | 2012-09-21 13:10:58 -0300 | [diff] [blame] | 2371 | # using gdb to process the core file. |
Luiz Capitulino | f5b0d93 | 2012-06-28 11:59:15 -0300 | [diff] [blame] | 2372 | # |
Luiz Capitulino | d691180 | 2012-09-21 13:10:58 -0300 | [diff] [blame] | 2373 | # IMPORTANT: this option can make QEMU allocate several gigabytes |
| 2374 | # of RAM. This can happen for a large guest, or a |
| 2375 | # malicious guest pretending to be large. |
| 2376 | # |
| 2377 | # Also, paging=true has the following limitations: |
| 2378 | # |
| 2379 | # 1. The guest may be in a catastrophic state or can have corrupted |
| 2380 | # memory, which cannot be trusted |
| 2381 | # 2. The guest can be in real-mode even if paging is enabled. For |
| 2382 | # example, the guest uses ACPI to sleep, and ACPI sleep state |
| 2383 | # goes in real-mode |
Luiz Capitulino | f5b0d93 | 2012-06-28 11:59:15 -0300 | [diff] [blame] | 2384 | # |
Wen Congyang | 783e9b4 | 2012-05-07 12:10:47 +0800 | [diff] [blame] | 2385 | # @protocol: the filename or file descriptor of the vmcore. The supported |
Luiz Capitulino | d691180 | 2012-09-21 13:10:58 -0300 | [diff] [blame] | 2386 | # protocols are: |
Luiz Capitulino | f5b0d93 | 2012-06-28 11:59:15 -0300 | [diff] [blame] | 2387 | # |
Luiz Capitulino | d691180 | 2012-09-21 13:10:58 -0300 | [diff] [blame] | 2388 | # 1. file: the protocol starts with "file:", and the following |
| 2389 | # string is the file's path. |
| 2390 | # 2. fd: the protocol starts with "fd:", and the following string |
| 2391 | # is the fd's name. |
Luiz Capitulino | f5b0d93 | 2012-06-28 11:59:15 -0300 | [diff] [blame] | 2392 | # |
Wen Congyang | 783e9b4 | 2012-05-07 12:10:47 +0800 | [diff] [blame] | 2393 | # @begin: #optional if specified, the starting physical address. |
Luiz Capitulino | f5b0d93 | 2012-06-28 11:59:15 -0300 | [diff] [blame] | 2394 | # |
Wen Congyang | 783e9b4 | 2012-05-07 12:10:47 +0800 | [diff] [blame] | 2395 | # @length: #optional if specified, the memory size, in bytes. If you don't |
Luiz Capitulino | d691180 | 2012-09-21 13:10:58 -0300 | [diff] [blame] | 2396 | # want to dump all guest's memory, please specify the start @begin |
| 2397 | # and @length |
Wen Congyang | 783e9b4 | 2012-05-07 12:10:47 +0800 | [diff] [blame] | 2398 | # |
| 2399 | # Returns: nothing on success |
Wen Congyang | 783e9b4 | 2012-05-07 12:10:47 +0800 | [diff] [blame] | 2400 | # |
| 2401 | # Since: 1.2 |
| 2402 | ## |
| 2403 | { 'command': 'dump-guest-memory', |
| 2404 | 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int', |
| 2405 | '*length': 'int' } } |
Luiz Capitulino | d691180 | 2012-09-21 13:10:58 -0300 | [diff] [blame] | 2406 | |
Luiz Capitulino | 928059a | 2012-04-18 17:34:15 -0300 | [diff] [blame] | 2407 | ## |
| 2408 | # @netdev_add: |
| 2409 | # |
| 2410 | # Add a network backend. |
| 2411 | # |
| 2412 | # @type: the type of network backend. Current valid values are 'user', 'tap', |
| 2413 | # 'vde', 'socket', 'dump' and 'bridge' |
| 2414 | # |
| 2415 | # @id: the name of the new network backend |
| 2416 | # |
| 2417 | # @props: #optional a list of properties to be passed to the backend in |
| 2418 | # the format 'name=value', like 'ifname=tap0,script=no' |
| 2419 | # |
| 2420 | # Notes: The semantics of @props is not well defined. Future commands will be |
| 2421 | # introduced that provide stronger typing for backend creation. |
| 2422 | # |
| 2423 | # Since: 0.14.0 |
| 2424 | # |
| 2425 | # Returns: Nothing on success |
| 2426 | # If @type is not a valid network backend, DeviceNotFound |
Luiz Capitulino | 928059a | 2012-04-18 17:34:15 -0300 | [diff] [blame] | 2427 | ## |
| 2428 | { 'command': 'netdev_add', |
| 2429 | 'data': {'type': 'str', 'id': 'str', '*props': '**'}, |
| 2430 | 'gen': 'no' } |
Luiz Capitulino | 5f96415 | 2012-04-16 14:36:32 -0300 | [diff] [blame] | 2431 | |
| 2432 | ## |
| 2433 | # @netdev_del: |
| 2434 | # |
| 2435 | # Remove a network backend. |
| 2436 | # |
| 2437 | # @id: the name of the network backend to remove |
| 2438 | # |
| 2439 | # Returns: Nothing on success |
| 2440 | # If @id is not a valid network backend, DeviceNotFound |
| 2441 | # |
| 2442 | # Since: 0.14.0 |
| 2443 | ## |
| 2444 | { 'command': 'netdev_del', 'data': {'id': 'str'} } |
Corey Bryant | 208c9d1 | 2012-06-22 14:36:09 -0400 | [diff] [blame] | 2445 | |
| 2446 | ## |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2447 | # @NetdevNoneOptions |
| 2448 | # |
| 2449 | # Use it alone to have zero network devices. |
| 2450 | # |
| 2451 | # Since 1.2 |
| 2452 | ## |
| 2453 | { 'type': 'NetdevNoneOptions', |
| 2454 | 'data': { } } |
| 2455 | |
| 2456 | ## |
| 2457 | # @NetLegacyNicOptions |
| 2458 | # |
| 2459 | # Create a new Network Interface Card. |
| 2460 | # |
| 2461 | # @netdev: #optional id of -netdev to connect to |
| 2462 | # |
| 2463 | # @macaddr: #optional MAC address |
| 2464 | # |
| 2465 | # @model: #optional device model (e1000, rtl8139, virtio etc.) |
| 2466 | # |
| 2467 | # @addr: #optional PCI device address |
| 2468 | # |
| 2469 | # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X |
| 2470 | # |
| 2471 | # Since 1.2 |
| 2472 | ## |
| 2473 | { 'type': 'NetLegacyNicOptions', |
| 2474 | 'data': { |
| 2475 | '*netdev': 'str', |
| 2476 | '*macaddr': 'str', |
| 2477 | '*model': 'str', |
| 2478 | '*addr': 'str', |
| 2479 | '*vectors': 'uint32' } } |
| 2480 | |
| 2481 | ## |
| 2482 | # @String |
| 2483 | # |
| 2484 | # A fat type wrapping 'str', to be embedded in lists. |
| 2485 | # |
| 2486 | # Since 1.2 |
| 2487 | ## |
| 2488 | { 'type': 'String', |
| 2489 | 'data': { |
| 2490 | 'str': 'str' } } |
| 2491 | |
| 2492 | ## |
| 2493 | # @NetdevUserOptions |
| 2494 | # |
| 2495 | # Use the user mode network stack which requires no administrator privilege to |
| 2496 | # run. |
| 2497 | # |
| 2498 | # @hostname: #optional client hostname reported by the builtin DHCP server |
| 2499 | # |
| 2500 | # @restrict: #optional isolate the guest from the host |
| 2501 | # |
| 2502 | # @ip: #optional legacy parameter, use net= instead |
| 2503 | # |
| 2504 | # @net: #optional IP address and optional netmask |
| 2505 | # |
| 2506 | # @host: #optional guest-visible address of the host |
| 2507 | # |
| 2508 | # @tftp: #optional root directory of the built-in TFTP server |
| 2509 | # |
| 2510 | # @bootfile: #optional BOOTP filename, for use with tftp= |
| 2511 | # |
| 2512 | # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can |
| 2513 | # assign |
| 2514 | # |
| 2515 | # @dns: #optional guest-visible address of the virtual nameserver |
| 2516 | # |
Klaus Stengel | 63d2960 | 2012-10-27 19:53:39 +0200 | [diff] [blame] | 2517 | # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option |
| 2518 | # to the guest |
| 2519 | # |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2520 | # @smb: #optional root directory of the built-in SMB server |
| 2521 | # |
| 2522 | # @smbserver: #optional IP address of the built-in SMB server |
| 2523 | # |
| 2524 | # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest |
| 2525 | # endpoints |
| 2526 | # |
| 2527 | # @guestfwd: #optional forward guest TCP connections |
| 2528 | # |
| 2529 | # Since 1.2 |
| 2530 | ## |
| 2531 | { 'type': 'NetdevUserOptions', |
| 2532 | 'data': { |
| 2533 | '*hostname': 'str', |
| 2534 | '*restrict': 'bool', |
| 2535 | '*ip': 'str', |
| 2536 | '*net': 'str', |
| 2537 | '*host': 'str', |
| 2538 | '*tftp': 'str', |
| 2539 | '*bootfile': 'str', |
| 2540 | '*dhcpstart': 'str', |
| 2541 | '*dns': 'str', |
Klaus Stengel | 63d2960 | 2012-10-27 19:53:39 +0200 | [diff] [blame] | 2542 | '*dnssearch': ['String'], |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2543 | '*smb': 'str', |
| 2544 | '*smbserver': 'str', |
| 2545 | '*hostfwd': ['String'], |
| 2546 | '*guestfwd': ['String'] } } |
| 2547 | |
| 2548 | ## |
| 2549 | # @NetdevTapOptions |
| 2550 | # |
| 2551 | # Connect the host TAP network interface name to the VLAN. |
| 2552 | # |
| 2553 | # @ifname: #optional interface name |
| 2554 | # |
| 2555 | # @fd: #optional file descriptor of an already opened tap |
| 2556 | # |
Jason Wang | 2ca81ba | 2013-02-20 18:04:01 +0800 | [diff] [blame] | 2557 | # @fds: #optional multiple file descriptors of already opened multiqueue capable |
| 2558 | # tap |
| 2559 | # |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2560 | # @script: #optional script to initialize the interface |
| 2561 | # |
| 2562 | # @downscript: #optional script to shut down the interface |
| 2563 | # |
| 2564 | # @helper: #optional command to execute to configure bridge |
| 2565 | # |
| 2566 | # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes. |
| 2567 | # |
| 2568 | # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface |
| 2569 | # |
| 2570 | # @vhost: #optional enable vhost-net network accelerator |
| 2571 | # |
| 2572 | # @vhostfd: #optional file descriptor of an already opened vhost net device |
| 2573 | # |
Jason Wang | 2ca81ba | 2013-02-20 18:04:01 +0800 | [diff] [blame] | 2574 | # @vhostfds: #optional file descriptors of multiple already opened vhost net |
| 2575 | # devices |
| 2576 | # |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2577 | # @vhostforce: #optional vhost on for non-MSIX virtio guests |
| 2578 | # |
| 2579 | # Since 1.2 |
| 2580 | ## |
| 2581 | { 'type': 'NetdevTapOptions', |
| 2582 | 'data': { |
| 2583 | '*ifname': 'str', |
| 2584 | '*fd': 'str', |
Jason Wang | 264986e | 2013-01-30 19:12:34 +0800 | [diff] [blame] | 2585 | '*fds': 'str', |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2586 | '*script': 'str', |
| 2587 | '*downscript': 'str', |
| 2588 | '*helper': 'str', |
| 2589 | '*sndbuf': 'size', |
| 2590 | '*vnet_hdr': 'bool', |
| 2591 | '*vhost': 'bool', |
| 2592 | '*vhostfd': 'str', |
Jason Wang | 264986e | 2013-01-30 19:12:34 +0800 | [diff] [blame] | 2593 | '*vhostfds': 'str', |
| 2594 | '*vhostforce': 'bool', |
| 2595 | '*queues': 'uint32'} } |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2596 | |
| 2597 | ## |
| 2598 | # @NetdevSocketOptions |
| 2599 | # |
| 2600 | # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP |
| 2601 | # socket connection. |
| 2602 | # |
| 2603 | # @fd: #optional file descriptor of an already opened socket |
| 2604 | # |
| 2605 | # @listen: #optional port number, and optional hostname, to listen on |
| 2606 | # |
| 2607 | # @connect: #optional port number, and optional hostname, to connect to |
| 2608 | # |
| 2609 | # @mcast: #optional UDP multicast address and port number |
| 2610 | # |
| 2611 | # @localaddr: #optional source address and port for multicast and udp packets |
| 2612 | # |
| 2613 | # @udp: #optional UDP unicast address and port number |
| 2614 | # |
| 2615 | # Since 1.2 |
| 2616 | ## |
| 2617 | { 'type': 'NetdevSocketOptions', |
| 2618 | 'data': { |
| 2619 | '*fd': 'str', |
| 2620 | '*listen': 'str', |
| 2621 | '*connect': 'str', |
| 2622 | '*mcast': 'str', |
| 2623 | '*localaddr': 'str', |
| 2624 | '*udp': 'str' } } |
| 2625 | |
| 2626 | ## |
| 2627 | # @NetdevVdeOptions |
| 2628 | # |
| 2629 | # Connect the VLAN to a vde switch running on the host. |
| 2630 | # |
| 2631 | # @sock: #optional socket path |
| 2632 | # |
| 2633 | # @port: #optional port number |
| 2634 | # |
| 2635 | # @group: #optional group owner of socket |
| 2636 | # |
| 2637 | # @mode: #optional permissions for socket |
| 2638 | # |
| 2639 | # Since 1.2 |
| 2640 | ## |
| 2641 | { 'type': 'NetdevVdeOptions', |
| 2642 | 'data': { |
| 2643 | '*sock': 'str', |
| 2644 | '*port': 'uint16', |
| 2645 | '*group': 'str', |
| 2646 | '*mode': 'uint16' } } |
| 2647 | |
| 2648 | ## |
| 2649 | # @NetdevDumpOptions |
| 2650 | # |
| 2651 | # Dump VLAN network traffic to a file. |
| 2652 | # |
| 2653 | # @len: #optional per-packet size limit (64k default). Understands [TGMKkb] |
| 2654 | # suffixes. |
| 2655 | # |
| 2656 | # @file: #optional dump file path (default is qemu-vlan0.pcap) |
| 2657 | # |
| 2658 | # Since 1.2 |
| 2659 | ## |
| 2660 | { 'type': 'NetdevDumpOptions', |
| 2661 | 'data': { |
| 2662 | '*len': 'size', |
| 2663 | '*file': 'str' } } |
| 2664 | |
| 2665 | ## |
| 2666 | # @NetdevBridgeOptions |
| 2667 | # |
| 2668 | # Connect a host TAP network interface to a host bridge device. |
| 2669 | # |
| 2670 | # @br: #optional bridge name |
| 2671 | # |
| 2672 | # @helper: #optional command to execute to configure bridge |
| 2673 | # |
| 2674 | # Since 1.2 |
| 2675 | ## |
| 2676 | { 'type': 'NetdevBridgeOptions', |
| 2677 | 'data': { |
| 2678 | '*br': 'str', |
| 2679 | '*helper': 'str' } } |
| 2680 | |
| 2681 | ## |
Stefan Hajnoczi | f6c874e | 2012-07-24 16:35:04 +0100 | [diff] [blame] | 2682 | # @NetdevHubPortOptions |
| 2683 | # |
| 2684 | # Connect two or more net clients through a software hub. |
| 2685 | # |
| 2686 | # @hubid: hub identifier number |
| 2687 | # |
| 2688 | # Since 1.2 |
| 2689 | ## |
| 2690 | { 'type': 'NetdevHubPortOptions', |
| 2691 | 'data': { |
| 2692 | 'hubid': 'int32' } } |
| 2693 | |
| 2694 | ## |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2695 | # @NetClientOptions |
| 2696 | # |
| 2697 | # A discriminated record of network device traits. |
| 2698 | # |
| 2699 | # Since 1.2 |
| 2700 | ## |
| 2701 | { 'union': 'NetClientOptions', |
| 2702 | 'data': { |
Stefan Hajnoczi | f6c874e | 2012-07-24 16:35:04 +0100 | [diff] [blame] | 2703 | 'none': 'NetdevNoneOptions', |
| 2704 | 'nic': 'NetLegacyNicOptions', |
| 2705 | 'user': 'NetdevUserOptions', |
| 2706 | 'tap': 'NetdevTapOptions', |
| 2707 | 'socket': 'NetdevSocketOptions', |
| 2708 | 'vde': 'NetdevVdeOptions', |
| 2709 | 'dump': 'NetdevDumpOptions', |
| 2710 | 'bridge': 'NetdevBridgeOptions', |
| 2711 | 'hubport': 'NetdevHubPortOptions' } } |
Laszlo Ersek | 14aa0c2 | 2012-07-17 16:17:11 +0200 | [diff] [blame] | 2712 | |
| 2713 | ## |
| 2714 | # @NetLegacy |
| 2715 | # |
| 2716 | # Captures the configuration of a network device; legacy. |
| 2717 | # |
| 2718 | # @vlan: #optional vlan number |
| 2719 | # |
| 2720 | # @id: #optional identifier for monitor commands |
| 2721 | # |
| 2722 | # @name: #optional identifier for monitor commands, ignored if @id is present |
| 2723 | # |
| 2724 | # @opts: device type specific properties (legacy) |
| 2725 | # |
| 2726 | # Since 1.2 |
| 2727 | ## |
| 2728 | { 'type': 'NetLegacy', |
| 2729 | 'data': { |
| 2730 | '*vlan': 'int32', |
| 2731 | '*id': 'str', |
| 2732 | '*name': 'str', |
| 2733 | 'opts': 'NetClientOptions' } } |
| 2734 | |
| 2735 | ## |
| 2736 | # @Netdev |
| 2737 | # |
| 2738 | # Captures the configuration of a network device. |
| 2739 | # |
| 2740 | # @id: identifier for monitor commands. |
| 2741 | # |
| 2742 | # @opts: device type specific properties |
| 2743 | # |
| 2744 | # Since 1.2 |
| 2745 | ## |
| 2746 | { 'type': 'Netdev', |
| 2747 | 'data': { |
| 2748 | 'id': 'str', |
| 2749 | 'opts': 'NetClientOptions' } } |
| 2750 | |
| 2751 | ## |
Paolo Bonzini | 5be8c75 | 2012-09-19 14:03:35 +0200 | [diff] [blame] | 2752 | # @InetSocketAddress |
| 2753 | # |
| 2754 | # Captures a socket address or address range in the Internet namespace. |
| 2755 | # |
| 2756 | # @host: host part of the address |
| 2757 | # |
| 2758 | # @port: port part of the address, or lowest port if @to is present |
| 2759 | # |
| 2760 | # @to: highest port to try |
| 2761 | # |
| 2762 | # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6 |
| 2763 | # #optional |
| 2764 | # |
| 2765 | # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6 |
| 2766 | # #optional |
| 2767 | # |
| 2768 | # Since 1.3 |
| 2769 | ## |
| 2770 | { 'type': 'InetSocketAddress', |
| 2771 | 'data': { |
| 2772 | 'host': 'str', |
| 2773 | 'port': 'str', |
| 2774 | '*to': 'uint16', |
| 2775 | '*ipv4': 'bool', |
| 2776 | '*ipv6': 'bool' } } |
| 2777 | |
| 2778 | ## |
| 2779 | # @UnixSocketAddress |
| 2780 | # |
| 2781 | # Captures a socket address in the local ("Unix socket") namespace. |
| 2782 | # |
| 2783 | # @path: filesystem path to use |
| 2784 | # |
| 2785 | # Since 1.3 |
| 2786 | ## |
| 2787 | { 'type': 'UnixSocketAddress', |
| 2788 | 'data': { |
| 2789 | 'path': 'str' } } |
| 2790 | |
| 2791 | ## |
| 2792 | # @SocketAddress |
| 2793 | # |
| 2794 | # Captures the address of a socket, which could also be a named file descriptor |
| 2795 | # |
| 2796 | # Since 1.3 |
| 2797 | ## |
| 2798 | { 'union': 'SocketAddress', |
| 2799 | 'data': { |
| 2800 | 'inet': 'InetSocketAddress', |
| 2801 | 'unix': 'UnixSocketAddress', |
| 2802 | 'fd': 'String' } } |
| 2803 | |
| 2804 | ## |
Corey Bryant | 208c9d1 | 2012-06-22 14:36:09 -0400 | [diff] [blame] | 2805 | # @getfd: |
| 2806 | # |
| 2807 | # Receive a file descriptor via SCM rights and assign it a name |
| 2808 | # |
| 2809 | # @fdname: file descriptor name |
| 2810 | # |
| 2811 | # Returns: Nothing on success |
Corey Bryant | 208c9d1 | 2012-06-22 14:36:09 -0400 | [diff] [blame] | 2812 | # |
| 2813 | # Since: 0.14.0 |
| 2814 | # |
| 2815 | # Notes: If @fdname already exists, the file descriptor assigned to |
| 2816 | # it will be closed and replaced by the received file |
| 2817 | # descriptor. |
| 2818 | # The 'closefd' command can be used to explicitly close the |
| 2819 | # file descriptor when it is no longer needed. |
| 2820 | ## |
| 2821 | { 'command': 'getfd', 'data': {'fdname': 'str'} } |
| 2822 | |
| 2823 | ## |
| 2824 | # @closefd: |
| 2825 | # |
| 2826 | # Close a file descriptor previously passed via SCM rights |
| 2827 | # |
| 2828 | # @fdname: file descriptor name |
| 2829 | # |
| 2830 | # Returns: Nothing on success |
Corey Bryant | 208c9d1 | 2012-06-22 14:36:09 -0400 | [diff] [blame] | 2831 | # |
| 2832 | # Since: 0.14.0 |
| 2833 | ## |
| 2834 | { 'command': 'closefd', 'data': {'fdname': 'str'} } |
Anthony Liguori | 01d3c80 | 2012-08-10 11:04:11 -0500 | [diff] [blame] | 2835 | |
| 2836 | ## |
| 2837 | # @MachineInfo: |
| 2838 | # |
| 2839 | # Information describing a machine. |
| 2840 | # |
| 2841 | # @name: the name of the machine |
| 2842 | # |
| 2843 | # @alias: #optional an alias for the machine name |
| 2844 | # |
| 2845 | # @default: #optional whether the machine is default |
| 2846 | # |
| 2847 | # Since: 1.2.0 |
| 2848 | ## |
| 2849 | { 'type': 'MachineInfo', |
| 2850 | 'data': { 'name': 'str', '*alias': 'str', |
| 2851 | '*is-default': 'bool' } } |
| 2852 | |
| 2853 | ## |
| 2854 | # @query-machines: |
| 2855 | # |
| 2856 | # Return a list of supported machines |
| 2857 | # |
| 2858 | # Returns: a list of MachineInfo |
| 2859 | # |
| 2860 | # Since: 1.2.0 |
| 2861 | ## |
| 2862 | { 'command': 'query-machines', 'returns': ['MachineInfo'] } |
Anthony Liguori | e4e31c6 | 2012-08-10 11:04:13 -0500 | [diff] [blame] | 2863 | |
| 2864 | ## |
| 2865 | # @CpuDefinitionInfo: |
| 2866 | # |
| 2867 | # Virtual CPU definition. |
| 2868 | # |
| 2869 | # @name: the name of the CPU definition |
| 2870 | # |
| 2871 | # Since: 1.2.0 |
| 2872 | ## |
| 2873 | { 'type': 'CpuDefinitionInfo', |
| 2874 | 'data': { 'name': 'str' } } |
| 2875 | |
| 2876 | ## |
| 2877 | # @query-cpu-definitions: |
| 2878 | # |
| 2879 | # Return a list of supported virtual CPU definitions |
| 2880 | # |
| 2881 | # Returns: a list of CpuDefInfo |
| 2882 | # |
| 2883 | # Since: 1.2.0 |
| 2884 | ## |
| 2885 | { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } |
Corey Bryant | ba1c048 | 2012-08-14 16:43:43 -0400 | [diff] [blame] | 2886 | |
| 2887 | # @AddfdInfo: |
| 2888 | # |
| 2889 | # Information about a file descriptor that was added to an fd set. |
| 2890 | # |
| 2891 | # @fdset-id: The ID of the fd set that @fd was added to. |
| 2892 | # |
| 2893 | # @fd: The file descriptor that was received via SCM rights and |
| 2894 | # added to the fd set. |
| 2895 | # |
| 2896 | # Since: 1.2.0 |
| 2897 | ## |
| 2898 | { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} } |
| 2899 | |
| 2900 | ## |
| 2901 | # @add-fd: |
| 2902 | # |
| 2903 | # Add a file descriptor, that was passed via SCM rights, to an fd set. |
| 2904 | # |
| 2905 | # @fdset-id: #optional The ID of the fd set to add the file descriptor to. |
| 2906 | # |
| 2907 | # @opaque: #optional A free-form string that can be used to describe the fd. |
| 2908 | # |
| 2909 | # Returns: @AddfdInfo on success |
| 2910 | # If file descriptor was not received, FdNotSupplied |
Corey Bryant | 9ac54af | 2012-10-18 15:19:31 -0400 | [diff] [blame] | 2911 | # If @fdset-id is a negative value, InvalidParameterValue |
Corey Bryant | ba1c048 | 2012-08-14 16:43:43 -0400 | [diff] [blame] | 2912 | # |
| 2913 | # Notes: The list of fd sets is shared by all monitor connections. |
| 2914 | # |
| 2915 | # If @fdset-id is not specified, a new fd set will be created. |
| 2916 | # |
| 2917 | # Since: 1.2.0 |
| 2918 | ## |
| 2919 | { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, |
| 2920 | 'returns': 'AddfdInfo' } |
| 2921 | |
| 2922 | ## |
| 2923 | # @remove-fd: |
| 2924 | # |
| 2925 | # Remove a file descriptor from an fd set. |
| 2926 | # |
| 2927 | # @fdset-id: The ID of the fd set that the file descriptor belongs to. |
| 2928 | # |
| 2929 | # @fd: #optional The file descriptor that is to be removed. |
| 2930 | # |
| 2931 | # Returns: Nothing on success |
| 2932 | # If @fdset-id or @fd is not found, FdNotFound |
| 2933 | # |
| 2934 | # Since: 1.2.0 |
| 2935 | # |
| 2936 | # Notes: The list of fd sets is shared by all monitor connections. |
| 2937 | # |
| 2938 | # If @fd is not specified, all file descriptors in @fdset-id |
| 2939 | # will be removed. |
| 2940 | ## |
| 2941 | { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } |
| 2942 | |
| 2943 | ## |
| 2944 | # @FdsetFdInfo: |
| 2945 | # |
| 2946 | # Information about a file descriptor that belongs to an fd set. |
| 2947 | # |
| 2948 | # @fd: The file descriptor value. |
| 2949 | # |
| 2950 | # @opaque: #optional A free-form string that can be used to describe the fd. |
| 2951 | # |
| 2952 | # Since: 1.2.0 |
| 2953 | ## |
| 2954 | { 'type': 'FdsetFdInfo', |
| 2955 | 'data': {'fd': 'int', '*opaque': 'str'} } |
| 2956 | |
| 2957 | ## |
| 2958 | # @FdsetInfo: |
| 2959 | # |
| 2960 | # Information about an fd set. |
| 2961 | # |
| 2962 | # @fdset-id: The ID of the fd set. |
| 2963 | # |
| 2964 | # @fds: A list of file descriptors that belong to this fd set. |
| 2965 | # |
| 2966 | # Since: 1.2.0 |
| 2967 | ## |
| 2968 | { 'type': 'FdsetInfo', |
| 2969 | 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} } |
| 2970 | |
| 2971 | ## |
| 2972 | # @query-fdsets: |
| 2973 | # |
| 2974 | # Return information describing all fd sets. |
| 2975 | # |
| 2976 | # Returns: A list of @FdsetInfo |
| 2977 | # |
| 2978 | # Since: 1.2.0 |
| 2979 | # |
| 2980 | # Note: The list of fd sets is shared by all monitor connections. |
| 2981 | # |
| 2982 | ## |
| 2983 | { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } |
Daniel P. Berrange | 99afc91 | 2012-08-20 15:31:38 +0100 | [diff] [blame] | 2984 | |
| 2985 | ## |
| 2986 | # @TargetType |
| 2987 | # |
| 2988 | # Target CPU emulation type |
| 2989 | # |
| 2990 | # These parameters correspond to the softmmu binary CPU name that is currently |
| 2991 | # running. |
| 2992 | # |
| 2993 | # Since: 1.2.0 |
| 2994 | ## |
| 2995 | { 'enum': 'TargetType', |
| 2996 | 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel', |
| 2997 | 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32', |
| 2998 | 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64', |
| 2999 | 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] } |
| 3000 | |
| 3001 | ## |
| 3002 | # @TargetInfo: |
| 3003 | # |
| 3004 | # Information describing the QEMU target. |
| 3005 | # |
| 3006 | # @arch: the target architecture (eg "x86_64", "i386", etc) |
| 3007 | # |
| 3008 | # Since: 1.2.0 |
| 3009 | ## |
| 3010 | { 'type': 'TargetInfo', |
| 3011 | 'data': { 'arch': 'TargetType' } } |
| 3012 | |
| 3013 | ## |
| 3014 | # @query-target: |
| 3015 | # |
| 3016 | # Return information about the target for this QEMU |
| 3017 | # |
| 3018 | # Returns: TargetInfo |
| 3019 | # |
| 3020 | # Since: 1.2.0 |
| 3021 | ## |
| 3022 | { 'command': 'query-target', 'returns': 'TargetInfo' } |
Amos Kong | 411656f | 2012-08-31 10:56:24 +0800 | [diff] [blame] | 3023 | |
| 3024 | ## |
| 3025 | # @QKeyCode: |
| 3026 | # |
| 3027 | # An enumeration of key name. |
| 3028 | # |
| 3029 | # This is used by the send-key command. |
| 3030 | # |
| 3031 | # Since: 1.3.0 |
| 3032 | ## |
| 3033 | { 'enum': 'QKeyCode', |
| 3034 | 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl', |
| 3035 | 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8', |
| 3036 | '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e', |
| 3037 | 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right', |
| 3038 | 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon', |
| 3039 | 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b', |
| 3040 | 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock', |
| 3041 | 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', |
| 3042 | 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply', |
| 3043 | 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0', |
| 3044 | 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8', |
| 3045 | 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', |
| 3046 | 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', |
| 3047 | 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', |
| 3048 | 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] } |
Amos Kong | e4c8f00 | 2012-08-31 10:56:26 +0800 | [diff] [blame] | 3049 | |
| 3050 | ## |
Luiz Capitulino | 9f32897 | 2012-09-20 14:19:47 -0300 | [diff] [blame] | 3051 | # @KeyValue |
| 3052 | # |
| 3053 | # Represents a keyboard key. |
| 3054 | # |
| 3055 | # Since: 1.3.0 |
| 3056 | ## |
| 3057 | { 'union': 'KeyValue', |
| 3058 | 'data': { |
| 3059 | 'number': 'int', |
| 3060 | 'qcode': 'QKeyCode' } } |
| 3061 | |
| 3062 | ## |
Amos Kong | e4c8f00 | 2012-08-31 10:56:26 +0800 | [diff] [blame] | 3063 | # @send-key: |
| 3064 | # |
| 3065 | # Send keys to guest. |
| 3066 | # |
Luiz Capitulino | 9f32897 | 2012-09-20 14:19:47 -0300 | [diff] [blame] | 3067 | # @keys: An array of @KeyValue elements. All @KeyValues in this array are |
| 3068 | # simultaneously sent to the guest. A @KeyValue.number value is sent |
| 3069 | # directly to the guest, while @KeyValue.qcode must be a valid |
| 3070 | # @QKeyCode value |
Amos Kong | e4c8f00 | 2012-08-31 10:56:26 +0800 | [diff] [blame] | 3071 | # |
| 3072 | # @hold-time: #optional time to delay key up events, milliseconds. Defaults |
| 3073 | # to 100 |
| 3074 | # |
| 3075 | # Returns: Nothing on success |
| 3076 | # If key is unknown or redundant, InvalidParameter |
| 3077 | # |
| 3078 | # Since: 1.3.0 |
| 3079 | # |
| 3080 | ## |
| 3081 | { 'command': 'send-key', |
Luiz Capitulino | 9f32897 | 2012-09-20 14:19:47 -0300 | [diff] [blame] | 3082 | 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } } |
Luiz Capitulino | ad39cf6 | 2012-05-24 13:48:23 -0300 | [diff] [blame] | 3083 | |
| 3084 | ## |
| 3085 | # @screendump: |
| 3086 | # |
| 3087 | # Write a PPM of the VGA screen to a file. |
| 3088 | # |
| 3089 | # @filename: the path of a new PPM file to store the image |
| 3090 | # |
| 3091 | # Returns: Nothing on success |
| 3092 | # |
| 3093 | # Since: 0.14.0 |
| 3094 | ## |
| 3095 | { 'command': 'screendump', 'data': {'filename': 'str'} } |
Paolo Bonzini | 6dd844d | 2012-08-22 16:43:07 +0200 | [diff] [blame] | 3096 | |
| 3097 | ## |
| 3098 | # @nbd-server-start: |
| 3099 | # |
| 3100 | # Start an NBD server listening on the given host and port. Block |
| 3101 | # devices can then be exported using @nbd-server-add. The NBD |
| 3102 | # server will present them as named exports; for example, another |
| 3103 | # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME". |
| 3104 | # |
| 3105 | # @addr: Address on which to listen. |
| 3106 | # |
| 3107 | # Returns: error if the server is already running. |
| 3108 | # |
| 3109 | # Since: 1.3.0 |
| 3110 | ## |
| 3111 | { 'command': 'nbd-server-start', |
| 3112 | 'data': { 'addr': 'SocketAddress' } } |
| 3113 | |
| 3114 | ## |
| 3115 | # @nbd-server-add: |
| 3116 | # |
| 3117 | # Export a device to QEMU's embedded NBD server. |
| 3118 | # |
| 3119 | # @device: Block device to be exported |
| 3120 | # |
| 3121 | # @writable: Whether clients should be able to write to the device via the |
| 3122 | # NBD connection (default false). #optional |
| 3123 | # |
| 3124 | # Returns: error if the device is already marked for export. |
| 3125 | # |
| 3126 | # Since: 1.3.0 |
| 3127 | ## |
| 3128 | { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} } |
| 3129 | |
| 3130 | ## |
| 3131 | # @nbd-server-stop: |
| 3132 | # |
| 3133 | # Stop QEMU's embedded NBD server, and unregister all devices previously |
| 3134 | # added via @nbd-server-add. |
| 3135 | # |
| 3136 | # Since: 1.3.0 |
| 3137 | ## |
| 3138 | { 'command': 'nbd-server-stop' } |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3139 | |
| 3140 | ## |
Gerd Hoffmann | ffbdbe5 | 2012-12-19 13:13:57 +0100 | [diff] [blame] | 3141 | # @ChardevFile: |
| 3142 | # |
| 3143 | # Configuration info for file chardevs. |
| 3144 | # |
| 3145 | # @in: #optional The name of the input file |
| 3146 | # @out: The name of the output file |
| 3147 | # |
| 3148 | # Since: 1.4 |
| 3149 | ## |
| 3150 | { 'type': 'ChardevFile', 'data': { '*in' : 'str', |
| 3151 | 'out' : 'str' } } |
| 3152 | |
| 3153 | ## |
Markus Armbruster | d36b2b9 | 2013-02-13 15:54:16 +0100 | [diff] [blame] | 3154 | # @ChardevHostdev: |
Gerd Hoffmann | d59044e | 2012-12-19 13:50:29 +0100 | [diff] [blame] | 3155 | # |
Gerd Hoffmann | 548cbb3 | 2013-02-25 11:50:55 +0100 | [diff] [blame] | 3156 | # Configuration info for device and pipe chardevs. |
Gerd Hoffmann | d59044e | 2012-12-19 13:50:29 +0100 | [diff] [blame] | 3157 | # |
| 3158 | # @device: The name of the special file for the device, |
| 3159 | # i.e. /dev/ttyS0 on Unix or COM1: on Windows |
| 3160 | # @type: What kind of device this is. |
| 3161 | # |
| 3162 | # Since: 1.4 |
| 3163 | ## |
Markus Armbruster | d36b2b9 | 2013-02-13 15:54:16 +0100 | [diff] [blame] | 3164 | { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } } |
Gerd Hoffmann | d59044e | 2012-12-19 13:50:29 +0100 | [diff] [blame] | 3165 | |
| 3166 | ## |
Gerd Hoffmann | f6bd5d6 | 2012-12-20 13:53:12 +0100 | [diff] [blame] | 3167 | # @ChardevSocket: |
| 3168 | # |
Gerd Hoffmann | 3ecc059 | 2013-02-27 14:10:47 +0100 | [diff] [blame] | 3169 | # Configuration info for (stream) socket chardevs. |
Gerd Hoffmann | f6bd5d6 | 2012-12-20 13:53:12 +0100 | [diff] [blame] | 3170 | # |
| 3171 | # @addr: socket address to listen on (server=true) |
| 3172 | # or connect to (server=false) |
| 3173 | # @server: #optional create server socket (default: true) |
| 3174 | # @wait: #optional wait for connect (not used for server |
| 3175 | # sockets, default: false) |
| 3176 | # @nodelay: #optional set TCP_NODELAY socket option (default: false) |
| 3177 | # @telnet: #optional enable telnet protocol (default: false) |
| 3178 | # |
| 3179 | # Since: 1.4 |
| 3180 | ## |
| 3181 | { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress', |
| 3182 | '*server' : 'bool', |
| 3183 | '*wait' : 'bool', |
| 3184 | '*nodelay' : 'bool', |
| 3185 | '*telnet' : 'bool' } } |
| 3186 | |
| 3187 | ## |
Gerd Hoffmann | 3ecc059 | 2013-02-27 14:10:47 +0100 | [diff] [blame] | 3188 | # @ChardevDgram: |
| 3189 | # |
| 3190 | # Configuration info for datagram socket chardevs. |
| 3191 | # |
| 3192 | # @remote: remote address |
| 3193 | # @local: #optional local address |
| 3194 | # |
| 3195 | # Since: 1.5 |
| 3196 | ## |
| 3197 | { 'type': 'ChardevDgram', 'data': { 'remote' : 'SocketAddress', |
| 3198 | '*local' : 'SocketAddress' } } |
| 3199 | |
| 3200 | ## |
Gerd Hoffmann | edb2fb3 | 2013-02-21 16:16:42 +0100 | [diff] [blame] | 3201 | # @ChardevMux: |
| 3202 | # |
| 3203 | # Configuration info for mux chardevs. |
| 3204 | # |
| 3205 | # @chardev: name of the base chardev. |
| 3206 | # |
| 3207 | # Since: 1.5 |
| 3208 | ## |
| 3209 | { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } } |
| 3210 | |
| 3211 | ## |
Gerd Hoffmann | 7c35803 | 2013-02-21 12:34:58 +0100 | [diff] [blame] | 3212 | # @ChardevStdio: |
| 3213 | # |
| 3214 | # Configuration info for stdio chardevs. |
| 3215 | # |
| 3216 | # @signal: #optional Allow signals (such as SIGINT triggered by ^C) |
| 3217 | # be delivered to qemu. Default: true in -nographic mode, |
| 3218 | # false otherwise. |
| 3219 | # |
| 3220 | # Since: 1.5 |
| 3221 | ## |
| 3222 | { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } } |
| 3223 | |
| 3224 | ## |
Gerd Hoffmann | cd153e2 | 2013-02-25 12:39:06 +0100 | [diff] [blame] | 3225 | # @ChardevSpiceChannel: |
| 3226 | # |
| 3227 | # Configuration info for spice vm channel chardevs. |
| 3228 | # |
| 3229 | # @type: kind of channel (for example vdagent). |
| 3230 | # |
| 3231 | # Since: 1.5 |
| 3232 | ## |
| 3233 | { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } } |
| 3234 | |
| 3235 | ## |
| 3236 | # @ChardevSpicePort: |
| 3237 | # |
| 3238 | # Configuration info for spice port chardevs. |
| 3239 | # |
| 3240 | # @fqdn: name of the channel (see docs/spice-port-fqdn.txt) |
| 3241 | # |
| 3242 | # Since: 1.5 |
| 3243 | ## |
| 3244 | { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } } |
| 3245 | |
| 3246 | ## |
Gerd Hoffmann | 702ec69 | 2013-02-25 15:52:32 +0100 | [diff] [blame] | 3247 | # @ChardevVC: |
| 3248 | # |
| 3249 | # Configuration info for virtual console chardevs. |
| 3250 | # |
| 3251 | # @width: console width, in pixels |
| 3252 | # @height: console height, in pixels |
| 3253 | # @cols: console width, in chars |
| 3254 | # @rows: console height, in chars |
| 3255 | # |
| 3256 | # Since: 1.5 |
| 3257 | ## |
| 3258 | { 'type': 'ChardevVC', 'data': { '*width' : 'int', |
| 3259 | '*height' : 'int', |
| 3260 | '*cols' : 'int', |
| 3261 | '*rows' : 'int' } } |
| 3262 | |
| 3263 | ## |
Gerd Hoffmann | 1da48c6 | 2013-02-26 16:21:11 +0100 | [diff] [blame] | 3264 | # @ChardevRingbuf: |
| 3265 | # |
| 3266 | # Configuration info for memory chardevs |
| 3267 | # |
| 3268 | # @size: #optional Ringbuffer size, must be power of two, default is 65536 |
| 3269 | # |
| 3270 | # Since: 1.5 |
| 3271 | ## |
| 3272 | { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } } |
| 3273 | |
| 3274 | ## |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3275 | # @ChardevBackend: |
| 3276 | # |
| 3277 | # Configuration info for the new chardev backend. |
| 3278 | # |
| 3279 | # Since: 1.4 |
| 3280 | ## |
| 3281 | { 'type': 'ChardevDummy', 'data': { } } |
| 3282 | |
Gerd Hoffmann | f6bd5d6 | 2012-12-20 13:53:12 +0100 | [diff] [blame] | 3283 | { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile', |
Markus Armbruster | d36b2b9 | 2013-02-13 15:54:16 +0100 | [diff] [blame] | 3284 | 'serial' : 'ChardevHostdev', |
| 3285 | 'parallel': 'ChardevHostdev', |
Gerd Hoffmann | 548cbb3 | 2013-02-25 11:50:55 +0100 | [diff] [blame] | 3286 | 'pipe' : 'ChardevHostdev', |
Gerd Hoffmann | f6bd5d6 | 2012-12-20 13:53:12 +0100 | [diff] [blame] | 3287 | 'socket' : 'ChardevSocket', |
Gerd Hoffmann | 3ecc059 | 2013-02-27 14:10:47 +0100 | [diff] [blame] | 3288 | 'dgram' : 'ChardevDgram', |
Gerd Hoffmann | 0a1a7fa | 2012-12-20 14:39:13 +0100 | [diff] [blame] | 3289 | 'pty' : 'ChardevDummy', |
Gerd Hoffmann | edb2fb3 | 2013-02-21 16:16:42 +0100 | [diff] [blame] | 3290 | 'null' : 'ChardevDummy', |
Gerd Hoffmann | f5a51ca | 2013-02-21 11:58:44 +0100 | [diff] [blame] | 3291 | 'mux' : 'ChardevMux', |
Gerd Hoffmann | 2d57286 | 2013-02-21 12:56:10 +0100 | [diff] [blame] | 3292 | 'msmouse': 'ChardevDummy', |
Gerd Hoffmann | 7c35803 | 2013-02-21 12:34:58 +0100 | [diff] [blame] | 3293 | 'braille': 'ChardevDummy', |
Gerd Hoffmann | d9ac374 | 2013-02-25 11:48:06 +0100 | [diff] [blame] | 3294 | 'stdio' : 'ChardevStdio', |
Gerd Hoffmann | cd153e2 | 2013-02-25 12:39:06 +0100 | [diff] [blame] | 3295 | 'console': 'ChardevDummy', |
| 3296 | 'spicevmc' : 'ChardevSpiceChannel', |
Gerd Hoffmann | 702ec69 | 2013-02-25 15:52:32 +0100 | [diff] [blame] | 3297 | 'spiceport' : 'ChardevSpicePort', |
Gerd Hoffmann | 1da48c6 | 2013-02-26 16:21:11 +0100 | [diff] [blame] | 3298 | 'vc' : 'ChardevVC', |
| 3299 | 'memory' : 'ChardevRingbuf' } } |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3300 | |
| 3301 | ## |
| 3302 | # @ChardevReturn: |
| 3303 | # |
| 3304 | # Return info about the chardev backend just created. |
| 3305 | # |
Markus Armbruster | 58fa432 | 2013-02-11 18:05:48 +0100 | [diff] [blame] | 3306 | # @pty: #optional name of the slave pseudoterminal device, present if |
| 3307 | # and only if a chardev of type 'pty' was created |
| 3308 | # |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3309 | # Since: 1.4 |
| 3310 | ## |
Gerd Hoffmann | 0a1a7fa | 2012-12-20 14:39:13 +0100 | [diff] [blame] | 3311 | { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } } |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3312 | |
| 3313 | ## |
| 3314 | # @chardev-add: |
| 3315 | # |
Markus Armbruster | 58fa432 | 2013-02-11 18:05:48 +0100 | [diff] [blame] | 3316 | # Add a character device backend |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3317 | # |
| 3318 | # @id: the chardev's ID, must be unique |
| 3319 | # @backend: backend type and parameters |
| 3320 | # |
Markus Armbruster | 58fa432 | 2013-02-11 18:05:48 +0100 | [diff] [blame] | 3321 | # Returns: ChardevReturn. |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3322 | # |
| 3323 | # Since: 1.4 |
| 3324 | ## |
| 3325 | { 'command': 'chardev-add', 'data': {'id' : 'str', |
| 3326 | 'backend' : 'ChardevBackend' }, |
| 3327 | 'returns': 'ChardevReturn' } |
| 3328 | |
| 3329 | ## |
| 3330 | # @chardev-remove: |
| 3331 | # |
Markus Armbruster | 58fa432 | 2013-02-11 18:05:48 +0100 | [diff] [blame] | 3332 | # Remove a character device backend |
Gerd Hoffmann | f1a1a35 | 2012-12-19 10:33:56 +0100 | [diff] [blame] | 3333 | # |
| 3334 | # @id: the chardev's ID, must exist and not be in use |
| 3335 | # |
| 3336 | # Returns: Nothing on success |
| 3337 | # |
| 3338 | # Since: 1.4 |
| 3339 | ## |
| 3340 | { 'command': 'chardev-remove', 'data': {'id': 'str'} } |
Stefan Berger | d1a0cf7 | 2013-02-27 12:47:49 -0500 | [diff] [blame] | 3341 | |
| 3342 | ## |
| 3343 | # @TpmModel: |
| 3344 | # |
| 3345 | # An enumeration of TPM models |
| 3346 | # |
| 3347 | # @tpm-tis: TPM TIS model |
| 3348 | # |
| 3349 | # Since: 1.5 |
| 3350 | ## |
| 3351 | { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] } |
| 3352 | |
| 3353 | ## |
| 3354 | # @query-tpm-models: |
| 3355 | # |
| 3356 | # Return a list of supported TPM models |
| 3357 | # |
| 3358 | # Returns: a list of TpmModel |
| 3359 | # |
| 3360 | # Since: 1.5 |
| 3361 | ## |
| 3362 | { 'command': 'query-tpm-models', 'returns': ['TpmModel'] } |
| 3363 | |
| 3364 | ## |
| 3365 | # @TpmType: |
| 3366 | # |
| 3367 | # An enumeration of TPM types |
| 3368 | # |
| 3369 | # @passthrough: TPM passthrough type |
| 3370 | # |
| 3371 | # Since: 1.5 |
| 3372 | ## |
| 3373 | { 'enum': 'TpmType', 'data': [ 'passthrough' ] } |
| 3374 | |
| 3375 | ## |
| 3376 | # @query-tpm-types: |
| 3377 | # |
| 3378 | # Return a list of supported TPM types |
| 3379 | # |
| 3380 | # Returns: a list of TpmType |
| 3381 | # |
| 3382 | # Since: 1.5 |
| 3383 | ## |
| 3384 | { 'command': 'query-tpm-types', 'returns': ['TpmType'] } |
| 3385 | |
| 3386 | ## |
| 3387 | # @TPMPassthroughOptions: |
| 3388 | # |
| 3389 | # Information about the TPM passthrough type |
| 3390 | # |
| 3391 | # @path: #optional string describing the path used for accessing the TPM device |
| 3392 | # |
| 3393 | # @cancel-path: #optional string showing the TPM's sysfs cancel file |
| 3394 | # for cancellation of TPM commands while they are executing |
| 3395 | # |
| 3396 | # Since: 1.5 |
| 3397 | ## |
| 3398 | { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str', |
| 3399 | '*cancel-path' : 'str'} } |
| 3400 | |
| 3401 | ## |
| 3402 | # @TpmTypeOptions: |
| 3403 | # |
| 3404 | # A union referencing different TPM backend types' configuration options |
| 3405 | # |
| 3406 | # @tpm-passthough-options: TPMPassthroughOptions describing the TPM |
| 3407 | # passthrough configuration options |
| 3408 | # |
| 3409 | # Since: 1.5 |
| 3410 | ## |
| 3411 | { 'union': 'TpmTypeOptions', |
| 3412 | 'data': { 'tpm-passthrough-options' : 'TPMPassthroughOptions' } } |
| 3413 | |
| 3414 | ## |
| 3415 | # @TpmInfo: |
| 3416 | # |
| 3417 | # Information about the TPM |
| 3418 | # |
| 3419 | # @id: The Id of the TPM |
| 3420 | # |
| 3421 | # @model: The TPM frontend model |
| 3422 | # |
| 3423 | # @type: The TPM (backend) type being used |
| 3424 | # |
| 3425 | # @tpm-options: The TPM (backend) type configuration options |
| 3426 | # |
| 3427 | # Since: 1.5 |
| 3428 | ## |
| 3429 | { 'type': 'TPMInfo', |
| 3430 | 'data': {'id': 'str', |
| 3431 | 'model': 'TpmModel', |
| 3432 | 'type': 'TpmType', |
| 3433 | 'tpm-options': 'TpmTypeOptions' } } |
| 3434 | |
| 3435 | ## |
| 3436 | # @query-tpm: |
| 3437 | # |
| 3438 | # Return information about the TPM device |
| 3439 | # |
| 3440 | # Returns: @TPMInfo on success |
| 3441 | # |
| 3442 | # Since: 1.5 |
| 3443 | ## |
| 3444 | { 'command': 'query-tpm', 'returns': ['TPMInfo'] } |