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 # Guest name information.
40 # @name: #optional The name of the guest
44 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
49 # Return the name information of a guest.
51 # Returns: @NameInfo of the guest
55 { 'command': 'query-name', 'returns': 'NameInfo' }
60 # A description of QEMU's version.
62 # @qemu.major: The major version of QEMU
64 # @qemu.minor: The minor version of QEMU
66 # @qemu.micro: The micro version of QEMU. By current convention, a micro
67 # version of 50 signifies a development branch. A micro version
68 # greater than or equal to 90 signifies a release candidate for
69 # the next minor version. A micro version of less than 50
70 # signifies a stable release.
72 # @package: QEMU will always set this field to an empty string. Downstream
73 # versions of QEMU should set this to a non-empty string. The
74 # exact format depends on the downstream however it highly
75 # recommended that a unique name is used.
79 { 'type': 'VersionInfo',
80 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
86 # Returns the current version of QEMU.
88 # Returns: A @VersionInfo object describing the current version of QEMU.
92 { 'command': 'query-version', 'returns': 'VersionInfo' }
97 # Information about support for KVM acceleration
99 # @enabled: true if KVM acceleration is active
101 # @present: true if KVM acceleration is built into this executable
105 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
110 # Returns information about KVM acceleration
116 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
121 # An enumation of VM run states.
123 # @debug: QEMU is running on a debugger
125 # @finish-migrate: guest is paused to finish the migration process
127 # @inmigrate: guest is paused waiting for an incoming migration
129 # @internal-error: An internal error that prevents further guest execution
132 # @io-error: the last IOP has failed and the device is configured to pause
135 # @paused: guest has been paused via the 'stop' command
137 # @postmigrate: guest is paused following a successful 'migrate'
139 # @prelaunch: QEMU was started with -S and guest has not started
141 # @restore-vm: guest is paused to restore VM state
143 # @running: guest is actively running
145 # @save-vm: guest is paused to save the VM state
147 # @shutdown: guest is shut down (and -no-shutdown is in use)
149 # @suspended: guest is suspended (ACPI S3)
151 # @watchdog: the watchdog action is configured to pause and has been triggered
153 { 'enum': 'RunState',
154 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
155 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
156 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
161 # Information about VCPU run state
163 # @running: true if all VCPUs are runnable, false if not runnable
165 # @singlestep: true if VCPUs are in single-step mode
167 # @status: the virtual machine @RunState
171 # Notes: @singlestep is enabled through the GDB stub
173 { 'type': 'StatusInfo',
174 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
179 # Query the run status of all VCPUs
181 # Returns: @StatusInfo reflecting all VCPUs
185 { 'command': 'query-status', 'returns': 'StatusInfo' }
190 # Guest UUID information.
192 # @UUID: the UUID of the guest
196 # Notes: If no UUID was specified for the guest, a null UUID is returned.
198 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
203 # Query the guest UUID information.
205 # Returns: The @UuidInfo for the guest
209 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
214 # Information about a character device.
216 # @label: the label of the character device
218 # @filename: the filename of the character device
220 # Notes: @filename is encoded using the QEMU command line character device
221 # encoding. See the QEMU man page for details.
225 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
230 # Returns information about current character devices.
232 # Returns: a list of @ChardevInfo
236 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
241 # Information about a QMP command
243 # @name: The command name
247 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
252 # Return a list of supported QMP commands by this server
254 # Returns: A list of @CommandInfo for all supported commands
258 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
263 # Information about a QMP event
265 # @name: The event name
269 { 'type': 'EventInfo', 'data': {'name': 'str'} }
274 # Return a list of supported QMP events by this server
276 # Returns: A list of @EventInfo for all supported events
280 { 'command': 'query-events', 'returns': ['EventInfo'] }
285 # Detailed migration status.
287 # @transferred: amount of bytes already transferred to the target VM
289 # @remaining: amount of bytes remaining to be transferred to the target VM
291 # @total: total amount of bytes involved in the migration process
293 # @duplicate: number of duplicate pages (since 1.2)
295 # @normal : number of normal pages (since 1.2)
297 # @normal-bytes : number of normal bytes sent (since 1.2)
301 { 'type': 'MigrationStats',
302 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
303 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int' } }
308 # Detailed XBZRLE migration cache statistics
310 # @cache-size: XBZRLE cache size
312 # @bytes: amount of bytes already transferred to the target VM
314 # @pages: amount of pages transferred to the target VM
316 # @cache-miss: number of cache miss
318 # @overflow: number of overflows
322 { 'type': 'XBZRLECacheStats',
323 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
324 'cache-miss': 'int', 'overflow': 'int' } }
329 # Information about current migration process.
331 # @status: #optional string describing the current migration status.
332 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
333 # 'cancelled'. If this field is not returned, no migration process
336 # @ram: #optional @MigrationStats containing detailed migration
337 # status, only returned if status is 'active' or
338 # 'completed'. 'comppleted' (since 1.2)
340 # @disk: #optional @MigrationStats containing detailed disk migration
341 # status, only returned if status is 'active' and it is a block
344 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
345 # migration statistics, only returned if XBZRLE feature is on and
346 # status is 'active' or 'completed' (since 1.2)
348 # @total-time: #optional total amount of milliseconds since migration started.
349 # If migration has ended, it returns the total migration
354 { 'type': 'MigrationInfo',
355 'data': {'*status': 'str', '*ram': 'MigrationStats',
356 '*disk': 'MigrationStats',
357 '*xbzrle-cache': 'XBZRLECacheStats',
358 '*total-time': 'int'} }
363 # Returns information about current migration process.
365 # Returns: @MigrationInfo
369 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
372 # @MigrationCapability
374 # Migration capabilities enumeration
376 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
377 # This feature allows us to minimize migration traffic for certain work
378 # loads, by sending compressed difference of the pages
382 { 'enum': 'MigrationCapability',
386 # @MigrationCapabilityStatus
388 # Migration capability information
390 # @capability: capability enum
392 # @state: capability state bool
396 { 'type': 'MigrationCapabilityStatus',
397 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
400 # @migrate-set-capabilities
402 # Enable/Disable the following migration capabilities (like xbzrle)
404 # @capabilities: json array of capability modifications to make
408 { 'command': 'migrate-set-capabilities',
409 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
412 # @query-migrate-capabilities
414 # Returns information about the current migration capabilities status
416 # Returns: @MigrationCapabilitiesStatus
420 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
425 # Information about a mouse device.
427 # @name: the name of the mouse device
429 # @index: the index of the mouse device
431 # @current: true if this device is currently receiving mouse events
433 # @absolute: true if this device supports absolute coordinates as input
437 { 'type': 'MouseInfo',
438 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
439 'absolute': 'bool'} }
444 # Returns information about each active mouse device
446 # Returns: a list of @MouseInfo for each device
450 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
455 # Information about a virtual CPU
457 # @CPU: the index of the virtual CPU
459 # @current: this only exists for backwards compatible and should be ignored
461 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
462 # to a processor specific low power mode.
464 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
466 # If the target is Sparc, this is the PC component of the
467 # instruction pointer.
469 # @nip: #optional If the target is PPC, the instruction pointer
471 # @npc: #optional If the target is Sparc, the NPC component of the instruction
474 # @PC: #optional If the target is MIPS, the instruction pointer
476 # @thread_id: ID of the underlying host thread
480 # Notes: @halted is a transient state that changes frequently. By the time the
481 # data is sent to the client, the guest may no longer be halted.
484 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
485 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
490 # Returns a list of information about each virtual CPU.
492 # Returns: a list of @CpuInfo for each virtual CPU
496 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
501 # Information about the backing device for a block device.
503 # @file: the filename of the backing device
505 # @ro: true if the backing device was open read-only
507 # @drv: the name of the block format used to open the backing device. As of
508 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
509 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
510 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
511 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
513 # @backing_file: #optional the name of the backing file (for copy-on-write)
515 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
517 # @encrypted: true if the backing device is encrypted
519 # @encryption_key_missing: true if the backing device is encrypted but an
520 # valid encryption key is missing
522 # @bps: total throughput limit in bytes per second is specified
524 # @bps_rd: read throughput limit in bytes per second is specified
526 # @bps_wr: write throughput limit in bytes per second is specified
528 # @iops: total I/O operations per second is specified
530 # @iops_rd: read I/O operations per second is specified
532 # @iops_wr: write I/O operations per second is specified
536 # Notes: This interface is only found in @BlockInfo.
538 { 'type': 'BlockDeviceInfo',
539 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
540 '*backing_file': 'str', 'backing_file_depth': 'int',
541 'encrypted': 'bool', 'encryption_key_missing': 'bool',
542 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
543 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
546 # @BlockDeviceIoStatus:
548 # An enumeration of block device I/O status.
550 # @ok: The last I/O operation has succeeded
552 # @failed: The last I/O operation has failed
554 # @nospace: The last I/O operation has failed due to a no-space condition
558 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
563 # Block device information. This structure describes a virtual device and
564 # the backing device associated with it.
566 # @device: The device name associated with the virtual device.
568 # @type: This field is returned only for compatibility reasons, it should
569 # not be used (always returns 'unknown')
571 # @removable: True if the device supports removable media.
573 # @locked: True if the guest has locked this device from having its media
576 # @tray_open: #optional True if the device has a tray and it is open
577 # (only present if removable is true)
579 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
580 # supports it and the VM is configured to stop on errors
582 # @inserted: #optional @BlockDeviceInfo describing the device if media is
587 { 'type': 'BlockInfo',
588 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
589 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
590 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
595 # Get a list of BlockInfo for all virtual block devices.
597 # Returns: a list of @BlockInfo describing each virtual block device
601 { 'command': 'query-block', 'returns': ['BlockInfo'] }
606 # Statistics of a virtual block device or a block backing device.
608 # @rd_bytes: The number of bytes read by the device.
610 # @wr_bytes: The number of bytes written by the device.
612 # @rd_operations: The number of read operations performed by the device.
614 # @wr_operations: The number of write operations performed by the device.
616 # @flush_operations: The number of cache flush operations performed by the
617 # device (since 0.15.0)
619 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
622 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
624 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
626 # @wr_highest_offset: The offset after the greatest byte written to the
627 # device. The intended use of this information is for
628 # growable sparse files (like qcow2) that are used on top
629 # of a physical device.
633 { 'type': 'BlockDeviceStats',
634 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
635 'wr_operations': 'int', 'flush_operations': 'int',
636 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
637 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
642 # Statistics of a virtual block device or a block backing device.
644 # @device: #optional If the stats are for a virtual block device, the name
645 # corresponding to the virtual block device.
647 # @stats: A @BlockDeviceStats for the device.
649 # @parent: #optional This may point to the backing block device if this is a
650 # a virtual block device. If it's a backing block, this will point
651 # to the backing file is one is present.
655 { 'type': 'BlockStats',
656 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
657 '*parent': 'BlockStats'} }
662 # Query the @BlockStats for all virtual block devices.
664 # Returns: A list of @BlockStats for each virtual block devices.
668 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
673 # Information about a connected VNC client.
675 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
678 # @family: 'ipv6' if the client is connected via IPv6 and TCP
679 # 'ipv4' if the client is connected via IPv4 and TCP
680 # 'unix' if the client is connected via a unix domain socket
681 # 'unknown' otherwise
683 # @service: The service name of the client's port. This may depends on the
684 # host system's service database so symbolic names should not be
687 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
688 # Name of the client.
690 # @sasl_username: #optional If SASL authentication is in use, the SASL username
691 # used for authentication.
695 { 'type': 'VncClientInfo',
696 'data': {'host': 'str', 'family': 'str', 'service': 'str',
697 '*x509_dname': 'str', '*sasl_username': 'str'} }
702 # Information about the VNC session.
704 # @enabled: true if the VNC server is enabled, false otherwise
706 # @host: #optional The hostname the VNC server is bound to. This depends on
707 # the name resolution on the host and may be an IP address.
709 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
710 # 'ipv4' if the host is listening for IPv4 connections
711 # 'unix' if the host is listening on a unix domain socket
712 # 'unknown' otherwise
714 # @service: #optional The service name of the server's port. This may depends
715 # on the host system's service database so symbolic names should not
718 # @auth: #optional the current authentication type used by the server
719 # 'none' if no authentication is being used
720 # 'vnc' if VNC authentication is being used
721 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
722 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
723 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
724 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
725 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
726 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
727 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
728 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
729 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
731 # @clients: a list of @VncClientInfo of all currently connected clients
736 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
737 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
742 # Returns information about the current VNC server
748 { 'command': 'query-vnc', 'returns': 'VncInfo' }
753 # Information about a SPICE client channel.
755 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
758 # @family: 'ipv6' if the client is connected via IPv6 and TCP
759 # 'ipv4' if the client is connected via IPv4 and TCP
760 # 'unix' if the client is connected via a unix domain socket
761 # 'unknown' otherwise
763 # @port: The client's port number.
765 # @connection-id: SPICE connection id number. All channels with the same id
766 # belong to the same SPICE session.
768 # @connection-type: SPICE channel type number. "1" is the main control
769 # channel, filter for this one if you want to track spice
772 # @channel-id: SPICE channel ID number. Usually "0", might be different when
773 # multiple channels of the same type exist, such as multiple
774 # display channels in a multihead setup
776 # @tls: true if the channel is encrypted, false otherwise.
780 { 'type': 'SpiceChannel',
781 'data': {'host': 'str', 'family': 'str', 'port': 'str',
782 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
786 # @SpiceQueryMouseMode
788 # An enumation of Spice mouse states.
790 # @client: Mouse cursor position is determined by the client.
792 # @server: Mouse cursor position is determined by the server.
794 # @unknown: No information is available about mouse mode used by
797 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
801 { 'enum': 'SpiceQueryMouseMode',
802 'data': [ 'client', 'server', 'unknown' ] }
807 # Information about the SPICE session.
809 # @enabled: true if the SPICE server is enabled, false otherwise
811 # @migrated: true if the last guest migration completed and spice
812 # migration had completed as well. false otherwise.
814 # @host: #optional The hostname the SPICE server is bound to. This depends on
815 # the name resolution on the host and may be an IP address.
817 # @port: #optional The SPICE server's port number.
819 # @compiled-version: #optional SPICE server version.
821 # @tls-port: #optional The SPICE server's TLS port number.
823 # @auth: #optional the current authentication type used by the server
824 # 'none' if no authentication is being used
825 # 'spice' uses SASL or direct TLS authentication, depending on command
828 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
829 # be determined by the client or the server, or unknown if spice
830 # server doesn't provide this information.
834 # @channels: a list of @SpiceChannel for each active spice channel
838 { 'type': 'SpiceInfo',
839 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
840 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
841 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
846 # Returns information about the current SPICE server
848 # Returns: @SpiceInfo
852 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
857 # Information about the guest balloon device.
859 # @actual: the number of bytes the balloon currently contains
861 # @mem_swapped_in: #optional number of pages swapped in within the guest
863 # @mem_swapped_out: #optional number of pages swapped out within the guest
865 # @major_page_faults: #optional number of major page faults within the guest
867 # @minor_page_faults: #optional number of minor page faults within the guest
869 # @free_mem: #optional amount of memory (in bytes) free in the guest
871 # @total_mem: #optional amount of memory (in bytes) visible to the guest
875 # Notes: all current versions of QEMU do not fill out optional information in
878 { 'type': 'BalloonInfo',
879 'data': {'actual': 'int', '*mem_swapped_in': 'int',
880 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
881 '*minor_page_faults': 'int', '*free_mem': 'int',
882 '*total_mem': 'int'} }
887 # Return information about the balloon device.
889 # Returns: @BalloonInfo on success
890 # If the balloon driver is enabled but not functional because the KVM
891 # kernel module cannot support it, KvmMissingCap
892 # If no balloon device is present, DeviceNotActive
896 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
901 # A PCI device memory region
903 # @base: the starting address (guest physical)
905 # @limit: the ending address (guest physical)
909 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
914 # Information about a PCI device I/O region.
916 # @bar: the index of the Base Address Register for this region
918 # @type: 'io' if the region is a PIO region
919 # 'memory' if the region is a MMIO region
921 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
923 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
927 { 'type': 'PciMemoryRegion',
928 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
929 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
934 # Information about a PCI Bridge device
936 # @bus.number: primary bus interface number. This should be the number of the
937 # bus the device resides on.
939 # @bus.secondary: secondary bus interface number. This is the number of the
940 # main bus for the bridge
942 # @bus.subordinate: This is the highest number bus that resides below the
945 # @bus.io_range: The PIO range for all devices on this bridge
947 # @bus.memory_range: The MMIO range for all devices on this bridge
949 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
952 # @devices: a list of @PciDeviceInfo for each device on this bridge
956 { 'type': 'PciBridgeInfo',
957 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
958 'io_range': 'PciMemoryRange',
959 'memory_range': 'PciMemoryRange',
960 'prefetchable_range': 'PciMemoryRange' },
961 '*devices': ['PciDeviceInfo']} }
966 # Information about a PCI device
968 # @bus: the bus number of the device
970 # @slot: the slot the device is located in
972 # @function: the function of the slot used by the device
974 # @class_info.desc: #optional a string description of the device's class
976 # @class_info.class: the class code of the device
978 # @id.device: the PCI device id
980 # @id.vendor: the PCI vendor id
982 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
984 # @qdev_id: the device name of the PCI device
986 # @pci_bridge: if the device is a PCI bridge, the bridge information
988 # @regions: a list of the PCI I/O regions associated with the device
990 # Notes: the contents of @class_info.desc are not stable and should only be
991 # treated as informational.
995 { 'type': 'PciDeviceInfo',
996 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
997 'class_info': {'*desc': 'str', 'class': 'int'},
998 'id': {'device': 'int', 'vendor': 'int'},
999 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1000 'regions': ['PciMemoryRegion']} }
1005 # Information about a PCI bus
1007 # @bus: the bus index
1009 # @devices: a list of devices on this bus
1013 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1018 # Return information about the PCI bus topology of the guest.
1020 # Returns: a list of @PciInfo for each PCI bus
1024 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1029 # Information about a long-running block device operation.
1031 # @type: the job type ('stream' for image streaming)
1033 # @device: the block device name
1035 # @len: the maximum progress value
1037 # @offset: the current progress value
1039 # @speed: the rate limit, bytes per second
1043 { 'type': 'BlockJobInfo',
1044 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1045 'offset': 'int', 'speed': 'int'} }
1048 # @query-block-jobs:
1050 # Return information about long-running block device operations.
1052 # Returns: a list of @BlockJobInfo for each active block job
1056 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1061 # This command will cause the QEMU process to exit gracefully. While every
1062 # attempt is made to send the QMP response before terminating, this is not
1063 # guaranteed. When using this interface, a premature EOF would not be
1068 { 'command': 'quit' }
1073 # Stop all guest VCPU execution.
1077 # Notes: This function will succeed even if the guest is already in the stopped
1080 { 'command': 'stop' }
1085 # Performs a hard reset of a guest.
1089 { 'command': 'system_reset' }
1092 # @system_powerdown:
1094 # Requests that a guest perform a powerdown operation.
1098 # Notes: A guest may or may not respond to this command. This command
1099 # returning does not indicate that a guest has accepted the request or
1100 # that it has shut down. Many guests will respond to this command by
1101 # prompting the user in some way.
1103 { 'command': 'system_powerdown' }
1108 # This command is a nop that is only provided for the purposes of compatibility.
1112 # Notes: Do not use this command.
1114 { 'command': 'cpu', 'data': {'index': 'int'} }
1119 # Save a portion of guest memory to a file.
1121 # @val: the virtual address of the guest to start from
1123 # @size: the size of memory region to save
1125 # @filename: the file to save the memory to as binary data
1127 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1128 # virtual address (defaults to CPU 0)
1130 # Returns: Nothing on success
1134 # Notes: Errors were not reliably returned until 1.1
1136 { 'command': 'memsave',
1137 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1142 # Save a portion of guest physical memory to a file.
1144 # @val: the physical address of the guest to start from
1146 # @size: the size of memory region to save
1148 # @filename: the file to save the memory to as binary data
1150 # Returns: Nothing on success
1154 # Notes: Errors were not reliably returned until 1.1
1156 { 'command': 'pmemsave',
1157 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1162 # Resume guest VCPU execution.
1166 # Returns: If successful, nothing
1167 # If the QEMU is waiting for an incoming migration, MigrationExpected
1168 # If QEMU was started with an encrypted block device and a key has
1169 # not yet been set, DeviceEncrypted.
1171 # Notes: This command will succeed if the guest is currently running.
1173 { 'command': 'cont' }
1178 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1184 { 'command': 'system_wakeup' }
1189 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1191 # Returns: If successful, nothing
1195 # Notes: Only x86 Virtual Machines support this command.
1197 { 'command': 'inject-nmi' }
1202 # Sets the link status of a virtual network adapter.
1204 # @name: the device name of the virtual network adapter
1206 # @up: true to set the link status to be up
1208 # Returns: Nothing on success
1209 # If @name is not a valid network device, DeviceNotFound
1213 # Notes: Not all network adapters support setting link status. This command
1214 # will succeed even if the network adapter does not support link status
1217 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1222 # This command sets the password of a block device that has not been open
1223 # with a password and requires one.
1225 # The two cases where this can happen are a block device is created through
1226 # QEMU's initial command line or a block device is changed through the legacy
1227 # @change interface.
1229 # In the event that the block device is created through the initial command
1230 # line, the VM will start in the stopped state regardless of whether '-S' is
1231 # used. The intention is for a management tool to query the block devices to
1232 # determine which ones are encrypted, set the passwords with this command, and
1233 # then start the guest with the @cont command.
1235 # @device: the name of the device to set the password on
1237 # @password: the password to use for the device
1239 # Returns: nothing on success
1240 # If @device is not a valid block device, DeviceNotFound
1241 # If @device is not encrypted, DeviceNotEncrypted
1243 # Notes: Not all block formats support encryption and some that do are not
1244 # able to validate that a password is correct. Disk corruption may
1245 # occur if an invalid password is specified.
1249 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1254 # Request the balloon driver to change its balloon size.
1256 # @value: the target size of the balloon in bytes
1258 # Returns: Nothing on success
1259 # If the balloon driver is enabled but not functional because the KVM
1260 # kernel module cannot support it, KvmMissingCap
1261 # If no balloon device is present, DeviceNotActive
1263 # Notes: This command just issues a request to the guest. When it returns,
1264 # the balloon size may not have changed. A guest can change the balloon
1265 # size independent of this command.
1269 { 'command': 'balloon', 'data': {'value': 'int'} }
1274 # Resize a block image while a guest is running.
1276 # @device: the name of the device to get the image resized
1278 # @size: new image size in bytes
1280 # Returns: nothing on success
1281 # If @device is not a valid block device, DeviceNotFound
1285 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1290 # An enumeration that tells QEMU how to set the backing file path in
1293 # @existing: QEMU should look for an existing image file.
1295 # @absolute-paths: QEMU should create a new image with absolute paths
1296 # for the backing file.
1300 { 'enum': 'NewImageMode'
1301 'data': [ 'existing', 'absolute-paths' ] }
1306 # @device: the name of the device to generate the snapshot from.
1308 # @snapshot-file: the target of the new image. A new file will be created.
1310 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1312 # @mode: #optional whether and how QEMU should create a new image, default is
1315 { 'type': 'BlockdevSnapshot',
1316 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1317 '*mode': 'NewImageMode' } }
1322 # A discriminated record of operations that can be performed with
1325 { 'union': 'BlockdevAction',
1327 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1333 # Atomically operate on a group of one or more block devices. If
1334 # any operation fails, then the entire set of actions will be
1335 # abandoned and the appropriate error returned. The only operation
1336 # supported is currently blockdev-snapshot-sync.
1339 # @BlockdevAction: information needed for the device snapshot
1341 # Returns: nothing on success
1342 # If @device is not a valid block device, DeviceNotFound
1344 # Note: The transaction aborts on the first failure. Therefore, there will
1345 # be only one device or snapshot file returned in an error condition, and
1346 # subsequent actions will not have been attempted.
1350 { 'command': 'transaction',
1351 'data': { 'actions': [ 'BlockdevAction' ] } }
1354 # @blockdev-snapshot-sync
1356 # Generates a synchronous snapshot of a block device.
1358 # @device: the name of the device to generate the snapshot from.
1360 # @snapshot-file: the target of the new image. If the file exists, or if it
1361 # is a device, the snapshot will be created in the existing
1362 # file/device. If does not exist, a new file will be created.
1364 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1366 # @mode: #optional whether and how QEMU should create a new image, default is
1369 # Returns: nothing on success
1370 # If @device is not a valid block device, DeviceNotFound
1374 { 'command': 'blockdev-snapshot-sync',
1375 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1376 '*mode': 'NewImageMode'} }
1379 # @human-monitor-command:
1381 # Execute a command on the human monitor and return the output.
1383 # @command-line: the command to execute in the human monitor
1385 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1387 # Returns: the output of the command as a string
1391 # Notes: This command only exists as a stop-gap. It's use is highly
1392 # discouraged. The semantics of this command are not guaranteed.
1394 # Known limitations:
1396 # o This command is stateless, this means that commands that depend
1397 # on state information (such as getfd) might not work
1399 # o Commands that prompt the user for data (eg. 'cont' when the block
1400 # device is encrypted) don't currently work
1402 { 'command': 'human-monitor-command',
1403 'data': {'command-line': 'str', '*cpu-index': 'int'},
1409 # Cancel the current executing migration process.
1411 # Returns: nothing on success
1413 # Notes: This command succeeds even if there is no migration process running.
1417 { 'command': 'migrate_cancel' }
1420 # @migrate_set_downtime
1422 # Set maximum tolerated downtime for migration.
1424 # @value: maximum downtime in seconds
1426 # Returns: nothing on success
1430 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1433 # @migrate_set_speed
1435 # Set maximum speed for migration.
1437 # @value: maximum speed in bytes.
1439 # Returns: nothing on success
1441 # Notes: A value lesser than zero will be automatically round up to zero.
1445 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1448 # @migrate-set-cache-size
1450 # Set XBZRLE cache size
1452 # @value: cache size in bytes
1454 # The size will be rounded down to the nearest power of 2.
1455 # The cache size can be modified before and during ongoing migration
1457 # Returns: nothing on success
1461 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1464 # @query-migrate-cache-size
1466 # query XBZRLE cache size
1468 # Returns: XBZRLE cache size in bytes
1472 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1475 # @ObjectPropertyInfo:
1477 # @name: the name of the property
1479 # @type: the type of the property. This will typically come in one of four
1482 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1483 # These types are mapped to the appropriate JSON type.
1485 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1486 # legacy qdev typename. These types are always treated as strings.
1488 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1489 # device type name. Child properties create the composition tree.
1491 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1492 # device type name. Link properties form the device model graph.
1496 { 'type': 'ObjectPropertyInfo',
1497 'data': { 'name': 'str', 'type': 'str' } }
1502 # This command will list any properties of a object given a path in the object
1505 # @path: the path within the object model. See @qom-get for a description of
1508 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1513 { 'command': 'qom-list',
1514 'data': { 'path': 'str' },
1515 'returns': [ 'ObjectPropertyInfo' ] }
1520 # This command will get a property from a object model path and return the
1523 # @path: The path within the object model. There are two forms of supported
1524 # paths--absolute and partial paths.
1526 # Absolute paths are derived from the root object and can follow child<>
1527 # or link<> properties. Since they can follow link<> properties, they
1528 # can be arbitrarily long. Absolute paths look like absolute filenames
1529 # and are prefixed with a leading slash.
1531 # Partial paths look like relative filenames. They do not begin
1532 # with a prefix. The matching rules for partial paths are subtle but
1533 # designed to make specifying objects easy. At each level of the
1534 # composition tree, the partial path is matched as an absolute path.
1535 # The first match is not returned. At least two matches are searched
1536 # for. A successful result is only returned if only one match is
1537 # found. If more than one match is found, a flag is return to
1538 # indicate that the match was ambiguous.
1540 # @property: The property name to read
1542 # Returns: The property value. The type depends on the property type. legacy<>
1543 # properties are returned as #str. child<> and link<> properties are
1544 # returns as #str pathnames. All integer property types (u8, u16, etc)
1545 # are returned as #int.
1549 { 'command': 'qom-get',
1550 'data': { 'path': 'str', 'property': 'str' },
1551 'returns': 'visitor',
1557 # This command will set a property from a object model path.
1559 # @path: see @qom-get for a description of this parameter
1561 # @property: the property name to set
1563 # @value: a value who's type is appropriate for the property type. See @qom-get
1564 # for a description of type mapping.
1568 { 'command': 'qom-set',
1569 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1575 # Sets the password of a remote display session.
1577 # @protocol: `vnc' to modify the VNC server password
1578 # `spice' to modify the Spice server password
1580 # @password: the new password
1582 # @connected: #optional how to handle existing clients when changing the
1583 # password. If nothing is specified, defaults to `keep'
1584 # `fail' to fail the command if clients are connected
1585 # `disconnect' to disconnect existing clients
1586 # `keep' to maintain existing clients
1588 # Returns: Nothing on success
1589 # If Spice is not enabled, DeviceNotFound
1593 { 'command': 'set_password',
1594 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1599 # Expire the password of a remote display server.
1601 # @protocol: the name of the remote display protocol `vnc' or `spice'
1603 # @time: when to expire the password.
1604 # `now' to expire the password immediately
1605 # `never' to cancel password expiration
1606 # `+INT' where INT is the number of seconds from now (integer)
1607 # `INT' where INT is the absolute time in seconds
1609 # Returns: Nothing on success
1610 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1614 # Notes: Time is relative to the server and currently there is no way to
1615 # coordinate server time with client time. It is not recommended to
1616 # use the absolute time version of the @time parameter unless you're
1617 # sure you are on the same machine as the QEMU instance.
1619 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1624 # Ejects a device from a removable drive.
1626 # @device: The name of the device
1628 # @force: @optional If true, eject regardless of whether the drive is locked.
1629 # If not specified, the default value is false.
1631 # Returns: Nothing on success
1632 # If @device is not a valid block device, DeviceNotFound
1634 # Notes: Ejecting a device will no media results in success
1638 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1641 # @change-vnc-password:
1643 # Change the VNC server password.
1645 # @target: the new password to use with VNC authentication
1649 # Notes: An empty password in this command will set the password to the empty
1650 # string. Existing clients are unaffected by executing this command.
1652 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1657 # This command is multiple commands multiplexed together.
1659 # @device: This is normally the name of a block device but it may also be 'vnc'.
1660 # when it's 'vnc', then sub command depends on @target
1662 # @target: If @device is a block device, then this is the new filename.
1663 # If @device is 'vnc', then if the value 'password' selects the vnc
1664 # change password command. Otherwise, this specifies a new server URI
1665 # address to listen to for VNC connections.
1667 # @arg: If @device is a block device, then this is an optional format to open
1669 # If @device is 'vnc' and @target is 'password', this is the new VNC
1670 # password to set. If this argument is an empty string, then no future
1671 # logins will be allowed.
1673 # Returns: Nothing on success.
1674 # If @device is not a valid block device, DeviceNotFound
1675 # If the new block device is encrypted, DeviceEncrypted. Note that
1676 # if this error is returned, the device has been opened successfully
1677 # and an additional call to @block_passwd is required to set the
1678 # device's password. The behavior of reads and writes to the block
1679 # device between when these calls are executed is undefined.
1681 # Notes: It is strongly recommended that this interface is not used especially
1682 # for changing block devices.
1686 { 'command': 'change',
1687 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1690 # @block_set_io_throttle:
1692 # Change I/O throttle limits for a block drive.
1694 # @device: The name of the device
1696 # @bps: total throughput limit in bytes per second
1698 # @bps_rd: read throughput limit in bytes per second
1700 # @bps_wr: write throughput limit in bytes per second
1702 # @iops: total I/O operations per second
1704 # @ops_rd: read I/O operations per second
1706 # @iops_wr: write I/O operations per second
1708 # Returns: Nothing on success
1709 # If @device is not a valid block device, DeviceNotFound
1713 { 'command': 'block_set_io_throttle',
1714 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1715 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1720 # Copy data from a backing file into a block device.
1722 # The block streaming operation is performed in the background until the entire
1723 # backing file has been copied. This command returns immediately once streaming
1724 # has started. The status of ongoing block streaming operations can be checked
1725 # with query-block-jobs. The operation can be stopped before it has completed
1726 # using the block-job-cancel command.
1728 # If a base file is specified then sectors are not copied from that base file and
1729 # its backing chain. When streaming completes the image file will have the base
1730 # file as its backing file. This can be used to stream a subset of the backing
1731 # file chain instead of flattening the entire image.
1733 # On successful completion the image file is updated to drop the backing file
1734 # and the BLOCK_JOB_COMPLETED event is emitted.
1736 # @device: the device name
1738 # @base: #optional the common backing file name
1740 # @speed: #optional the maximum speed, in bytes per second
1742 # Returns: Nothing on success
1743 # If @device does not exist, DeviceNotFound
1747 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1751 # @block-job-set-speed:
1753 # Set maximum speed for a background block operation.
1755 # This command can only be issued when there is an active block job.
1757 # Throttling can be disabled by setting the speed to 0.
1759 # @device: the device name
1761 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1764 # Returns: Nothing on success
1765 # If no background operation is active on this device, DeviceNotActive
1769 { 'command': 'block-job-set-speed',
1770 'data': { 'device': 'str', 'speed': 'int' } }
1773 # @block-job-cancel:
1775 # Stop an active background block operation.
1777 # This command returns immediately after marking the active background block
1778 # operation for cancellation. It is an error to call this command if no
1779 # operation is in progress.
1781 # The operation will cancel as soon as possible and then emit the
1782 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1783 # enumerated using query-block-jobs.
1785 # For streaming, the image file retains its backing file unless the streaming
1786 # operation happens to complete just as it is being cancelled. A new streaming
1787 # operation can be started at a later time to finish copying all data from the
1790 # @device: the device name
1792 # Returns: Nothing on success
1793 # If no background operation is active on this device, DeviceNotActive
1797 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1802 # This structure describes a search result from @qom-list-types
1804 # @name: the type name found in the search
1808 # Notes: This command is experimental and may change syntax in future releases.
1810 { 'type': 'ObjectTypeInfo',
1811 'data': { 'name': 'str' } }
1816 # This command will return a list of types given search parameters
1818 # @implements: if specified, only return types that implement this type name
1820 # @abstract: if true, include abstract types in the results
1822 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1826 { 'command': 'qom-list-types',
1827 'data': { '*implements': 'str', '*abstract': 'bool' },
1828 'returns': [ 'ObjectTypeInfo' ] }
1831 # @DevicePropertyInfo:
1833 # Information about device properties.
1835 # @name: the name of the property
1836 # @type: the typename of the property
1840 { 'type': 'DevicePropertyInfo',
1841 'data': { 'name': 'str', 'type': 'str' } }
1844 # @device-list-properties:
1846 # List properties associated with a device.
1848 # @typename: the type name of a device
1850 # Returns: a list of DevicePropertyInfo describing a devices properties
1854 { 'command': 'device-list-properties',
1855 'data': { 'typename': 'str'},
1856 'returns': [ 'DevicePropertyInfo' ] }
1861 # Migrates the current running guest to another Virtual Machine.
1863 # @uri: the Uniform Resource Identifier of the destination VM
1865 # @blk: #optional do block migration (full disk copy)
1867 # @inc: #optional incremental disk copy migration
1869 # @detach: this argument exists only for compatibility reasons and
1870 # is ignored by QEMU
1872 # Returns: nothing on success
1876 { 'command': 'migrate',
1877 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1879 # @xen-save-devices-state:
1881 # Save the state of all devices to file. The RAM and the block devices
1882 # of the VM are not saved by this command.
1884 # @filename: the file to save the state of the devices to as binary
1885 # data. See xen-save-devices-state.txt for a description of the binary
1888 # Returns: Nothing on success
1892 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1897 # Remove a device from a guest
1899 # @id: the name of the device
1901 # Returns: Nothing on success
1902 # If @id is not a valid device, DeviceNotFound
1904 # Notes: When this command completes, the device may not be removed from the
1905 # guest. Hot removal is an operation that requires guest cooperation.
1906 # This command merely requests that the guest begin the hot removal
1911 { 'command': 'device_del', 'data': {'id': 'str'} }
1914 # @dump-guest-memory
1916 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1917 # very long depending on the amount of guest memory. This command is only
1918 # supported on i386 and x86_64.
1920 # @paging: if true, do paging to get guest's memory mapping. This allows
1921 # using gdb to process the core file. However, setting @paging to false
1922 # may be desirable because of two reasons:
1924 # 1. The guest may be in a catastrophic state or can have corrupted
1925 # memory, which cannot be trusted
1926 # 2. The guest can be in real-mode even if paging is enabled. For example,
1927 # the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
1929 # @protocol: the filename or file descriptor of the vmcore. The supported
1932 # 1. file: the protocol starts with "file:", and the following string is
1934 # 2. fd: the protocol starts with "fd:", and the following string is the
1937 # @begin: #optional if specified, the starting physical address.
1939 # @length: #optional if specified, the memory size, in bytes. If you don't
1940 # want to dump all guest's memory, please specify the start @begin and @length
1942 # Returns: nothing on success
1946 { 'command': 'dump-guest-memory',
1947 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1948 '*length': 'int' } }
1952 # Add a network backend.
1954 # @type: the type of network backend. Current valid values are 'user', 'tap',
1955 # 'vde', 'socket', 'dump' and 'bridge'
1957 # @id: the name of the new network backend
1959 # @props: #optional a list of properties to be passed to the backend in
1960 # the format 'name=value', like 'ifname=tap0,script=no'
1962 # Notes: The semantics of @props is not well defined. Future commands will be
1963 # introduced that provide stronger typing for backend creation.
1967 # Returns: Nothing on success
1968 # If @type is not a valid network backend, DeviceNotFound
1970 { 'command': 'netdev_add',
1971 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1977 # Remove a network backend.
1979 # @id: the name of the network backend to remove
1981 # Returns: Nothing on success
1982 # If @id is not a valid network backend, DeviceNotFound
1986 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1989 # @NetdevNoneOptions
1991 # Use it alone to have zero network devices.
1995 { 'type': 'NetdevNoneOptions',
1999 # @NetLegacyNicOptions
2001 # Create a new Network Interface Card.
2003 # @netdev: #optional id of -netdev to connect to
2005 # @macaddr: #optional MAC address
2007 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2009 # @addr: #optional PCI device address
2011 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2015 { 'type': 'NetLegacyNicOptions',
2021 '*vectors': 'uint32' } }
2026 # A fat type wrapping 'str', to be embedded in lists.
2035 # @NetdevUserOptions
2037 # Use the user mode network stack which requires no administrator privilege to
2040 # @hostname: #optional client hostname reported by the builtin DHCP server
2042 # @restrict: #optional isolate the guest from the host
2044 # @ip: #optional legacy parameter, use net= instead
2046 # @net: #optional IP address and optional netmask
2048 # @host: #optional guest-visible address of the host
2050 # @tftp: #optional root directory of the built-in TFTP server
2052 # @bootfile: #optional BOOTP filename, for use with tftp=
2054 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2057 # @dns: #optional guest-visible address of the virtual nameserver
2059 # @smb: #optional root directory of the built-in SMB server
2061 # @smbserver: #optional IP address of the built-in SMB server
2063 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2066 # @guestfwd: #optional forward guest TCP connections
2070 { 'type': 'NetdevUserOptions',
2073 '*restrict': 'bool',
2079 '*dhcpstart': 'str',
2082 '*smbserver': 'str',
2083 '*hostfwd': ['String'],
2084 '*guestfwd': ['String'] } }
2089 # Connect the host TAP network interface name to the VLAN.
2091 # @ifname: #optional interface name
2093 # @fd: #optional file descriptor of an already opened tap
2095 # @script: #optional script to initialize the interface
2097 # @downscript: #optional script to shut down the interface
2099 # @helper: #optional command to execute to configure bridge
2101 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2103 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2105 # @vhost: #optional enable vhost-net network accelerator
2107 # @vhostfd: #optional file descriptor of an already opened vhost net device
2109 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2113 { 'type': 'NetdevTapOptions',
2118 '*downscript': 'str',
2121 '*vnet_hdr': 'bool',
2124 '*vhostforce': 'bool' } }
2127 # @NetdevSocketOptions
2129 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2130 # socket connection.
2132 # @fd: #optional file descriptor of an already opened socket
2134 # @listen: #optional port number, and optional hostname, to listen on
2136 # @connect: #optional port number, and optional hostname, to connect to
2138 # @mcast: #optional UDP multicast address and port number
2140 # @localaddr: #optional source address and port for multicast and udp packets
2142 # @udp: #optional UDP unicast address and port number
2146 { 'type': 'NetdevSocketOptions',
2152 '*localaddr': 'str',
2158 # Connect the VLAN to a vde switch running on the host.
2160 # @sock: #optional socket path
2162 # @port: #optional port number
2164 # @group: #optional group owner of socket
2166 # @mode: #optional permissions for socket
2170 { 'type': 'NetdevVdeOptions',
2175 '*mode': 'uint16' } }
2178 # @NetdevDumpOptions
2180 # Dump VLAN network traffic to a file.
2182 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2185 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2189 { 'type': 'NetdevDumpOptions',
2195 # @NetdevBridgeOptions
2197 # Connect a host TAP network interface to a host bridge device.
2199 # @br: #optional bridge name
2201 # @helper: #optional command to execute to configure bridge
2205 { 'type': 'NetdevBridgeOptions',
2208 '*helper': 'str' } }
2211 # @NetdevHubPortOptions
2213 # Connect two or more net clients through a software hub.
2215 # @hubid: hub identifier number
2219 { 'type': 'NetdevHubPortOptions',
2221 'hubid': 'int32' } }
2226 # A discriminated record of network device traits.
2230 { 'union': 'NetClientOptions',
2232 'none': 'NetdevNoneOptions',
2233 'nic': 'NetLegacyNicOptions',
2234 'user': 'NetdevUserOptions',
2235 'tap': 'NetdevTapOptions',
2236 'socket': 'NetdevSocketOptions',
2237 'vde': 'NetdevVdeOptions',
2238 'dump': 'NetdevDumpOptions',
2239 'bridge': 'NetdevBridgeOptions',
2240 'hubport': 'NetdevHubPortOptions' } }
2245 # Captures the configuration of a network device; legacy.
2247 # @vlan: #optional vlan number
2249 # @id: #optional identifier for monitor commands
2251 # @name: #optional identifier for monitor commands, ignored if @id is present
2253 # @opts: device type specific properties (legacy)
2257 { 'type': 'NetLegacy',
2262 'opts': 'NetClientOptions' } }
2267 # Captures the configuration of a network device.
2269 # @id: identifier for monitor commands.
2271 # @opts: device type specific properties
2278 'opts': 'NetClientOptions' } }
2283 # Receive a file descriptor via SCM rights and assign it a name
2285 # @fdname: file descriptor name
2287 # Returns: Nothing on success
2291 # Notes: If @fdname already exists, the file descriptor assigned to
2292 # it will be closed and replaced by the received file
2294 # The 'closefd' command can be used to explicitly close the
2295 # file descriptor when it is no longer needed.
2297 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2302 # Close a file descriptor previously passed via SCM rights
2304 # @fdname: file descriptor name
2306 # Returns: Nothing on success
2310 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2315 # Information describing a machine.
2317 # @name: the name of the machine
2319 # @alias: #optional an alias for the machine name
2321 # @default: #optional whether the machine is default
2325 { 'type': 'MachineInfo',
2326 'data': { 'name': 'str', '*alias': 'str',
2327 '*is-default': 'bool' } }
2332 # Return a list of supported machines
2334 # Returns: a list of MachineInfo
2338 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2341 # @CpuDefinitionInfo:
2343 # Virtual CPU definition.
2345 # @name: the name of the CPU definition
2349 { 'type': 'CpuDefinitionInfo',
2350 'data': { 'name': 'str' } }
2353 # @query-cpu-definitions:
2355 # Return a list of supported virtual CPU definitions
2357 # Returns: a list of CpuDefInfo
2361 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2365 # Information about a file descriptor that was added to an fd set.
2367 # @fdset-id: The ID of the fd set that @fd was added to.
2369 # @fd: The file descriptor that was received via SCM rights and
2370 # added to the fd set.
2374 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2379 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2381 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2383 # @opaque: #optional A free-form string that can be used to describe the fd.
2385 # Returns: @AddfdInfo on success
2386 # If file descriptor was not received, FdNotSupplied
2387 # If @fdset-id does not exist, InvalidParameterValue
2389 # Notes: The list of fd sets is shared by all monitor connections.
2391 # If @fdset-id is not specified, a new fd set will be created.
2395 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2396 'returns': 'AddfdInfo' }
2401 # Remove a file descriptor from an fd set.
2403 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2405 # @fd: #optional The file descriptor that is to be removed.
2407 # Returns: Nothing on success
2408 # If @fdset-id or @fd is not found, FdNotFound
2412 # Notes: The list of fd sets is shared by all monitor connections.
2414 # If @fd is not specified, all file descriptors in @fdset-id
2417 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2422 # Information about a file descriptor that belongs to an fd set.
2424 # @fd: The file descriptor value.
2426 # @opaque: #optional A free-form string that can be used to describe the fd.
2430 { 'type': 'FdsetFdInfo',
2431 'data': {'fd': 'int', '*opaque': 'str'} }
2436 # Information about an fd set.
2438 # @fdset-id: The ID of the fd set.
2440 # @fds: A list of file descriptors that belong to this fd set.
2444 { 'type': 'FdsetInfo',
2445 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2450 # Return information describing all fd sets.
2452 # Returns: A list of @FdsetInfo
2456 # Note: The list of fd sets is shared by all monitor connections.
2459 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2464 # Target CPU emulation type
2466 # These parameters correspond to the softmmu binary CPU name that is currently
2471 { 'enum': 'TargetType',
2472 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2473 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2474 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2475 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2480 # Information describing the QEMU target.
2482 # @arch: the target architecture (eg "x86_64", "i386", etc)
2486 { 'type': 'TargetInfo',
2487 'data': { 'arch': 'TargetType' } }
2492 # Return information about the target for this QEMU
2494 # Returns: TargetInfo
2498 { 'command': 'query-target', 'returns': 'TargetInfo' }
2503 # An enumeration of key name.
2505 # This is used by the send-key command.
2509 { 'enum': 'QKeyCode',
2510 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2511 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2512 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2513 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2514 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2515 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2516 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2517 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2518 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2519 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2520 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2521 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2522 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2523 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2524 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
2529 # Send keys to guest.
2531 # @keys: key sequence. 'keys' is the name of the key. Use a JSON array to
2532 # press several keys simultaneously.
2534 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
2537 # Returns: Nothing on success
2538 # If key is unknown or redundant, InvalidParameter
2543 { 'command': 'send-key',
2544 'data': { 'keys': ['QKeyCode'], '*hold-time': 'int' } }
2549 # Write a PPM of the VGA screen to a file.
2551 # @filename: the path of a new PPM file to store the image
2553 # Returns: Nothing on success
2557 { 'command': 'screendump', 'data': {'filename': 'str'} }