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
441 # @downtime: #optional only present when migration finishes correctly
442 # total downtime in milliseconds for the guest.
447 { 'type': 'MigrationInfo',
448 'data': {'*status': 'str', '*ram': 'MigrationStats',
449 '*disk': 'MigrationStats',
450 '*xbzrle-cache': 'XBZRLECacheStats',
451 '*total-time': 'int',
452 '*downtime': 'int'} }
457 # Returns information about current migration process.
459 # Returns: @MigrationInfo
463 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
466 # @MigrationCapability
468 # Migration capabilities enumeration
470 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
471 # This feature allows us to minimize migration traffic for certain work
472 # loads, by sending compressed difference of the pages
476 { 'enum': 'MigrationCapability',
480 # @MigrationCapabilityStatus
482 # Migration capability information
484 # @capability: capability enum
486 # @state: capability state bool
490 { 'type': 'MigrationCapabilityStatus',
491 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
494 # @migrate-set-capabilities
496 # Enable/Disable the following migration capabilities (like xbzrle)
498 # @capabilities: json array of capability modifications to make
502 { 'command': 'migrate-set-capabilities',
503 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
506 # @query-migrate-capabilities
508 # Returns information about the current migration capabilities status
510 # Returns: @MigrationCapabilitiesStatus
514 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
519 # Information about a mouse device.
521 # @name: the name of the mouse device
523 # @index: the index of the mouse device
525 # @current: true if this device is currently receiving mouse events
527 # @absolute: true if this device supports absolute coordinates as input
531 { 'type': 'MouseInfo',
532 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
533 'absolute': 'bool'} }
538 # Returns information about each active mouse device
540 # Returns: a list of @MouseInfo for each device
544 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
549 # Information about a virtual CPU
551 # @CPU: the index of the virtual CPU
553 # @current: this only exists for backwards compatible and should be ignored
555 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
556 # to a processor specific low power mode.
558 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
560 # If the target is Sparc, this is the PC component of the
561 # instruction pointer.
563 # @nip: #optional If the target is PPC, the instruction pointer
565 # @npc: #optional If the target is Sparc, the NPC component of the instruction
568 # @PC: #optional If the target is MIPS, the instruction pointer
570 # @thread_id: ID of the underlying host thread
574 # Notes: @halted is a transient state that changes frequently. By the time the
575 # data is sent to the client, the guest may no longer be halted.
578 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
579 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
584 # Returns a list of information about each virtual CPU.
586 # Returns: a list of @CpuInfo for each virtual CPU
590 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
595 # Information about the backing device for a block device.
597 # @file: the filename of the backing device
599 # @ro: true if the backing device was open read-only
601 # @drv: the name of the block format used to open the backing device. As of
602 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
603 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
604 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
605 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
607 # @backing_file: #optional the name of the backing file (for copy-on-write)
609 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
611 # @encrypted: true if the backing device is encrypted
613 # @encryption_key_missing: true if the backing device is encrypted but an
614 # valid encryption key is missing
616 # @bps: total throughput limit in bytes per second is specified
618 # @bps_rd: read throughput limit in bytes per second is specified
620 # @bps_wr: write throughput limit in bytes per second is specified
622 # @iops: total I/O operations per second is specified
624 # @iops_rd: read I/O operations per second is specified
626 # @iops_wr: write I/O operations per second is specified
630 # Notes: This interface is only found in @BlockInfo.
632 { 'type': 'BlockDeviceInfo',
633 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
634 '*backing_file': 'str', 'backing_file_depth': 'int',
635 'encrypted': 'bool', 'encryption_key_missing': 'bool',
636 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
637 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
640 # @BlockDeviceIoStatus:
642 # An enumeration of block device I/O status.
644 # @ok: The last I/O operation has succeeded
646 # @failed: The last I/O operation has failed
648 # @nospace: The last I/O operation has failed due to a no-space condition
652 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
657 # Block device information. This structure describes a virtual device and
658 # the backing device associated with it.
660 # @device: The device name associated with the virtual device.
662 # @type: This field is returned only for compatibility reasons, it should
663 # not be used (always returns 'unknown')
665 # @removable: True if the device supports removable media.
667 # @locked: True if the guest has locked this device from having its media
670 # @tray_open: #optional True if the device has a tray and it is open
671 # (only present if removable is true)
673 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
674 # supports it and the VM is configured to stop on errors
676 # @inserted: #optional @BlockDeviceInfo describing the device if media is
681 { 'type': 'BlockInfo',
682 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
683 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
684 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
689 # Get a list of BlockInfo for all virtual block devices.
691 # Returns: a list of @BlockInfo describing each virtual block device
695 { 'command': 'query-block', 'returns': ['BlockInfo'] }
700 # Statistics of a virtual block device or a block backing device.
702 # @rd_bytes: The number of bytes read by the device.
704 # @wr_bytes: The number of bytes written by the device.
706 # @rd_operations: The number of read operations performed by the device.
708 # @wr_operations: The number of write operations performed by the device.
710 # @flush_operations: The number of cache flush operations performed by the
711 # device (since 0.15.0)
713 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
716 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
718 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
720 # @wr_highest_offset: The offset after the greatest byte written to the
721 # device. The intended use of this information is for
722 # growable sparse files (like qcow2) that are used on top
723 # of a physical device.
727 { 'type': 'BlockDeviceStats',
728 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
729 'wr_operations': 'int', 'flush_operations': 'int',
730 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
731 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
736 # Statistics of a virtual block device or a block backing device.
738 # @device: #optional If the stats are for a virtual block device, the name
739 # corresponding to the virtual block device.
741 # @stats: A @BlockDeviceStats for the device.
743 # @parent: #optional This may point to the backing block device if this is a
744 # a virtual block device. If it's a backing block, this will point
745 # to the backing file is one is present.
749 { 'type': 'BlockStats',
750 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
751 '*parent': 'BlockStats'} }
756 # Query the @BlockStats for all virtual block devices.
758 # Returns: A list of @BlockStats for each virtual block devices.
762 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
767 # Information about a connected VNC client.
769 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
772 # @family: 'ipv6' if the client is connected via IPv6 and TCP
773 # 'ipv4' if the client is connected via IPv4 and TCP
774 # 'unix' if the client is connected via a unix domain socket
775 # 'unknown' otherwise
777 # @service: The service name of the client's port. This may depends on the
778 # host system's service database so symbolic names should not be
781 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
782 # Name of the client.
784 # @sasl_username: #optional If SASL authentication is in use, the SASL username
785 # used for authentication.
789 { 'type': 'VncClientInfo',
790 'data': {'host': 'str', 'family': 'str', 'service': 'str',
791 '*x509_dname': 'str', '*sasl_username': 'str'} }
796 # Information about the VNC session.
798 # @enabled: true if the VNC server is enabled, false otherwise
800 # @host: #optional The hostname the VNC server is bound to. This depends on
801 # the name resolution on the host and may be an IP address.
803 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
804 # 'ipv4' if the host is listening for IPv4 connections
805 # 'unix' if the host is listening on a unix domain socket
806 # 'unknown' otherwise
808 # @service: #optional The service name of the server's port. This may depends
809 # on the host system's service database so symbolic names should not
812 # @auth: #optional the current authentication type used by the server
813 # 'none' if no authentication is being used
814 # 'vnc' if VNC authentication is being used
815 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
816 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
817 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
818 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
819 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
820 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
821 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
822 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
823 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
825 # @clients: a list of @VncClientInfo of all currently connected clients
830 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
831 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
836 # Returns information about the current VNC server
842 { 'command': 'query-vnc', 'returns': 'VncInfo' }
847 # Information about a SPICE client channel.
849 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
852 # @family: 'ipv6' if the client is connected via IPv6 and TCP
853 # 'ipv4' if the client is connected via IPv4 and TCP
854 # 'unix' if the client is connected via a unix domain socket
855 # 'unknown' otherwise
857 # @port: The client's port number.
859 # @connection-id: SPICE connection id number. All channels with the same id
860 # belong to the same SPICE session.
862 # @connection-type: SPICE channel type number. "1" is the main control
863 # channel, filter for this one if you want to track spice
866 # @channel-id: SPICE channel ID number. Usually "0", might be different when
867 # multiple channels of the same type exist, such as multiple
868 # display channels in a multihead setup
870 # @tls: true if the channel is encrypted, false otherwise.
874 { 'type': 'SpiceChannel',
875 'data': {'host': 'str', 'family': 'str', 'port': 'str',
876 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
880 # @SpiceQueryMouseMode
882 # An enumeration of Spice mouse states.
884 # @client: Mouse cursor position is determined by the client.
886 # @server: Mouse cursor position is determined by the server.
888 # @unknown: No information is available about mouse mode used by
891 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
895 { 'enum': 'SpiceQueryMouseMode',
896 'data': [ 'client', 'server', 'unknown' ] }
901 # Information about the SPICE session.
903 # @enabled: true if the SPICE server is enabled, false otherwise
905 # @migrated: true if the last guest migration completed and spice
906 # migration had completed as well. false otherwise.
908 # @host: #optional The hostname the SPICE server is bound to. This depends on
909 # the name resolution on the host and may be an IP address.
911 # @port: #optional The SPICE server's port number.
913 # @compiled-version: #optional SPICE server version.
915 # @tls-port: #optional The SPICE server's TLS port number.
917 # @auth: #optional the current authentication type used by the server
918 # 'none' if no authentication is being used
919 # 'spice' uses SASL or direct TLS authentication, depending on command
922 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
923 # be determined by the client or the server, or unknown if spice
924 # server doesn't provide this information.
928 # @channels: a list of @SpiceChannel for each active spice channel
932 { 'type': 'SpiceInfo',
933 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
934 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
935 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
940 # Returns information about the current SPICE server
942 # Returns: @SpiceInfo
946 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
951 # Information about the guest balloon device.
953 # @actual: the number of bytes the balloon currently contains
955 # @mem_swapped_in: #optional number of pages swapped in within the guest
957 # @mem_swapped_out: #optional number of pages swapped out within the guest
959 # @major_page_faults: #optional number of major page faults within the guest
961 # @minor_page_faults: #optional number of minor page faults within the guest
963 # @free_mem: #optional amount of memory (in bytes) free in the guest
965 # @total_mem: #optional amount of memory (in bytes) visible to the guest
969 # Notes: all current versions of QEMU do not fill out optional information in
972 { 'type': 'BalloonInfo',
973 'data': {'actual': 'int', '*mem_swapped_in': 'int',
974 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
975 '*minor_page_faults': 'int', '*free_mem': 'int',
976 '*total_mem': 'int'} }
981 # Return information about the balloon device.
983 # Returns: @BalloonInfo on success
984 # If the balloon driver is enabled but not functional because the KVM
985 # kernel module cannot support it, KvmMissingCap
986 # If no balloon device is present, DeviceNotActive
990 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
995 # A PCI device memory region
997 # @base: the starting address (guest physical)
999 # @limit: the ending address (guest physical)
1003 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1008 # Information about a PCI device I/O region.
1010 # @bar: the index of the Base Address Register for this region
1012 # @type: 'io' if the region is a PIO region
1013 # 'memory' if the region is a MMIO region
1015 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1017 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1021 { 'type': 'PciMemoryRegion',
1022 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1023 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1028 # Information about a PCI Bridge device
1030 # @bus.number: primary bus interface number. This should be the number of the
1031 # bus the device resides on.
1033 # @bus.secondary: secondary bus interface number. This is the number of the
1034 # main bus for the bridge
1036 # @bus.subordinate: This is the highest number bus that resides below the
1039 # @bus.io_range: The PIO range for all devices on this bridge
1041 # @bus.memory_range: The MMIO range for all devices on this bridge
1043 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1046 # @devices: a list of @PciDeviceInfo for each device on this bridge
1050 { 'type': 'PciBridgeInfo',
1051 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1052 'io_range': 'PciMemoryRange',
1053 'memory_range': 'PciMemoryRange',
1054 'prefetchable_range': 'PciMemoryRange' },
1055 '*devices': ['PciDeviceInfo']} }
1060 # Information about a PCI device
1062 # @bus: the bus number of the device
1064 # @slot: the slot the device is located in
1066 # @function: the function of the slot used by the device
1068 # @class_info.desc: #optional a string description of the device's class
1070 # @class_info.class: the class code of the device
1072 # @id.device: the PCI device id
1074 # @id.vendor: the PCI vendor id
1076 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1078 # @qdev_id: the device name of the PCI device
1080 # @pci_bridge: if the device is a PCI bridge, the bridge information
1082 # @regions: a list of the PCI I/O regions associated with the device
1084 # Notes: the contents of @class_info.desc are not stable and should only be
1085 # treated as informational.
1089 { 'type': 'PciDeviceInfo',
1090 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1091 'class_info': {'*desc': 'str', 'class': 'int'},
1092 'id': {'device': 'int', 'vendor': 'int'},
1093 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1094 'regions': ['PciMemoryRegion']} }
1099 # Information about a PCI bus
1101 # @bus: the bus index
1103 # @devices: a list of devices on this bus
1107 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1112 # Return information about the PCI bus topology of the guest.
1114 # Returns: a list of @PciInfo for each PCI bus
1118 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1123 # An enumeration of possible behaviors for errors on I/O operations.
1124 # The exact meaning depends on whether the I/O was initiated by a guest
1127 # @report: for guest operations, report the error to the guest;
1128 # for jobs, cancel the job
1130 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1131 # or BLOCK_JOB_ERROR)
1133 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1135 # @stop: for guest operations, stop the virtual machine;
1136 # for jobs, pause the job
1140 { 'enum': 'BlockdevOnError',
1141 'data': ['report', 'ignore', 'enospc', 'stop'] }
1146 # Information about a long-running block device operation.
1148 # @type: the job type ('stream' for image streaming)
1150 # @device: the block device name
1152 # @len: the maximum progress value
1154 # @busy: false if the job is known to be in a quiescent state, with
1155 # no pending I/O. Since 1.3.
1157 # @paused: whether the job is paused or, if @busy is true, will
1158 # pause itself as soon as possible. Since 1.3.
1160 # @offset: the current progress value
1162 # @speed: the rate limit, bytes per second
1164 # @io-status: the status of the job (since 1.3)
1168 { 'type': 'BlockJobInfo',
1169 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1170 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1171 'io-status': 'BlockDeviceIoStatus'} }
1174 # @query-block-jobs:
1176 # Return information about long-running block device operations.
1178 # Returns: a list of @BlockJobInfo for each active block job
1182 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1187 # This command will cause the QEMU process to exit gracefully. While every
1188 # attempt is made to send the QMP response before terminating, this is not
1189 # guaranteed. When using this interface, a premature EOF would not be
1194 { 'command': 'quit' }
1199 # Stop all guest VCPU execution.
1203 # Notes: This function will succeed even if the guest is already in the stopped
1206 { 'command': 'stop' }
1211 # Performs a hard reset of a guest.
1215 { 'command': 'system_reset' }
1218 # @system_powerdown:
1220 # Requests that a guest perform a powerdown operation.
1224 # Notes: A guest may or may not respond to this command. This command
1225 # returning does not indicate that a guest has accepted the request or
1226 # that it has shut down. Many guests will respond to this command by
1227 # prompting the user in some way.
1229 { 'command': 'system_powerdown' }
1234 # This command is a nop that is only provided for the purposes of compatibility.
1238 # Notes: Do not use this command.
1240 { 'command': 'cpu', 'data': {'index': 'int'} }
1245 # Save a portion of guest memory to a file.
1247 # @val: the virtual address of the guest to start from
1249 # @size: the size of memory region to save
1251 # @filename: the file to save the memory to as binary data
1253 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1254 # virtual address (defaults to CPU 0)
1256 # Returns: Nothing on success
1260 # Notes: Errors were not reliably returned until 1.1
1262 { 'command': 'memsave',
1263 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1268 # Save a portion of guest physical memory to a file.
1270 # @val: the physical address of the guest to start from
1272 # @size: the size of memory region to save
1274 # @filename: the file to save the memory to as binary data
1276 # Returns: Nothing on success
1280 # Notes: Errors were not reliably returned until 1.1
1282 { 'command': 'pmemsave',
1283 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1288 # Resume guest VCPU execution.
1292 # Returns: If successful, nothing
1293 # If the QEMU is waiting for an incoming migration, MigrationExpected
1294 # If QEMU was started with an encrypted block device and a key has
1295 # not yet been set, DeviceEncrypted.
1297 # Notes: This command will succeed if the guest is currently running.
1299 { 'command': 'cont' }
1304 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1310 { 'command': 'system_wakeup' }
1315 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1317 # Returns: If successful, nothing
1321 # Notes: Only x86 Virtual Machines support this command.
1323 { 'command': 'inject-nmi' }
1328 # Sets the link status of a virtual network adapter.
1330 # @name: the device name of the virtual network adapter
1332 # @up: true to set the link status to be up
1334 # Returns: Nothing on success
1335 # If @name is not a valid network device, DeviceNotFound
1339 # Notes: Not all network adapters support setting link status. This command
1340 # will succeed even if the network adapter does not support link status
1343 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1348 # This command sets the password of a block device that has not been open
1349 # with a password and requires one.
1351 # The two cases where this can happen are a block device is created through
1352 # QEMU's initial command line or a block device is changed through the legacy
1353 # @change interface.
1355 # In the event that the block device is created through the initial command
1356 # line, the VM will start in the stopped state regardless of whether '-S' is
1357 # used. The intention is for a management tool to query the block devices to
1358 # determine which ones are encrypted, set the passwords with this command, and
1359 # then start the guest with the @cont command.
1361 # @device: the name of the device to set the password on
1363 # @password: the password to use for the device
1365 # Returns: nothing on success
1366 # If @device is not a valid block device, DeviceNotFound
1367 # If @device is not encrypted, DeviceNotEncrypted
1369 # Notes: Not all block formats support encryption and some that do are not
1370 # able to validate that a password is correct. Disk corruption may
1371 # occur if an invalid password is specified.
1375 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1380 # Request the balloon driver to change its balloon size.
1382 # @value: the target size of the balloon in bytes
1384 # Returns: Nothing on success
1385 # If the balloon driver is enabled but not functional because the KVM
1386 # kernel module cannot support it, KvmMissingCap
1387 # If no balloon device is present, DeviceNotActive
1389 # Notes: This command just issues a request to the guest. When it returns,
1390 # the balloon size may not have changed. A guest can change the balloon
1391 # size independent of this command.
1395 { 'command': 'balloon', 'data': {'value': 'int'} }
1400 # Resize a block image while a guest is running.
1402 # @device: the name of the device to get the image resized
1404 # @size: new image size in bytes
1406 # Returns: nothing on success
1407 # If @device is not a valid block device, DeviceNotFound
1411 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1416 # An enumeration that tells QEMU how to set the backing file path in
1419 # @existing: QEMU should look for an existing image file.
1421 # @absolute-paths: QEMU should create a new image with absolute paths
1422 # for the backing file.
1426 { 'enum': 'NewImageMode'
1427 'data': [ 'existing', 'absolute-paths' ] }
1432 # @device: the name of the device to generate the snapshot from.
1434 # @snapshot-file: the target of the new image. A new file will be created.
1436 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1438 # @mode: #optional whether and how QEMU should create a new image, default is
1441 { 'type': 'BlockdevSnapshot',
1442 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1443 '*mode': 'NewImageMode' } }
1448 # A discriminated record of operations that can be performed with
1451 { 'union': 'BlockdevAction',
1453 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1459 # Atomically operate on a group of one or more block devices. If
1460 # any operation fails, then the entire set of actions will be
1461 # abandoned and the appropriate error returned. The only operation
1462 # supported is currently blockdev-snapshot-sync.
1465 # @BlockdevAction: information needed for the device snapshot
1467 # Returns: nothing on success
1468 # If @device is not a valid block device, DeviceNotFound
1470 # Note: The transaction aborts on the first failure. Therefore, there will
1471 # be only one device or snapshot file returned in an error condition, and
1472 # subsequent actions will not have been attempted.
1476 { 'command': 'transaction',
1477 'data': { 'actions': [ 'BlockdevAction' ] } }
1480 # @blockdev-snapshot-sync
1482 # Generates a synchronous snapshot of a block device.
1484 # @device: the name of the device to generate the snapshot from.
1486 # @snapshot-file: the target of the new image. If the file exists, or if it
1487 # is a device, the snapshot will be created in the existing
1488 # file/device. If does not exist, a new file will be created.
1490 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1492 # @mode: #optional whether and how QEMU should create a new image, default is
1495 # Returns: nothing on success
1496 # If @device is not a valid block device, DeviceNotFound
1500 { 'command': 'blockdev-snapshot-sync',
1501 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1502 '*mode': 'NewImageMode'} }
1505 # @human-monitor-command:
1507 # Execute a command on the human monitor and return the output.
1509 # @command-line: the command to execute in the human monitor
1511 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1513 # Returns: the output of the command as a string
1517 # Notes: This command only exists as a stop-gap. It's use is highly
1518 # discouraged. The semantics of this command are not guaranteed.
1520 # Known limitations:
1522 # o This command is stateless, this means that commands that depend
1523 # on state information (such as getfd) might not work
1525 # o Commands that prompt the user for data (eg. 'cont' when the block
1526 # device is encrypted) don't currently work
1528 { 'command': 'human-monitor-command',
1529 'data': {'command-line': 'str', '*cpu-index': 'int'},
1535 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1536 # writes data between 'top' and 'base' into 'base'.
1538 # @device: the name of the device
1540 # @base: #optional The file name of the backing image to write data into.
1541 # If not specified, this is the deepest backing image
1543 # @top: The file name of the backing image within the image chain,
1544 # which contains the topmost data to be committed down.
1545 # Note, the active layer as 'top' is currently unsupported.
1547 # If top == base, that is an error.
1550 # @speed: #optional the maximum speed, in bytes per second
1552 # Returns: Nothing on success
1553 # If commit or stream is already active on this device, DeviceInUse
1554 # If @device does not exist, DeviceNotFound
1555 # If image commit is not supported by this device, NotSupported
1556 # If @base or @top is invalid, a generic error is returned
1557 # If @top is the active layer, or omitted, a generic error is returned
1558 # If @speed is invalid, InvalidParameter
1563 { 'command': 'block-commit',
1564 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1569 # Cancel the current executing migration process.
1571 # Returns: nothing on success
1573 # Notes: This command succeeds even if there is no migration process running.
1577 { 'command': 'migrate_cancel' }
1580 # @migrate_set_downtime
1582 # Set maximum tolerated downtime for migration.
1584 # @value: maximum downtime in seconds
1586 # Returns: nothing on success
1590 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1593 # @migrate_set_speed
1595 # Set maximum speed for migration.
1597 # @value: maximum speed in bytes.
1599 # Returns: nothing on success
1601 # Notes: A value lesser than zero will be automatically round up to zero.
1605 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1608 # @migrate-set-cache-size
1610 # Set XBZRLE cache size
1612 # @value: cache size in bytes
1614 # The size will be rounded down to the nearest power of 2.
1615 # The cache size can be modified before and during ongoing migration
1617 # Returns: nothing on success
1621 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1624 # @query-migrate-cache-size
1626 # query XBZRLE cache size
1628 # Returns: XBZRLE cache size in bytes
1632 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1635 # @ObjectPropertyInfo:
1637 # @name: the name of the property
1639 # @type: the type of the property. This will typically come in one of four
1642 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1643 # These types are mapped to the appropriate JSON type.
1645 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1646 # legacy qdev typename. These types are always treated as strings.
1648 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1649 # device type name. Child properties create the composition tree.
1651 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1652 # device type name. Link properties form the device model graph.
1656 { 'type': 'ObjectPropertyInfo',
1657 'data': { 'name': 'str', 'type': 'str' } }
1662 # This command will list any properties of a object given a path in the object
1665 # @path: the path within the object model. See @qom-get for a description of
1668 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1673 { 'command': 'qom-list',
1674 'data': { 'path': 'str' },
1675 'returns': [ 'ObjectPropertyInfo' ] }
1680 # This command will get a property from a object model path and return the
1683 # @path: The path within the object model. There are two forms of supported
1684 # paths--absolute and partial paths.
1686 # Absolute paths are derived from the root object and can follow child<>
1687 # or link<> properties. Since they can follow link<> properties, they
1688 # can be arbitrarily long. Absolute paths look like absolute filenames
1689 # and are prefixed with a leading slash.
1691 # Partial paths look like relative filenames. They do not begin
1692 # with a prefix. The matching rules for partial paths are subtle but
1693 # designed to make specifying objects easy. At each level of the
1694 # composition tree, the partial path is matched as an absolute path.
1695 # The first match is not returned. At least two matches are searched
1696 # for. A successful result is only returned if only one match is
1697 # found. If more than one match is found, a flag is return to
1698 # indicate that the match was ambiguous.
1700 # @property: The property name to read
1702 # Returns: The property value. The type depends on the property type. legacy<>
1703 # properties are returned as #str. child<> and link<> properties are
1704 # returns as #str pathnames. All integer property types (u8, u16, etc)
1705 # are returned as #int.
1709 { 'command': 'qom-get',
1710 'data': { 'path': 'str', 'property': 'str' },
1711 'returns': 'visitor',
1717 # This command will set a property from a object model path.
1719 # @path: see @qom-get for a description of this parameter
1721 # @property: the property name to set
1723 # @value: a value who's type is appropriate for the property type. See @qom-get
1724 # for a description of type mapping.
1728 { 'command': 'qom-set',
1729 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1735 # Sets the password of a remote display session.
1737 # @protocol: `vnc' to modify the VNC server password
1738 # `spice' to modify the Spice server password
1740 # @password: the new password
1742 # @connected: #optional how to handle existing clients when changing the
1743 # password. If nothing is specified, defaults to `keep'
1744 # `fail' to fail the command if clients are connected
1745 # `disconnect' to disconnect existing clients
1746 # `keep' to maintain existing clients
1748 # Returns: Nothing on success
1749 # If Spice is not enabled, DeviceNotFound
1753 { 'command': 'set_password',
1754 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1759 # Expire the password of a remote display server.
1761 # @protocol: the name of the remote display protocol `vnc' or `spice'
1763 # @time: when to expire the password.
1764 # `now' to expire the password immediately
1765 # `never' to cancel password expiration
1766 # `+INT' where INT is the number of seconds from now (integer)
1767 # `INT' where INT is the absolute time in seconds
1769 # Returns: Nothing on success
1770 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1774 # Notes: Time is relative to the server and currently there is no way to
1775 # coordinate server time with client time. It is not recommended to
1776 # use the absolute time version of the @time parameter unless you're
1777 # sure you are on the same machine as the QEMU instance.
1779 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1784 # Ejects a device from a removable drive.
1786 # @device: The name of the device
1788 # @force: @optional If true, eject regardless of whether the drive is locked.
1789 # If not specified, the default value is false.
1791 # Returns: Nothing on success
1792 # If @device is not a valid block device, DeviceNotFound
1794 # Notes: Ejecting a device will no media results in success
1798 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1801 # @change-vnc-password:
1803 # Change the VNC server password.
1805 # @target: the new password to use with VNC authentication
1809 # Notes: An empty password in this command will set the password to the empty
1810 # string. Existing clients are unaffected by executing this command.
1812 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1817 # This command is multiple commands multiplexed together.
1819 # @device: This is normally the name of a block device but it may also be 'vnc'.
1820 # when it's 'vnc', then sub command depends on @target
1822 # @target: If @device is a block device, then this is the new filename.
1823 # If @device is 'vnc', then if the value 'password' selects the vnc
1824 # change password command. Otherwise, this specifies a new server URI
1825 # address to listen to for VNC connections.
1827 # @arg: If @device is a block device, then this is an optional format to open
1829 # If @device is 'vnc' and @target is 'password', this is the new VNC
1830 # password to set. If this argument is an empty string, then no future
1831 # logins will be allowed.
1833 # Returns: Nothing on success.
1834 # If @device is not a valid block device, DeviceNotFound
1835 # If the new block device is encrypted, DeviceEncrypted. Note that
1836 # if this error is returned, the device has been opened successfully
1837 # and an additional call to @block_passwd is required to set the
1838 # device's password. The behavior of reads and writes to the block
1839 # device between when these calls are executed is undefined.
1841 # Notes: It is strongly recommended that this interface is not used especially
1842 # for changing block devices.
1846 { 'command': 'change',
1847 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1850 # @block_set_io_throttle:
1852 # Change I/O throttle limits for a block drive.
1854 # @device: The name of the device
1856 # @bps: total throughput limit in bytes per second
1858 # @bps_rd: read throughput limit in bytes per second
1860 # @bps_wr: write throughput limit in bytes per second
1862 # @iops: total I/O operations per second
1864 # @ops_rd: read I/O operations per second
1866 # @iops_wr: write I/O operations per second
1868 # Returns: Nothing on success
1869 # If @device is not a valid block device, DeviceNotFound
1873 { 'command': 'block_set_io_throttle',
1874 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1875 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1880 # Copy data from a backing file into a block device.
1882 # The block streaming operation is performed in the background until the entire
1883 # backing file has been copied. This command returns immediately once streaming
1884 # has started. The status of ongoing block streaming operations can be checked
1885 # with query-block-jobs. The operation can be stopped before it has completed
1886 # using the block-job-cancel command.
1888 # If a base file is specified then sectors are not copied from that base file and
1889 # its backing chain. When streaming completes the image file will have the base
1890 # file as its backing file. This can be used to stream a subset of the backing
1891 # file chain instead of flattening the entire image.
1893 # On successful completion the image file is updated to drop the backing file
1894 # and the BLOCK_JOB_COMPLETED event is emitted.
1896 # @device: the device name
1898 # @base: #optional the common backing file name
1900 # @speed: #optional the maximum speed, in bytes per second
1902 # @on-error: #optional the action to take on an error (default report).
1903 # 'stop' and 'enospc' can only be used if the block device
1904 # supports io-status (see BlockInfo). Since 1.3.
1906 # Returns: Nothing on success
1907 # If @device does not exist, DeviceNotFound
1911 { 'command': 'block-stream',
1912 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
1913 '*on-error': 'BlockdevOnError' } }
1916 # @block-job-set-speed:
1918 # Set maximum speed for a background block operation.
1920 # This command can only be issued when there is an active block job.
1922 # Throttling can be disabled by setting the speed to 0.
1924 # @device: the device name
1926 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1929 # Returns: Nothing on success
1930 # If no background operation is active on this device, DeviceNotActive
1934 { 'command': 'block-job-set-speed',
1935 'data': { 'device': 'str', 'speed': 'int' } }
1938 # @block-job-cancel:
1940 # Stop an active background block operation.
1942 # This command returns immediately after marking the active background block
1943 # operation for cancellation. It is an error to call this command if no
1944 # operation is in progress.
1946 # The operation will cancel as soon as possible and then emit the
1947 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1948 # enumerated using query-block-jobs.
1950 # For streaming, the image file retains its backing file unless the streaming
1951 # operation happens to complete just as it is being cancelled. A new streaming
1952 # operation can be started at a later time to finish copying all data from the
1955 # @device: the device name
1957 # @force: #optional whether to allow cancellation of a paused job (default
1958 # false). Since 1.3.
1960 # Returns: Nothing on success
1961 # If no background operation is active on this device, DeviceNotActive
1965 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
1970 # Pause an active background block operation.
1972 # This command returns immediately after marking the active background block
1973 # operation for pausing. It is an error to call this command if no
1974 # operation is in progress. Pausing an already paused job has no cumulative
1975 # effect; a single block-job-resume command will resume the job.
1977 # The operation will pause as soon as possible. No event is emitted when
1978 # the operation is actually paused. Cancelling a paused job automatically
1981 # @device: the device name
1983 # Returns: Nothing on success
1984 # If no background operation is active on this device, DeviceNotActive
1988 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
1991 # @block-job-resume:
1993 # Resume an active background block operation.
1995 # This command returns immediately after resuming a paused background block
1996 # operation. It is an error to call this command if no operation is in
1997 # progress. Resuming an already running job is not an error.
1999 # This command also clears the error status of the job.
2001 # @device: the device name
2003 # Returns: Nothing on success
2004 # If no background operation is active on this device, DeviceNotActive
2008 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2013 # This structure describes a search result from @qom-list-types
2015 # @name: the type name found in the search
2019 # Notes: This command is experimental and may change syntax in future releases.
2021 { 'type': 'ObjectTypeInfo',
2022 'data': { 'name': 'str' } }
2027 # This command will return a list of types given search parameters
2029 # @implements: if specified, only return types that implement this type name
2031 # @abstract: if true, include abstract types in the results
2033 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2037 { 'command': 'qom-list-types',
2038 'data': { '*implements': 'str', '*abstract': 'bool' },
2039 'returns': [ 'ObjectTypeInfo' ] }
2042 # @DevicePropertyInfo:
2044 # Information about device properties.
2046 # @name: the name of the property
2047 # @type: the typename of the property
2051 { 'type': 'DevicePropertyInfo',
2052 'data': { 'name': 'str', 'type': 'str' } }
2055 # @device-list-properties:
2057 # List properties associated with a device.
2059 # @typename: the type name of a device
2061 # Returns: a list of DevicePropertyInfo describing a devices properties
2065 { 'command': 'device-list-properties',
2066 'data': { 'typename': 'str'},
2067 'returns': [ 'DevicePropertyInfo' ] }
2072 # Migrates the current running guest to another Virtual Machine.
2074 # @uri: the Uniform Resource Identifier of the destination VM
2076 # @blk: #optional do block migration (full disk copy)
2078 # @inc: #optional incremental disk copy migration
2080 # @detach: this argument exists only for compatibility reasons and
2081 # is ignored by QEMU
2083 # Returns: nothing on success
2087 { 'command': 'migrate',
2088 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2090 # @xen-save-devices-state:
2092 # Save the state of all devices to file. The RAM and the block devices
2093 # of the VM are not saved by this command.
2095 # @filename: the file to save the state of the devices to as binary
2096 # data. See xen-save-devices-state.txt for a description of the binary
2099 # Returns: Nothing on success
2103 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2106 # @xen-set-global-dirty-log
2108 # Enable or disable the global dirty log mode.
2110 # @enable: true to enable, false to disable.
2116 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2121 # Remove a device from a guest
2123 # @id: the name of the device
2125 # Returns: Nothing on success
2126 # If @id is not a valid device, DeviceNotFound
2128 # Notes: When this command completes, the device may not be removed from the
2129 # guest. Hot removal is an operation that requires guest cooperation.
2130 # This command merely requests that the guest begin the hot removal
2135 { 'command': 'device_del', 'data': {'id': 'str'} }
2138 # @dump-guest-memory
2140 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2141 # very long depending on the amount of guest memory. This command is only
2142 # supported on i386 and x86_64.
2144 # @paging: if true, do paging to get guest's memory mapping. This allows
2145 # using gdb to process the core file.
2147 # IMPORTANT: this option can make QEMU allocate several gigabytes
2148 # of RAM. This can happen for a large guest, or a
2149 # malicious guest pretending to be large.
2151 # Also, paging=true has the following limitations:
2153 # 1. The guest may be in a catastrophic state or can have corrupted
2154 # memory, which cannot be trusted
2155 # 2. The guest can be in real-mode even if paging is enabled. For
2156 # example, the guest uses ACPI to sleep, and ACPI sleep state
2159 # @protocol: the filename or file descriptor of the vmcore. The supported
2162 # 1. file: the protocol starts with "file:", and the following
2163 # string is the file's path.
2164 # 2. fd: the protocol starts with "fd:", and the following string
2167 # @begin: #optional if specified, the starting physical address.
2169 # @length: #optional if specified, the memory size, in bytes. If you don't
2170 # want to dump all guest's memory, please specify the start @begin
2173 # Returns: nothing on success
2177 { 'command': 'dump-guest-memory',
2178 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2179 '*length': 'int' } }
2184 # Add a network backend.
2186 # @type: the type of network backend. Current valid values are 'user', 'tap',
2187 # 'vde', 'socket', 'dump' and 'bridge'
2189 # @id: the name of the new network backend
2191 # @props: #optional a list of properties to be passed to the backend in
2192 # the format 'name=value', like 'ifname=tap0,script=no'
2194 # Notes: The semantics of @props is not well defined. Future commands will be
2195 # introduced that provide stronger typing for backend creation.
2199 # Returns: Nothing on success
2200 # If @type is not a valid network backend, DeviceNotFound
2202 { 'command': 'netdev_add',
2203 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2209 # Remove a network backend.
2211 # @id: the name of the network backend to remove
2213 # Returns: Nothing on success
2214 # If @id is not a valid network backend, DeviceNotFound
2218 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2221 # @NetdevNoneOptions
2223 # Use it alone to have zero network devices.
2227 { 'type': 'NetdevNoneOptions',
2231 # @NetLegacyNicOptions
2233 # Create a new Network Interface Card.
2235 # @netdev: #optional id of -netdev to connect to
2237 # @macaddr: #optional MAC address
2239 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2241 # @addr: #optional PCI device address
2243 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2247 { 'type': 'NetLegacyNicOptions',
2253 '*vectors': 'uint32' } }
2258 # A fat type wrapping 'str', to be embedded in lists.
2267 # @NetdevUserOptions
2269 # Use the user mode network stack which requires no administrator privilege to
2272 # @hostname: #optional client hostname reported by the builtin DHCP server
2274 # @restrict: #optional isolate the guest from the host
2276 # @ip: #optional legacy parameter, use net= instead
2278 # @net: #optional IP address and optional netmask
2280 # @host: #optional guest-visible address of the host
2282 # @tftp: #optional root directory of the built-in TFTP server
2284 # @bootfile: #optional BOOTP filename, for use with tftp=
2286 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2289 # @dns: #optional guest-visible address of the virtual nameserver
2291 # @smb: #optional root directory of the built-in SMB server
2293 # @smbserver: #optional IP address of the built-in SMB server
2295 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2298 # @guestfwd: #optional forward guest TCP connections
2302 { 'type': 'NetdevUserOptions',
2305 '*restrict': 'bool',
2311 '*dhcpstart': 'str',
2314 '*smbserver': 'str',
2315 '*hostfwd': ['String'],
2316 '*guestfwd': ['String'] } }
2321 # Connect the host TAP network interface name to the VLAN.
2323 # @ifname: #optional interface name
2325 # @fd: #optional file descriptor of an already opened tap
2327 # @script: #optional script to initialize the interface
2329 # @downscript: #optional script to shut down the interface
2331 # @helper: #optional command to execute to configure bridge
2333 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2335 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2337 # @vhost: #optional enable vhost-net network accelerator
2339 # @vhostfd: #optional file descriptor of an already opened vhost net device
2341 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2345 { 'type': 'NetdevTapOptions',
2350 '*downscript': 'str',
2353 '*vnet_hdr': 'bool',
2356 '*vhostforce': 'bool' } }
2359 # @NetdevSocketOptions
2361 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2362 # socket connection.
2364 # @fd: #optional file descriptor of an already opened socket
2366 # @listen: #optional port number, and optional hostname, to listen on
2368 # @connect: #optional port number, and optional hostname, to connect to
2370 # @mcast: #optional UDP multicast address and port number
2372 # @localaddr: #optional source address and port for multicast and udp packets
2374 # @udp: #optional UDP unicast address and port number
2378 { 'type': 'NetdevSocketOptions',
2384 '*localaddr': 'str',
2390 # Connect the VLAN to a vde switch running on the host.
2392 # @sock: #optional socket path
2394 # @port: #optional port number
2396 # @group: #optional group owner of socket
2398 # @mode: #optional permissions for socket
2402 { 'type': 'NetdevVdeOptions',
2407 '*mode': 'uint16' } }
2410 # @NetdevDumpOptions
2412 # Dump VLAN network traffic to a file.
2414 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2417 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2421 { 'type': 'NetdevDumpOptions',
2427 # @NetdevBridgeOptions
2429 # Connect a host TAP network interface to a host bridge device.
2431 # @br: #optional bridge name
2433 # @helper: #optional command to execute to configure bridge
2437 { 'type': 'NetdevBridgeOptions',
2440 '*helper': 'str' } }
2443 # @NetdevHubPortOptions
2445 # Connect two or more net clients through a software hub.
2447 # @hubid: hub identifier number
2451 { 'type': 'NetdevHubPortOptions',
2453 'hubid': 'int32' } }
2458 # A discriminated record of network device traits.
2462 { 'union': 'NetClientOptions',
2464 'none': 'NetdevNoneOptions',
2465 'nic': 'NetLegacyNicOptions',
2466 'user': 'NetdevUserOptions',
2467 'tap': 'NetdevTapOptions',
2468 'socket': 'NetdevSocketOptions',
2469 'vde': 'NetdevVdeOptions',
2470 'dump': 'NetdevDumpOptions',
2471 'bridge': 'NetdevBridgeOptions',
2472 'hubport': 'NetdevHubPortOptions' } }
2477 # Captures the configuration of a network device; legacy.
2479 # @vlan: #optional vlan number
2481 # @id: #optional identifier for monitor commands
2483 # @name: #optional identifier for monitor commands, ignored if @id is present
2485 # @opts: device type specific properties (legacy)
2489 { 'type': 'NetLegacy',
2494 'opts': 'NetClientOptions' } }
2499 # Captures the configuration of a network device.
2501 # @id: identifier for monitor commands.
2503 # @opts: device type specific properties
2510 'opts': 'NetClientOptions' } }
2515 # Receive a file descriptor via SCM rights and assign it a name
2517 # @fdname: file descriptor name
2519 # Returns: Nothing on success
2523 # Notes: If @fdname already exists, the file descriptor assigned to
2524 # it will be closed and replaced by the received file
2526 # The 'closefd' command can be used to explicitly close the
2527 # file descriptor when it is no longer needed.
2529 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2534 # Close a file descriptor previously passed via SCM rights
2536 # @fdname: file descriptor name
2538 # Returns: Nothing on success
2542 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2547 # Information describing a machine.
2549 # @name: the name of the machine
2551 # @alias: #optional an alias for the machine name
2553 # @default: #optional whether the machine is default
2557 { 'type': 'MachineInfo',
2558 'data': { 'name': 'str', '*alias': 'str',
2559 '*is-default': 'bool' } }
2564 # Return a list of supported machines
2566 # Returns: a list of MachineInfo
2570 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2573 # @CpuDefinitionInfo:
2575 # Virtual CPU definition.
2577 # @name: the name of the CPU definition
2581 { 'type': 'CpuDefinitionInfo',
2582 'data': { 'name': 'str' } }
2585 # @query-cpu-definitions:
2587 # Return a list of supported virtual CPU definitions
2589 # Returns: a list of CpuDefInfo
2593 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2597 # Information about a file descriptor that was added to an fd set.
2599 # @fdset-id: The ID of the fd set that @fd was added to.
2601 # @fd: The file descriptor that was received via SCM rights and
2602 # added to the fd set.
2606 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2611 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2613 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2615 # @opaque: #optional A free-form string that can be used to describe the fd.
2617 # Returns: @AddfdInfo on success
2618 # If file descriptor was not received, FdNotSupplied
2619 # If @fdset-id does not exist, InvalidParameterValue
2621 # Notes: The list of fd sets is shared by all monitor connections.
2623 # If @fdset-id is not specified, a new fd set will be created.
2627 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2628 'returns': 'AddfdInfo' }
2633 # Remove a file descriptor from an fd set.
2635 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2637 # @fd: #optional The file descriptor that is to be removed.
2639 # Returns: Nothing on success
2640 # If @fdset-id or @fd is not found, FdNotFound
2644 # Notes: The list of fd sets is shared by all monitor connections.
2646 # If @fd is not specified, all file descriptors in @fdset-id
2649 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2654 # Information about a file descriptor that belongs to an fd set.
2656 # @fd: The file descriptor value.
2658 # @opaque: #optional A free-form string that can be used to describe the fd.
2662 { 'type': 'FdsetFdInfo',
2663 'data': {'fd': 'int', '*opaque': 'str'} }
2668 # Information about an fd set.
2670 # @fdset-id: The ID of the fd set.
2672 # @fds: A list of file descriptors that belong to this fd set.
2676 { 'type': 'FdsetInfo',
2677 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2682 # Return information describing all fd sets.
2684 # Returns: A list of @FdsetInfo
2688 # Note: The list of fd sets is shared by all monitor connections.
2691 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2696 # Target CPU emulation type
2698 # These parameters correspond to the softmmu binary CPU name that is currently
2703 { 'enum': 'TargetType',
2704 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2705 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2706 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2707 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2712 # Information describing the QEMU target.
2714 # @arch: the target architecture (eg "x86_64", "i386", etc)
2718 { 'type': 'TargetInfo',
2719 'data': { 'arch': 'TargetType' } }
2724 # Return information about the target for this QEMU
2726 # Returns: TargetInfo
2730 { 'command': 'query-target', 'returns': 'TargetInfo' }
2735 # An enumeration of key name.
2737 # This is used by the send-key command.
2741 { 'enum': 'QKeyCode',
2742 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2743 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2744 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2745 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2746 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2747 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2748 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2749 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2750 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2751 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2752 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2753 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2754 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2755 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2756 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2761 # Represents a keyboard key.
2765 { 'union': 'KeyValue',
2768 'qcode': 'QKeyCode' } }
2773 # Send keys to guest.
2775 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2776 # simultaneously sent to the guest. A @KeyValue.number value is sent
2777 # directly to the guest, while @KeyValue.qcode must be a valid
2780 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2783 # Returns: Nothing on success
2784 # If key is unknown or redundant, InvalidParameter
2789 { 'command': 'send-key',
2790 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2795 # Write a PPM of the VGA screen to a file.
2797 # @filename: the path of a new PPM file to store the image
2799 # Returns: Nothing on success
2803 { 'command': 'screendump', 'data': {'filename': 'str'} }