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
30 { 'enum': 'ErrorClass',
31 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
32 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap',
33 'MigrationExpected' ] }
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"
52 # Returns: nothing on success.
56 { 'command': 'add_client',
57 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
63 # Guest name information.
65 # @name: #optional The name of the guest
69 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
74 # Return the name information of a guest.
76 # Returns: @NameInfo of the guest
80 { 'command': 'query-name', 'returns': 'NameInfo' }
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.
104 { 'type': 'VersionInfo',
105 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
111 # Returns the current version of QEMU.
113 # Returns: A @VersionInfo object describing the current version of QEMU.
117 { 'command': 'query-version', 'returns': 'VersionInfo' }
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
130 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
135 # Returns information about KVM acceleration
141 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
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
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 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
260 # Notes: @singlestep is enabled through the GDB stub
262 { 'type': 'StatusInfo',
263 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
268 # Query the run status of all VCPUs
270 # Returns: @StatusInfo reflecting all VCPUs
274 { 'command': 'query-status', 'returns': 'StatusInfo' }
279 # Guest UUID information.
281 # @UUID: the UUID of the guest
285 # Notes: If no UUID was specified for the guest, a null UUID is returned.
287 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
292 # Query the guest UUID information.
294 # Returns: The @UuidInfo for the guest
298 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
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.
314 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
319 # Returns information about current character devices.
321 # Returns: a list of @ChardevInfo
325 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
330 # Information about a QMP command
332 # @name: The command name
336 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
341 # Return a list of supported QMP commands by this server
343 # Returns: A list of @CommandInfo for all supported commands
347 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
352 # Information about a QMP event
354 # @name: The event name
358 { 'type': 'EventInfo', 'data': {'name': 'str'} }
363 # Return a list of supported QMP events by this server
365 # Returns: A list of @EventInfo for all supported events
369 { 'command': 'query-events', 'returns': ['EventInfo'] }
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)
390 { 'type': 'MigrationStats',
391 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
392 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int' } }
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
411 { 'type': 'XBZRLECacheStats',
412 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
413 'cache-miss': 'int', 'overflow': 'int' } }
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
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
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
443 { 'type': 'MigrationInfo',
444 'data': {'*status': 'str', '*ram': 'MigrationStats',
445 '*disk': 'MigrationStats',
446 '*xbzrle-cache': 'XBZRLECacheStats',
447 '*total-time': 'int'} }
452 # Returns information about current migration process.
454 # Returns: @MigrationInfo
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
471 { 'enum': 'MigrationCapability',
475 # @MigrationCapabilityStatus
477 # Migration capability information
479 # @capability: capability enum
481 # @state: capability state bool
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
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
509 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
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
526 { 'type': 'MouseInfo',
527 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
528 'absolute': 'bool'} }
533 # Returns information about each active mouse device
535 # Returns: a list of @MouseInfo for each device
539 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
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
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
563 # @PC: #optional If the target is MIPS, the instruction pointer
565 # @thread_id: ID of the underlying host thread
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.
573 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
574 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
579 # Returns a list of information about each virtual CPU.
581 # Returns: a list of @CpuInfo for each virtual CPU
585 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
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
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
647 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
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
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
676 { 'type': 'BlockInfo',
677 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
678 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
679 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
684 # Get a list of BlockInfo for all virtual block devices.
686 # Returns: a list of @BlockInfo describing each virtual block device
690 { 'command': 'query-block', 'returns': ['BlockInfo'] }
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
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.
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' } }
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.
744 { 'type': 'BlockStats',
745 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
746 '*parent': 'BlockStats'} }
751 # Query the @BlockStats for all virtual block devices.
753 # Returns: A list of @BlockStats for each virtual block devices.
757 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
762 # Information about a connected VNC client.
764 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
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
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.
784 { 'type': 'VncClientInfo',
785 'data': {'host': 'str', 'family': 'str', 'service': 'str',
786 '*x509_dname': 'str', '*sasl_username': 'str'} }
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
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
825 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
826 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
831 # Returns information about the current VNC server
837 { 'command': 'query-vnc', 'returns': 'VncInfo' }
842 # Information about a SPICE client channel.
844 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
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
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.
869 { 'type': 'SpiceChannel',
870 'data': {'host': 'str', 'family': 'str', 'port': 'str',
871 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
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
886 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
890 { 'enum': 'SpiceQueryMouseMode',
891 'data': [ 'client', 'server', 'unknown' ] }
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
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.
923 # @channels: a list of @SpiceChannel for each active spice channel
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']} }
935 # Returns information about the current SPICE server
937 # Returns: @SpiceInfo
941 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
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
964 # Notes: all current versions of QEMU do not fill out optional information in
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'} }
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
985 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
990 # A PCI device memory region
992 # @base: the starting address (guest physical)
994 # @limit: the ending address (guest physical)
998 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
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
1016 { 'type': 'PciMemoryRegion',
1017 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1018 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
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
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
1041 # @devices: a list of @PciDeviceInfo for each device on this bridge
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']} }
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.
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']} }
1094 # Information about a PCI bus
1096 # @bus: the bus index
1098 # @devices: a list of devices on this bus
1102 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1107 # Return information about the PCI bus topology of the guest.
1109 # Returns: a list of @PciInfo for each PCI bus
1113 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1118 # An enumeration of possible behaviors for errors on I/O operations.
1119 # The exact meaning depends on whether the I/O was initiated by a guest
1122 # @report: for guest operations, report the error to the guest;
1123 # for jobs, cancel the job
1125 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1126 # or BLOCK_JOB_ERROR)
1128 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1130 # @stop: for guest operations, stop the virtual machine;
1131 # for jobs, pause the job
1135 { 'enum': 'BlockdevOnError',
1136 'data': ['report', 'ignore', 'enospc', 'stop'] }
1141 # Information about a long-running block device operation.
1143 # @type: the job type ('stream' for image streaming)
1145 # @device: the block device name
1147 # @len: the maximum progress value
1149 # @busy: false if the job is known to be in a quiescent state, with
1150 # no pending I/O. Since 1.3.
1152 # @paused: whether the job is paused or, if @busy is true, will
1153 # pause itself as soon as possible. Since 1.3.
1155 # @offset: the current progress value
1157 # @speed: the rate limit, bytes per second
1159 # @io-status: the status of the job (since 1.3)
1163 { 'type': 'BlockJobInfo',
1164 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1165 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1166 'io-status': 'BlockDeviceIoStatus'} }
1169 # @query-block-jobs:
1171 # Return information about long-running block device operations.
1173 # Returns: a list of @BlockJobInfo for each active block job
1177 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1182 # This command will cause the QEMU process to exit gracefully. While every
1183 # attempt is made to send the QMP response before terminating, this is not
1184 # guaranteed. When using this interface, a premature EOF would not be
1189 { 'command': 'quit' }
1194 # Stop all guest VCPU execution.
1198 # Notes: This function will succeed even if the guest is already in the stopped
1201 { 'command': 'stop' }
1206 # Performs a hard reset of a guest.
1210 { 'command': 'system_reset' }
1213 # @system_powerdown:
1215 # Requests that a guest perform a powerdown operation.
1219 # Notes: A guest may or may not respond to this command. This command
1220 # returning does not indicate that a guest has accepted the request or
1221 # that it has shut down. Many guests will respond to this command by
1222 # prompting the user in some way.
1224 { 'command': 'system_powerdown' }
1229 # This command is a nop that is only provided for the purposes of compatibility.
1233 # Notes: Do not use this command.
1235 { 'command': 'cpu', 'data': {'index': 'int'} }
1240 # Save a portion of guest memory to a file.
1242 # @val: the virtual address of the guest to start from
1244 # @size: the size of memory region to save
1246 # @filename: the file to save the memory to as binary data
1248 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1249 # virtual address (defaults to CPU 0)
1251 # Returns: Nothing on success
1255 # Notes: Errors were not reliably returned until 1.1
1257 { 'command': 'memsave',
1258 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1263 # Save a portion of guest physical memory to a file.
1265 # @val: the physical address of the guest to start from
1267 # @size: the size of memory region to save
1269 # @filename: the file to save the memory to as binary data
1271 # Returns: Nothing on success
1275 # Notes: Errors were not reliably returned until 1.1
1277 { 'command': 'pmemsave',
1278 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1283 # Resume guest VCPU execution.
1287 # Returns: If successful, nothing
1288 # If the QEMU is waiting for an incoming migration, MigrationExpected
1289 # If QEMU was started with an encrypted block device and a key has
1290 # not yet been set, DeviceEncrypted.
1292 # Notes: This command will succeed if the guest is currently running.
1294 { 'command': 'cont' }
1299 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1305 { 'command': 'system_wakeup' }
1310 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1312 # Returns: If successful, nothing
1316 # Notes: Only x86 Virtual Machines support this command.
1318 { 'command': 'inject-nmi' }
1323 # Sets the link status of a virtual network adapter.
1325 # @name: the device name of the virtual network adapter
1327 # @up: true to set the link status to be up
1329 # Returns: Nothing on success
1330 # If @name is not a valid network device, DeviceNotFound
1334 # Notes: Not all network adapters support setting link status. This command
1335 # will succeed even if the network adapter does not support link status
1338 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1343 # This command sets the password of a block device that has not been open
1344 # with a password and requires one.
1346 # The two cases where this can happen are a block device is created through
1347 # QEMU's initial command line or a block device is changed through the legacy
1348 # @change interface.
1350 # In the event that the block device is created through the initial command
1351 # line, the VM will start in the stopped state regardless of whether '-S' is
1352 # used. The intention is for a management tool to query the block devices to
1353 # determine which ones are encrypted, set the passwords with this command, and
1354 # then start the guest with the @cont command.
1356 # @device: the name of the device to set the password on
1358 # @password: the password to use for the device
1360 # Returns: nothing on success
1361 # If @device is not a valid block device, DeviceNotFound
1362 # If @device is not encrypted, DeviceNotEncrypted
1364 # Notes: Not all block formats support encryption and some that do are not
1365 # able to validate that a password is correct. Disk corruption may
1366 # occur if an invalid password is specified.
1370 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1375 # Request the balloon driver to change its balloon size.
1377 # @value: the target size of the balloon in bytes
1379 # Returns: Nothing on success
1380 # If the balloon driver is enabled but not functional because the KVM
1381 # kernel module cannot support it, KvmMissingCap
1382 # If no balloon device is present, DeviceNotActive
1384 # Notes: This command just issues a request to the guest. When it returns,
1385 # the balloon size may not have changed. A guest can change the balloon
1386 # size independent of this command.
1390 { 'command': 'balloon', 'data': {'value': 'int'} }
1395 # Resize a block image while a guest is running.
1397 # @device: the name of the device to get the image resized
1399 # @size: new image size in bytes
1401 # Returns: nothing on success
1402 # If @device is not a valid block device, DeviceNotFound
1406 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1411 # An enumeration that tells QEMU how to set the backing file path in
1414 # @existing: QEMU should look for an existing image file.
1416 # @absolute-paths: QEMU should create a new image with absolute paths
1417 # for the backing file.
1421 { 'enum': 'NewImageMode'
1422 'data': [ 'existing', 'absolute-paths' ] }
1427 # @device: the name of the device to generate the snapshot from.
1429 # @snapshot-file: the target of the new image. A new file will be created.
1431 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1433 # @mode: #optional whether and how QEMU should create a new image, default is
1436 { 'type': 'BlockdevSnapshot',
1437 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1438 '*mode': 'NewImageMode' } }
1443 # A discriminated record of operations that can be performed with
1446 { 'union': 'BlockdevAction',
1448 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1454 # Atomically operate on a group of one or more block devices. If
1455 # any operation fails, then the entire set of actions will be
1456 # abandoned and the appropriate error returned. The only operation
1457 # supported is currently blockdev-snapshot-sync.
1460 # @BlockdevAction: information needed for the device snapshot
1462 # Returns: nothing on success
1463 # If @device is not a valid block device, DeviceNotFound
1465 # Note: The transaction aborts on the first failure. Therefore, there will
1466 # be only one device or snapshot file returned in an error condition, and
1467 # subsequent actions will not have been attempted.
1471 { 'command': 'transaction',
1472 'data': { 'actions': [ 'BlockdevAction' ] } }
1475 # @blockdev-snapshot-sync
1477 # Generates a synchronous snapshot of a block device.
1479 # @device: the name of the device to generate the snapshot from.
1481 # @snapshot-file: the target of the new image. If the file exists, or if it
1482 # is a device, the snapshot will be created in the existing
1483 # file/device. If does not exist, a new file will be created.
1485 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1487 # @mode: #optional whether and how QEMU should create a new image, default is
1490 # Returns: nothing on success
1491 # If @device is not a valid block device, DeviceNotFound
1495 { 'command': 'blockdev-snapshot-sync',
1496 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1497 '*mode': 'NewImageMode'} }
1500 # @human-monitor-command:
1502 # Execute a command on the human monitor and return the output.
1504 # @command-line: the command to execute in the human monitor
1506 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1508 # Returns: the output of the command as a string
1512 # Notes: This command only exists as a stop-gap. It's use is highly
1513 # discouraged. The semantics of this command are not guaranteed.
1515 # Known limitations:
1517 # o This command is stateless, this means that commands that depend
1518 # on state information (such as getfd) might not work
1520 # o Commands that prompt the user for data (eg. 'cont' when the block
1521 # device is encrypted) don't currently work
1523 { 'command': 'human-monitor-command',
1524 'data': {'command-line': 'str', '*cpu-index': 'int'},
1530 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1531 # writes data between 'top' and 'base' into 'base'.
1533 # @device: the name of the device
1535 # @base: #optional The file name of the backing image to write data into.
1536 # If not specified, this is the deepest backing image
1538 # @top: The file name of the backing image within the image chain,
1539 # which contains the topmost data to be committed down.
1540 # Note, the active layer as 'top' is currently unsupported.
1542 # If top == base, that is an error.
1545 # @speed: #optional the maximum speed, in bytes per second
1547 # Returns: Nothing on success
1548 # If commit or stream is already active on this device, DeviceInUse
1549 # If @device does not exist, DeviceNotFound
1550 # If image commit is not supported by this device, NotSupported
1551 # If @base or @top is invalid, a generic error is returned
1552 # If @top is the active layer, or omitted, a generic error is returned
1553 # If @speed is invalid, InvalidParameter
1558 { 'command': 'block-commit',
1559 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1564 # Cancel the current executing migration process.
1566 # Returns: nothing on success
1568 # Notes: This command succeeds even if there is no migration process running.
1572 { 'command': 'migrate_cancel' }
1575 # @migrate_set_downtime
1577 # Set maximum tolerated downtime for migration.
1579 # @value: maximum downtime in seconds
1581 # Returns: nothing on success
1585 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1588 # @migrate_set_speed
1590 # Set maximum speed for migration.
1592 # @value: maximum speed in bytes.
1594 # Returns: nothing on success
1596 # Notes: A value lesser than zero will be automatically round up to zero.
1600 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1603 # @migrate-set-cache-size
1605 # Set XBZRLE cache size
1607 # @value: cache size in bytes
1609 # The size will be rounded down to the nearest power of 2.
1610 # The cache size can be modified before and during ongoing migration
1612 # Returns: nothing on success
1616 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1619 # @query-migrate-cache-size
1621 # query XBZRLE cache size
1623 # Returns: XBZRLE cache size in bytes
1627 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1630 # @ObjectPropertyInfo:
1632 # @name: the name of the property
1634 # @type: the type of the property. This will typically come in one of four
1637 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1638 # These types are mapped to the appropriate JSON type.
1640 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1641 # legacy qdev typename. These types are always treated as strings.
1643 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1644 # device type name. Child properties create the composition tree.
1646 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1647 # device type name. Link properties form the device model graph.
1651 { 'type': 'ObjectPropertyInfo',
1652 'data': { 'name': 'str', 'type': 'str' } }
1657 # This command will list any properties of a object given a path in the object
1660 # @path: the path within the object model. See @qom-get for a description of
1663 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1668 { 'command': 'qom-list',
1669 'data': { 'path': 'str' },
1670 'returns': [ 'ObjectPropertyInfo' ] }
1675 # This command will get a property from a object model path and return the
1678 # @path: The path within the object model. There are two forms of supported
1679 # paths--absolute and partial paths.
1681 # Absolute paths are derived from the root object and can follow child<>
1682 # or link<> properties. Since they can follow link<> properties, they
1683 # can be arbitrarily long. Absolute paths look like absolute filenames
1684 # and are prefixed with a leading slash.
1686 # Partial paths look like relative filenames. They do not begin
1687 # with a prefix. The matching rules for partial paths are subtle but
1688 # designed to make specifying objects easy. At each level of the
1689 # composition tree, the partial path is matched as an absolute path.
1690 # The first match is not returned. At least two matches are searched
1691 # for. A successful result is only returned if only one match is
1692 # found. If more than one match is found, a flag is return to
1693 # indicate that the match was ambiguous.
1695 # @property: The property name to read
1697 # Returns: The property value. The type depends on the property type. legacy<>
1698 # properties are returned as #str. child<> and link<> properties are
1699 # returns as #str pathnames. All integer property types (u8, u16, etc)
1700 # are returned as #int.
1704 { 'command': 'qom-get',
1705 'data': { 'path': 'str', 'property': 'str' },
1706 'returns': 'visitor',
1712 # This command will set a property from a object model path.
1714 # @path: see @qom-get for a description of this parameter
1716 # @property: the property name to set
1718 # @value: a value who's type is appropriate for the property type. See @qom-get
1719 # for a description of type mapping.
1723 { 'command': 'qom-set',
1724 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1730 # Sets the password of a remote display session.
1732 # @protocol: `vnc' to modify the VNC server password
1733 # `spice' to modify the Spice server password
1735 # @password: the new password
1737 # @connected: #optional how to handle existing clients when changing the
1738 # password. If nothing is specified, defaults to `keep'
1739 # `fail' to fail the command if clients are connected
1740 # `disconnect' to disconnect existing clients
1741 # `keep' to maintain existing clients
1743 # Returns: Nothing on success
1744 # If Spice is not enabled, DeviceNotFound
1748 { 'command': 'set_password',
1749 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1754 # Expire the password of a remote display server.
1756 # @protocol: the name of the remote display protocol `vnc' or `spice'
1758 # @time: when to expire the password.
1759 # `now' to expire the password immediately
1760 # `never' to cancel password expiration
1761 # `+INT' where INT is the number of seconds from now (integer)
1762 # `INT' where INT is the absolute time in seconds
1764 # Returns: Nothing on success
1765 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1769 # Notes: Time is relative to the server and currently there is no way to
1770 # coordinate server time with client time. It is not recommended to
1771 # use the absolute time version of the @time parameter unless you're
1772 # sure you are on the same machine as the QEMU instance.
1774 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1779 # Ejects a device from a removable drive.
1781 # @device: The name of the device
1783 # @force: @optional If true, eject regardless of whether the drive is locked.
1784 # If not specified, the default value is false.
1786 # Returns: Nothing on success
1787 # If @device is not a valid block device, DeviceNotFound
1789 # Notes: Ejecting a device will no media results in success
1793 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1796 # @change-vnc-password:
1798 # Change the VNC server password.
1800 # @target: the new password to use with VNC authentication
1804 # Notes: An empty password in this command will set the password to the empty
1805 # string. Existing clients are unaffected by executing this command.
1807 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1812 # This command is multiple commands multiplexed together.
1814 # @device: This is normally the name of a block device but it may also be 'vnc'.
1815 # when it's 'vnc', then sub command depends on @target
1817 # @target: If @device is a block device, then this is the new filename.
1818 # If @device is 'vnc', then if the value 'password' selects the vnc
1819 # change password command. Otherwise, this specifies a new server URI
1820 # address to listen to for VNC connections.
1822 # @arg: If @device is a block device, then this is an optional format to open
1824 # If @device is 'vnc' and @target is 'password', this is the new VNC
1825 # password to set. If this argument is an empty string, then no future
1826 # logins will be allowed.
1828 # Returns: Nothing on success.
1829 # If @device is not a valid block device, DeviceNotFound
1830 # If the new block device is encrypted, DeviceEncrypted. Note that
1831 # if this error is returned, the device has been opened successfully
1832 # and an additional call to @block_passwd is required to set the
1833 # device's password. The behavior of reads and writes to the block
1834 # device between when these calls are executed is undefined.
1836 # Notes: It is strongly recommended that this interface is not used especially
1837 # for changing block devices.
1841 { 'command': 'change',
1842 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1845 # @block_set_io_throttle:
1847 # Change I/O throttle limits for a block drive.
1849 # @device: The name of the device
1851 # @bps: total throughput limit in bytes per second
1853 # @bps_rd: read throughput limit in bytes per second
1855 # @bps_wr: write throughput limit in bytes per second
1857 # @iops: total I/O operations per second
1859 # @ops_rd: read I/O operations per second
1861 # @iops_wr: write I/O operations per second
1863 # Returns: Nothing on success
1864 # If @device is not a valid block device, DeviceNotFound
1868 { 'command': 'block_set_io_throttle',
1869 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1870 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1875 # Copy data from a backing file into a block device.
1877 # The block streaming operation is performed in the background until the entire
1878 # backing file has been copied. This command returns immediately once streaming
1879 # has started. The status of ongoing block streaming operations can be checked
1880 # with query-block-jobs. The operation can be stopped before it has completed
1881 # using the block-job-cancel command.
1883 # If a base file is specified then sectors are not copied from that base file and
1884 # its backing chain. When streaming completes the image file will have the base
1885 # file as its backing file. This can be used to stream a subset of the backing
1886 # file chain instead of flattening the entire image.
1888 # On successful completion the image file is updated to drop the backing file
1889 # and the BLOCK_JOB_COMPLETED event is emitted.
1891 # @device: the device name
1893 # @base: #optional the common backing file name
1895 # @speed: #optional the maximum speed, in bytes per second
1897 # @on-error: #optional the action to take on an error (default report).
1898 # 'stop' and 'enospc' can only be used if the block device
1899 # supports io-status (see BlockInfo). Since 1.3.
1901 # Returns: Nothing on success
1902 # If @device does not exist, DeviceNotFound
1906 { 'command': 'block-stream',
1907 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
1908 '*on-error': 'BlockdevOnError' } }
1911 # @block-job-set-speed:
1913 # Set maximum speed for a background block operation.
1915 # This command can only be issued when there is an active block job.
1917 # Throttling can be disabled by setting the speed to 0.
1919 # @device: the device name
1921 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1924 # Returns: Nothing on success
1925 # If no background operation is active on this device, DeviceNotActive
1929 { 'command': 'block-job-set-speed',
1930 'data': { 'device': 'str', 'speed': 'int' } }
1933 # @block-job-cancel:
1935 # Stop an active background block operation.
1937 # This command returns immediately after marking the active background block
1938 # operation for cancellation. It is an error to call this command if no
1939 # operation is in progress.
1941 # The operation will cancel as soon as possible and then emit the
1942 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1943 # enumerated using query-block-jobs.
1945 # For streaming, the image file retains its backing file unless the streaming
1946 # operation happens to complete just as it is being cancelled. A new streaming
1947 # operation can be started at a later time to finish copying all data from the
1950 # @device: the device name
1952 # @force: #optional whether to allow cancellation of a paused job (default
1953 # false). Since 1.3.
1955 # Returns: Nothing on success
1956 # If no background operation is active on this device, DeviceNotActive
1960 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
1965 # Pause an active background block operation.
1967 # This command returns immediately after marking the active background block
1968 # operation for pausing. It is an error to call this command if no
1969 # operation is in progress. Pausing an already paused job has no cumulative
1970 # effect; a single block-job-resume command will resume the job.
1972 # The operation will pause as soon as possible. No event is emitted when
1973 # the operation is actually paused. Cancelling a paused job automatically
1976 # @device: the device name
1978 # Returns: Nothing on success
1979 # If no background operation is active on this device, DeviceNotActive
1983 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
1986 # @block-job-resume:
1988 # Resume an active background block operation.
1990 # This command returns immediately after resuming a paused background block
1991 # operation. It is an error to call this command if no operation is in
1992 # progress. Resuming an already running job is not an error.
1994 # This command also clears the error status of the job.
1996 # @device: the device name
1998 # Returns: Nothing on success
1999 # If no background operation is active on this device, DeviceNotActive
2003 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2008 # This structure describes a search result from @qom-list-types
2010 # @name: the type name found in the search
2014 # Notes: This command is experimental and may change syntax in future releases.
2016 { 'type': 'ObjectTypeInfo',
2017 'data': { 'name': 'str' } }
2022 # This command will return a list of types given search parameters
2024 # @implements: if specified, only return types that implement this type name
2026 # @abstract: if true, include abstract types in the results
2028 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2032 { 'command': 'qom-list-types',
2033 'data': { '*implements': 'str', '*abstract': 'bool' },
2034 'returns': [ 'ObjectTypeInfo' ] }
2037 # @DevicePropertyInfo:
2039 # Information about device properties.
2041 # @name: the name of the property
2042 # @type: the typename of the property
2046 { 'type': 'DevicePropertyInfo',
2047 'data': { 'name': 'str', 'type': 'str' } }
2050 # @device-list-properties:
2052 # List properties associated with a device.
2054 # @typename: the type name of a device
2056 # Returns: a list of DevicePropertyInfo describing a devices properties
2060 { 'command': 'device-list-properties',
2061 'data': { 'typename': 'str'},
2062 'returns': [ 'DevicePropertyInfo' ] }
2067 # Migrates the current running guest to another Virtual Machine.
2069 # @uri: the Uniform Resource Identifier of the destination VM
2071 # @blk: #optional do block migration (full disk copy)
2073 # @inc: #optional incremental disk copy migration
2075 # @detach: this argument exists only for compatibility reasons and
2076 # is ignored by QEMU
2078 # Returns: nothing on success
2082 { 'command': 'migrate',
2083 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2085 # @xen-save-devices-state:
2087 # Save the state of all devices to file. The RAM and the block devices
2088 # of the VM are not saved by this command.
2090 # @filename: the file to save the state of the devices to as binary
2091 # data. See xen-save-devices-state.txt for a description of the binary
2094 # Returns: Nothing on success
2098 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2101 # @xen-set-global-dirty-log
2103 # Enable or disable the global dirty log mode.
2105 # @enable: true to enable, false to disable.
2111 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2116 # Remove a device from a guest
2118 # @id: the name of the device
2120 # Returns: Nothing on success
2121 # If @id is not a valid device, DeviceNotFound
2123 # Notes: When this command completes, the device may not be removed from the
2124 # guest. Hot removal is an operation that requires guest cooperation.
2125 # This command merely requests that the guest begin the hot removal
2130 { 'command': 'device_del', 'data': {'id': 'str'} }
2133 # @dump-guest-memory
2135 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2136 # very long depending on the amount of guest memory. This command is only
2137 # supported on i386 and x86_64.
2139 # @paging: if true, do paging to get guest's memory mapping. This allows
2140 # using gdb to process the core file.
2142 # IMPORTANT: this option can make QEMU allocate several gigabytes
2143 # of RAM. This can happen for a large guest, or a
2144 # malicious guest pretending to be large.
2146 # Also, paging=true has the following limitations:
2148 # 1. The guest may be in a catastrophic state or can have corrupted
2149 # memory, which cannot be trusted
2150 # 2. The guest can be in real-mode even if paging is enabled. For
2151 # example, the guest uses ACPI to sleep, and ACPI sleep state
2154 # @protocol: the filename or file descriptor of the vmcore. The supported
2157 # 1. file: the protocol starts with "file:", and the following
2158 # string is the file's path.
2159 # 2. fd: the protocol starts with "fd:", and the following string
2162 # @begin: #optional if specified, the starting physical address.
2164 # @length: #optional if specified, the memory size, in bytes. If you don't
2165 # want to dump all guest's memory, please specify the start @begin
2168 # Returns: nothing on success
2172 { 'command': 'dump-guest-memory',
2173 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2174 '*length': 'int' } }
2179 # Add a network backend.
2181 # @type: the type of network backend. Current valid values are 'user', 'tap',
2182 # 'vde', 'socket', 'dump' and 'bridge'
2184 # @id: the name of the new network backend
2186 # @props: #optional a list of properties to be passed to the backend in
2187 # the format 'name=value', like 'ifname=tap0,script=no'
2189 # Notes: The semantics of @props is not well defined. Future commands will be
2190 # introduced that provide stronger typing for backend creation.
2194 # Returns: Nothing on success
2195 # If @type is not a valid network backend, DeviceNotFound
2197 { 'command': 'netdev_add',
2198 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2204 # Remove a network backend.
2206 # @id: the name of the network backend to remove
2208 # Returns: Nothing on success
2209 # If @id is not a valid network backend, DeviceNotFound
2213 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2216 # @NetdevNoneOptions
2218 # Use it alone to have zero network devices.
2222 { 'type': 'NetdevNoneOptions',
2226 # @NetLegacyNicOptions
2228 # Create a new Network Interface Card.
2230 # @netdev: #optional id of -netdev to connect to
2232 # @macaddr: #optional MAC address
2234 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2236 # @addr: #optional PCI device address
2238 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2242 { 'type': 'NetLegacyNicOptions',
2248 '*vectors': 'uint32' } }
2253 # A fat type wrapping 'str', to be embedded in lists.
2262 # @NetdevUserOptions
2264 # Use the user mode network stack which requires no administrator privilege to
2267 # @hostname: #optional client hostname reported by the builtin DHCP server
2269 # @restrict: #optional isolate the guest from the host
2271 # @ip: #optional legacy parameter, use net= instead
2273 # @net: #optional IP address and optional netmask
2275 # @host: #optional guest-visible address of the host
2277 # @tftp: #optional root directory of the built-in TFTP server
2279 # @bootfile: #optional BOOTP filename, for use with tftp=
2281 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2284 # @dns: #optional guest-visible address of the virtual nameserver
2286 # @smb: #optional root directory of the built-in SMB server
2288 # @smbserver: #optional IP address of the built-in SMB server
2290 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2293 # @guestfwd: #optional forward guest TCP connections
2297 { 'type': 'NetdevUserOptions',
2300 '*restrict': 'bool',
2306 '*dhcpstart': 'str',
2309 '*smbserver': 'str',
2310 '*hostfwd': ['String'],
2311 '*guestfwd': ['String'] } }
2316 # Connect the host TAP network interface name to the VLAN.
2318 # @ifname: #optional interface name
2320 # @fd: #optional file descriptor of an already opened tap
2322 # @script: #optional script to initialize the interface
2324 # @downscript: #optional script to shut down the interface
2326 # @helper: #optional command to execute to configure bridge
2328 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2330 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2332 # @vhost: #optional enable vhost-net network accelerator
2334 # @vhostfd: #optional file descriptor of an already opened vhost net device
2336 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2340 { 'type': 'NetdevTapOptions',
2345 '*downscript': 'str',
2348 '*vnet_hdr': 'bool',
2351 '*vhostforce': 'bool' } }
2354 # @NetdevSocketOptions
2356 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2357 # socket connection.
2359 # @fd: #optional file descriptor of an already opened socket
2361 # @listen: #optional port number, and optional hostname, to listen on
2363 # @connect: #optional port number, and optional hostname, to connect to
2365 # @mcast: #optional UDP multicast address and port number
2367 # @localaddr: #optional source address and port for multicast and udp packets
2369 # @udp: #optional UDP unicast address and port number
2373 { 'type': 'NetdevSocketOptions',
2379 '*localaddr': 'str',
2385 # Connect the VLAN to a vde switch running on the host.
2387 # @sock: #optional socket path
2389 # @port: #optional port number
2391 # @group: #optional group owner of socket
2393 # @mode: #optional permissions for socket
2397 { 'type': 'NetdevVdeOptions',
2402 '*mode': 'uint16' } }
2405 # @NetdevDumpOptions
2407 # Dump VLAN network traffic to a file.
2409 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2412 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2416 { 'type': 'NetdevDumpOptions',
2422 # @NetdevBridgeOptions
2424 # Connect a host TAP network interface to a host bridge device.
2426 # @br: #optional bridge name
2428 # @helper: #optional command to execute to configure bridge
2432 { 'type': 'NetdevBridgeOptions',
2435 '*helper': 'str' } }
2438 # @NetdevHubPortOptions
2440 # Connect two or more net clients through a software hub.
2442 # @hubid: hub identifier number
2446 { 'type': 'NetdevHubPortOptions',
2448 'hubid': 'int32' } }
2453 # A discriminated record of network device traits.
2457 { 'union': 'NetClientOptions',
2459 'none': 'NetdevNoneOptions',
2460 'nic': 'NetLegacyNicOptions',
2461 'user': 'NetdevUserOptions',
2462 'tap': 'NetdevTapOptions',
2463 'socket': 'NetdevSocketOptions',
2464 'vde': 'NetdevVdeOptions',
2465 'dump': 'NetdevDumpOptions',
2466 'bridge': 'NetdevBridgeOptions',
2467 'hubport': 'NetdevHubPortOptions' } }
2472 # Captures the configuration of a network device; legacy.
2474 # @vlan: #optional vlan number
2476 # @id: #optional identifier for monitor commands
2478 # @name: #optional identifier for monitor commands, ignored if @id is present
2480 # @opts: device type specific properties (legacy)
2484 { 'type': 'NetLegacy',
2489 'opts': 'NetClientOptions' } }
2494 # Captures the configuration of a network device.
2496 # @id: identifier for monitor commands.
2498 # @opts: device type specific properties
2505 'opts': 'NetClientOptions' } }
2510 # Receive a file descriptor via SCM rights and assign it a name
2512 # @fdname: file descriptor name
2514 # Returns: Nothing on success
2518 # Notes: If @fdname already exists, the file descriptor assigned to
2519 # it will be closed and replaced by the received file
2521 # The 'closefd' command can be used to explicitly close the
2522 # file descriptor when it is no longer needed.
2524 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2529 # Close a file descriptor previously passed via SCM rights
2531 # @fdname: file descriptor name
2533 # Returns: Nothing on success
2537 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2542 # Information describing a machine.
2544 # @name: the name of the machine
2546 # @alias: #optional an alias for the machine name
2548 # @default: #optional whether the machine is default
2552 { 'type': 'MachineInfo',
2553 'data': { 'name': 'str', '*alias': 'str',
2554 '*is-default': 'bool' } }
2559 # Return a list of supported machines
2561 # Returns: a list of MachineInfo
2565 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2568 # @CpuDefinitionInfo:
2570 # Virtual CPU definition.
2572 # @name: the name of the CPU definition
2576 { 'type': 'CpuDefinitionInfo',
2577 'data': { 'name': 'str' } }
2580 # @query-cpu-definitions:
2582 # Return a list of supported virtual CPU definitions
2584 # Returns: a list of CpuDefInfo
2588 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2592 # Information about a file descriptor that was added to an fd set.
2594 # @fdset-id: The ID of the fd set that @fd was added to.
2596 # @fd: The file descriptor that was received via SCM rights and
2597 # added to the fd set.
2601 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2606 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2608 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2610 # @opaque: #optional A free-form string that can be used to describe the fd.
2612 # Returns: @AddfdInfo on success
2613 # If file descriptor was not received, FdNotSupplied
2614 # If @fdset-id does not exist, InvalidParameterValue
2616 # Notes: The list of fd sets is shared by all monitor connections.
2618 # If @fdset-id is not specified, a new fd set will be created.
2622 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2623 'returns': 'AddfdInfo' }
2628 # Remove a file descriptor from an fd set.
2630 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2632 # @fd: #optional The file descriptor that is to be removed.
2634 # Returns: Nothing on success
2635 # If @fdset-id or @fd is not found, FdNotFound
2639 # Notes: The list of fd sets is shared by all monitor connections.
2641 # If @fd is not specified, all file descriptors in @fdset-id
2644 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2649 # Information about a file descriptor that belongs to an fd set.
2651 # @fd: The file descriptor value.
2653 # @opaque: #optional A free-form string that can be used to describe the fd.
2657 { 'type': 'FdsetFdInfo',
2658 'data': {'fd': 'int', '*opaque': 'str'} }
2663 # Information about an fd set.
2665 # @fdset-id: The ID of the fd set.
2667 # @fds: A list of file descriptors that belong to this fd set.
2671 { 'type': 'FdsetInfo',
2672 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2677 # Return information describing all fd sets.
2679 # Returns: A list of @FdsetInfo
2683 # Note: The list of fd sets is shared by all monitor connections.
2686 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2691 # Target CPU emulation type
2693 # These parameters correspond to the softmmu binary CPU name that is currently
2698 { 'enum': 'TargetType',
2699 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2700 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2701 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2702 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2707 # Information describing the QEMU target.
2709 # @arch: the target architecture (eg "x86_64", "i386", etc)
2713 { 'type': 'TargetInfo',
2714 'data': { 'arch': 'TargetType' } }
2719 # Return information about the target for this QEMU
2721 # Returns: TargetInfo
2725 { 'command': 'query-target', 'returns': 'TargetInfo' }
2730 # An enumeration of key name.
2732 # This is used by the send-key command.
2736 { 'enum': 'QKeyCode',
2737 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2738 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2739 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2740 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2741 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2742 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2743 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2744 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2745 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2746 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2747 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2748 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2749 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2750 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2751 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2756 # Represents a keyboard key.
2760 { 'union': 'KeyValue',
2763 'qcode': 'QKeyCode' } }
2768 # Send keys to guest.
2770 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2771 # simultaneously sent to the guest. A @KeyValue.number value is sent
2772 # directly to the guest, while @KeyValue.qcode must be a valid
2775 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2778 # Returns: Nothing on success
2779 # If key is unknown or redundant, InvalidParameter
2784 { 'command': 'send-key',
2785 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2790 # Write a PPM of the VGA screen to a file.
2792 # @filename: the path of a new PPM file to store the image
2794 # Returns: Nothing on success
2798 { 'command': 'screendump', 'data': {'filename': 'str'} }