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
27 { 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
34 # Allow client connections for VNC, Spice and socket based
35 # character devices to be passed in to QEMU via SCM_RIGHTS.
37 # @protocol: protocol name. Valid names are "vnc", "spice" or the
38 # name of a character device (eg. from -chardev id=XXXX)
40 # @fdname: file descriptor name previously passed via 'getfd' command
42 # @skipauth: #optional whether to skip authentication. Only applies
43 # to "vnc" and "spice" protocols
45 # @tls: #optional whether to perform TLS. Only applies to the "spice"
48 # Returns: nothing on success.
52 { 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
59 # Guest name information.
61 # @name: #optional The name of the guest
65 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
70 # Return the name information of a guest.
72 # Returns: @NameInfo of the guest
76 { 'command': 'query-name', 'returns': 'NameInfo' }
81 # A description of QEMU's version.
83 # @qemu.major: The major version of QEMU
85 # @qemu.minor: The minor version of QEMU
87 # @qemu.micro: The micro version of QEMU. By current convention, a micro
88 # version of 50 signifies a development branch. A micro version
89 # greater than or equal to 90 signifies a release candidate for
90 # the next minor version. A micro version of less than 50
91 # signifies a stable release.
93 # @package: QEMU will always set this field to an empty string. Downstream
94 # versions of QEMU should set this to a non-empty string. The
95 # exact format depends on the downstream however it highly
96 # recommended that a unique name is used.
100 { 'type': 'VersionInfo',
101 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
107 # Returns the current version of QEMU.
109 # Returns: A @VersionInfo object describing the current version of QEMU.
113 { 'command': 'query-version', 'returns': 'VersionInfo' }
118 # Information about support for KVM acceleration
120 # @enabled: true if KVM acceleration is active
122 # @present: true if KVM acceleration is built into this executable
126 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
131 # Returns information about KVM acceleration
137 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
142 # An enumeration of VM run states.
144 # @debug: QEMU is running on a debugger
146 # @finish-migrate: guest is paused to finish the migration process
148 # @inmigrate: guest is paused waiting for an incoming migration. Note
149 # that this state does not tell whether the machine will start at the
150 # end of the migration. This depends on the command-line -S option and
151 # any invocation of 'stop' or 'cont' that has happened since QEMU was
154 # @internal-error: An internal error that prevents further guest execution
157 # @io-error: the last IOP has failed and the device is configured to pause
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' ] }
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
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' } }
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
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'] } }
250 # Information about a QEMU image file check
252 # @filename: name of the image file checked
254 # @format: format of the image file checked
256 # @check-errors: number of unexpected errors occurred during check
258 # @image-end-offset: #optional offset (in bytes) where the image ends, this
259 # field is present if the driver for the image format
262 # @corruptions: #optional number of corruptions found during the check if any
264 # @leaks: #optional number of leaks found during the check if any
266 # @corruptions-fixed: #optional number of corruptions fixed during the check
269 # @leaks-fixed: #optional number of leaks fixed during the check if any
271 # @total-clusters: #optional total number of clusters, this field is present
272 # if the driver for the image format supports it
274 # @allocated-clusters: #optional total number of allocated clusters, this
275 # field is present if the driver for the image format
278 # @fragmented-clusters: #optional total number of fragmented clusters, this
279 # field is present if the driver for the image format
282 # @compressed-clusters: #optional total number of compressed clusters, this
283 # field is present if the driver for the image format
290 { 'type': 'ImageCheck',
291 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
292 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
293 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
294 '*total-clusters': 'int', '*allocated-clusters': 'int',
295 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
300 # Information about VCPU run state
302 # @running: true if all VCPUs are runnable, false if not runnable
304 # @singlestep: true if VCPUs are in single-step mode
306 # @status: the virtual machine @RunState
310 # Notes: @singlestep is enabled through the GDB stub
312 { 'type': 'StatusInfo',
313 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
318 # Query the run status of all VCPUs
320 # Returns: @StatusInfo reflecting all VCPUs
324 { 'command': 'query-status', 'returns': 'StatusInfo' }
329 # Guest UUID information.
331 # @UUID: the UUID of the guest
335 # Notes: If no UUID was specified for the guest, a null UUID is returned.
337 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
342 # Query the guest UUID information.
344 # Returns: The @UuidInfo for the guest
348 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
353 # Information about a character device.
355 # @label: the label of the character device
357 # @filename: the filename of the character device
359 # Notes: @filename is encoded using the QEMU command line character device
360 # encoding. See the QEMU man page for details.
364 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
369 # Returns information about current character devices.
371 # Returns: a list of @ChardevInfo
375 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
380 # An enumeration of data format.
382 # @utf8: Data is a UTF-8 string (RFC 3629)
384 # @base64: Data is Base64 encoded binary (RFC 3548)
388 { 'enum': 'DataFormat'
389 'data': [ 'utf8', 'base64' ] }
394 # Write to a ring buffer character device.
396 # @device: the ring buffer character device name
398 # @data: data to write
400 # @format: #optional data encoding (default 'utf8').
401 # - base64: data must be base64 encoded text. Its binary
402 # decoding gets written.
403 # Bug: invalid base64 is currently not rejected.
404 # Whitespace *is* invalid.
405 # - utf8: data's UTF-8 encoding is written
406 # - data itself is always Unicode regardless of format, like
409 # Returns: Nothing on success
413 { 'command': 'ringbuf-write',
414 'data': {'device': 'str', 'data': 'str',
415 '*format': 'DataFormat'} }
420 # Read from a ring buffer character device.
422 # @device: the ring buffer character device name
424 # @size: how many bytes to read at most
426 # @format: #optional data encoding (default 'utf8').
427 # - base64: the data read is returned in base64 encoding.
428 # - utf8: the data read is interpreted as UTF-8.
429 # Bug: can screw up when the buffer contains invalid UTF-8
430 # sequences, NUL characters, after the ring buffer lost
431 # data, and when reading stops because the size limit is
433 # - The return value is always Unicode regardless of format,
434 # like any other string.
436 # Returns: data read from the device
440 { 'command': 'ringbuf-read',
441 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
447 # Information about a QMP command
449 # @name: The command name
453 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
458 # Return a list of supported QMP commands by this server
460 # Returns: A list of @CommandInfo for all supported commands
464 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
469 # Information about a QMP event
471 # @name: The event name
475 { 'type': 'EventInfo', 'data': {'name': 'str'} }
480 # Return a list of supported QMP events by this server
482 # Returns: A list of @EventInfo for all supported events
486 { 'command': 'query-events', 'returns': ['EventInfo'] }
491 # Detailed migration status.
493 # @transferred: amount of bytes already transferred to the target VM
495 # @remaining: amount of bytes remaining to be transferred to the target VM
497 # @total: total amount of bytes involved in the migration process
499 # @duplicate: number of duplicate pages (since 1.2)
501 # @normal : number of normal pages (since 1.2)
503 # @normal-bytes: number of normal bytes sent (since 1.2)
505 # @dirty-pages-rate: number of pages dirtied by second by the
510 { 'type': 'MigrationStats',
511 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
512 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int',
513 'dirty-pages-rate' : 'int' } }
518 # Detailed XBZRLE migration cache statistics
520 # @cache-size: XBZRLE cache size
522 # @bytes: amount of bytes already transferred to the target VM
524 # @pages: amount of pages transferred to the target VM
526 # @cache-miss: number of cache miss
528 # @overflow: number of overflows
532 { 'type': 'XBZRLECacheStats',
533 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
534 'cache-miss': 'int', 'overflow': 'int' } }
539 # Information about current migration process.
541 # @status: #optional string describing the current migration status.
542 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
543 # 'cancelled'. If this field is not returned, no migration process
546 # @ram: #optional @MigrationStats containing detailed migration
547 # status, only returned if status is 'active' or
548 # 'completed'. 'comppleted' (since 1.2)
550 # @disk: #optional @MigrationStats containing detailed disk migration
551 # status, only returned if status is 'active' and it is a block
554 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
555 # migration statistics, only returned if XBZRLE feature is on and
556 # status is 'active' or 'completed' (since 1.2)
558 # @total-time: #optional total amount of milliseconds since migration started.
559 # If migration has ended, it returns the total migration
562 # @downtime: #optional only present when migration finishes correctly
563 # total downtime in milliseconds for the guest.
566 # @expected-downtime: #optional only present while migration is active
567 # expected downtime in milliseconds for the guest in last walk
568 # of the dirty bitmap. (since 1.3)
572 { 'type': 'MigrationInfo',
573 'data': {'*status': 'str', '*ram': 'MigrationStats',
574 '*disk': 'MigrationStats',
575 '*xbzrle-cache': 'XBZRLECacheStats',
576 '*total-time': 'int',
577 '*expected-downtime': 'int',
578 '*downtime': 'int'} }
583 # Returns information about current migration process.
585 # Returns: @MigrationInfo
589 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
592 # @MigrationCapability
594 # Migration capabilities enumeration
596 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
597 # This feature allows us to minimize migration traffic for certain work
598 # loads, by sending compressed difference of the pages
602 { 'enum': 'MigrationCapability',
606 # @MigrationCapabilityStatus
608 # Migration capability information
610 # @capability: capability enum
612 # @state: capability state bool
616 { 'type': 'MigrationCapabilityStatus',
617 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
620 # @migrate-set-capabilities
622 # Enable/Disable the following migration capabilities (like xbzrle)
624 # @capabilities: json array of capability modifications to make
628 { 'command': 'migrate-set-capabilities',
629 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
632 # @query-migrate-capabilities
634 # Returns information about the current migration capabilities status
636 # Returns: @MigrationCapabilitiesStatus
640 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
645 # Information about a mouse device.
647 # @name: the name of the mouse device
649 # @index: the index of the mouse device
651 # @current: true if this device is currently receiving mouse events
653 # @absolute: true if this device supports absolute coordinates as input
657 { 'type': 'MouseInfo',
658 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
659 'absolute': 'bool'} }
664 # Returns information about each active mouse device
666 # Returns: a list of @MouseInfo for each device
670 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
675 # Information about a virtual CPU
677 # @CPU: the index of the virtual CPU
679 # @current: this only exists for backwards compatible and should be ignored
681 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
682 # to a processor specific low power mode.
684 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
686 # If the target is Sparc, this is the PC component of the
687 # instruction pointer.
689 # @nip: #optional If the target is PPC, the instruction pointer
691 # @npc: #optional If the target is Sparc, the NPC component of the instruction
694 # @PC: #optional If the target is MIPS, the instruction pointer
696 # @thread_id: ID of the underlying host thread
700 # Notes: @halted is a transient state that changes frequently. By the time the
701 # data is sent to the client, the guest may no longer be halted.
704 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
705 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
710 # Returns a list of information about each virtual CPU.
712 # Returns: a list of @CpuInfo for each virtual CPU
716 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
721 # Information about the backing device for a block device.
723 # @file: the filename of the backing device
725 # @ro: true if the backing device was open read-only
727 # @drv: the name of the block format used to open the backing device. As of
728 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
729 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
730 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
731 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
733 # @backing_file: #optional the name of the backing file (for copy-on-write)
735 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
737 # @encrypted: true if the backing device is encrypted
739 # @encryption_key_missing: true if the backing device is encrypted but an
740 # valid encryption key is missing
742 # @bps: total throughput limit in bytes per second is specified
744 # @bps_rd: read throughput limit in bytes per second is specified
746 # @bps_wr: write throughput limit in bytes per second is specified
748 # @iops: total I/O operations per second is specified
750 # @iops_rd: read I/O operations per second is specified
752 # @iops_wr: write I/O operations per second is specified
756 # Notes: This interface is only found in @BlockInfo.
758 { 'type': 'BlockDeviceInfo',
759 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
760 '*backing_file': 'str', 'backing_file_depth': 'int',
761 'encrypted': 'bool', 'encryption_key_missing': 'bool',
762 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
763 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
766 # @BlockDeviceIoStatus:
768 # An enumeration of block device I/O status.
770 # @ok: The last I/O operation has succeeded
772 # @failed: The last I/O operation has failed
774 # @nospace: The last I/O operation has failed due to a no-space condition
778 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
783 # Block dirty bitmap information.
785 # @count: number of dirty bytes according to the dirty bitmap
787 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
791 { 'type': 'BlockDirtyInfo',
792 'data': {'count': 'int', 'granularity': 'int'} }
797 # Block device information. This structure describes a virtual device and
798 # the backing device associated with it.
800 # @device: The device name associated with the virtual device.
802 # @type: This field is returned only for compatibility reasons, it should
803 # not be used (always returns 'unknown')
805 # @removable: True if the device supports removable media.
807 # @locked: True if the guest has locked this device from having its media
810 # @tray_open: #optional True if the device has a tray and it is open
811 # (only present if removable is true)
813 # @dirty: #optional dirty bitmap information (only present if the dirty
816 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
817 # supports it and the VM is configured to stop on errors
819 # @inserted: #optional @BlockDeviceInfo describing the device if media is
824 { 'type': 'BlockInfo',
825 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
826 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
827 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
828 '*dirty': 'BlockDirtyInfo' } }
833 # Get a list of BlockInfo for all virtual block devices.
835 # Returns: a list of @BlockInfo describing each virtual block device
839 { 'command': 'query-block', 'returns': ['BlockInfo'] }
844 # Statistics of a virtual block device or a block backing device.
846 # @rd_bytes: The number of bytes read by the device.
848 # @wr_bytes: The number of bytes written by the device.
850 # @rd_operations: The number of read operations performed by the device.
852 # @wr_operations: The number of write operations performed by the device.
854 # @flush_operations: The number of cache flush operations performed by the
855 # device (since 0.15.0)
857 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
860 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
862 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
864 # @wr_highest_offset: The offset after the greatest byte written to the
865 # device. The intended use of this information is for
866 # growable sparse files (like qcow2) that are used on top
867 # of a physical device.
871 { 'type': 'BlockDeviceStats',
872 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
873 'wr_operations': 'int', 'flush_operations': 'int',
874 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
875 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
880 # Statistics of a virtual block device or a block backing device.
882 # @device: #optional If the stats are for a virtual block device, the name
883 # corresponding to the virtual block device.
885 # @stats: A @BlockDeviceStats for the device.
887 # @parent: #optional This may point to the backing block device if this is a
888 # a virtual block device. If it's a backing block, this will point
889 # to the backing file is one is present.
893 { 'type': 'BlockStats',
894 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
895 '*parent': 'BlockStats'} }
900 # Query the @BlockStats for all virtual block devices.
902 # Returns: A list of @BlockStats for each virtual block devices.
906 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
911 # Information about a connected VNC client.
913 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
916 # @family: 'ipv6' if the client is connected via IPv6 and TCP
917 # 'ipv4' if the client is connected via IPv4 and TCP
918 # 'unix' if the client is connected via a unix domain socket
919 # 'unknown' otherwise
921 # @service: The service name of the client's port. This may depends on the
922 # host system's service database so symbolic names should not be
925 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
926 # Name of the client.
928 # @sasl_username: #optional If SASL authentication is in use, the SASL username
929 # used for authentication.
933 { 'type': 'VncClientInfo',
934 'data': {'host': 'str', 'family': 'str', 'service': 'str',
935 '*x509_dname': 'str', '*sasl_username': 'str'} }
940 # Information about the VNC session.
942 # @enabled: true if the VNC server is enabled, false otherwise
944 # @host: #optional The hostname the VNC server is bound to. This depends on
945 # the name resolution on the host and may be an IP address.
947 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
948 # 'ipv4' if the host is listening for IPv4 connections
949 # 'unix' if the host is listening on a unix domain socket
950 # 'unknown' otherwise
952 # @service: #optional The service name of the server's port. This may depends
953 # on the host system's service database so symbolic names should not
956 # @auth: #optional the current authentication type used by the server
957 # 'none' if no authentication is being used
958 # 'vnc' if VNC authentication is being used
959 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
960 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
961 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
962 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
963 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
964 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
965 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
966 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
967 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
969 # @clients: a list of @VncClientInfo of all currently connected clients
974 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
975 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
980 # Returns information about the current VNC server
986 { 'command': 'query-vnc', 'returns': 'VncInfo' }
991 # Information about a SPICE client channel.
993 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
996 # @family: 'ipv6' if the client is connected via IPv6 and TCP
997 # 'ipv4' if the client is connected via IPv4 and TCP
998 # 'unix' if the client is connected via a unix domain socket
999 # 'unknown' otherwise
1001 # @port: The client's port number.
1003 # @connection-id: SPICE connection id number. All channels with the same id
1004 # belong to the same SPICE session.
1006 # @connection-type: SPICE channel type number. "1" is the main control
1007 # channel, filter for this one if you want to track spice
1010 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1011 # multiple channels of the same type exist, such as multiple
1012 # display channels in a multihead setup
1014 # @tls: true if the channel is encrypted, false otherwise.
1018 { 'type': 'SpiceChannel',
1019 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1020 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1024 # @SpiceQueryMouseMode
1026 # An enumeration of Spice mouse states.
1028 # @client: Mouse cursor position is determined by the client.
1030 # @server: Mouse cursor position is determined by the server.
1032 # @unknown: No information is available about mouse mode used by
1035 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1039 { 'enum': 'SpiceQueryMouseMode',
1040 'data': [ 'client', 'server', 'unknown' ] }
1045 # Information about the SPICE session.
1047 # @enabled: true if the SPICE server is enabled, false otherwise
1049 # @migrated: true if the last guest migration completed and spice
1050 # migration had completed as well. false otherwise.
1052 # @host: #optional The hostname the SPICE server is bound to. This depends on
1053 # the name resolution on the host and may be an IP address.
1055 # @port: #optional The SPICE server's port number.
1057 # @compiled-version: #optional SPICE server version.
1059 # @tls-port: #optional The SPICE server's TLS port number.
1061 # @auth: #optional the current authentication type used by the server
1062 # 'none' if no authentication is being used
1063 # 'spice' uses SASL or direct TLS authentication, depending on command
1066 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1067 # be determined by the client or the server, or unknown if spice
1068 # server doesn't provide this information.
1072 # @channels: a list of @SpiceChannel for each active spice channel
1076 { 'type': 'SpiceInfo',
1077 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1078 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1079 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1084 # Returns information about the current SPICE server
1086 # Returns: @SpiceInfo
1090 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1095 # Information about the guest balloon device.
1097 # @actual: the number of bytes the balloon currently contains
1102 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1107 # Return information about the balloon device.
1109 # Returns: @BalloonInfo on success
1110 # If the balloon driver is enabled but not functional because the KVM
1111 # kernel module cannot support it, KvmMissingCap
1112 # If no balloon device is present, DeviceNotActive
1116 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1121 # A PCI device memory region
1123 # @base: the starting address (guest physical)
1125 # @limit: the ending address (guest physical)
1129 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1134 # Information about a PCI device I/O region.
1136 # @bar: the index of the Base Address Register for this region
1138 # @type: 'io' if the region is a PIO region
1139 # 'memory' if the region is a MMIO region
1141 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1143 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1147 { 'type': 'PciMemoryRegion',
1148 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1149 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1154 # Information about a PCI Bridge device
1156 # @bus.number: primary bus interface number. This should be the number of the
1157 # bus the device resides on.
1159 # @bus.secondary: secondary bus interface number. This is the number of the
1160 # main bus for the bridge
1162 # @bus.subordinate: This is the highest number bus that resides below the
1165 # @bus.io_range: The PIO range for all devices on this bridge
1167 # @bus.memory_range: The MMIO range for all devices on this bridge
1169 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1172 # @devices: a list of @PciDeviceInfo for each device on this bridge
1176 { 'type': 'PciBridgeInfo',
1177 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1178 'io_range': 'PciMemoryRange',
1179 'memory_range': 'PciMemoryRange',
1180 'prefetchable_range': 'PciMemoryRange' },
1181 '*devices': ['PciDeviceInfo']} }
1186 # Information about a PCI device
1188 # @bus: the bus number of the device
1190 # @slot: the slot the device is located in
1192 # @function: the function of the slot used by the device
1194 # @class_info.desc: #optional a string description of the device's class
1196 # @class_info.class: the class code of the device
1198 # @id.device: the PCI device id
1200 # @id.vendor: the PCI vendor id
1202 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1204 # @qdev_id: the device name of the PCI device
1206 # @pci_bridge: if the device is a PCI bridge, the bridge information
1208 # @regions: a list of the PCI I/O regions associated with the device
1210 # Notes: the contents of @class_info.desc are not stable and should only be
1211 # treated as informational.
1215 { 'type': 'PciDeviceInfo',
1216 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1217 'class_info': {'*desc': 'str', 'class': 'int'},
1218 'id': {'device': 'int', 'vendor': 'int'},
1219 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1220 'regions': ['PciMemoryRegion']} }
1225 # Information about a PCI bus
1227 # @bus: the bus index
1229 # @devices: a list of devices on this bus
1233 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1238 # Return information about the PCI bus topology of the guest.
1240 # Returns: a list of @PciInfo for each PCI bus
1244 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1249 # An enumeration of possible behaviors for errors on I/O operations.
1250 # The exact meaning depends on whether the I/O was initiated by a guest
1253 # @report: for guest operations, report the error to the guest;
1254 # for jobs, cancel the job
1256 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1257 # or BLOCK_JOB_ERROR)
1259 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1261 # @stop: for guest operations, stop the virtual machine;
1262 # for jobs, pause the job
1266 { 'enum': 'BlockdevOnError',
1267 'data': ['report', 'ignore', 'enospc', 'stop'] }
1272 # An enumeration of possible behaviors for the initial synchronization
1273 # phase of storage mirroring.
1275 # @top: copies data in the topmost image to the destination
1277 # @full: copies data from all images to the destination
1279 # @none: only copy data written from now on
1283 { 'enum': 'MirrorSyncMode',
1284 'data': ['top', 'full', 'none'] }
1289 # Information about a long-running block device operation.
1291 # @type: the job type ('stream' for image streaming)
1293 # @device: the block device name
1295 # @len: the maximum progress value
1297 # @busy: false if the job is known to be in a quiescent state, with
1298 # no pending I/O. Since 1.3.
1300 # @paused: whether the job is paused or, if @busy is true, will
1301 # pause itself as soon as possible. Since 1.3.
1303 # @offset: the current progress value
1305 # @speed: the rate limit, bytes per second
1307 # @io-status: the status of the job (since 1.3)
1311 { 'type': 'BlockJobInfo',
1312 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1313 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1314 'io-status': 'BlockDeviceIoStatus'} }
1317 # @query-block-jobs:
1319 # Return information about long-running block device operations.
1321 # Returns: a list of @BlockJobInfo for each active block job
1325 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1330 # This command will cause the QEMU process to exit gracefully. While every
1331 # attempt is made to send the QMP response before terminating, this is not
1332 # guaranteed. When using this interface, a premature EOF would not be
1337 { 'command': 'quit' }
1342 # Stop all guest VCPU execution.
1346 # Notes: This function will succeed even if the guest is already in the stopped
1347 # state. In "inmigrate" state, it will ensure that the guest
1348 # remains paused once migration finishes, as if the -S option was
1349 # passed on the command line.
1351 { 'command': 'stop' }
1356 # Performs a hard reset of a guest.
1360 { 'command': 'system_reset' }
1363 # @system_powerdown:
1365 # Requests that a guest perform a powerdown operation.
1369 # Notes: A guest may or may not respond to this command. This command
1370 # returning does not indicate that a guest has accepted the request or
1371 # that it has shut down. Many guests will respond to this command by
1372 # prompting the user in some way.
1374 { 'command': 'system_powerdown' }
1379 # This command is a nop that is only provided for the purposes of compatibility.
1383 # Notes: Do not use this command.
1385 { 'command': 'cpu', 'data': {'index': 'int'} }
1390 # Save a portion of guest memory to a file.
1392 # @val: the virtual address of the guest to start from
1394 # @size: the size of memory region to save
1396 # @filename: the file to save the memory to as binary data
1398 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1399 # virtual address (defaults to CPU 0)
1401 # Returns: Nothing on success
1405 # Notes: Errors were not reliably returned until 1.1
1407 { 'command': 'memsave',
1408 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1413 # Save a portion of guest physical memory to a file.
1415 # @val: the physical address of the guest to start from
1417 # @size: the size of memory region to save
1419 # @filename: the file to save the memory to as binary data
1421 # Returns: Nothing on success
1425 # Notes: Errors were not reliably returned until 1.1
1427 { 'command': 'pmemsave',
1428 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1433 # Resume guest VCPU execution.
1437 # Returns: If successful, nothing
1438 # If QEMU was started with an encrypted block device and a key has
1439 # not yet been set, DeviceEncrypted.
1441 # Notes: This command will succeed if the guest is currently running. It
1442 # will also succeed if the guest is in the "inmigrate" state; in
1443 # this case, the effect of the command is to make sure the guest
1444 # starts once migration finishes, removing the effect of the -S
1445 # command line option if it was passed.
1447 { 'command': 'cont' }
1452 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1458 { 'command': 'system_wakeup' }
1463 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1465 # Returns: If successful, nothing
1469 # Notes: Only x86 Virtual Machines support this command.
1471 { 'command': 'inject-nmi' }
1476 # Sets the link status of a virtual network adapter.
1478 # @name: the device name of the virtual network adapter
1480 # @up: true to set the link status to be up
1482 # Returns: Nothing on success
1483 # If @name is not a valid network device, DeviceNotFound
1487 # Notes: Not all network adapters support setting link status. This command
1488 # will succeed even if the network adapter does not support link status
1491 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1496 # This command sets the password of a block device that has not been open
1497 # with a password and requires one.
1499 # The two cases where this can happen are a block device is created through
1500 # QEMU's initial command line or a block device is changed through the legacy
1501 # @change interface.
1503 # In the event that the block device is created through the initial command
1504 # line, the VM will start in the stopped state regardless of whether '-S' is
1505 # used. The intention is for a management tool to query the block devices to
1506 # determine which ones are encrypted, set the passwords with this command, and
1507 # then start the guest with the @cont command.
1509 # @device: the name of the device to set the password on
1511 # @password: the password to use for the device
1513 # Returns: nothing on success
1514 # If @device is not a valid block device, DeviceNotFound
1515 # If @device is not encrypted, DeviceNotEncrypted
1517 # Notes: Not all block formats support encryption and some that do are not
1518 # able to validate that a password is correct. Disk corruption may
1519 # occur if an invalid password is specified.
1523 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1528 # Request the balloon driver to change its balloon size.
1530 # @value: the target size of the balloon in bytes
1532 # Returns: Nothing on success
1533 # If the balloon driver is enabled but not functional because the KVM
1534 # kernel module cannot support it, KvmMissingCap
1535 # If no balloon device is present, DeviceNotActive
1537 # Notes: This command just issues a request to the guest. When it returns,
1538 # the balloon size may not have changed. A guest can change the balloon
1539 # size independent of this command.
1543 { 'command': 'balloon', 'data': {'value': 'int'} }
1548 # Resize a block image while a guest is running.
1550 # @device: the name of the device to get the image resized
1552 # @size: new image size in bytes
1554 # Returns: nothing on success
1555 # If @device is not a valid block device, DeviceNotFound
1559 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1564 # An enumeration that tells QEMU how to set the backing file path in
1567 # @existing: QEMU should look for an existing image file.
1569 # @absolute-paths: QEMU should create a new image with absolute paths
1570 # for the backing file.
1574 { 'enum': 'NewImageMode'
1575 'data': [ 'existing', 'absolute-paths' ] }
1580 # @device: the name of the device to generate the snapshot from.
1582 # @snapshot-file: the target of the new image. A new file will be created.
1584 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1586 # @mode: #optional whether and how QEMU should create a new image, default is
1589 { 'type': 'BlockdevSnapshot',
1590 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1591 '*mode': 'NewImageMode' } }
1596 # A discriminated record of operations that can be performed with
1599 { 'union': 'BlockdevAction',
1601 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1607 # Atomically operate on a group of one or more block devices. If
1608 # any operation fails, then the entire set of actions will be
1609 # abandoned and the appropriate error returned. The only operation
1610 # supported is currently blockdev-snapshot-sync.
1613 # @BlockdevAction: information needed for the device snapshot
1615 # Returns: nothing on success
1616 # If @device is not a valid block device, DeviceNotFound
1618 # Note: The transaction aborts on the first failure. Therefore, there will
1619 # be only one device or snapshot file returned in an error condition, and
1620 # subsequent actions will not have been attempted.
1624 { 'command': 'transaction',
1625 'data': { 'actions': [ 'BlockdevAction' ] } }
1628 # @blockdev-snapshot-sync
1630 # Generates a synchronous snapshot of a block device.
1632 # @device: the name of the device to generate the snapshot from.
1634 # @snapshot-file: the target of the new image. If the file exists, or if it
1635 # is a device, the snapshot will be created in the existing
1636 # file/device. If does not exist, a new file will be created.
1638 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1640 # @mode: #optional whether and how QEMU should create a new image, default is
1643 # Returns: nothing on success
1644 # If @device is not a valid block device, DeviceNotFound
1648 { 'command': 'blockdev-snapshot-sync',
1649 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1650 '*mode': 'NewImageMode'} }
1653 # @human-monitor-command:
1655 # Execute a command on the human monitor and return the output.
1657 # @command-line: the command to execute in the human monitor
1659 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1661 # Returns: the output of the command as a string
1665 # Notes: This command only exists as a stop-gap. It's use is highly
1666 # discouraged. The semantics of this command are not guaranteed.
1668 # Known limitations:
1670 # o This command is stateless, this means that commands that depend
1671 # on state information (such as getfd) might not work
1673 # o Commands that prompt the user for data (eg. 'cont' when the block
1674 # device is encrypted) don't currently work
1676 { 'command': 'human-monitor-command',
1677 'data': {'command-line': 'str', '*cpu-index': 'int'},
1683 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1684 # writes data between 'top' and 'base' into 'base'.
1686 # @device: the name of the device
1688 # @base: #optional The file name of the backing image to write data into.
1689 # If not specified, this is the deepest backing image
1691 # @top: The file name of the backing image within the image chain,
1692 # which contains the topmost data to be committed down.
1693 # Note, the active layer as 'top' is currently unsupported.
1695 # If top == base, that is an error.
1698 # @speed: #optional the maximum speed, in bytes per second
1700 # Returns: Nothing on success
1701 # If commit or stream is already active on this device, DeviceInUse
1702 # If @device does not exist, DeviceNotFound
1703 # If image commit is not supported by this device, NotSupported
1704 # If @base or @top is invalid, a generic error is returned
1705 # If @top is the active layer, or omitted, a generic error is returned
1706 # If @speed is invalid, InvalidParameter
1711 { 'command': 'block-commit',
1712 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1718 # Start mirroring a block device's writes to a new destination.
1720 # @device: the name of the device whose writes should be mirrored.
1722 # @target: the target of the new image. If the file exists, or if it
1723 # is a device, the existing file/device will be used as the new
1724 # destination. If it does not exist, a new file will be created.
1726 # @format: #optional the format of the new destination, default is to
1727 # probe if @mode is 'existing', else the format of the source
1729 # @mode: #optional whether and how QEMU should create a new image, default is
1732 # @speed: #optional the maximum speed, in bytes per second
1734 # @sync: what parts of the disk image should be copied to the destination
1735 # (all the disk, only the sectors allocated in the topmost image, or
1738 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1739 # if the image format doesn't have clusters, 4K if the clusters
1740 # are smaller than that, else the cluster size. Must be a
1741 # power of 2 between 512 and 64M (since 1.4).
1743 # @buf-size: #optional maximum amount of data in flight from source to
1744 # target (since 1.4).
1746 # @on-source-error: #optional the action to take on an error on the source,
1747 # default 'report'. 'stop' and 'enospc' can only be used
1748 # if the block device supports io-status (see BlockInfo).
1750 # @on-target-error: #optional the action to take on an error on the target,
1751 # default 'report' (no limitations, since this applies to
1752 # a different block device than @device).
1754 # Returns: nothing on success
1755 # If @device is not a valid block device, DeviceNotFound
1759 { 'command': 'drive-mirror',
1760 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1761 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1762 '*speed': 'int', '*granularity': 'uint32',
1763 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1764 '*on-target-error': 'BlockdevOnError' } }
1769 # Cancel the current executing migration process.
1771 # Returns: nothing on success
1773 # Notes: This command succeeds even if there is no migration process running.
1777 { 'command': 'migrate_cancel' }
1780 # @migrate_set_downtime
1782 # Set maximum tolerated downtime for migration.
1784 # @value: maximum downtime in seconds
1786 # Returns: nothing on success
1790 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1793 # @migrate_set_speed
1795 # Set maximum speed for migration.
1797 # @value: maximum speed in bytes.
1799 # Returns: nothing on success
1801 # Notes: A value lesser than zero will be automatically round up to zero.
1805 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1808 # @migrate-set-cache-size
1810 # Set XBZRLE cache size
1812 # @value: cache size in bytes
1814 # The size will be rounded down to the nearest power of 2.
1815 # The cache size can be modified before and during ongoing migration
1817 # Returns: nothing on success
1821 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1824 # @query-migrate-cache-size
1826 # query XBZRLE cache size
1828 # Returns: XBZRLE cache size in bytes
1832 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1837 ## query maximum number of CPUs supported by machine
1839 ## Returns: number of CPUs
1843 { 'command': 'query-cpu-max', 'returns': 'int' }
1846 # @ObjectPropertyInfo:
1848 # @name: the name of the property
1850 # @type: the type of the property. This will typically come in one of four
1853 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1854 # These types are mapped to the appropriate JSON type.
1856 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1857 # legacy qdev typename. These types are always treated as strings.
1859 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1860 # device type name. Child properties create the composition tree.
1862 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1863 # device type name. Link properties form the device model graph.
1867 { 'type': 'ObjectPropertyInfo',
1868 'data': { 'name': 'str', 'type': 'str' } }
1873 # This command will list any properties of a object given a path in the object
1876 # @path: the path within the object model. See @qom-get for a description of
1879 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1884 { 'command': 'qom-list',
1885 'data': { 'path': 'str' },
1886 'returns': [ 'ObjectPropertyInfo' ] }
1891 # This command will get a property from a object model path and return the
1894 # @path: The path within the object model. There are two forms of supported
1895 # paths--absolute and partial paths.
1897 # Absolute paths are derived from the root object and can follow child<>
1898 # or link<> properties. Since they can follow link<> properties, they
1899 # can be arbitrarily long. Absolute paths look like absolute filenames
1900 # and are prefixed with a leading slash.
1902 # Partial paths look like relative filenames. They do not begin
1903 # with a prefix. The matching rules for partial paths are subtle but
1904 # designed to make specifying objects easy. At each level of the
1905 # composition tree, the partial path is matched as an absolute path.
1906 # The first match is not returned. At least two matches are searched
1907 # for. A successful result is only returned if only one match is
1908 # found. If more than one match is found, a flag is return to
1909 # indicate that the match was ambiguous.
1911 # @property: The property name to read
1913 # Returns: The property value. The type depends on the property type. legacy<>
1914 # properties are returned as #str. child<> and link<> properties are
1915 # returns as #str pathnames. All integer property types (u8, u16, etc)
1916 # are returned as #int.
1920 { 'command': 'qom-get',
1921 'data': { 'path': 'str', 'property': 'str' },
1922 'returns': 'visitor',
1928 # This command will set a property from a object model path.
1930 # @path: see @qom-get for a description of this parameter
1932 # @property: the property name to set
1934 # @value: a value who's type is appropriate for the property type. See @qom-get
1935 # for a description of type mapping.
1939 { 'command': 'qom-set',
1940 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1946 # Sets the password of a remote display session.
1948 # @protocol: `vnc' to modify the VNC server password
1949 # `spice' to modify the Spice server password
1951 # @password: the new password
1953 # @connected: #optional how to handle existing clients when changing the
1954 # password. If nothing is specified, defaults to `keep'
1955 # `fail' to fail the command if clients are connected
1956 # `disconnect' to disconnect existing clients
1957 # `keep' to maintain existing clients
1959 # Returns: Nothing on success
1960 # If Spice is not enabled, DeviceNotFound
1964 { 'command': 'set_password',
1965 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1970 # Expire the password of a remote display server.
1972 # @protocol: the name of the remote display protocol `vnc' or `spice'
1974 # @time: when to expire the password.
1975 # `now' to expire the password immediately
1976 # `never' to cancel password expiration
1977 # `+INT' where INT is the number of seconds from now (integer)
1978 # `INT' where INT is the absolute time in seconds
1980 # Returns: Nothing on success
1981 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1985 # Notes: Time is relative to the server and currently there is no way to
1986 # coordinate server time with client time. It is not recommended to
1987 # use the absolute time version of the @time parameter unless you're
1988 # sure you are on the same machine as the QEMU instance.
1990 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1995 # Ejects a device from a removable drive.
1997 # @device: The name of the device
1999 # @force: @optional If true, eject regardless of whether the drive is locked.
2000 # If not specified, the default value is false.
2002 # Returns: Nothing on success
2003 # If @device is not a valid block device, DeviceNotFound
2005 # Notes: Ejecting a device will no media results in success
2009 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2012 # @change-vnc-password:
2014 # Change the VNC server password.
2016 # @target: the new password to use with VNC authentication
2020 # Notes: An empty password in this command will set the password to the empty
2021 # string. Existing clients are unaffected by executing this command.
2023 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2028 # This command is multiple commands multiplexed together.
2030 # @device: This is normally the name of a block device but it may also be 'vnc'.
2031 # when it's 'vnc', then sub command depends on @target
2033 # @target: If @device is a block device, then this is the new filename.
2034 # If @device is 'vnc', then if the value 'password' selects the vnc
2035 # change password command. Otherwise, this specifies a new server URI
2036 # address to listen to for VNC connections.
2038 # @arg: If @device is a block device, then this is an optional format to open
2040 # If @device is 'vnc' and @target is 'password', this is the new VNC
2041 # password to set. If this argument is an empty string, then no future
2042 # logins will be allowed.
2044 # Returns: Nothing on success.
2045 # If @device is not a valid block device, DeviceNotFound
2046 # If the new block device is encrypted, DeviceEncrypted. Note that
2047 # if this error is returned, the device has been opened successfully
2048 # and an additional call to @block_passwd is required to set the
2049 # device's password. The behavior of reads and writes to the block
2050 # device between when these calls are executed is undefined.
2052 # Notes: It is strongly recommended that this interface is not used especially
2053 # for changing block devices.
2057 { 'command': 'change',
2058 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2061 # @block_set_io_throttle:
2063 # Change I/O throttle limits for a block drive.
2065 # @device: The name of the device
2067 # @bps: total throughput limit in bytes per second
2069 # @bps_rd: read throughput limit in bytes per second
2071 # @bps_wr: write throughput limit in bytes per second
2073 # @iops: total I/O operations per second
2075 # @ops_rd: read I/O operations per second
2077 # @iops_wr: write I/O operations per second
2079 # Returns: Nothing on success
2080 # If @device is not a valid block device, DeviceNotFound
2084 { 'command': 'block_set_io_throttle',
2085 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2086 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
2091 # Copy data from a backing file into a block device.
2093 # The block streaming operation is performed in the background until the entire
2094 # backing file has been copied. This command returns immediately once streaming
2095 # has started. The status of ongoing block streaming operations can be checked
2096 # with query-block-jobs. The operation can be stopped before it has completed
2097 # using the block-job-cancel command.
2099 # If a base file is specified then sectors are not copied from that base file and
2100 # its backing chain. When streaming completes the image file will have the base
2101 # file as its backing file. This can be used to stream a subset of the backing
2102 # file chain instead of flattening the entire image.
2104 # On successful completion the image file is updated to drop the backing file
2105 # and the BLOCK_JOB_COMPLETED event is emitted.
2107 # @device: the device name
2109 # @base: #optional the common backing file name
2111 # @speed: #optional the maximum speed, in bytes per second
2113 # @on-error: #optional the action to take on an error (default report).
2114 # 'stop' and 'enospc' can only be used if the block device
2115 # supports io-status (see BlockInfo). Since 1.3.
2117 # Returns: Nothing on success
2118 # If @device does not exist, DeviceNotFound
2122 { 'command': 'block-stream',
2123 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2124 '*on-error': 'BlockdevOnError' } }
2127 # @block-job-set-speed:
2129 # Set maximum speed for a background block operation.
2131 # This command can only be issued when there is an active block job.
2133 # Throttling can be disabled by setting the speed to 0.
2135 # @device: the device name
2137 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2140 # Returns: Nothing on success
2141 # If no background operation is active on this device, DeviceNotActive
2145 { 'command': 'block-job-set-speed',
2146 'data': { 'device': 'str', 'speed': 'int' } }
2149 # @block-job-cancel:
2151 # Stop an active background block operation.
2153 # This command returns immediately after marking the active background block
2154 # operation for cancellation. It is an error to call this command if no
2155 # operation is in progress.
2157 # The operation will cancel as soon as possible and then emit the
2158 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2159 # enumerated using query-block-jobs.
2161 # For streaming, the image file retains its backing file unless the streaming
2162 # operation happens to complete just as it is being cancelled. A new streaming
2163 # operation can be started at a later time to finish copying all data from the
2166 # @device: the device name
2168 # @force: #optional whether to allow cancellation of a paused job (default
2169 # false). Since 1.3.
2171 # Returns: Nothing on success
2172 # If no background operation is active on this device, DeviceNotActive
2176 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2181 # Pause an active background block operation.
2183 # This command returns immediately after marking the active background block
2184 # operation for pausing. It is an error to call this command if no
2185 # operation is in progress. Pausing an already paused job has no cumulative
2186 # effect; a single block-job-resume command will resume the job.
2188 # The operation will pause as soon as possible. No event is emitted when
2189 # the operation is actually paused. Cancelling a paused job automatically
2192 # @device: the device name
2194 # Returns: Nothing on success
2195 # If no background operation is active on this device, DeviceNotActive
2199 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2202 # @block-job-resume:
2204 # Resume an active background block operation.
2206 # This command returns immediately after resuming a paused background block
2207 # operation. It is an error to call this command if no operation is in
2208 # progress. Resuming an already running job is not an error.
2210 # This command also clears the error status of the job.
2212 # @device: the device name
2214 # Returns: Nothing on success
2215 # If no background operation is active on this device, DeviceNotActive
2219 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2222 # @block-job-complete:
2224 # Manually trigger completion of an active background block operation. This
2225 # is supported for drive mirroring, where it also switches the device to
2226 # write to the target path only. The ability to complete is signaled with
2227 # a BLOCK_JOB_READY event.
2229 # This command completes an active background block operation synchronously.
2230 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2231 # is not defined. Note that if an I/O error occurs during the processing of
2232 # this command: 1) the command itself will fail; 2) the error will be processed
2233 # according to the rerror/werror arguments that were specified when starting
2236 # A cancelled or paused job cannot be completed.
2238 # @device: the device name
2240 # Returns: Nothing on success
2241 # If no background operation is active on this device, DeviceNotActive
2245 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2250 # This structure describes a search result from @qom-list-types
2252 # @name: the type name found in the search
2256 # Notes: This command is experimental and may change syntax in future releases.
2258 { 'type': 'ObjectTypeInfo',
2259 'data': { 'name': 'str' } }
2264 # This command will return a list of types given search parameters
2266 # @implements: if specified, only return types that implement this type name
2268 # @abstract: if true, include abstract types in the results
2270 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2274 { 'command': 'qom-list-types',
2275 'data': { '*implements': 'str', '*abstract': 'bool' },
2276 'returns': [ 'ObjectTypeInfo' ] }
2279 # @DevicePropertyInfo:
2281 # Information about device properties.
2283 # @name: the name of the property
2284 # @type: the typename of the property
2288 { 'type': 'DevicePropertyInfo',
2289 'data': { 'name': 'str', 'type': 'str' } }
2292 # @device-list-properties:
2294 # List properties associated with a device.
2296 # @typename: the type name of a device
2298 # Returns: a list of DevicePropertyInfo describing a devices properties
2302 { 'command': 'device-list-properties',
2303 'data': { 'typename': 'str'},
2304 'returns': [ 'DevicePropertyInfo' ] }
2309 # Migrates the current running guest to another Virtual Machine.
2311 # @uri: the Uniform Resource Identifier of the destination VM
2313 # @blk: #optional do block migration (full disk copy)
2315 # @inc: #optional incremental disk copy migration
2317 # @detach: this argument exists only for compatibility reasons and
2318 # is ignored by QEMU
2320 # Returns: nothing on success
2324 { 'command': 'migrate',
2325 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2327 # @xen-save-devices-state:
2329 # Save the state of all devices to file. The RAM and the block devices
2330 # of the VM are not saved by this command.
2332 # @filename: the file to save the state of the devices to as binary
2333 # data. See xen-save-devices-state.txt for a description of the binary
2336 # Returns: Nothing on success
2340 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2343 # @xen-set-global-dirty-log
2345 # Enable or disable the global dirty log mode.
2347 # @enable: true to enable, false to disable.
2353 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2358 # Remove a device from a guest
2360 # @id: the name of the device
2362 # Returns: Nothing on success
2363 # If @id is not a valid device, DeviceNotFound
2365 # Notes: When this command completes, the device may not be removed from the
2366 # guest. Hot removal is an operation that requires guest cooperation.
2367 # This command merely requests that the guest begin the hot removal
2372 { 'command': 'device_del', 'data': {'id': 'str'} }
2375 # @dump-guest-memory
2377 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2378 # very long depending on the amount of guest memory. This command is only
2379 # supported on i386 and x86_64.
2381 # @paging: if true, do paging to get guest's memory mapping. This allows
2382 # using gdb to process the core file.
2384 # IMPORTANT: this option can make QEMU allocate several gigabytes
2385 # of RAM. This can happen for a large guest, or a
2386 # malicious guest pretending to be large.
2388 # Also, paging=true has the following limitations:
2390 # 1. The guest may be in a catastrophic state or can have corrupted
2391 # memory, which cannot be trusted
2392 # 2. The guest can be in real-mode even if paging is enabled. For
2393 # example, the guest uses ACPI to sleep, and ACPI sleep state
2396 # @protocol: the filename or file descriptor of the vmcore. The supported
2399 # 1. file: the protocol starts with "file:", and the following
2400 # string is the file's path.
2401 # 2. fd: the protocol starts with "fd:", and the following string
2404 # @begin: #optional if specified, the starting physical address.
2406 # @length: #optional if specified, the memory size, in bytes. If you don't
2407 # want to dump all guest's memory, please specify the start @begin
2410 # Returns: nothing on success
2414 { 'command': 'dump-guest-memory',
2415 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2416 '*length': 'int' } }
2421 # Add a network backend.
2423 # @type: the type of network backend. Current valid values are 'user', 'tap',
2424 # 'vde', 'socket', 'dump' and 'bridge'
2426 # @id: the name of the new network backend
2428 # @props: #optional a list of properties to be passed to the backend in
2429 # the format 'name=value', like 'ifname=tap0,script=no'
2431 # Notes: The semantics of @props is not well defined. Future commands will be
2432 # introduced that provide stronger typing for backend creation.
2436 # Returns: Nothing on success
2437 # If @type is not a valid network backend, DeviceNotFound
2439 { 'command': 'netdev_add',
2440 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2446 # Remove a network backend.
2448 # @id: the name of the network backend to remove
2450 # Returns: Nothing on success
2451 # If @id is not a valid network backend, DeviceNotFound
2455 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2458 # @NetdevNoneOptions
2460 # Use it alone to have zero network devices.
2464 { 'type': 'NetdevNoneOptions',
2468 # @NetLegacyNicOptions
2470 # Create a new Network Interface Card.
2472 # @netdev: #optional id of -netdev to connect to
2474 # @macaddr: #optional MAC address
2476 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2478 # @addr: #optional PCI device address
2480 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2484 { 'type': 'NetLegacyNicOptions',
2490 '*vectors': 'uint32' } }
2495 # A fat type wrapping 'str', to be embedded in lists.
2504 # @NetdevUserOptions
2506 # Use the user mode network stack which requires no administrator privilege to
2509 # @hostname: #optional client hostname reported by the builtin DHCP server
2511 # @restrict: #optional isolate the guest from the host
2513 # @ip: #optional legacy parameter, use net= instead
2515 # @net: #optional IP address and optional netmask
2517 # @host: #optional guest-visible address of the host
2519 # @tftp: #optional root directory of the built-in TFTP server
2521 # @bootfile: #optional BOOTP filename, for use with tftp=
2523 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2526 # @dns: #optional guest-visible address of the virtual nameserver
2528 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2531 # @smb: #optional root directory of the built-in SMB server
2533 # @smbserver: #optional IP address of the built-in SMB server
2535 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2538 # @guestfwd: #optional forward guest TCP connections
2542 { 'type': 'NetdevUserOptions',
2545 '*restrict': 'bool',
2551 '*dhcpstart': 'str',
2553 '*dnssearch': ['String'],
2555 '*smbserver': 'str',
2556 '*hostfwd': ['String'],
2557 '*guestfwd': ['String'] } }
2562 # Connect the host TAP network interface name to the VLAN.
2564 # @ifname: #optional interface name
2566 # @fd: #optional file descriptor of an already opened tap
2568 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2571 # @script: #optional script to initialize the interface
2573 # @downscript: #optional script to shut down the interface
2575 # @helper: #optional command to execute to configure bridge
2577 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2579 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2581 # @vhost: #optional enable vhost-net network accelerator
2583 # @vhostfd: #optional file descriptor of an already opened vhost net device
2585 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2588 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2592 { 'type': 'NetdevTapOptions',
2598 '*downscript': 'str',
2601 '*vnet_hdr': 'bool',
2605 '*vhostforce': 'bool',
2606 '*queues': 'uint32'} }
2609 # @NetdevSocketOptions
2611 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2612 # socket connection.
2614 # @fd: #optional file descriptor of an already opened socket
2616 # @listen: #optional port number, and optional hostname, to listen on
2618 # @connect: #optional port number, and optional hostname, to connect to
2620 # @mcast: #optional UDP multicast address and port number
2622 # @localaddr: #optional source address and port for multicast and udp packets
2624 # @udp: #optional UDP unicast address and port number
2628 { 'type': 'NetdevSocketOptions',
2634 '*localaddr': 'str',
2640 # Connect the VLAN to a vde switch running on the host.
2642 # @sock: #optional socket path
2644 # @port: #optional port number
2646 # @group: #optional group owner of socket
2648 # @mode: #optional permissions for socket
2652 { 'type': 'NetdevVdeOptions',
2657 '*mode': 'uint16' } }
2660 # @NetdevDumpOptions
2662 # Dump VLAN network traffic to a file.
2664 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2667 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2671 { 'type': 'NetdevDumpOptions',
2677 # @NetdevBridgeOptions
2679 # Connect a host TAP network interface to a host bridge device.
2681 # @br: #optional bridge name
2683 # @helper: #optional command to execute to configure bridge
2687 { 'type': 'NetdevBridgeOptions',
2690 '*helper': 'str' } }
2693 # @NetdevHubPortOptions
2695 # Connect two or more net clients through a software hub.
2697 # @hubid: hub identifier number
2701 { 'type': 'NetdevHubPortOptions',
2703 'hubid': 'int32' } }
2708 # A discriminated record of network device traits.
2712 { 'union': 'NetClientOptions',
2714 'none': 'NetdevNoneOptions',
2715 'nic': 'NetLegacyNicOptions',
2716 'user': 'NetdevUserOptions',
2717 'tap': 'NetdevTapOptions',
2718 'socket': 'NetdevSocketOptions',
2719 'vde': 'NetdevVdeOptions',
2720 'dump': 'NetdevDumpOptions',
2721 'bridge': 'NetdevBridgeOptions',
2722 'hubport': 'NetdevHubPortOptions' } }
2727 # Captures the configuration of a network device; legacy.
2729 # @vlan: #optional vlan number
2731 # @id: #optional identifier for monitor commands
2733 # @name: #optional identifier for monitor commands, ignored if @id is present
2735 # @opts: device type specific properties (legacy)
2739 { 'type': 'NetLegacy',
2744 'opts': 'NetClientOptions' } }
2749 # Captures the configuration of a network device.
2751 # @id: identifier for monitor commands.
2753 # @opts: device type specific properties
2760 'opts': 'NetClientOptions' } }
2763 # @InetSocketAddress
2765 # Captures a socket address or address range in the Internet namespace.
2767 # @host: host part of the address
2769 # @port: port part of the address, or lowest port if @to is present
2771 # @to: highest port to try
2773 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2776 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2781 { 'type': 'InetSocketAddress',
2790 # @UnixSocketAddress
2792 # Captures a socket address in the local ("Unix socket") namespace.
2794 # @path: filesystem path to use
2798 { 'type': 'UnixSocketAddress',
2805 # Captures the address of a socket, which could also be a named file descriptor
2809 { 'union': 'SocketAddress',
2811 'inet': 'InetSocketAddress',
2812 'unix': 'UnixSocketAddress',
2818 # Receive a file descriptor via SCM rights and assign it a name
2820 # @fdname: file descriptor name
2822 # Returns: Nothing on success
2826 # Notes: If @fdname already exists, the file descriptor assigned to
2827 # it will be closed and replaced by the received file
2829 # The 'closefd' command can be used to explicitly close the
2830 # file descriptor when it is no longer needed.
2832 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2837 # Close a file descriptor previously passed via SCM rights
2839 # @fdname: file descriptor name
2841 # Returns: Nothing on success
2845 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2850 # Information describing a machine.
2852 # @name: the name of the machine
2854 # @alias: #optional an alias for the machine name
2856 # @default: #optional whether the machine is default
2860 { 'type': 'MachineInfo',
2861 'data': { 'name': 'str', '*alias': 'str',
2862 '*is-default': 'bool' } }
2867 # Return a list of supported machines
2869 # Returns: a list of MachineInfo
2873 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2876 # @CpuDefinitionInfo:
2878 # Virtual CPU definition.
2880 # @name: the name of the CPU definition
2884 { 'type': 'CpuDefinitionInfo',
2885 'data': { 'name': 'str' } }
2888 # @query-cpu-definitions:
2890 # Return a list of supported virtual CPU definitions
2892 # Returns: a list of CpuDefInfo
2896 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2900 # Information about a file descriptor that was added to an fd set.
2902 # @fdset-id: The ID of the fd set that @fd was added to.
2904 # @fd: The file descriptor that was received via SCM rights and
2905 # added to the fd set.
2909 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2914 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2916 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2918 # @opaque: #optional A free-form string that can be used to describe the fd.
2920 # Returns: @AddfdInfo on success
2921 # If file descriptor was not received, FdNotSupplied
2922 # If @fdset-id is a negative value, InvalidParameterValue
2924 # Notes: The list of fd sets is shared by all monitor connections.
2926 # If @fdset-id is not specified, a new fd set will be created.
2930 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2931 'returns': 'AddfdInfo' }
2936 # Remove a file descriptor from an fd set.
2938 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2940 # @fd: #optional The file descriptor that is to be removed.
2942 # Returns: Nothing on success
2943 # If @fdset-id or @fd is not found, FdNotFound
2947 # Notes: The list of fd sets is shared by all monitor connections.
2949 # If @fd is not specified, all file descriptors in @fdset-id
2952 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2957 # Information about a file descriptor that belongs to an fd set.
2959 # @fd: The file descriptor value.
2961 # @opaque: #optional A free-form string that can be used to describe the fd.
2965 { 'type': 'FdsetFdInfo',
2966 'data': {'fd': 'int', '*opaque': 'str'} }
2971 # Information about an fd set.
2973 # @fdset-id: The ID of the fd set.
2975 # @fds: A list of file descriptors that belong to this fd set.
2979 { 'type': 'FdsetInfo',
2980 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2985 # Return information describing all fd sets.
2987 # Returns: A list of @FdsetInfo
2991 # Note: The list of fd sets is shared by all monitor connections.
2994 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2999 # Target CPU emulation type
3001 # These parameters correspond to the softmmu binary CPU name that is currently
3006 { 'enum': 'TargetType',
3007 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
3008 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'moxie',
3009 'or32', 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4',
3010 'sparc64', 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
3015 # Information describing the QEMU target.
3017 # @arch: the target architecture (eg "x86_64", "i386", etc)
3021 { 'type': 'TargetInfo',
3022 'data': { 'arch': 'TargetType' } }
3027 # Return information about the target for this QEMU
3029 # Returns: TargetInfo
3033 { 'command': 'query-target', 'returns': 'TargetInfo' }
3038 # An enumeration of key name.
3040 # This is used by the send-key command.
3044 { 'enum': 'QKeyCode',
3045 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3046 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3047 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3048 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3049 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3050 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3051 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3052 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3053 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3054 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3055 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3056 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3057 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3058 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3059 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3064 # Represents a keyboard key.
3068 { 'union': 'KeyValue',
3071 'qcode': 'QKeyCode' } }
3076 # Send keys to guest.
3078 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3079 # simultaneously sent to the guest. A @KeyValue.number value is sent
3080 # directly to the guest, while @KeyValue.qcode must be a valid
3083 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3086 # Returns: Nothing on success
3087 # If key is unknown or redundant, InvalidParameter
3092 { 'command': 'send-key',
3093 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3098 # Write a PPM of the VGA screen to a file.
3100 # @filename: the path of a new PPM file to store the image
3102 # Returns: Nothing on success
3106 { 'command': 'screendump', 'data': {'filename': 'str'} }
3109 # @nbd-server-start:
3111 # Start an NBD server listening on the given host and port. Block
3112 # devices can then be exported using @nbd-server-add. The NBD
3113 # server will present them as named exports; for example, another
3114 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3116 # @addr: Address on which to listen.
3118 # Returns: error if the server is already running.
3122 { 'command': 'nbd-server-start',
3123 'data': { 'addr': 'SocketAddress' } }
3128 # Export a device to QEMU's embedded NBD server.
3130 # @device: Block device to be exported
3132 # @writable: Whether clients should be able to write to the device via the
3133 # NBD connection (default false). #optional
3135 # Returns: error if the device is already marked for export.
3139 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3144 # Stop QEMU's embedded NBD server, and unregister all devices previously
3145 # added via @nbd-server-add.
3149 { 'command': 'nbd-server-stop' }
3154 # Configuration info for file chardevs.
3156 # @in: #optional The name of the input file
3157 # @out: The name of the output file
3161 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3167 # Configuration info for device and pipe chardevs.
3169 # @device: The name of the special file for the device,
3170 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3171 # @type: What kind of device this is.
3175 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3180 # Configuration info for (stream) socket chardevs.
3182 # @addr: socket address to listen on (server=true)
3183 # or connect to (server=false)
3184 # @server: #optional create server socket (default: true)
3185 # @wait: #optional wait for connect (not used for server
3186 # sockets, default: false)
3187 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3188 # @telnet: #optional enable telnet protocol (default: false)
3192 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3195 '*nodelay' : 'bool',
3196 '*telnet' : 'bool' } }
3201 # Configuration info for datagram socket chardevs.
3203 # @remote: remote address
3204 # @local: #optional local address
3208 { 'type': 'ChardevDgram', 'data': { 'remote' : 'SocketAddress',
3209 '*local' : 'SocketAddress' } }
3214 # Configuration info for mux chardevs.
3216 # @chardev: name of the base chardev.
3220 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3225 # Configuration info for stdio chardevs.
3227 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3228 # be delivered to qemu. Default: true in -nographic mode,
3233 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3236 # @ChardevSpiceChannel:
3238 # Configuration info for spice vm channel chardevs.
3240 # @type: kind of channel (for example vdagent).
3244 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3247 # @ChardevSpicePort:
3249 # Configuration info for spice port chardevs.
3251 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3255 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3260 # Configuration info for virtual console chardevs.
3262 # @width: console width, in pixels
3263 # @height: console height, in pixels
3264 # @cols: console width, in chars
3265 # @rows: console height, in chars
3269 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3277 # Configuration info for memory chardevs
3279 # @size: #optional Ringbuffer size, must be power of two, default is 65536
3283 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3288 # Configuration info for the new chardev backend.
3292 { 'type': 'ChardevDummy', 'data': { } }
3294 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3295 'serial' : 'ChardevHostdev',
3296 'parallel': 'ChardevHostdev',
3297 'pipe' : 'ChardevHostdev',
3298 'socket' : 'ChardevSocket',
3299 'dgram' : 'ChardevDgram',
3300 'pty' : 'ChardevDummy',
3301 'null' : 'ChardevDummy',
3302 'mux' : 'ChardevMux',
3303 'msmouse': 'ChardevDummy',
3304 'braille': 'ChardevDummy',
3305 'stdio' : 'ChardevStdio',
3306 'console': 'ChardevDummy',
3307 'spicevmc' : 'ChardevSpiceChannel',
3308 'spiceport' : 'ChardevSpicePort',
3310 'memory' : 'ChardevRingbuf' } }
3315 # Return info about the chardev backend just created.
3317 # @pty: #optional name of the slave pseudoterminal device, present if
3318 # and only if a chardev of type 'pty' was created
3322 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3327 # Add a character device backend
3329 # @id: the chardev's ID, must be unique
3330 # @backend: backend type and parameters
3332 # Returns: ChardevReturn.
3336 { 'command': 'chardev-add', 'data': {'id' : 'str',
3337 'backend' : 'ChardevBackend' },
3338 'returns': 'ChardevReturn' }
3343 # Remove a character device backend
3345 # @id: the chardev's ID, must exist and not be in use
3347 # Returns: Nothing on success
3351 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3356 # An enumeration of TPM models
3358 # @tpm-tis: TPM TIS model
3362 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3365 # @query-tpm-models:
3367 # Return a list of supported TPM models
3369 # Returns: a list of TpmModel
3373 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3378 # An enumeration of TPM types
3380 # @passthrough: TPM passthrough type
3384 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3389 # Return a list of supported TPM types
3391 # Returns: a list of TpmType
3395 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3398 # @TPMPassthroughOptions:
3400 # Information about the TPM passthrough type
3402 # @path: #optional string describing the path used for accessing the TPM device
3404 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3405 # for cancellation of TPM commands while they are executing
3409 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3410 '*cancel-path' : 'str'} }
3415 # A union referencing different TPM backend types' configuration options
3417 # @passthrough: The configuration options for the TPM passthrough type
3421 { 'union': 'TpmTypeOptions',
3422 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3427 # Information about the TPM
3429 # @id: The Id of the TPM
3431 # @model: The TPM frontend model
3433 # @options: The TPM (backend) type configuration options
3437 { 'type': 'TPMInfo',
3438 'data': {'id': 'str',
3439 'model': 'TpmModel',
3440 'options': 'TpmTypeOptions' } }
3445 # Return information about the TPM device
3447 # Returns: @TPMInfo on success
3451 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }