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 | ## |
| 6 | # @NameInfo: |
| 7 | # |
| 8 | # Guest name information. |
| 9 | # |
| 10 | # @name: #optional The name of the guest |
| 11 | # |
| 12 | # Since 0.14.0 |
| 13 | ## |
| 14 | { 'type': 'NameInfo', 'data': {'*name': 'str'} } |
| 15 | |
| 16 | ## |
| 17 | # @query-name: |
| 18 | # |
| 19 | # Return the name information of a guest. |
| 20 | # |
| 21 | # Returns: @NameInfo of the guest |
| 22 | # |
| 23 | # Since 0.14.0 |
| 24 | ## |
| 25 | { 'command': 'query-name', 'returns': 'NameInfo' } |
Luiz Capitulino | b9c15f1 | 2011-08-26 17:38:13 -0300 | [diff] [blame] | 26 | |
| 27 | ## |
| 28 | # @VersionInfo: |
| 29 | # |
| 30 | # A description of QEMU's version. |
| 31 | # |
| 32 | # @qemu.major: The major version of QEMU |
| 33 | # |
| 34 | # @qemu.minor: The minor version of QEMU |
| 35 | # |
| 36 | # @qemu.micro: The micro version of QEMU. By current convention, a micro |
| 37 | # version of 50 signifies a development branch. A micro version |
| 38 | # greater than or equal to 90 signifies a release candidate for |
| 39 | # the next minor version. A micro version of less than 50 |
| 40 | # signifies a stable release. |
| 41 | # |
| 42 | # @package: QEMU will always set this field to an empty string. Downstream |
| 43 | # versions of QEMU should set this to a non-empty string. The |
| 44 | # exact format depends on the downstream however it highly |
| 45 | # recommended that a unique name is used. |
| 46 | # |
| 47 | # Since: 0.14.0 |
| 48 | ## |
| 49 | { 'type': 'VersionInfo', |
| 50 | 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, |
| 51 | 'package': 'str'} } |
| 52 | |
| 53 | ## |
| 54 | # @query-version: |
| 55 | # |
| 56 | # Returns the current version of QEMU. |
| 57 | # |
| 58 | # Returns: A @VersionInfo object describing the current version of QEMU. |
| 59 | # |
| 60 | # Since: 0.14.0 |
| 61 | ## |
| 62 | { 'command': 'query-version', 'returns': 'VersionInfo' } |
Luiz Capitulino | 292a260 | 2011-09-12 15:10:53 -0300 | [diff] [blame] | 63 | |
| 64 | ## |
| 65 | # @KvmInfo: |
| 66 | # |
| 67 | # Information about support for KVM acceleration |
| 68 | # |
| 69 | # @enabled: true if KVM acceleration is active |
| 70 | # |
| 71 | # @present: true if KVM acceleration is built into this executable |
| 72 | # |
| 73 | # Since: 0.14.0 |
| 74 | ## |
| 75 | { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } |
| 76 | |
| 77 | ## |
| 78 | # @query-kvm: |
| 79 | # |
| 80 | # Returns information about KVM acceleration |
| 81 | # |
| 82 | # Returns: @KvmInfo |
| 83 | # |
| 84 | # Since: 0.14.0 |
| 85 | ## |
| 86 | { 'command': 'query-kvm', 'returns': 'KvmInfo' } |
| 87 | |
Luiz Capitulino | 1fa9a5e | 2011-09-12 17:54:20 -0300 | [diff] [blame] | 88 | ## |
| 89 | # @RunState |
| 90 | # |
| 91 | # An enumation of VM run states. |
| 92 | # |
| 93 | # @debug: QEMU is running on a debugger |
| 94 | # |
| 95 | # @inmigrate: guest is paused waiting for an incoming migration |
| 96 | # |
| 97 | # @internal-error: An internal error that prevents further guest execution |
| 98 | # has occurred |
| 99 | # |
| 100 | # @io-error: the last IOP has failed and the device is configured to pause |
| 101 | # on I/O errors |
| 102 | # |
| 103 | # @paused: guest has been paused via the 'stop' command |
| 104 | # |
| 105 | # @postmigrate: guest is paused following a successful 'migrate' |
| 106 | # |
| 107 | # @prelaunch: QEMU was started with -S and guest has not started |
| 108 | # |
| 109 | # @finish-migrate: guest is paused to finish the migration process |
| 110 | # |
| 111 | # @restore-vm: guest is paused to restore VM state |
| 112 | # |
| 113 | # @running: guest is actively running |
| 114 | # |
| 115 | # @save-vm: guest is paused to save the VM state |
| 116 | # |
| 117 | # @shutdown: guest is shut down (and -no-shutdown is in use) |
| 118 | # |
| 119 | # @watchdog: the watchdog action is configured to pause and has been triggered |
| 120 | ## |
| 121 | { 'enum': 'RunState', |
| 122 | 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', |
| 123 | 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', |
| 124 | 'running', 'save-vm', 'shutdown', 'watchdog' ] } |
| 125 | |
| 126 | ## |
| 127 | # @StatusInfo: |
| 128 | # |
| 129 | # Information about VCPU run state |
| 130 | # |
| 131 | # @running: true if all VCPUs are runnable, false if not runnable |
| 132 | # |
| 133 | # @singlestep: true if VCPUs are in single-step mode |
| 134 | # |
| 135 | # @status: the virtual machine @RunState |
| 136 | # |
| 137 | # Since: 0.14.0 |
| 138 | # |
| 139 | # Notes: @singlestep is enabled through the GDB stub |
| 140 | ## |
| 141 | { 'type': 'StatusInfo', |
| 142 | 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} } |
| 143 | |
| 144 | ## |
| 145 | # @query-status: |
| 146 | # |
| 147 | # Query the run status of all VCPUs |
| 148 | # |
| 149 | # Returns: @StatusInfo reflecting all VCPUs |
| 150 | # |
| 151 | # Since: 0.14.0 |
| 152 | ## |
| 153 | { 'command': 'query-status', 'returns': 'StatusInfo' } |
| 154 | |
Luiz Capitulino | efab767 | 2011-09-13 17:16:25 -0300 | [diff] [blame] | 155 | ## |
| 156 | # @UuidInfo: |
| 157 | # |
| 158 | # Guest UUID information. |
| 159 | # |
| 160 | # @UUID: the UUID of the guest |
| 161 | # |
| 162 | # Since: 0.14.0 |
| 163 | # |
| 164 | # Notes: If no UUID was specified for the guest, a null UUID is returned. |
| 165 | ## |
| 166 | { 'type': 'UuidInfo', 'data': {'UUID': 'str'} } |
| 167 | |
| 168 | ## |
| 169 | # @query-uuid: |
| 170 | # |
| 171 | # Query the guest UUID information. |
| 172 | # |
| 173 | # Returns: The @UuidInfo for the guest |
| 174 | # |
| 175 | # Since 0.14.0 |
| 176 | ## |
| 177 | { 'command': 'query-uuid', 'returns': 'UuidInfo' } |
| 178 | |
Luiz Capitulino | c5a415a | 2011-09-14 16:05:49 -0300 | [diff] [blame] | 179 | ## |
| 180 | # @ChardevInfo: |
| 181 | # |
| 182 | # Information about a character device. |
| 183 | # |
| 184 | # @label: the label of the character device |
| 185 | # |
| 186 | # @filename: the filename of the character device |
| 187 | # |
| 188 | # Notes: @filename is encoded using the QEMU command line character device |
| 189 | # encoding. See the QEMU man page for details. |
| 190 | # |
| 191 | # Since: 0.14.0 |
| 192 | ## |
| 193 | { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} } |
| 194 | |
| 195 | ## |
| 196 | # @query-chardev: |
| 197 | # |
| 198 | # Returns information about current character devices. |
| 199 | # |
| 200 | # Returns: a list of @ChardevInfo |
| 201 | # |
| 202 | # Since: 0.14.0 |
| 203 | ## |
| 204 | { 'command': 'query-chardev', 'returns': ['ChardevInfo'] } |
Luiz Capitulino | aa9b79b | 2011-09-21 14:31:51 -0300 | [diff] [blame] | 205 | |
| 206 | ## |
| 207 | # @CommandInfo: |
| 208 | # |
| 209 | # Information about a QMP command |
| 210 | # |
| 211 | # @name: The command name |
| 212 | # |
| 213 | # Since: 0.14.0 |
| 214 | ## |
| 215 | { 'type': 'CommandInfo', 'data': {'name': 'str'} } |
| 216 | |
| 217 | ## |
| 218 | # @query-commands: |
| 219 | # |
| 220 | # Return a list of supported QMP commands by this server |
| 221 | # |
| 222 | # Returns: A list of @CommandInfo for all supported commands |
| 223 | # |
| 224 | # Since: 0.14.0 |
| 225 | ## |
| 226 | { 'command': 'query-commands', 'returns': ['CommandInfo'] } |
| 227 | |
Luiz Capitulino | 7a7f325 | 2011-09-15 14:20:28 -0300 | [diff] [blame] | 228 | ## |
Luiz Capitulino | 791e7c8 | 2011-09-13 17:37:16 -0300 | [diff] [blame] | 229 | # @MigrationStats |
| 230 | # |
| 231 | # Detailed migration status. |
| 232 | # |
| 233 | # @transferred: amount of bytes already transferred to the target VM |
| 234 | # |
| 235 | # @remaining: amount of bytes remaining to be transferred to the target VM |
| 236 | # |
| 237 | # @total: total amount of bytes involved in the migration process |
| 238 | # |
| 239 | # Since: 0.14.0. |
| 240 | ## |
| 241 | { 'type': 'MigrationStats', |
| 242 | 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' } } |
| 243 | |
| 244 | ## |
| 245 | # @MigrationInfo |
| 246 | # |
| 247 | # Information about current migration process. |
| 248 | # |
| 249 | # @status: #optional string describing the current migration status. |
| 250 | # As of 0.14.0 this can be 'active', 'completed', 'failed' or |
| 251 | # 'cancelled'. If this field is not returned, no migration process |
| 252 | # has been initiated |
| 253 | # |
| 254 | # @ram: #optional @MigrationStats containing detailed migration status, |
| 255 | # only returned if status is 'active' |
| 256 | # |
| 257 | # @disk: #optional @MigrationStats containing detailed disk migration |
| 258 | # status, only returned if status is 'active' and it is a block |
| 259 | # migration |
| 260 | # |
| 261 | # Since: 0.14.0 |
| 262 | ## |
| 263 | { 'type': 'MigrationInfo', |
| 264 | 'data': {'*status': 'str', '*ram': 'MigrationStats', |
| 265 | '*disk': 'MigrationStats'} } |
| 266 | |
| 267 | ## |
| 268 | # @query-migrate |
| 269 | # |
| 270 | # Returns information about current migration process. |
| 271 | # |
| 272 | # Returns: @MigrationInfo |
| 273 | # |
| 274 | # Since: 0.14.0 |
| 275 | ## |
| 276 | { 'command': 'query-migrate', 'returns': 'MigrationInfo' } |
| 277 | |
| 278 | ## |
Luiz Capitulino | e235cec | 2011-09-21 15:29:55 -0300 | [diff] [blame] | 279 | # @MouseInfo: |
| 280 | # |
| 281 | # Information about a mouse device. |
| 282 | # |
| 283 | # @name: the name of the mouse device |
| 284 | # |
| 285 | # @index: the index of the mouse device |
| 286 | # |
| 287 | # @current: true if this device is currently receiving mouse events |
| 288 | # |
| 289 | # @absolute: true if this device supports absolute coordinates as input |
| 290 | # |
| 291 | # Since: 0.14.0 |
| 292 | ## |
| 293 | { 'type': 'MouseInfo', |
| 294 | 'data': {'name': 'str', 'index': 'int', 'current': 'bool', |
| 295 | 'absolute': 'bool'} } |
| 296 | |
| 297 | ## |
| 298 | # @query-mice: |
| 299 | # |
| 300 | # Returns information about each active mouse device |
| 301 | # |
| 302 | # Returns: a list of @MouseInfo for each device |
| 303 | # |
| 304 | # Since: 0.14.0 |
| 305 | ## |
| 306 | { 'command': 'query-mice', 'returns': ['MouseInfo'] } |
| 307 | |
| 308 | ## |
Luiz Capitulino | de0b36b | 2011-09-21 16:38:35 -0300 | [diff] [blame] | 309 | # @CpuInfo: |
| 310 | # |
| 311 | # Information about a virtual CPU |
| 312 | # |
| 313 | # @CPU: the index of the virtual CPU |
| 314 | # |
| 315 | # @current: this only exists for backwards compatible and should be ignored |
| 316 | # |
| 317 | # @halted: true if the virtual CPU is in the halt state. Halt usually refers |
| 318 | # to a processor specific low power mode. |
| 319 | # |
| 320 | # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction |
| 321 | # pointer. |
| 322 | # If the target is Sparc, this is the PC component of the |
| 323 | # instruction pointer. |
| 324 | # |
| 325 | # @nip: #optional If the target is PPC, the instruction pointer |
| 326 | # |
| 327 | # @npc: #optional If the target is Sparc, the NPC component of the instruction |
| 328 | # pointer |
| 329 | # |
| 330 | # @PC: #optional If the target is MIPS, the instruction pointer |
| 331 | # |
| 332 | # @thread_id: ID of the underlying host thread |
| 333 | # |
| 334 | # Since: 0.14.0 |
| 335 | # |
| 336 | # Notes: @halted is a transient state that changes frequently. By the time the |
| 337 | # data is sent to the client, the guest may no longer be halted. |
| 338 | ## |
| 339 | { 'type': 'CpuInfo', |
| 340 | 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int', |
| 341 | '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} } |
| 342 | |
| 343 | ## |
| 344 | # @query-cpus: |
| 345 | # |
| 346 | # Returns a list of information about each virtual CPU. |
| 347 | # |
| 348 | # Returns: a list of @CpuInfo for each virtual CPU |
| 349 | # |
| 350 | # Since: 0.14.0 |
| 351 | ## |
| 352 | { 'command': 'query-cpus', 'returns': ['CpuInfo'] } |
| 353 | |
| 354 | ## |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 355 | # @BlockDeviceInfo: |
| 356 | # |
| 357 | # Information about the backing device for a block device. |
| 358 | # |
| 359 | # @file: the filename of the backing device |
| 360 | # |
| 361 | # @ro: true if the backing device was open read-only |
| 362 | # |
| 363 | # @drv: the name of the block format used to open the backing device. As of |
| 364 | # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg', |
| 365 | # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', |
| 366 | # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow', |
| 367 | # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat' |
| 368 | # |
| 369 | # @backing_file: #optional the name of the backing file (for copy-on-write) |
| 370 | # |
| 371 | # @encrypted: true if the backing device is encrypted |
| 372 | # |
Zhi Yong Wu | 727f005 | 2011-11-08 13:00:31 +0800 | [diff] [blame] | 373 | # @bps: total throughput limit in bytes per second is specified |
| 374 | # |
| 375 | # @bps_rd: read throughput limit in bytes per second is specified |
| 376 | # |
| 377 | # @bps_wr: write throughput limit in bytes per second is specified |
| 378 | # |
| 379 | # @iops: total I/O operations per second is specified |
| 380 | # |
| 381 | # @iops_rd: read I/O operations per second is specified |
| 382 | # |
| 383 | # @iops_wr: write I/O operations per second is specified |
| 384 | # |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 385 | # Since: 0.14.0 |
| 386 | # |
| 387 | # Notes: This interface is only found in @BlockInfo. |
| 388 | ## |
| 389 | { 'type': 'BlockDeviceInfo', |
| 390 | 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str', |
Zhi Yong Wu | 727f005 | 2011-11-08 13:00:31 +0800 | [diff] [blame] | 391 | '*backing_file': 'str', 'encrypted': 'bool', |
| 392 | 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', |
| 393 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} } |
Luiz Capitulino | b202381 | 2011-09-21 17:16:47 -0300 | [diff] [blame] | 394 | |
| 395 | ## |
| 396 | # @BlockDeviceIoStatus: |
| 397 | # |
| 398 | # An enumeration of block device I/O status. |
| 399 | # |
| 400 | # @ok: The last I/O operation has succeeded |
| 401 | # |
| 402 | # @failed: The last I/O operation has failed |
| 403 | # |
| 404 | # @nospace: The last I/O operation has failed due to a no-space condition |
| 405 | # |
| 406 | # Since: 1.0 |
| 407 | ## |
| 408 | { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } |
| 409 | |
| 410 | ## |
| 411 | # @BlockInfo: |
| 412 | # |
| 413 | # Block device information. This structure describes a virtual device and |
| 414 | # the backing device associated with it. |
| 415 | # |
| 416 | # @device: The device name associated with the virtual device. |
| 417 | # |
| 418 | # @type: This field is returned only for compatibility reasons, it should |
| 419 | # not be used (always returns 'unknown') |
| 420 | # |
| 421 | # @removable: True if the device supports removable media. |
| 422 | # |
| 423 | # @locked: True if the guest has locked this device from having its media |
| 424 | # removed |
| 425 | # |
| 426 | # @tray_open: #optional True if the device has a tray and it is open |
| 427 | # (only present if removable is true) |
| 428 | # |
| 429 | # @io-status: #optional @BlockDeviceIoStatus. Only present if the device |
| 430 | # supports it and the VM is configured to stop on errors |
| 431 | # |
| 432 | # @inserted: #optional @BlockDeviceInfo describing the device if media is |
| 433 | # present |
| 434 | # |
| 435 | # Since: 0.14.0 |
| 436 | ## |
| 437 | { 'type': 'BlockInfo', |
| 438 | 'data': {'device': 'str', 'type': 'str', 'removable': 'bool', |
| 439 | 'locked': 'bool', '*inserted': 'BlockDeviceInfo', |
| 440 | '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} } |
| 441 | |
| 442 | ## |
| 443 | # @query-block: |
| 444 | # |
| 445 | # Get a list of BlockInfo for all virtual block devices. |
| 446 | # |
| 447 | # Returns: a list of @BlockInfo describing each virtual block device |
| 448 | # |
| 449 | # Since: 0.14.0 |
| 450 | ## |
| 451 | { 'command': 'query-block', 'returns': ['BlockInfo'] } |
| 452 | |
| 453 | ## |
Luiz Capitulino | f11f57e | 2011-09-22 15:56:36 -0300 | [diff] [blame] | 454 | # @BlockDeviceStats: |
| 455 | # |
| 456 | # Statistics of a virtual block device or a block backing device. |
| 457 | # |
| 458 | # @rd_bytes: The number of bytes read by the device. |
| 459 | # |
| 460 | # @wr_bytes: The number of bytes written by the device. |
| 461 | # |
| 462 | # @rd_operations: The number of read operations performed by the device. |
| 463 | # |
| 464 | # @wr_operations: The number of write operations performed by the device. |
| 465 | # |
| 466 | # @flush_operations: The number of cache flush operations performed by the |
| 467 | # device (since 0.15.0) |
| 468 | # |
| 469 | # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds |
| 470 | # (since 0.15.0). |
| 471 | # |
| 472 | # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0). |
| 473 | # |
| 474 | # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0). |
| 475 | # |
| 476 | # @wr_highest_offset: The offset after the greatest byte written to the |
| 477 | # device. The intended use of this information is for |
| 478 | # growable sparse files (like qcow2) that are used on top |
| 479 | # of a physical device. |
| 480 | # |
| 481 | # Since: 0.14.0 |
| 482 | ## |
| 483 | { 'type': 'BlockDeviceStats', |
| 484 | 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int', |
| 485 | 'wr_operations': 'int', 'flush_operations': 'int', |
| 486 | 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int', |
| 487 | 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } } |
| 488 | |
| 489 | ## |
| 490 | # @BlockStats: |
| 491 | # |
| 492 | # Statistics of a virtual block device or a block backing device. |
| 493 | # |
| 494 | # @device: #optional If the stats are for a virtual block device, the name |
| 495 | # corresponding to the virtual block device. |
| 496 | # |
| 497 | # @stats: A @BlockDeviceStats for the device. |
| 498 | # |
| 499 | # @parent: #optional This may point to the backing block device if this is a |
| 500 | # a virtual block device. If it's a backing block, this will point |
| 501 | # to the backing file is one is present. |
| 502 | # |
| 503 | # Since: 0.14.0 |
| 504 | ## |
| 505 | { 'type': 'BlockStats', |
| 506 | 'data': {'*device': 'str', 'stats': 'BlockDeviceStats', |
| 507 | '*parent': 'BlockStats'} } |
| 508 | |
| 509 | ## |
| 510 | # @query-blockstats: |
| 511 | # |
| 512 | # Query the @BlockStats for all virtual block devices. |
| 513 | # |
| 514 | # Returns: A list of @BlockStats for each virtual block devices. |
| 515 | # |
| 516 | # Since: 0.14.0 |
| 517 | ## |
| 518 | { 'command': 'query-blockstats', 'returns': ['BlockStats'] } |
| 519 | |
| 520 | ## |
Luiz Capitulino | 2b54aa8 | 2011-10-17 16:41:22 -0200 | [diff] [blame] | 521 | # @VncClientInfo: |
| 522 | # |
| 523 | # Information about a connected VNC client. |
| 524 | # |
| 525 | # @host: The host name of the client. QEMU tries to resolve this to a DNS name |
| 526 | # when possible. |
| 527 | # |
| 528 | # @family: 'ipv6' if the client is connected via IPv6 and TCP |
| 529 | # 'ipv4' if the client is connected via IPv4 and TCP |
| 530 | # 'unix' if the client is connected via a unix domain socket |
| 531 | # 'unknown' otherwise |
| 532 | # |
| 533 | # @service: The service name of the client's port. This may depends on the |
| 534 | # host system's service database so symbolic names should not be |
| 535 | # relied on. |
| 536 | # |
| 537 | # @x509_dname: #optional If x509 authentication is in use, the Distinguished |
| 538 | # Name of the client. |
| 539 | # |
| 540 | # @sasl_username: #optional If SASL authentication is in use, the SASL username |
| 541 | # used for authentication. |
| 542 | # |
| 543 | # Since: 0.14.0 |
| 544 | ## |
| 545 | { 'type': 'VncClientInfo', |
| 546 | 'data': {'host': 'str', 'family': 'str', 'service': 'str', |
| 547 | '*x509_dname': 'str', '*sasl_username': 'str'} } |
| 548 | |
| 549 | ## |
| 550 | # @VncInfo: |
| 551 | # |
| 552 | # Information about the VNC session. |
| 553 | # |
| 554 | # @enabled: true if the VNC server is enabled, false otherwise |
| 555 | # |
| 556 | # @host: #optional The hostname the VNC server is bound to. This depends on |
| 557 | # the name resolution on the host and may be an IP address. |
| 558 | # |
| 559 | # @family: #optional 'ipv6' if the host is listening for IPv6 connections |
| 560 | # 'ipv4' if the host is listening for IPv4 connections |
| 561 | # 'unix' if the host is listening on a unix domain socket |
| 562 | # 'unknown' otherwise |
| 563 | # |
| 564 | # @service: #optional The service name of the server's port. This may depends |
| 565 | # on the host system's service database so symbolic names should not |
| 566 | # be relied on. |
| 567 | # |
| 568 | # @auth: #optional the current authentication type used by the server |
| 569 | # 'none' if no authentication is being used |
| 570 | # 'vnc' if VNC authentication is being used |
| 571 | # 'vencrypt+plain' if VEncrypt is used with plain text authentication |
| 572 | # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication |
| 573 | # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication |
| 574 | # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth |
| 575 | # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth |
| 576 | # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth |
| 577 | # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth |
| 578 | # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth |
| 579 | # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth |
| 580 | # |
| 581 | # @clients: a list of @VncClientInfo of all currently connected clients |
| 582 | # |
| 583 | # Since: 0.14.0 |
| 584 | ## |
| 585 | { 'type': 'VncInfo', |
| 586 | 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str', |
| 587 | '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} } |
| 588 | |
| 589 | ## |
| 590 | # @query-vnc: |
| 591 | # |
| 592 | # Returns information about the current VNC server |
| 593 | # |
| 594 | # Returns: @VncInfo |
| 595 | # If VNC support is not compiled in, FeatureDisabled |
| 596 | # |
| 597 | # Since: 0.14.0 |
| 598 | ## |
| 599 | { 'command': 'query-vnc', 'returns': 'VncInfo' } |
| 600 | |
| 601 | ## |
Luiz Capitulino | d1f2964 | 2011-10-20 17:01:33 -0200 | [diff] [blame] | 602 | # @SpiceChannel |
| 603 | # |
| 604 | # Information about a SPICE client channel. |
| 605 | # |
| 606 | # @host: The host name of the client. QEMU tries to resolve this to a DNS name |
| 607 | # when possible. |
| 608 | # |
| 609 | # @family: 'ipv6' if the client is connected via IPv6 and TCP |
| 610 | # 'ipv4' if the client is connected via IPv4 and TCP |
| 611 | # 'unix' if the client is connected via a unix domain socket |
| 612 | # 'unknown' otherwise |
| 613 | # |
| 614 | # @port: The client's port number. |
| 615 | # |
| 616 | # @connection-id: SPICE connection id number. All channels with the same id |
| 617 | # belong to the same SPICE session. |
| 618 | # |
| 619 | # @connection-type: SPICE channel type number. "1" is the main control channel, |
| 620 | # filter for this one if you want track spice sessions only |
| 621 | # |
| 622 | # @channel-id: SPICE channel ID number. Usually "0", might be different needed |
| 623 | # when multiple channels of the same type exist, such as multiple |
| 624 | # display channels in a multihead setup |
| 625 | # |
| 626 | # @tls: true if the channel is encrypted, false otherwise. |
| 627 | # |
| 628 | # Since: 0.14.0 |
| 629 | ## |
| 630 | { 'type': 'SpiceChannel', |
| 631 | 'data': {'host': 'str', 'family': 'str', 'port': 'str', |
| 632 | 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', |
| 633 | 'tls': 'bool'} } |
| 634 | |
| 635 | ## |
| 636 | # @SpiceInfo |
| 637 | # |
| 638 | # Information about the SPICE session. |
| 639 | # |
| 640 | # @enabled: true if the SPICE server is enabled, false otherwise |
| 641 | # |
| 642 | # @host: #optional The hostname the SPICE server is bound to. This depends on |
| 643 | # the name resolution on the host and may be an IP address. |
| 644 | # |
| 645 | # @port: #optional The SPICE server's port number. |
| 646 | # |
| 647 | # @compiled-version: #optional SPICE server version. |
| 648 | # |
| 649 | # @tls-port: #optional The SPICE server's TLS port number. |
| 650 | # |
| 651 | # @auth: #optional the current authentication type used by the server |
| 652 | # 'none' if no authentication is being used |
| 653 | # 'spice' (TODO: describe) |
| 654 | # |
| 655 | # @channels: a list of @SpiceChannel for each active spice channel |
| 656 | # |
| 657 | # Since: 0.14.0 |
| 658 | ## |
| 659 | { 'type': 'SpiceInfo', |
| 660 | 'data': {'enabled': 'bool', '*host': 'str', '*port': 'int', |
| 661 | '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str', |
| 662 | '*channels': ['SpiceChannel']} } |
| 663 | |
| 664 | ## |
| 665 | # @query-spice |
| 666 | # |
| 667 | # Returns information about the current SPICE server |
| 668 | # |
| 669 | # Returns: @SpiceInfo |
| 670 | # |
| 671 | # Since: 0.14.0 |
| 672 | ## |
| 673 | { 'command': 'query-spice', 'returns': 'SpiceInfo' } |
| 674 | |
| 675 | ## |
Luiz Capitulino | 96637bc | 2011-10-21 11:41:37 -0200 | [diff] [blame] | 676 | # @BalloonInfo: |
| 677 | # |
| 678 | # Information about the guest balloon device. |
| 679 | # |
| 680 | # @actual: the number of bytes the balloon currently contains |
| 681 | # |
| 682 | # @mem_swapped_in: #optional number of pages swapped in within the guest |
| 683 | # |
| 684 | # @mem_swapped_out: #optional number of pages swapped out within the guest |
| 685 | # |
| 686 | # @major_page_faults: #optional number of major page faults within the guest |
| 687 | # |
| 688 | # @minor_page_faults: #optional number of minor page faults within the guest |
| 689 | # |
| 690 | # @free_mem: #optional amount of memory (in bytes) free in the guest |
| 691 | # |
| 692 | # @total_mem: #optional amount of memory (in bytes) visible to the guest |
| 693 | # |
| 694 | # Since: 0.14.0 |
| 695 | # |
| 696 | # Notes: all current versions of QEMU do not fill out optional information in |
| 697 | # this structure. |
| 698 | ## |
| 699 | { 'type': 'BalloonInfo', |
| 700 | 'data': {'actual': 'int', '*mem_swapped_in': 'int', |
| 701 | '*mem_swapped_out': 'int', '*major_page_faults': 'int', |
| 702 | '*minor_page_faults': 'int', '*free_mem': 'int', |
| 703 | '*total_mem': 'int'} } |
| 704 | |
| 705 | ## |
| 706 | # @query-balloon: |
| 707 | # |
| 708 | # Return information about the balloon device. |
| 709 | # |
| 710 | # Returns: @BalloonInfo on success |
| 711 | # If the balloon driver is enabled but not functional because the KVM |
| 712 | # kernel module cannot support it, KvmMissingCap |
| 713 | # If no balloon device is present, DeviceNotActive |
| 714 | # |
| 715 | # Since: 0.14.0 |
| 716 | ## |
| 717 | { 'command': 'query-balloon', 'returns': 'BalloonInfo' } |
| 718 | |
| 719 | ## |
Luiz Capitulino | 7962747 | 2011-10-21 14:15:33 -0200 | [diff] [blame] | 720 | # @PciMemoryRange: |
| 721 | # |
| 722 | # A PCI device memory region |
| 723 | # |
| 724 | # @base: the starting address (guest physical) |
| 725 | # |
| 726 | # @limit: the ending address (guest physical) |
| 727 | # |
| 728 | # Since: 0.14.0 |
| 729 | ## |
| 730 | { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} } |
| 731 | |
| 732 | ## |
| 733 | # @PciMemoryRegion |
| 734 | # |
| 735 | # Information about a PCI device I/O region. |
| 736 | # |
| 737 | # @bar: the index of the Base Address Register for this region |
| 738 | # |
| 739 | # @type: 'io' if the region is a PIO region |
| 740 | # 'memory' if the region is a MMIO region |
| 741 | # |
| 742 | # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable |
| 743 | # |
| 744 | # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit |
| 745 | # |
| 746 | # Since: 0.14.0 |
| 747 | ## |
| 748 | { 'type': 'PciMemoryRegion', |
| 749 | 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int', |
| 750 | '*prefetch': 'bool', '*mem_type_64': 'bool' } } |
| 751 | |
| 752 | ## |
| 753 | # @PciBridgeInfo: |
| 754 | # |
| 755 | # Information about a PCI Bridge device |
| 756 | # |
| 757 | # @bus.number: primary bus interface number. This should be the number of the |
| 758 | # bus the device resides on. |
| 759 | # |
| 760 | # @bus.secondary: secondary bus interface number. This is the number of the |
| 761 | # main bus for the bridge |
| 762 | # |
| 763 | # @bus.subordinate: This is the highest number bus that resides below the |
| 764 | # bridge. |
| 765 | # |
| 766 | # @bus.io_range: The PIO range for all devices on this bridge |
| 767 | # |
| 768 | # @bus.memory_range: The MMIO range for all devices on this bridge |
| 769 | # |
| 770 | # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on |
| 771 | # this bridge |
| 772 | # |
| 773 | # @devices: a list of @PciDeviceInfo for each device on this bridge |
| 774 | # |
| 775 | # Since: 0.14.0 |
| 776 | ## |
| 777 | { 'type': 'PciBridgeInfo', |
| 778 | 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int', |
| 779 | 'io_range': 'PciMemoryRange', |
| 780 | 'memory_range': 'PciMemoryRange', |
| 781 | 'prefetchable_range': 'PciMemoryRange' }, |
| 782 | '*devices': ['PciDeviceInfo']} } |
| 783 | |
| 784 | ## |
| 785 | # @PciDeviceInfo: |
| 786 | # |
| 787 | # Information about a PCI device |
| 788 | # |
| 789 | # @bus: the bus number of the device |
| 790 | # |
| 791 | # @slot: the slot the device is located in |
| 792 | # |
| 793 | # @function: the function of the slot used by the device |
| 794 | # |
| 795 | # @class_info.desc: #optional a string description of the device's class |
| 796 | # |
| 797 | # @class_info.class: the class code of the device |
| 798 | # |
| 799 | # @id.device: the PCI device id |
| 800 | # |
| 801 | # @id.vendor: the PCI vendor id |
| 802 | # |
| 803 | # @irq: #optional if an IRQ is assigned to the device, the IRQ number |
| 804 | # |
| 805 | # @qdev_id: the device name of the PCI device |
| 806 | # |
| 807 | # @pci_bridge: if the device is a PCI bridge, the bridge information |
| 808 | # |
| 809 | # @regions: a list of the PCI I/O regions associated with the device |
| 810 | # |
| 811 | # Notes: the contents of @class_info.desc are not stable and should only be |
| 812 | # treated as informational. |
| 813 | # |
| 814 | # Since: 0.14.0 |
| 815 | ## |
| 816 | { 'type': 'PciDeviceInfo', |
| 817 | 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', |
| 818 | 'class_info': {'*desc': 'str', 'class': 'int'}, |
| 819 | 'id': {'device': 'int', 'vendor': 'int'}, |
| 820 | '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', |
| 821 | 'regions': ['PciMemoryRegion']} } |
| 822 | |
| 823 | ## |
| 824 | # @PciInfo: |
| 825 | # |
| 826 | # Information about a PCI bus |
| 827 | # |
| 828 | # @bus: the bus index |
| 829 | # |
| 830 | # @devices: a list of devices on this bus |
| 831 | # |
| 832 | # Since: 0.14.0 |
| 833 | ## |
| 834 | { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} } |
| 835 | |
| 836 | ## |
| 837 | # @query-pci: |
| 838 | # |
| 839 | # Return information about the PCI bus topology of the guest. |
| 840 | # |
| 841 | # Returns: a list of @PciInfo for each PCI bus |
| 842 | # |
| 843 | # Since: 0.14.0 |
| 844 | ## |
| 845 | { 'command': 'query-pci', 'returns': ['PciInfo'] } |
| 846 | |
| 847 | ## |
Stefan Hajnoczi | fb5458c | 2012-01-18 14:40:49 +0000 | [diff] [blame] | 848 | # @BlockJobInfo: |
| 849 | # |
| 850 | # Information about a long-running block device operation. |
| 851 | # |
| 852 | # @type: the job type ('stream' for image streaming) |
| 853 | # |
| 854 | # @device: the block device name |
| 855 | # |
| 856 | # @len: the maximum progress value |
| 857 | # |
| 858 | # @offset: the current progress value |
| 859 | # |
| 860 | # @speed: the rate limit, bytes per second |
| 861 | # |
| 862 | # Since: 1.1 |
| 863 | ## |
| 864 | { 'type': 'BlockJobInfo', |
| 865 | 'data': {'type': 'str', 'device': 'str', 'len': 'int', |
| 866 | 'offset': 'int', 'speed': 'int'} } |
| 867 | |
| 868 | ## |
| 869 | # @query-block-jobs: |
| 870 | # |
| 871 | # Return information about long-running block device operations. |
| 872 | # |
| 873 | # Returns: a list of @BlockJobInfo for each active block job |
| 874 | # |
| 875 | # Since: 1.1 |
| 876 | ## |
| 877 | { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] } |
| 878 | |
| 879 | ## |
Luiz Capitulino | 7a7f325 | 2011-09-15 14:20:28 -0300 | [diff] [blame] | 880 | # @quit: |
| 881 | # |
| 882 | # This command will cause the QEMU process to exit gracefully. While every |
| 883 | # attempt is made to send the QMP response before terminating, this is not |
| 884 | # guaranteed. When using this interface, a premature EOF would not be |
| 885 | # unexpected. |
| 886 | # |
| 887 | # Since: 0.14.0 |
| 888 | ## |
| 889 | { 'command': 'quit' } |
Luiz Capitulino | 5f158f2 | 2011-09-15 14:34:39 -0300 | [diff] [blame] | 890 | |
| 891 | ## |
| 892 | # @stop: |
| 893 | # |
| 894 | # Stop all guest VCPU execution. |
| 895 | # |
| 896 | # Since: 0.14.0 |
| 897 | # |
| 898 | # Notes: This function will succeed even if the guest is already in the stopped |
| 899 | # state |
| 900 | ## |
| 901 | { 'command': 'stop' } |
Luiz Capitulino | 38d2265 | 2011-09-15 14:41:46 -0300 | [diff] [blame] | 902 | |
| 903 | ## |
| 904 | # @system_reset: |
| 905 | # |
| 906 | # Performs a hard reset of a guest. |
| 907 | # |
| 908 | # Since: 0.14.0 |
| 909 | ## |
| 910 | { 'command': 'system_reset' } |
Luiz Capitulino | 5bc465e | 2011-09-28 11:06:15 -0300 | [diff] [blame] | 911 | |
| 912 | ## |
| 913 | # @system_powerdown: |
| 914 | # |
| 915 | # Requests that a guest perform a powerdown operation. |
| 916 | # |
| 917 | # Since: 0.14.0 |
| 918 | # |
| 919 | # Notes: A guest may or may not respond to this command. This command |
| 920 | # returning does not indicate that a guest has accepted the request or |
| 921 | # that it has shut down. Many guests will respond to this command by |
| 922 | # prompting the user in some way. |
| 923 | ## |
| 924 | { 'command': 'system_powerdown' } |
Luiz Capitulino | 755f196 | 2011-10-06 14:31:39 -0300 | [diff] [blame] | 925 | |
| 926 | ## |
| 927 | # @cpu: |
| 928 | # |
| 929 | # This command is a nop that is only provided for the purposes of compatibility. |
| 930 | # |
| 931 | # Since: 0.14.0 |
| 932 | # |
| 933 | # Notes: Do not use this command. |
| 934 | ## |
| 935 | { 'command': 'cpu', 'data': {'index': 'int'} } |
Luiz Capitulino | 0cfd6a9 | 2011-11-22 16:32:37 -0200 | [diff] [blame] | 936 | |
| 937 | ## |
| 938 | # @memsave: |
| 939 | # |
| 940 | # Save a portion of guest memory to a file. |
| 941 | # |
| 942 | # @val: the virtual address of the guest to start from |
| 943 | # |
| 944 | # @size: the size of memory region to save |
| 945 | # |
| 946 | # @filename: the file to save the memory to as binary data |
| 947 | # |
| 948 | # @cpu-index: #optional the index of the virtual CPU to use for translating the |
| 949 | # virtual address (defaults to CPU 0) |
| 950 | # |
| 951 | # Returns: Nothing on success |
| 952 | # If @cpu is not a valid VCPU, InvalidParameterValue |
| 953 | # If @filename cannot be opened, OpenFileFailed |
| 954 | # If an I/O error occurs while writing the file, IOError |
| 955 | # |
| 956 | # Since: 0.14.0 |
| 957 | # |
| 958 | # Notes: Errors were not reliably returned until 1.1 |
| 959 | ## |
| 960 | { 'command': 'memsave', |
| 961 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } |
Luiz Capitulino | 6d3962b | 2011-11-22 17:26:46 -0200 | [diff] [blame] | 962 | |
| 963 | ## |
| 964 | # @pmemsave: |
| 965 | # |
| 966 | # Save a portion of guest physical memory to a file. |
| 967 | # |
| 968 | # @val: the physical address of the guest to start from |
| 969 | # |
| 970 | # @size: the size of memory region to save |
| 971 | # |
| 972 | # @filename: the file to save the memory to as binary data |
| 973 | # |
| 974 | # Returns: Nothing on success |
| 975 | # If @filename cannot be opened, OpenFileFailed |
| 976 | # If an I/O error occurs while writing the file, IOError |
| 977 | # |
| 978 | # Since: 0.14.0 |
| 979 | # |
| 980 | # Notes: Errors were not reliably returned until 1.1 |
| 981 | ## |
| 982 | { 'command': 'pmemsave', |
| 983 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } |
Luiz Capitulino | e42e818 | 2011-11-22 17:58:31 -0200 | [diff] [blame] | 984 | |
| 985 | ## |
| 986 | # @cont: |
| 987 | # |
| 988 | # Resume guest VCPU execution. |
| 989 | # |
| 990 | # Since: 0.14.0 |
| 991 | # |
| 992 | # Returns: If successful, nothing |
| 993 | # If the QEMU is waiting for an incoming migration, MigrationExpected |
| 994 | # If QEMU was started with an encrypted block device and a key has |
| 995 | # not yet been set, DeviceEncrypted. |
| 996 | # |
| 997 | # Notes: This command will succeed if the guest is currently running. |
| 998 | ## |
| 999 | { 'command': 'cont' } |
| 1000 | |
Luiz Capitulino | ab49ab5 | 2011-11-23 12:55:53 -0200 | [diff] [blame] | 1001 | ## |
Gerd Hoffmann | 9b9df25 | 2012-02-23 13:45:21 +0100 | [diff] [blame] | 1002 | # @system_wakeup: |
| 1003 | # |
| 1004 | # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. |
| 1005 | # |
| 1006 | # Since: 1.1 |
| 1007 | # |
| 1008 | # Returns: nothing. |
| 1009 | ## |
| 1010 | { 'command': 'system_wakeup' } |
| 1011 | |
| 1012 | ## |
Luiz Capitulino | ab49ab5 | 2011-11-23 12:55:53 -0200 | [diff] [blame] | 1013 | # @inject-nmi: |
| 1014 | # |
| 1015 | # Injects an Non-Maskable Interrupt into all guest's VCPUs. |
| 1016 | # |
| 1017 | # Returns: If successful, nothing |
| 1018 | # If the Virtual Machine doesn't support NMI injection, Unsupported |
| 1019 | # |
| 1020 | # Since: 0.14.0 |
| 1021 | # |
| 1022 | # Notes: Only x86 Virtual Machines support this command. |
| 1023 | ## |
| 1024 | { 'command': 'inject-nmi' } |
Luiz Capitulino | 4b37156 | 2011-11-23 13:11:55 -0200 | [diff] [blame] | 1025 | |
| 1026 | ## |
| 1027 | # @set_link: |
| 1028 | # |
| 1029 | # Sets the link status of a virtual network adapter. |
| 1030 | # |
| 1031 | # @name: the device name of the virtual network adapter |
| 1032 | # |
| 1033 | # @up: true to set the link status to be up |
| 1034 | # |
| 1035 | # Returns: Nothing on success |
| 1036 | # If @name is not a valid network device, DeviceNotFound |
| 1037 | # |
| 1038 | # Since: 0.14.0 |
| 1039 | # |
| 1040 | # Notes: Not all network adapters support setting link status. This command |
| 1041 | # will succeed even if the network adapter does not support link status |
| 1042 | # notification. |
| 1043 | ## |
| 1044 | { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } |
Luiz Capitulino | a4dea8a | 2011-11-23 13:28:21 -0200 | [diff] [blame] | 1045 | |
| 1046 | ## |
| 1047 | # @block_passwd: |
| 1048 | # |
| 1049 | # This command sets the password of a block device that has not been open |
| 1050 | # with a password and requires one. |
| 1051 | # |
| 1052 | # The two cases where this can happen are a block device is created through |
| 1053 | # QEMU's initial command line or a block device is changed through the legacy |
| 1054 | # @change interface. |
| 1055 | # |
| 1056 | # In the event that the block device is created through the initial command |
| 1057 | # line, the VM will start in the stopped state regardless of whether '-S' is |
| 1058 | # used. The intention is for a management tool to query the block devices to |
| 1059 | # determine which ones are encrypted, set the passwords with this command, and |
| 1060 | # then start the guest with the @cont command. |
| 1061 | # |
| 1062 | # @device: the name of the device to set the password on |
| 1063 | # |
| 1064 | # @password: the password to use for the device |
| 1065 | # |
| 1066 | # Returns: nothing on success |
| 1067 | # If @device is not a valid block device, DeviceNotFound |
| 1068 | # If @device is not encrypted, DeviceNotEncrypted |
| 1069 | # If @password is not valid for this device, InvalidPassword |
| 1070 | # |
| 1071 | # Notes: Not all block formats support encryption and some that do are not |
| 1072 | # able to validate that a password is correct. Disk corruption may |
| 1073 | # occur if an invalid password is specified. |
| 1074 | # |
| 1075 | # Since: 0.14.0 |
| 1076 | ## |
| 1077 | { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} } |
Luiz Capitulino | d72f326 | 2011-11-25 14:38:09 -0200 | [diff] [blame] | 1078 | |
| 1079 | ## |
| 1080 | # @balloon: |
| 1081 | # |
| 1082 | # Request the balloon driver to change its balloon size. |
| 1083 | # |
| 1084 | # @value: the target size of the balloon in bytes |
| 1085 | # |
| 1086 | # Returns: Nothing on success |
| 1087 | # If the balloon driver is enabled but not functional because the KVM |
| 1088 | # kernel module cannot support it, KvmMissingCap |
| 1089 | # If no balloon device is present, DeviceNotActive |
| 1090 | # |
| 1091 | # Notes: This command just issues a request to the guest. When it returns, |
| 1092 | # the balloon size may not have changed. A guest can change the balloon |
| 1093 | # size independent of this command. |
| 1094 | # |
| 1095 | # Since: 0.14.0 |
| 1096 | ## |
| 1097 | { 'command': 'balloon', 'data': {'value': 'int'} } |
Luiz Capitulino | 5e7caac | 2011-11-25 14:57:10 -0200 | [diff] [blame] | 1098 | |
| 1099 | ## |
| 1100 | # @block_resize |
| 1101 | # |
| 1102 | # Resize a block image while a guest is running. |
| 1103 | # |
| 1104 | # @device: the name of the device to get the image resized |
| 1105 | # |
| 1106 | # @size: new image size in bytes |
| 1107 | # |
| 1108 | # Returns: nothing on success |
| 1109 | # If @device is not a valid block device, DeviceNotFound |
Stefan Hajnoczi | 939a1cc | 2012-01-04 22:23:34 +0000 | [diff] [blame] | 1110 | # If @size is negative, InvalidParameterValue |
| 1111 | # If the block device has no medium inserted, DeviceHasNoMedium |
| 1112 | # If the block device does not support resize, Unsupported |
| 1113 | # If the block device is read-only, DeviceIsReadOnly |
| 1114 | # If a long-running operation is using the device, DeviceInUse |
Luiz Capitulino | 5e7caac | 2011-11-25 14:57:10 -0200 | [diff] [blame] | 1115 | # |
| 1116 | # Since: 0.14.0 |
| 1117 | ## |
| 1118 | { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }} |
Luiz Capitulino | 6106e24 | 2011-11-25 16:15:19 -0200 | [diff] [blame] | 1119 | |
| 1120 | ## |
| 1121 | # @blockdev-snapshot-sync |
| 1122 | # |
| 1123 | # Generates a synchronous snapshot of a block device. |
| 1124 | # |
| 1125 | # @device: the name of the device to generate the snapshot from. |
| 1126 | # |
| 1127 | # @snapshot-file: the target of the new image. If the file exists, or if it |
| 1128 | # is a device, the snapshot will be created in the existing |
| 1129 | # file/device. If does not exist, a new file will be created. |
| 1130 | # |
| 1131 | # @format: #optional the format of the snapshot image, default is 'qcow2'. |
| 1132 | # |
| 1133 | # Returns: nothing on success |
| 1134 | # If @device is not a valid block device, DeviceNotFound |
| 1135 | # If @snapshot-file can't be opened, OpenFileFailed |
| 1136 | # If @format is invalid, InvalidBlockFormat |
| 1137 | # |
| 1138 | # Notes: One of the last steps taken by this command is to close the current |
| 1139 | # image being used by @device and open the @snapshot-file one. If that |
| 1140 | # fails, the command will try to reopen the original image file. If |
| 1141 | # that also fails OpenFileFailed will be returned and the guest may get |
| 1142 | # unexpected errors. |
| 1143 | # |
| 1144 | # Since 0.14.0 |
| 1145 | ## |
| 1146 | { 'command': 'blockdev-snapshot-sync', |
| 1147 | 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str' } } |
Luiz Capitulino | d51a67b | 2011-11-25 17:52:45 -0200 | [diff] [blame] | 1148 | |
| 1149 | ## |
| 1150 | # @human-monitor-command: |
| 1151 | # |
| 1152 | # Execute a command on the human monitor and return the output. |
| 1153 | # |
| 1154 | # @command-line: the command to execute in the human monitor |
| 1155 | # |
| 1156 | # @cpu-index: #optional The CPU to use for commands that require an implicit CPU |
| 1157 | # |
| 1158 | # Returns: the output of the command as a string |
| 1159 | # |
| 1160 | # Since: 0.14.0 |
| 1161 | # |
| 1162 | # Notes: This command only exists as a stop-gap. It's use is highly |
| 1163 | # discouraged. The semantics of this command are not guaranteed. |
| 1164 | # |
| 1165 | # Known limitations: |
| 1166 | # |
| 1167 | # o This command is stateless, this means that commands that depend |
| 1168 | # on state information (such as getfd) might not work |
| 1169 | # |
| 1170 | # o Commands that prompt the user for data (eg. 'cont' when the block |
| 1171 | # device is encrypted) don't currently work |
| 1172 | ## |
| 1173 | { 'command': 'human-monitor-command', |
| 1174 | 'data': {'command-line': 'str', '*cpu-index': 'int'}, |
| 1175 | 'returns': 'str' } |
Luiz Capitulino | 6cdedb0 | 2011-11-27 22:54:09 -0200 | [diff] [blame] | 1176 | |
| 1177 | ## |
| 1178 | # @migrate_cancel |
| 1179 | # |
| 1180 | # Cancel the current executing migration process. |
| 1181 | # |
| 1182 | # Returns: nothing on success |
| 1183 | # |
| 1184 | # Notes: This command succeeds even if there is no migration process running. |
| 1185 | # |
| 1186 | # Since: 0.14.0 |
| 1187 | ## |
| 1188 | { 'command': 'migrate_cancel' } |
Luiz Capitulino | 4f0a993 | 2011-11-27 23:18:01 -0200 | [diff] [blame] | 1189 | |
| 1190 | ## |
| 1191 | # @migrate_set_downtime |
| 1192 | # |
| 1193 | # Set maximum tolerated downtime for migration. |
| 1194 | # |
| 1195 | # @value: maximum downtime in seconds |
| 1196 | # |
| 1197 | # Returns: nothing on success |
| 1198 | # |
| 1199 | # Since: 0.14.0 |
| 1200 | ## |
| 1201 | { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } |
Luiz Capitulino | 3dc8538 | 2011-11-28 11:59:37 -0200 | [diff] [blame] | 1202 | |
| 1203 | ## |
| 1204 | # @migrate_set_speed |
| 1205 | # |
| 1206 | # Set maximum speed for migration. |
| 1207 | # |
| 1208 | # @value: maximum speed in bytes. |
| 1209 | # |
| 1210 | # Returns: nothing on success |
| 1211 | # |
| 1212 | # Notes: A value lesser than zero will be automatically round up to zero. |
| 1213 | # |
| 1214 | # Since: 0.14.0 |
| 1215 | ## |
| 1216 | { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1217 | |
| 1218 | ## |
| 1219 | # @DevicePropertyInfo: |
| 1220 | # |
| 1221 | # @name: the name of the property |
| 1222 | # |
| 1223 | # @type: the type of the property. This will typically come in one of four |
| 1224 | # forms: |
| 1225 | # |
| 1226 | # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. |
| 1227 | # These types are mapped to the appropriate JSON type. |
| 1228 | # |
| 1229 | # 2) A legacy type in the form 'legacy<subtype>' where subtype is the |
| 1230 | # legacy qdev typename. These types are always treated as strings. |
| 1231 | # |
| 1232 | # 3) A child type in the form 'child<subtype>' where subtype is a qdev |
| 1233 | # device type name. Child properties create the composition tree. |
| 1234 | # |
| 1235 | # 4) A link type in the form 'link<subtype>' where subtype is a qdev |
| 1236 | # device type name. Link properties form the device model graph. |
| 1237 | # |
| 1238 | # Since: 1.1 |
| 1239 | # |
| 1240 | # Notes: This type is experimental. Its syntax may change in future releases. |
| 1241 | ## |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1242 | { 'type': 'ObjectPropertyInfo', |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1243 | 'data': { 'name': 'str', 'type': 'str' } } |
| 1244 | |
| 1245 | ## |
| 1246 | # @qom-list: |
| 1247 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1248 | # 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] | 1249 | # model. |
| 1250 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1251 | # @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] | 1252 | # this parameter. |
| 1253 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1254 | # Returns: a list of @ObjectPropertyInfo that describe the properties of the |
| 1255 | # object. |
Anthony Liguori | b4b12c6 | 2011-12-12 14:29:34 -0600 | [diff] [blame] | 1256 | # |
| 1257 | # Since: 1.1 |
| 1258 | # |
| 1259 | # Notes: This command is experimental. It's syntax may change in future |
| 1260 | # releases. |
| 1261 | ## |
| 1262 | { 'command': 'qom-list', |
| 1263 | 'data': { 'path': 'str' }, |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1264 | 'returns': [ 'ObjectPropertyInfo' ] } |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1265 | |
| 1266 | ## |
| 1267 | # @qom-get: |
| 1268 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1269 | # 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] | 1270 | # value. |
| 1271 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1272 | # @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] | 1273 | # paths--absolute and partial paths. |
| 1274 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1275 | # Absolute paths are derived from the root object and can follow child<> |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1276 | # or link<> properties. Since they can follow link<> properties, they |
| 1277 | # can be arbitrarily long. Absolute paths look like absolute filenames |
| 1278 | # and are prefixed with a leading slash. |
| 1279 | # |
| 1280 | # Partial paths look like relative filenames. They do not begin |
| 1281 | # with a prefix. The matching rules for partial paths are subtle but |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1282 | # designed to make specifying objects easy. At each level of the |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1283 | # composition tree, the partial path is matched as an absolute path. |
| 1284 | # The first match is not returned. At least two matches are searched |
| 1285 | # for. A successful result is only returned if only one match is |
| 1286 | # found. If more than one match is found, a flag is return to |
| 1287 | # indicate that the match was ambiguous. |
| 1288 | # |
| 1289 | # @property: The property name to read |
| 1290 | # |
| 1291 | # Returns: The property value. The type depends on the property type. legacy<> |
| 1292 | # properties are returned as #str. child<> and link<> properties are |
| 1293 | # returns as #str pathnames. All integer property types (u8, u16, etc) |
| 1294 | # are returned as #int. |
| 1295 | # |
| 1296 | # Since: 1.1 |
| 1297 | # |
| 1298 | # Notes: This command is experimental and may change syntax in future releases. |
| 1299 | ## |
| 1300 | { 'command': 'qom-get', |
| 1301 | 'data': { 'path': 'str', 'property': 'str' }, |
| 1302 | 'returns': 'visitor', |
| 1303 | 'gen': 'no' } |
| 1304 | |
| 1305 | ## |
| 1306 | # @qom-set: |
| 1307 | # |
Anthony Liguori | 57c9faf | 2012-01-30 08:55:55 -0600 | [diff] [blame] | 1308 | # This command will set a property from a object model path. |
Anthony Liguori | eb6e8ea | 2011-12-12 14:29:35 -0600 | [diff] [blame] | 1309 | # |
| 1310 | # @path: see @qom-get for a description of this parameter |
| 1311 | # |
| 1312 | # @property: the property name to set |
| 1313 | # |
| 1314 | # @value: a value who's type is appropriate for the property type. See @qom-get |
| 1315 | # for a description of type mapping. |
| 1316 | # |
| 1317 | # Since: 1.1 |
| 1318 | # |
| 1319 | # Notes: This command is experimental and may change syntax in future releases. |
| 1320 | ## |
| 1321 | { 'command': 'qom-set', |
| 1322 | 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' }, |
| 1323 | 'gen': 'no' } |
Luiz Capitulino | fbf796f | 2011-12-07 11:17:51 -0200 | [diff] [blame] | 1324 | |
| 1325 | ## |
| 1326 | # @set_password: |
| 1327 | # |
| 1328 | # Sets the password of a remote display session. |
| 1329 | # |
| 1330 | # @protocol: `vnc' to modify the VNC server password |
| 1331 | # `spice' to modify the Spice server password |
| 1332 | # |
| 1333 | # @password: the new password |
| 1334 | # |
| 1335 | # @connected: #optional how to handle existing clients when changing the |
| 1336 | # password. If nothing is specified, defaults to `keep' |
| 1337 | # `fail' to fail the command if clients are connected |
| 1338 | # `disconnect' to disconnect existing clients |
| 1339 | # `keep' to maintain existing clients |
| 1340 | # |
| 1341 | # Returns: Nothing on success |
| 1342 | # If Spice is not enabled, DeviceNotFound |
| 1343 | # If @protocol does not support connected, InvalidParameter |
| 1344 | # If @protocol is invalid, InvalidParameter |
| 1345 | # If any other error occurs, SetPasswdFailed |
| 1346 | # |
| 1347 | # Notes: If VNC is not enabled, SetPasswdFailed is returned. |
| 1348 | # |
| 1349 | # Since: 0.14.0 |
| 1350 | ## |
| 1351 | { 'command': 'set_password', |
| 1352 | 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} } |
Luiz Capitulino | 9ad5372 | 2011-12-07 11:47:57 -0200 | [diff] [blame] | 1353 | |
| 1354 | ## |
| 1355 | # @expire_password: |
| 1356 | # |
| 1357 | # Expire the password of a remote display server. |
| 1358 | # |
| 1359 | # @protocol: the name of the remote display protocol `vnc' or `spice' |
| 1360 | # |
| 1361 | # @time: when to expire the password. |
| 1362 | # `now' to expire the password immediately |
| 1363 | # `never' to cancel password expiration |
| 1364 | # `+INT' where INT is the number of seconds from now (integer) |
| 1365 | # `INT' where INT is the absolute time in seconds |
| 1366 | # |
| 1367 | # Returns: Nothing on success |
| 1368 | # If @protocol is `spice' and Spice is not active, DeviceNotFound |
| 1369 | # If an error occurs setting password expiration, SetPasswdFailed |
| 1370 | # If @protocol is not `spice' or 'vnc', InvalidParameter |
| 1371 | # |
| 1372 | # Since: 0.14.0 |
| 1373 | # |
| 1374 | # Notes: Time is relative to the server and currently there is no way to |
| 1375 | # coordinate server time with client time. It is not recommended to |
| 1376 | # use the absolute time version of the @time parameter unless you're |
| 1377 | # sure you are on the same machine as the QEMU instance. |
| 1378 | ## |
| 1379 | { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} } |
Luiz Capitulino | c245b6a | 2011-12-07 16:02:36 -0200 | [diff] [blame] | 1380 | |
| 1381 | ## |
| 1382 | # @eject: |
| 1383 | # |
| 1384 | # Ejects a device from a removable drive. |
| 1385 | # |
| 1386 | # @device: The name of the device |
| 1387 | # |
| 1388 | # @force: @optional If true, eject regardless of whether the drive is locked. |
| 1389 | # If not specified, the default value is false. |
| 1390 | # |
| 1391 | # Returns: Nothing on success |
| 1392 | # If @device is not a valid block device, DeviceNotFound |
| 1393 | # If @device is not removable and @force is false, DeviceNotRemovable |
| 1394 | # If @force is false and @device is locked, DeviceLocked |
| 1395 | # |
| 1396 | # Notes: Ejecting a device will no media results in success |
| 1397 | # |
| 1398 | # Since: 0.14.0 |
| 1399 | ## |
| 1400 | { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} } |
Luiz Capitulino | 270b243 | 2011-12-08 11:45:55 -0200 | [diff] [blame] | 1401 | |
| 1402 | ## |
| 1403 | # @change-vnc-password: |
| 1404 | # |
| 1405 | # Change the VNC server password. |
| 1406 | # |
| 1407 | # @target: the new password to use with VNC authentication |
| 1408 | # |
| 1409 | # Since: 1.1 |
| 1410 | # |
| 1411 | # Notes: An empty password in this command will set the password to the empty |
| 1412 | # string. Existing clients are unaffected by executing this command. |
| 1413 | ## |
| 1414 | { 'command': 'change-vnc-password', 'data': {'password': 'str'} } |
Luiz Capitulino | 333a96e | 2011-12-08 11:13:50 -0200 | [diff] [blame] | 1415 | |
| 1416 | ## |
| 1417 | # @change: |
| 1418 | # |
| 1419 | # This command is multiple commands multiplexed together. |
| 1420 | # |
| 1421 | # @device: This is normally the name of a block device but it may also be 'vnc'. |
| 1422 | # when it's 'vnc', then sub command depends on @target |
| 1423 | # |
| 1424 | # @target: If @device is a block device, then this is the new filename. |
| 1425 | # If @device is 'vnc', then if the value 'password' selects the vnc |
| 1426 | # change password command. Otherwise, this specifies a new server URI |
| 1427 | # address to listen to for VNC connections. |
| 1428 | # |
| 1429 | # @arg: If @device is a block device, then this is an optional format to open |
| 1430 | # the device with. |
| 1431 | # If @device is 'vnc' and @target is 'password', this is the new VNC |
| 1432 | # password to set. If this argument is an empty string, then no future |
| 1433 | # logins will be allowed. |
| 1434 | # |
| 1435 | # Returns: Nothing on success. |
| 1436 | # If @device is not a valid block device, DeviceNotFound |
| 1437 | # If @format is not a valid block format, InvalidBlockFormat |
| 1438 | # If the new block device is encrypted, DeviceEncrypted. Note that |
| 1439 | # if this error is returned, the device has been opened successfully |
| 1440 | # and an additional call to @block_passwd is required to set the |
| 1441 | # device's password. The behavior of reads and writes to the block |
| 1442 | # device between when these calls are executed is undefined. |
| 1443 | # |
| 1444 | # Notes: It is strongly recommended that this interface is not used especially |
| 1445 | # for changing block devices. |
| 1446 | # |
| 1447 | # Since: 0.14.0 |
| 1448 | ## |
| 1449 | { 'command': 'change', |
| 1450 | 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } |
Luiz Capitulino | 80047da | 2011-12-14 16:49:14 -0200 | [diff] [blame] | 1451 | |
| 1452 | ## |
| 1453 | # @block_set_io_throttle: |
| 1454 | # |
| 1455 | # Change I/O throttle limits for a block drive. |
| 1456 | # |
| 1457 | # @device: The name of the device |
| 1458 | # |
| 1459 | # @bps: total throughput limit in bytes per second |
| 1460 | # |
| 1461 | # @bps_rd: read throughput limit in bytes per second |
| 1462 | # |
| 1463 | # @bps_wr: write throughput limit in bytes per second |
| 1464 | # |
| 1465 | # @iops: total I/O operations per second |
| 1466 | # |
| 1467 | # @ops_rd: read I/O operations per second |
| 1468 | # |
| 1469 | # @iops_wr: write I/O operations per second |
| 1470 | # |
| 1471 | # Returns: Nothing on success |
| 1472 | # If @device is not a valid block device, DeviceNotFound |
| 1473 | # If the argument combination is invalid, InvalidParameterCombination |
| 1474 | # |
| 1475 | # Since: 1.1 |
| 1476 | ## |
| 1477 | { 'command': 'block_set_io_throttle', |
| 1478 | 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', |
| 1479 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } } |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 1480 | |
| 1481 | # @block_stream: |
| 1482 | # |
| 1483 | # Copy data from a backing file into a block device. |
| 1484 | # |
| 1485 | # The block streaming operation is performed in the background until the entire |
| 1486 | # backing file has been copied. This command returns immediately once streaming |
| 1487 | # has started. The status of ongoing block streaming operations can be checked |
| 1488 | # with query-block-jobs. The operation can be stopped before it has completed |
| 1489 | # using the block_job_cancel command. |
| 1490 | # |
| 1491 | # If a base file is specified then sectors are not copied from that base file and |
| 1492 | # its backing chain. When streaming completes the image file will have the base |
| 1493 | # file as its backing file. This can be used to stream a subset of the backing |
| 1494 | # file chain instead of flattening the entire image. |
| 1495 | # |
| 1496 | # On successful completion the image file is updated to drop the backing file |
| 1497 | # and the BLOCK_JOB_COMPLETED event is emitted. |
| 1498 | # |
| 1499 | # @device: the device name |
| 1500 | # |
| 1501 | # @base: #optional the common backing file name |
| 1502 | # |
| 1503 | # Returns: Nothing on success |
| 1504 | # If streaming is already active on this device, DeviceInUse |
| 1505 | # If @device does not exist, DeviceNotFound |
| 1506 | # If image streaming is not supported by this device, NotSupported |
Marcelo Tosatti | 019b8cb | 2012-01-18 14:40:52 +0000 | [diff] [blame] | 1507 | # If @base does not exist, BaseNotFound |
Stefan Hajnoczi | 12bd451 | 2012-01-18 14:40:46 +0000 | [diff] [blame] | 1508 | # |
| 1509 | # Since: 1.1 |
| 1510 | ## |
| 1511 | { 'command': 'block_stream', 'data': { 'device': 'str', '*base': 'str' } } |
Stefan Hajnoczi | 2d47c6e | 2012-01-18 14:40:47 +0000 | [diff] [blame] | 1512 | |
| 1513 | ## |
| 1514 | # @block_job_set_speed: |
| 1515 | # |
| 1516 | # Set maximum speed for a background block operation. |
| 1517 | # |
| 1518 | # This command can only be issued when there is an active block job. |
| 1519 | # |
| 1520 | # Throttling can be disabled by setting the speed to 0. |
| 1521 | # |
| 1522 | # @device: the device name |
| 1523 | # |
| 1524 | # @value: the maximum speed, in bytes per second |
| 1525 | # |
| 1526 | # Returns: Nothing on success |
| 1527 | # If the job type does not support throttling, NotSupported |
| 1528 | # If streaming is not active on this device, DeviceNotActive |
| 1529 | # |
| 1530 | # Since: 1.1 |
| 1531 | ## |
| 1532 | { 'command': 'block_job_set_speed', |
| 1533 | 'data': { 'device': 'str', 'value': 'int' } } |
Stefan Hajnoczi | 370521a | 2012-01-18 14:40:48 +0000 | [diff] [blame] | 1534 | |
| 1535 | ## |
| 1536 | # @block_job_cancel: |
| 1537 | # |
| 1538 | # Stop an active block streaming operation. |
| 1539 | # |
| 1540 | # This command returns immediately after marking the active block streaming |
| 1541 | # operation for cancellation. It is an error to call this command if no |
| 1542 | # operation is in progress. |
| 1543 | # |
| 1544 | # The operation will cancel as soon as possible and then emit the |
| 1545 | # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when |
| 1546 | # enumerated using query-block-jobs. |
| 1547 | # |
| 1548 | # The image file retains its backing file unless the streaming operation happens |
| 1549 | # to complete just as it is being cancelled. |
| 1550 | # |
| 1551 | # A new block streaming operation can be started at a later time to finish |
| 1552 | # copying all data from the backing file. |
| 1553 | # |
| 1554 | # @device: the device name |
| 1555 | # |
| 1556 | # Returns: Nothing on success |
| 1557 | # If streaming is not active on this device, DeviceNotActive |
| 1558 | # If cancellation already in progress, DeviceInUse |
| 1559 | # |
| 1560 | # Since: 1.1 |
| 1561 | ## |
| 1562 | { 'command': 'block_job_cancel', 'data': { 'device': 'str' } } |
Anthony Liguori | 5eeee3f | 2011-12-22 14:40:54 -0600 | [diff] [blame] | 1563 | |
| 1564 | ## |
| 1565 | # @ObjectTypeInfo: |
| 1566 | # |
| 1567 | # This structure describes a search result from @qom-list-types |
| 1568 | # |
| 1569 | # @name: the type name found in the search |
| 1570 | # |
| 1571 | # Since: 1.1 |
| 1572 | # |
| 1573 | # Notes: This command is experimental and may change syntax in future releases. |
| 1574 | ## |
| 1575 | { 'type': 'ObjectTypeInfo', |
| 1576 | 'data': { 'name': 'str' } } |
| 1577 | |
| 1578 | ## |
| 1579 | # @qom-list-types: |
| 1580 | # |
| 1581 | # This command will return a list of types given search parameters |
| 1582 | # |
| 1583 | # @implements: if specified, only return types that implement this type name |
| 1584 | # |
| 1585 | # @abstract: if true, include abstract types in the results |
| 1586 | # |
| 1587 | # Returns: a list of @ObjectTypeInfo or an empty list if no results are found |
| 1588 | # |
| 1589 | # Since: 1.1 |
| 1590 | # |
| 1591 | # Notes: This command is experimental and may change syntax in future releases. |
| 1592 | ## |
| 1593 | { 'command': 'qom-list-types', |
| 1594 | 'data': { '*implements': 'str', '*abstract': 'bool' }, |
| 1595 | 'returns': [ 'ObjectTypeInfo' ] } |