qmp: add block-job-pause and block-job-resume
[qemu/ar7.git] / qapi-schema.json
blob0f2b1a0a1d4f03e7976f0437193a76680b25cfd7
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 ##
6 # @ErrorClass
8 # QEMU error classes
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
13 # @CommandNotFound: the requested command has not been found
15 # @DeviceEncrypted: the requested operation can't be fulfilled because the
16 #                   selected device is encrypted
18 # @DeviceNotActive: a device has failed to be become active
20 # @DeviceNotFound: the requested device has not been found
22 # @KVMMissingCap: the requested operation can't be fulfilled because a
23 #                 required KVM capability is missing
25 # @MigrationExpected: the requested operation can't be fulfilled because a
26 #                     migration process is expected
28 # Since: 1.2
30 { 'enum': 'ErrorClass',
31   'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
32             'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap',
33             'MigrationExpected' ] }
36 # @NameInfo:
38 # Guest name information.
40 # @name: #optional The name of the guest
42 # Since 0.14.0
44 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
47 # @query-name:
49 # Return the name information of a guest.
51 # Returns: @NameInfo of the guest
53 # Since 0.14.0
55 { 'command': 'query-name', 'returns': 'NameInfo' }
58 # @VersionInfo:
60 # A description of QEMU's version.
62 # @qemu.major:  The major version of QEMU
64 # @qemu.minor:  The minor version of QEMU
66 # @qemu.micro:  The micro version of QEMU.  By current convention, a micro
67 #               version of 50 signifies a development branch.  A micro version
68 #               greater than or equal to 90 signifies a release candidate for
69 #               the next minor version.  A micro version of less than 50
70 #               signifies a stable release.
72 # @package:     QEMU will always set this field to an empty string.  Downstream
73 #               versions of QEMU should set this to a non-empty string.  The
74 #               exact format depends on the downstream however it highly
75 #               recommended that a unique name is used.
77 # Since: 0.14.0
79 { 'type': 'VersionInfo',
80   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
81            'package': 'str'} }
84 # @query-version:
86 # Returns the current version of QEMU.
88 # Returns:  A @VersionInfo object describing the current version of QEMU.
90 # Since: 0.14.0
92 { 'command': 'query-version', 'returns': 'VersionInfo' }
95 # @KvmInfo:
97 # Information about support for KVM acceleration
99 # @enabled: true if KVM acceleration is active
101 # @present: true if KVM acceleration is built into this executable
103 # Since: 0.14.0
105 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
108 # @query-kvm:
110 # Returns information about KVM acceleration
112 # Returns: @KvmInfo
114 # Since: 0.14.0
116 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
119 # @RunState
121 # An enumeration of VM run states.
123 # @debug: QEMU is running on a debugger
125 # @finish-migrate: guest is paused to finish the migration process
127 # @inmigrate: guest is paused waiting for an incoming migration
129 # @internal-error: An internal error that prevents further guest execution
130 # has occurred
132 # @io-error: the last IOP has failed and the device is configured to pause
133 # on I/O errors
135 # @paused: guest has been paused via the 'stop' command
137 # @postmigrate: guest is paused following a successful 'migrate'
139 # @prelaunch: QEMU was started with -S and guest has not started
141 # @restore-vm: guest is paused to restore VM state
143 # @running: guest is actively running
145 # @save-vm: guest is paused to save the VM state
147 # @shutdown: guest is shut down (and -no-shutdown is in use)
149 # @suspended: guest is suspended (ACPI S3)
151 # @watchdog: the watchdog action is configured to pause and has been triggered
153 { 'enum': 'RunState',
154   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
155             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
156             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
159 # @SnapshotInfo
161 # @id: unique snapshot id
163 # @name: user chosen name
165 # @vm-state-size: size of the VM state
167 # @date-sec: UTC date of the snapshot in seconds
169 # @date-nsec: fractional part in nano seconds to be used with date-sec
171 # @vm-clock-sec: VM clock relative to boot in seconds
173 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
175 # Since: 1.3
179 { 'type': 'SnapshotInfo',
180   'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
181             'date-sec': 'int', 'date-nsec': 'int',
182             'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
185 # @ImageInfo:
187 # Information about a QEMU image file
189 # @filename: name of the image file
191 # @format: format of the image file
193 # @virtual-size: maximum capacity in bytes of the image
195 # @actual-size: #optional actual size on disk in bytes of the image
197 # @dirty-flag: #optional true if image is not cleanly closed
199 # @cluster-size: #optional size of a cluster in bytes
201 # @encrypted: #optional true if the image is encrypted
203 # @backing-filename: #optional name of the backing file
205 # @full-backing-filename: #optional full path of the backing file
207 # @backing-filename-format: #optional the format of the backing file
209 # @snapshots: #optional list of VM snapshots
211 # Since: 1.3
215 { 'type': 'ImageInfo',
216   'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
217            '*actual-size': 'int', 'virtual-size': 'int',
218            '*cluster-size': 'int', '*encrypted': 'bool',
219            '*backing-filename': 'str', '*full-backing-filename': 'str',
220            '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } }
223 # @StatusInfo:
225 # Information about VCPU run state
227 # @running: true if all VCPUs are runnable, false if not runnable
229 # @singlestep: true if VCPUs are in single-step mode
231 # @status: the virtual machine @RunState
233 # Since:  0.14.0
235 # Notes: @singlestep is enabled through the GDB stub
237 { 'type': 'StatusInfo',
238   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
241 # @query-status:
243 # Query the run status of all VCPUs
245 # Returns: @StatusInfo reflecting all VCPUs
247 # Since:  0.14.0
249 { 'command': 'query-status', 'returns': 'StatusInfo' }
252 # @UuidInfo:
254 # Guest UUID information.
256 # @UUID: the UUID of the guest
258 # Since: 0.14.0
260 # Notes: If no UUID was specified for the guest, a null UUID is returned.
262 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
265 # @query-uuid:
267 # Query the guest UUID information.
269 # Returns: The @UuidInfo for the guest
271 # Since 0.14.0
273 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
276 # @ChardevInfo:
278 # Information about a character device.
280 # @label: the label of the character device
282 # @filename: the filename of the character device
284 # Notes: @filename is encoded using the QEMU command line character device
285 #        encoding.  See the QEMU man page for details.
287 # Since: 0.14.0
289 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
292 # @query-chardev:
294 # Returns information about current character devices.
296 # Returns: a list of @ChardevInfo
298 # Since: 0.14.0
300 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
303 # @CommandInfo:
305 # Information about a QMP command
307 # @name: The command name
309 # Since: 0.14.0
311 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
314 # @query-commands:
316 # Return a list of supported QMP commands by this server
318 # Returns: A list of @CommandInfo for all supported commands
320 # Since: 0.14.0
322 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
325 # @EventInfo:
327 # Information about a QMP event
329 # @name: The event name
331 # Since: 1.2.0
333 { 'type': 'EventInfo', 'data': {'name': 'str'} }
336 # @query-events:
338 # Return a list of supported QMP events by this server
340 # Returns: A list of @EventInfo for all supported events
342 # Since: 1.2.0
344 { 'command': 'query-events', 'returns': ['EventInfo'] }
347 # @MigrationStats
349 # Detailed migration status.
351 # @transferred: amount of bytes already transferred to the target VM
353 # @remaining: amount of bytes remaining to be transferred to the target VM
355 # @total: total amount of bytes involved in the migration process
357 # @duplicate: number of duplicate pages (since 1.2)
359 # @normal : number of normal pages (since 1.2)
361 # @normal-bytes : number of normal bytes sent (since 1.2)
363 # Since: 0.14.0
365 { 'type': 'MigrationStats',
366   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
367            'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int' } }
370 # @XBZRLECacheStats
372 # Detailed XBZRLE migration cache statistics
374 # @cache-size: XBZRLE cache size
376 # @bytes: amount of bytes already transferred to the target VM
378 # @pages: amount of pages transferred to the target VM
380 # @cache-miss: number of cache miss
382 # @overflow: number of overflows
384 # Since: 1.2
386 { 'type': 'XBZRLECacheStats',
387   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
388            'cache-miss': 'int', 'overflow': 'int' } }
391 # @MigrationInfo
393 # Information about current migration process.
395 # @status: #optional string describing the current migration status.
396 #          As of 0.14.0 this can be 'active', 'completed', 'failed' or
397 #          'cancelled'. If this field is not returned, no migration process
398 #          has been initiated
400 # @ram: #optional @MigrationStats containing detailed migration
401 #       status, only returned if status is 'active' or
402 #       'completed'. 'comppleted' (since 1.2)
404 # @disk: #optional @MigrationStats containing detailed disk migration
405 #        status, only returned if status is 'active' and it is a block
406 #        migration
408 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
409 #                migration statistics, only returned if XBZRLE feature is on and
410 #                status is 'active' or 'completed' (since 1.2)
412 # @total-time: #optional total amount of milliseconds since migration started.
413 #        If migration has ended, it returns the total migration
414 #        time. (since 1.2)
416 # Since: 0.14.0
418 { 'type': 'MigrationInfo',
419   'data': {'*status': 'str', '*ram': 'MigrationStats',
420            '*disk': 'MigrationStats',
421            '*xbzrle-cache': 'XBZRLECacheStats',
422            '*total-time': 'int'} }
425 # @query-migrate
427 # Returns information about current migration process.
429 # Returns: @MigrationInfo
431 # Since: 0.14.0
433 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
436 # @MigrationCapability
438 # Migration capabilities enumeration
440 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
441 #          This feature allows us to minimize migration traffic for certain work
442 #          loads, by sending compressed difference of the pages
444 # Since: 1.2
446 { 'enum': 'MigrationCapability',
447   'data': ['xbzrle'] }
450 # @MigrationCapabilityStatus
452 # Migration capability information
454 # @capability: capability enum
456 # @state: capability state bool
458 # Since: 1.2
460 { 'type': 'MigrationCapabilityStatus',
461   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
464 # @migrate-set-capabilities
466 # Enable/Disable the following migration capabilities (like xbzrle)
468 # @capabilities: json array of capability modifications to make
470 # Since: 1.2
472 { 'command': 'migrate-set-capabilities',
473   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
476 # @query-migrate-capabilities
478 # Returns information about the current migration capabilities status
480 # Returns: @MigrationCapabilitiesStatus
482 # Since: 1.2
484 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
487 # @MouseInfo:
489 # Information about a mouse device.
491 # @name: the name of the mouse device
493 # @index: the index of the mouse device
495 # @current: true if this device is currently receiving mouse events
497 # @absolute: true if this device supports absolute coordinates as input
499 # Since: 0.14.0
501 { 'type': 'MouseInfo',
502   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
503            'absolute': 'bool'} }
506 # @query-mice:
508 # Returns information about each active mouse device
510 # Returns: a list of @MouseInfo for each device
512 # Since: 0.14.0
514 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
517 # @CpuInfo:
519 # Information about a virtual CPU
521 # @CPU: the index of the virtual CPU
523 # @current: this only exists for backwards compatible and should be ignored
525 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
526 #          to a processor specific low power mode.
528 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
529 #                pointer.
530 #                If the target is Sparc, this is the PC component of the
531 #                instruction pointer.
533 # @nip: #optional If the target is PPC, the instruction pointer
535 # @npc: #optional If the target is Sparc, the NPC component of the instruction
536 #                 pointer
538 # @PC: #optional If the target is MIPS, the instruction pointer
540 # @thread_id: ID of the underlying host thread
542 # Since: 0.14.0
544 # Notes: @halted is a transient state that changes frequently.  By the time the
545 #        data is sent to the client, the guest may no longer be halted.
547 { 'type': 'CpuInfo',
548   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
549            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
552 # @query-cpus:
554 # Returns a list of information about each virtual CPU.
556 # Returns: a list of @CpuInfo for each virtual CPU
558 # Since: 0.14.0
560 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
563 # @BlockDeviceInfo:
565 # Information about the backing device for a block device.
567 # @file: the filename of the backing device
569 # @ro: true if the backing device was open read-only
571 # @drv: the name of the block format used to open the backing device. As of
572 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
573 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
574 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
575 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
577 # @backing_file: #optional the name of the backing file (for copy-on-write)
579 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
581 # @encrypted: true if the backing device is encrypted
583 # @encryption_key_missing: true if the backing device is encrypted but an
584 #                          valid encryption key is missing
586 # @bps: total throughput limit in bytes per second is specified
588 # @bps_rd: read throughput limit in bytes per second is specified
590 # @bps_wr: write throughput limit in bytes per second is specified
592 # @iops: total I/O operations per second is specified
594 # @iops_rd: read I/O operations per second is specified
596 # @iops_wr: write I/O operations per second is specified
598 # Since: 0.14.0
600 # Notes: This interface is only found in @BlockInfo.
602 { 'type': 'BlockDeviceInfo',
603   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
604             '*backing_file': 'str', 'backing_file_depth': 'int',
605             'encrypted': 'bool', 'encryption_key_missing': 'bool',
606             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
607             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
610 # @BlockDeviceIoStatus:
612 # An enumeration of block device I/O status.
614 # @ok: The last I/O operation has succeeded
616 # @failed: The last I/O operation has failed
618 # @nospace: The last I/O operation has failed due to a no-space condition
620 # Since: 1.0
622 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
625 # @BlockInfo:
627 # Block device information.  This structure describes a virtual device and
628 # the backing device associated with it.
630 # @device: The device name associated with the virtual device.
632 # @type: This field is returned only for compatibility reasons, it should
633 #        not be used (always returns 'unknown')
635 # @removable: True if the device supports removable media.
637 # @locked: True if the guest has locked this device from having its media
638 #          removed
640 # @tray_open: #optional True if the device has a tray and it is open
641 #             (only present if removable is true)
643 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
644 #             supports it and the VM is configured to stop on errors
646 # @inserted: #optional @BlockDeviceInfo describing the device if media is
647 #            present
649 # Since:  0.14.0
651 { 'type': 'BlockInfo',
652   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
653            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
654            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
657 # @query-block:
659 # Get a list of BlockInfo for all virtual block devices.
661 # Returns: a list of @BlockInfo describing each virtual block device
663 # Since: 0.14.0
665 { 'command': 'query-block', 'returns': ['BlockInfo'] }
668 # @BlockDeviceStats:
670 # Statistics of a virtual block device or a block backing device.
672 # @rd_bytes:      The number of bytes read by the device.
674 # @wr_bytes:      The number of bytes written by the device.
676 # @rd_operations: The number of read operations performed by the device.
678 # @wr_operations: The number of write operations performed by the device.
680 # @flush_operations: The number of cache flush operations performed by the
681 #                    device (since 0.15.0)
683 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
684 #                       (since 0.15.0).
686 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
688 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
690 # @wr_highest_offset: The offset after the greatest byte written to the
691 #                     device.  The intended use of this information is for
692 #                     growable sparse files (like qcow2) that are used on top
693 #                     of a physical device.
695 # Since: 0.14.0
697 { 'type': 'BlockDeviceStats',
698   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
699            'wr_operations': 'int', 'flush_operations': 'int',
700            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
701            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
704 # @BlockStats:
706 # Statistics of a virtual block device or a block backing device.
708 # @device: #optional If the stats are for a virtual block device, the name
709 #          corresponding to the virtual block device.
711 # @stats:  A @BlockDeviceStats for the device.
713 # @parent: #optional This may point to the backing block device if this is a
714 #          a virtual block device.  If it's a backing block, this will point
715 #          to the backing file is one is present.
717 # Since: 0.14.0
719 { 'type': 'BlockStats',
720   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
721            '*parent': 'BlockStats'} }
724 # @query-blockstats:
726 # Query the @BlockStats for all virtual block devices.
728 # Returns: A list of @BlockStats for each virtual block devices.
730 # Since: 0.14.0
732 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
735 # @VncClientInfo:
737 # Information about a connected VNC client.
739 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
740 #        when possible.
742 # @family: 'ipv6' if the client is connected via IPv6 and TCP
743 #          'ipv4' if the client is connected via IPv4 and TCP
744 #          'unix' if the client is connected via a unix domain socket
745 #          'unknown' otherwise
747 # @service: The service name of the client's port.  This may depends on the
748 #           host system's service database so symbolic names should not be
749 #           relied on.
751 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
752 #              Name of the client.
754 # @sasl_username: #optional If SASL authentication is in use, the SASL username
755 #                 used for authentication.
757 # Since: 0.14.0
759 { 'type': 'VncClientInfo',
760   'data': {'host': 'str', 'family': 'str', 'service': 'str',
761            '*x509_dname': 'str', '*sasl_username': 'str'} }
764 # @VncInfo:
766 # Information about the VNC session.
768 # @enabled: true if the VNC server is enabled, false otherwise
770 # @host: #optional The hostname the VNC server is bound to.  This depends on
771 #        the name resolution on the host and may be an IP address.
773 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
774 #                    'ipv4' if the host is listening for IPv4 connections
775 #                    'unix' if the host is listening on a unix domain socket
776 #                    'unknown' otherwise
778 # @service: #optional The service name of the server's port.  This may depends
779 #           on the host system's service database so symbolic names should not
780 #           be relied on.
782 # @auth: #optional the current authentication type used by the server
783 #        'none' if no authentication is being used
784 #        'vnc' if VNC authentication is being used
785 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
786 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
787 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
788 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
789 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
790 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
791 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
792 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
793 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
795 # @clients: a list of @VncClientInfo of all currently connected clients
797 # Since: 0.14.0
799 { 'type': 'VncInfo',
800   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
801            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
804 # @query-vnc:
806 # Returns information about the current VNC server
808 # Returns: @VncInfo
810 # Since: 0.14.0
812 { 'command': 'query-vnc', 'returns': 'VncInfo' }
815 # @SpiceChannel
817 # Information about a SPICE client channel.
819 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
820 #        when possible.
822 # @family: 'ipv6' if the client is connected via IPv6 and TCP
823 #          'ipv4' if the client is connected via IPv4 and TCP
824 #          'unix' if the client is connected via a unix domain socket
825 #          'unknown' otherwise
827 # @port: The client's port number.
829 # @connection-id: SPICE connection id number.  All channels with the same id
830 #                 belong to the same SPICE session.
832 # @connection-type: SPICE channel type number.  "1" is the main control
833 #                   channel, filter for this one if you want to track spice
834 #                   sessions only
836 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
837 #              multiple channels of the same type exist, such as multiple
838 #              display channels in a multihead setup
840 # @tls: true if the channel is encrypted, false otherwise.
842 # Since: 0.14.0
844 { 'type': 'SpiceChannel',
845   'data': {'host': 'str', 'family': 'str', 'port': 'str',
846            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
847            'tls': 'bool'} }
850 # @SpiceQueryMouseMode
852 # An enumeration of Spice mouse states.
854 # @client: Mouse cursor position is determined by the client.
856 # @server: Mouse cursor position is determined by the server.
858 # @unknown: No information is available about mouse mode used by
859 #           the spice server.
861 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
863 # Since: 1.1
865 { 'enum': 'SpiceQueryMouseMode',
866   'data': [ 'client', 'server', 'unknown' ] }
869 # @SpiceInfo
871 # Information about the SPICE session.
873 # @enabled: true if the SPICE server is enabled, false otherwise
875 # @migrated: true if the last guest migration completed and spice
876 #            migration had completed as well. false otherwise.
878 # @host: #optional The hostname the SPICE server is bound to.  This depends on
879 #        the name resolution on the host and may be an IP address.
881 # @port: #optional The SPICE server's port number.
883 # @compiled-version: #optional SPICE server version.
885 # @tls-port: #optional The SPICE server's TLS port number.
887 # @auth: #optional the current authentication type used by the server
888 #        'none'  if no authentication is being used
889 #        'spice' uses SASL or direct TLS authentication, depending on command
890 #                line options
892 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
893 #              be determined by the client or the server, or unknown if spice
894 #              server doesn't provide this information.
896 #              Since: 1.1
898 # @channels: a list of @SpiceChannel for each active spice channel
900 # Since: 0.14.0
902 { 'type': 'SpiceInfo',
903   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
904            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
905            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
908 # @query-spice
910 # Returns information about the current SPICE server
912 # Returns: @SpiceInfo
914 # Since: 0.14.0
916 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
919 # @BalloonInfo:
921 # Information about the guest balloon device.
923 # @actual: the number of bytes the balloon currently contains
925 # @mem_swapped_in: #optional number of pages swapped in within the guest
927 # @mem_swapped_out: #optional number of pages swapped out within the guest
929 # @major_page_faults: #optional number of major page faults within the guest
931 # @minor_page_faults: #optional number of minor page faults within the guest
933 # @free_mem: #optional amount of memory (in bytes) free in the guest
935 # @total_mem: #optional amount of memory (in bytes) visible to the guest
937 # Since: 0.14.0
939 # Notes: all current versions of QEMU do not fill out optional information in
940 #        this structure.
942 { 'type': 'BalloonInfo',
943   'data': {'actual': 'int', '*mem_swapped_in': 'int',
944            '*mem_swapped_out': 'int', '*major_page_faults': 'int',
945            '*minor_page_faults': 'int', '*free_mem': 'int',
946            '*total_mem': 'int'} }
949 # @query-balloon:
951 # Return information about the balloon device.
953 # Returns: @BalloonInfo on success
954 #          If the balloon driver is enabled but not functional because the KVM
955 #          kernel module cannot support it, KvmMissingCap
956 #          If no balloon device is present, DeviceNotActive
958 # Since: 0.14.0
960 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
963 # @PciMemoryRange:
965 # A PCI device memory region
967 # @base: the starting address (guest physical)
969 # @limit: the ending address (guest physical)
971 # Since: 0.14.0
973 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
976 # @PciMemoryRegion
978 # Information about a PCI device I/O region.
980 # @bar: the index of the Base Address Register for this region
982 # @type: 'io' if the region is a PIO region
983 #        'memory' if the region is a MMIO region
985 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
987 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
989 # Since: 0.14.0
991 { 'type': 'PciMemoryRegion',
992   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
993            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
996 # @PciBridgeInfo:
998 # Information about a PCI Bridge device
1000 # @bus.number: primary bus interface number.  This should be the number of the
1001 #              bus the device resides on.
1003 # @bus.secondary: secondary bus interface number.  This is the number of the
1004 #                 main bus for the bridge
1006 # @bus.subordinate: This is the highest number bus that resides below the
1007 #                   bridge.
1009 # @bus.io_range: The PIO range for all devices on this bridge
1011 # @bus.memory_range: The MMIO range for all devices on this bridge
1013 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1014 #                          this bridge
1016 # @devices: a list of @PciDeviceInfo for each device on this bridge
1018 # Since: 0.14.0
1020 { 'type': 'PciBridgeInfo',
1021   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1022                     'io_range': 'PciMemoryRange',
1023                     'memory_range': 'PciMemoryRange',
1024                     'prefetchable_range': 'PciMemoryRange' },
1025            '*devices': ['PciDeviceInfo']} }
1028 # @PciDeviceInfo:
1030 # Information about a PCI device
1032 # @bus: the bus number of the device
1034 # @slot: the slot the device is located in
1036 # @function: the function of the slot used by the device
1038 # @class_info.desc: #optional a string description of the device's class
1040 # @class_info.class: the class code of the device
1042 # @id.device: the PCI device id
1044 # @id.vendor: the PCI vendor id
1046 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1048 # @qdev_id: the device name of the PCI device
1050 # @pci_bridge: if the device is a PCI bridge, the bridge information
1052 # @regions: a list of the PCI I/O regions associated with the device
1054 # Notes: the contents of @class_info.desc are not stable and should only be
1055 #        treated as informational.
1057 # Since: 0.14.0
1059 { 'type': 'PciDeviceInfo',
1060   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1061            'class_info': {'*desc': 'str', 'class': 'int'},
1062            'id': {'device': 'int', 'vendor': 'int'},
1063            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1064            'regions': ['PciMemoryRegion']} }
1067 # @PciInfo:
1069 # Information about a PCI bus
1071 # @bus: the bus index
1073 # @devices: a list of devices on this bus
1075 # Since: 0.14.0
1077 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1080 # @query-pci:
1082 # Return information about the PCI bus topology of the guest.
1084 # Returns: a list of @PciInfo for each PCI bus
1086 # Since: 0.14.0
1088 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1091 # @BlockJobInfo:
1093 # Information about a long-running block device operation.
1095 # @type: the job type ('stream' for image streaming)
1097 # @device: the block device name
1099 # @len: the maximum progress value
1101 # @busy: false if the job is known to be in a quiescent state, with
1102 #        no pending I/O.  Since 1.3.
1104 # @paused: whether the job is paused or, if @busy is true, will
1105 #          pause itself as soon as possible.  Since 1.3.
1107 # @offset: the current progress value
1109 # @speed: the rate limit, bytes per second
1111 # Since: 1.1
1113 { 'type': 'BlockJobInfo',
1114   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1115            'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int'} }
1118 # @query-block-jobs:
1120 # Return information about long-running block device operations.
1122 # Returns: a list of @BlockJobInfo for each active block job
1124 # Since: 1.1
1126 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1129 # @quit:
1131 # This command will cause the QEMU process to exit gracefully.  While every
1132 # attempt is made to send the QMP response before terminating, this is not
1133 # guaranteed.  When using this interface, a premature EOF would not be
1134 # unexpected.
1136 # Since: 0.14.0
1138 { 'command': 'quit' }
1141 # @stop:
1143 # Stop all guest VCPU execution.
1145 # Since:  0.14.0
1147 # Notes:  This function will succeed even if the guest is already in the stopped
1148 #         state
1150 { 'command': 'stop' }
1153 # @system_reset:
1155 # Performs a hard reset of a guest.
1157 # Since: 0.14.0
1159 { 'command': 'system_reset' }
1162 # @system_powerdown:
1164 # Requests that a guest perform a powerdown operation.
1166 # Since: 0.14.0
1168 # Notes: A guest may or may not respond to this command.  This command
1169 #        returning does not indicate that a guest has accepted the request or
1170 #        that it has shut down.  Many guests will respond to this command by
1171 #        prompting the user in some way.
1173 { 'command': 'system_powerdown' }
1176 # @cpu:
1178 # This command is a nop that is only provided for the purposes of compatibility.
1180 # Since: 0.14.0
1182 # Notes: Do not use this command.
1184 { 'command': 'cpu', 'data': {'index': 'int'} }
1187 # @memsave:
1189 # Save a portion of guest memory to a file.
1191 # @val: the virtual address of the guest to start from
1193 # @size: the size of memory region to save
1195 # @filename: the file to save the memory to as binary data
1197 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1198 #                       virtual address (defaults to CPU 0)
1200 # Returns: Nothing on success
1202 # Since: 0.14.0
1204 # Notes: Errors were not reliably returned until 1.1
1206 { 'command': 'memsave',
1207   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1210 # @pmemsave:
1212 # Save a portion of guest physical memory to a file.
1214 # @val: the physical address of the guest to start from
1216 # @size: the size of memory region to save
1218 # @filename: the file to save the memory to as binary data
1220 # Returns: Nothing on success
1222 # Since: 0.14.0
1224 # Notes: Errors were not reliably returned until 1.1
1226 { 'command': 'pmemsave',
1227   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1230 # @cont:
1232 # Resume guest VCPU execution.
1234 # Since:  0.14.0
1236 # Returns:  If successful, nothing
1237 #           If the QEMU is waiting for an incoming migration, MigrationExpected
1238 #           If QEMU was started with an encrypted block device and a key has
1239 #              not yet been set, DeviceEncrypted.
1241 # Notes:  This command will succeed if the guest is currently running.
1243 { 'command': 'cont' }
1246 # @system_wakeup:
1248 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1250 # Since:  1.1
1252 # Returns:  nothing.
1254 { 'command': 'system_wakeup' }
1257 # @inject-nmi:
1259 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1261 # Returns:  If successful, nothing
1263 # Since:  0.14.0
1265 # Notes: Only x86 Virtual Machines support this command.
1267 { 'command': 'inject-nmi' }
1270 # @set_link:
1272 # Sets the link status of a virtual network adapter.
1274 # @name: the device name of the virtual network adapter
1276 # @up: true to set the link status to be up
1278 # Returns: Nothing on success
1279 #          If @name is not a valid network device, DeviceNotFound
1281 # Since: 0.14.0
1283 # Notes: Not all network adapters support setting link status.  This command
1284 #        will succeed even if the network adapter does not support link status
1285 #        notification.
1287 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1290 # @block_passwd:
1292 # This command sets the password of a block device that has not been open
1293 # with a password and requires one.
1295 # The two cases where this can happen are a block device is created through
1296 # QEMU's initial command line or a block device is changed through the legacy
1297 # @change interface.
1299 # In the event that the block device is created through the initial command
1300 # line, the VM will start in the stopped state regardless of whether '-S' is
1301 # used.  The intention is for a management tool to query the block devices to
1302 # determine which ones are encrypted, set the passwords with this command, and
1303 # then start the guest with the @cont command.
1305 # @device:   the name of the device to set the password on
1307 # @password: the password to use for the device
1309 # Returns: nothing on success
1310 #          If @device is not a valid block device, DeviceNotFound
1311 #          If @device is not encrypted, DeviceNotEncrypted
1313 # Notes:  Not all block formats support encryption and some that do are not
1314 #         able to validate that a password is correct.  Disk corruption may
1315 #         occur if an invalid password is specified.
1317 # Since: 0.14.0
1319 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1322 # @balloon:
1324 # Request the balloon driver to change its balloon size.
1326 # @value: the target size of the balloon in bytes
1328 # Returns: Nothing on success
1329 #          If the balloon driver is enabled but not functional because the KVM
1330 #            kernel module cannot support it, KvmMissingCap
1331 #          If no balloon device is present, DeviceNotActive
1333 # Notes: This command just issues a request to the guest.  When it returns,
1334 #        the balloon size may not have changed.  A guest can change the balloon
1335 #        size independent of this command.
1337 # Since: 0.14.0
1339 { 'command': 'balloon', 'data': {'value': 'int'} }
1342 # @block_resize
1344 # Resize a block image while a guest is running.
1346 # @device:  the name of the device to get the image resized
1348 # @size:  new image size in bytes
1350 # Returns: nothing on success
1351 #          If @device is not a valid block device, DeviceNotFound
1353 # Since: 0.14.0
1355 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1358 # @NewImageMode
1360 # An enumeration that tells QEMU how to set the backing file path in
1361 # a new image file.
1363 # @existing: QEMU should look for an existing image file.
1365 # @absolute-paths: QEMU should create a new image with absolute paths
1366 # for the backing file.
1368 # Since: 1.1
1370 { 'enum': 'NewImageMode'
1371   'data': [ 'existing', 'absolute-paths' ] }
1374 # @BlockdevSnapshot
1376 # @device:  the name of the device to generate the snapshot from.
1378 # @snapshot-file: the target of the new image. A new file will be created.
1380 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1382 # @mode: #optional whether and how QEMU should create a new image, default is
1383 # 'absolute-paths'.
1385 { 'type': 'BlockdevSnapshot',
1386   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1387             '*mode': 'NewImageMode' } }
1390 # @BlockdevAction
1392 # A discriminated record of operations that can be performed with
1393 # @transaction.
1395 { 'union': 'BlockdevAction',
1396   'data': {
1397        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1398    } }
1401 # @transaction
1403 # Atomically operate on a group of one or more block devices.  If
1404 # any operation fails, then the entire set of actions will be
1405 # abandoned and the appropriate error returned.  The only operation
1406 # supported is currently blockdev-snapshot-sync.
1408 #  List of:
1409 #  @BlockdevAction: information needed for the device snapshot
1411 # Returns: nothing on success
1412 #          If @device is not a valid block device, DeviceNotFound
1414 # Note: The transaction aborts on the first failure.  Therefore, there will
1415 # be only one device or snapshot file returned in an error condition, and
1416 # subsequent actions will not have been attempted.
1418 # Since 1.1
1420 { 'command': 'transaction',
1421   'data': { 'actions': [ 'BlockdevAction' ] } }
1424 # @blockdev-snapshot-sync
1426 # Generates a synchronous snapshot of a block device.
1428 # @device:  the name of the device to generate the snapshot from.
1430 # @snapshot-file: the target of the new image. If the file exists, or if it
1431 #                 is a device, the snapshot will be created in the existing
1432 #                 file/device. If does not exist, a new file will be created.
1434 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1436 # @mode: #optional whether and how QEMU should create a new image, default is
1437 # 'absolute-paths'.
1439 # Returns: nothing on success
1440 #          If @device is not a valid block device, DeviceNotFound
1442 # Since 0.14.0
1444 { 'command': 'blockdev-snapshot-sync',
1445   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1446             '*mode': 'NewImageMode'} }
1449 # @human-monitor-command:
1451 # Execute a command on the human monitor and return the output.
1453 # @command-line: the command to execute in the human monitor
1455 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1457 # Returns: the output of the command as a string
1459 # Since: 0.14.0
1461 # Notes: This command only exists as a stop-gap.  It's use is highly
1462 #        discouraged.  The semantics of this command are not guaranteed.
1464 #        Known limitations:
1466 #        o This command is stateless, this means that commands that depend
1467 #          on state information (such as getfd) might not work
1469 #       o Commands that prompt the user for data (eg. 'cont' when the block
1470 #         device is encrypted) don't currently work
1472 { 'command': 'human-monitor-command',
1473   'data': {'command-line': 'str', '*cpu-index': 'int'},
1474   'returns': 'str' }
1477 # @block-commit
1479 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1480 # writes data between 'top' and 'base' into 'base'.
1482 # @device:  the name of the device
1484 # @base:   #optional The file name of the backing image to write data into.
1485 #                    If not specified, this is the deepest backing image
1487 # @top:              The file name of the backing image within the image chain,
1488 #                    which contains the topmost data to be committed down.
1489 #                    Note, the active layer as 'top' is currently unsupported.
1491 #                    If top == base, that is an error.
1494 # @speed:  #optional the maximum speed, in bytes per second
1496 # Returns: Nothing on success
1497 #          If commit or stream is already active on this device, DeviceInUse
1498 #          If @device does not exist, DeviceNotFound
1499 #          If image commit is not supported by this device, NotSupported
1500 #          If @base or @top is invalid, a generic error is returned
1501 #          If @top is the active layer, or omitted, a generic error is returned
1502 #          If @speed is invalid, InvalidParameter
1504 # Since: 1.3
1507 { 'command': 'block-commit',
1508   'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1509             '*speed': 'int' } }
1511 # @migrate_cancel
1513 # Cancel the current executing migration process.
1515 # Returns: nothing on success
1517 # Notes: This command succeeds even if there is no migration process running.
1519 # Since: 0.14.0
1521 { 'command': 'migrate_cancel' }
1524 # @migrate_set_downtime
1526 # Set maximum tolerated downtime for migration.
1528 # @value: maximum downtime in seconds
1530 # Returns: nothing on success
1532 # Since: 0.14.0
1534 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1537 # @migrate_set_speed
1539 # Set maximum speed for migration.
1541 # @value: maximum speed in bytes.
1543 # Returns: nothing on success
1545 # Notes: A value lesser than zero will be automatically round up to zero.
1547 # Since: 0.14.0
1549 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1552 # @migrate-set-cache-size
1554 # Set XBZRLE cache size
1556 # @value: cache size in bytes
1558 # The size will be rounded down to the nearest power of 2.
1559 # The cache size can be modified before and during ongoing migration
1561 # Returns: nothing on success
1563 # Since: 1.2
1565 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1568 # @query-migrate-cache-size
1570 # query XBZRLE cache size
1572 # Returns: XBZRLE cache size in bytes
1574 # Since: 1.2
1576 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1579 # @ObjectPropertyInfo:
1581 # @name: the name of the property
1583 # @type: the type of the property.  This will typically come in one of four
1584 #        forms:
1586 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1587 #           These types are mapped to the appropriate JSON type.
1589 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1590 #           legacy qdev typename.  These types are always treated as strings.
1592 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1593 #           device type name.  Child properties create the composition tree.
1595 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1596 #           device type name.  Link properties form the device model graph.
1598 # Since: 1.2
1600 { 'type': 'ObjectPropertyInfo',
1601   'data': { 'name': 'str', 'type': 'str' } }
1604 # @qom-list:
1606 # This command will list any properties of a object given a path in the object
1607 # model.
1609 # @path: the path within the object model.  See @qom-get for a description of
1610 #        this parameter.
1612 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1613 #          object.
1615 # Since: 1.2
1617 { 'command': 'qom-list',
1618   'data': { 'path': 'str' },
1619   'returns': [ 'ObjectPropertyInfo' ] }
1622 # @qom-get:
1624 # This command will get a property from a object model path and return the
1625 # value.
1627 # @path: The path within the object model.  There are two forms of supported
1628 #        paths--absolute and partial paths.
1630 #        Absolute paths are derived from the root object and can follow child<>
1631 #        or link<> properties.  Since they can follow link<> properties, they
1632 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1633 #        and are prefixed  with a leading slash.
1635 #        Partial paths look like relative filenames.  They do not begin
1636 #        with a prefix.  The matching rules for partial paths are subtle but
1637 #        designed to make specifying objects easy.  At each level of the
1638 #        composition tree, the partial path is matched as an absolute path.
1639 #        The first match is not returned.  At least two matches are searched
1640 #        for.  A successful result is only returned if only one match is
1641 #        found.  If more than one match is found, a flag is return to
1642 #        indicate that the match was ambiguous.
1644 # @property: The property name to read
1646 # Returns: The property value.  The type depends on the property type.  legacy<>
1647 #          properties are returned as #str.  child<> and link<> properties are
1648 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1649 #          are returned as #int.
1651 # Since: 1.2
1653 { 'command': 'qom-get',
1654   'data': { 'path': 'str', 'property': 'str' },
1655   'returns': 'visitor',
1656   'gen': 'no' }
1659 # @qom-set:
1661 # This command will set a property from a object model path.
1663 # @path: see @qom-get for a description of this parameter
1665 # @property: the property name to set
1667 # @value: a value who's type is appropriate for the property type.  See @qom-get
1668 #         for a description of type mapping.
1670 # Since: 1.2
1672 { 'command': 'qom-set',
1673   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1674   'gen': 'no' }
1677 # @set_password:
1679 # Sets the password of a remote display session.
1681 # @protocol: `vnc' to modify the VNC server password
1682 #            `spice' to modify the Spice server password
1684 # @password: the new password
1686 # @connected: #optional how to handle existing clients when changing the
1687 #                       password.  If nothing is specified, defaults to `keep'
1688 #                       `fail' to fail the command if clients are connected
1689 #                       `disconnect' to disconnect existing clients
1690 #                       `keep' to maintain existing clients
1692 # Returns: Nothing on success
1693 #          If Spice is not enabled, DeviceNotFound
1695 # Since: 0.14.0
1697 { 'command': 'set_password',
1698   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1701 # @expire_password:
1703 # Expire the password of a remote display server.
1705 # @protocol: the name of the remote display protocol `vnc' or `spice'
1707 # @time: when to expire the password.
1708 #        `now' to expire the password immediately
1709 #        `never' to cancel password expiration
1710 #        `+INT' where INT is the number of seconds from now (integer)
1711 #        `INT' where INT is the absolute time in seconds
1713 # Returns: Nothing on success
1714 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1716 # Since: 0.14.0
1718 # Notes: Time is relative to the server and currently there is no way to
1719 #        coordinate server time with client time.  It is not recommended to
1720 #        use the absolute time version of the @time parameter unless you're
1721 #        sure you are on the same machine as the QEMU instance.
1723 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1726 # @eject:
1728 # Ejects a device from a removable drive.
1730 # @device:  The name of the device
1732 # @force:   @optional If true, eject regardless of whether the drive is locked.
1733 #           If not specified, the default value is false.
1735 # Returns:  Nothing on success
1736 #           If @device is not a valid block device, DeviceNotFound
1738 # Notes:    Ejecting a device will no media results in success
1740 # Since: 0.14.0
1742 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1745 # @change-vnc-password:
1747 # Change the VNC server password.
1749 # @target:  the new password to use with VNC authentication
1751 # Since: 1.1
1753 # Notes:  An empty password in this command will set the password to the empty
1754 #         string.  Existing clients are unaffected by executing this command.
1756 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1759 # @change:
1761 # This command is multiple commands multiplexed together.
1763 # @device: This is normally the name of a block device but it may also be 'vnc'.
1764 #          when it's 'vnc', then sub command depends on @target
1766 # @target: If @device is a block device, then this is the new filename.
1767 #          If @device is 'vnc', then if the value 'password' selects the vnc
1768 #          change password command.   Otherwise, this specifies a new server URI
1769 #          address to listen to for VNC connections.
1771 # @arg:    If @device is a block device, then this is an optional format to open
1772 #          the device with.
1773 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1774 #          password to set.  If this argument is an empty string, then no future
1775 #          logins will be allowed.
1777 # Returns: Nothing on success.
1778 #          If @device is not a valid block device, DeviceNotFound
1779 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1780 #          if this error is returned, the device has been opened successfully
1781 #          and an additional call to @block_passwd is required to set the
1782 #          device's password.  The behavior of reads and writes to the block
1783 #          device between when these calls are executed is undefined.
1785 # Notes:  It is strongly recommended that this interface is not used especially
1786 #         for changing block devices.
1788 # Since: 0.14.0
1790 { 'command': 'change',
1791   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1794 # @block_set_io_throttle:
1796 # Change I/O throttle limits for a block drive.
1798 # @device: The name of the device
1800 # @bps: total throughput limit in bytes per second
1802 # @bps_rd: read throughput limit in bytes per second
1804 # @bps_wr: write throughput limit in bytes per second
1806 # @iops: total I/O operations per second
1808 # @ops_rd: read I/O operations per second
1810 # @iops_wr: write I/O operations per second
1812 # Returns: Nothing on success
1813 #          If @device is not a valid block device, DeviceNotFound
1815 # Since: 1.1
1817 { 'command': 'block_set_io_throttle',
1818   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1819             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1822 # @block-stream:
1824 # Copy data from a backing file into a block device.
1826 # The block streaming operation is performed in the background until the entire
1827 # backing file has been copied.  This command returns immediately once streaming
1828 # has started.  The status of ongoing block streaming operations can be checked
1829 # with query-block-jobs.  The operation can be stopped before it has completed
1830 # using the block-job-cancel command.
1832 # If a base file is specified then sectors are not copied from that base file and
1833 # its backing chain.  When streaming completes the image file will have the base
1834 # file as its backing file.  This can be used to stream a subset of the backing
1835 # file chain instead of flattening the entire image.
1837 # On successful completion the image file is updated to drop the backing file
1838 # and the BLOCK_JOB_COMPLETED event is emitted.
1840 # @device: the device name
1842 # @base:   #optional the common backing file name
1844 # @speed:  #optional the maximum speed, in bytes per second
1846 # Returns: Nothing on success
1847 #          If @device does not exist, DeviceNotFound
1849 # Since: 1.1
1851 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1852                                        '*speed': 'int' } }
1855 # @block-job-set-speed:
1857 # Set maximum speed for a background block operation.
1859 # This command can only be issued when there is an active block job.
1861 # Throttling can be disabled by setting the speed to 0.
1863 # @device: the device name
1865 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
1866 #          Defaults to 0.
1868 # Returns: Nothing on success
1869 #          If no background operation is active on this device, DeviceNotActive
1871 # Since: 1.1
1873 { 'command': 'block-job-set-speed',
1874   'data': { 'device': 'str', 'speed': 'int' } }
1877 # @block-job-cancel:
1879 # Stop an active background block operation.
1881 # This command returns immediately after marking the active background block
1882 # operation for cancellation.  It is an error to call this command if no
1883 # operation is in progress.
1885 # The operation will cancel as soon as possible and then emit the
1886 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
1887 # enumerated using query-block-jobs.
1889 # For streaming, the image file retains its backing file unless the streaming
1890 # operation happens to complete just as it is being cancelled.  A new streaming
1891 # operation can be started at a later time to finish copying all data from the
1892 # backing file.
1894 # @device: the device name
1896 # @force: #optional whether to allow cancellation of a paused job (default
1897 #         false).  Since 1.3.
1899 # Returns: Nothing on success
1900 #          If no background operation is active on this device, DeviceNotActive
1902 # Since: 1.1
1904 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
1907 # @block-job-pause:
1909 # Pause an active background block operation.
1911 # This command returns immediately after marking the active background block
1912 # operation for pausing.  It is an error to call this command if no
1913 # operation is in progress.  Pausing an already paused job has no cumulative
1914 # effect; a single block-job-resume command will resume the job.
1916 # The operation will pause as soon as possible.  No event is emitted when
1917 # the operation is actually paused.  Cancelling a paused job automatically
1918 # resumes it.
1920 # @device: the device name
1922 # Returns: Nothing on success
1923 #          If no background operation is active on this device, DeviceNotActive
1925 # Since: 1.3
1927 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
1930 # @block-job-resume:
1932 # Resume an active background block operation.
1934 # This command returns immediately after resuming a paused background block
1935 # operation.  It is an error to call this command if no operation is in
1936 # progress.  Resuming an already running job is not an error.
1938 # @device: the device name
1940 # Returns: Nothing on success
1941 #          If no background operation is active on this device, DeviceNotActive
1943 # Since: 1.3
1945 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
1948 # @ObjectTypeInfo:
1950 # This structure describes a search result from @qom-list-types
1952 # @name: the type name found in the search
1954 # Since: 1.1
1956 # Notes: This command is experimental and may change syntax in future releases.
1958 { 'type': 'ObjectTypeInfo',
1959   'data': { 'name': 'str' } }
1962 # @qom-list-types:
1964 # This command will return a list of types given search parameters
1966 # @implements: if specified, only return types that implement this type name
1968 # @abstract: if true, include abstract types in the results
1970 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1972 # Since: 1.1
1974 { 'command': 'qom-list-types',
1975   'data': { '*implements': 'str', '*abstract': 'bool' },
1976   'returns': [ 'ObjectTypeInfo' ] }
1979 # @DevicePropertyInfo:
1981 # Information about device properties.
1983 # @name: the name of the property
1984 # @type: the typename of the property
1986 # Since: 1.2
1988 { 'type': 'DevicePropertyInfo',
1989   'data': { 'name': 'str', 'type': 'str' } }
1992 # @device-list-properties:
1994 # List properties associated with a device.
1996 # @typename: the type name of a device
1998 # Returns: a list of DevicePropertyInfo describing a devices properties
2000 # Since: 1.2
2002 { 'command': 'device-list-properties',
2003   'data': { 'typename': 'str'},
2004   'returns': [ 'DevicePropertyInfo' ] }
2007 # @migrate
2009 # Migrates the current running guest to another Virtual Machine.
2011 # @uri: the Uniform Resource Identifier of the destination VM
2013 # @blk: #optional do block migration (full disk copy)
2015 # @inc: #optional incremental disk copy migration
2017 # @detach: this argument exists only for compatibility reasons and
2018 #          is ignored by QEMU
2020 # Returns: nothing on success
2022 # Since: 0.14.0
2024 { 'command': 'migrate',
2025   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2027 # @xen-save-devices-state:
2029 # Save the state of all devices to file. The RAM and the block devices
2030 # of the VM are not saved by this command.
2032 # @filename: the file to save the state of the devices to as binary
2033 # data. See xen-save-devices-state.txt for a description of the binary
2034 # format.
2036 # Returns: Nothing on success
2038 # Since: 1.1
2040 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2043 # @device_del:
2045 # Remove a device from a guest
2047 # @id: the name of the device
2049 # Returns: Nothing on success
2050 #          If @id is not a valid device, DeviceNotFound
2052 # Notes: When this command completes, the device may not be removed from the
2053 #        guest.  Hot removal is an operation that requires guest cooperation.
2054 #        This command merely requests that the guest begin the hot removal
2055 #        process.
2057 # Since: 0.14.0
2059 { 'command': 'device_del', 'data': {'id': 'str'} }
2062 # @dump-guest-memory
2064 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2065 # very long depending on the amount of guest memory. This command is only
2066 # supported on i386 and x86_64.
2068 # @paging: if true, do paging to get guest's memory mapping. This allows
2069 # using gdb to process the core file. However, setting @paging to false
2070 # may be desirable because of two reasons:
2072 #   1. The guest may be in a catastrophic state or can have corrupted
2073 #      memory, which cannot be trusted
2074 #   2. The guest can be in real-mode even if paging is enabled. For example,
2075 #      the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
2077 # @protocol: the filename or file descriptor of the vmcore. The supported
2078 # protocols are:
2080 #   1. file: the protocol starts with "file:", and the following string is
2081 #      the file's path.
2082 #   2. fd: the protocol starts with "fd:", and the following string is the
2083 #      fd's name.
2085 # @begin: #optional if specified, the starting physical address.
2087 # @length: #optional if specified, the memory size, in bytes. If you don't
2088 # want to dump all guest's memory, please specify the start @begin and @length
2090 # Returns: nothing on success
2092 # Since: 1.2
2094 { 'command': 'dump-guest-memory',
2095   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2096             '*length': 'int' } }
2098 # @netdev_add:
2100 # Add a network backend.
2102 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2103 #        'vde', 'socket', 'dump' and 'bridge'
2105 # @id: the name of the new network backend
2107 # @props: #optional a list of properties to be passed to the backend in
2108 #         the format 'name=value', like 'ifname=tap0,script=no'
2110 # Notes: The semantics of @props is not well defined.  Future commands will be
2111 #        introduced that provide stronger typing for backend creation.
2113 # Since: 0.14.0
2115 # Returns: Nothing on success
2116 #          If @type is not a valid network backend, DeviceNotFound
2118 { 'command': 'netdev_add',
2119   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2120   'gen': 'no' }
2123 # @netdev_del:
2125 # Remove a network backend.
2127 # @id: the name of the network backend to remove
2129 # Returns: Nothing on success
2130 #          If @id is not a valid network backend, DeviceNotFound
2132 # Since: 0.14.0
2134 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2137 # @NetdevNoneOptions
2139 # Use it alone to have zero network devices.
2141 # Since 1.2
2143 { 'type': 'NetdevNoneOptions',
2144   'data': { } }
2147 # @NetLegacyNicOptions
2149 # Create a new Network Interface Card.
2151 # @netdev: #optional id of -netdev to connect to
2153 # @macaddr: #optional MAC address
2155 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2157 # @addr: #optional PCI device address
2159 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2161 # Since 1.2
2163 { 'type': 'NetLegacyNicOptions',
2164   'data': {
2165     '*netdev':  'str',
2166     '*macaddr': 'str',
2167     '*model':   'str',
2168     '*addr':    'str',
2169     '*vectors': 'uint32' } }
2172 # @String
2174 # A fat type wrapping 'str', to be embedded in lists.
2176 # Since 1.2
2178 { 'type': 'String',
2179   'data': {
2180     'str': 'str' } }
2183 # @NetdevUserOptions
2185 # Use the user mode network stack which requires no administrator privilege to
2186 # run.
2188 # @hostname: #optional client hostname reported by the builtin DHCP server
2190 # @restrict: #optional isolate the guest from the host
2192 # @ip: #optional legacy parameter, use net= instead
2194 # @net: #optional IP address and optional netmask
2196 # @host: #optional guest-visible address of the host
2198 # @tftp: #optional root directory of the built-in TFTP server
2200 # @bootfile: #optional BOOTP filename, for use with tftp=
2202 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2203 #             assign
2205 # @dns: #optional guest-visible address of the virtual nameserver
2207 # @smb: #optional root directory of the built-in SMB server
2209 # @smbserver: #optional IP address of the built-in SMB server
2211 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2212 #           endpoints
2214 # @guestfwd: #optional forward guest TCP connections
2216 # Since 1.2
2218 { 'type': 'NetdevUserOptions',
2219   'data': {
2220     '*hostname':  'str',
2221     '*restrict':  'bool',
2222     '*ip':        'str',
2223     '*net':       'str',
2224     '*host':      'str',
2225     '*tftp':      'str',
2226     '*bootfile':  'str',
2227     '*dhcpstart': 'str',
2228     '*dns':       'str',
2229     '*smb':       'str',
2230     '*smbserver': 'str',
2231     '*hostfwd':   ['String'],
2232     '*guestfwd':  ['String'] } }
2235 # @NetdevTapOptions
2237 # Connect the host TAP network interface name to the VLAN.
2239 # @ifname: #optional interface name
2241 # @fd: #optional file descriptor of an already opened tap
2243 # @script: #optional script to initialize the interface
2245 # @downscript: #optional script to shut down the interface
2247 # @helper: #optional command to execute to configure bridge
2249 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2251 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2253 # @vhost: #optional enable vhost-net network accelerator
2255 # @vhostfd: #optional file descriptor of an already opened vhost net device
2257 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2259 # Since 1.2
2261 { 'type': 'NetdevTapOptions',
2262   'data': {
2263     '*ifname':     'str',
2264     '*fd':         'str',
2265     '*script':     'str',
2266     '*downscript': 'str',
2267     '*helper':     'str',
2268     '*sndbuf':     'size',
2269     '*vnet_hdr':   'bool',
2270     '*vhost':      'bool',
2271     '*vhostfd':    'str',
2272     '*vhostforce': 'bool' } }
2275 # @NetdevSocketOptions
2277 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2278 # socket connection.
2280 # @fd: #optional file descriptor of an already opened socket
2282 # @listen: #optional port number, and optional hostname, to listen on
2284 # @connect: #optional port number, and optional hostname, to connect to
2286 # @mcast: #optional UDP multicast address and port number
2288 # @localaddr: #optional source address and port for multicast and udp packets
2290 # @udp: #optional UDP unicast address and port number
2292 # Since 1.2
2294 { 'type': 'NetdevSocketOptions',
2295   'data': {
2296     '*fd':        'str',
2297     '*listen':    'str',
2298     '*connect':   'str',
2299     '*mcast':     'str',
2300     '*localaddr': 'str',
2301     '*udp':       'str' } }
2304 # @NetdevVdeOptions
2306 # Connect the VLAN to a vde switch running on the host.
2308 # @sock: #optional socket path
2310 # @port: #optional port number
2312 # @group: #optional group owner of socket
2314 # @mode: #optional permissions for socket
2316 # Since 1.2
2318 { 'type': 'NetdevVdeOptions',
2319   'data': {
2320     '*sock':  'str',
2321     '*port':  'uint16',
2322     '*group': 'str',
2323     '*mode':  'uint16' } }
2326 # @NetdevDumpOptions
2328 # Dump VLAN network traffic to a file.
2330 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2331 # suffixes.
2333 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2335 # Since 1.2
2337 { 'type': 'NetdevDumpOptions',
2338   'data': {
2339     '*len':  'size',
2340     '*file': 'str' } }
2343 # @NetdevBridgeOptions
2345 # Connect a host TAP network interface to a host bridge device.
2347 # @br: #optional bridge name
2349 # @helper: #optional command to execute to configure bridge
2351 # Since 1.2
2353 { 'type': 'NetdevBridgeOptions',
2354   'data': {
2355     '*br':     'str',
2356     '*helper': 'str' } }
2359 # @NetdevHubPortOptions
2361 # Connect two or more net clients through a software hub.
2363 # @hubid: hub identifier number
2365 # Since 1.2
2367 { 'type': 'NetdevHubPortOptions',
2368   'data': {
2369     'hubid':     'int32' } }
2372 # @NetClientOptions
2374 # A discriminated record of network device traits.
2376 # Since 1.2
2378 { 'union': 'NetClientOptions',
2379   'data': {
2380     'none':     'NetdevNoneOptions',
2381     'nic':      'NetLegacyNicOptions',
2382     'user':     'NetdevUserOptions',
2383     'tap':      'NetdevTapOptions',
2384     'socket':   'NetdevSocketOptions',
2385     'vde':      'NetdevVdeOptions',
2386     'dump':     'NetdevDumpOptions',
2387     'bridge':   'NetdevBridgeOptions',
2388     'hubport':  'NetdevHubPortOptions' } }
2391 # @NetLegacy
2393 # Captures the configuration of a network device; legacy.
2395 # @vlan: #optional vlan number
2397 # @id: #optional identifier for monitor commands
2399 # @name: #optional identifier for monitor commands, ignored if @id is present
2401 # @opts: device type specific properties (legacy)
2403 # Since 1.2
2405 { 'type': 'NetLegacy',
2406   'data': {
2407     '*vlan': 'int32',
2408     '*id':   'str',
2409     '*name': 'str',
2410     'opts':  'NetClientOptions' } }
2413 # @Netdev
2415 # Captures the configuration of a network device.
2417 # @id: identifier for monitor commands.
2419 # @opts: device type specific properties
2421 # Since 1.2
2423 { 'type': 'Netdev',
2424   'data': {
2425     'id':   'str',
2426     'opts': 'NetClientOptions' } }
2429 # @getfd:
2431 # Receive a file descriptor via SCM rights and assign it a name
2433 # @fdname: file descriptor name
2435 # Returns: Nothing on success
2437 # Since: 0.14.0
2439 # Notes: If @fdname already exists, the file descriptor assigned to
2440 #        it will be closed and replaced by the received file
2441 #        descriptor.
2442 #        The 'closefd' command can be used to explicitly close the
2443 #        file descriptor when it is no longer needed.
2445 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2448 # @closefd:
2450 # Close a file descriptor previously passed via SCM rights
2452 # @fdname: file descriptor name
2454 # Returns: Nothing on success
2456 # Since: 0.14.0
2458 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2461 # @MachineInfo:
2463 # Information describing a machine.
2465 # @name: the name of the machine
2467 # @alias: #optional an alias for the machine name
2469 # @default: #optional whether the machine is default
2471 # Since: 1.2.0
2473 { 'type': 'MachineInfo',
2474   'data': { 'name': 'str', '*alias': 'str',
2475             '*is-default': 'bool' } }
2478 # @query-machines:
2480 # Return a list of supported machines
2482 # Returns: a list of MachineInfo
2484 # Since: 1.2.0
2486 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2489 # @CpuDefinitionInfo:
2491 # Virtual CPU definition.
2493 # @name: the name of the CPU definition
2495 # Since: 1.2.0
2497 { 'type': 'CpuDefinitionInfo',
2498   'data': { 'name': 'str' } }
2501 # @query-cpu-definitions:
2503 # Return a list of supported virtual CPU definitions
2505 # Returns: a list of CpuDefInfo
2507 # Since: 1.2.0
2509 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2511 # @AddfdInfo:
2513 # Information about a file descriptor that was added to an fd set.
2515 # @fdset-id: The ID of the fd set that @fd was added to.
2517 # @fd: The file descriptor that was received via SCM rights and
2518 #      added to the fd set.
2520 # Since: 1.2.0
2522 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2525 # @add-fd:
2527 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2529 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2531 # @opaque: #optional A free-form string that can be used to describe the fd.
2533 # Returns: @AddfdInfo on success
2534 #          If file descriptor was not received, FdNotSupplied
2535 #          If @fdset-id does not exist, InvalidParameterValue
2537 # Notes: The list of fd sets is shared by all monitor connections.
2539 #        If @fdset-id is not specified, a new fd set will be created.
2541 # Since: 1.2.0
2543 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2544   'returns': 'AddfdInfo' }
2547 # @remove-fd:
2549 # Remove a file descriptor from an fd set.
2551 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2553 # @fd: #optional The file descriptor that is to be removed.
2555 # Returns: Nothing on success
2556 #          If @fdset-id or @fd is not found, FdNotFound
2558 # Since: 1.2.0
2560 # Notes: The list of fd sets is shared by all monitor connections.
2562 #        If @fd is not specified, all file descriptors in @fdset-id
2563 #        will be removed.
2565 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2568 # @FdsetFdInfo:
2570 # Information about a file descriptor that belongs to an fd set.
2572 # @fd: The file descriptor value.
2574 # @opaque: #optional A free-form string that can be used to describe the fd.
2576 # Since: 1.2.0
2578 { 'type': 'FdsetFdInfo',
2579   'data': {'fd': 'int', '*opaque': 'str'} }
2582 # @FdsetInfo:
2584 # Information about an fd set.
2586 # @fdset-id: The ID of the fd set.
2588 # @fds: A list of file descriptors that belong to this fd set.
2590 # Since: 1.2.0
2592 { 'type': 'FdsetInfo',
2593   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2596 # @query-fdsets:
2598 # Return information describing all fd sets.
2600 # Returns: A list of @FdsetInfo
2602 # Since: 1.2.0
2604 # Note: The list of fd sets is shared by all monitor connections.
2607 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2610 # @TargetType
2612 # Target CPU emulation type
2614 # These parameters correspond to the softmmu binary CPU name that is currently
2615 # running.
2617 # Since: 1.2.0
2619 { 'enum': 'TargetType',
2620   'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2621             'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2622             'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2623             'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2626 # @TargetInfo:
2628 # Information describing the QEMU target.
2630 # @arch: the target architecture (eg "x86_64", "i386", etc)
2632 # Since: 1.2.0
2634 { 'type': 'TargetInfo',
2635   'data': { 'arch': 'TargetType' } }
2638 # @query-target:
2640 # Return information about the target for this QEMU
2642 # Returns: TargetInfo
2644 # Since: 1.2.0
2646 { 'command': 'query-target', 'returns': 'TargetInfo' }
2649 # @QKeyCode:
2651 # An enumeration of key name.
2653 # This is used by the send-key command.
2655 # Since: 1.3.0
2657 { 'enum': 'QKeyCode',
2658   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2659             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2660             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2661             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2662             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2663             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2664             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2665             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2666             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2667             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2668             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2669             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2670             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2671             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2672              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2675 # @send-key:
2677 # Send keys to guest.
2679 # @keys: key sequence. 'keys' is the name of the key. Use a JSON array to
2680 #        press several keys simultaneously.
2682 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2683 #             to 100
2685 # Returns: Nothing on success
2686 #          If key is unknown or redundant, InvalidParameter
2688 # Since: 1.3.0
2691 { 'command': 'send-key',
2692   'data': { 'keys': ['QKeyCode'], '*hold-time': 'int' } }
2695 # @screendump:
2697 # Write a PPM of the VGA screen to a file.
2699 # @filename: the path of a new PPM file to store the image
2701 # Returns: Nothing on success
2703 # Since: 0.14.0
2705 { 'command': 'screendump', 'data': {'filename': 'str'} }