qapi: convert add_client
[qemu/ar7.git] / qapi-schema.json
blob191d92194c730bffe15927110f0b5a102da5be78
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 # @add_client
38 # Allow client connections for VNC, Spice and socket based
39 # character devices to be passed in to QEMU via SCM_RIGHTS.
41 # @protocol: protocol name. Valid names are "vnc", "spice" or the
42 #            name of a character device (eg. from -chardev id=XXXX)
44 # @fdname: file descriptor name previously passed via 'getfd' command
46 # @skipauth: #optional whether to skip authentication. Only applies
47 #            to "vnc" and "spice" protocols
49 # @tls: #optional whether to perform TLS. Only applies to the "spice"
50 #       protocol
52 # Returns: nothing on success.
54 # Since: 0.14.0
56 { 'command': 'add_client',
57   'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
58             '*tls': 'bool' } }
61 # @NameInfo:
63 # Guest name information.
65 # @name: #optional The name of the guest
67 # Since 0.14.0
69 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
72 # @query-name:
74 # Return the name information of a guest.
76 # Returns: @NameInfo of the guest
78 # Since 0.14.0
80 { 'command': 'query-name', 'returns': 'NameInfo' }
83 # @VersionInfo:
85 # A description of QEMU's version.
87 # @qemu.major:  The major version of QEMU
89 # @qemu.minor:  The minor version of QEMU
91 # @qemu.micro:  The micro version of QEMU.  By current convention, a micro
92 #               version of 50 signifies a development branch.  A micro version
93 #               greater than or equal to 90 signifies a release candidate for
94 #               the next minor version.  A micro version of less than 50
95 #               signifies a stable release.
97 # @package:     QEMU will always set this field to an empty string.  Downstream
98 #               versions of QEMU should set this to a non-empty string.  The
99 #               exact format depends on the downstream however it highly
100 #               recommended that a unique name is used.
102 # Since: 0.14.0
104 { 'type': 'VersionInfo',
105   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
106            'package': 'str'} }
109 # @query-version:
111 # Returns the current version of QEMU.
113 # Returns:  A @VersionInfo object describing the current version of QEMU.
115 # Since: 0.14.0
117 { 'command': 'query-version', 'returns': 'VersionInfo' }
120 # @KvmInfo:
122 # Information about support for KVM acceleration
124 # @enabled: true if KVM acceleration is active
126 # @present: true if KVM acceleration is built into this executable
128 # Since: 0.14.0
130 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
133 # @query-kvm:
135 # Returns information about KVM acceleration
137 # Returns: @KvmInfo
139 # Since: 0.14.0
141 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
144 # @RunState
146 # An enumeration of VM run states.
148 # @debug: QEMU is running on a debugger
150 # @finish-migrate: guest is paused to finish the migration process
152 # @inmigrate: guest is paused waiting for an incoming migration
154 # @internal-error: An internal error that prevents further guest execution
155 # has occurred
157 # @io-error: the last IOP has failed and the device is configured to pause
158 # on I/O errors
160 # @paused: guest has been paused via the 'stop' command
162 # @postmigrate: guest is paused following a successful 'migrate'
164 # @prelaunch: QEMU was started with -S and guest has not started
166 # @restore-vm: guest is paused to restore VM state
168 # @running: guest is actively running
170 # @save-vm: guest is paused to save the VM state
172 # @shutdown: guest is shut down (and -no-shutdown is in use)
174 # @suspended: guest is suspended (ACPI S3)
176 # @watchdog: the watchdog action is configured to pause and has been triggered
178 { 'enum': 'RunState',
179   'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
180             'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
181             'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
184 # @SnapshotInfo
186 # @id: unique snapshot id
188 # @name: user chosen name
190 # @vm-state-size: size of the VM state
192 # @date-sec: UTC date of the snapshot in seconds
194 # @date-nsec: fractional part in nano seconds to be used with date-sec
196 # @vm-clock-sec: VM clock relative to boot in seconds
198 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
200 # Since: 1.3
204 { 'type': 'SnapshotInfo',
205   'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
206             'date-sec': 'int', 'date-nsec': 'int',
207             'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
210 # @ImageInfo:
212 # Information about a QEMU image file
214 # @filename: name of the image file
216 # @format: format of the image file
218 # @virtual-size: maximum capacity in bytes of the image
220 # @actual-size: #optional actual size on disk in bytes of the image
222 # @dirty-flag: #optional true if image is not cleanly closed
224 # @cluster-size: #optional size of a cluster in bytes
226 # @encrypted: #optional true if the image is encrypted
228 # @backing-filename: #optional name of the backing file
230 # @full-backing-filename: #optional full path of the backing file
232 # @backing-filename-format: #optional the format of the backing file
234 # @snapshots: #optional list of VM snapshots
236 # Since: 1.3
240 { 'type': 'ImageInfo',
241   'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
242            '*actual-size': 'int', 'virtual-size': 'int',
243            '*cluster-size': 'int', '*encrypted': 'bool',
244            '*backing-filename': 'str', '*full-backing-filename': 'str',
245            '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } }
248 # @StatusInfo:
250 # Information about VCPU run state
252 # @running: true if all VCPUs are runnable, false if not runnable
254 # @singlestep: true if VCPUs are in single-step mode
256 # @status: the virtual machine @RunState
258 # Since:  0.14.0
260 # Notes: @singlestep is enabled through the GDB stub
262 { 'type': 'StatusInfo',
263   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
266 # @query-status:
268 # Query the run status of all VCPUs
270 # Returns: @StatusInfo reflecting all VCPUs
272 # Since:  0.14.0
274 { 'command': 'query-status', 'returns': 'StatusInfo' }
277 # @UuidInfo:
279 # Guest UUID information.
281 # @UUID: the UUID of the guest
283 # Since: 0.14.0
285 # Notes: If no UUID was specified for the guest, a null UUID is returned.
287 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
290 # @query-uuid:
292 # Query the guest UUID information.
294 # Returns: The @UuidInfo for the guest
296 # Since 0.14.0
298 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
301 # @ChardevInfo:
303 # Information about a character device.
305 # @label: the label of the character device
307 # @filename: the filename of the character device
309 # Notes: @filename is encoded using the QEMU command line character device
310 #        encoding.  See the QEMU man page for details.
312 # Since: 0.14.0
314 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
317 # @query-chardev:
319 # Returns information about current character devices.
321 # Returns: a list of @ChardevInfo
323 # Since: 0.14.0
325 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
328 # @CommandInfo:
330 # Information about a QMP command
332 # @name: The command name
334 # Since: 0.14.0
336 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
339 # @query-commands:
341 # Return a list of supported QMP commands by this server
343 # Returns: A list of @CommandInfo for all supported commands
345 # Since: 0.14.0
347 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
350 # @EventInfo:
352 # Information about a QMP event
354 # @name: The event name
356 # Since: 1.2.0
358 { 'type': 'EventInfo', 'data': {'name': 'str'} }
361 # @query-events:
363 # Return a list of supported QMP events by this server
365 # Returns: A list of @EventInfo for all supported events
367 # Since: 1.2.0
369 { 'command': 'query-events', 'returns': ['EventInfo'] }
372 # @MigrationStats
374 # Detailed migration status.
376 # @transferred: amount of bytes already transferred to the target VM
378 # @remaining: amount of bytes remaining to be transferred to the target VM
380 # @total: total amount of bytes involved in the migration process
382 # @duplicate: number of duplicate pages (since 1.2)
384 # @normal : number of normal pages (since 1.2)
386 # @normal-bytes : number of normal bytes sent (since 1.2)
388 # Since: 0.14.0
390 { 'type': 'MigrationStats',
391   'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
392            'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int' } }
395 # @XBZRLECacheStats
397 # Detailed XBZRLE migration cache statistics
399 # @cache-size: XBZRLE cache size
401 # @bytes: amount of bytes already transferred to the target VM
403 # @pages: amount of pages transferred to the target VM
405 # @cache-miss: number of cache miss
407 # @overflow: number of overflows
409 # Since: 1.2
411 { 'type': 'XBZRLECacheStats',
412   'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
413            'cache-miss': 'int', 'overflow': 'int' } }
416 # @MigrationInfo
418 # Information about current migration process.
420 # @status: #optional string describing the current migration status.
421 #          As of 0.14.0 this can be 'active', 'completed', 'failed' or
422 #          'cancelled'. If this field is not returned, no migration process
423 #          has been initiated
425 # @ram: #optional @MigrationStats containing detailed migration
426 #       status, only returned if status is 'active' or
427 #       'completed'. 'comppleted' (since 1.2)
429 # @disk: #optional @MigrationStats containing detailed disk migration
430 #        status, only returned if status is 'active' and it is a block
431 #        migration
433 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
434 #                migration statistics, only returned if XBZRLE feature is on and
435 #                status is 'active' or 'completed' (since 1.2)
437 # @total-time: #optional total amount of milliseconds since migration started.
438 #        If migration has ended, it returns the total migration
439 #        time. (since 1.2)
441 # Since: 0.14.0
443 { 'type': 'MigrationInfo',
444   'data': {'*status': 'str', '*ram': 'MigrationStats',
445            '*disk': 'MigrationStats',
446            '*xbzrle-cache': 'XBZRLECacheStats',
447            '*total-time': 'int'} }
450 # @query-migrate
452 # Returns information about current migration process.
454 # Returns: @MigrationInfo
456 # Since: 0.14.0
458 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
461 # @MigrationCapability
463 # Migration capabilities enumeration
465 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
466 #          This feature allows us to minimize migration traffic for certain work
467 #          loads, by sending compressed difference of the pages
469 # Since: 1.2
471 { 'enum': 'MigrationCapability',
472   'data': ['xbzrle'] }
475 # @MigrationCapabilityStatus
477 # Migration capability information
479 # @capability: capability enum
481 # @state: capability state bool
483 # Since: 1.2
485 { 'type': 'MigrationCapabilityStatus',
486   'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
489 # @migrate-set-capabilities
491 # Enable/Disable the following migration capabilities (like xbzrle)
493 # @capabilities: json array of capability modifications to make
495 # Since: 1.2
497 { 'command': 'migrate-set-capabilities',
498   'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
501 # @query-migrate-capabilities
503 # Returns information about the current migration capabilities status
505 # Returns: @MigrationCapabilitiesStatus
507 # Since: 1.2
509 { 'command': 'query-migrate-capabilities', 'returns':   ['MigrationCapabilityStatus']}
512 # @MouseInfo:
514 # Information about a mouse device.
516 # @name: the name of the mouse device
518 # @index: the index of the mouse device
520 # @current: true if this device is currently receiving mouse events
522 # @absolute: true if this device supports absolute coordinates as input
524 # Since: 0.14.0
526 { 'type': 'MouseInfo',
527   'data': {'name': 'str', 'index': 'int', 'current': 'bool',
528            'absolute': 'bool'} }
531 # @query-mice:
533 # Returns information about each active mouse device
535 # Returns: a list of @MouseInfo for each device
537 # Since: 0.14.0
539 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
542 # @CpuInfo:
544 # Information about a virtual CPU
546 # @CPU: the index of the virtual CPU
548 # @current: this only exists for backwards compatible and should be ignored
550 # @halted: true if the virtual CPU is in the halt state.  Halt usually refers
551 #          to a processor specific low power mode.
553 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
554 #                pointer.
555 #                If the target is Sparc, this is the PC component of the
556 #                instruction pointer.
558 # @nip: #optional If the target is PPC, the instruction pointer
560 # @npc: #optional If the target is Sparc, the NPC component of the instruction
561 #                 pointer
563 # @PC: #optional If the target is MIPS, the instruction pointer
565 # @thread_id: ID of the underlying host thread
567 # Since: 0.14.0
569 # Notes: @halted is a transient state that changes frequently.  By the time the
570 #        data is sent to the client, the guest may no longer be halted.
572 { 'type': 'CpuInfo',
573   'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
574            '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
577 # @query-cpus:
579 # Returns a list of information about each virtual CPU.
581 # Returns: a list of @CpuInfo for each virtual CPU
583 # Since: 0.14.0
585 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
588 # @BlockDeviceInfo:
590 # Information about the backing device for a block device.
592 # @file: the filename of the backing device
594 # @ro: true if the backing device was open read-only
596 # @drv: the name of the block format used to open the backing device. As of
597 #       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
598 #       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
599 #       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
600 #       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
602 # @backing_file: #optional the name of the backing file (for copy-on-write)
604 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
606 # @encrypted: true if the backing device is encrypted
608 # @encryption_key_missing: true if the backing device is encrypted but an
609 #                          valid encryption key is missing
611 # @bps: total throughput limit in bytes per second is specified
613 # @bps_rd: read throughput limit in bytes per second is specified
615 # @bps_wr: write throughput limit in bytes per second is specified
617 # @iops: total I/O operations per second is specified
619 # @iops_rd: read I/O operations per second is specified
621 # @iops_wr: write I/O operations per second is specified
623 # Since: 0.14.0
625 # Notes: This interface is only found in @BlockInfo.
627 { 'type': 'BlockDeviceInfo',
628   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
629             '*backing_file': 'str', 'backing_file_depth': 'int',
630             'encrypted': 'bool', 'encryption_key_missing': 'bool',
631             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
632             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
635 # @BlockDeviceIoStatus:
637 # An enumeration of block device I/O status.
639 # @ok: The last I/O operation has succeeded
641 # @failed: The last I/O operation has failed
643 # @nospace: The last I/O operation has failed due to a no-space condition
645 # Since: 1.0
647 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
650 # @BlockInfo:
652 # Block device information.  This structure describes a virtual device and
653 # the backing device associated with it.
655 # @device: The device name associated with the virtual device.
657 # @type: This field is returned only for compatibility reasons, it should
658 #        not be used (always returns 'unknown')
660 # @removable: True if the device supports removable media.
662 # @locked: True if the guest has locked this device from having its media
663 #          removed
665 # @tray_open: #optional True if the device has a tray and it is open
666 #             (only present if removable is true)
668 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
669 #             supports it and the VM is configured to stop on errors
671 # @inserted: #optional @BlockDeviceInfo describing the device if media is
672 #            present
674 # Since:  0.14.0
676 { 'type': 'BlockInfo',
677   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
678            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
679            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
682 # @query-block:
684 # Get a list of BlockInfo for all virtual block devices.
686 # Returns: a list of @BlockInfo describing each virtual block device
688 # Since: 0.14.0
690 { 'command': 'query-block', 'returns': ['BlockInfo'] }
693 # @BlockDeviceStats:
695 # Statistics of a virtual block device or a block backing device.
697 # @rd_bytes:      The number of bytes read by the device.
699 # @wr_bytes:      The number of bytes written by the device.
701 # @rd_operations: The number of read operations performed by the device.
703 # @wr_operations: The number of write operations performed by the device.
705 # @flush_operations: The number of cache flush operations performed by the
706 #                    device (since 0.15.0)
708 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
709 #                       (since 0.15.0).
711 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
713 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
715 # @wr_highest_offset: The offset after the greatest byte written to the
716 #                     device.  The intended use of this information is for
717 #                     growable sparse files (like qcow2) that are used on top
718 #                     of a physical device.
720 # Since: 0.14.0
722 { 'type': 'BlockDeviceStats',
723   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
724            'wr_operations': 'int', 'flush_operations': 'int',
725            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
726            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
729 # @BlockStats:
731 # Statistics of a virtual block device or a block backing device.
733 # @device: #optional If the stats are for a virtual block device, the name
734 #          corresponding to the virtual block device.
736 # @stats:  A @BlockDeviceStats for the device.
738 # @parent: #optional This may point to the backing block device if this is a
739 #          a virtual block device.  If it's a backing block, this will point
740 #          to the backing file is one is present.
742 # Since: 0.14.0
744 { 'type': 'BlockStats',
745   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
746            '*parent': 'BlockStats'} }
749 # @query-blockstats:
751 # Query the @BlockStats for all virtual block devices.
753 # Returns: A list of @BlockStats for each virtual block devices.
755 # Since: 0.14.0
757 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
760 # @VncClientInfo:
762 # Information about a connected VNC client.
764 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
765 #        when possible.
767 # @family: 'ipv6' if the client is connected via IPv6 and TCP
768 #          'ipv4' if the client is connected via IPv4 and TCP
769 #          'unix' if the client is connected via a unix domain socket
770 #          'unknown' otherwise
772 # @service: The service name of the client's port.  This may depends on the
773 #           host system's service database so symbolic names should not be
774 #           relied on.
776 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
777 #              Name of the client.
779 # @sasl_username: #optional If SASL authentication is in use, the SASL username
780 #                 used for authentication.
782 # Since: 0.14.0
784 { 'type': 'VncClientInfo',
785   'data': {'host': 'str', 'family': 'str', 'service': 'str',
786            '*x509_dname': 'str', '*sasl_username': 'str'} }
789 # @VncInfo:
791 # Information about the VNC session.
793 # @enabled: true if the VNC server is enabled, false otherwise
795 # @host: #optional The hostname the VNC server is bound to.  This depends on
796 #        the name resolution on the host and may be an IP address.
798 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
799 #                    'ipv4' if the host is listening for IPv4 connections
800 #                    'unix' if the host is listening on a unix domain socket
801 #                    'unknown' otherwise
803 # @service: #optional The service name of the server's port.  This may depends
804 #           on the host system's service database so symbolic names should not
805 #           be relied on.
807 # @auth: #optional the current authentication type used by the server
808 #        'none' if no authentication is being used
809 #        'vnc' if VNC authentication is being used
810 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
811 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
812 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
813 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
814 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
815 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
816 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
817 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
818 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
820 # @clients: a list of @VncClientInfo of all currently connected clients
822 # Since: 0.14.0
824 { 'type': 'VncInfo',
825   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
826            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
829 # @query-vnc:
831 # Returns information about the current VNC server
833 # Returns: @VncInfo
835 # Since: 0.14.0
837 { 'command': 'query-vnc', 'returns': 'VncInfo' }
840 # @SpiceChannel
842 # Information about a SPICE client channel.
844 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
845 #        when possible.
847 # @family: 'ipv6' if the client is connected via IPv6 and TCP
848 #          'ipv4' if the client is connected via IPv4 and TCP
849 #          'unix' if the client is connected via a unix domain socket
850 #          'unknown' otherwise
852 # @port: The client's port number.
854 # @connection-id: SPICE connection id number.  All channels with the same id
855 #                 belong to the same SPICE session.
857 # @connection-type: SPICE channel type number.  "1" is the main control
858 #                   channel, filter for this one if you want to track spice
859 #                   sessions only
861 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
862 #              multiple channels of the same type exist, such as multiple
863 #              display channels in a multihead setup
865 # @tls: true if the channel is encrypted, false otherwise.
867 # Since: 0.14.0
869 { 'type': 'SpiceChannel',
870   'data': {'host': 'str', 'family': 'str', 'port': 'str',
871            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
872            'tls': 'bool'} }
875 # @SpiceQueryMouseMode
877 # An enumeration of Spice mouse states.
879 # @client: Mouse cursor position is determined by the client.
881 # @server: Mouse cursor position is determined by the server.
883 # @unknown: No information is available about mouse mode used by
884 #           the spice server.
886 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
888 # Since: 1.1
890 { 'enum': 'SpiceQueryMouseMode',
891   'data': [ 'client', 'server', 'unknown' ] }
894 # @SpiceInfo
896 # Information about the SPICE session.
898 # @enabled: true if the SPICE server is enabled, false otherwise
900 # @migrated: true if the last guest migration completed and spice
901 #            migration had completed as well. false otherwise.
903 # @host: #optional The hostname the SPICE server is bound to.  This depends on
904 #        the name resolution on the host and may be an IP address.
906 # @port: #optional The SPICE server's port number.
908 # @compiled-version: #optional SPICE server version.
910 # @tls-port: #optional The SPICE server's TLS port number.
912 # @auth: #optional the current authentication type used by the server
913 #        'none'  if no authentication is being used
914 #        'spice' uses SASL or direct TLS authentication, depending on command
915 #                line options
917 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
918 #              be determined by the client or the server, or unknown if spice
919 #              server doesn't provide this information.
921 #              Since: 1.1
923 # @channels: a list of @SpiceChannel for each active spice channel
925 # Since: 0.14.0
927 { 'type': 'SpiceInfo',
928   'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
929            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
930            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
933 # @query-spice
935 # Returns information about the current SPICE server
937 # Returns: @SpiceInfo
939 # Since: 0.14.0
941 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
944 # @BalloonInfo:
946 # Information about the guest balloon device.
948 # @actual: the number of bytes the balloon currently contains
950 # @mem_swapped_in: #optional number of pages swapped in within the guest
952 # @mem_swapped_out: #optional number of pages swapped out within the guest
954 # @major_page_faults: #optional number of major page faults within the guest
956 # @minor_page_faults: #optional number of minor page faults within the guest
958 # @free_mem: #optional amount of memory (in bytes) free in the guest
960 # @total_mem: #optional amount of memory (in bytes) visible to the guest
962 # Since: 0.14.0
964 # Notes: all current versions of QEMU do not fill out optional information in
965 #        this structure.
967 { 'type': 'BalloonInfo',
968   'data': {'actual': 'int', '*mem_swapped_in': 'int',
969            '*mem_swapped_out': 'int', '*major_page_faults': 'int',
970            '*minor_page_faults': 'int', '*free_mem': 'int',
971            '*total_mem': 'int'} }
974 # @query-balloon:
976 # Return information about the balloon device.
978 # Returns: @BalloonInfo on success
979 #          If the balloon driver is enabled but not functional because the KVM
980 #          kernel module cannot support it, KvmMissingCap
981 #          If no balloon device is present, DeviceNotActive
983 # Since: 0.14.0
985 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
988 # @PciMemoryRange:
990 # A PCI device memory region
992 # @base: the starting address (guest physical)
994 # @limit: the ending address (guest physical)
996 # Since: 0.14.0
998 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1001 # @PciMemoryRegion
1003 # Information about a PCI device I/O region.
1005 # @bar: the index of the Base Address Register for this region
1007 # @type: 'io' if the region is a PIO region
1008 #        'memory' if the region is a MMIO region
1010 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1012 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1014 # Since: 0.14.0
1016 { 'type': 'PciMemoryRegion',
1017   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1018            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1021 # @PciBridgeInfo:
1023 # Information about a PCI Bridge device
1025 # @bus.number: primary bus interface number.  This should be the number of the
1026 #              bus the device resides on.
1028 # @bus.secondary: secondary bus interface number.  This is the number of the
1029 #                 main bus for the bridge
1031 # @bus.subordinate: This is the highest number bus that resides below the
1032 #                   bridge.
1034 # @bus.io_range: The PIO range for all devices on this bridge
1036 # @bus.memory_range: The MMIO range for all devices on this bridge
1038 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1039 #                          this bridge
1041 # @devices: a list of @PciDeviceInfo for each device on this bridge
1043 # Since: 0.14.0
1045 { 'type': 'PciBridgeInfo',
1046   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1047                     'io_range': 'PciMemoryRange',
1048                     'memory_range': 'PciMemoryRange',
1049                     'prefetchable_range': 'PciMemoryRange' },
1050            '*devices': ['PciDeviceInfo']} }
1053 # @PciDeviceInfo:
1055 # Information about a PCI device
1057 # @bus: the bus number of the device
1059 # @slot: the slot the device is located in
1061 # @function: the function of the slot used by the device
1063 # @class_info.desc: #optional a string description of the device's class
1065 # @class_info.class: the class code of the device
1067 # @id.device: the PCI device id
1069 # @id.vendor: the PCI vendor id
1071 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1073 # @qdev_id: the device name of the PCI device
1075 # @pci_bridge: if the device is a PCI bridge, the bridge information
1077 # @regions: a list of the PCI I/O regions associated with the device
1079 # Notes: the contents of @class_info.desc are not stable and should only be
1080 #        treated as informational.
1082 # Since: 0.14.0
1084 { 'type': 'PciDeviceInfo',
1085   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1086            'class_info': {'*desc': 'str', 'class': 'int'},
1087            'id': {'device': 'int', 'vendor': 'int'},
1088            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1089            'regions': ['PciMemoryRegion']} }
1092 # @PciInfo:
1094 # Information about a PCI bus
1096 # @bus: the bus index
1098 # @devices: a list of devices on this bus
1100 # Since: 0.14.0
1102 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1105 # @query-pci:
1107 # Return information about the PCI bus topology of the guest.
1109 # Returns: a list of @PciInfo for each PCI bus
1111 # Since: 0.14.0
1113 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1116 # @BlockJobInfo:
1118 # Information about a long-running block device operation.
1120 # @type: the job type ('stream' for image streaming)
1122 # @device: the block device name
1124 # @len: the maximum progress value
1126 # @offset: the current progress value
1128 # @speed: the rate limit, bytes per second
1130 # Since: 1.1
1132 { 'type': 'BlockJobInfo',
1133   'data': {'type': 'str', 'device': 'str', 'len': 'int',
1134            'offset': 'int', 'speed': 'int'} }
1137 # @query-block-jobs:
1139 # Return information about long-running block device operations.
1141 # Returns: a list of @BlockJobInfo for each active block job
1143 # Since: 1.1
1145 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1148 # @quit:
1150 # This command will cause the QEMU process to exit gracefully.  While every
1151 # attempt is made to send the QMP response before terminating, this is not
1152 # guaranteed.  When using this interface, a premature EOF would not be
1153 # unexpected.
1155 # Since: 0.14.0
1157 { 'command': 'quit' }
1160 # @stop:
1162 # Stop all guest VCPU execution.
1164 # Since:  0.14.0
1166 # Notes:  This function will succeed even if the guest is already in the stopped
1167 #         state
1169 { 'command': 'stop' }
1172 # @system_reset:
1174 # Performs a hard reset of a guest.
1176 # Since: 0.14.0
1178 { 'command': 'system_reset' }
1181 # @system_powerdown:
1183 # Requests that a guest perform a powerdown operation.
1185 # Since: 0.14.0
1187 # Notes: A guest may or may not respond to this command.  This command
1188 #        returning does not indicate that a guest has accepted the request or
1189 #        that it has shut down.  Many guests will respond to this command by
1190 #        prompting the user in some way.
1192 { 'command': 'system_powerdown' }
1195 # @cpu:
1197 # This command is a nop that is only provided for the purposes of compatibility.
1199 # Since: 0.14.0
1201 # Notes: Do not use this command.
1203 { 'command': 'cpu', 'data': {'index': 'int'} }
1206 # @memsave:
1208 # Save a portion of guest memory to a file.
1210 # @val: the virtual address of the guest to start from
1212 # @size: the size of memory region to save
1214 # @filename: the file to save the memory to as binary data
1216 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1217 #                       virtual address (defaults to CPU 0)
1219 # Returns: Nothing on success
1221 # Since: 0.14.0
1223 # Notes: Errors were not reliably returned until 1.1
1225 { 'command': 'memsave',
1226   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1229 # @pmemsave:
1231 # Save a portion of guest physical memory to a file.
1233 # @val: the physical address of the guest to start from
1235 # @size: the size of memory region to save
1237 # @filename: the file to save the memory to as binary data
1239 # Returns: Nothing on success
1241 # Since: 0.14.0
1243 # Notes: Errors were not reliably returned until 1.1
1245 { 'command': 'pmemsave',
1246   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1249 # @cont:
1251 # Resume guest VCPU execution.
1253 # Since:  0.14.0
1255 # Returns:  If successful, nothing
1256 #           If the QEMU is waiting for an incoming migration, MigrationExpected
1257 #           If QEMU was started with an encrypted block device and a key has
1258 #              not yet been set, DeviceEncrypted.
1260 # Notes:  This command will succeed if the guest is currently running.
1262 { 'command': 'cont' }
1265 # @system_wakeup:
1267 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1269 # Since:  1.1
1271 # Returns:  nothing.
1273 { 'command': 'system_wakeup' }
1276 # @inject-nmi:
1278 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1280 # Returns:  If successful, nothing
1282 # Since:  0.14.0
1284 # Notes: Only x86 Virtual Machines support this command.
1286 { 'command': 'inject-nmi' }
1289 # @set_link:
1291 # Sets the link status of a virtual network adapter.
1293 # @name: the device name of the virtual network adapter
1295 # @up: true to set the link status to be up
1297 # Returns: Nothing on success
1298 #          If @name is not a valid network device, DeviceNotFound
1300 # Since: 0.14.0
1302 # Notes: Not all network adapters support setting link status.  This command
1303 #        will succeed even if the network adapter does not support link status
1304 #        notification.
1306 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1309 # @block_passwd:
1311 # This command sets the password of a block device that has not been open
1312 # with a password and requires one.
1314 # The two cases where this can happen are a block device is created through
1315 # QEMU's initial command line or a block device is changed through the legacy
1316 # @change interface.
1318 # In the event that the block device is created through the initial command
1319 # line, the VM will start in the stopped state regardless of whether '-S' is
1320 # used.  The intention is for a management tool to query the block devices to
1321 # determine which ones are encrypted, set the passwords with this command, and
1322 # then start the guest with the @cont command.
1324 # @device:   the name of the device to set the password on
1326 # @password: the password to use for the device
1328 # Returns: nothing on success
1329 #          If @device is not a valid block device, DeviceNotFound
1330 #          If @device is not encrypted, DeviceNotEncrypted
1332 # Notes:  Not all block formats support encryption and some that do are not
1333 #         able to validate that a password is correct.  Disk corruption may
1334 #         occur if an invalid password is specified.
1336 # Since: 0.14.0
1338 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1341 # @balloon:
1343 # Request the balloon driver to change its balloon size.
1345 # @value: the target size of the balloon in bytes
1347 # Returns: Nothing on success
1348 #          If the balloon driver is enabled but not functional because the KVM
1349 #            kernel module cannot support it, KvmMissingCap
1350 #          If no balloon device is present, DeviceNotActive
1352 # Notes: This command just issues a request to the guest.  When it returns,
1353 #        the balloon size may not have changed.  A guest can change the balloon
1354 #        size independent of this command.
1356 # Since: 0.14.0
1358 { 'command': 'balloon', 'data': {'value': 'int'} }
1361 # @block_resize
1363 # Resize a block image while a guest is running.
1365 # @device:  the name of the device to get the image resized
1367 # @size:  new image size in bytes
1369 # Returns: nothing on success
1370 #          If @device is not a valid block device, DeviceNotFound
1372 # Since: 0.14.0
1374 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1377 # @NewImageMode
1379 # An enumeration that tells QEMU how to set the backing file path in
1380 # a new image file.
1382 # @existing: QEMU should look for an existing image file.
1384 # @absolute-paths: QEMU should create a new image with absolute paths
1385 # for the backing file.
1387 # Since: 1.1
1389 { 'enum': 'NewImageMode'
1390   'data': [ 'existing', 'absolute-paths' ] }
1393 # @BlockdevSnapshot
1395 # @device:  the name of the device to generate the snapshot from.
1397 # @snapshot-file: the target of the new image. A new file will be created.
1399 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1401 # @mode: #optional whether and how QEMU should create a new image, default is
1402 # 'absolute-paths'.
1404 { 'type': 'BlockdevSnapshot',
1405   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1406             '*mode': 'NewImageMode' } }
1409 # @BlockdevAction
1411 # A discriminated record of operations that can be performed with
1412 # @transaction.
1414 { 'union': 'BlockdevAction',
1415   'data': {
1416        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1417    } }
1420 # @transaction
1422 # Atomically operate on a group of one or more block devices.  If
1423 # any operation fails, then the entire set of actions will be
1424 # abandoned and the appropriate error returned.  The only operation
1425 # supported is currently blockdev-snapshot-sync.
1427 #  List of:
1428 #  @BlockdevAction: information needed for the device snapshot
1430 # Returns: nothing on success
1431 #          If @device is not a valid block device, DeviceNotFound
1433 # Note: The transaction aborts on the first failure.  Therefore, there will
1434 # be only one device or snapshot file returned in an error condition, and
1435 # subsequent actions will not have been attempted.
1437 # Since 1.1
1439 { 'command': 'transaction',
1440   'data': { 'actions': [ 'BlockdevAction' ] } }
1443 # @blockdev-snapshot-sync
1445 # Generates a synchronous snapshot of a block device.
1447 # @device:  the name of the device to generate the snapshot from.
1449 # @snapshot-file: the target of the new image. If the file exists, or if it
1450 #                 is a device, the snapshot will be created in the existing
1451 #                 file/device. If does not exist, a new file will be created.
1453 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1455 # @mode: #optional whether and how QEMU should create a new image, default is
1456 # 'absolute-paths'.
1458 # Returns: nothing on success
1459 #          If @device is not a valid block device, DeviceNotFound
1461 # Since 0.14.0
1463 { 'command': 'blockdev-snapshot-sync',
1464   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1465             '*mode': 'NewImageMode'} }
1468 # @human-monitor-command:
1470 # Execute a command on the human monitor and return the output.
1472 # @command-line: the command to execute in the human monitor
1474 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1476 # Returns: the output of the command as a string
1478 # Since: 0.14.0
1480 # Notes: This command only exists as a stop-gap.  It's use is highly
1481 #        discouraged.  The semantics of this command are not guaranteed.
1483 #        Known limitations:
1485 #        o This command is stateless, this means that commands that depend
1486 #          on state information (such as getfd) might not work
1488 #       o Commands that prompt the user for data (eg. 'cont' when the block
1489 #         device is encrypted) don't currently work
1491 { 'command': 'human-monitor-command',
1492   'data': {'command-line': 'str', '*cpu-index': 'int'},
1493   'returns': 'str' }
1496 # @migrate_cancel
1498 # Cancel the current executing migration process.
1500 # Returns: nothing on success
1502 # Notes: This command succeeds even if there is no migration process running.
1504 # Since: 0.14.0
1506 { 'command': 'migrate_cancel' }
1509 # @migrate_set_downtime
1511 # Set maximum tolerated downtime for migration.
1513 # @value: maximum downtime in seconds
1515 # Returns: nothing on success
1517 # Since: 0.14.0
1519 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1522 # @migrate_set_speed
1524 # Set maximum speed for migration.
1526 # @value: maximum speed in bytes.
1528 # Returns: nothing on success
1530 # Notes: A value lesser than zero will be automatically round up to zero.
1532 # Since: 0.14.0
1534 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1537 # @migrate-set-cache-size
1539 # Set XBZRLE cache size
1541 # @value: cache size in bytes
1543 # The size will be rounded down to the nearest power of 2.
1544 # The cache size can be modified before and during ongoing migration
1546 # Returns: nothing on success
1548 # Since: 1.2
1550 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1553 # @query-migrate-cache-size
1555 # query XBZRLE cache size
1557 # Returns: XBZRLE cache size in bytes
1559 # Since: 1.2
1561 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1564 # @ObjectPropertyInfo:
1566 # @name: the name of the property
1568 # @type: the type of the property.  This will typically come in one of four
1569 #        forms:
1571 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1572 #           These types are mapped to the appropriate JSON type.
1574 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1575 #           legacy qdev typename.  These types are always treated as strings.
1577 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1578 #           device type name.  Child properties create the composition tree.
1580 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1581 #           device type name.  Link properties form the device model graph.
1583 # Since: 1.2
1585 { 'type': 'ObjectPropertyInfo',
1586   'data': { 'name': 'str', 'type': 'str' } }
1589 # @qom-list:
1591 # This command will list any properties of a object given a path in the object
1592 # model.
1594 # @path: the path within the object model.  See @qom-get for a description of
1595 #        this parameter.
1597 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1598 #          object.
1600 # Since: 1.2
1602 { 'command': 'qom-list',
1603   'data': { 'path': 'str' },
1604   'returns': [ 'ObjectPropertyInfo' ] }
1607 # @qom-get:
1609 # This command will get a property from a object model path and return the
1610 # value.
1612 # @path: The path within the object model.  There are two forms of supported
1613 #        paths--absolute and partial paths.
1615 #        Absolute paths are derived from the root object and can follow child<>
1616 #        or link<> properties.  Since they can follow link<> properties, they
1617 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1618 #        and are prefixed  with a leading slash.
1620 #        Partial paths look like relative filenames.  They do not begin
1621 #        with a prefix.  The matching rules for partial paths are subtle but
1622 #        designed to make specifying objects easy.  At each level of the
1623 #        composition tree, the partial path is matched as an absolute path.
1624 #        The first match is not returned.  At least two matches are searched
1625 #        for.  A successful result is only returned if only one match is
1626 #        found.  If more than one match is found, a flag is return to
1627 #        indicate that the match was ambiguous.
1629 # @property: The property name to read
1631 # Returns: The property value.  The type depends on the property type.  legacy<>
1632 #          properties are returned as #str.  child<> and link<> properties are
1633 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1634 #          are returned as #int.
1636 # Since: 1.2
1638 { 'command': 'qom-get',
1639   'data': { 'path': 'str', 'property': 'str' },
1640   'returns': 'visitor',
1641   'gen': 'no' }
1644 # @qom-set:
1646 # This command will set a property from a object model path.
1648 # @path: see @qom-get for a description of this parameter
1650 # @property: the property name to set
1652 # @value: a value who's type is appropriate for the property type.  See @qom-get
1653 #         for a description of type mapping.
1655 # Since: 1.2
1657 { 'command': 'qom-set',
1658   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1659   'gen': 'no' }
1662 # @set_password:
1664 # Sets the password of a remote display session.
1666 # @protocol: `vnc' to modify the VNC server password
1667 #            `spice' to modify the Spice server password
1669 # @password: the new password
1671 # @connected: #optional how to handle existing clients when changing the
1672 #                       password.  If nothing is specified, defaults to `keep'
1673 #                       `fail' to fail the command if clients are connected
1674 #                       `disconnect' to disconnect existing clients
1675 #                       `keep' to maintain existing clients
1677 # Returns: Nothing on success
1678 #          If Spice is not enabled, DeviceNotFound
1680 # Since: 0.14.0
1682 { 'command': 'set_password',
1683   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1686 # @expire_password:
1688 # Expire the password of a remote display server.
1690 # @protocol: the name of the remote display protocol `vnc' or `spice'
1692 # @time: when to expire the password.
1693 #        `now' to expire the password immediately
1694 #        `never' to cancel password expiration
1695 #        `+INT' where INT is the number of seconds from now (integer)
1696 #        `INT' where INT is the absolute time in seconds
1698 # Returns: Nothing on success
1699 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1701 # Since: 0.14.0
1703 # Notes: Time is relative to the server and currently there is no way to
1704 #        coordinate server time with client time.  It is not recommended to
1705 #        use the absolute time version of the @time parameter unless you're
1706 #        sure you are on the same machine as the QEMU instance.
1708 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1711 # @eject:
1713 # Ejects a device from a removable drive.
1715 # @device:  The name of the device
1717 # @force:   @optional If true, eject regardless of whether the drive is locked.
1718 #           If not specified, the default value is false.
1720 # Returns:  Nothing on success
1721 #           If @device is not a valid block device, DeviceNotFound
1723 # Notes:    Ejecting a device will no media results in success
1725 # Since: 0.14.0
1727 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1730 # @change-vnc-password:
1732 # Change the VNC server password.
1734 # @target:  the new password to use with VNC authentication
1736 # Since: 1.1
1738 # Notes:  An empty password in this command will set the password to the empty
1739 #         string.  Existing clients are unaffected by executing this command.
1741 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1744 # @change:
1746 # This command is multiple commands multiplexed together.
1748 # @device: This is normally the name of a block device but it may also be 'vnc'.
1749 #          when it's 'vnc', then sub command depends on @target
1751 # @target: If @device is a block device, then this is the new filename.
1752 #          If @device is 'vnc', then if the value 'password' selects the vnc
1753 #          change password command.   Otherwise, this specifies a new server URI
1754 #          address to listen to for VNC connections.
1756 # @arg:    If @device is a block device, then this is an optional format to open
1757 #          the device with.
1758 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1759 #          password to set.  If this argument is an empty string, then no future
1760 #          logins will be allowed.
1762 # Returns: Nothing on success.
1763 #          If @device is not a valid block device, DeviceNotFound
1764 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1765 #          if this error is returned, the device has been opened successfully
1766 #          and an additional call to @block_passwd is required to set the
1767 #          device's password.  The behavior of reads and writes to the block
1768 #          device between when these calls are executed is undefined.
1770 # Notes:  It is strongly recommended that this interface is not used especially
1771 #         for changing block devices.
1773 # Since: 0.14.0
1775 { 'command': 'change',
1776   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1779 # @block_set_io_throttle:
1781 # Change I/O throttle limits for a block drive.
1783 # @device: The name of the device
1785 # @bps: total throughput limit in bytes per second
1787 # @bps_rd: read throughput limit in bytes per second
1789 # @bps_wr: write throughput limit in bytes per second
1791 # @iops: total I/O operations per second
1793 # @ops_rd: read I/O operations per second
1795 # @iops_wr: write I/O operations per second
1797 # Returns: Nothing on success
1798 #          If @device is not a valid block device, DeviceNotFound
1800 # Since: 1.1
1802 { 'command': 'block_set_io_throttle',
1803   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1804             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1807 # @block-stream:
1809 # Copy data from a backing file into a block device.
1811 # The block streaming operation is performed in the background until the entire
1812 # backing file has been copied.  This command returns immediately once streaming
1813 # has started.  The status of ongoing block streaming operations can be checked
1814 # with query-block-jobs.  The operation can be stopped before it has completed
1815 # using the block-job-cancel command.
1817 # If a base file is specified then sectors are not copied from that base file and
1818 # its backing chain.  When streaming completes the image file will have the base
1819 # file as its backing file.  This can be used to stream a subset of the backing
1820 # file chain instead of flattening the entire image.
1822 # On successful completion the image file is updated to drop the backing file
1823 # and the BLOCK_JOB_COMPLETED event is emitted.
1825 # @device: the device name
1827 # @base:   #optional the common backing file name
1829 # @speed:  #optional the maximum speed, in bytes per second
1831 # Returns: Nothing on success
1832 #          If @device does not exist, DeviceNotFound
1834 # Since: 1.1
1836 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1837                                        '*speed': 'int' } }
1840 # @block-job-set-speed:
1842 # Set maximum speed for a background block operation.
1844 # This command can only be issued when there is an active block job.
1846 # Throttling can be disabled by setting the speed to 0.
1848 # @device: the device name
1850 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
1851 #          Defaults to 0.
1853 # Returns: Nothing on success
1854 #          If no background operation is active on this device, DeviceNotActive
1856 # Since: 1.1
1858 { 'command': 'block-job-set-speed',
1859   'data': { 'device': 'str', 'speed': 'int' } }
1862 # @block-job-cancel:
1864 # Stop an active background block operation.
1866 # This command returns immediately after marking the active background block
1867 # operation for cancellation.  It is an error to call this command if no
1868 # operation is in progress.
1870 # The operation will cancel as soon as possible and then emit the
1871 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
1872 # enumerated using query-block-jobs.
1874 # For streaming, the image file retains its backing file unless the streaming
1875 # operation happens to complete just as it is being cancelled.  A new streaming
1876 # operation can be started at a later time to finish copying all data from the
1877 # backing file.
1879 # @device: the device name
1881 # Returns: Nothing on success
1882 #          If no background operation is active on this device, DeviceNotActive
1884 # Since: 1.1
1886 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1889 # @ObjectTypeInfo:
1891 # This structure describes a search result from @qom-list-types
1893 # @name: the type name found in the search
1895 # Since: 1.1
1897 # Notes: This command is experimental and may change syntax in future releases.
1899 { 'type': 'ObjectTypeInfo',
1900   'data': { 'name': 'str' } }
1903 # @qom-list-types:
1905 # This command will return a list of types given search parameters
1907 # @implements: if specified, only return types that implement this type name
1909 # @abstract: if true, include abstract types in the results
1911 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1913 # Since: 1.1
1915 { 'command': 'qom-list-types',
1916   'data': { '*implements': 'str', '*abstract': 'bool' },
1917   'returns': [ 'ObjectTypeInfo' ] }
1920 # @DevicePropertyInfo:
1922 # Information about device properties.
1924 # @name: the name of the property
1925 # @type: the typename of the property
1927 # Since: 1.2
1929 { 'type': 'DevicePropertyInfo',
1930   'data': { 'name': 'str', 'type': 'str' } }
1933 # @device-list-properties:
1935 # List properties associated with a device.
1937 # @typename: the type name of a device
1939 # Returns: a list of DevicePropertyInfo describing a devices properties
1941 # Since: 1.2
1943 { 'command': 'device-list-properties',
1944   'data': { 'typename': 'str'},
1945   'returns': [ 'DevicePropertyInfo' ] }
1948 # @migrate
1950 # Migrates the current running guest to another Virtual Machine.
1952 # @uri: the Uniform Resource Identifier of the destination VM
1954 # @blk: #optional do block migration (full disk copy)
1956 # @inc: #optional incremental disk copy migration
1958 # @detach: this argument exists only for compatibility reasons and
1959 #          is ignored by QEMU
1961 # Returns: nothing on success
1963 # Since: 0.14.0
1965 { 'command': 'migrate',
1966   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1968 # @xen-save-devices-state:
1970 # Save the state of all devices to file. The RAM and the block devices
1971 # of the VM are not saved by this command.
1973 # @filename: the file to save the state of the devices to as binary
1974 # data. See xen-save-devices-state.txt for a description of the binary
1975 # format.
1977 # Returns: Nothing on success
1979 # Since: 1.1
1981 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1984 # @device_del:
1986 # Remove a device from a guest
1988 # @id: the name of the device
1990 # Returns: Nothing on success
1991 #          If @id is not a valid device, DeviceNotFound
1993 # Notes: When this command completes, the device may not be removed from the
1994 #        guest.  Hot removal is an operation that requires guest cooperation.
1995 #        This command merely requests that the guest begin the hot removal
1996 #        process.
1998 # Since: 0.14.0
2000 { 'command': 'device_del', 'data': {'id': 'str'} }
2003 # @dump-guest-memory
2005 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2006 # very long depending on the amount of guest memory. This command is only
2007 # supported on i386 and x86_64.
2009 # @paging: if true, do paging to get guest's memory mapping. This allows
2010 # using gdb to process the core file. However, setting @paging to false
2011 # may be desirable because of two reasons:
2013 #   1. The guest may be in a catastrophic state or can have corrupted
2014 #      memory, which cannot be trusted
2015 #   2. The guest can be in real-mode even if paging is enabled. For example,
2016 #      the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
2018 # @protocol: the filename or file descriptor of the vmcore. The supported
2019 # protocols are:
2021 #   1. file: the protocol starts with "file:", and the following string is
2022 #      the file's path.
2023 #   2. fd: the protocol starts with "fd:", and the following string is the
2024 #      fd's name.
2026 # @begin: #optional if specified, the starting physical address.
2028 # @length: #optional if specified, the memory size, in bytes. If you don't
2029 # want to dump all guest's memory, please specify the start @begin and @length
2031 # Returns: nothing on success
2033 # Since: 1.2
2035 { 'command': 'dump-guest-memory',
2036   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2037             '*length': 'int' } }
2039 # @netdev_add:
2041 # Add a network backend.
2043 # @type: the type of network backend.  Current valid values are 'user', 'tap',
2044 #        'vde', 'socket', 'dump' and 'bridge'
2046 # @id: the name of the new network backend
2048 # @props: #optional a list of properties to be passed to the backend in
2049 #         the format 'name=value', like 'ifname=tap0,script=no'
2051 # Notes: The semantics of @props is not well defined.  Future commands will be
2052 #        introduced that provide stronger typing for backend creation.
2054 # Since: 0.14.0
2056 # Returns: Nothing on success
2057 #          If @type is not a valid network backend, DeviceNotFound
2059 { 'command': 'netdev_add',
2060   'data': {'type': 'str', 'id': 'str', '*props': '**'},
2061   'gen': 'no' }
2064 # @netdev_del:
2066 # Remove a network backend.
2068 # @id: the name of the network backend to remove
2070 # Returns: Nothing on success
2071 #          If @id is not a valid network backend, DeviceNotFound
2073 # Since: 0.14.0
2075 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2078 # @NetdevNoneOptions
2080 # Use it alone to have zero network devices.
2082 # Since 1.2
2084 { 'type': 'NetdevNoneOptions',
2085   'data': { } }
2088 # @NetLegacyNicOptions
2090 # Create a new Network Interface Card.
2092 # @netdev: #optional id of -netdev to connect to
2094 # @macaddr: #optional MAC address
2096 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2098 # @addr: #optional PCI device address
2100 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2102 # Since 1.2
2104 { 'type': 'NetLegacyNicOptions',
2105   'data': {
2106     '*netdev':  'str',
2107     '*macaddr': 'str',
2108     '*model':   'str',
2109     '*addr':    'str',
2110     '*vectors': 'uint32' } }
2113 # @String
2115 # A fat type wrapping 'str', to be embedded in lists.
2117 # Since 1.2
2119 { 'type': 'String',
2120   'data': {
2121     'str': 'str' } }
2124 # @NetdevUserOptions
2126 # Use the user mode network stack which requires no administrator privilege to
2127 # run.
2129 # @hostname: #optional client hostname reported by the builtin DHCP server
2131 # @restrict: #optional isolate the guest from the host
2133 # @ip: #optional legacy parameter, use net= instead
2135 # @net: #optional IP address and optional netmask
2137 # @host: #optional guest-visible address of the host
2139 # @tftp: #optional root directory of the built-in TFTP server
2141 # @bootfile: #optional BOOTP filename, for use with tftp=
2143 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2144 #             assign
2146 # @dns: #optional guest-visible address of the virtual nameserver
2148 # @smb: #optional root directory of the built-in SMB server
2150 # @smbserver: #optional IP address of the built-in SMB server
2152 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2153 #           endpoints
2155 # @guestfwd: #optional forward guest TCP connections
2157 # Since 1.2
2159 { 'type': 'NetdevUserOptions',
2160   'data': {
2161     '*hostname':  'str',
2162     '*restrict':  'bool',
2163     '*ip':        'str',
2164     '*net':       'str',
2165     '*host':      'str',
2166     '*tftp':      'str',
2167     '*bootfile':  'str',
2168     '*dhcpstart': 'str',
2169     '*dns':       'str',
2170     '*smb':       'str',
2171     '*smbserver': 'str',
2172     '*hostfwd':   ['String'],
2173     '*guestfwd':  ['String'] } }
2176 # @NetdevTapOptions
2178 # Connect the host TAP network interface name to the VLAN.
2180 # @ifname: #optional interface name
2182 # @fd: #optional file descriptor of an already opened tap
2184 # @script: #optional script to initialize the interface
2186 # @downscript: #optional script to shut down the interface
2188 # @helper: #optional command to execute to configure bridge
2190 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2192 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2194 # @vhost: #optional enable vhost-net network accelerator
2196 # @vhostfd: #optional file descriptor of an already opened vhost net device
2198 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2200 # Since 1.2
2202 { 'type': 'NetdevTapOptions',
2203   'data': {
2204     '*ifname':     'str',
2205     '*fd':         'str',
2206     '*script':     'str',
2207     '*downscript': 'str',
2208     '*helper':     'str',
2209     '*sndbuf':     'size',
2210     '*vnet_hdr':   'bool',
2211     '*vhost':      'bool',
2212     '*vhostfd':    'str',
2213     '*vhostforce': 'bool' } }
2216 # @NetdevSocketOptions
2218 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2219 # socket connection.
2221 # @fd: #optional file descriptor of an already opened socket
2223 # @listen: #optional port number, and optional hostname, to listen on
2225 # @connect: #optional port number, and optional hostname, to connect to
2227 # @mcast: #optional UDP multicast address and port number
2229 # @localaddr: #optional source address and port for multicast and udp packets
2231 # @udp: #optional UDP unicast address and port number
2233 # Since 1.2
2235 { 'type': 'NetdevSocketOptions',
2236   'data': {
2237     '*fd':        'str',
2238     '*listen':    'str',
2239     '*connect':   'str',
2240     '*mcast':     'str',
2241     '*localaddr': 'str',
2242     '*udp':       'str' } }
2245 # @NetdevVdeOptions
2247 # Connect the VLAN to a vde switch running on the host.
2249 # @sock: #optional socket path
2251 # @port: #optional port number
2253 # @group: #optional group owner of socket
2255 # @mode: #optional permissions for socket
2257 # Since 1.2
2259 { 'type': 'NetdevVdeOptions',
2260   'data': {
2261     '*sock':  'str',
2262     '*port':  'uint16',
2263     '*group': 'str',
2264     '*mode':  'uint16' } }
2267 # @NetdevDumpOptions
2269 # Dump VLAN network traffic to a file.
2271 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2272 # suffixes.
2274 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2276 # Since 1.2
2278 { 'type': 'NetdevDumpOptions',
2279   'data': {
2280     '*len':  'size',
2281     '*file': 'str' } }
2284 # @NetdevBridgeOptions
2286 # Connect a host TAP network interface to a host bridge device.
2288 # @br: #optional bridge name
2290 # @helper: #optional command to execute to configure bridge
2292 # Since 1.2
2294 { 'type': 'NetdevBridgeOptions',
2295   'data': {
2296     '*br':     'str',
2297     '*helper': 'str' } }
2300 # @NetdevHubPortOptions
2302 # Connect two or more net clients through a software hub.
2304 # @hubid: hub identifier number
2306 # Since 1.2
2308 { 'type': 'NetdevHubPortOptions',
2309   'data': {
2310     'hubid':     'int32' } }
2313 # @NetClientOptions
2315 # A discriminated record of network device traits.
2317 # Since 1.2
2319 { 'union': 'NetClientOptions',
2320   'data': {
2321     'none':     'NetdevNoneOptions',
2322     'nic':      'NetLegacyNicOptions',
2323     'user':     'NetdevUserOptions',
2324     'tap':      'NetdevTapOptions',
2325     'socket':   'NetdevSocketOptions',
2326     'vde':      'NetdevVdeOptions',
2327     'dump':     'NetdevDumpOptions',
2328     'bridge':   'NetdevBridgeOptions',
2329     'hubport':  'NetdevHubPortOptions' } }
2332 # @NetLegacy
2334 # Captures the configuration of a network device; legacy.
2336 # @vlan: #optional vlan number
2338 # @id: #optional identifier for monitor commands
2340 # @name: #optional identifier for monitor commands, ignored if @id is present
2342 # @opts: device type specific properties (legacy)
2344 # Since 1.2
2346 { 'type': 'NetLegacy',
2347   'data': {
2348     '*vlan': 'int32',
2349     '*id':   'str',
2350     '*name': 'str',
2351     'opts':  'NetClientOptions' } }
2354 # @Netdev
2356 # Captures the configuration of a network device.
2358 # @id: identifier for monitor commands.
2360 # @opts: device type specific properties
2362 # Since 1.2
2364 { 'type': 'Netdev',
2365   'data': {
2366     'id':   'str',
2367     'opts': 'NetClientOptions' } }
2370 # @getfd:
2372 # Receive a file descriptor via SCM rights and assign it a name
2374 # @fdname: file descriptor name
2376 # Returns: Nothing on success
2378 # Since: 0.14.0
2380 # Notes: If @fdname already exists, the file descriptor assigned to
2381 #        it will be closed and replaced by the received file
2382 #        descriptor.
2383 #        The 'closefd' command can be used to explicitly close the
2384 #        file descriptor when it is no longer needed.
2386 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2389 # @closefd:
2391 # Close a file descriptor previously passed via SCM rights
2393 # @fdname: file descriptor name
2395 # Returns: Nothing on success
2397 # Since: 0.14.0
2399 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2402 # @MachineInfo:
2404 # Information describing a machine.
2406 # @name: the name of the machine
2408 # @alias: #optional an alias for the machine name
2410 # @default: #optional whether the machine is default
2412 # Since: 1.2.0
2414 { 'type': 'MachineInfo',
2415   'data': { 'name': 'str', '*alias': 'str',
2416             '*is-default': 'bool' } }
2419 # @query-machines:
2421 # Return a list of supported machines
2423 # Returns: a list of MachineInfo
2425 # Since: 1.2.0
2427 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2430 # @CpuDefinitionInfo:
2432 # Virtual CPU definition.
2434 # @name: the name of the CPU definition
2436 # Since: 1.2.0
2438 { 'type': 'CpuDefinitionInfo',
2439   'data': { 'name': 'str' } }
2442 # @query-cpu-definitions:
2444 # Return a list of supported virtual CPU definitions
2446 # Returns: a list of CpuDefInfo
2448 # Since: 1.2.0
2450 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2452 # @AddfdInfo:
2454 # Information about a file descriptor that was added to an fd set.
2456 # @fdset-id: The ID of the fd set that @fd was added to.
2458 # @fd: The file descriptor that was received via SCM rights and
2459 #      added to the fd set.
2461 # Since: 1.2.0
2463 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2466 # @add-fd:
2468 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2470 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2472 # @opaque: #optional A free-form string that can be used to describe the fd.
2474 # Returns: @AddfdInfo on success
2475 #          If file descriptor was not received, FdNotSupplied
2476 #          If @fdset-id does not exist, InvalidParameterValue
2478 # Notes: The list of fd sets is shared by all monitor connections.
2480 #        If @fdset-id is not specified, a new fd set will be created.
2482 # Since: 1.2.0
2484 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2485   'returns': 'AddfdInfo' }
2488 # @remove-fd:
2490 # Remove a file descriptor from an fd set.
2492 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2494 # @fd: #optional The file descriptor that is to be removed.
2496 # Returns: Nothing on success
2497 #          If @fdset-id or @fd is not found, FdNotFound
2499 # Since: 1.2.0
2501 # Notes: The list of fd sets is shared by all monitor connections.
2503 #        If @fd is not specified, all file descriptors in @fdset-id
2504 #        will be removed.
2506 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2509 # @FdsetFdInfo:
2511 # Information about a file descriptor that belongs to an fd set.
2513 # @fd: The file descriptor value.
2515 # @opaque: #optional A free-form string that can be used to describe the fd.
2517 # Since: 1.2.0
2519 { 'type': 'FdsetFdInfo',
2520   'data': {'fd': 'int', '*opaque': 'str'} }
2523 # @FdsetInfo:
2525 # Information about an fd set.
2527 # @fdset-id: The ID of the fd set.
2529 # @fds: A list of file descriptors that belong to this fd set.
2531 # Since: 1.2.0
2533 { 'type': 'FdsetInfo',
2534   'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2537 # @query-fdsets:
2539 # Return information describing all fd sets.
2541 # Returns: A list of @FdsetInfo
2543 # Since: 1.2.0
2545 # Note: The list of fd sets is shared by all monitor connections.
2548 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2551 # @TargetType
2553 # Target CPU emulation type
2555 # These parameters correspond to the softmmu binary CPU name that is currently
2556 # running.
2558 # Since: 1.2.0
2560 { 'enum': 'TargetType',
2561   'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2562             'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2563             'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2564             'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2567 # @TargetInfo:
2569 # Information describing the QEMU target.
2571 # @arch: the target architecture (eg "x86_64", "i386", etc)
2573 # Since: 1.2.0
2575 { 'type': 'TargetInfo',
2576   'data': { 'arch': 'TargetType' } }
2579 # @query-target:
2581 # Return information about the target for this QEMU
2583 # Returns: TargetInfo
2585 # Since: 1.2.0
2587 { 'command': 'query-target', 'returns': 'TargetInfo' }
2590 # @QKeyCode:
2592 # An enumeration of key name.
2594 # This is used by the send-key command.
2596 # Since: 1.3.0
2598 { 'enum': 'QKeyCode',
2599   'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2600             'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2601             '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2602             'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2603             'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2604             'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2605             'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2606             'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2607             'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2608             'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2609             'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2610             'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2611             'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2612             'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2613              'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2616 # @send-key:
2618 # Send keys to guest.
2620 # @keys: key sequence. 'keys' is the name of the key. Use a JSON array to
2621 #        press several keys simultaneously.
2623 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2624 #             to 100
2626 # Returns: Nothing on success
2627 #          If key is unknown or redundant, InvalidParameter
2629 # Since: 1.3.0
2632 { 'command': 'send-key',
2633   'data': { 'keys': ['QKeyCode'], '*hold-time': 'int' } }
2636 # @screendump:
2638 # Write a PPM of the VGA screen to a file.
2640 # @filename: the path of a new PPM file to store the image
2642 # Returns: Nothing on success
2644 # Since: 0.14.0
2646 { 'command': 'screendump', 'data': {'filename': 'str'} }