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 # @total_time: tota0l amount of ms since migration started. If
294 # migration has ended, it returns the total migration
299 { 'type': 'MigrationStats',
300 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
301 'total_time': 'int' } }
306 # Information about current migration process.
308 # @status: #optional string describing the current migration status.
309 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
310 # 'cancelled'. If this field is not returned, no migration process
313 # @ram: #optional @MigrationStats containing detailed migration
314 # status, only returned if status is 'active' or
315 # 'completed'. 'comppleted' (since 1.2)
317 # @disk: #optional @MigrationStats containing detailed disk migration
318 # status, only returned if status is 'active' and it is a block
323 { 'type': 'MigrationInfo',
324 'data': {'*status': 'str', '*ram': 'MigrationStats',
325 '*disk': 'MigrationStats'} }
330 # Returns information about current migration process.
332 # Returns: @MigrationInfo
336 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
341 # Information about a mouse device.
343 # @name: the name of the mouse device
345 # @index: the index of the mouse device
347 # @current: true if this device is currently receiving mouse events
349 # @absolute: true if this device supports absolute coordinates as input
353 { 'type': 'MouseInfo',
354 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
355 'absolute': 'bool'} }
360 # Returns information about each active mouse device
362 # Returns: a list of @MouseInfo for each device
366 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
371 # Information about a virtual CPU
373 # @CPU: the index of the virtual CPU
375 # @current: this only exists for backwards compatible and should be ignored
377 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
378 # to a processor specific low power mode.
380 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
382 # If the target is Sparc, this is the PC component of the
383 # instruction pointer.
385 # @nip: #optional If the target is PPC, the instruction pointer
387 # @npc: #optional If the target is Sparc, the NPC component of the instruction
390 # @PC: #optional If the target is MIPS, the instruction pointer
392 # @thread_id: ID of the underlying host thread
396 # Notes: @halted is a transient state that changes frequently. By the time the
397 # data is sent to the client, the guest may no longer be halted.
400 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
401 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
406 # Returns a list of information about each virtual CPU.
408 # Returns: a list of @CpuInfo for each virtual CPU
412 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
417 # Information about the backing device for a block device.
419 # @file: the filename of the backing device
421 # @ro: true if the backing device was open read-only
423 # @drv: the name of the block format used to open the backing device. As of
424 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
425 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
426 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
427 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
429 # @backing_file: #optional the name of the backing file (for copy-on-write)
431 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
433 # @encrypted: true if the backing device is encrypted
435 # @encryption_key_missing: true if the backing device is encrypted but an
436 # valid encryption key is missing
438 # @bps: total throughput limit in bytes per second is specified
440 # @bps_rd: read throughput limit in bytes per second is specified
442 # @bps_wr: write throughput limit in bytes per second is specified
444 # @iops: total I/O operations per second is specified
446 # @iops_rd: read I/O operations per second is specified
448 # @iops_wr: write I/O operations per second is specified
452 # Notes: This interface is only found in @BlockInfo.
454 { 'type': 'BlockDeviceInfo',
455 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
456 '*backing_file': 'str', 'backing_file_depth': 'int',
457 'encrypted': 'bool', 'encryption_key_missing': 'bool',
458 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
459 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
462 # @BlockDeviceIoStatus:
464 # An enumeration of block device I/O status.
466 # @ok: The last I/O operation has succeeded
468 # @failed: The last I/O operation has failed
470 # @nospace: The last I/O operation has failed due to a no-space condition
474 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
479 # Block device information. This structure describes a virtual device and
480 # the backing device associated with it.
482 # @device: The device name associated with the virtual device.
484 # @type: This field is returned only for compatibility reasons, it should
485 # not be used (always returns 'unknown')
487 # @removable: True if the device supports removable media.
489 # @locked: True if the guest has locked this device from having its media
492 # @tray_open: #optional True if the device has a tray and it is open
493 # (only present if removable is true)
495 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
496 # supports it and the VM is configured to stop on errors
498 # @inserted: #optional @BlockDeviceInfo describing the device if media is
503 { 'type': 'BlockInfo',
504 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
505 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
506 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
511 # Get a list of BlockInfo for all virtual block devices.
513 # Returns: a list of @BlockInfo describing each virtual block device
517 { 'command': 'query-block', 'returns': ['BlockInfo'] }
522 # Statistics of a virtual block device or a block backing device.
524 # @rd_bytes: The number of bytes read by the device.
526 # @wr_bytes: The number of bytes written by the device.
528 # @rd_operations: The number of read operations performed by the device.
530 # @wr_operations: The number of write operations performed by the device.
532 # @flush_operations: The number of cache flush operations performed by the
533 # device (since 0.15.0)
535 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
538 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
540 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
542 # @wr_highest_offset: The offset after the greatest byte written to the
543 # device. The intended use of this information is for
544 # growable sparse files (like qcow2) that are used on top
545 # of a physical device.
549 { 'type': 'BlockDeviceStats',
550 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
551 'wr_operations': 'int', 'flush_operations': 'int',
552 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
553 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
558 # Statistics of a virtual block device or a block backing device.
560 # @device: #optional If the stats are for a virtual block device, the name
561 # corresponding to the virtual block device.
563 # @stats: A @BlockDeviceStats for the device.
565 # @parent: #optional This may point to the backing block device if this is a
566 # a virtual block device. If it's a backing block, this will point
567 # to the backing file is one is present.
571 { 'type': 'BlockStats',
572 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
573 '*parent': 'BlockStats'} }
578 # Query the @BlockStats for all virtual block devices.
580 # Returns: A list of @BlockStats for each virtual block devices.
584 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
589 # Information about a connected VNC client.
591 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
594 # @family: 'ipv6' if the client is connected via IPv6 and TCP
595 # 'ipv4' if the client is connected via IPv4 and TCP
596 # 'unix' if the client is connected via a unix domain socket
597 # 'unknown' otherwise
599 # @service: The service name of the client's port. This may depends on the
600 # host system's service database so symbolic names should not be
603 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
604 # Name of the client.
606 # @sasl_username: #optional If SASL authentication is in use, the SASL username
607 # used for authentication.
611 { 'type': 'VncClientInfo',
612 'data': {'host': 'str', 'family': 'str', 'service': 'str',
613 '*x509_dname': 'str', '*sasl_username': 'str'} }
618 # Information about the VNC session.
620 # @enabled: true if the VNC server is enabled, false otherwise
622 # @host: #optional The hostname the VNC server is bound to. This depends on
623 # the name resolution on the host and may be an IP address.
625 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
626 # 'ipv4' if the host is listening for IPv4 connections
627 # 'unix' if the host is listening on a unix domain socket
628 # 'unknown' otherwise
630 # @service: #optional The service name of the server's port. This may depends
631 # on the host system's service database so symbolic names should not
634 # @auth: #optional the current authentication type used by the server
635 # 'none' if no authentication is being used
636 # 'vnc' if VNC authentication is being used
637 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
638 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
639 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
640 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
641 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
642 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
643 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
644 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
645 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
647 # @clients: a list of @VncClientInfo of all currently connected clients
652 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
653 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
658 # Returns information about the current VNC server
664 { 'command': 'query-vnc', 'returns': 'VncInfo' }
669 # Information about a SPICE client channel.
671 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
674 # @family: 'ipv6' if the client is connected via IPv6 and TCP
675 # 'ipv4' if the client is connected via IPv4 and TCP
676 # 'unix' if the client is connected via a unix domain socket
677 # 'unknown' otherwise
679 # @port: The client's port number.
681 # @connection-id: SPICE connection id number. All channels with the same id
682 # belong to the same SPICE session.
684 # @connection-type: SPICE channel type number. "1" is the main control
685 # channel, filter for this one if you want to track spice
688 # @channel-id: SPICE channel ID number. Usually "0", might be different when
689 # multiple channels of the same type exist, such as multiple
690 # display channels in a multihead setup
692 # @tls: true if the channel is encrypted, false otherwise.
696 { 'type': 'SpiceChannel',
697 'data': {'host': 'str', 'family': 'str', 'port': 'str',
698 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
702 # @SpiceQueryMouseMode
704 # An enumation of Spice mouse states.
706 # @client: Mouse cursor position is determined by the client.
708 # @server: Mouse cursor position is determined by the server.
710 # @unknown: No information is available about mouse mode used by
713 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
717 { 'enum': 'SpiceQueryMouseMode',
718 'data': [ 'client', 'server', 'unknown' ] }
723 # Information about the SPICE session.
725 # @enabled: true if the SPICE server is enabled, false otherwise
727 # @host: #optional The hostname the SPICE server is bound to. This depends on
728 # the name resolution on the host and may be an IP address.
730 # @port: #optional The SPICE server's port number.
732 # @compiled-version: #optional SPICE server version.
734 # @tls-port: #optional The SPICE server's TLS port number.
736 # @auth: #optional the current authentication type used by the server
737 # 'none' if no authentication is being used
738 # 'spice' uses SASL or direct TLS authentication, depending on command
741 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
742 # be determined by the client or the server, or unknown if spice
743 # server doesn't provide this information.
747 # @channels: a list of @SpiceChannel for each active spice channel
751 { 'type': 'SpiceInfo',
752 'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
753 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
754 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
759 # Returns information about the current SPICE server
761 # Returns: @SpiceInfo
765 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
770 # Information about the guest balloon device.
772 # @actual: the number of bytes the balloon currently contains
774 # @mem_swapped_in: #optional number of pages swapped in within the guest
776 # @mem_swapped_out: #optional number of pages swapped out within the guest
778 # @major_page_faults: #optional number of major page faults within the guest
780 # @minor_page_faults: #optional number of minor page faults within the guest
782 # @free_mem: #optional amount of memory (in bytes) free in the guest
784 # @total_mem: #optional amount of memory (in bytes) visible to the guest
788 # Notes: all current versions of QEMU do not fill out optional information in
791 { 'type': 'BalloonInfo',
792 'data': {'actual': 'int', '*mem_swapped_in': 'int',
793 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
794 '*minor_page_faults': 'int', '*free_mem': 'int',
795 '*total_mem': 'int'} }
800 # Return information about the balloon device.
802 # Returns: @BalloonInfo on success
803 # If the balloon driver is enabled but not functional because the KVM
804 # kernel module cannot support it, KvmMissingCap
805 # If no balloon device is present, DeviceNotActive
809 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
814 # A PCI device memory region
816 # @base: the starting address (guest physical)
818 # @limit: the ending address (guest physical)
822 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
827 # Information about a PCI device I/O region.
829 # @bar: the index of the Base Address Register for this region
831 # @type: 'io' if the region is a PIO region
832 # 'memory' if the region is a MMIO region
834 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
836 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
840 { 'type': 'PciMemoryRegion',
841 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
842 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
847 # Information about a PCI Bridge device
849 # @bus.number: primary bus interface number. This should be the number of the
850 # bus the device resides on.
852 # @bus.secondary: secondary bus interface number. This is the number of the
853 # main bus for the bridge
855 # @bus.subordinate: This is the highest number bus that resides below the
858 # @bus.io_range: The PIO range for all devices on this bridge
860 # @bus.memory_range: The MMIO range for all devices on this bridge
862 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
865 # @devices: a list of @PciDeviceInfo for each device on this bridge
869 { 'type': 'PciBridgeInfo',
870 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
871 'io_range': 'PciMemoryRange',
872 'memory_range': 'PciMemoryRange',
873 'prefetchable_range': 'PciMemoryRange' },
874 '*devices': ['PciDeviceInfo']} }
879 # Information about a PCI device
881 # @bus: the bus number of the device
883 # @slot: the slot the device is located in
885 # @function: the function of the slot used by the device
887 # @class_info.desc: #optional a string description of the device's class
889 # @class_info.class: the class code of the device
891 # @id.device: the PCI device id
893 # @id.vendor: the PCI vendor id
895 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
897 # @qdev_id: the device name of the PCI device
899 # @pci_bridge: if the device is a PCI bridge, the bridge information
901 # @regions: a list of the PCI I/O regions associated with the device
903 # Notes: the contents of @class_info.desc are not stable and should only be
904 # treated as informational.
908 { 'type': 'PciDeviceInfo',
909 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
910 'class_info': {'*desc': 'str', 'class': 'int'},
911 'id': {'device': 'int', 'vendor': 'int'},
912 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
913 'regions': ['PciMemoryRegion']} }
918 # Information about a PCI bus
920 # @bus: the bus index
922 # @devices: a list of devices on this bus
926 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
931 # Return information about the PCI bus topology of the guest.
933 # Returns: a list of @PciInfo for each PCI bus
937 { 'command': 'query-pci', 'returns': ['PciInfo'] }
942 # Information about a long-running block device operation.
944 # @type: the job type ('stream' for image streaming)
946 # @device: the block device name
948 # @len: the maximum progress value
950 # @offset: the current progress value
952 # @speed: the rate limit, bytes per second
956 { 'type': 'BlockJobInfo',
957 'data': {'type': 'str', 'device': 'str', 'len': 'int',
958 'offset': 'int', 'speed': 'int'} }
963 # Return information about long-running block device operations.
965 # Returns: a list of @BlockJobInfo for each active block job
969 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
974 # This command will cause the QEMU process to exit gracefully. While every
975 # attempt is made to send the QMP response before terminating, this is not
976 # guaranteed. When using this interface, a premature EOF would not be
981 { 'command': 'quit' }
986 # Stop all guest VCPU execution.
990 # Notes: This function will succeed even if the guest is already in the stopped
993 { 'command': 'stop' }
998 # Performs a hard reset of a guest.
1002 { 'command': 'system_reset' }
1005 # @system_powerdown:
1007 # Requests that a guest perform a powerdown operation.
1011 # Notes: A guest may or may not respond to this command. This command
1012 # returning does not indicate that a guest has accepted the request or
1013 # that it has shut down. Many guests will respond to this command by
1014 # prompting the user in some way.
1016 { 'command': 'system_powerdown' }
1021 # This command is a nop that is only provided for the purposes of compatibility.
1025 # Notes: Do not use this command.
1027 { 'command': 'cpu', 'data': {'index': 'int'} }
1032 # Save a portion of guest memory to a file.
1034 # @val: the virtual address of the guest to start from
1036 # @size: the size of memory region to save
1038 # @filename: the file to save the memory to as binary data
1040 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1041 # virtual address (defaults to CPU 0)
1043 # Returns: Nothing on success
1047 # Notes: Errors were not reliably returned until 1.1
1049 { 'command': 'memsave',
1050 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1055 # Save a portion of guest physical memory to a file.
1057 # @val: the physical address of the guest to start from
1059 # @size: the size of memory region to save
1061 # @filename: the file to save the memory to as binary data
1063 # Returns: Nothing on success
1067 # Notes: Errors were not reliably returned until 1.1
1069 { 'command': 'pmemsave',
1070 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1075 # Resume guest VCPU execution.
1079 # Returns: If successful, nothing
1080 # If the QEMU is waiting for an incoming migration, MigrationExpected
1081 # If QEMU was started with an encrypted block device and a key has
1082 # not yet been set, DeviceEncrypted.
1084 # Notes: This command will succeed if the guest is currently running.
1086 { 'command': 'cont' }
1091 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1097 { 'command': 'system_wakeup' }
1102 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1104 # Returns: If successful, nothing
1108 # Notes: Only x86 Virtual Machines support this command.
1110 { 'command': 'inject-nmi' }
1115 # Sets the link status of a virtual network adapter.
1117 # @name: the device name of the virtual network adapter
1119 # @up: true to set the link status to be up
1121 # Returns: Nothing on success
1122 # If @name is not a valid network device, DeviceNotFound
1126 # Notes: Not all network adapters support setting link status. This command
1127 # will succeed even if the network adapter does not support link status
1130 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1135 # This command sets the password of a block device that has not been open
1136 # with a password and requires one.
1138 # The two cases where this can happen are a block device is created through
1139 # QEMU's initial command line or a block device is changed through the legacy
1140 # @change interface.
1142 # In the event that the block device is created through the initial command
1143 # line, the VM will start in the stopped state regardless of whether '-S' is
1144 # used. The intention is for a management tool to query the block devices to
1145 # determine which ones are encrypted, set the passwords with this command, and
1146 # then start the guest with the @cont command.
1148 # @device: the name of the device to set the password on
1150 # @password: the password to use for the device
1152 # Returns: nothing on success
1153 # If @device is not a valid block device, DeviceNotFound
1154 # If @device is not encrypted, DeviceNotEncrypted
1156 # Notes: Not all block formats support encryption and some that do are not
1157 # able to validate that a password is correct. Disk corruption may
1158 # occur if an invalid password is specified.
1162 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1167 # Request the balloon driver to change its balloon size.
1169 # @value: the target size of the balloon in bytes
1171 # Returns: Nothing on success
1172 # If the balloon driver is enabled but not functional because the KVM
1173 # kernel module cannot support it, KvmMissingCap
1174 # If no balloon device is present, DeviceNotActive
1176 # Notes: This command just issues a request to the guest. When it returns,
1177 # the balloon size may not have changed. A guest can change the balloon
1178 # size independent of this command.
1182 { 'command': 'balloon', 'data': {'value': 'int'} }
1187 # Resize a block image while a guest is running.
1189 # @device: the name of the device to get the image resized
1191 # @size: new image size in bytes
1193 # Returns: nothing on success
1194 # If @device is not a valid block device, DeviceNotFound
1198 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1203 # An enumeration that tells QEMU how to set the backing file path in
1206 # @existing: QEMU should look for an existing image file.
1208 # @absolute-paths: QEMU should create a new image with absolute paths
1209 # for the backing file.
1213 { 'enum': 'NewImageMode'
1214 'data': [ 'existing', 'absolute-paths' ] }
1219 # @device: the name of the device to generate the snapshot from.
1221 # @snapshot-file: the target of the new image. A new file will be created.
1223 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1225 # @mode: #optional whether and how QEMU should create a new image, default is
1228 { 'type': 'BlockdevSnapshot',
1229 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1230 '*mode': 'NewImageMode' } }
1235 # A discriminated record of operations that can be performed with
1238 { 'union': 'BlockdevAction',
1240 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1246 # Atomically operate on a group of one or more block devices. If
1247 # any operation fails, then the entire set of actions will be
1248 # abandoned and the appropriate error returned. The only operation
1249 # supported is currently blockdev-snapshot-sync.
1252 # @BlockdevAction: information needed for the device snapshot
1254 # Returns: nothing on success
1255 # If @device is not a valid block device, DeviceNotFound
1257 # Note: The transaction aborts on the first failure. Therefore, there will
1258 # be only one device or snapshot file returned in an error condition, and
1259 # subsequent actions will not have been attempted.
1263 { 'command': 'transaction',
1264 'data': { 'actions': [ 'BlockdevAction' ] } }
1267 # @blockdev-snapshot-sync
1269 # Generates a synchronous snapshot of a block device.
1271 # @device: the name of the device to generate the snapshot from.
1273 # @snapshot-file: the target of the new image. If the file exists, or if it
1274 # is a device, the snapshot will be created in the existing
1275 # file/device. If does not exist, a new file will be created.
1277 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1279 # @mode: #optional whether and how QEMU should create a new image, default is
1282 # Returns: nothing on success
1283 # If @device is not a valid block device, DeviceNotFound
1287 { 'command': 'blockdev-snapshot-sync',
1288 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1289 '*mode': 'NewImageMode'} }
1292 # @human-monitor-command:
1294 # Execute a command on the human monitor and return the output.
1296 # @command-line: the command to execute in the human monitor
1298 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1300 # Returns: the output of the command as a string
1304 # Notes: This command only exists as a stop-gap. It's use is highly
1305 # discouraged. The semantics of this command are not guaranteed.
1307 # Known limitations:
1309 # o This command is stateless, this means that commands that depend
1310 # on state information (such as getfd) might not work
1312 # o Commands that prompt the user for data (eg. 'cont' when the block
1313 # device is encrypted) don't currently work
1315 { 'command': 'human-monitor-command',
1316 'data': {'command-line': 'str', '*cpu-index': 'int'},
1322 # Cancel the current executing migration process.
1324 # Returns: nothing on success
1326 # Notes: This command succeeds even if there is no migration process running.
1330 { 'command': 'migrate_cancel' }
1333 # @migrate_set_downtime
1335 # Set maximum tolerated downtime for migration.
1337 # @value: maximum downtime in seconds
1339 # Returns: nothing on success
1343 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1346 # @migrate_set_speed
1348 # Set maximum speed for migration.
1350 # @value: maximum speed in bytes.
1352 # Returns: nothing on success
1354 # Notes: A value lesser than zero will be automatically round up to zero.
1358 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1361 # @ObjectPropertyInfo:
1363 # @name: the name of the property
1365 # @type: the type of the property. This will typically come in one of four
1368 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1369 # These types are mapped to the appropriate JSON type.
1371 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1372 # legacy qdev typename. These types are always treated as strings.
1374 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1375 # device type name. Child properties create the composition tree.
1377 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1378 # device type name. Link properties form the device model graph.
1382 { 'type': 'ObjectPropertyInfo',
1383 'data': { 'name': 'str', 'type': 'str' } }
1388 # This command will list any properties of a object given a path in the object
1391 # @path: the path within the object model. See @qom-get for a description of
1394 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1399 { 'command': 'qom-list',
1400 'data': { 'path': 'str' },
1401 'returns': [ 'ObjectPropertyInfo' ] }
1406 # This command will get a property from a object model path and return the
1409 # @path: The path within the object model. There are two forms of supported
1410 # paths--absolute and partial paths.
1412 # Absolute paths are derived from the root object and can follow child<>
1413 # or link<> properties. Since they can follow link<> properties, they
1414 # can be arbitrarily long. Absolute paths look like absolute filenames
1415 # and are prefixed with a leading slash.
1417 # Partial paths look like relative filenames. They do not begin
1418 # with a prefix. The matching rules for partial paths are subtle but
1419 # designed to make specifying objects easy. At each level of the
1420 # composition tree, the partial path is matched as an absolute path.
1421 # The first match is not returned. At least two matches are searched
1422 # for. A successful result is only returned if only one match is
1423 # found. If more than one match is found, a flag is return to
1424 # indicate that the match was ambiguous.
1426 # @property: The property name to read
1428 # Returns: The property value. The type depends on the property type. legacy<>
1429 # properties are returned as #str. child<> and link<> properties are
1430 # returns as #str pathnames. All integer property types (u8, u16, etc)
1431 # are returned as #int.
1435 { 'command': 'qom-get',
1436 'data': { 'path': 'str', 'property': 'str' },
1437 'returns': 'visitor',
1443 # This command will set a property from a object model path.
1445 # @path: see @qom-get for a description of this parameter
1447 # @property: the property name to set
1449 # @value: a value who's type is appropriate for the property type. See @qom-get
1450 # for a description of type mapping.
1454 { 'command': 'qom-set',
1455 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1461 # Sets the password of a remote display session.
1463 # @protocol: `vnc' to modify the VNC server password
1464 # `spice' to modify the Spice server password
1466 # @password: the new password
1468 # @connected: #optional how to handle existing clients when changing the
1469 # password. If nothing is specified, defaults to `keep'
1470 # `fail' to fail the command if clients are connected
1471 # `disconnect' to disconnect existing clients
1472 # `keep' to maintain existing clients
1474 # Returns: Nothing on success
1475 # If Spice is not enabled, DeviceNotFound
1479 { 'command': 'set_password',
1480 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1485 # Expire the password of a remote display server.
1487 # @protocol: the name of the remote display protocol `vnc' or `spice'
1489 # @time: when to expire the password.
1490 # `now' to expire the password immediately
1491 # `never' to cancel password expiration
1492 # `+INT' where INT is the number of seconds from now (integer)
1493 # `INT' where INT is the absolute time in seconds
1495 # Returns: Nothing on success
1496 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1500 # Notes: Time is relative to the server and currently there is no way to
1501 # coordinate server time with client time. It is not recommended to
1502 # use the absolute time version of the @time parameter unless you're
1503 # sure you are on the same machine as the QEMU instance.
1505 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1510 # Ejects a device from a removable drive.
1512 # @device: The name of the device
1514 # @force: @optional If true, eject regardless of whether the drive is locked.
1515 # If not specified, the default value is false.
1517 # Returns: Nothing on success
1518 # If @device is not a valid block device, DeviceNotFound
1520 # Notes: Ejecting a device will no media results in success
1524 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1527 # @change-vnc-password:
1529 # Change the VNC server password.
1531 # @target: the new password to use with VNC authentication
1535 # Notes: An empty password in this command will set the password to the empty
1536 # string. Existing clients are unaffected by executing this command.
1538 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1543 # This command is multiple commands multiplexed together.
1545 # @device: This is normally the name of a block device but it may also be 'vnc'.
1546 # when it's 'vnc', then sub command depends on @target
1548 # @target: If @device is a block device, then this is the new filename.
1549 # If @device is 'vnc', then if the value 'password' selects the vnc
1550 # change password command. Otherwise, this specifies a new server URI
1551 # address to listen to for VNC connections.
1553 # @arg: If @device is a block device, then this is an optional format to open
1555 # If @device is 'vnc' and @target is 'password', this is the new VNC
1556 # password to set. If this argument is an empty string, then no future
1557 # logins will be allowed.
1559 # Returns: Nothing on success.
1560 # If @device is not a valid block device, DeviceNotFound
1561 # If the new block device is encrypted, DeviceEncrypted. Note that
1562 # if this error is returned, the device has been opened successfully
1563 # and an additional call to @block_passwd is required to set the
1564 # device's password. The behavior of reads and writes to the block
1565 # device between when these calls are executed is undefined.
1567 # Notes: It is strongly recommended that this interface is not used especially
1568 # for changing block devices.
1572 { 'command': 'change',
1573 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1576 # @block_set_io_throttle:
1578 # Change I/O throttle limits for a block drive.
1580 # @device: The name of the device
1582 # @bps: total throughput limit in bytes per second
1584 # @bps_rd: read throughput limit in bytes per second
1586 # @bps_wr: write throughput limit in bytes per second
1588 # @iops: total I/O operations per second
1590 # @ops_rd: read I/O operations per second
1592 # @iops_wr: write I/O operations per second
1594 # Returns: Nothing on success
1595 # If @device is not a valid block device, DeviceNotFound
1599 { 'command': 'block_set_io_throttle',
1600 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1601 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1606 # Copy data from a backing file into a block device.
1608 # The block streaming operation is performed in the background until the entire
1609 # backing file has been copied. This command returns immediately once streaming
1610 # has started. The status of ongoing block streaming operations can be checked
1611 # with query-block-jobs. The operation can be stopped before it has completed
1612 # using the block-job-cancel command.
1614 # If a base file is specified then sectors are not copied from that base file and
1615 # its backing chain. When streaming completes the image file will have the base
1616 # file as its backing file. This can be used to stream a subset of the backing
1617 # file chain instead of flattening the entire image.
1619 # On successful completion the image file is updated to drop the backing file
1620 # and the BLOCK_JOB_COMPLETED event is emitted.
1622 # @device: the device name
1624 # @base: #optional the common backing file name
1626 # @speed: #optional the maximum speed, in bytes per second
1628 # Returns: Nothing on success
1629 # If @device does not exist, DeviceNotFound
1633 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1637 # @block-job-set-speed:
1639 # Set maximum speed for a background block operation.
1641 # This command can only be issued when there is an active block job.
1643 # Throttling can be disabled by setting the speed to 0.
1645 # @device: the device name
1647 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1650 # Returns: Nothing on success
1651 # If no background operation is active on this device, DeviceNotActive
1655 { 'command': 'block-job-set-speed',
1656 'data': { 'device': 'str', 'speed': 'int' } }
1659 # @block-job-cancel:
1661 # Stop an active background block operation.
1663 # This command returns immediately after marking the active background block
1664 # operation for cancellation. It is an error to call this command if no
1665 # operation is in progress.
1667 # The operation will cancel as soon as possible and then emit the
1668 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1669 # enumerated using query-block-jobs.
1671 # For streaming, the image file retains its backing file unless the streaming
1672 # operation happens to complete just as it is being cancelled. A new streaming
1673 # operation can be started at a later time to finish copying all data from the
1676 # @device: the device name
1678 # Returns: Nothing on success
1679 # If no background operation is active on this device, DeviceNotActive
1683 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1688 # This structure describes a search result from @qom-list-types
1690 # @name: the type name found in the search
1694 # Notes: This command is experimental and may change syntax in future releases.
1696 { 'type': 'ObjectTypeInfo',
1697 'data': { 'name': 'str' } }
1702 # This command will return a list of types given search parameters
1704 # @implements: if specified, only return types that implement this type name
1706 # @abstract: if true, include abstract types in the results
1708 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1712 { 'command': 'qom-list-types',
1713 'data': { '*implements': 'str', '*abstract': 'bool' },
1714 'returns': [ 'ObjectTypeInfo' ] }
1717 # @DevicePropertyInfo:
1719 # Information about device properties.
1721 # @name: the name of the property
1722 # @type: the typename of the property
1726 { 'type': 'DevicePropertyInfo',
1727 'data': { 'name': 'str', 'type': 'str' } }
1730 # @device-list-properties:
1732 # List properties associated with a device.
1734 # @typename: the type name of a device
1736 # Returns: a list of DevicePropertyInfo describing a devices properties
1740 { 'command': 'device-list-properties',
1741 'data': { 'typename': 'str'},
1742 'returns': [ 'DevicePropertyInfo' ] }
1747 # Migrates the current running guest to another Virtual Machine.
1749 # @uri: the Uniform Resource Identifier of the destination VM
1751 # @blk: #optional do block migration (full disk copy)
1753 # @inc: #optional incremental disk copy migration
1755 # @detach: this argument exists only for compatibility reasons and
1756 # is ignored by QEMU
1758 # Returns: nothing on success
1762 { 'command': 'migrate',
1763 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1765 # @xen-save-devices-state:
1767 # Save the state of all devices to file. The RAM and the block devices
1768 # of the VM are not saved by this command.
1770 # @filename: the file to save the state of the devices to as binary
1771 # data. See xen-save-devices-state.txt for a description of the binary
1774 # Returns: Nothing on success
1778 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1783 # Remove a device from a guest
1785 # @id: the name of the device
1787 # Returns: Nothing on success
1788 # If @id is not a valid device, DeviceNotFound
1790 # Notes: When this command completes, the device may not be removed from the
1791 # guest. Hot removal is an operation that requires guest cooperation.
1792 # This command merely requests that the guest begin the hot removal
1797 { 'command': 'device_del', 'data': {'id': 'str'} }
1800 # @dump-guest-memory
1802 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1803 # very long depending on the amount of guest memory. This command is only
1804 # supported on i386 and x86_64.
1806 # @paging: if true, do paging to get guest's memory mapping. This allows
1807 # using gdb to process the core file. However, setting @paging to false
1808 # may be desirable because of two reasons:
1810 # 1. The guest may be in a catastrophic state or can have corrupted
1811 # memory, which cannot be trusted
1812 # 2. The guest can be in real-mode even if paging is enabled. For example,
1813 # the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
1815 # @protocol: the filename or file descriptor of the vmcore. The supported
1818 # 1. file: the protocol starts with "file:", and the following string is
1820 # 2. fd: the protocol starts with "fd:", and the following string is the
1823 # @begin: #optional if specified, the starting physical address.
1825 # @length: #optional if specified, the memory size, in bytes. If you don't
1826 # want to dump all guest's memory, please specify the start @begin and @length
1828 # Returns: nothing on success
1832 { 'command': 'dump-guest-memory',
1833 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1834 '*length': 'int' } }
1838 # Add a network backend.
1840 # @type: the type of network backend. Current valid values are 'user', 'tap',
1841 # 'vde', 'socket', 'dump' and 'bridge'
1843 # @id: the name of the new network backend
1845 # @props: #optional a list of properties to be passed to the backend in
1846 # the format 'name=value', like 'ifname=tap0,script=no'
1848 # Notes: The semantics of @props is not well defined. Future commands will be
1849 # introduced that provide stronger typing for backend creation.
1853 # Returns: Nothing on success
1854 # If @type is not a valid network backend, DeviceNotFound
1856 { 'command': 'netdev_add',
1857 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1863 # Remove a network backend.
1865 # @id: the name of the network backend to remove
1867 # Returns: Nothing on success
1868 # If @id is not a valid network backend, DeviceNotFound
1872 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1875 # @NetdevNoneOptions
1877 # Use it alone to have zero network devices.
1881 { 'type': 'NetdevNoneOptions',
1885 # @NetLegacyNicOptions
1887 # Create a new Network Interface Card.
1889 # @netdev: #optional id of -netdev to connect to
1891 # @macaddr: #optional MAC address
1893 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1895 # @addr: #optional PCI device address
1897 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1901 { 'type': 'NetLegacyNicOptions',
1907 '*vectors': 'uint32' } }
1912 # A fat type wrapping 'str', to be embedded in lists.
1921 # @NetdevUserOptions
1923 # Use the user mode network stack which requires no administrator privilege to
1926 # @hostname: #optional client hostname reported by the builtin DHCP server
1928 # @restrict: #optional isolate the guest from the host
1930 # @ip: #optional legacy parameter, use net= instead
1932 # @net: #optional IP address and optional netmask
1934 # @host: #optional guest-visible address of the host
1936 # @tftp: #optional root directory of the built-in TFTP server
1938 # @bootfile: #optional BOOTP filename, for use with tftp=
1940 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1943 # @dns: #optional guest-visible address of the virtual nameserver
1945 # @smb: #optional root directory of the built-in SMB server
1947 # @smbserver: #optional IP address of the built-in SMB server
1949 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1952 # @guestfwd: #optional forward guest TCP connections
1956 { 'type': 'NetdevUserOptions',
1959 '*restrict': 'bool',
1965 '*dhcpstart': 'str',
1968 '*smbserver': 'str',
1969 '*hostfwd': ['String'],
1970 '*guestfwd': ['String'] } }
1975 # Connect the host TAP network interface name to the VLAN.
1977 # @ifname: #optional interface name
1979 # @fd: #optional file descriptor of an already opened tap
1981 # @script: #optional script to initialize the interface
1983 # @downscript: #optional script to shut down the interface
1985 # @helper: #optional command to execute to configure bridge
1987 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
1989 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
1991 # @vhost: #optional enable vhost-net network accelerator
1993 # @vhostfd: #optional file descriptor of an already opened vhost net device
1995 # @vhostforce: #optional vhost on for non-MSIX virtio guests
1999 { 'type': 'NetdevTapOptions',
2004 '*downscript': 'str',
2007 '*vnet_hdr': 'bool',
2010 '*vhostforce': 'bool' } }
2013 # @NetdevSocketOptions
2015 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2016 # socket connection.
2018 # @fd: #optional file descriptor of an already opened socket
2020 # @listen: #optional port number, and optional hostname, to listen on
2022 # @connect: #optional port number, and optional hostname, to connect to
2024 # @mcast: #optional UDP multicast address and port number
2026 # @localaddr: #optional source address and port for multicast and udp packets
2028 # @udp: #optional UDP unicast address and port number
2032 { 'type': 'NetdevSocketOptions',
2038 '*localaddr': 'str',
2044 # Connect the VLAN to a vde switch running on the host.
2046 # @sock: #optional socket path
2048 # @port: #optional port number
2050 # @group: #optional group owner of socket
2052 # @mode: #optional permissions for socket
2056 { 'type': 'NetdevVdeOptions',
2061 '*mode': 'uint16' } }
2064 # @NetdevDumpOptions
2066 # Dump VLAN network traffic to a file.
2068 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2071 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2075 { 'type': 'NetdevDumpOptions',
2081 # @NetdevBridgeOptions
2083 # Connect a host TAP network interface to a host bridge device.
2085 # @br: #optional bridge name
2087 # @helper: #optional command to execute to configure bridge
2091 { 'type': 'NetdevBridgeOptions',
2094 '*helper': 'str' } }
2097 # @NetdevHubPortOptions
2099 # Connect two or more net clients through a software hub.
2101 # @hubid: hub identifier number
2105 { 'type': 'NetdevHubPortOptions',
2107 'hubid': 'int32' } }
2112 # A discriminated record of network device traits.
2116 { 'union': 'NetClientOptions',
2118 'none': 'NetdevNoneOptions',
2119 'nic': 'NetLegacyNicOptions',
2120 'user': 'NetdevUserOptions',
2121 'tap': 'NetdevTapOptions',
2122 'socket': 'NetdevSocketOptions',
2123 'vde': 'NetdevVdeOptions',
2124 'dump': 'NetdevDumpOptions',
2125 'bridge': 'NetdevBridgeOptions',
2126 'hubport': 'NetdevHubPortOptions' } }
2131 # Captures the configuration of a network device; legacy.
2133 # @vlan: #optional vlan number
2135 # @id: #optional identifier for monitor commands
2137 # @name: #optional identifier for monitor commands, ignored if @id is present
2139 # @opts: device type specific properties (legacy)
2143 { 'type': 'NetLegacy',
2148 'opts': 'NetClientOptions' } }
2153 # Captures the configuration of a network device.
2155 # @id: identifier for monitor commands.
2157 # @opts: device type specific properties
2164 'opts': 'NetClientOptions' } }
2169 # Receive a file descriptor via SCM rights and assign it a name
2171 # @fdname: file descriptor name
2173 # Returns: Nothing on success
2177 # Notes: If @fdname already exists, the file descriptor assigned to
2178 # it will be closed and replaced by the received file
2180 # The 'closefd' command can be used to explicitly close the
2181 # file descriptor when it is no longer needed.
2183 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2188 # Close a file descriptor previously passed via SCM rights
2190 # @fdname: file descriptor name
2192 # Returns: Nothing on success
2196 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2201 # Information describing a machine.
2203 # @name: the name of the machine
2205 # @alias: #optional an alias for the machine name
2207 # @default: #optional whether the machine is default
2211 { 'type': 'MachineInfo',
2212 'data': { 'name': 'str', '*alias': 'str',
2213 '*is-default': 'bool' } }
2218 # Return a list of supported machines
2220 # Returns: a list of MachineInfo
2224 { 'command': 'query-machines', 'returns': ['MachineInfo'] }