8 # Guest name information.
10 # @name: #optional The name of the guest
14 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
19 # Return the name information of a guest.
21 # Returns: @NameInfo of the guest
25 { 'command': 'query-name', 'returns': 'NameInfo' }
30 # A description of QEMU's version.
32 # @qemu.major: The major version of QEMU
34 # @qemu.minor: The minor version of QEMU
36 # @qemu.micro: The micro version of QEMU. By current convention, a micro
37 # version of 50 signifies a development branch. A micro version
38 # greater than or equal to 90 signifies a release candidate for
39 # the next minor version. A micro version of less than 50
40 # signifies a stable release.
42 # @package: QEMU will always set this field to an empty string. Downstream
43 # versions of QEMU should set this to a non-empty string. The
44 # exact format depends on the downstream however it highly
45 # recommended that a unique name is used.
49 { 'type': 'VersionInfo',
50 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
56 # Returns the current version of QEMU.
58 # Returns: A @VersionInfo object describing the current version of QEMU.
62 { 'command': 'query-version', 'returns': 'VersionInfo' }
67 # Information about support for KVM acceleration
69 # @enabled: true if KVM acceleration is active
71 # @present: true if KVM acceleration is built into this executable
75 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
80 # Returns information about KVM acceleration
86 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
91 # An enumation of VM run states.
93 # @debug: QEMU is running on a debugger
95 # @finish-migrate: guest is paused to finish the migration process
97 # @inmigrate: guest is paused waiting for an incoming migration
99 # @internal-error: An internal error that prevents further guest execution
102 # @io-error: the last IOP has failed and the device is configured to pause
105 # @paused: guest has been paused via the 'stop' command
107 # @postmigrate: guest is paused following a successful 'migrate'
109 # @prelaunch: QEMU was started with -S and guest has not started
111 # @restore-vm: guest is paused to restore VM state
113 # @running: guest is actively running
115 # @save-vm: guest is paused to save the VM state
117 # @shutdown: guest is shut down (and -no-shutdown is in use)
119 # @suspended: guest is suspended (ACPI S3)
121 # @watchdog: the watchdog action is configured to pause and has been triggered
123 { 'enum': 'RunState',
124 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
125 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
126 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
131 # Information about VCPU run state
133 # @running: true if all VCPUs are runnable, false if not runnable
135 # @singlestep: true if VCPUs are in single-step mode
137 # @status: the virtual machine @RunState
141 # Notes: @singlestep is enabled through the GDB stub
143 { 'type': 'StatusInfo',
144 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
149 # Query the run status of all VCPUs
151 # Returns: @StatusInfo reflecting all VCPUs
155 { 'command': 'query-status', 'returns': 'StatusInfo' }
160 # Guest UUID information.
162 # @UUID: the UUID of the guest
166 # Notes: If no UUID was specified for the guest, a null UUID is returned.
168 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
173 # Query the guest UUID information.
175 # Returns: The @UuidInfo for the guest
179 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
184 # Information about a character device.
186 # @label: the label of the character device
188 # @filename: the filename of the character device
190 # Notes: @filename is encoded using the QEMU command line character device
191 # encoding. See the QEMU man page for details.
195 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
200 # Returns information about current character devices.
202 # Returns: a list of @ChardevInfo
206 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
211 # Information about a QMP command
213 # @name: The command name
217 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
222 # Return a list of supported QMP commands by this server
224 # Returns: A list of @CommandInfo for all supported commands
228 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
233 # Information about a QMP event
235 # @name: The event name
239 { 'type': 'EventInfo', 'data': {'name': 'str'} }
244 # Return a list of supported QMP events by this server
246 # Returns: A list of @EventInfo for all supported events
250 { 'command': 'query-events', 'returns': ['EventInfo'] }
255 # Detailed migration status.
257 # @transferred: amount of bytes already transferred to the target VM
259 # @remaining: amount of bytes remaining to be transferred to the target VM
261 # @total: total amount of bytes involved in the migration process
263 # @total-time: total amount of ms since migration started. If
264 # migration has ended, it returns the total migration
267 # @duplicate: number of duplicate pages (since 1.2)
269 # @normal : number of normal pages (since 1.2)
271 # @normal-bytes : number of normal bytes sent (since 1.2)
275 { 'type': 'MigrationStats',
276 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
277 'total-time': 'int', 'duplicate': 'int', 'normal': 'int',
278 'normal-bytes': 'int' } }
283 # Information about current migration process.
285 # @status: #optional string describing the current migration status.
286 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
287 # 'cancelled'. If this field is not returned, no migration process
290 # @ram: #optional @MigrationStats containing detailed migration
291 # status, only returned if status is 'active' or
292 # 'completed'. 'comppleted' (since 1.2)
294 # @disk: #optional @MigrationStats containing detailed disk migration
295 # status, only returned if status is 'active' and it is a block
300 { 'type': 'MigrationInfo',
301 'data': {'*status': 'str', '*ram': 'MigrationStats',
302 '*disk': 'MigrationStats'} }
307 # Returns information about current migration process.
309 # Returns: @MigrationInfo
313 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
316 # @MigrationCapability
318 # Migration capabilities enumeration
320 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
321 # This feature allows us to minimize migration traffic for certain work
322 # loads, by sending compressed difference of the pages
326 { 'enum': 'MigrationCapability',
330 # @MigrationCapabilityStatus
332 # Migration capability information
334 # @capability: capability enum
336 # @state: capability state bool
340 { 'type': 'MigrationCapabilityStatus',
341 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
344 # @migrate-set-capabilities
346 # Enable/Disable the following migration capabilities (like xbzrle)
348 # @capabilities: json array of capability modifications to make
352 { 'command': 'migrate-set-capabilities',
353 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
356 # @query-migrate-capabilities
358 # Returns information about the current migration capabilities status
360 # Returns: @MigrationCapabilitiesStatus
364 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
369 # Information about a mouse device.
371 # @name: the name of the mouse device
373 # @index: the index of the mouse device
375 # @current: true if this device is currently receiving mouse events
377 # @absolute: true if this device supports absolute coordinates as input
381 { 'type': 'MouseInfo',
382 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
383 'absolute': 'bool'} }
388 # Returns information about each active mouse device
390 # Returns: a list of @MouseInfo for each device
394 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
399 # Information about a virtual CPU
401 # @CPU: the index of the virtual CPU
403 # @current: this only exists for backwards compatible and should be ignored
405 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
406 # to a processor specific low power mode.
408 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
410 # If the target is Sparc, this is the PC component of the
411 # instruction pointer.
413 # @nip: #optional If the target is PPC, the instruction pointer
415 # @npc: #optional If the target is Sparc, the NPC component of the instruction
418 # @PC: #optional If the target is MIPS, the instruction pointer
420 # @thread_id: ID of the underlying host thread
424 # Notes: @halted is a transient state that changes frequently. By the time the
425 # data is sent to the client, the guest may no longer be halted.
428 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
429 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
434 # Returns a list of information about each virtual CPU.
436 # Returns: a list of @CpuInfo for each virtual CPU
440 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
445 # Information about the backing device for a block device.
447 # @file: the filename of the backing device
449 # @ro: true if the backing device was open read-only
451 # @drv: the name of the block format used to open the backing device. As of
452 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
453 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
454 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
455 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
457 # @backing_file: #optional the name of the backing file (for copy-on-write)
459 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
461 # @encrypted: true if the backing device is encrypted
463 # @bps: total throughput limit in bytes per second is specified
465 # @bps_rd: read throughput limit in bytes per second is specified
467 # @bps_wr: write throughput limit in bytes per second is specified
469 # @iops: total I/O operations per second is specified
471 # @iops_rd: read I/O operations per second is specified
473 # @iops_wr: write I/O operations per second is specified
477 # Notes: This interface is only found in @BlockInfo.
479 { 'type': 'BlockDeviceInfo',
480 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
481 '*backing_file': 'str', 'backing_file_depth': 'int',
482 'encrypted': 'bool', 'bps': 'int', 'bps_rd': 'int',
483 'bps_wr': 'int', 'iops': 'int', 'iops_rd': 'int',
487 # @BlockDeviceIoStatus:
489 # An enumeration of block device I/O status.
491 # @ok: The last I/O operation has succeeded
493 # @failed: The last I/O operation has failed
495 # @nospace: The last I/O operation has failed due to a no-space condition
499 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
504 # Block device information. This structure describes a virtual device and
505 # the backing device associated with it.
507 # @device: The device name associated with the virtual device.
509 # @type: This field is returned only for compatibility reasons, it should
510 # not be used (always returns 'unknown')
512 # @removable: True if the device supports removable media.
514 # @locked: True if the guest has locked this device from having its media
517 # @tray_open: #optional True if the device has a tray and it is open
518 # (only present if removable is true)
520 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
521 # supports it and the VM is configured to stop on errors
523 # @inserted: #optional @BlockDeviceInfo describing the device if media is
528 { 'type': 'BlockInfo',
529 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
530 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
531 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
536 # Get a list of BlockInfo for all virtual block devices.
538 # Returns: a list of @BlockInfo describing each virtual block device
542 { 'command': 'query-block', 'returns': ['BlockInfo'] }
547 # Statistics of a virtual block device or a block backing device.
549 # @rd_bytes: The number of bytes read by the device.
551 # @wr_bytes: The number of bytes written by the device.
553 # @rd_operations: The number of read operations performed by the device.
555 # @wr_operations: The number of write operations performed by the device.
557 # @flush_operations: The number of cache flush operations performed by the
558 # device (since 0.15.0)
560 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
563 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
565 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
567 # @wr_highest_offset: The offset after the greatest byte written to the
568 # device. The intended use of this information is for
569 # growable sparse files (like qcow2) that are used on top
570 # of a physical device.
574 { 'type': 'BlockDeviceStats',
575 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
576 'wr_operations': 'int', 'flush_operations': 'int',
577 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
578 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
583 # Statistics of a virtual block device or a block backing device.
585 # @device: #optional If the stats are for a virtual block device, the name
586 # corresponding to the virtual block device.
588 # @stats: A @BlockDeviceStats for the device.
590 # @parent: #optional This may point to the backing block device if this is a
591 # a virtual block device. If it's a backing block, this will point
592 # to the backing file is one is present.
596 { 'type': 'BlockStats',
597 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
598 '*parent': 'BlockStats'} }
603 # Query the @BlockStats for all virtual block devices.
605 # Returns: A list of @BlockStats for each virtual block devices.
609 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
614 # Information about a connected VNC client.
616 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
619 # @family: 'ipv6' if the client is connected via IPv6 and TCP
620 # 'ipv4' if the client is connected via IPv4 and TCP
621 # 'unix' if the client is connected via a unix domain socket
622 # 'unknown' otherwise
624 # @service: The service name of the client's port. This may depends on the
625 # host system's service database so symbolic names should not be
628 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
629 # Name of the client.
631 # @sasl_username: #optional If SASL authentication is in use, the SASL username
632 # used for authentication.
636 { 'type': 'VncClientInfo',
637 'data': {'host': 'str', 'family': 'str', 'service': 'str',
638 '*x509_dname': 'str', '*sasl_username': 'str'} }
643 # Information about the VNC session.
645 # @enabled: true if the VNC server is enabled, false otherwise
647 # @host: #optional The hostname the VNC server is bound to. This depends on
648 # the name resolution on the host and may be an IP address.
650 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
651 # 'ipv4' if the host is listening for IPv4 connections
652 # 'unix' if the host is listening on a unix domain socket
653 # 'unknown' otherwise
655 # @service: #optional The service name of the server's port. This may depends
656 # on the host system's service database so symbolic names should not
659 # @auth: #optional the current authentication type used by the server
660 # 'none' if no authentication is being used
661 # 'vnc' if VNC authentication is being used
662 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
663 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
664 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
665 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
666 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
667 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
668 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
669 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
670 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
672 # @clients: a list of @VncClientInfo of all currently connected clients
677 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
678 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
683 # Returns information about the current VNC server
686 # If VNC support is not compiled in, FeatureDisabled
690 { 'command': 'query-vnc', 'returns': 'VncInfo' }
695 # Information about a SPICE client channel.
697 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
700 # @family: 'ipv6' if the client is connected via IPv6 and TCP
701 # 'ipv4' if the client is connected via IPv4 and TCP
702 # 'unix' if the client is connected via a unix domain socket
703 # 'unknown' otherwise
705 # @port: The client's port number.
707 # @connection-id: SPICE connection id number. All channels with the same id
708 # belong to the same SPICE session.
710 # @connection-type: SPICE channel type number. "1" is the main control
711 # channel, filter for this one if you want to track spice
714 # @channel-id: SPICE channel ID number. Usually "0", might be different when
715 # multiple channels of the same type exist, such as multiple
716 # display channels in a multihead setup
718 # @tls: true if the channel is encrypted, false otherwise.
722 { 'type': 'SpiceChannel',
723 'data': {'host': 'str', 'family': 'str', 'port': 'str',
724 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
728 # @SpiceQueryMouseMode
730 # An enumation of Spice mouse states.
732 # @client: Mouse cursor position is determined by the client.
734 # @server: Mouse cursor position is determined by the server.
736 # @unknown: No information is available about mouse mode used by
739 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
743 { 'enum': 'SpiceQueryMouseMode',
744 'data': [ 'client', 'server', 'unknown' ] }
749 # Information about the SPICE session.
751 # @enabled: true if the SPICE server is enabled, false otherwise
753 # @host: #optional The hostname the SPICE server is bound to. This depends on
754 # the name resolution on the host and may be an IP address.
756 # @port: #optional The SPICE server's port number.
758 # @compiled-version: #optional SPICE server version.
760 # @tls-port: #optional The SPICE server's TLS port number.
762 # @auth: #optional the current authentication type used by the server
763 # 'none' if no authentication is being used
764 # 'spice' uses SASL or direct TLS authentication, depending on command
767 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
768 # be determined by the client or the server, or unknown if spice
769 # server doesn't provide this information.
773 # @channels: a list of @SpiceChannel for each active spice channel
777 { 'type': 'SpiceInfo',
778 'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
779 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
780 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
785 # Returns information about the current SPICE server
787 # Returns: @SpiceInfo
791 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
796 # Information about the guest balloon device.
798 # @actual: the number of bytes the balloon currently contains
800 # @mem_swapped_in: #optional number of pages swapped in within the guest
802 # @mem_swapped_out: #optional number of pages swapped out within the guest
804 # @major_page_faults: #optional number of major page faults within the guest
806 # @minor_page_faults: #optional number of minor page faults within the guest
808 # @free_mem: #optional amount of memory (in bytes) free in the guest
810 # @total_mem: #optional amount of memory (in bytes) visible to the guest
814 # Notes: all current versions of QEMU do not fill out optional information in
817 { 'type': 'BalloonInfo',
818 'data': {'actual': 'int', '*mem_swapped_in': 'int',
819 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
820 '*minor_page_faults': 'int', '*free_mem': 'int',
821 '*total_mem': 'int'} }
826 # Return information about the balloon device.
828 # Returns: @BalloonInfo on success
829 # If the balloon driver is enabled but not functional because the KVM
830 # kernel module cannot support it, KvmMissingCap
831 # If no balloon device is present, DeviceNotActive
835 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
840 # A PCI device memory region
842 # @base: the starting address (guest physical)
844 # @limit: the ending address (guest physical)
848 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
853 # Information about a PCI device I/O region.
855 # @bar: the index of the Base Address Register for this region
857 # @type: 'io' if the region is a PIO region
858 # 'memory' if the region is a MMIO region
860 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
862 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
866 { 'type': 'PciMemoryRegion',
867 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
868 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
873 # Information about a PCI Bridge device
875 # @bus.number: primary bus interface number. This should be the number of the
876 # bus the device resides on.
878 # @bus.secondary: secondary bus interface number. This is the number of the
879 # main bus for the bridge
881 # @bus.subordinate: This is the highest number bus that resides below the
884 # @bus.io_range: The PIO range for all devices on this bridge
886 # @bus.memory_range: The MMIO range for all devices on this bridge
888 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
891 # @devices: a list of @PciDeviceInfo for each device on this bridge
895 { 'type': 'PciBridgeInfo',
896 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
897 'io_range': 'PciMemoryRange',
898 'memory_range': 'PciMemoryRange',
899 'prefetchable_range': 'PciMemoryRange' },
900 '*devices': ['PciDeviceInfo']} }
905 # Information about a PCI device
907 # @bus: the bus number of the device
909 # @slot: the slot the device is located in
911 # @function: the function of the slot used by the device
913 # @class_info.desc: #optional a string description of the device's class
915 # @class_info.class: the class code of the device
917 # @id.device: the PCI device id
919 # @id.vendor: the PCI vendor id
921 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
923 # @qdev_id: the device name of the PCI device
925 # @pci_bridge: if the device is a PCI bridge, the bridge information
927 # @regions: a list of the PCI I/O regions associated with the device
929 # Notes: the contents of @class_info.desc are not stable and should only be
930 # treated as informational.
934 { 'type': 'PciDeviceInfo',
935 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
936 'class_info': {'*desc': 'str', 'class': 'int'},
937 'id': {'device': 'int', 'vendor': 'int'},
938 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
939 'regions': ['PciMemoryRegion']} }
944 # Information about a PCI bus
946 # @bus: the bus index
948 # @devices: a list of devices on this bus
952 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
957 # Return information about the PCI bus topology of the guest.
959 # Returns: a list of @PciInfo for each PCI bus
963 { 'command': 'query-pci', 'returns': ['PciInfo'] }
968 # Information about a long-running block device operation.
970 # @type: the job type ('stream' for image streaming)
972 # @device: the block device name
974 # @len: the maximum progress value
976 # @offset: the current progress value
978 # @speed: the rate limit, bytes per second
982 { 'type': 'BlockJobInfo',
983 'data': {'type': 'str', 'device': 'str', 'len': 'int',
984 'offset': 'int', 'speed': 'int'} }
989 # Return information about long-running block device operations.
991 # Returns: a list of @BlockJobInfo for each active block job
995 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1000 # This command will cause the QEMU process to exit gracefully. While every
1001 # attempt is made to send the QMP response before terminating, this is not
1002 # guaranteed. When using this interface, a premature EOF would not be
1007 { 'command': 'quit' }
1012 # Stop all guest VCPU execution.
1016 # Notes: This function will succeed even if the guest is already in the stopped
1019 { 'command': 'stop' }
1024 # Performs a hard reset of a guest.
1028 { 'command': 'system_reset' }
1031 # @system_powerdown:
1033 # Requests that a guest perform a powerdown operation.
1037 # Notes: A guest may or may not respond to this command. This command
1038 # returning does not indicate that a guest has accepted the request or
1039 # that it has shut down. Many guests will respond to this command by
1040 # prompting the user in some way.
1042 { 'command': 'system_powerdown' }
1047 # This command is a nop that is only provided for the purposes of compatibility.
1051 # Notes: Do not use this command.
1053 { 'command': 'cpu', 'data': {'index': 'int'} }
1058 # Save a portion of guest memory to a file.
1060 # @val: the virtual address of the guest to start from
1062 # @size: the size of memory region to save
1064 # @filename: the file to save the memory to as binary data
1066 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1067 # virtual address (defaults to CPU 0)
1069 # Returns: Nothing on success
1070 # If @cpu is not a valid VCPU, InvalidParameterValue
1071 # If @filename cannot be opened, OpenFileFailed
1072 # If an I/O error occurs while writing the file, IOError
1076 # Notes: Errors were not reliably returned until 1.1
1078 { 'command': 'memsave',
1079 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1084 # Save a portion of guest physical memory to a file.
1086 # @val: the physical address of the guest to start from
1088 # @size: the size of memory region to save
1090 # @filename: the file to save the memory to as binary data
1092 # Returns: Nothing on success
1093 # If @filename cannot be opened, OpenFileFailed
1094 # If an I/O error occurs while writing the file, IOError
1098 # Notes: Errors were not reliably returned until 1.1
1100 { 'command': 'pmemsave',
1101 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1106 # Resume guest VCPU execution.
1110 # Returns: If successful, nothing
1111 # If the QEMU is waiting for an incoming migration, MigrationExpected
1112 # If QEMU was started with an encrypted block device and a key has
1113 # not yet been set, DeviceEncrypted.
1115 # Notes: This command will succeed if the guest is currently running.
1117 { 'command': 'cont' }
1122 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1128 { 'command': 'system_wakeup' }
1133 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1135 # Returns: If successful, nothing
1136 # If the Virtual Machine doesn't support NMI injection, Unsupported
1140 # Notes: Only x86 Virtual Machines support this command.
1142 { 'command': 'inject-nmi' }
1147 # Sets the link status of a virtual network adapter.
1149 # @name: the device name of the virtual network adapter
1151 # @up: true to set the link status to be up
1153 # Returns: Nothing on success
1154 # If @name is not a valid network device, DeviceNotFound
1158 # Notes: Not all network adapters support setting link status. This command
1159 # will succeed even if the network adapter does not support link status
1162 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1167 # This command sets the password of a block device that has not been open
1168 # with a password and requires one.
1170 # The two cases where this can happen are a block device is created through
1171 # QEMU's initial command line or a block device is changed through the legacy
1172 # @change interface.
1174 # In the event that the block device is created through the initial command
1175 # line, the VM will start in the stopped state regardless of whether '-S' is
1176 # used. The intention is for a management tool to query the block devices to
1177 # determine which ones are encrypted, set the passwords with this command, and
1178 # then start the guest with the @cont command.
1180 # @device: the name of the device to set the password on
1182 # @password: the password to use for the device
1184 # Returns: nothing on success
1185 # If @device is not a valid block device, DeviceNotFound
1186 # If @device is not encrypted, DeviceNotEncrypted
1187 # If @password is not valid for this device, InvalidPassword
1189 # Notes: Not all block formats support encryption and some that do are not
1190 # able to validate that a password is correct. Disk corruption may
1191 # occur if an invalid password is specified.
1195 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1200 # Request the balloon driver to change its balloon size.
1202 # @value: the target size of the balloon in bytes
1204 # Returns: Nothing on success
1205 # If the balloon driver is enabled but not functional because the KVM
1206 # kernel module cannot support it, KvmMissingCap
1207 # If no balloon device is present, DeviceNotActive
1209 # Notes: This command just issues a request to the guest. When it returns,
1210 # the balloon size may not have changed. A guest can change the balloon
1211 # size independent of this command.
1215 { 'command': 'balloon', 'data': {'value': 'int'} }
1220 # Resize a block image while a guest is running.
1222 # @device: the name of the device to get the image resized
1224 # @size: new image size in bytes
1226 # Returns: nothing on success
1227 # If @device is not a valid block device, DeviceNotFound
1228 # If @size is negative, InvalidParameterValue
1229 # If the block device has no medium inserted, DeviceHasNoMedium
1230 # If the block device does not support resize, Unsupported
1231 # If the block device is read-only, DeviceIsReadOnly
1232 # If a long-running operation is using the device, DeviceInUse
1236 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1241 # An enumeration that tells QEMU how to set the backing file path in
1244 # @existing: QEMU should look for an existing image file.
1246 # @absolute-paths: QEMU should create a new image with absolute paths
1247 # for the backing file.
1251 { 'enum': 'NewImageMode'
1252 'data': [ 'existing', 'absolute-paths' ] }
1257 # @device: the name of the device to generate the snapshot from.
1259 # @snapshot-file: the target of the new image. A new file will be created.
1261 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1263 # @mode: #optional whether and how QEMU should create a new image, default is
1266 { 'type': 'BlockdevSnapshot',
1267 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1268 '*mode': 'NewImageMode' } }
1273 # A discriminated record of operations that can be performed with
1276 { 'union': 'BlockdevAction',
1278 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1284 # Atomically operate on a group of one or more block devices. If
1285 # any operation fails, then the entire set of actions will be
1286 # abandoned and the appropriate error returned. The only operation
1287 # supported is currently blockdev-snapshot-sync.
1290 # @BlockdevAction: information needed for the device snapshot
1292 # Returns: nothing on success
1293 # If @device is not a valid block device, DeviceNotFound
1294 # If @device is busy, DeviceInUse will be returned
1295 # If @snapshot-file can't be created, OpenFileFailed
1296 # If @snapshot-file can't be opened, OpenFileFailed
1297 # If @format is invalid, InvalidBlockFormat
1299 # Note: The transaction aborts on the first failure. Therefore, there will
1300 # be only one device or snapshot file returned in an error condition, and
1301 # subsequent actions will not have been attempted.
1305 { 'command': 'transaction',
1306 'data': { 'actions': [ 'BlockdevAction' ] } }
1309 # @blockdev-snapshot-sync
1311 # Generates a synchronous snapshot of a block device.
1313 # @device: the name of the device to generate the snapshot from.
1315 # @snapshot-file: the target of the new image. If the file exists, or if it
1316 # is a device, the snapshot will be created in the existing
1317 # file/device. If does not exist, a new file will be created.
1319 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1321 # @mode: #optional whether and how QEMU should create a new image, default is
1324 # Returns: nothing on success
1325 # If @device is not a valid block device, DeviceNotFound
1326 # If @snapshot-file can't be opened, OpenFileFailed
1327 # If @format is invalid, InvalidBlockFormat
1331 { 'command': 'blockdev-snapshot-sync',
1332 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1333 '*mode': 'NewImageMode'} }
1336 # @human-monitor-command:
1338 # Execute a command on the human monitor and return the output.
1340 # @command-line: the command to execute in the human monitor
1342 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1344 # Returns: the output of the command as a string
1348 # Notes: This command only exists as a stop-gap. It's use is highly
1349 # discouraged. The semantics of this command are not guaranteed.
1351 # Known limitations:
1353 # o This command is stateless, this means that commands that depend
1354 # on state information (such as getfd) might not work
1356 # o Commands that prompt the user for data (eg. 'cont' when the block
1357 # device is encrypted) don't currently work
1359 { 'command': 'human-monitor-command',
1360 'data': {'command-line': 'str', '*cpu-index': 'int'},
1366 # Cancel the current executing migration process.
1368 # Returns: nothing on success
1370 # Notes: This command succeeds even if there is no migration process running.
1374 { 'command': 'migrate_cancel' }
1377 # @migrate_set_downtime
1379 # Set maximum tolerated downtime for migration.
1381 # @value: maximum downtime in seconds
1383 # Returns: nothing on success
1387 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1390 # @migrate_set_speed
1392 # Set maximum speed for migration.
1394 # @value: maximum speed in bytes.
1396 # Returns: nothing on success
1398 # Notes: A value lesser than zero will be automatically round up to zero.
1402 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1405 # @migrate-set-cache-size
1407 # Set XBZRLE cache size
1409 # @value: cache size in bytes
1411 # The size will be rounded down to the nearest power of 2.
1412 # The cache size can be modified before and during ongoing migration
1414 # Returns: nothing on success
1418 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1421 # @query-migrate-cache-size
1423 # query XBZRLE cache size
1425 # Returns: XBZRLE cache size in bytes
1429 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1432 # @ObjectPropertyInfo:
1434 # @name: the name of the property
1436 # @type: the type of the property. This will typically come in one of four
1439 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1440 # These types are mapped to the appropriate JSON type.
1442 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1443 # legacy qdev typename. These types are always treated as strings.
1445 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1446 # device type name. Child properties create the composition tree.
1448 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1449 # device type name. Link properties form the device model graph.
1453 # Notes: This type is experimental. Its syntax may change in future releases.
1455 { 'type': 'ObjectPropertyInfo',
1456 'data': { 'name': 'str', 'type': 'str' } }
1461 # This command will list any properties of a object given a path in the object
1464 # @path: the path within the object model. See @qom-get for a description of
1467 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1472 # Notes: This command is experimental. It's syntax may change in future
1475 { 'command': 'qom-list',
1476 'data': { 'path': 'str' },
1477 'returns': [ 'ObjectPropertyInfo' ] }
1482 # This command will get a property from a object model path and return the
1485 # @path: The path within the object model. There are two forms of supported
1486 # paths--absolute and partial paths.
1488 # Absolute paths are derived from the root object and can follow child<>
1489 # or link<> properties. Since they can follow link<> properties, they
1490 # can be arbitrarily long. Absolute paths look like absolute filenames
1491 # and are prefixed with a leading slash.
1493 # Partial paths look like relative filenames. They do not begin
1494 # with a prefix. The matching rules for partial paths are subtle but
1495 # designed to make specifying objects easy. At each level of the
1496 # composition tree, the partial path is matched as an absolute path.
1497 # The first match is not returned. At least two matches are searched
1498 # for. A successful result is only returned if only one match is
1499 # found. If more than one match is found, a flag is return to
1500 # indicate that the match was ambiguous.
1502 # @property: The property name to read
1504 # Returns: The property value. The type depends on the property type. legacy<>
1505 # properties are returned as #str. child<> and link<> properties are
1506 # returns as #str pathnames. All integer property types (u8, u16, etc)
1507 # are returned as #int.
1511 # Notes: This command is experimental and may change syntax in future releases.
1513 { 'command': 'qom-get',
1514 'data': { 'path': 'str', 'property': 'str' },
1515 'returns': 'visitor',
1521 # This command will set a property from a object model path.
1523 # @path: see @qom-get for a description of this parameter
1525 # @property: the property name to set
1527 # @value: a value who's type is appropriate for the property type. See @qom-get
1528 # for a description of type mapping.
1532 # Notes: This command is experimental and may change syntax in future releases.
1534 { 'command': 'qom-set',
1535 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1541 # Sets the password of a remote display session.
1543 # @protocol: `vnc' to modify the VNC server password
1544 # `spice' to modify the Spice server password
1546 # @password: the new password
1548 # @connected: #optional how to handle existing clients when changing the
1549 # password. If nothing is specified, defaults to `keep'
1550 # `fail' to fail the command if clients are connected
1551 # `disconnect' to disconnect existing clients
1552 # `keep' to maintain existing clients
1554 # Returns: Nothing on success
1555 # If Spice is not enabled, DeviceNotFound
1556 # If @protocol does not support connected, InvalidParameter
1557 # If @protocol is invalid, InvalidParameter
1558 # If any other error occurs, SetPasswdFailed
1560 # Notes: If VNC is not enabled, SetPasswdFailed is returned.
1564 { 'command': 'set_password',
1565 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1570 # Expire the password of a remote display server.
1572 # @protocol: the name of the remote display protocol `vnc' or `spice'
1574 # @time: when to expire the password.
1575 # `now' to expire the password immediately
1576 # `never' to cancel password expiration
1577 # `+INT' where INT is the number of seconds from now (integer)
1578 # `INT' where INT is the absolute time in seconds
1580 # Returns: Nothing on success
1581 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1582 # If an error occurs setting password expiration, SetPasswdFailed
1583 # If @protocol is not `spice' or 'vnc', InvalidParameter
1587 # Notes: Time is relative to the server and currently there is no way to
1588 # coordinate server time with client time. It is not recommended to
1589 # use the absolute time version of the @time parameter unless you're
1590 # sure you are on the same machine as the QEMU instance.
1592 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1597 # Ejects a device from a removable drive.
1599 # @device: The name of the device
1601 # @force: @optional If true, eject regardless of whether the drive is locked.
1602 # If not specified, the default value is false.
1604 # Returns: Nothing on success
1605 # If @device is not a valid block device, DeviceNotFound
1606 # If @device is not removable and @force is false, DeviceNotRemovable
1607 # If @force is false and @device is locked, DeviceLocked
1609 # Notes: Ejecting a device will no media results in success
1613 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1616 # @change-vnc-password:
1618 # Change the VNC server password.
1620 # @target: the new password to use with VNC authentication
1624 # Notes: An empty password in this command will set the password to the empty
1625 # string. Existing clients are unaffected by executing this command.
1627 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1632 # This command is multiple commands multiplexed together.
1634 # @device: This is normally the name of a block device but it may also be 'vnc'.
1635 # when it's 'vnc', then sub command depends on @target
1637 # @target: If @device is a block device, then this is the new filename.
1638 # If @device is 'vnc', then if the value 'password' selects the vnc
1639 # change password command. Otherwise, this specifies a new server URI
1640 # address to listen to for VNC connections.
1642 # @arg: If @device is a block device, then this is an optional format to open
1644 # If @device is 'vnc' and @target is 'password', this is the new VNC
1645 # password to set. If this argument is an empty string, then no future
1646 # logins will be allowed.
1648 # Returns: Nothing on success.
1649 # If @device is not a valid block device, DeviceNotFound
1650 # If @format is not a valid block format, InvalidBlockFormat
1651 # If the new block device is encrypted, DeviceEncrypted. Note that
1652 # if this error is returned, the device has been opened successfully
1653 # and an additional call to @block_passwd is required to set the
1654 # device's password. The behavior of reads and writes to the block
1655 # device between when these calls are executed is undefined.
1657 # Notes: It is strongly recommended that this interface is not used especially
1658 # for changing block devices.
1662 { 'command': 'change',
1663 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1666 # @block_set_io_throttle:
1668 # Change I/O throttle limits for a block drive.
1670 # @device: The name of the device
1672 # @bps: total throughput limit in bytes per second
1674 # @bps_rd: read throughput limit in bytes per second
1676 # @bps_wr: write throughput limit in bytes per second
1678 # @iops: total I/O operations per second
1680 # @ops_rd: read I/O operations per second
1682 # @iops_wr: write I/O operations per second
1684 # Returns: Nothing on success
1685 # If @device is not a valid block device, DeviceNotFound
1686 # If the argument combination is invalid, InvalidParameterCombination
1690 { 'command': 'block_set_io_throttle',
1691 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1692 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1697 # Copy data from a backing file into a block device.
1699 # The block streaming operation is performed in the background until the entire
1700 # backing file has been copied. This command returns immediately once streaming
1701 # has started. The status of ongoing block streaming operations can be checked
1702 # with query-block-jobs. The operation can be stopped before it has completed
1703 # using the block-job-cancel command.
1705 # If a base file is specified then sectors are not copied from that base file and
1706 # its backing chain. When streaming completes the image file will have the base
1707 # file as its backing file. This can be used to stream a subset of the backing
1708 # file chain instead of flattening the entire image.
1710 # On successful completion the image file is updated to drop the backing file
1711 # and the BLOCK_JOB_COMPLETED event is emitted.
1713 # @device: the device name
1715 # @base: #optional the common backing file name
1717 # @speed: #optional the maximum speed, in bytes per second
1719 # Returns: Nothing on success
1720 # If streaming is already active on this device, DeviceInUse
1721 # If @device does not exist, DeviceNotFound
1722 # If image streaming is not supported by this device, NotSupported
1723 # If @base does not exist, BaseNotFound
1724 # If @speed is invalid, InvalidParameter
1728 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1732 # @block-job-set-speed:
1734 # Set maximum speed for a background block operation.
1736 # This command can only be issued when there is an active block job.
1738 # Throttling can be disabled by setting the speed to 0.
1740 # @device: the device name
1742 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1745 # Returns: Nothing on success
1746 # If the job type does not support throttling, NotSupported
1747 # If the speed value is invalid, InvalidParameter
1748 # If no background operation is active on this device, DeviceNotActive
1752 { 'command': 'block-job-set-speed',
1753 'data': { 'device': 'str', 'speed': 'int' } }
1756 # @block-job-cancel:
1758 # Stop an active background block operation.
1760 # This command returns immediately after marking the active background block
1761 # operation for cancellation. It is an error to call this command if no
1762 # operation is in progress.
1764 # The operation will cancel as soon as possible and then emit the
1765 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1766 # enumerated using query-block-jobs.
1768 # For streaming, the image file retains its backing file unless the streaming
1769 # operation happens to complete just as it is being cancelled. A new streaming
1770 # operation can be started at a later time to finish copying all data from the
1773 # @device: the device name
1775 # Returns: Nothing on success
1776 # If no background operation is active on this device, DeviceNotActive
1777 # If cancellation already in progress, DeviceInUse
1781 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1786 # This structure describes a search result from @qom-list-types
1788 # @name: the type name found in the search
1792 # Notes: This command is experimental and may change syntax in future releases.
1794 { 'type': 'ObjectTypeInfo',
1795 'data': { 'name': 'str' } }
1800 # This command will return a list of types given search parameters
1802 # @implements: if specified, only return types that implement this type name
1804 # @abstract: if true, include abstract types in the results
1806 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1810 # Notes: This command is experimental and may change syntax in future releases.
1812 { 'command': 'qom-list-types',
1813 'data': { '*implements': 'str', '*abstract': 'bool' },
1814 'returns': [ 'ObjectTypeInfo' ] }
1819 # Migrates the current running guest to another Virtual Machine.
1821 # @uri: the Uniform Resource Identifier of the destination VM
1823 # @blk: #optional do block migration (full disk copy)
1825 # @inc: #optional incremental disk copy migration
1827 # @detach: this argument exists only for compatibility reasons and
1828 # is ignored by QEMU
1830 # Returns: nothing on success
1834 { 'command': 'migrate',
1835 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1837 # @xen-save-devices-state:
1839 # Save the state of all devices to file. The RAM and the block devices
1840 # of the VM are not saved by this command.
1842 # @filename: the file to save the state of the devices to as binary
1843 # data. See xen-save-devices-state.txt for a description of the binary
1846 # Returns: Nothing on success
1847 # If @filename cannot be opened, OpenFileFailed
1848 # If an I/O error occurs while writing the file, IOError
1852 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1857 # Remove a device from a guest
1859 # @id: the name of the device
1861 # Returns: Nothing on success
1862 # If @id is not a valid device, DeviceNotFound
1863 # If the device does not support unplug, BusNoHotplug
1865 # Notes: When this command completes, the device may not be removed from the
1866 # guest. Hot removal is an operation that requires guest cooperation.
1867 # This command merely requests that the guest begin the hot removal
1872 { 'command': 'device_del', 'data': {'id': 'str'} }
1875 # @dump-guest-memory
1877 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1878 # very long depending on the amount of guest memory. This command is only
1879 # supported on i386 and x86_64.
1881 # @paging: if true, do paging to get guest's memory mapping. This allows
1882 # using gdb to process the core file. However, setting @paging to false
1883 # may be desirable because of two reasons:
1885 # 1. The guest may be in a catastrophic state or can have corrupted
1886 # memory, which cannot be trusted
1887 # 2. The guest can be in real-mode even if paging is enabled. For example,
1888 # the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
1890 # @protocol: the filename or file descriptor of the vmcore. The supported
1893 # 1. file: the protocol starts with "file:", and the following string is
1895 # 2. fd: the protocol starts with "fd:", and the following string is the
1898 # @begin: #optional if specified, the starting physical address.
1900 # @length: #optional if specified, the memory size, in bytes. If you don't
1901 # want to dump all guest's memory, please specify the start @begin and @length
1903 # Returns: nothing on success
1904 # If @begin contains an invalid address, InvalidParameter
1905 # If only one of @begin and @length is specified, MissingParameter
1906 # If @protocol stats with "fd:", and the fd cannot be found, FdNotFound
1907 # If @protocol starts with "file:", and the file cannot be
1908 # opened, OpenFileFailed
1909 # If @protocol does not start with "fd:" or "file:", InvalidParameter
1910 # If an I/O error occurs while writing the file, IOError
1911 # If the target does not support this command, Unsupported
1915 { 'command': 'dump-guest-memory',
1916 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1917 '*length': 'int' } }
1921 # Add a network backend.
1923 # @type: the type of network backend. Current valid values are 'user', 'tap',
1924 # 'vde', 'socket', 'dump' and 'bridge'
1926 # @id: the name of the new network backend
1928 # @props: #optional a list of properties to be passed to the backend in
1929 # the format 'name=value', like 'ifname=tap0,script=no'
1931 # Notes: The semantics of @props is not well defined. Future commands will be
1932 # introduced that provide stronger typing for backend creation.
1936 # Returns: Nothing on success
1937 # If @type is not a valid network backend, DeviceNotFound
1938 # If @id is not a valid identifier, InvalidParameterValue
1939 # if @id already exists, DuplicateId
1940 # If @props contains an invalid parameter for this backend,
1943 { 'command': 'netdev_add',
1944 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1950 # Remove a network backend.
1952 # @id: the name of the network backend to remove
1954 # Returns: Nothing on success
1955 # If @id is not a valid network backend, DeviceNotFound
1959 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1962 # @NetdevNoneOptions
1964 # Use it alone to have zero network devices.
1968 { 'type': 'NetdevNoneOptions',
1972 # @NetLegacyNicOptions
1974 # Create a new Network Interface Card.
1976 # @netdev: #optional id of -netdev to connect to
1978 # @macaddr: #optional MAC address
1980 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1982 # @addr: #optional PCI device address
1984 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1988 { 'type': 'NetLegacyNicOptions',
1994 '*vectors': 'uint32' } }
1999 # A fat type wrapping 'str', to be embedded in lists.
2008 # @NetdevUserOptions
2010 # Use the user mode network stack which requires no administrator privilege to
2013 # @hostname: #optional client hostname reported by the builtin DHCP server
2015 # @restrict: #optional isolate the guest from the host
2017 # @ip: #optional legacy parameter, use net= instead
2019 # @net: #optional IP address and optional netmask
2021 # @host: #optional guest-visible address of the host
2023 # @tftp: #optional root directory of the built-in TFTP server
2025 # @bootfile: #optional BOOTP filename, for use with tftp=
2027 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2030 # @dns: #optional guest-visible address of the virtual nameserver
2032 # @smb: #optional root directory of the built-in SMB server
2034 # @smbserver: #optional IP address of the built-in SMB server
2036 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2039 # @guestfwd: #optional forward guest TCP connections
2043 { 'type': 'NetdevUserOptions',
2046 '*restrict': 'bool',
2052 '*dhcpstart': 'str',
2055 '*smbserver': 'str',
2056 '*hostfwd': ['String'],
2057 '*guestfwd': ['String'] } }
2062 # Connect the host TAP network interface name to the VLAN.
2064 # @ifname: #optional interface name
2066 # @fd: #optional file descriptor of an already opened tap
2068 # @script: #optional script to initialize the interface
2070 # @downscript: #optional script to shut down the interface
2072 # @helper: #optional command to execute to configure bridge
2074 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2076 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2078 # @vhost: #optional enable vhost-net network accelerator
2080 # @vhostfd: #optional file descriptor of an already opened vhost net device
2082 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2086 { 'type': 'NetdevTapOptions',
2091 '*downscript': 'str',
2094 '*vnet_hdr': 'bool',
2097 '*vhostforce': 'bool' } }
2100 # @NetdevSocketOptions
2102 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2103 # socket connection.
2105 # @fd: #optional file descriptor of an already opened socket
2107 # @listen: #optional port number, and optional hostname, to listen on
2109 # @connect: #optional port number, and optional hostname, to connect to
2111 # @mcast: #optional UDP multicast address and port number
2113 # @localaddr: #optional source address and port for multicast and udp packets
2115 # @udp: #optional UDP unicast address and port number
2119 { 'type': 'NetdevSocketOptions',
2125 '*localaddr': 'str',
2131 # Connect the VLAN to a vde switch running on the host.
2133 # @sock: #optional socket path
2135 # @port: #optional port number
2137 # @group: #optional group owner of socket
2139 # @mode: #optional permissions for socket
2143 { 'type': 'NetdevVdeOptions',
2148 '*mode': 'uint16' } }
2151 # @NetdevDumpOptions
2153 # Dump VLAN network traffic to a file.
2155 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2158 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2162 { 'type': 'NetdevDumpOptions',
2168 # @NetdevBridgeOptions
2170 # Connect a host TAP network interface to a host bridge device.
2172 # @br: #optional bridge name
2174 # @helper: #optional command to execute to configure bridge
2178 { 'type': 'NetdevBridgeOptions',
2181 '*helper': 'str' } }
2184 # @NetdevHubPortOptions
2186 # Connect two or more net clients through a software hub.
2188 # @hubid: hub identifier number
2192 { 'type': 'NetdevHubPortOptions',
2194 'hubid': 'int32' } }
2199 # A discriminated record of network device traits.
2203 { 'union': 'NetClientOptions',
2205 'none': 'NetdevNoneOptions',
2206 'nic': 'NetLegacyNicOptions',
2207 'user': 'NetdevUserOptions',
2208 'tap': 'NetdevTapOptions',
2209 'socket': 'NetdevSocketOptions',
2210 'vde': 'NetdevVdeOptions',
2211 'dump': 'NetdevDumpOptions',
2212 'bridge': 'NetdevBridgeOptions',
2213 'hubport': 'NetdevHubPortOptions' } }
2218 # Captures the configuration of a network device; legacy.
2220 # @vlan: #optional vlan number
2222 # @id: #optional identifier for monitor commands
2224 # @name: #optional identifier for monitor commands, ignored if @id is present
2226 # @opts: device type specific properties (legacy)
2230 { 'type': 'NetLegacy',
2235 'opts': 'NetClientOptions' } }
2240 # Captures the configuration of a network device.
2242 # @id: identifier for monitor commands.
2244 # @opts: device type specific properties
2251 'opts': 'NetClientOptions' } }
2256 # Receive a file descriptor via SCM rights and assign it a name
2258 # @fdname: file descriptor name
2260 # Returns: Nothing on success
2261 # If file descriptor was not received, FdNotSupplied
2262 # If @fdname is not valid, InvalidParameterType
2266 # Notes: If @fdname already exists, the file descriptor assigned to
2267 # it will be closed and replaced by the received file
2269 # The 'closefd' command can be used to explicitly close the
2270 # file descriptor when it is no longer needed.
2272 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2277 # Close a file descriptor previously passed via SCM rights
2279 # @fdname: file descriptor name
2281 # Returns: Nothing on success
2282 # If @fdname is not found, FdNotFound
2286 { 'command': 'closefd', 'data': {'fdname': 'str'} }