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)
388 # @dirty-pages-rate: number of pages dirtied by second by the
393 { 'type': 'MigrationStats',
394 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
395 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int',
396 'dirty-pages-rate' : 'int' } }
401 # Detailed XBZRLE migration cache statistics
403 # @cache-size: XBZRLE cache size
405 # @bytes: amount of bytes already transferred to the target VM
407 # @pages: amount of pages transferred to the target VM
409 # @cache-miss: number of cache miss
411 # @overflow: number of overflows
415 { 'type': 'XBZRLECacheStats',
416 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
417 'cache-miss': 'int', 'overflow': 'int' } }
422 # Information about current migration process.
424 # @status: #optional string describing the current migration status.
425 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
426 # 'cancelled'. If this field is not returned, no migration process
429 # @ram: #optional @MigrationStats containing detailed migration
430 # status, only returned if status is 'active' or
431 # 'completed'. 'comppleted' (since 1.2)
433 # @disk: #optional @MigrationStats containing detailed disk migration
434 # status, only returned if status is 'active' and it is a block
437 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
438 # migration statistics, only returned if XBZRLE feature is on and
439 # status is 'active' or 'completed' (since 1.2)
441 # @total-time: #optional total amount of milliseconds since migration started.
442 # If migration has ended, it returns the total migration
445 # @downtime: #optional only present when migration finishes correctly
446 # total downtime in milliseconds for the guest.
449 # @expected-downtime: #optional only present while migration is active
450 # expected downtime in milliseconds for the guest in last walk
451 # of the dirty bitmap. (since 1.3)
455 { 'type': 'MigrationInfo',
456 'data': {'*status': 'str', '*ram': 'MigrationStats',
457 '*disk': 'MigrationStats',
458 '*xbzrle-cache': 'XBZRLECacheStats',
459 '*total-time': 'int',
460 '*expected-downtime': 'int',
461 '*downtime': 'int'} }
466 # Returns information about current migration process.
468 # Returns: @MigrationInfo
472 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
475 # @MigrationCapability
477 # Migration capabilities enumeration
479 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
480 # This feature allows us to minimize migration traffic for certain work
481 # loads, by sending compressed difference of the pages
485 { 'enum': 'MigrationCapability',
489 # @MigrationCapabilityStatus
491 # Migration capability information
493 # @capability: capability enum
495 # @state: capability state bool
499 { 'type': 'MigrationCapabilityStatus',
500 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
503 # @migrate-set-capabilities
505 # Enable/Disable the following migration capabilities (like xbzrle)
507 # @capabilities: json array of capability modifications to make
511 { 'command': 'migrate-set-capabilities',
512 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
515 # @query-migrate-capabilities
517 # Returns information about the current migration capabilities status
519 # Returns: @MigrationCapabilitiesStatus
523 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
528 # Information about a mouse device.
530 # @name: the name of the mouse device
532 # @index: the index of the mouse device
534 # @current: true if this device is currently receiving mouse events
536 # @absolute: true if this device supports absolute coordinates as input
540 { 'type': 'MouseInfo',
541 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
542 'absolute': 'bool'} }
547 # Returns information about each active mouse device
549 # Returns: a list of @MouseInfo for each device
553 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
558 # Information about a virtual CPU
560 # @CPU: the index of the virtual CPU
562 # @current: this only exists for backwards compatible and should be ignored
564 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
565 # to a processor specific low power mode.
567 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
569 # If the target is Sparc, this is the PC component of the
570 # instruction pointer.
572 # @nip: #optional If the target is PPC, the instruction pointer
574 # @npc: #optional If the target is Sparc, the NPC component of the instruction
577 # @PC: #optional If the target is MIPS, the instruction pointer
579 # @thread_id: ID of the underlying host thread
583 # Notes: @halted is a transient state that changes frequently. By the time the
584 # data is sent to the client, the guest may no longer be halted.
587 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
588 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
593 # Returns a list of information about each virtual CPU.
595 # Returns: a list of @CpuInfo for each virtual CPU
599 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
604 # Information about the backing device for a block device.
606 # @file: the filename of the backing device
608 # @ro: true if the backing device was open read-only
610 # @drv: the name of the block format used to open the backing device. As of
611 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
612 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
613 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
614 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
616 # @backing_file: #optional the name of the backing file (for copy-on-write)
618 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
620 # @encrypted: true if the backing device is encrypted
622 # @encryption_key_missing: true if the backing device is encrypted but an
623 # valid encryption key is missing
625 # @bps: total throughput limit in bytes per second is specified
627 # @bps_rd: read throughput limit in bytes per second is specified
629 # @bps_wr: write throughput limit in bytes per second is specified
631 # @iops: total I/O operations per second is specified
633 # @iops_rd: read I/O operations per second is specified
635 # @iops_wr: write I/O operations per second is specified
639 # Notes: This interface is only found in @BlockInfo.
641 { 'type': 'BlockDeviceInfo',
642 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
643 '*backing_file': 'str', 'backing_file_depth': 'int',
644 'encrypted': 'bool', 'encryption_key_missing': 'bool',
645 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
646 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
649 # @BlockDeviceIoStatus:
651 # An enumeration of block device I/O status.
653 # @ok: The last I/O operation has succeeded
655 # @failed: The last I/O operation has failed
657 # @nospace: The last I/O operation has failed due to a no-space condition
661 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
666 # Block device information. This structure describes a virtual device and
667 # the backing device associated with it.
669 # @device: The device name associated with the virtual device.
671 # @type: This field is returned only for compatibility reasons, it should
672 # not be used (always returns 'unknown')
674 # @removable: True if the device supports removable media.
676 # @locked: True if the guest has locked this device from having its media
679 # @tray_open: #optional True if the device has a tray and it is open
680 # (only present if removable is true)
682 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
683 # supports it and the VM is configured to stop on errors
685 # @inserted: #optional @BlockDeviceInfo describing the device if media is
690 { 'type': 'BlockInfo',
691 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
692 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
693 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
698 # Get a list of BlockInfo for all virtual block devices.
700 # Returns: a list of @BlockInfo describing each virtual block device
704 { 'command': 'query-block', 'returns': ['BlockInfo'] }
709 # Statistics of a virtual block device or a block backing device.
711 # @rd_bytes: The number of bytes read by the device.
713 # @wr_bytes: The number of bytes written by the device.
715 # @rd_operations: The number of read operations performed by the device.
717 # @wr_operations: The number of write operations performed by the device.
719 # @flush_operations: The number of cache flush operations performed by the
720 # device (since 0.15.0)
722 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
725 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
727 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
729 # @wr_highest_offset: The offset after the greatest byte written to the
730 # device. The intended use of this information is for
731 # growable sparse files (like qcow2) that are used on top
732 # of a physical device.
736 { 'type': 'BlockDeviceStats',
737 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
738 'wr_operations': 'int', 'flush_operations': 'int',
739 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
740 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
745 # Statistics of a virtual block device or a block backing device.
747 # @device: #optional If the stats are for a virtual block device, the name
748 # corresponding to the virtual block device.
750 # @stats: A @BlockDeviceStats for the device.
752 # @parent: #optional This may point to the backing block device if this is a
753 # a virtual block device. If it's a backing block, this will point
754 # to the backing file is one is present.
758 { 'type': 'BlockStats',
759 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
760 '*parent': 'BlockStats'} }
765 # Query the @BlockStats for all virtual block devices.
767 # Returns: A list of @BlockStats for each virtual block devices.
771 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
776 # Information about a connected VNC client.
778 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
781 # @family: 'ipv6' if the client is connected via IPv6 and TCP
782 # 'ipv4' if the client is connected via IPv4 and TCP
783 # 'unix' if the client is connected via a unix domain socket
784 # 'unknown' otherwise
786 # @service: The service name of the client's port. This may depends on the
787 # host system's service database so symbolic names should not be
790 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
791 # Name of the client.
793 # @sasl_username: #optional If SASL authentication is in use, the SASL username
794 # used for authentication.
798 { 'type': 'VncClientInfo',
799 'data': {'host': 'str', 'family': 'str', 'service': 'str',
800 '*x509_dname': 'str', '*sasl_username': 'str'} }
805 # Information about the VNC session.
807 # @enabled: true if the VNC server is enabled, false otherwise
809 # @host: #optional The hostname the VNC server is bound to. This depends on
810 # the name resolution on the host and may be an IP address.
812 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
813 # 'ipv4' if the host is listening for IPv4 connections
814 # 'unix' if the host is listening on a unix domain socket
815 # 'unknown' otherwise
817 # @service: #optional The service name of the server's port. This may depends
818 # on the host system's service database so symbolic names should not
821 # @auth: #optional the current authentication type used by the server
822 # 'none' if no authentication is being used
823 # 'vnc' if VNC authentication is being used
824 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
825 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
826 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
827 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
828 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
829 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
830 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
831 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
832 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
834 # @clients: a list of @VncClientInfo of all currently connected clients
839 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
840 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
845 # Returns information about the current VNC server
851 { 'command': 'query-vnc', 'returns': 'VncInfo' }
856 # Information about a SPICE client channel.
858 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
861 # @family: 'ipv6' if the client is connected via IPv6 and TCP
862 # 'ipv4' if the client is connected via IPv4 and TCP
863 # 'unix' if the client is connected via a unix domain socket
864 # 'unknown' otherwise
866 # @port: The client's port number.
868 # @connection-id: SPICE connection id number. All channels with the same id
869 # belong to the same SPICE session.
871 # @connection-type: SPICE channel type number. "1" is the main control
872 # channel, filter for this one if you want to track spice
875 # @channel-id: SPICE channel ID number. Usually "0", might be different when
876 # multiple channels of the same type exist, such as multiple
877 # display channels in a multihead setup
879 # @tls: true if the channel is encrypted, false otherwise.
883 { 'type': 'SpiceChannel',
884 'data': {'host': 'str', 'family': 'str', 'port': 'str',
885 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
889 # @SpiceQueryMouseMode
891 # An enumeration of Spice mouse states.
893 # @client: Mouse cursor position is determined by the client.
895 # @server: Mouse cursor position is determined by the server.
897 # @unknown: No information is available about mouse mode used by
900 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
904 { 'enum': 'SpiceQueryMouseMode',
905 'data': [ 'client', 'server', 'unknown' ] }
910 # Information about the SPICE session.
912 # @enabled: true if the SPICE server is enabled, false otherwise
914 # @migrated: true if the last guest migration completed and spice
915 # migration had completed as well. false otherwise.
917 # @host: #optional The hostname the SPICE server is bound to. This depends on
918 # the name resolution on the host and may be an IP address.
920 # @port: #optional The SPICE server's port number.
922 # @compiled-version: #optional SPICE server version.
924 # @tls-port: #optional The SPICE server's TLS port number.
926 # @auth: #optional the current authentication type used by the server
927 # 'none' if no authentication is being used
928 # 'spice' uses SASL or direct TLS authentication, depending on command
931 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
932 # be determined by the client or the server, or unknown if spice
933 # server doesn't provide this information.
937 # @channels: a list of @SpiceChannel for each active spice channel
941 { 'type': 'SpiceInfo',
942 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
943 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
944 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
949 # Returns information about the current SPICE server
951 # Returns: @SpiceInfo
955 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
960 # Information about the guest balloon device.
962 # @actual: the number of bytes the balloon currently contains
964 # @mem_swapped_in: #optional number of pages swapped in within the guest
966 # @mem_swapped_out: #optional number of pages swapped out within the guest
968 # @major_page_faults: #optional number of major page faults within the guest
970 # @minor_page_faults: #optional number of minor page faults within the guest
972 # @free_mem: #optional amount of memory (in bytes) free in the guest
974 # @total_mem: #optional amount of memory (in bytes) visible to the guest
978 # Notes: all current versions of QEMU do not fill out optional information in
981 { 'type': 'BalloonInfo',
982 'data': {'actual': 'int', '*mem_swapped_in': 'int',
983 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
984 '*minor_page_faults': 'int', '*free_mem': 'int',
985 '*total_mem': 'int'} }
990 # Return information about the balloon device.
992 # Returns: @BalloonInfo on success
993 # If the balloon driver is enabled but not functional because the KVM
994 # kernel module cannot support it, KvmMissingCap
995 # If no balloon device is present, DeviceNotActive
999 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1004 # A PCI device memory region
1006 # @base: the starting address (guest physical)
1008 # @limit: the ending address (guest physical)
1012 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1017 # Information about a PCI device I/O region.
1019 # @bar: the index of the Base Address Register for this region
1021 # @type: 'io' if the region is a PIO region
1022 # 'memory' if the region is a MMIO region
1024 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1026 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1030 { 'type': 'PciMemoryRegion',
1031 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1032 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1037 # Information about a PCI Bridge device
1039 # @bus.number: primary bus interface number. This should be the number of the
1040 # bus the device resides on.
1042 # @bus.secondary: secondary bus interface number. This is the number of the
1043 # main bus for the bridge
1045 # @bus.subordinate: This is the highest number bus that resides below the
1048 # @bus.io_range: The PIO range for all devices on this bridge
1050 # @bus.memory_range: The MMIO range for all devices on this bridge
1052 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1055 # @devices: a list of @PciDeviceInfo for each device on this bridge
1059 { 'type': 'PciBridgeInfo',
1060 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1061 'io_range': 'PciMemoryRange',
1062 'memory_range': 'PciMemoryRange',
1063 'prefetchable_range': 'PciMemoryRange' },
1064 '*devices': ['PciDeviceInfo']} }
1069 # Information about a PCI device
1071 # @bus: the bus number of the device
1073 # @slot: the slot the device is located in
1075 # @function: the function of the slot used by the device
1077 # @class_info.desc: #optional a string description of the device's class
1079 # @class_info.class: the class code of the device
1081 # @id.device: the PCI device id
1083 # @id.vendor: the PCI vendor id
1085 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1087 # @qdev_id: the device name of the PCI device
1089 # @pci_bridge: if the device is a PCI bridge, the bridge information
1091 # @regions: a list of the PCI I/O regions associated with the device
1093 # Notes: the contents of @class_info.desc are not stable and should only be
1094 # treated as informational.
1098 { 'type': 'PciDeviceInfo',
1099 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1100 'class_info': {'*desc': 'str', 'class': 'int'},
1101 'id': {'device': 'int', 'vendor': 'int'},
1102 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1103 'regions': ['PciMemoryRegion']} }
1108 # Information about a PCI bus
1110 # @bus: the bus index
1112 # @devices: a list of devices on this bus
1116 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1121 # Return information about the PCI bus topology of the guest.
1123 # Returns: a list of @PciInfo for each PCI bus
1127 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1132 # An enumeration of possible behaviors for errors on I/O operations.
1133 # The exact meaning depends on whether the I/O was initiated by a guest
1136 # @report: for guest operations, report the error to the guest;
1137 # for jobs, cancel the job
1139 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1140 # or BLOCK_JOB_ERROR)
1142 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1144 # @stop: for guest operations, stop the virtual machine;
1145 # for jobs, pause the job
1149 { 'enum': 'BlockdevOnError',
1150 'data': ['report', 'ignore', 'enospc', 'stop'] }
1155 # Information about a long-running block device operation.
1157 # @type: the job type ('stream' for image streaming)
1159 # @device: the block device name
1161 # @len: the maximum progress value
1163 # @busy: false if the job is known to be in a quiescent state, with
1164 # no pending I/O. Since 1.3.
1166 # @paused: whether the job is paused or, if @busy is true, will
1167 # pause itself as soon as possible. Since 1.3.
1169 # @offset: the current progress value
1171 # @speed: the rate limit, bytes per second
1173 # @io-status: the status of the job (since 1.3)
1177 { 'type': 'BlockJobInfo',
1178 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1179 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1180 'io-status': 'BlockDeviceIoStatus'} }
1183 # @query-block-jobs:
1185 # Return information about long-running block device operations.
1187 # Returns: a list of @BlockJobInfo for each active block job
1191 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1196 # This command will cause the QEMU process to exit gracefully. While every
1197 # attempt is made to send the QMP response before terminating, this is not
1198 # guaranteed. When using this interface, a premature EOF would not be
1203 { 'command': 'quit' }
1208 # Stop all guest VCPU execution.
1212 # Notes: This function will succeed even if the guest is already in the stopped
1215 { 'command': 'stop' }
1220 # Performs a hard reset of a guest.
1224 { 'command': 'system_reset' }
1227 # @system_powerdown:
1229 # Requests that a guest perform a powerdown operation.
1233 # Notes: A guest may or may not respond to this command. This command
1234 # returning does not indicate that a guest has accepted the request or
1235 # that it has shut down. Many guests will respond to this command by
1236 # prompting the user in some way.
1238 { 'command': 'system_powerdown' }
1243 # This command is a nop that is only provided for the purposes of compatibility.
1247 # Notes: Do not use this command.
1249 { 'command': 'cpu', 'data': {'index': 'int'} }
1254 # Save a portion of guest memory to a file.
1256 # @val: the virtual address of the guest to start from
1258 # @size: the size of memory region to save
1260 # @filename: the file to save the memory to as binary data
1262 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1263 # virtual address (defaults to CPU 0)
1265 # Returns: Nothing on success
1269 # Notes: Errors were not reliably returned until 1.1
1271 { 'command': 'memsave',
1272 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1277 # Save a portion of guest physical memory to a file.
1279 # @val: the physical address of the guest to start from
1281 # @size: the size of memory region to save
1283 # @filename: the file to save the memory to as binary data
1285 # Returns: Nothing on success
1289 # Notes: Errors were not reliably returned until 1.1
1291 { 'command': 'pmemsave',
1292 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1297 # Resume guest VCPU execution.
1301 # Returns: If successful, nothing
1302 # If the QEMU is waiting for an incoming migration, MigrationExpected
1303 # If QEMU was started with an encrypted block device and a key has
1304 # not yet been set, DeviceEncrypted.
1306 # Notes: This command will succeed if the guest is currently running.
1308 { 'command': 'cont' }
1313 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1319 { 'command': 'system_wakeup' }
1324 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1326 # Returns: If successful, nothing
1330 # Notes: Only x86 Virtual Machines support this command.
1332 { 'command': 'inject-nmi' }
1337 # Sets the link status of a virtual network adapter.
1339 # @name: the device name of the virtual network adapter
1341 # @up: true to set the link status to be up
1343 # Returns: Nothing on success
1344 # If @name is not a valid network device, DeviceNotFound
1348 # Notes: Not all network adapters support setting link status. This command
1349 # will succeed even if the network adapter does not support link status
1352 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1357 # This command sets the password of a block device that has not been open
1358 # with a password and requires one.
1360 # The two cases where this can happen are a block device is created through
1361 # QEMU's initial command line or a block device is changed through the legacy
1362 # @change interface.
1364 # In the event that the block device is created through the initial command
1365 # line, the VM will start in the stopped state regardless of whether '-S' is
1366 # used. The intention is for a management tool to query the block devices to
1367 # determine which ones are encrypted, set the passwords with this command, and
1368 # then start the guest with the @cont command.
1370 # @device: the name of the device to set the password on
1372 # @password: the password to use for the device
1374 # Returns: nothing on success
1375 # If @device is not a valid block device, DeviceNotFound
1376 # If @device is not encrypted, DeviceNotEncrypted
1378 # Notes: Not all block formats support encryption and some that do are not
1379 # able to validate that a password is correct. Disk corruption may
1380 # occur if an invalid password is specified.
1384 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1389 # Request the balloon driver to change its balloon size.
1391 # @value: the target size of the balloon in bytes
1393 # Returns: Nothing on success
1394 # If the balloon driver is enabled but not functional because the KVM
1395 # kernel module cannot support it, KvmMissingCap
1396 # If no balloon device is present, DeviceNotActive
1398 # Notes: This command just issues a request to the guest. When it returns,
1399 # the balloon size may not have changed. A guest can change the balloon
1400 # size independent of this command.
1404 { 'command': 'balloon', 'data': {'value': 'int'} }
1409 # Resize a block image while a guest is running.
1411 # @device: the name of the device to get the image resized
1413 # @size: new image size in bytes
1415 # Returns: nothing on success
1416 # If @device is not a valid block device, DeviceNotFound
1420 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1425 # An enumeration that tells QEMU how to set the backing file path in
1428 # @existing: QEMU should look for an existing image file.
1430 # @absolute-paths: QEMU should create a new image with absolute paths
1431 # for the backing file.
1435 { 'enum': 'NewImageMode'
1436 'data': [ 'existing', 'absolute-paths' ] }
1441 # @device: the name of the device to generate the snapshot from.
1443 # @snapshot-file: the target of the new image. A new file will be created.
1445 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1447 # @mode: #optional whether and how QEMU should create a new image, default is
1450 { 'type': 'BlockdevSnapshot',
1451 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1452 '*mode': 'NewImageMode' } }
1457 # A discriminated record of operations that can be performed with
1460 { 'union': 'BlockdevAction',
1462 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1468 # Atomically operate on a group of one or more block devices. If
1469 # any operation fails, then the entire set of actions will be
1470 # abandoned and the appropriate error returned. The only operation
1471 # supported is currently blockdev-snapshot-sync.
1474 # @BlockdevAction: information needed for the device snapshot
1476 # Returns: nothing on success
1477 # If @device is not a valid block device, DeviceNotFound
1479 # Note: The transaction aborts on the first failure. Therefore, there will
1480 # be only one device or snapshot file returned in an error condition, and
1481 # subsequent actions will not have been attempted.
1485 { 'command': 'transaction',
1486 'data': { 'actions': [ 'BlockdevAction' ] } }
1489 # @blockdev-snapshot-sync
1491 # Generates a synchronous snapshot of a block device.
1493 # @device: the name of the device to generate the snapshot from.
1495 # @snapshot-file: the target of the new image. If the file exists, or if it
1496 # is a device, the snapshot will be created in the existing
1497 # file/device. If does not exist, a new file will be created.
1499 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1501 # @mode: #optional whether and how QEMU should create a new image, default is
1504 # Returns: nothing on success
1505 # If @device is not a valid block device, DeviceNotFound
1509 { 'command': 'blockdev-snapshot-sync',
1510 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1511 '*mode': 'NewImageMode'} }
1514 # @human-monitor-command:
1516 # Execute a command on the human monitor and return the output.
1518 # @command-line: the command to execute in the human monitor
1520 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1522 # Returns: the output of the command as a string
1526 # Notes: This command only exists as a stop-gap. It's use is highly
1527 # discouraged. The semantics of this command are not guaranteed.
1529 # Known limitations:
1531 # o This command is stateless, this means that commands that depend
1532 # on state information (such as getfd) might not work
1534 # o Commands that prompt the user for data (eg. 'cont' when the block
1535 # device is encrypted) don't currently work
1537 { 'command': 'human-monitor-command',
1538 'data': {'command-line': 'str', '*cpu-index': 'int'},
1544 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1545 # writes data between 'top' and 'base' into 'base'.
1547 # @device: the name of the device
1549 # @base: #optional The file name of the backing image to write data into.
1550 # If not specified, this is the deepest backing image
1552 # @top: The file name of the backing image within the image chain,
1553 # which contains the topmost data to be committed down.
1554 # Note, the active layer as 'top' is currently unsupported.
1556 # If top == base, that is an error.
1559 # @speed: #optional the maximum speed, in bytes per second
1561 # Returns: Nothing on success
1562 # If commit or stream is already active on this device, DeviceInUse
1563 # If @device does not exist, DeviceNotFound
1564 # If image commit is not supported by this device, NotSupported
1565 # If @base or @top is invalid, a generic error is returned
1566 # If @top is the active layer, or omitted, a generic error is returned
1567 # If @speed is invalid, InvalidParameter
1572 { 'command': 'block-commit',
1573 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1578 # Cancel the current executing migration process.
1580 # Returns: nothing on success
1582 # Notes: This command succeeds even if there is no migration process running.
1586 { 'command': 'migrate_cancel' }
1589 # @migrate_set_downtime
1591 # Set maximum tolerated downtime for migration.
1593 # @value: maximum downtime in seconds
1595 # Returns: nothing on success
1599 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1602 # @migrate_set_speed
1604 # Set maximum speed for migration.
1606 # @value: maximum speed in bytes.
1608 # Returns: nothing on success
1610 # Notes: A value lesser than zero will be automatically round up to zero.
1614 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1617 # @migrate-set-cache-size
1619 # Set XBZRLE cache size
1621 # @value: cache size in bytes
1623 # The size will be rounded down to the nearest power of 2.
1624 # The cache size can be modified before and during ongoing migration
1626 # Returns: nothing on success
1630 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1633 # @query-migrate-cache-size
1635 # query XBZRLE cache size
1637 # Returns: XBZRLE cache size in bytes
1641 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1644 # @ObjectPropertyInfo:
1646 # @name: the name of the property
1648 # @type: the type of the property. This will typically come in one of four
1651 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1652 # These types are mapped to the appropriate JSON type.
1654 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1655 # legacy qdev typename. These types are always treated as strings.
1657 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1658 # device type name. Child properties create the composition tree.
1660 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1661 # device type name. Link properties form the device model graph.
1665 { 'type': 'ObjectPropertyInfo',
1666 'data': { 'name': 'str', 'type': 'str' } }
1671 # This command will list any properties of a object given a path in the object
1674 # @path: the path within the object model. See @qom-get for a description of
1677 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1682 { 'command': 'qom-list',
1683 'data': { 'path': 'str' },
1684 'returns': [ 'ObjectPropertyInfo' ] }
1689 # This command will get a property from a object model path and return the
1692 # @path: The path within the object model. There are two forms of supported
1693 # paths--absolute and partial paths.
1695 # Absolute paths are derived from the root object and can follow child<>
1696 # or link<> properties. Since they can follow link<> properties, they
1697 # can be arbitrarily long. Absolute paths look like absolute filenames
1698 # and are prefixed with a leading slash.
1700 # Partial paths look like relative filenames. They do not begin
1701 # with a prefix. The matching rules for partial paths are subtle but
1702 # designed to make specifying objects easy. At each level of the
1703 # composition tree, the partial path is matched as an absolute path.
1704 # The first match is not returned. At least two matches are searched
1705 # for. A successful result is only returned if only one match is
1706 # found. If more than one match is found, a flag is return to
1707 # indicate that the match was ambiguous.
1709 # @property: The property name to read
1711 # Returns: The property value. The type depends on the property type. legacy<>
1712 # properties are returned as #str. child<> and link<> properties are
1713 # returns as #str pathnames. All integer property types (u8, u16, etc)
1714 # are returned as #int.
1718 { 'command': 'qom-get',
1719 'data': { 'path': 'str', 'property': 'str' },
1720 'returns': 'visitor',
1726 # This command will set a property from a object model path.
1728 # @path: see @qom-get for a description of this parameter
1730 # @property: the property name to set
1732 # @value: a value who's type is appropriate for the property type. See @qom-get
1733 # for a description of type mapping.
1737 { 'command': 'qom-set',
1738 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1744 # Sets the password of a remote display session.
1746 # @protocol: `vnc' to modify the VNC server password
1747 # `spice' to modify the Spice server password
1749 # @password: the new password
1751 # @connected: #optional how to handle existing clients when changing the
1752 # password. If nothing is specified, defaults to `keep'
1753 # `fail' to fail the command if clients are connected
1754 # `disconnect' to disconnect existing clients
1755 # `keep' to maintain existing clients
1757 # Returns: Nothing on success
1758 # If Spice is not enabled, DeviceNotFound
1762 { 'command': 'set_password',
1763 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1768 # Expire the password of a remote display server.
1770 # @protocol: the name of the remote display protocol `vnc' or `spice'
1772 # @time: when to expire the password.
1773 # `now' to expire the password immediately
1774 # `never' to cancel password expiration
1775 # `+INT' where INT is the number of seconds from now (integer)
1776 # `INT' where INT is the absolute time in seconds
1778 # Returns: Nothing on success
1779 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1783 # Notes: Time is relative to the server and currently there is no way to
1784 # coordinate server time with client time. It is not recommended to
1785 # use the absolute time version of the @time parameter unless you're
1786 # sure you are on the same machine as the QEMU instance.
1788 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1793 # Ejects a device from a removable drive.
1795 # @device: The name of the device
1797 # @force: @optional If true, eject regardless of whether the drive is locked.
1798 # If not specified, the default value is false.
1800 # Returns: Nothing on success
1801 # If @device is not a valid block device, DeviceNotFound
1803 # Notes: Ejecting a device will no media results in success
1807 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1810 # @change-vnc-password:
1812 # Change the VNC server password.
1814 # @target: the new password to use with VNC authentication
1818 # Notes: An empty password in this command will set the password to the empty
1819 # string. Existing clients are unaffected by executing this command.
1821 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1826 # This command is multiple commands multiplexed together.
1828 # @device: This is normally the name of a block device but it may also be 'vnc'.
1829 # when it's 'vnc', then sub command depends on @target
1831 # @target: If @device is a block device, then this is the new filename.
1832 # If @device is 'vnc', then if the value 'password' selects the vnc
1833 # change password command. Otherwise, this specifies a new server URI
1834 # address to listen to for VNC connections.
1836 # @arg: If @device is a block device, then this is an optional format to open
1838 # If @device is 'vnc' and @target is 'password', this is the new VNC
1839 # password to set. If this argument is an empty string, then no future
1840 # logins will be allowed.
1842 # Returns: Nothing on success.
1843 # If @device is not a valid block device, DeviceNotFound
1844 # If the new block device is encrypted, DeviceEncrypted. Note that
1845 # if this error is returned, the device has been opened successfully
1846 # and an additional call to @block_passwd is required to set the
1847 # device's password. The behavior of reads and writes to the block
1848 # device between when these calls are executed is undefined.
1850 # Notes: It is strongly recommended that this interface is not used especially
1851 # for changing block devices.
1855 { 'command': 'change',
1856 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1859 # @block_set_io_throttle:
1861 # Change I/O throttle limits for a block drive.
1863 # @device: The name of the device
1865 # @bps: total throughput limit in bytes per second
1867 # @bps_rd: read throughput limit in bytes per second
1869 # @bps_wr: write throughput limit in bytes per second
1871 # @iops: total I/O operations per second
1873 # @ops_rd: read I/O operations per second
1875 # @iops_wr: write I/O operations per second
1877 # Returns: Nothing on success
1878 # If @device is not a valid block device, DeviceNotFound
1882 { 'command': 'block_set_io_throttle',
1883 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1884 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1889 # Copy data from a backing file into a block device.
1891 # The block streaming operation is performed in the background until the entire
1892 # backing file has been copied. This command returns immediately once streaming
1893 # has started. The status of ongoing block streaming operations can be checked
1894 # with query-block-jobs. The operation can be stopped before it has completed
1895 # using the block-job-cancel command.
1897 # If a base file is specified then sectors are not copied from that base file and
1898 # its backing chain. When streaming completes the image file will have the base
1899 # file as its backing file. This can be used to stream a subset of the backing
1900 # file chain instead of flattening the entire image.
1902 # On successful completion the image file is updated to drop the backing file
1903 # and the BLOCK_JOB_COMPLETED event is emitted.
1905 # @device: the device name
1907 # @base: #optional the common backing file name
1909 # @speed: #optional the maximum speed, in bytes per second
1911 # @on-error: #optional the action to take on an error (default report).
1912 # 'stop' and 'enospc' can only be used if the block device
1913 # supports io-status (see BlockInfo). Since 1.3.
1915 # Returns: Nothing on success
1916 # If @device does not exist, DeviceNotFound
1920 { 'command': 'block-stream',
1921 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
1922 '*on-error': 'BlockdevOnError' } }
1925 # @block-job-set-speed:
1927 # Set maximum speed for a background block operation.
1929 # This command can only be issued when there is an active block job.
1931 # Throttling can be disabled by setting the speed to 0.
1933 # @device: the device name
1935 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1938 # Returns: Nothing on success
1939 # If no background operation is active on this device, DeviceNotActive
1943 { 'command': 'block-job-set-speed',
1944 'data': { 'device': 'str', 'speed': 'int' } }
1947 # @block-job-cancel:
1949 # Stop an active background block operation.
1951 # This command returns immediately after marking the active background block
1952 # operation for cancellation. It is an error to call this command if no
1953 # operation is in progress.
1955 # The operation will cancel as soon as possible and then emit the
1956 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1957 # enumerated using query-block-jobs.
1959 # For streaming, the image file retains its backing file unless the streaming
1960 # operation happens to complete just as it is being cancelled. A new streaming
1961 # operation can be started at a later time to finish copying all data from the
1964 # @device: the device name
1966 # @force: #optional whether to allow cancellation of a paused job (default
1967 # false). Since 1.3.
1969 # Returns: Nothing on success
1970 # If no background operation is active on this device, DeviceNotActive
1974 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
1979 # Pause an active background block operation.
1981 # This command returns immediately after marking the active background block
1982 # operation for pausing. It is an error to call this command if no
1983 # operation is in progress. Pausing an already paused job has no cumulative
1984 # effect; a single block-job-resume command will resume the job.
1986 # The operation will pause as soon as possible. No event is emitted when
1987 # the operation is actually paused. Cancelling a paused job automatically
1990 # @device: the device name
1992 # Returns: Nothing on success
1993 # If no background operation is active on this device, DeviceNotActive
1997 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2000 # @block-job-resume:
2002 # Resume an active background block operation.
2004 # This command returns immediately after resuming a paused background block
2005 # operation. It is an error to call this command if no operation is in
2006 # progress. Resuming an already running job is not an error.
2008 # This command also clears the error status of the job.
2010 # @device: the device name
2012 # Returns: Nothing on success
2013 # If no background operation is active on this device, DeviceNotActive
2017 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2022 # This structure describes a search result from @qom-list-types
2024 # @name: the type name found in the search
2028 # Notes: This command is experimental and may change syntax in future releases.
2030 { 'type': 'ObjectTypeInfo',
2031 'data': { 'name': 'str' } }
2036 # This command will return a list of types given search parameters
2038 # @implements: if specified, only return types that implement this type name
2040 # @abstract: if true, include abstract types in the results
2042 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2046 { 'command': 'qom-list-types',
2047 'data': { '*implements': 'str', '*abstract': 'bool' },
2048 'returns': [ 'ObjectTypeInfo' ] }
2051 # @DevicePropertyInfo:
2053 # Information about device properties.
2055 # @name: the name of the property
2056 # @type: the typename of the property
2060 { 'type': 'DevicePropertyInfo',
2061 'data': { 'name': 'str', 'type': 'str' } }
2064 # @device-list-properties:
2066 # List properties associated with a device.
2068 # @typename: the type name of a device
2070 # Returns: a list of DevicePropertyInfo describing a devices properties
2074 { 'command': 'device-list-properties',
2075 'data': { 'typename': 'str'},
2076 'returns': [ 'DevicePropertyInfo' ] }
2081 # Migrates the current running guest to another Virtual Machine.
2083 # @uri: the Uniform Resource Identifier of the destination VM
2085 # @blk: #optional do block migration (full disk copy)
2087 # @inc: #optional incremental disk copy migration
2089 # @detach: this argument exists only for compatibility reasons and
2090 # is ignored by QEMU
2092 # Returns: nothing on success
2096 { 'command': 'migrate',
2097 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2099 # @xen-save-devices-state:
2101 # Save the state of all devices to file. The RAM and the block devices
2102 # of the VM are not saved by this command.
2104 # @filename: the file to save the state of the devices to as binary
2105 # data. See xen-save-devices-state.txt for a description of the binary
2108 # Returns: Nothing on success
2112 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2115 # @xen-set-global-dirty-log
2117 # Enable or disable the global dirty log mode.
2119 # @enable: true to enable, false to disable.
2125 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2130 # Remove a device from a guest
2132 # @id: the name of the device
2134 # Returns: Nothing on success
2135 # If @id is not a valid device, DeviceNotFound
2137 # Notes: When this command completes, the device may not be removed from the
2138 # guest. Hot removal is an operation that requires guest cooperation.
2139 # This command merely requests that the guest begin the hot removal
2144 { 'command': 'device_del', 'data': {'id': 'str'} }
2147 # @dump-guest-memory
2149 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2150 # very long depending on the amount of guest memory. This command is only
2151 # supported on i386 and x86_64.
2153 # @paging: if true, do paging to get guest's memory mapping. This allows
2154 # using gdb to process the core file.
2156 # IMPORTANT: this option can make QEMU allocate several gigabytes
2157 # of RAM. This can happen for a large guest, or a
2158 # malicious guest pretending to be large.
2160 # Also, paging=true has the following limitations:
2162 # 1. The guest may be in a catastrophic state or can have corrupted
2163 # memory, which cannot be trusted
2164 # 2. The guest can be in real-mode even if paging is enabled. For
2165 # example, the guest uses ACPI to sleep, and ACPI sleep state
2168 # @protocol: the filename or file descriptor of the vmcore. The supported
2171 # 1. file: the protocol starts with "file:", and the following
2172 # string is the file's path.
2173 # 2. fd: the protocol starts with "fd:", and the following string
2176 # @begin: #optional if specified, the starting physical address.
2178 # @length: #optional if specified, the memory size, in bytes. If you don't
2179 # want to dump all guest's memory, please specify the start @begin
2182 # Returns: nothing on success
2186 { 'command': 'dump-guest-memory',
2187 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2188 '*length': 'int' } }
2193 # Add a network backend.
2195 # @type: the type of network backend. Current valid values are 'user', 'tap',
2196 # 'vde', 'socket', 'dump' and 'bridge'
2198 # @id: the name of the new network backend
2200 # @props: #optional a list of properties to be passed to the backend in
2201 # the format 'name=value', like 'ifname=tap0,script=no'
2203 # Notes: The semantics of @props is not well defined. Future commands will be
2204 # introduced that provide stronger typing for backend creation.
2208 # Returns: Nothing on success
2209 # If @type is not a valid network backend, DeviceNotFound
2211 { 'command': 'netdev_add',
2212 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2218 # Remove a network backend.
2220 # @id: the name of the network backend to remove
2222 # Returns: Nothing on success
2223 # If @id is not a valid network backend, DeviceNotFound
2227 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2230 # @NetdevNoneOptions
2232 # Use it alone to have zero network devices.
2236 { 'type': 'NetdevNoneOptions',
2240 # @NetLegacyNicOptions
2242 # Create a new Network Interface Card.
2244 # @netdev: #optional id of -netdev to connect to
2246 # @macaddr: #optional MAC address
2248 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2250 # @addr: #optional PCI device address
2252 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2256 { 'type': 'NetLegacyNicOptions',
2262 '*vectors': 'uint32' } }
2267 # A fat type wrapping 'str', to be embedded in lists.
2276 # @NetdevUserOptions
2278 # Use the user mode network stack which requires no administrator privilege to
2281 # @hostname: #optional client hostname reported by the builtin DHCP server
2283 # @restrict: #optional isolate the guest from the host
2285 # @ip: #optional legacy parameter, use net= instead
2287 # @net: #optional IP address and optional netmask
2289 # @host: #optional guest-visible address of the host
2291 # @tftp: #optional root directory of the built-in TFTP server
2293 # @bootfile: #optional BOOTP filename, for use with tftp=
2295 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2298 # @dns: #optional guest-visible address of the virtual nameserver
2300 # @smb: #optional root directory of the built-in SMB server
2302 # @smbserver: #optional IP address of the built-in SMB server
2304 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2307 # @guestfwd: #optional forward guest TCP connections
2311 { 'type': 'NetdevUserOptions',
2314 '*restrict': 'bool',
2320 '*dhcpstart': 'str',
2323 '*smbserver': 'str',
2324 '*hostfwd': ['String'],
2325 '*guestfwd': ['String'] } }
2330 # Connect the host TAP network interface name to the VLAN.
2332 # @ifname: #optional interface name
2334 # @fd: #optional file descriptor of an already opened tap
2336 # @script: #optional script to initialize the interface
2338 # @downscript: #optional script to shut down the interface
2340 # @helper: #optional command to execute to configure bridge
2342 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2344 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2346 # @vhost: #optional enable vhost-net network accelerator
2348 # @vhostfd: #optional file descriptor of an already opened vhost net device
2350 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2354 { 'type': 'NetdevTapOptions',
2359 '*downscript': 'str',
2362 '*vnet_hdr': 'bool',
2365 '*vhostforce': 'bool' } }
2368 # @NetdevSocketOptions
2370 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2371 # socket connection.
2373 # @fd: #optional file descriptor of an already opened socket
2375 # @listen: #optional port number, and optional hostname, to listen on
2377 # @connect: #optional port number, and optional hostname, to connect to
2379 # @mcast: #optional UDP multicast address and port number
2381 # @localaddr: #optional source address and port for multicast and udp packets
2383 # @udp: #optional UDP unicast address and port number
2387 { 'type': 'NetdevSocketOptions',
2393 '*localaddr': 'str',
2399 # Connect the VLAN to a vde switch running on the host.
2401 # @sock: #optional socket path
2403 # @port: #optional port number
2405 # @group: #optional group owner of socket
2407 # @mode: #optional permissions for socket
2411 { 'type': 'NetdevVdeOptions',
2416 '*mode': 'uint16' } }
2419 # @NetdevDumpOptions
2421 # Dump VLAN network traffic to a file.
2423 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2426 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2430 { 'type': 'NetdevDumpOptions',
2436 # @NetdevBridgeOptions
2438 # Connect a host TAP network interface to a host bridge device.
2440 # @br: #optional bridge name
2442 # @helper: #optional command to execute to configure bridge
2446 { 'type': 'NetdevBridgeOptions',
2449 '*helper': 'str' } }
2452 # @NetdevHubPortOptions
2454 # Connect two or more net clients through a software hub.
2456 # @hubid: hub identifier number
2460 { 'type': 'NetdevHubPortOptions',
2462 'hubid': 'int32' } }
2467 # A discriminated record of network device traits.
2471 { 'union': 'NetClientOptions',
2473 'none': 'NetdevNoneOptions',
2474 'nic': 'NetLegacyNicOptions',
2475 'user': 'NetdevUserOptions',
2476 'tap': 'NetdevTapOptions',
2477 'socket': 'NetdevSocketOptions',
2478 'vde': 'NetdevVdeOptions',
2479 'dump': 'NetdevDumpOptions',
2480 'bridge': 'NetdevBridgeOptions',
2481 'hubport': 'NetdevHubPortOptions' } }
2486 # Captures the configuration of a network device; legacy.
2488 # @vlan: #optional vlan number
2490 # @id: #optional identifier for monitor commands
2492 # @name: #optional identifier for monitor commands, ignored if @id is present
2494 # @opts: device type specific properties (legacy)
2498 { 'type': 'NetLegacy',
2503 'opts': 'NetClientOptions' } }
2508 # Captures the configuration of a network device.
2510 # @id: identifier for monitor commands.
2512 # @opts: device type specific properties
2519 'opts': 'NetClientOptions' } }
2524 # Receive a file descriptor via SCM rights and assign it a name
2526 # @fdname: file descriptor name
2528 # Returns: Nothing on success
2532 # Notes: If @fdname already exists, the file descriptor assigned to
2533 # it will be closed and replaced by the received file
2535 # The 'closefd' command can be used to explicitly close the
2536 # file descriptor when it is no longer needed.
2538 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2543 # Close a file descriptor previously passed via SCM rights
2545 # @fdname: file descriptor name
2547 # Returns: Nothing on success
2551 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2556 # Information describing a machine.
2558 # @name: the name of the machine
2560 # @alias: #optional an alias for the machine name
2562 # @default: #optional whether the machine is default
2566 { 'type': 'MachineInfo',
2567 'data': { 'name': 'str', '*alias': 'str',
2568 '*is-default': 'bool' } }
2573 # Return a list of supported machines
2575 # Returns: a list of MachineInfo
2579 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2582 # @CpuDefinitionInfo:
2584 # Virtual CPU definition.
2586 # @name: the name of the CPU definition
2590 { 'type': 'CpuDefinitionInfo',
2591 'data': { 'name': 'str' } }
2594 # @query-cpu-definitions:
2596 # Return a list of supported virtual CPU definitions
2598 # Returns: a list of CpuDefInfo
2602 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2606 # Information about a file descriptor that was added to an fd set.
2608 # @fdset-id: The ID of the fd set that @fd was added to.
2610 # @fd: The file descriptor that was received via SCM rights and
2611 # added to the fd set.
2615 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2620 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2622 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2624 # @opaque: #optional A free-form string that can be used to describe the fd.
2626 # Returns: @AddfdInfo on success
2627 # If file descriptor was not received, FdNotSupplied
2628 # If @fdset-id does not exist, InvalidParameterValue
2630 # Notes: The list of fd sets is shared by all monitor connections.
2632 # If @fdset-id is not specified, a new fd set will be created.
2636 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2637 'returns': 'AddfdInfo' }
2642 # Remove a file descriptor from an fd set.
2644 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2646 # @fd: #optional The file descriptor that is to be removed.
2648 # Returns: Nothing on success
2649 # If @fdset-id or @fd is not found, FdNotFound
2653 # Notes: The list of fd sets is shared by all monitor connections.
2655 # If @fd is not specified, all file descriptors in @fdset-id
2658 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2663 # Information about a file descriptor that belongs to an fd set.
2665 # @fd: The file descriptor value.
2667 # @opaque: #optional A free-form string that can be used to describe the fd.
2671 { 'type': 'FdsetFdInfo',
2672 'data': {'fd': 'int', '*opaque': 'str'} }
2677 # Information about an fd set.
2679 # @fdset-id: The ID of the fd set.
2681 # @fds: A list of file descriptors that belong to this fd set.
2685 { 'type': 'FdsetInfo',
2686 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2691 # Return information describing all fd sets.
2693 # Returns: A list of @FdsetInfo
2697 # Note: The list of fd sets is shared by all monitor connections.
2700 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2705 # Target CPU emulation type
2707 # These parameters correspond to the softmmu binary CPU name that is currently
2712 { 'enum': 'TargetType',
2713 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2714 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2715 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2716 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2721 # Information describing the QEMU target.
2723 # @arch: the target architecture (eg "x86_64", "i386", etc)
2727 { 'type': 'TargetInfo',
2728 'data': { 'arch': 'TargetType' } }
2733 # Return information about the target for this QEMU
2735 # Returns: TargetInfo
2739 { 'command': 'query-target', 'returns': 'TargetInfo' }
2744 # An enumeration of key name.
2746 # This is used by the send-key command.
2750 { 'enum': 'QKeyCode',
2751 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2752 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2753 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2754 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2755 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2756 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2757 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2758 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2759 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2760 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2761 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2762 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2763 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2764 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2765 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2770 # Represents a keyboard key.
2774 { 'union': 'KeyValue',
2777 'qcode': 'QKeyCode' } }
2782 # Send keys to guest.
2784 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
2785 # simultaneously sent to the guest. A @KeyValue.number value is sent
2786 # directly to the guest, while @KeyValue.qcode must be a valid
2789 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2792 # Returns: Nothing on success
2793 # If key is unknown or redundant, InvalidParameter
2798 { 'command': 'send-key',
2799 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
2804 # Write a PPM of the VGA screen to a file.
2806 # @filename: the path of a new PPM file to store the image
2808 # Returns: Nothing on success
2812 { 'command': 'screendump', 'data': {'filename': 'str'} }