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 # @host: #optional The hostname the SPICE server is bound to. This depends on
812 # the name resolution on the host and may be an IP address.
814 # @port: #optional The SPICE server's port number.
816 # @compiled-version: #optional SPICE server version.
818 # @tls-port: #optional The SPICE server's TLS port number.
820 # @auth: #optional the current authentication type used by the server
821 # 'none' if no authentication is being used
822 # 'spice' uses SASL or direct TLS authentication, depending on command
825 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
826 # be determined by the client or the server, or unknown if spice
827 # server doesn't provide this information.
831 # @channels: a list of @SpiceChannel for each active spice channel
835 { 'type': 'SpiceInfo',
836 'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
837 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
838 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
843 # Returns information about the current SPICE server
845 # Returns: @SpiceInfo
849 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
854 # Information about the guest balloon device.
856 # @actual: the number of bytes the balloon currently contains
858 # @mem_swapped_in: #optional number of pages swapped in within the guest
860 # @mem_swapped_out: #optional number of pages swapped out within the guest
862 # @major_page_faults: #optional number of major page faults within the guest
864 # @minor_page_faults: #optional number of minor page faults within the guest
866 # @free_mem: #optional amount of memory (in bytes) free in the guest
868 # @total_mem: #optional amount of memory (in bytes) visible to the guest
872 # Notes: all current versions of QEMU do not fill out optional information in
875 { 'type': 'BalloonInfo',
876 'data': {'actual': 'int', '*mem_swapped_in': 'int',
877 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
878 '*minor_page_faults': 'int', '*free_mem': 'int',
879 '*total_mem': 'int'} }
884 # Return information about the balloon device.
886 # Returns: @BalloonInfo on success
887 # If the balloon driver is enabled but not functional because the KVM
888 # kernel module cannot support it, KvmMissingCap
889 # If no balloon device is present, DeviceNotActive
893 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
898 # A PCI device memory region
900 # @base: the starting address (guest physical)
902 # @limit: the ending address (guest physical)
906 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
911 # Information about a PCI device I/O region.
913 # @bar: the index of the Base Address Register for this region
915 # @type: 'io' if the region is a PIO region
916 # 'memory' if the region is a MMIO region
918 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
920 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
924 { 'type': 'PciMemoryRegion',
925 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
926 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
931 # Information about a PCI Bridge device
933 # @bus.number: primary bus interface number. This should be the number of the
934 # bus the device resides on.
936 # @bus.secondary: secondary bus interface number. This is the number of the
937 # main bus for the bridge
939 # @bus.subordinate: This is the highest number bus that resides below the
942 # @bus.io_range: The PIO range for all devices on this bridge
944 # @bus.memory_range: The MMIO range for all devices on this bridge
946 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
949 # @devices: a list of @PciDeviceInfo for each device on this bridge
953 { 'type': 'PciBridgeInfo',
954 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
955 'io_range': 'PciMemoryRange',
956 'memory_range': 'PciMemoryRange',
957 'prefetchable_range': 'PciMemoryRange' },
958 '*devices': ['PciDeviceInfo']} }
963 # Information about a PCI device
965 # @bus: the bus number of the device
967 # @slot: the slot the device is located in
969 # @function: the function of the slot used by the device
971 # @class_info.desc: #optional a string description of the device's class
973 # @class_info.class: the class code of the device
975 # @id.device: the PCI device id
977 # @id.vendor: the PCI vendor id
979 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
981 # @qdev_id: the device name of the PCI device
983 # @pci_bridge: if the device is a PCI bridge, the bridge information
985 # @regions: a list of the PCI I/O regions associated with the device
987 # Notes: the contents of @class_info.desc are not stable and should only be
988 # treated as informational.
992 { 'type': 'PciDeviceInfo',
993 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
994 'class_info': {'*desc': 'str', 'class': 'int'},
995 'id': {'device': 'int', 'vendor': 'int'},
996 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
997 'regions': ['PciMemoryRegion']} }
1002 # Information about a PCI bus
1004 # @bus: the bus index
1006 # @devices: a list of devices on this bus
1010 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1015 # Return information about the PCI bus topology of the guest.
1017 # Returns: a list of @PciInfo for each PCI bus
1021 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1026 # Information about a long-running block device operation.
1028 # @type: the job type ('stream' for image streaming)
1030 # @device: the block device name
1032 # @len: the maximum progress value
1034 # @offset: the current progress value
1036 # @speed: the rate limit, bytes per second
1040 { 'type': 'BlockJobInfo',
1041 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1042 'offset': 'int', 'speed': 'int'} }
1045 # @query-block-jobs:
1047 # Return information about long-running block device operations.
1049 # Returns: a list of @BlockJobInfo for each active block job
1053 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1058 # This command will cause the QEMU process to exit gracefully. While every
1059 # attempt is made to send the QMP response before terminating, this is not
1060 # guaranteed. When using this interface, a premature EOF would not be
1065 { 'command': 'quit' }
1070 # Stop all guest VCPU execution.
1074 # Notes: This function will succeed even if the guest is already in the stopped
1077 { 'command': 'stop' }
1082 # Performs a hard reset of a guest.
1086 { 'command': 'system_reset' }
1089 # @system_powerdown:
1091 # Requests that a guest perform a powerdown operation.
1095 # Notes: A guest may or may not respond to this command. This command
1096 # returning does not indicate that a guest has accepted the request or
1097 # that it has shut down. Many guests will respond to this command by
1098 # prompting the user in some way.
1100 { 'command': 'system_powerdown' }
1105 # This command is a nop that is only provided for the purposes of compatibility.
1109 # Notes: Do not use this command.
1111 { 'command': 'cpu', 'data': {'index': 'int'} }
1116 # Save a portion of guest memory to a file.
1118 # @val: the virtual address of the guest to start from
1120 # @size: the size of memory region to save
1122 # @filename: the file to save the memory to as binary data
1124 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1125 # virtual address (defaults to CPU 0)
1127 # Returns: Nothing on success
1131 # Notes: Errors were not reliably returned until 1.1
1133 { 'command': 'memsave',
1134 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1139 # Save a portion of guest physical memory to a file.
1141 # @val: the physical address of the guest to start from
1143 # @size: the size of memory region to save
1145 # @filename: the file to save the memory to as binary data
1147 # Returns: Nothing on success
1151 # Notes: Errors were not reliably returned until 1.1
1153 { 'command': 'pmemsave',
1154 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1159 # Resume guest VCPU execution.
1163 # Returns: If successful, nothing
1164 # If the QEMU is waiting for an incoming migration, MigrationExpected
1165 # If QEMU was started with an encrypted block device and a key has
1166 # not yet been set, DeviceEncrypted.
1168 # Notes: This command will succeed if the guest is currently running.
1170 { 'command': 'cont' }
1175 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1181 { 'command': 'system_wakeup' }
1186 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1188 # Returns: If successful, nothing
1192 # Notes: Only x86 Virtual Machines support this command.
1194 { 'command': 'inject-nmi' }
1199 # Sets the link status of a virtual network adapter.
1201 # @name: the device name of the virtual network adapter
1203 # @up: true to set the link status to be up
1205 # Returns: Nothing on success
1206 # If @name is not a valid network device, DeviceNotFound
1210 # Notes: Not all network adapters support setting link status. This command
1211 # will succeed even if the network adapter does not support link status
1214 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1219 # This command sets the password of a block device that has not been open
1220 # with a password and requires one.
1222 # The two cases where this can happen are a block device is created through
1223 # QEMU's initial command line or a block device is changed through the legacy
1224 # @change interface.
1226 # In the event that the block device is created through the initial command
1227 # line, the VM will start in the stopped state regardless of whether '-S' is
1228 # used. The intention is for a management tool to query the block devices to
1229 # determine which ones are encrypted, set the passwords with this command, and
1230 # then start the guest with the @cont command.
1232 # @device: the name of the device to set the password on
1234 # @password: the password to use for the device
1236 # Returns: nothing on success
1237 # If @device is not a valid block device, DeviceNotFound
1238 # If @device is not encrypted, DeviceNotEncrypted
1240 # Notes: Not all block formats support encryption and some that do are not
1241 # able to validate that a password is correct. Disk corruption may
1242 # occur if an invalid password is specified.
1246 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1251 # Request the balloon driver to change its balloon size.
1253 # @value: the target size of the balloon in bytes
1255 # Returns: Nothing on success
1256 # If the balloon driver is enabled but not functional because the KVM
1257 # kernel module cannot support it, KvmMissingCap
1258 # If no balloon device is present, DeviceNotActive
1260 # Notes: This command just issues a request to the guest. When it returns,
1261 # the balloon size may not have changed. A guest can change the balloon
1262 # size independent of this command.
1266 { 'command': 'balloon', 'data': {'value': 'int'} }
1271 # Resize a block image while a guest is running.
1273 # @device: the name of the device to get the image resized
1275 # @size: new image size in bytes
1277 # Returns: nothing on success
1278 # If @device is not a valid block device, DeviceNotFound
1282 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1287 # An enumeration that tells QEMU how to set the backing file path in
1290 # @existing: QEMU should look for an existing image file.
1292 # @absolute-paths: QEMU should create a new image with absolute paths
1293 # for the backing file.
1297 { 'enum': 'NewImageMode'
1298 'data': [ 'existing', 'absolute-paths' ] }
1303 # @device: the name of the device to generate the snapshot from.
1305 # @snapshot-file: the target of the new image. A new file will be created.
1307 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1309 # @mode: #optional whether and how QEMU should create a new image, default is
1312 { 'type': 'BlockdevSnapshot',
1313 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1314 '*mode': 'NewImageMode' } }
1319 # A discriminated record of operations that can be performed with
1322 { 'union': 'BlockdevAction',
1324 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1330 # Atomically operate on a group of one or more block devices. If
1331 # any operation fails, then the entire set of actions will be
1332 # abandoned and the appropriate error returned. The only operation
1333 # supported is currently blockdev-snapshot-sync.
1336 # @BlockdevAction: information needed for the device snapshot
1338 # Returns: nothing on success
1339 # If @device is not a valid block device, DeviceNotFound
1341 # Note: The transaction aborts on the first failure. Therefore, there will
1342 # be only one device or snapshot file returned in an error condition, and
1343 # subsequent actions will not have been attempted.
1347 { 'command': 'transaction',
1348 'data': { 'actions': [ 'BlockdevAction' ] } }
1351 # @blockdev-snapshot-sync
1353 # Generates a synchronous snapshot of a block device.
1355 # @device: the name of the device to generate the snapshot from.
1357 # @snapshot-file: the target of the new image. If the file exists, or if it
1358 # is a device, the snapshot will be created in the existing
1359 # file/device. If does not exist, a new file will be created.
1361 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1363 # @mode: #optional whether and how QEMU should create a new image, default is
1366 # Returns: nothing on success
1367 # If @device is not a valid block device, DeviceNotFound
1371 { 'command': 'blockdev-snapshot-sync',
1372 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1373 '*mode': 'NewImageMode'} }
1376 # @human-monitor-command:
1378 # Execute a command on the human monitor and return the output.
1380 # @command-line: the command to execute in the human monitor
1382 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1384 # Returns: the output of the command as a string
1388 # Notes: This command only exists as a stop-gap. It's use is highly
1389 # discouraged. The semantics of this command are not guaranteed.
1391 # Known limitations:
1393 # o This command is stateless, this means that commands that depend
1394 # on state information (such as getfd) might not work
1396 # o Commands that prompt the user for data (eg. 'cont' when the block
1397 # device is encrypted) don't currently work
1399 { 'command': 'human-monitor-command',
1400 'data': {'command-line': 'str', '*cpu-index': 'int'},
1406 # Cancel the current executing migration process.
1408 # Returns: nothing on success
1410 # Notes: This command succeeds even if there is no migration process running.
1414 { 'command': 'migrate_cancel' }
1417 # @migrate_set_downtime
1419 # Set maximum tolerated downtime for migration.
1421 # @value: maximum downtime in seconds
1423 # Returns: nothing on success
1427 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1430 # @migrate_set_speed
1432 # Set maximum speed for migration.
1434 # @value: maximum speed in bytes.
1436 # Returns: nothing on success
1438 # Notes: A value lesser than zero will be automatically round up to zero.
1442 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1445 # @migrate-set-cache-size
1447 # Set XBZRLE cache size
1449 # @value: cache size in bytes
1451 # The size will be rounded down to the nearest power of 2.
1452 # The cache size can be modified before and during ongoing migration
1454 # Returns: nothing on success
1458 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1461 # @query-migrate-cache-size
1463 # query XBZRLE cache size
1465 # Returns: XBZRLE cache size in bytes
1469 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1472 # @ObjectPropertyInfo:
1474 # @name: the name of the property
1476 # @type: the type of the property. This will typically come in one of four
1479 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1480 # These types are mapped to the appropriate JSON type.
1482 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1483 # legacy qdev typename. These types are always treated as strings.
1485 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1486 # device type name. Child properties create the composition tree.
1488 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1489 # device type name. Link properties form the device model graph.
1493 { 'type': 'ObjectPropertyInfo',
1494 'data': { 'name': 'str', 'type': 'str' } }
1499 # This command will list any properties of a object given a path in the object
1502 # @path: the path within the object model. See @qom-get for a description of
1505 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1510 { 'command': 'qom-list',
1511 'data': { 'path': 'str' },
1512 'returns': [ 'ObjectPropertyInfo' ] }
1517 # This command will get a property from a object model path and return the
1520 # @path: The path within the object model. There are two forms of supported
1521 # paths--absolute and partial paths.
1523 # Absolute paths are derived from the root object and can follow child<>
1524 # or link<> properties. Since they can follow link<> properties, they
1525 # can be arbitrarily long. Absolute paths look like absolute filenames
1526 # and are prefixed with a leading slash.
1528 # Partial paths look like relative filenames. They do not begin
1529 # with a prefix. The matching rules for partial paths are subtle but
1530 # designed to make specifying objects easy. At each level of the
1531 # composition tree, the partial path is matched as an absolute path.
1532 # The first match is not returned. At least two matches are searched
1533 # for. A successful result is only returned if only one match is
1534 # found. If more than one match is found, a flag is return to
1535 # indicate that the match was ambiguous.
1537 # @property: The property name to read
1539 # Returns: The property value. The type depends on the property type. legacy<>
1540 # properties are returned as #str. child<> and link<> properties are
1541 # returns as #str pathnames. All integer property types (u8, u16, etc)
1542 # are returned as #int.
1546 { 'command': 'qom-get',
1547 'data': { 'path': 'str', 'property': 'str' },
1548 'returns': 'visitor',
1554 # This command will set a property from a object model path.
1556 # @path: see @qom-get for a description of this parameter
1558 # @property: the property name to set
1560 # @value: a value who's type is appropriate for the property type. See @qom-get
1561 # for a description of type mapping.
1565 { 'command': 'qom-set',
1566 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1572 # Sets the password of a remote display session.
1574 # @protocol: `vnc' to modify the VNC server password
1575 # `spice' to modify the Spice server password
1577 # @password: the new password
1579 # @connected: #optional how to handle existing clients when changing the
1580 # password. If nothing is specified, defaults to `keep'
1581 # `fail' to fail the command if clients are connected
1582 # `disconnect' to disconnect existing clients
1583 # `keep' to maintain existing clients
1585 # Returns: Nothing on success
1586 # If Spice is not enabled, DeviceNotFound
1590 { 'command': 'set_password',
1591 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1596 # Expire the password of a remote display server.
1598 # @protocol: the name of the remote display protocol `vnc' or `spice'
1600 # @time: when to expire the password.
1601 # `now' to expire the password immediately
1602 # `never' to cancel password expiration
1603 # `+INT' where INT is the number of seconds from now (integer)
1604 # `INT' where INT is the absolute time in seconds
1606 # Returns: Nothing on success
1607 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1611 # Notes: Time is relative to the server and currently there is no way to
1612 # coordinate server time with client time. It is not recommended to
1613 # use the absolute time version of the @time parameter unless you're
1614 # sure you are on the same machine as the QEMU instance.
1616 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1621 # Ejects a device from a removable drive.
1623 # @device: The name of the device
1625 # @force: @optional If true, eject regardless of whether the drive is locked.
1626 # If not specified, the default value is false.
1628 # Returns: Nothing on success
1629 # If @device is not a valid block device, DeviceNotFound
1631 # Notes: Ejecting a device will no media results in success
1635 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1638 # @change-vnc-password:
1640 # Change the VNC server password.
1642 # @target: the new password to use with VNC authentication
1646 # Notes: An empty password in this command will set the password to the empty
1647 # string. Existing clients are unaffected by executing this command.
1649 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1654 # This command is multiple commands multiplexed together.
1656 # @device: This is normally the name of a block device but it may also be 'vnc'.
1657 # when it's 'vnc', then sub command depends on @target
1659 # @target: If @device is a block device, then this is the new filename.
1660 # If @device is 'vnc', then if the value 'password' selects the vnc
1661 # change password command. Otherwise, this specifies a new server URI
1662 # address to listen to for VNC connections.
1664 # @arg: If @device is a block device, then this is an optional format to open
1666 # If @device is 'vnc' and @target is 'password', this is the new VNC
1667 # password to set. If this argument is an empty string, then no future
1668 # logins will be allowed.
1670 # Returns: Nothing on success.
1671 # If @device is not a valid block device, DeviceNotFound
1672 # If the new block device is encrypted, DeviceEncrypted. Note that
1673 # if this error is returned, the device has been opened successfully
1674 # and an additional call to @block_passwd is required to set the
1675 # device's password. The behavior of reads and writes to the block
1676 # device between when these calls are executed is undefined.
1678 # Notes: It is strongly recommended that this interface is not used especially
1679 # for changing block devices.
1683 { 'command': 'change',
1684 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1687 # @block_set_io_throttle:
1689 # Change I/O throttle limits for a block drive.
1691 # @device: The name of the device
1693 # @bps: total throughput limit in bytes per second
1695 # @bps_rd: read throughput limit in bytes per second
1697 # @bps_wr: write throughput limit in bytes per second
1699 # @iops: total I/O operations per second
1701 # @ops_rd: read I/O operations per second
1703 # @iops_wr: write I/O operations per second
1705 # Returns: Nothing on success
1706 # If @device is not a valid block device, DeviceNotFound
1710 { 'command': 'block_set_io_throttle',
1711 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1712 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1717 # Copy data from a backing file into a block device.
1719 # The block streaming operation is performed in the background until the entire
1720 # backing file has been copied. This command returns immediately once streaming
1721 # has started. The status of ongoing block streaming operations can be checked
1722 # with query-block-jobs. The operation can be stopped before it has completed
1723 # using the block-job-cancel command.
1725 # If a base file is specified then sectors are not copied from that base file and
1726 # its backing chain. When streaming completes the image file will have the base
1727 # file as its backing file. This can be used to stream a subset of the backing
1728 # file chain instead of flattening the entire image.
1730 # On successful completion the image file is updated to drop the backing file
1731 # and the BLOCK_JOB_COMPLETED event is emitted.
1733 # @device: the device name
1735 # @base: #optional the common backing file name
1737 # @speed: #optional the maximum speed, in bytes per second
1739 # Returns: Nothing on success
1740 # If @device does not exist, DeviceNotFound
1744 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1748 # @block-job-set-speed:
1750 # Set maximum speed for a background block operation.
1752 # This command can only be issued when there is an active block job.
1754 # Throttling can be disabled by setting the speed to 0.
1756 # @device: the device name
1758 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1761 # Returns: Nothing on success
1762 # If no background operation is active on this device, DeviceNotActive
1766 { 'command': 'block-job-set-speed',
1767 'data': { 'device': 'str', 'speed': 'int' } }
1770 # @block-job-cancel:
1772 # Stop an active background block operation.
1774 # This command returns immediately after marking the active background block
1775 # operation for cancellation. It is an error to call this command if no
1776 # operation is in progress.
1778 # The operation will cancel as soon as possible and then emit the
1779 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1780 # enumerated using query-block-jobs.
1782 # For streaming, the image file retains its backing file unless the streaming
1783 # operation happens to complete just as it is being cancelled. A new streaming
1784 # operation can be started at a later time to finish copying all data from the
1787 # @device: the device name
1789 # Returns: Nothing on success
1790 # If no background operation is active on this device, DeviceNotActive
1794 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1799 # This structure describes a search result from @qom-list-types
1801 # @name: the type name found in the search
1805 # Notes: This command is experimental and may change syntax in future releases.
1807 { 'type': 'ObjectTypeInfo',
1808 'data': { 'name': 'str' } }
1813 # This command will return a list of types given search parameters
1815 # @implements: if specified, only return types that implement this type name
1817 # @abstract: if true, include abstract types in the results
1819 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1823 { 'command': 'qom-list-types',
1824 'data': { '*implements': 'str', '*abstract': 'bool' },
1825 'returns': [ 'ObjectTypeInfo' ] }
1828 # @DevicePropertyInfo:
1830 # Information about device properties.
1832 # @name: the name of the property
1833 # @type: the typename of the property
1837 { 'type': 'DevicePropertyInfo',
1838 'data': { 'name': 'str', 'type': 'str' } }
1841 # @device-list-properties:
1843 # List properties associated with a device.
1845 # @typename: the type name of a device
1847 # Returns: a list of DevicePropertyInfo describing a devices properties
1851 { 'command': 'device-list-properties',
1852 'data': { 'typename': 'str'},
1853 'returns': [ 'DevicePropertyInfo' ] }
1858 # Migrates the current running guest to another Virtual Machine.
1860 # @uri: the Uniform Resource Identifier of the destination VM
1862 # @blk: #optional do block migration (full disk copy)
1864 # @inc: #optional incremental disk copy migration
1866 # @detach: this argument exists only for compatibility reasons and
1867 # is ignored by QEMU
1869 # Returns: nothing on success
1873 { 'command': 'migrate',
1874 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1876 # @xen-save-devices-state:
1878 # Save the state of all devices to file. The RAM and the block devices
1879 # of the VM are not saved by this command.
1881 # @filename: the file to save the state of the devices to as binary
1882 # data. See xen-save-devices-state.txt for a description of the binary
1885 # Returns: Nothing on success
1889 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1894 # Remove a device from a guest
1896 # @id: the name of the device
1898 # Returns: Nothing on success
1899 # If @id is not a valid device, DeviceNotFound
1901 # Notes: When this command completes, the device may not be removed from the
1902 # guest. Hot removal is an operation that requires guest cooperation.
1903 # This command merely requests that the guest begin the hot removal
1908 { 'command': 'device_del', 'data': {'id': 'str'} }
1911 # @dump-guest-memory
1913 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1914 # very long depending on the amount of guest memory. This command is only
1915 # supported on i386 and x86_64.
1917 # @paging: if true, do paging to get guest's memory mapping. This allows
1918 # using gdb to process the core file. However, setting @paging to false
1919 # may be desirable because of two reasons:
1921 # 1. The guest may be in a catastrophic state or can have corrupted
1922 # memory, which cannot be trusted
1923 # 2. The guest can be in real-mode even if paging is enabled. For example,
1924 # the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
1926 # @protocol: the filename or file descriptor of the vmcore. The supported
1929 # 1. file: the protocol starts with "file:", and the following string is
1931 # 2. fd: the protocol starts with "fd:", and the following string is the
1934 # @begin: #optional if specified, the starting physical address.
1936 # @length: #optional if specified, the memory size, in bytes. If you don't
1937 # want to dump all guest's memory, please specify the start @begin and @length
1939 # Returns: nothing on success
1943 { 'command': 'dump-guest-memory',
1944 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1945 '*length': 'int' } }
1949 # Add a network backend.
1951 # @type: the type of network backend. Current valid values are 'user', 'tap',
1952 # 'vde', 'socket', 'dump' and 'bridge'
1954 # @id: the name of the new network backend
1956 # @props: #optional a list of properties to be passed to the backend in
1957 # the format 'name=value', like 'ifname=tap0,script=no'
1959 # Notes: The semantics of @props is not well defined. Future commands will be
1960 # introduced that provide stronger typing for backend creation.
1964 # Returns: Nothing on success
1965 # If @type is not a valid network backend, DeviceNotFound
1967 { 'command': 'netdev_add',
1968 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1974 # Remove a network backend.
1976 # @id: the name of the network backend to remove
1978 # Returns: Nothing on success
1979 # If @id is not a valid network backend, DeviceNotFound
1983 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1986 # @NetdevNoneOptions
1988 # Use it alone to have zero network devices.
1992 { 'type': 'NetdevNoneOptions',
1996 # @NetLegacyNicOptions
1998 # Create a new Network Interface Card.
2000 # @netdev: #optional id of -netdev to connect to
2002 # @macaddr: #optional MAC address
2004 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2006 # @addr: #optional PCI device address
2008 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2012 { 'type': 'NetLegacyNicOptions',
2018 '*vectors': 'uint32' } }
2023 # A fat type wrapping 'str', to be embedded in lists.
2032 # @NetdevUserOptions
2034 # Use the user mode network stack which requires no administrator privilege to
2037 # @hostname: #optional client hostname reported by the builtin DHCP server
2039 # @restrict: #optional isolate the guest from the host
2041 # @ip: #optional legacy parameter, use net= instead
2043 # @net: #optional IP address and optional netmask
2045 # @host: #optional guest-visible address of the host
2047 # @tftp: #optional root directory of the built-in TFTP server
2049 # @bootfile: #optional BOOTP filename, for use with tftp=
2051 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2054 # @dns: #optional guest-visible address of the virtual nameserver
2056 # @smb: #optional root directory of the built-in SMB server
2058 # @smbserver: #optional IP address of the built-in SMB server
2060 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2063 # @guestfwd: #optional forward guest TCP connections
2067 { 'type': 'NetdevUserOptions',
2070 '*restrict': 'bool',
2076 '*dhcpstart': 'str',
2079 '*smbserver': 'str',
2080 '*hostfwd': ['String'],
2081 '*guestfwd': ['String'] } }
2086 # Connect the host TAP network interface name to the VLAN.
2088 # @ifname: #optional interface name
2090 # @fd: #optional file descriptor of an already opened tap
2092 # @script: #optional script to initialize the interface
2094 # @downscript: #optional script to shut down the interface
2096 # @helper: #optional command to execute to configure bridge
2098 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2100 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2102 # @vhost: #optional enable vhost-net network accelerator
2104 # @vhostfd: #optional file descriptor of an already opened vhost net device
2106 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2110 { 'type': 'NetdevTapOptions',
2115 '*downscript': 'str',
2118 '*vnet_hdr': 'bool',
2121 '*vhostforce': 'bool' } }
2124 # @NetdevSocketOptions
2126 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2127 # socket connection.
2129 # @fd: #optional file descriptor of an already opened socket
2131 # @listen: #optional port number, and optional hostname, to listen on
2133 # @connect: #optional port number, and optional hostname, to connect to
2135 # @mcast: #optional UDP multicast address and port number
2137 # @localaddr: #optional source address and port for multicast and udp packets
2139 # @udp: #optional UDP unicast address and port number
2143 { 'type': 'NetdevSocketOptions',
2149 '*localaddr': 'str',
2155 # Connect the VLAN to a vde switch running on the host.
2157 # @sock: #optional socket path
2159 # @port: #optional port number
2161 # @group: #optional group owner of socket
2163 # @mode: #optional permissions for socket
2167 { 'type': 'NetdevVdeOptions',
2172 '*mode': 'uint16' } }
2175 # @NetdevDumpOptions
2177 # Dump VLAN network traffic to a file.
2179 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2182 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2186 { 'type': 'NetdevDumpOptions',
2192 # @NetdevBridgeOptions
2194 # Connect a host TAP network interface to a host bridge device.
2196 # @br: #optional bridge name
2198 # @helper: #optional command to execute to configure bridge
2202 { 'type': 'NetdevBridgeOptions',
2205 '*helper': 'str' } }
2208 # @NetdevHubPortOptions
2210 # Connect two or more net clients through a software hub.
2212 # @hubid: hub identifier number
2216 { 'type': 'NetdevHubPortOptions',
2218 'hubid': 'int32' } }
2223 # A discriminated record of network device traits.
2227 { 'union': 'NetClientOptions',
2229 'none': 'NetdevNoneOptions',
2230 'nic': 'NetLegacyNicOptions',
2231 'user': 'NetdevUserOptions',
2232 'tap': 'NetdevTapOptions',
2233 'socket': 'NetdevSocketOptions',
2234 'vde': 'NetdevVdeOptions',
2235 'dump': 'NetdevDumpOptions',
2236 'bridge': 'NetdevBridgeOptions',
2237 'hubport': 'NetdevHubPortOptions' } }
2242 # Captures the configuration of a network device; legacy.
2244 # @vlan: #optional vlan number
2246 # @id: #optional identifier for monitor commands
2248 # @name: #optional identifier for monitor commands, ignored if @id is present
2250 # @opts: device type specific properties (legacy)
2254 { 'type': 'NetLegacy',
2259 'opts': 'NetClientOptions' } }
2264 # Captures the configuration of a network device.
2266 # @id: identifier for monitor commands.
2268 # @opts: device type specific properties
2275 'opts': 'NetClientOptions' } }
2280 # Receive a file descriptor via SCM rights and assign it a name
2282 # @fdname: file descriptor name
2284 # Returns: Nothing on success
2288 # Notes: If @fdname already exists, the file descriptor assigned to
2289 # it will be closed and replaced by the received file
2291 # The 'closefd' command can be used to explicitly close the
2292 # file descriptor when it is no longer needed.
2294 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2299 # Close a file descriptor previously passed via SCM rights
2301 # @fdname: file descriptor name
2303 # Returns: Nothing on success
2307 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2312 # Information describing a machine.
2314 # @name: the name of the machine
2316 # @alias: #optional an alias for the machine name
2318 # @default: #optional whether the machine is default
2322 { 'type': 'MachineInfo',
2323 'data': { 'name': 'str', '*alias': 'str',
2324 '*is-default': 'bool' } }
2329 # Return a list of supported machines
2331 # Returns: a list of MachineInfo
2335 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2338 # @CpuDefinitionInfo:
2340 # Virtual CPU definition.
2342 # @name: the name of the CPU definition
2346 { 'type': 'CpuDefinitionInfo',
2347 'data': { 'name': 'str' } }
2350 # @query-cpu-definitions:
2352 # Return a list of supported virtual CPU definitions
2354 # Returns: a list of CpuDefInfo
2358 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2362 # Information about a file descriptor that was added to an fd set.
2364 # @fdset-id: The ID of the fd set that @fd was added to.
2366 # @fd: The file descriptor that was received via SCM rights and
2367 # added to the fd set.
2371 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2376 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2378 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2380 # @opaque: #optional A free-form string that can be used to describe the fd.
2382 # Returns: @AddfdInfo on success
2383 # If file descriptor was not received, FdNotSupplied
2384 # If @fdset-id does not exist, InvalidParameterValue
2386 # Notes: The list of fd sets is shared by all monitor connections.
2388 # If @fdset-id is not specified, a new fd set will be created.
2392 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2393 'returns': 'AddfdInfo' }
2398 # Remove a file descriptor from an fd set.
2400 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2402 # @fd: #optional The file descriptor that is to be removed.
2404 # Returns: Nothing on success
2405 # If @fdset-id or @fd is not found, FdNotFound
2409 # Notes: The list of fd sets is shared by all monitor connections.
2411 # If @fd is not specified, all file descriptors in @fdset-id
2414 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2419 # Information about a file descriptor that belongs to an fd set.
2421 # @fd: The file descriptor value.
2423 # @opaque: #optional A free-form string that can be used to describe the fd.
2427 { 'type': 'FdsetFdInfo',
2428 'data': {'fd': 'int', '*opaque': 'str'} }
2433 # Information about an fd set.
2435 # @fdset-id: The ID of the fd set.
2437 # @fds: A list of file descriptors that belong to this fd set.
2441 { 'type': 'FdsetInfo',
2442 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2447 # Return information describing all fd sets.
2449 # Returns: A list of @FdsetInfo
2453 # Note: The list of fd sets is shared by all monitor connections.
2456 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2461 # Target CPU emulation type
2463 # These parameters correspond to the softmmu binary CPU name that is currently
2468 { 'enum': 'TargetType',
2469 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2470 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2471 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2472 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2477 # Information describing the QEMU target.
2479 # @arch: the target architecture (eg "x86_64", "i386", etc)
2483 { 'type': 'TargetInfo',
2484 'data': { 'arch': 'TargetType' } }
2489 # Return information about the target for this QEMU
2491 # Returns: TargetInfo
2495 { 'command': 'query-target', 'returns': 'TargetInfo' }