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
661 # If VNC support is not compiled in, FeatureDisabled
665 { 'command': 'query-vnc', 'returns': 'VncInfo' }
670 # Information about a SPICE client channel.
672 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
675 # @family: 'ipv6' if the client is connected via IPv6 and TCP
676 # 'ipv4' if the client is connected via IPv4 and TCP
677 # 'unix' if the client is connected via a unix domain socket
678 # 'unknown' otherwise
680 # @port: The client's port number.
682 # @connection-id: SPICE connection id number. All channels with the same id
683 # belong to the same SPICE session.
685 # @connection-type: SPICE channel type number. "1" is the main control
686 # channel, filter for this one if you want to track spice
689 # @channel-id: SPICE channel ID number. Usually "0", might be different when
690 # multiple channels of the same type exist, such as multiple
691 # display channels in a multihead setup
693 # @tls: true if the channel is encrypted, false otherwise.
697 { 'type': 'SpiceChannel',
698 'data': {'host': 'str', 'family': 'str', 'port': 'str',
699 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
703 # @SpiceQueryMouseMode
705 # An enumation of Spice mouse states.
707 # @client: Mouse cursor position is determined by the client.
709 # @server: Mouse cursor position is determined by the server.
711 # @unknown: No information is available about mouse mode used by
714 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
718 { 'enum': 'SpiceQueryMouseMode',
719 'data': [ 'client', 'server', 'unknown' ] }
724 # Information about the SPICE session.
726 # @enabled: true if the SPICE server is enabled, false otherwise
728 # @host: #optional The hostname the SPICE server is bound to. This depends on
729 # the name resolution on the host and may be an IP address.
731 # @port: #optional The SPICE server's port number.
733 # @compiled-version: #optional SPICE server version.
735 # @tls-port: #optional The SPICE server's TLS port number.
737 # @auth: #optional the current authentication type used by the server
738 # 'none' if no authentication is being used
739 # 'spice' uses SASL or direct TLS authentication, depending on command
742 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
743 # be determined by the client or the server, or unknown if spice
744 # server doesn't provide this information.
748 # @channels: a list of @SpiceChannel for each active spice channel
752 { 'type': 'SpiceInfo',
753 'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
754 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
755 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
760 # Returns information about the current SPICE server
762 # Returns: @SpiceInfo
766 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
771 # Information about the guest balloon device.
773 # @actual: the number of bytes the balloon currently contains
775 # @mem_swapped_in: #optional number of pages swapped in within the guest
777 # @mem_swapped_out: #optional number of pages swapped out within the guest
779 # @major_page_faults: #optional number of major page faults within the guest
781 # @minor_page_faults: #optional number of minor page faults within the guest
783 # @free_mem: #optional amount of memory (in bytes) free in the guest
785 # @total_mem: #optional amount of memory (in bytes) visible to the guest
789 # Notes: all current versions of QEMU do not fill out optional information in
792 { 'type': 'BalloonInfo',
793 'data': {'actual': 'int', '*mem_swapped_in': 'int',
794 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
795 '*minor_page_faults': 'int', '*free_mem': 'int',
796 '*total_mem': 'int'} }
801 # Return information about the balloon device.
803 # Returns: @BalloonInfo on success
804 # If the balloon driver is enabled but not functional because the KVM
805 # kernel module cannot support it, KvmMissingCap
806 # If no balloon device is present, DeviceNotActive
810 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
815 # A PCI device memory region
817 # @base: the starting address (guest physical)
819 # @limit: the ending address (guest physical)
823 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
828 # Information about a PCI device I/O region.
830 # @bar: the index of the Base Address Register for this region
832 # @type: 'io' if the region is a PIO region
833 # 'memory' if the region is a MMIO region
835 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
837 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
841 { 'type': 'PciMemoryRegion',
842 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
843 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
848 # Information about a PCI Bridge device
850 # @bus.number: primary bus interface number. This should be the number of the
851 # bus the device resides on.
853 # @bus.secondary: secondary bus interface number. This is the number of the
854 # main bus for the bridge
856 # @bus.subordinate: This is the highest number bus that resides below the
859 # @bus.io_range: The PIO range for all devices on this bridge
861 # @bus.memory_range: The MMIO range for all devices on this bridge
863 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
866 # @devices: a list of @PciDeviceInfo for each device on this bridge
870 { 'type': 'PciBridgeInfo',
871 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
872 'io_range': 'PciMemoryRange',
873 'memory_range': 'PciMemoryRange',
874 'prefetchable_range': 'PciMemoryRange' },
875 '*devices': ['PciDeviceInfo']} }
880 # Information about a PCI device
882 # @bus: the bus number of the device
884 # @slot: the slot the device is located in
886 # @function: the function of the slot used by the device
888 # @class_info.desc: #optional a string description of the device's class
890 # @class_info.class: the class code of the device
892 # @id.device: the PCI device id
894 # @id.vendor: the PCI vendor id
896 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
898 # @qdev_id: the device name of the PCI device
900 # @pci_bridge: if the device is a PCI bridge, the bridge information
902 # @regions: a list of the PCI I/O regions associated with the device
904 # Notes: the contents of @class_info.desc are not stable and should only be
905 # treated as informational.
909 { 'type': 'PciDeviceInfo',
910 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
911 'class_info': {'*desc': 'str', 'class': 'int'},
912 'id': {'device': 'int', 'vendor': 'int'},
913 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
914 'regions': ['PciMemoryRegion']} }
919 # Information about a PCI bus
921 # @bus: the bus index
923 # @devices: a list of devices on this bus
927 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
932 # Return information about the PCI bus topology of the guest.
934 # Returns: a list of @PciInfo for each PCI bus
938 { 'command': 'query-pci', 'returns': ['PciInfo'] }
943 # Information about a long-running block device operation.
945 # @type: the job type ('stream' for image streaming)
947 # @device: the block device name
949 # @len: the maximum progress value
951 # @offset: the current progress value
953 # @speed: the rate limit, bytes per second
957 { 'type': 'BlockJobInfo',
958 'data': {'type': 'str', 'device': 'str', 'len': 'int',
959 'offset': 'int', 'speed': 'int'} }
964 # Return information about long-running block device operations.
966 # Returns: a list of @BlockJobInfo for each active block job
970 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
975 # This command will cause the QEMU process to exit gracefully. While every
976 # attempt is made to send the QMP response before terminating, this is not
977 # guaranteed. When using this interface, a premature EOF would not be
982 { 'command': 'quit' }
987 # Stop all guest VCPU execution.
991 # Notes: This function will succeed even if the guest is already in the stopped
994 { 'command': 'stop' }
999 # Performs a hard reset of a guest.
1003 { 'command': 'system_reset' }
1006 # @system_powerdown:
1008 # Requests that a guest perform a powerdown operation.
1012 # Notes: A guest may or may not respond to this command. This command
1013 # returning does not indicate that a guest has accepted the request or
1014 # that it has shut down. Many guests will respond to this command by
1015 # prompting the user in some way.
1017 { 'command': 'system_powerdown' }
1022 # This command is a nop that is only provided for the purposes of compatibility.
1026 # Notes: Do not use this command.
1028 { 'command': 'cpu', 'data': {'index': 'int'} }
1033 # Save a portion of guest memory to a file.
1035 # @val: the virtual address of the guest to start from
1037 # @size: the size of memory region to save
1039 # @filename: the file to save the memory to as binary data
1041 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1042 # virtual address (defaults to CPU 0)
1044 # Returns: Nothing on success
1045 # If @cpu is not a valid VCPU, InvalidParameterValue
1046 # If @filename cannot be opened, OpenFileFailed
1047 # If an I/O error occurs while writing the file, IOError
1051 # Notes: Errors were not reliably returned until 1.1
1053 { 'command': 'memsave',
1054 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1059 # Save a portion of guest physical memory to a file.
1061 # @val: the physical address of the guest to start from
1063 # @size: the size of memory region to save
1065 # @filename: the file to save the memory to as binary data
1067 # Returns: Nothing on success
1068 # If @filename cannot be opened, OpenFileFailed
1069 # If an I/O error occurs while writing the file, IOError
1073 # Notes: Errors were not reliably returned until 1.1
1075 { 'command': 'pmemsave',
1076 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1081 # Resume guest VCPU execution.
1085 # Returns: If successful, nothing
1086 # If the QEMU is waiting for an incoming migration, MigrationExpected
1087 # If QEMU was started with an encrypted block device and a key has
1088 # not yet been set, DeviceEncrypted.
1090 # Notes: This command will succeed if the guest is currently running.
1092 { 'command': 'cont' }
1097 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1103 { 'command': 'system_wakeup' }
1108 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1110 # Returns: If successful, nothing
1111 # If the Virtual Machine doesn't support NMI injection, Unsupported
1115 # Notes: Only x86 Virtual Machines support this command.
1117 { 'command': 'inject-nmi' }
1122 # Sets the link status of a virtual network adapter.
1124 # @name: the device name of the virtual network adapter
1126 # @up: true to set the link status to be up
1128 # Returns: Nothing on success
1129 # If @name is not a valid network device, DeviceNotFound
1133 # Notes: Not all network adapters support setting link status. This command
1134 # will succeed even if the network adapter does not support link status
1137 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1142 # This command sets the password of a block device that has not been open
1143 # with a password and requires one.
1145 # The two cases where this can happen are a block device is created through
1146 # QEMU's initial command line or a block device is changed through the legacy
1147 # @change interface.
1149 # In the event that the block device is created through the initial command
1150 # line, the VM will start in the stopped state regardless of whether '-S' is
1151 # used. The intention is for a management tool to query the block devices to
1152 # determine which ones are encrypted, set the passwords with this command, and
1153 # then start the guest with the @cont command.
1155 # @device: the name of the device to set the password on
1157 # @password: the password to use for the device
1159 # Returns: nothing on success
1160 # If @device is not a valid block device, DeviceNotFound
1161 # If @device is not encrypted, DeviceNotEncrypted
1162 # If @password is not valid for this device, InvalidPassword
1164 # Notes: Not all block formats support encryption and some that do are not
1165 # able to validate that a password is correct. Disk corruption may
1166 # occur if an invalid password is specified.
1170 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1175 # Request the balloon driver to change its balloon size.
1177 # @value: the target size of the balloon in bytes
1179 # Returns: Nothing on success
1180 # If the balloon driver is enabled but not functional because the KVM
1181 # kernel module cannot support it, KvmMissingCap
1182 # If no balloon device is present, DeviceNotActive
1184 # Notes: This command just issues a request to the guest. When it returns,
1185 # the balloon size may not have changed. A guest can change the balloon
1186 # size independent of this command.
1190 { 'command': 'balloon', 'data': {'value': 'int'} }
1195 # Resize a block image while a guest is running.
1197 # @device: the name of the device to get the image resized
1199 # @size: new image size in bytes
1201 # Returns: nothing on success
1202 # If @device is not a valid block device, DeviceNotFound
1203 # If @size is negative, InvalidParameterValue
1204 # If the block device has no medium inserted, DeviceHasNoMedium
1205 # If the block device does not support resize, Unsupported
1206 # If the block device is read-only, DeviceIsReadOnly
1207 # If a long-running operation is using the device, DeviceInUse
1211 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1216 # An enumeration that tells QEMU how to set the backing file path in
1219 # @existing: QEMU should look for an existing image file.
1221 # @absolute-paths: QEMU should create a new image with absolute paths
1222 # for the backing file.
1226 { 'enum': 'NewImageMode'
1227 'data': [ 'existing', 'absolute-paths' ] }
1232 # @device: the name of the device to generate the snapshot from.
1234 # @snapshot-file: the target of the new image. A new file will be created.
1236 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1238 # @mode: #optional whether and how QEMU should create a new image, default is
1241 { 'type': 'BlockdevSnapshot',
1242 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1243 '*mode': 'NewImageMode' } }
1248 # A discriminated record of operations that can be performed with
1251 { 'union': 'BlockdevAction',
1253 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1259 # Atomically operate on a group of one or more block devices. If
1260 # any operation fails, then the entire set of actions will be
1261 # abandoned and the appropriate error returned. The only operation
1262 # supported is currently blockdev-snapshot-sync.
1265 # @BlockdevAction: information needed for the device snapshot
1267 # Returns: nothing on success
1268 # If @device is not a valid block device, DeviceNotFound
1269 # If @device is busy, DeviceInUse will be returned
1270 # If @snapshot-file can't be created, OpenFileFailed
1271 # If @snapshot-file can't be opened, OpenFileFailed
1272 # If @format is invalid, InvalidBlockFormat
1274 # Note: The transaction aborts on the first failure. Therefore, there will
1275 # be only one device or snapshot file returned in an error condition, and
1276 # subsequent actions will not have been attempted.
1280 { 'command': 'transaction',
1281 'data': { 'actions': [ 'BlockdevAction' ] } }
1284 # @blockdev-snapshot-sync
1286 # Generates a synchronous snapshot of a block device.
1288 # @device: the name of the device to generate the snapshot from.
1290 # @snapshot-file: the target of the new image. If the file exists, or if it
1291 # is a device, the snapshot will be created in the existing
1292 # file/device. If does not exist, a new file will be created.
1294 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1296 # @mode: #optional whether and how QEMU should create a new image, default is
1299 # Returns: nothing on success
1300 # If @device is not a valid block device, DeviceNotFound
1301 # If @snapshot-file can't be opened, OpenFileFailed
1302 # If @format is invalid, InvalidBlockFormat
1306 { 'command': 'blockdev-snapshot-sync',
1307 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1308 '*mode': 'NewImageMode'} }
1311 # @human-monitor-command:
1313 # Execute a command on the human monitor and return the output.
1315 # @command-line: the command to execute in the human monitor
1317 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1319 # Returns: the output of the command as a string
1323 # Notes: This command only exists as a stop-gap. It's use is highly
1324 # discouraged. The semantics of this command are not guaranteed.
1326 # Known limitations:
1328 # o This command is stateless, this means that commands that depend
1329 # on state information (such as getfd) might not work
1331 # o Commands that prompt the user for data (eg. 'cont' when the block
1332 # device is encrypted) don't currently work
1334 { 'command': 'human-monitor-command',
1335 'data': {'command-line': 'str', '*cpu-index': 'int'},
1341 # Cancel the current executing migration process.
1343 # Returns: nothing on success
1345 # Notes: This command succeeds even if there is no migration process running.
1349 { 'command': 'migrate_cancel' }
1352 # @migrate_set_downtime
1354 # Set maximum tolerated downtime for migration.
1356 # @value: maximum downtime in seconds
1358 # Returns: nothing on success
1362 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1365 # @migrate_set_speed
1367 # Set maximum speed for migration.
1369 # @value: maximum speed in bytes.
1371 # Returns: nothing on success
1373 # Notes: A value lesser than zero will be automatically round up to zero.
1377 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1380 # @ObjectPropertyInfo:
1382 # @name: the name of the property
1384 # @type: the type of the property. This will typically come in one of four
1387 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1388 # These types are mapped to the appropriate JSON type.
1390 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1391 # legacy qdev typename. These types are always treated as strings.
1393 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1394 # device type name. Child properties create the composition tree.
1396 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1397 # device type name. Link properties form the device model graph.
1401 # Notes: This type is experimental. Its syntax may change in future releases.
1403 { 'type': 'ObjectPropertyInfo',
1404 'data': { 'name': 'str', 'type': 'str' } }
1409 # This command will list any properties of a object given a path in the object
1412 # @path: the path within the object model. See @qom-get for a description of
1415 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1420 # Notes: This command is experimental. It's syntax may change in future
1423 { 'command': 'qom-list',
1424 'data': { 'path': 'str' },
1425 'returns': [ 'ObjectPropertyInfo' ] }
1430 # This command will get a property from a object model path and return the
1433 # @path: The path within the object model. There are two forms of supported
1434 # paths--absolute and partial paths.
1436 # Absolute paths are derived from the root object and can follow child<>
1437 # or link<> properties. Since they can follow link<> properties, they
1438 # can be arbitrarily long. Absolute paths look like absolute filenames
1439 # and are prefixed with a leading slash.
1441 # Partial paths look like relative filenames. They do not begin
1442 # with a prefix. The matching rules for partial paths are subtle but
1443 # designed to make specifying objects easy. At each level of the
1444 # composition tree, the partial path is matched as an absolute path.
1445 # The first match is not returned. At least two matches are searched
1446 # for. A successful result is only returned if only one match is
1447 # found. If more than one match is found, a flag is return to
1448 # indicate that the match was ambiguous.
1450 # @property: The property name to read
1452 # Returns: The property value. The type depends on the property type. legacy<>
1453 # properties are returned as #str. child<> and link<> properties are
1454 # returns as #str pathnames. All integer property types (u8, u16, etc)
1455 # are returned as #int.
1459 # Notes: This command is experimental and may change syntax in future releases.
1461 { 'command': 'qom-get',
1462 'data': { 'path': 'str', 'property': 'str' },
1463 'returns': 'visitor',
1469 # This command will set a property from a object model path.
1471 # @path: see @qom-get for a description of this parameter
1473 # @property: the property name to set
1475 # @value: a value who's type is appropriate for the property type. See @qom-get
1476 # for a description of type mapping.
1480 # Notes: This command is experimental and may change syntax in future releases.
1482 { 'command': 'qom-set',
1483 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1489 # Sets the password of a remote display session.
1491 # @protocol: `vnc' to modify the VNC server password
1492 # `spice' to modify the Spice server password
1494 # @password: the new password
1496 # @connected: #optional how to handle existing clients when changing the
1497 # password. If nothing is specified, defaults to `keep'
1498 # `fail' to fail the command if clients are connected
1499 # `disconnect' to disconnect existing clients
1500 # `keep' to maintain existing clients
1502 # Returns: Nothing on success
1503 # If Spice is not enabled, DeviceNotFound
1504 # If @protocol does not support connected, InvalidParameter
1505 # If @protocol is invalid, InvalidParameter
1506 # If any other error occurs, SetPasswdFailed
1508 # Notes: If VNC is not enabled, SetPasswdFailed is returned.
1512 { 'command': 'set_password',
1513 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1518 # Expire the password of a remote display server.
1520 # @protocol: the name of the remote display protocol `vnc' or `spice'
1522 # @time: when to expire the password.
1523 # `now' to expire the password immediately
1524 # `never' to cancel password expiration
1525 # `+INT' where INT is the number of seconds from now (integer)
1526 # `INT' where INT is the absolute time in seconds
1528 # Returns: Nothing on success
1529 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1530 # If an error occurs setting password expiration, SetPasswdFailed
1531 # If @protocol is not `spice' or 'vnc', InvalidParameter
1535 # Notes: Time is relative to the server and currently there is no way to
1536 # coordinate server time with client time. It is not recommended to
1537 # use the absolute time version of the @time parameter unless you're
1538 # sure you are on the same machine as the QEMU instance.
1540 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1545 # Ejects a device from a removable drive.
1547 # @device: The name of the device
1549 # @force: @optional If true, eject regardless of whether the drive is locked.
1550 # If not specified, the default value is false.
1552 # Returns: Nothing on success
1553 # If @device is not a valid block device, DeviceNotFound
1554 # If @device is not removable and @force is false, DeviceNotRemovable
1555 # If @force is false and @device is locked, DeviceLocked
1557 # Notes: Ejecting a device will no media results in success
1561 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1564 # @change-vnc-password:
1566 # Change the VNC server password.
1568 # @target: the new password to use with VNC authentication
1572 # Notes: An empty password in this command will set the password to the empty
1573 # string. Existing clients are unaffected by executing this command.
1575 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1580 # This command is multiple commands multiplexed together.
1582 # @device: This is normally the name of a block device but it may also be 'vnc'.
1583 # when it's 'vnc', then sub command depends on @target
1585 # @target: If @device is a block device, then this is the new filename.
1586 # If @device is 'vnc', then if the value 'password' selects the vnc
1587 # change password command. Otherwise, this specifies a new server URI
1588 # address to listen to for VNC connections.
1590 # @arg: If @device is a block device, then this is an optional format to open
1592 # If @device is 'vnc' and @target is 'password', this is the new VNC
1593 # password to set. If this argument is an empty string, then no future
1594 # logins will be allowed.
1596 # Returns: Nothing on success.
1597 # If @device is not a valid block device, DeviceNotFound
1598 # If @format is not a valid block format, InvalidBlockFormat
1599 # If the new block device is encrypted, DeviceEncrypted. Note that
1600 # if this error is returned, the device has been opened successfully
1601 # and an additional call to @block_passwd is required to set the
1602 # device's password. The behavior of reads and writes to the block
1603 # device between when these calls are executed is undefined.
1605 # Notes: It is strongly recommended that this interface is not used especially
1606 # for changing block devices.
1610 { 'command': 'change',
1611 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1614 # @block_set_io_throttle:
1616 # Change I/O throttle limits for a block drive.
1618 # @device: The name of the device
1620 # @bps: total throughput limit in bytes per second
1622 # @bps_rd: read throughput limit in bytes per second
1624 # @bps_wr: write throughput limit in bytes per second
1626 # @iops: total I/O operations per second
1628 # @ops_rd: read I/O operations per second
1630 # @iops_wr: write I/O operations per second
1632 # Returns: Nothing on success
1633 # If @device is not a valid block device, DeviceNotFound
1634 # If the argument combination is invalid, InvalidParameterCombination
1638 { 'command': 'block_set_io_throttle',
1639 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1640 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1645 # Copy data from a backing file into a block device.
1647 # The block streaming operation is performed in the background until the entire
1648 # backing file has been copied. This command returns immediately once streaming
1649 # has started. The status of ongoing block streaming operations can be checked
1650 # with query-block-jobs. The operation can be stopped before it has completed
1651 # using the block-job-cancel command.
1653 # If a base file is specified then sectors are not copied from that base file and
1654 # its backing chain. When streaming completes the image file will have the base
1655 # file as its backing file. This can be used to stream a subset of the backing
1656 # file chain instead of flattening the entire image.
1658 # On successful completion the image file is updated to drop the backing file
1659 # and the BLOCK_JOB_COMPLETED event is emitted.
1661 # @device: the device name
1663 # @base: #optional the common backing file name
1665 # @speed: #optional the maximum speed, in bytes per second
1667 # Returns: Nothing on success
1668 # If streaming is already active on this device, DeviceInUse
1669 # If @device does not exist, DeviceNotFound
1670 # If image streaming is not supported by this device, NotSupported
1671 # If @base does not exist, BaseNotFound
1672 # If @speed is invalid, InvalidParameter
1676 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1680 # @block-job-set-speed:
1682 # Set maximum speed for a background block operation.
1684 # This command can only be issued when there is an active block job.
1686 # Throttling can be disabled by setting the speed to 0.
1688 # @device: the device name
1690 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1693 # Returns: Nothing on success
1694 # If the job type does not support throttling, NotSupported
1695 # If the speed value is invalid, InvalidParameter
1696 # If no background operation is active on this device, DeviceNotActive
1700 { 'command': 'block-job-set-speed',
1701 'data': { 'device': 'str', 'speed': 'int' } }
1704 # @block-job-cancel:
1706 # Stop an active background block operation.
1708 # This command returns immediately after marking the active background block
1709 # operation for cancellation. It is an error to call this command if no
1710 # operation is in progress.
1712 # The operation will cancel as soon as possible and then emit the
1713 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1714 # enumerated using query-block-jobs.
1716 # For streaming, the image file retains its backing file unless the streaming
1717 # operation happens to complete just as it is being cancelled. A new streaming
1718 # operation can be started at a later time to finish copying all data from the
1721 # @device: the device name
1723 # Returns: Nothing on success
1724 # If no background operation is active on this device, DeviceNotActive
1725 # If cancellation already in progress, DeviceInUse
1729 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1734 # This structure describes a search result from @qom-list-types
1736 # @name: the type name found in the search
1740 # Notes: This command is experimental and may change syntax in future releases.
1742 { 'type': 'ObjectTypeInfo',
1743 'data': { 'name': 'str' } }
1748 # This command will return a list of types given search parameters
1750 # @implements: if specified, only return types that implement this type name
1752 # @abstract: if true, include abstract types in the results
1754 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1758 # Notes: This command is experimental and may change syntax in future releases.
1760 { 'command': 'qom-list-types',
1761 'data': { '*implements': 'str', '*abstract': 'bool' },
1762 'returns': [ 'ObjectTypeInfo' ] }
1767 # Migrates the current running guest to another Virtual Machine.
1769 # @uri: the Uniform Resource Identifier of the destination VM
1771 # @blk: #optional do block migration (full disk copy)
1773 # @inc: #optional incremental disk copy migration
1775 # @detach: this argument exists only for compatibility reasons and
1776 # is ignored by QEMU
1778 # Returns: nothing on success
1782 { 'command': 'migrate',
1783 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1785 # @xen-save-devices-state:
1787 # Save the state of all devices to file. The RAM and the block devices
1788 # of the VM are not saved by this command.
1790 # @filename: the file to save the state of the devices to as binary
1791 # data. See xen-save-devices-state.txt for a description of the binary
1794 # Returns: Nothing on success
1795 # If @filename cannot be opened, OpenFileFailed
1796 # If an I/O error occurs while writing the file, IOError
1800 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1805 # Remove a device from a guest
1807 # @id: the name of the device
1809 # Returns: Nothing on success
1810 # If @id is not a valid device, DeviceNotFound
1811 # If the device does not support unplug, BusNoHotplug
1813 # Notes: When this command completes, the device may not be removed from the
1814 # guest. Hot removal is an operation that requires guest cooperation.
1815 # This command merely requests that the guest begin the hot removal
1820 { 'command': 'device_del', 'data': {'id': 'str'} }
1823 # @dump-guest-memory
1825 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1826 # very long depending on the amount of guest memory. This command is only
1827 # supported on i386 and x86_64.
1829 # @paging: if true, do paging to get guest's memory mapping. This allows
1830 # using gdb to process the core file. However, setting @paging to false
1831 # may be desirable because of two reasons:
1833 # 1. The guest may be in a catastrophic state or can have corrupted
1834 # memory, which cannot be trusted
1835 # 2. The guest can be in real-mode even if paging is enabled. For example,
1836 # the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
1838 # @protocol: the filename or file descriptor of the vmcore. The supported
1841 # 1. file: the protocol starts with "file:", and the following string is
1843 # 2. fd: the protocol starts with "fd:", and the following string is the
1846 # @begin: #optional if specified, the starting physical address.
1848 # @length: #optional if specified, the memory size, in bytes. If you don't
1849 # want to dump all guest's memory, please specify the start @begin and @length
1851 # Returns: nothing on success
1852 # If @begin contains an invalid address, InvalidParameter
1853 # If only one of @begin and @length is specified, MissingParameter
1854 # If @protocol stats with "fd:", and the fd cannot be found, FdNotFound
1855 # If @protocol starts with "file:", and the file cannot be
1856 # opened, OpenFileFailed
1857 # If @protocol does not start with "fd:" or "file:", InvalidParameter
1858 # If an I/O error occurs while writing the file, IOError
1859 # If the target does not support this command, Unsupported
1863 { 'command': 'dump-guest-memory',
1864 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1865 '*length': 'int' } }
1869 # Add a network backend.
1871 # @type: the type of network backend. Current valid values are 'user', 'tap',
1872 # 'vde', 'socket', 'dump' and 'bridge'
1874 # @id: the name of the new network backend
1876 # @props: #optional a list of properties to be passed to the backend in
1877 # the format 'name=value', like 'ifname=tap0,script=no'
1879 # Notes: The semantics of @props is not well defined. Future commands will be
1880 # introduced that provide stronger typing for backend creation.
1884 # Returns: Nothing on success
1885 # If @type is not a valid network backend, DeviceNotFound
1886 # If @id is not a valid identifier, InvalidParameterValue
1887 # if @id already exists, DuplicateId
1888 # If @props contains an invalid parameter for this backend,
1891 { 'command': 'netdev_add',
1892 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1898 # Remove a network backend.
1900 # @id: the name of the network backend to remove
1902 # Returns: Nothing on success
1903 # If @id is not a valid network backend, DeviceNotFound
1907 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1910 # @NetdevNoneOptions
1912 # Use it alone to have zero network devices.
1916 { 'type': 'NetdevNoneOptions',
1920 # @NetLegacyNicOptions
1922 # Create a new Network Interface Card.
1924 # @netdev: #optional id of -netdev to connect to
1926 # @macaddr: #optional MAC address
1928 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1930 # @addr: #optional PCI device address
1932 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1936 { 'type': 'NetLegacyNicOptions',
1942 '*vectors': 'uint32' } }
1947 # A fat type wrapping 'str', to be embedded in lists.
1956 # @NetdevUserOptions
1958 # Use the user mode network stack which requires no administrator privilege to
1961 # @hostname: #optional client hostname reported by the builtin DHCP server
1963 # @restrict: #optional isolate the guest from the host
1965 # @ip: #optional legacy parameter, use net= instead
1967 # @net: #optional IP address and optional netmask
1969 # @host: #optional guest-visible address of the host
1971 # @tftp: #optional root directory of the built-in TFTP server
1973 # @bootfile: #optional BOOTP filename, for use with tftp=
1975 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1978 # @dns: #optional guest-visible address of the virtual nameserver
1980 # @smb: #optional root directory of the built-in SMB server
1982 # @smbserver: #optional IP address of the built-in SMB server
1984 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1987 # @guestfwd: #optional forward guest TCP connections
1991 { 'type': 'NetdevUserOptions',
1994 '*restrict': 'bool',
2000 '*dhcpstart': 'str',
2003 '*smbserver': 'str',
2004 '*hostfwd': ['String'],
2005 '*guestfwd': ['String'] } }
2010 # Connect the host TAP network interface name to the VLAN.
2012 # @ifname: #optional interface name
2014 # @fd: #optional file descriptor of an already opened tap
2016 # @script: #optional script to initialize the interface
2018 # @downscript: #optional script to shut down the interface
2020 # @helper: #optional command to execute to configure bridge
2022 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2024 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2026 # @vhost: #optional enable vhost-net network accelerator
2028 # @vhostfd: #optional file descriptor of an already opened vhost net device
2030 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2034 { 'type': 'NetdevTapOptions',
2039 '*downscript': 'str',
2042 '*vnet_hdr': 'bool',
2045 '*vhostforce': 'bool' } }
2048 # @NetdevSocketOptions
2050 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2051 # socket connection.
2053 # @fd: #optional file descriptor of an already opened socket
2055 # @listen: #optional port number, and optional hostname, to listen on
2057 # @connect: #optional port number, and optional hostname, to connect to
2059 # @mcast: #optional UDP multicast address and port number
2061 # @localaddr: #optional source address and port for multicast and udp packets
2063 # @udp: #optional UDP unicast address and port number
2067 { 'type': 'NetdevSocketOptions',
2073 '*localaddr': 'str',
2079 # Connect the VLAN to a vde switch running on the host.
2081 # @sock: #optional socket path
2083 # @port: #optional port number
2085 # @group: #optional group owner of socket
2087 # @mode: #optional permissions for socket
2091 { 'type': 'NetdevVdeOptions',
2096 '*mode': 'uint16' } }
2099 # @NetdevDumpOptions
2101 # Dump VLAN network traffic to a file.
2103 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2106 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2110 { 'type': 'NetdevDumpOptions',
2116 # @NetdevBridgeOptions
2118 # Connect a host TAP network interface to a host bridge device.
2120 # @br: #optional bridge name
2122 # @helper: #optional command to execute to configure bridge
2126 { 'type': 'NetdevBridgeOptions',
2129 '*helper': 'str' } }
2132 # @NetdevHubPortOptions
2134 # Connect two or more net clients through a software hub.
2136 # @hubid: hub identifier number
2140 { 'type': 'NetdevHubPortOptions',
2142 'hubid': 'int32' } }
2147 # A discriminated record of network device traits.
2151 { 'union': 'NetClientOptions',
2153 'none': 'NetdevNoneOptions',
2154 'nic': 'NetLegacyNicOptions',
2155 'user': 'NetdevUserOptions',
2156 'tap': 'NetdevTapOptions',
2157 'socket': 'NetdevSocketOptions',
2158 'vde': 'NetdevVdeOptions',
2159 'dump': 'NetdevDumpOptions',
2160 'bridge': 'NetdevBridgeOptions',
2161 'hubport': 'NetdevHubPortOptions' } }
2166 # Captures the configuration of a network device; legacy.
2168 # @vlan: #optional vlan number
2170 # @id: #optional identifier for monitor commands
2172 # @name: #optional identifier for monitor commands, ignored if @id is present
2174 # @opts: device type specific properties (legacy)
2178 { 'type': 'NetLegacy',
2183 'opts': 'NetClientOptions' } }
2188 # Captures the configuration of a network device.
2190 # @id: identifier for monitor commands.
2192 # @opts: device type specific properties
2199 'opts': 'NetClientOptions' } }
2204 # Receive a file descriptor via SCM rights and assign it a name
2206 # @fdname: file descriptor name
2208 # Returns: Nothing on success
2209 # If file descriptor was not received, FdNotSupplied
2210 # If @fdname is not valid, InvalidParameterType
2214 # Notes: If @fdname already exists, the file descriptor assigned to
2215 # it will be closed and replaced by the received file
2217 # The 'closefd' command can be used to explicitly close the
2218 # file descriptor when it is no longer needed.
2220 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2225 # Close a file descriptor previously passed via SCM rights
2227 # @fdname: file descriptor name
2229 # Returns: Nothing on success
2230 # If @fdname is not found, FdNotFound
2234 { 'command': 'closefd', 'data': {'fdname': 'str'} }