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
27 { 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
34 # Allow client connections for VNC, Spice and socket based
35 # character devices to be passed in to QEMU via SCM_RIGHTS.
37 # @protocol: protocol name. Valid names are "vnc", "spice" or the
38 # name of a character device (eg. from -chardev id=XXXX)
40 # @fdname: file descriptor name previously passed via 'getfd' command
42 # @skipauth: #optional whether to skip authentication. Only applies
43 # to "vnc" and "spice" protocols
45 # @tls: #optional whether to perform TLS. Only applies to the "spice"
48 # Returns: nothing on success.
52 { 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
59 # Guest name information.
61 # @name: #optional The name of the guest
65 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
70 # Return the name information of a guest.
72 # Returns: @NameInfo of the guest
76 { 'command': 'query-name', 'returns': 'NameInfo' }
81 # A description of QEMU's version.
83 # @qemu.major: The major version of QEMU
85 # @qemu.minor: The minor version of QEMU
87 # @qemu.micro: The micro version of QEMU. By current convention, a micro
88 # version of 50 signifies a development branch. A micro version
89 # greater than or equal to 90 signifies a release candidate for
90 # the next minor version. A micro version of less than 50
91 # signifies a stable release.
93 # @package: QEMU will always set this field to an empty string. Downstream
94 # versions of QEMU should set this to a non-empty string. The
95 # exact format depends on the downstream however it highly
96 # recommended that a unique name is used.
100 { 'type': 'VersionInfo',
101 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
107 # Returns the current version of QEMU.
109 # Returns: A @VersionInfo object describing the current version of QEMU.
113 { 'command': 'query-version', 'returns': 'VersionInfo' }
118 # Information about support for KVM acceleration
120 # @enabled: true if KVM acceleration is active
122 # @present: true if KVM acceleration is built into this executable
126 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
131 # Returns information about KVM acceleration
137 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
142 # An enumeration of VM run states.
144 # @debug: QEMU is running on a debugger
146 # @finish-migrate: guest is paused to finish the migration process
148 # @inmigrate: guest is paused waiting for an incoming migration. Note
149 # that this state does not tell whether the machine will start at the
150 # end of the migration. This depends on the command-line -S option and
151 # any invocation of 'stop' or 'cont' that has happened since QEMU was
154 # @internal-error: An internal error that prevents further guest execution
157 # @io-error: the last IOP has failed and the device is configured to pause
160 # @paused: guest has been paused via the 'stop' command
162 # @postmigrate: guest is paused following a successful 'migrate'
164 # @prelaunch: QEMU was started with -S and guest has not started
166 # @restore-vm: guest is paused to restore VM state
168 # @running: guest is actively running
170 # @save-vm: guest is paused to save the VM state
172 # @shutdown: guest is shut down (and -no-shutdown is in use)
174 # @suspended: guest is suspended (ACPI S3)
176 # @watchdog: the watchdog action is configured to pause and has been triggered
178 { 'enum': 'RunState',
179 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
180 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
181 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
186 # @id: unique snapshot id
188 # @name: user chosen name
190 # @vm-state-size: size of the VM state
192 # @date-sec: UTC date of the snapshot in seconds
194 # @date-nsec: fractional part in nano seconds to be used with date-sec
196 # @vm-clock-sec: VM clock relative to boot in seconds
198 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
204 { 'type': 'SnapshotInfo',
205 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
206 'date-sec': 'int', 'date-nsec': 'int',
207 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
212 # Information about a QEMU image file
214 # @filename: name of the image file
216 # @format: format of the image file
218 # @virtual-size: maximum capacity in bytes of the image
220 # @actual-size: #optional actual size on disk in bytes of the image
222 # @dirty-flag: #optional true if image is not cleanly closed
224 # @cluster-size: #optional size of a cluster in bytes
226 # @encrypted: #optional true if the image is encrypted
228 # @backing-filename: #optional name of the backing file
230 # @full-backing-filename: #optional full path of the backing file
232 # @backing-filename-format: #optional the format of the backing file
234 # @snapshots: #optional list of VM snapshots
240 { 'type': 'ImageInfo',
241 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
242 '*actual-size': 'int', 'virtual-size': 'int',
243 '*cluster-size': 'int', '*encrypted': 'bool',
244 '*backing-filename': 'str', '*full-backing-filename': 'str',
245 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } }
250 # Information about VCPU run state
252 # @running: true if all VCPUs are runnable, false if not runnable
254 # @singlestep: true if VCPUs are in single-step mode
256 # @status: the virtual machine @RunState
260 # Notes: @singlestep is enabled through the GDB stub
262 { 'type': 'StatusInfo',
263 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
268 # Query the run status of all VCPUs
270 # Returns: @StatusInfo reflecting all VCPUs
274 { 'command': 'query-status', 'returns': 'StatusInfo' }
279 # Guest UUID information.
281 # @UUID: the UUID of the guest
285 # Notes: If no UUID was specified for the guest, a null UUID is returned.
287 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
292 # Query the guest UUID information.
294 # Returns: The @UuidInfo for the guest
298 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
303 # Information about a character device.
305 # @label: the label of the character device
307 # @filename: the filename of the character device
309 # Notes: @filename is encoded using the QEMU command line character device
310 # encoding. See the QEMU man page for details.
314 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
319 # Returns information about current character devices.
321 # Returns: a list of @ChardevInfo
325 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
330 # An enumeration of data format.
332 # @utf8: The data format is 'utf8'.
334 # @base64: The data format is 'base64'.
338 { 'enum': 'DataFormat'
339 'data': [ 'utf8', 'base64' ] }
344 # Provide writing interface for memchardev. Write data to char
347 # @device: the name of the memory char device.
349 # @size: the size to write in bytes.
351 # @data: the source data write to memchar.
353 # @format: #optional the format of the data write to chardev 'memory',
354 # by default is 'utf8'.
356 # Returns: Nothing on success
357 # If @device is not a valid char device, DeviceNotFound
361 { 'command': 'memchar-write',
362 'data': {'device': 'str', 'size': 'int', 'data': 'str',
363 '*format': 'DataFormat'} }
368 # Result of QMP command memchar-read.
370 # @data: The data read from memchar as string.
372 # @count: The numbers of bytes read from.
376 { 'type': 'MemCharRead',
377 'data': { 'data': 'str', 'count': 'int' } }
382 # Provide read interface for memchardev. Read from the char
383 # device 'memory' and return the data.
385 # @device: the name of the memory char device.
387 # @size: the size to read in bytes.
389 # @format: #optional the format of the data want to read from
390 # memchardev, by default is 'utf8'.
392 # Returns: @MemCharRead
393 # If @device is not a valid memchr device, DeviceNotFound
397 { 'command': 'memchar-read',
398 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
399 'returns': 'MemCharRead' }
404 # Information about a QMP command
406 # @name: The command name
410 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
415 # Return a list of supported QMP commands by this server
417 # Returns: A list of @CommandInfo for all supported commands
421 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
426 # Information about a QMP event
428 # @name: The event name
432 { 'type': 'EventInfo', 'data': {'name': 'str'} }
437 # Return a list of supported QMP events by this server
439 # Returns: A list of @EventInfo for all supported events
443 { 'command': 'query-events', 'returns': ['EventInfo'] }
448 # Detailed migration status.
450 # @transferred: amount of bytes already transferred to the target VM
452 # @remaining: amount of bytes remaining to be transferred to the target VM
454 # @total: total amount of bytes involved in the migration process
456 # @duplicate: number of duplicate pages (since 1.2)
458 # @normal : number of normal pages (since 1.2)
460 # @normal-bytes: number of normal bytes sent (since 1.2)
462 # @dirty-pages-rate: number of pages dirtied by second by the
467 { 'type': 'MigrationStats',
468 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
469 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int',
470 'dirty-pages-rate' : 'int' } }
475 # Detailed XBZRLE migration cache statistics
477 # @cache-size: XBZRLE cache size
479 # @bytes: amount of bytes already transferred to the target VM
481 # @pages: amount of pages transferred to the target VM
483 # @cache-miss: number of cache miss
485 # @overflow: number of overflows
489 { 'type': 'XBZRLECacheStats',
490 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
491 'cache-miss': 'int', 'overflow': 'int' } }
496 # Information about current migration process.
498 # @status: #optional string describing the current migration status.
499 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
500 # 'cancelled'. If this field is not returned, no migration process
503 # @ram: #optional @MigrationStats containing detailed migration
504 # status, only returned if status is 'active' or
505 # 'completed'. 'comppleted' (since 1.2)
507 # @disk: #optional @MigrationStats containing detailed disk migration
508 # status, only returned if status is 'active' and it is a block
511 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
512 # migration statistics, only returned if XBZRLE feature is on and
513 # status is 'active' or 'completed' (since 1.2)
515 # @total-time: #optional total amount of milliseconds since migration started.
516 # If migration has ended, it returns the total migration
519 # @downtime: #optional only present when migration finishes correctly
520 # total downtime in milliseconds for the guest.
523 # @expected-downtime: #optional only present while migration is active
524 # expected downtime in milliseconds for the guest in last walk
525 # of the dirty bitmap. (since 1.3)
529 { 'type': 'MigrationInfo',
530 'data': {'*status': 'str', '*ram': 'MigrationStats',
531 '*disk': 'MigrationStats',
532 '*xbzrle-cache': 'XBZRLECacheStats',
533 '*total-time': 'int',
534 '*expected-downtime': 'int',
535 '*downtime': 'int'} }
540 # Returns information about current migration process.
542 # Returns: @MigrationInfo
546 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
549 # @MigrationCapability
551 # Migration capabilities enumeration
553 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
554 # This feature allows us to minimize migration traffic for certain work
555 # loads, by sending compressed difference of the pages
559 { 'enum': 'MigrationCapability',
563 # @MigrationCapabilityStatus
565 # Migration capability information
567 # @capability: capability enum
569 # @state: capability state bool
573 { 'type': 'MigrationCapabilityStatus',
574 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
577 # @migrate-set-capabilities
579 # Enable/Disable the following migration capabilities (like xbzrle)
581 # @capabilities: json array of capability modifications to make
585 { 'command': 'migrate-set-capabilities',
586 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
589 # @query-migrate-capabilities
591 # Returns information about the current migration capabilities status
593 # Returns: @MigrationCapabilitiesStatus
597 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
602 # Information about a mouse device.
604 # @name: the name of the mouse device
606 # @index: the index of the mouse device
608 # @current: true if this device is currently receiving mouse events
610 # @absolute: true if this device supports absolute coordinates as input
614 { 'type': 'MouseInfo',
615 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
616 'absolute': 'bool'} }
621 # Returns information about each active mouse device
623 # Returns: a list of @MouseInfo for each device
627 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
632 # Information about a virtual CPU
634 # @CPU: the index of the virtual CPU
636 # @current: this only exists for backwards compatible and should be ignored
638 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
639 # to a processor specific low power mode.
641 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
643 # If the target is Sparc, this is the PC component of the
644 # instruction pointer.
646 # @nip: #optional If the target is PPC, the instruction pointer
648 # @npc: #optional If the target is Sparc, the NPC component of the instruction
651 # @PC: #optional If the target is MIPS, the instruction pointer
653 # @thread_id: ID of the underlying host thread
657 # Notes: @halted is a transient state that changes frequently. By the time the
658 # data is sent to the client, the guest may no longer be halted.
661 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
662 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
667 # Returns a list of information about each virtual CPU.
669 # Returns: a list of @CpuInfo for each virtual CPU
673 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
678 # Information about the backing device for a block device.
680 # @file: the filename of the backing device
682 # @ro: true if the backing device was open read-only
684 # @drv: the name of the block format used to open the backing device. As of
685 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
686 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
687 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
688 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
690 # @backing_file: #optional the name of the backing file (for copy-on-write)
692 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
694 # @encrypted: true if the backing device is encrypted
696 # @encryption_key_missing: true if the backing device is encrypted but an
697 # valid encryption key is missing
699 # @bps: total throughput limit in bytes per second is specified
701 # @bps_rd: read throughput limit in bytes per second is specified
703 # @bps_wr: write throughput limit in bytes per second is specified
705 # @iops: total I/O operations per second is specified
707 # @iops_rd: read I/O operations per second is specified
709 # @iops_wr: write I/O operations per second is specified
713 # Notes: This interface is only found in @BlockInfo.
715 { 'type': 'BlockDeviceInfo',
716 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
717 '*backing_file': 'str', 'backing_file_depth': 'int',
718 'encrypted': 'bool', 'encryption_key_missing': 'bool',
719 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
720 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
723 # @BlockDeviceIoStatus:
725 # An enumeration of block device I/O status.
727 # @ok: The last I/O operation has succeeded
729 # @failed: The last I/O operation has failed
731 # @nospace: The last I/O operation has failed due to a no-space condition
735 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
740 # Block dirty bitmap information.
742 # @count: number of dirty bytes according to the dirty bitmap
744 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
748 { 'type': 'BlockDirtyInfo',
749 'data': {'count': 'int', 'granularity': 'int'} }
754 # Block device information. This structure describes a virtual device and
755 # the backing device associated with it.
757 # @device: The device name associated with the virtual device.
759 # @type: This field is returned only for compatibility reasons, it should
760 # not be used (always returns 'unknown')
762 # @removable: True if the device supports removable media.
764 # @locked: True if the guest has locked this device from having its media
767 # @tray_open: #optional True if the device has a tray and it is open
768 # (only present if removable is true)
770 # @dirty: #optional dirty bitmap information (only present if the dirty
773 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
774 # supports it and the VM is configured to stop on errors
776 # @inserted: #optional @BlockDeviceInfo describing the device if media is
781 { 'type': 'BlockInfo',
782 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
783 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
784 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
785 '*dirty': 'BlockDirtyInfo' } }
790 # Get a list of BlockInfo for all virtual block devices.
792 # Returns: a list of @BlockInfo describing each virtual block device
796 { 'command': 'query-block', 'returns': ['BlockInfo'] }
801 # Statistics of a virtual block device or a block backing device.
803 # @rd_bytes: The number of bytes read by the device.
805 # @wr_bytes: The number of bytes written by the device.
807 # @rd_operations: The number of read operations performed by the device.
809 # @wr_operations: The number of write operations performed by the device.
811 # @flush_operations: The number of cache flush operations performed by the
812 # device (since 0.15.0)
814 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
817 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
819 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
821 # @wr_highest_offset: The offset after the greatest byte written to the
822 # device. The intended use of this information is for
823 # growable sparse files (like qcow2) that are used on top
824 # of a physical device.
828 { 'type': 'BlockDeviceStats',
829 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
830 'wr_operations': 'int', 'flush_operations': 'int',
831 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
832 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
837 # Statistics of a virtual block device or a block backing device.
839 # @device: #optional If the stats are for a virtual block device, the name
840 # corresponding to the virtual block device.
842 # @stats: A @BlockDeviceStats for the device.
844 # @parent: #optional This may point to the backing block device if this is a
845 # a virtual block device. If it's a backing block, this will point
846 # to the backing file is one is present.
850 { 'type': 'BlockStats',
851 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
852 '*parent': 'BlockStats'} }
857 # Query the @BlockStats for all virtual block devices.
859 # Returns: A list of @BlockStats for each virtual block devices.
863 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
868 # Information about a connected VNC client.
870 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
873 # @family: 'ipv6' if the client is connected via IPv6 and TCP
874 # 'ipv4' if the client is connected via IPv4 and TCP
875 # 'unix' if the client is connected via a unix domain socket
876 # 'unknown' otherwise
878 # @service: The service name of the client's port. This may depends on the
879 # host system's service database so symbolic names should not be
882 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
883 # Name of the client.
885 # @sasl_username: #optional If SASL authentication is in use, the SASL username
886 # used for authentication.
890 { 'type': 'VncClientInfo',
891 'data': {'host': 'str', 'family': 'str', 'service': 'str',
892 '*x509_dname': 'str', '*sasl_username': 'str'} }
897 # Information about the VNC session.
899 # @enabled: true if the VNC server is enabled, false otherwise
901 # @host: #optional The hostname the VNC server is bound to. This depends on
902 # the name resolution on the host and may be an IP address.
904 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
905 # 'ipv4' if the host is listening for IPv4 connections
906 # 'unix' if the host is listening on a unix domain socket
907 # 'unknown' otherwise
909 # @service: #optional The service name of the server's port. This may depends
910 # on the host system's service database so symbolic names should not
913 # @auth: #optional the current authentication type used by the server
914 # 'none' if no authentication is being used
915 # 'vnc' if VNC authentication is being used
916 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
917 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
918 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
919 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
920 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
921 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
922 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
923 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
924 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
926 # @clients: a list of @VncClientInfo of all currently connected clients
931 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
932 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
937 # Returns information about the current VNC server
943 { 'command': 'query-vnc', 'returns': 'VncInfo' }
948 # Information about a SPICE client channel.
950 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
953 # @family: 'ipv6' if the client is connected via IPv6 and TCP
954 # 'ipv4' if the client is connected via IPv4 and TCP
955 # 'unix' if the client is connected via a unix domain socket
956 # 'unknown' otherwise
958 # @port: The client's port number.
960 # @connection-id: SPICE connection id number. All channels with the same id
961 # belong to the same SPICE session.
963 # @connection-type: SPICE channel type number. "1" is the main control
964 # channel, filter for this one if you want to track spice
967 # @channel-id: SPICE channel ID number. Usually "0", might be different when
968 # multiple channels of the same type exist, such as multiple
969 # display channels in a multihead setup
971 # @tls: true if the channel is encrypted, false otherwise.
975 { 'type': 'SpiceChannel',
976 'data': {'host': 'str', 'family': 'str', 'port': 'str',
977 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
981 # @SpiceQueryMouseMode
983 # An enumeration of Spice mouse states.
985 # @client: Mouse cursor position is determined by the client.
987 # @server: Mouse cursor position is determined by the server.
989 # @unknown: No information is available about mouse mode used by
992 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
996 { 'enum': 'SpiceQueryMouseMode',
997 'data': [ 'client', 'server', 'unknown' ] }
1002 # Information about the SPICE session.
1004 # @enabled: true if the SPICE server is enabled, false otherwise
1006 # @migrated: true if the last guest migration completed and spice
1007 # migration had completed as well. false otherwise.
1009 # @host: #optional The hostname the SPICE server is bound to. This depends on
1010 # the name resolution on the host and may be an IP address.
1012 # @port: #optional The SPICE server's port number.
1014 # @compiled-version: #optional SPICE server version.
1016 # @tls-port: #optional The SPICE server's TLS port number.
1018 # @auth: #optional the current authentication type used by the server
1019 # 'none' if no authentication is being used
1020 # 'spice' uses SASL or direct TLS authentication, depending on command
1023 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1024 # be determined by the client or the server, or unknown if spice
1025 # server doesn't provide this information.
1029 # @channels: a list of @SpiceChannel for each active spice channel
1033 { 'type': 'SpiceInfo',
1034 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1035 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1036 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1041 # Returns information about the current SPICE server
1043 # Returns: @SpiceInfo
1047 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1052 # Information about the guest balloon device.
1054 # @actual: the number of bytes the balloon currently contains
1059 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1064 # Return information about the balloon device.
1066 # Returns: @BalloonInfo on success
1067 # If the balloon driver is enabled but not functional because the KVM
1068 # kernel module cannot support it, KvmMissingCap
1069 # If no balloon device is present, DeviceNotActive
1073 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1078 # A PCI device memory region
1080 # @base: the starting address (guest physical)
1082 # @limit: the ending address (guest physical)
1086 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1091 # Information about a PCI device I/O region.
1093 # @bar: the index of the Base Address Register for this region
1095 # @type: 'io' if the region is a PIO region
1096 # 'memory' if the region is a MMIO region
1098 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1100 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1104 { 'type': 'PciMemoryRegion',
1105 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1106 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1111 # Information about a PCI Bridge device
1113 # @bus.number: primary bus interface number. This should be the number of the
1114 # bus the device resides on.
1116 # @bus.secondary: secondary bus interface number. This is the number of the
1117 # main bus for the bridge
1119 # @bus.subordinate: This is the highest number bus that resides below the
1122 # @bus.io_range: The PIO range for all devices on this bridge
1124 # @bus.memory_range: The MMIO range for all devices on this bridge
1126 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1129 # @devices: a list of @PciDeviceInfo for each device on this bridge
1133 { 'type': 'PciBridgeInfo',
1134 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1135 'io_range': 'PciMemoryRange',
1136 'memory_range': 'PciMemoryRange',
1137 'prefetchable_range': 'PciMemoryRange' },
1138 '*devices': ['PciDeviceInfo']} }
1143 # Information about a PCI device
1145 # @bus: the bus number of the device
1147 # @slot: the slot the device is located in
1149 # @function: the function of the slot used by the device
1151 # @class_info.desc: #optional a string description of the device's class
1153 # @class_info.class: the class code of the device
1155 # @id.device: the PCI device id
1157 # @id.vendor: the PCI vendor id
1159 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1161 # @qdev_id: the device name of the PCI device
1163 # @pci_bridge: if the device is a PCI bridge, the bridge information
1165 # @regions: a list of the PCI I/O regions associated with the device
1167 # Notes: the contents of @class_info.desc are not stable and should only be
1168 # treated as informational.
1172 { 'type': 'PciDeviceInfo',
1173 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1174 'class_info': {'*desc': 'str', 'class': 'int'},
1175 'id': {'device': 'int', 'vendor': 'int'},
1176 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1177 'regions': ['PciMemoryRegion']} }
1182 # Information about a PCI bus
1184 # @bus: the bus index
1186 # @devices: a list of devices on this bus
1190 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1195 # Return information about the PCI bus topology of the guest.
1197 # Returns: a list of @PciInfo for each PCI bus
1201 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1206 # An enumeration of possible behaviors for errors on I/O operations.
1207 # The exact meaning depends on whether the I/O was initiated by a guest
1210 # @report: for guest operations, report the error to the guest;
1211 # for jobs, cancel the job
1213 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1214 # or BLOCK_JOB_ERROR)
1216 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1218 # @stop: for guest operations, stop the virtual machine;
1219 # for jobs, pause the job
1223 { 'enum': 'BlockdevOnError',
1224 'data': ['report', 'ignore', 'enospc', 'stop'] }
1229 # An enumeration of possible behaviors for the initial synchronization
1230 # phase of storage mirroring.
1232 # @top: copies data in the topmost image to the destination
1234 # @full: copies data from all images to the destination
1236 # @none: only copy data written from now on
1240 { 'enum': 'MirrorSyncMode',
1241 'data': ['top', 'full', 'none'] }
1246 # Information about a long-running block device operation.
1248 # @type: the job type ('stream' for image streaming)
1250 # @device: the block device name
1252 # @len: the maximum progress value
1254 # @busy: false if the job is known to be in a quiescent state, with
1255 # no pending I/O. Since 1.3.
1257 # @paused: whether the job is paused or, if @busy is true, will
1258 # pause itself as soon as possible. Since 1.3.
1260 # @offset: the current progress value
1262 # @speed: the rate limit, bytes per second
1264 # @io-status: the status of the job (since 1.3)
1268 { 'type': 'BlockJobInfo',
1269 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1270 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1271 'io-status': 'BlockDeviceIoStatus'} }
1274 # @query-block-jobs:
1276 # Return information about long-running block device operations.
1278 # Returns: a list of @BlockJobInfo for each active block job
1282 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1287 # This command will cause the QEMU process to exit gracefully. While every
1288 # attempt is made to send the QMP response before terminating, this is not
1289 # guaranteed. When using this interface, a premature EOF would not be
1294 { 'command': 'quit' }
1299 # Stop all guest VCPU execution.
1303 # Notes: This function will succeed even if the guest is already in the stopped
1304 # state. In "inmigrate" state, it will ensure that the guest
1305 # remains paused once migration finishes, as if the -S option was
1306 # passed on the command line.
1308 { 'command': 'stop' }
1313 # Performs a hard reset of a guest.
1317 { 'command': 'system_reset' }
1320 # @system_powerdown:
1322 # Requests that a guest perform a powerdown operation.
1326 # Notes: A guest may or may not respond to this command. This command
1327 # returning does not indicate that a guest has accepted the request or
1328 # that it has shut down. Many guests will respond to this command by
1329 # prompting the user in some way.
1331 { 'command': 'system_powerdown' }
1336 # This command is a nop that is only provided for the purposes of compatibility.
1340 # Notes: Do not use this command.
1342 { 'command': 'cpu', 'data': {'index': 'int'} }
1347 # Save a portion of guest memory to a file.
1349 # @val: the virtual address of the guest to start from
1351 # @size: the size of memory region to save
1353 # @filename: the file to save the memory to as binary data
1355 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1356 # virtual address (defaults to CPU 0)
1358 # Returns: Nothing on success
1362 # Notes: Errors were not reliably returned until 1.1
1364 { 'command': 'memsave',
1365 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1370 # Save a portion of guest physical memory to a file.
1372 # @val: the physical address of the guest to start from
1374 # @size: the size of memory region to save
1376 # @filename: the file to save the memory to as binary data
1378 # Returns: Nothing on success
1382 # Notes: Errors were not reliably returned until 1.1
1384 { 'command': 'pmemsave',
1385 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1390 # Resume guest VCPU execution.
1394 # Returns: If successful, nothing
1395 # If QEMU was started with an encrypted block device and a key has
1396 # not yet been set, DeviceEncrypted.
1398 # Notes: This command will succeed if the guest is currently running. It
1399 # will also succeed if the guest is in the "inmigrate" state; in
1400 # this case, the effect of the command is to make sure the guest
1401 # starts once migration finishes, removing the effect of the -S
1402 # command line option if it was passed.
1404 { 'command': 'cont' }
1409 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1415 { 'command': 'system_wakeup' }
1420 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1422 # Returns: If successful, nothing
1426 # Notes: Only x86 Virtual Machines support this command.
1428 { 'command': 'inject-nmi' }
1433 # Sets the link status of a virtual network adapter.
1435 # @name: the device name of the virtual network adapter
1437 # @up: true to set the link status to be up
1439 # Returns: Nothing on success
1440 # If @name is not a valid network device, DeviceNotFound
1444 # Notes: Not all network adapters support setting link status. This command
1445 # will succeed even if the network adapter does not support link status
1448 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1453 # This command sets the password of a block device that has not been open
1454 # with a password and requires one.
1456 # The two cases where this can happen are a block device is created through
1457 # QEMU's initial command line or a block device is changed through the legacy
1458 # @change interface.
1460 # In the event that the block device is created through the initial command
1461 # line, the VM will start in the stopped state regardless of whether '-S' is
1462 # used. The intention is for a management tool to query the block devices to
1463 # determine which ones are encrypted, set the passwords with this command, and
1464 # then start the guest with the @cont command.
1466 # @device: the name of the device to set the password on
1468 # @password: the password to use for the device
1470 # Returns: nothing on success
1471 # If @device is not a valid block device, DeviceNotFound
1472 # If @device is not encrypted, DeviceNotEncrypted
1474 # Notes: Not all block formats support encryption and some that do are not
1475 # able to validate that a password is correct. Disk corruption may
1476 # occur if an invalid password is specified.
1480 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1485 # Request the balloon driver to change its balloon size.
1487 # @value: the target size of the balloon in bytes
1489 # Returns: Nothing on success
1490 # If the balloon driver is enabled but not functional because the KVM
1491 # kernel module cannot support it, KvmMissingCap
1492 # If no balloon device is present, DeviceNotActive
1494 # Notes: This command just issues a request to the guest. When it returns,
1495 # the balloon size may not have changed. A guest can change the balloon
1496 # size independent of this command.
1500 { 'command': 'balloon', 'data': {'value': 'int'} }
1505 # Resize a block image while a guest is running.
1507 # @device: the name of the device to get the image resized
1509 # @size: new image size in bytes
1511 # Returns: nothing on success
1512 # If @device is not a valid block device, DeviceNotFound
1516 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1521 # An enumeration that tells QEMU how to set the backing file path in
1524 # @existing: QEMU should look for an existing image file.
1526 # @absolute-paths: QEMU should create a new image with absolute paths
1527 # for the backing file.
1531 { 'enum': 'NewImageMode'
1532 'data': [ 'existing', 'absolute-paths' ] }
1537 # @device: the name of the device to generate the snapshot from.
1539 # @snapshot-file: the target of the new image. A new file will be created.
1541 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1543 # @mode: #optional whether and how QEMU should create a new image, default is
1546 { 'type': 'BlockdevSnapshot',
1547 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1548 '*mode': 'NewImageMode' } }
1553 # A discriminated record of operations that can be performed with
1556 { 'union': 'BlockdevAction',
1558 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1564 # Atomically operate on a group of one or more block devices. If
1565 # any operation fails, then the entire set of actions will be
1566 # abandoned and the appropriate error returned. The only operation
1567 # supported is currently blockdev-snapshot-sync.
1570 # @BlockdevAction: information needed for the device snapshot
1572 # Returns: nothing on success
1573 # If @device is not a valid block device, DeviceNotFound
1575 # Note: The transaction aborts on the first failure. Therefore, there will
1576 # be only one device or snapshot file returned in an error condition, and
1577 # subsequent actions will not have been attempted.
1581 { 'command': 'transaction',
1582 'data': { 'actions': [ 'BlockdevAction' ] } }
1585 # @blockdev-snapshot-sync
1587 # Generates a synchronous snapshot of a block device.
1589 # @device: the name of the device to generate the snapshot from.
1591 # @snapshot-file: the target of the new image. If the file exists, or if it
1592 # is a device, the snapshot will be created in the existing
1593 # file/device. If does not exist, a new file will be created.
1595 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1597 # @mode: #optional whether and how QEMU should create a new image, default is
1600 # Returns: nothing on success
1601 # If @device is not a valid block device, DeviceNotFound
1605 { 'command': 'blockdev-snapshot-sync',
1606 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1607 '*mode': 'NewImageMode'} }
1610 # @human-monitor-command:
1612 # Execute a command on the human monitor and return the output.
1614 # @command-line: the command to execute in the human monitor
1616 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1618 # Returns: the output of the command as a string
1622 # Notes: This command only exists as a stop-gap. It's use is highly
1623 # discouraged. The semantics of this command are not guaranteed.
1625 # Known limitations:
1627 # o This command is stateless, this means that commands that depend
1628 # on state information (such as getfd) might not work
1630 # o Commands that prompt the user for data (eg. 'cont' when the block
1631 # device is encrypted) don't currently work
1633 { 'command': 'human-monitor-command',
1634 'data': {'command-line': 'str', '*cpu-index': 'int'},
1640 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1641 # writes data between 'top' and 'base' into 'base'.
1643 # @device: the name of the device
1645 # @base: #optional The file name of the backing image to write data into.
1646 # If not specified, this is the deepest backing image
1648 # @top: The file name of the backing image within the image chain,
1649 # which contains the topmost data to be committed down.
1650 # Note, the active layer as 'top' is currently unsupported.
1652 # If top == base, that is an error.
1655 # @speed: #optional the maximum speed, in bytes per second
1657 # Returns: Nothing on success
1658 # If commit or stream is already active on this device, DeviceInUse
1659 # If @device does not exist, DeviceNotFound
1660 # If image commit is not supported by this device, NotSupported
1661 # If @base or @top is invalid, a generic error is returned
1662 # If @top is the active layer, or omitted, a generic error is returned
1663 # If @speed is invalid, InvalidParameter
1668 { 'command': 'block-commit',
1669 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1675 # Start mirroring a block device's writes to a new destination.
1677 # @device: the name of the device whose writes should be mirrored.
1679 # @target: the target of the new image. If the file exists, or if it
1680 # is a device, the existing file/device will be used as the new
1681 # destination. If it does not exist, a new file will be created.
1683 # @format: #optional the format of the new destination, default is to
1684 # probe if @mode is 'existing', else the format of the source
1686 # @mode: #optional whether and how QEMU should create a new image, default is
1689 # @speed: #optional the maximum speed, in bytes per second
1691 # @sync: what parts of the disk image should be copied to the destination
1692 # (all the disk, only the sectors allocated in the topmost image, or
1695 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1696 # if the image format doesn't have clusters, 4K if the clusters
1697 # are smaller than that, else the cluster size. Must be a
1698 # power of 2 between 512 and 64M (since 1.4).
1700 # @buf-size: #optional maximum amount of data in flight from source to
1701 # target (since 1.4).
1703 # @on-source-error: #optional the action to take on an error on the source,
1704 # default 'report'. 'stop' and 'enospc' can only be used
1705 # if the block device supports io-status (see BlockInfo).
1707 # @on-target-error: #optional the action to take on an error on the target,
1708 # default 'report' (no limitations, since this applies to
1709 # a different block device than @device).
1711 # Returns: nothing on success
1712 # If @device is not a valid block device, DeviceNotFound
1716 { 'command': 'drive-mirror',
1717 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1718 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1719 '*speed': 'int', '*granularity': 'uint32',
1720 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1721 '*on-target-error': 'BlockdevOnError' } }
1726 # Cancel the current executing migration process.
1728 # Returns: nothing on success
1730 # Notes: This command succeeds even if there is no migration process running.
1734 { 'command': 'migrate_cancel' }
1737 # @migrate_set_downtime
1739 # Set maximum tolerated downtime for migration.
1741 # @value: maximum downtime in seconds
1743 # Returns: nothing on success
1747 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1750 # @migrate_set_speed
1752 # Set maximum speed for migration.
1754 # @value: maximum speed in bytes.
1756 # Returns: nothing on success
1758 # Notes: A value lesser than zero will be automatically round up to zero.
1762 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1765 # @migrate-set-cache-size
1767 # Set XBZRLE cache size
1769 # @value: cache size in bytes
1771 # The size will be rounded down to the nearest power of 2.
1772 # The cache size can be modified before and during ongoing migration
1774 # Returns: nothing on success
1778 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1781 # @query-migrate-cache-size
1783 # query XBZRLE cache size
1785 # Returns: XBZRLE cache size in bytes
1789 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1792 # @ObjectPropertyInfo:
1794 # @name: the name of the property
1796 # @type: the type of the property. This will typically come in one of four
1799 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1800 # These types are mapped to the appropriate JSON type.
1802 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1803 # legacy qdev typename. These types are always treated as strings.
1805 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1806 # device type name. Child properties create the composition tree.
1808 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1809 # device type name. Link properties form the device model graph.
1813 { 'type': 'ObjectPropertyInfo',
1814 'data': { 'name': 'str', 'type': 'str' } }
1819 # This command will list any properties of a object given a path in the object
1822 # @path: the path within the object model. See @qom-get for a description of
1825 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1830 { 'command': 'qom-list',
1831 'data': { 'path': 'str' },
1832 'returns': [ 'ObjectPropertyInfo' ] }
1837 # This command will get a property from a object model path and return the
1840 # @path: The path within the object model. There are two forms of supported
1841 # paths--absolute and partial paths.
1843 # Absolute paths are derived from the root object and can follow child<>
1844 # or link<> properties. Since they can follow link<> properties, they
1845 # can be arbitrarily long. Absolute paths look like absolute filenames
1846 # and are prefixed with a leading slash.
1848 # Partial paths look like relative filenames. They do not begin
1849 # with a prefix. The matching rules for partial paths are subtle but
1850 # designed to make specifying objects easy. At each level of the
1851 # composition tree, the partial path is matched as an absolute path.
1852 # The first match is not returned. At least two matches are searched
1853 # for. A successful result is only returned if only one match is
1854 # found. If more than one match is found, a flag is return to
1855 # indicate that the match was ambiguous.
1857 # @property: The property name to read
1859 # Returns: The property value. The type depends on the property type. legacy<>
1860 # properties are returned as #str. child<> and link<> properties are
1861 # returns as #str pathnames. All integer property types (u8, u16, etc)
1862 # are returned as #int.
1866 { 'command': 'qom-get',
1867 'data': { 'path': 'str', 'property': 'str' },
1868 'returns': 'visitor',
1874 # This command will set a property from a object model path.
1876 # @path: see @qom-get for a description of this parameter
1878 # @property: the property name to set
1880 # @value: a value who's type is appropriate for the property type. See @qom-get
1881 # for a description of type mapping.
1885 { 'command': 'qom-set',
1886 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1892 # Sets the password of a remote display session.
1894 # @protocol: `vnc' to modify the VNC server password
1895 # `spice' to modify the Spice server password
1897 # @password: the new password
1899 # @connected: #optional how to handle existing clients when changing the
1900 # password. If nothing is specified, defaults to `keep'
1901 # `fail' to fail the command if clients are connected
1902 # `disconnect' to disconnect existing clients
1903 # `keep' to maintain existing clients
1905 # Returns: Nothing on success
1906 # If Spice is not enabled, DeviceNotFound
1910 { 'command': 'set_password',
1911 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1916 # Expire the password of a remote display server.
1918 # @protocol: the name of the remote display protocol `vnc' or `spice'
1920 # @time: when to expire the password.
1921 # `now' to expire the password immediately
1922 # `never' to cancel password expiration
1923 # `+INT' where INT is the number of seconds from now (integer)
1924 # `INT' where INT is the absolute time in seconds
1926 # Returns: Nothing on success
1927 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1931 # Notes: Time is relative to the server and currently there is no way to
1932 # coordinate server time with client time. It is not recommended to
1933 # use the absolute time version of the @time parameter unless you're
1934 # sure you are on the same machine as the QEMU instance.
1936 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1941 # Ejects a device from a removable drive.
1943 # @device: The name of the device
1945 # @force: @optional If true, eject regardless of whether the drive is locked.
1946 # If not specified, the default value is false.
1948 # Returns: Nothing on success
1949 # If @device is not a valid block device, DeviceNotFound
1951 # Notes: Ejecting a device will no media results in success
1955 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1958 # @change-vnc-password:
1960 # Change the VNC server password.
1962 # @target: the new password to use with VNC authentication
1966 # Notes: An empty password in this command will set the password to the empty
1967 # string. Existing clients are unaffected by executing this command.
1969 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1974 # This command is multiple commands multiplexed together.
1976 # @device: This is normally the name of a block device but it may also be 'vnc'.
1977 # when it's 'vnc', then sub command depends on @target
1979 # @target: If @device is a block device, then this is the new filename.
1980 # If @device is 'vnc', then if the value 'password' selects the vnc
1981 # change password command. Otherwise, this specifies a new server URI
1982 # address to listen to for VNC connections.
1984 # @arg: If @device is a block device, then this is an optional format to open
1986 # If @device is 'vnc' and @target is 'password', this is the new VNC
1987 # password to set. If this argument is an empty string, then no future
1988 # logins will be allowed.
1990 # Returns: Nothing on success.
1991 # If @device is not a valid block device, DeviceNotFound
1992 # If the new block device is encrypted, DeviceEncrypted. Note that
1993 # if this error is returned, the device has been opened successfully
1994 # and an additional call to @block_passwd is required to set the
1995 # device's password. The behavior of reads and writes to the block
1996 # device between when these calls are executed is undefined.
1998 # Notes: It is strongly recommended that this interface is not used especially
1999 # for changing block devices.
2003 { 'command': 'change',
2004 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2007 # @block_set_io_throttle:
2009 # Change I/O throttle limits for a block drive.
2011 # @device: The name of the device
2013 # @bps: total throughput limit in bytes per second
2015 # @bps_rd: read throughput limit in bytes per second
2017 # @bps_wr: write throughput limit in bytes per second
2019 # @iops: total I/O operations per second
2021 # @ops_rd: read I/O operations per second
2023 # @iops_wr: write I/O operations per second
2025 # Returns: Nothing on success
2026 # If @device is not a valid block device, DeviceNotFound
2030 { 'command': 'block_set_io_throttle',
2031 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2032 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
2037 # Copy data from a backing file into a block device.
2039 # The block streaming operation is performed in the background until the entire
2040 # backing file has been copied. This command returns immediately once streaming
2041 # has started. The status of ongoing block streaming operations can be checked
2042 # with query-block-jobs. The operation can be stopped before it has completed
2043 # using the block-job-cancel command.
2045 # If a base file is specified then sectors are not copied from that base file and
2046 # its backing chain. When streaming completes the image file will have the base
2047 # file as its backing file. This can be used to stream a subset of the backing
2048 # file chain instead of flattening the entire image.
2050 # On successful completion the image file is updated to drop the backing file
2051 # and the BLOCK_JOB_COMPLETED event is emitted.
2053 # @device: the device name
2055 # @base: #optional the common backing file name
2057 # @speed: #optional the maximum speed, in bytes per second
2059 # @on-error: #optional the action to take on an error (default report).
2060 # 'stop' and 'enospc' can only be used if the block device
2061 # supports io-status (see BlockInfo). Since 1.3.
2063 # Returns: Nothing on success
2064 # If @device does not exist, DeviceNotFound
2068 { 'command': 'block-stream',
2069 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2070 '*on-error': 'BlockdevOnError' } }
2073 # @block-job-set-speed:
2075 # Set maximum speed for a background block operation.
2077 # This command can only be issued when there is an active block job.
2079 # Throttling can be disabled by setting the speed to 0.
2081 # @device: the device name
2083 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2086 # Returns: Nothing on success
2087 # If no background operation is active on this device, DeviceNotActive
2091 { 'command': 'block-job-set-speed',
2092 'data': { 'device': 'str', 'speed': 'int' } }
2095 # @block-job-cancel:
2097 # Stop an active background block operation.
2099 # This command returns immediately after marking the active background block
2100 # operation for cancellation. It is an error to call this command if no
2101 # operation is in progress.
2103 # The operation will cancel as soon as possible and then emit the
2104 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2105 # enumerated using query-block-jobs.
2107 # For streaming, the image file retains its backing file unless the streaming
2108 # operation happens to complete just as it is being cancelled. A new streaming
2109 # operation can be started at a later time to finish copying all data from the
2112 # @device: the device name
2114 # @force: #optional whether to allow cancellation of a paused job (default
2115 # false). Since 1.3.
2117 # Returns: Nothing on success
2118 # If no background operation is active on this device, DeviceNotActive
2122 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2127 # Pause an active background block operation.
2129 # This command returns immediately after marking the active background block
2130 # operation for pausing. It is an error to call this command if no
2131 # operation is in progress. Pausing an already paused job has no cumulative
2132 # effect; a single block-job-resume command will resume the job.
2134 # The operation will pause as soon as possible. No event is emitted when
2135 # the operation is actually paused. Cancelling a paused job automatically
2138 # @device: the device name
2140 # Returns: Nothing on success
2141 # If no background operation is active on this device, DeviceNotActive
2145 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2148 # @block-job-resume:
2150 # Resume an active background block operation.
2152 # This command returns immediately after resuming a paused background block
2153 # operation. It is an error to call this command if no operation is in
2154 # progress. Resuming an already running job is not an error.
2156 # This command also clears the error status of the job.
2158 # @device: the device name
2160 # Returns: Nothing on success
2161 # If no background operation is active on this device, DeviceNotActive
2165 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2168 # @block-job-complete:
2170 # Manually trigger completion of an active background block operation. This
2171 # is supported for drive mirroring, where it also switches the device to
2172 # write to the target path only. The ability to complete is signaled with
2173 # a BLOCK_JOB_READY event.
2175 # This command completes an active background block operation synchronously.
2176 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2177 # is not defined. Note that if an I/O error occurs during the processing of
2178 # this command: 1) the command itself will fail; 2) the error will be processed
2179 # according to the rerror/werror arguments that were specified when starting
2182 # A cancelled or paused job cannot be completed.
2184 # @device: the device name
2186 # Returns: Nothing on success
2187 # If no background operation is active on this device, DeviceNotActive
2191 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2196 # This structure describes a search result from @qom-list-types
2198 # @name: the type name found in the search
2202 # Notes: This command is experimental and may change syntax in future releases.
2204 { 'type': 'ObjectTypeInfo',
2205 'data': { 'name': 'str' } }
2210 # This command will return a list of types given search parameters
2212 # @implements: if specified, only return types that implement this type name
2214 # @abstract: if true, include abstract types in the results
2216 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2220 { 'command': 'qom-list-types',
2221 'data': { '*implements': 'str', '*abstract': 'bool' },
2222 'returns': [ 'ObjectTypeInfo' ] }
2225 # @DevicePropertyInfo:
2227 # Information about device properties.
2229 # @name: the name of the property
2230 # @type: the typename of the property
2234 { 'type': 'DevicePropertyInfo',
2235 'data': { 'name': 'str', 'type': 'str' } }
2238 # @device-list-properties:
2240 # List properties associated with a device.
2242 # @typename: the type name of a device
2244 # Returns: a list of DevicePropertyInfo describing a devices properties
2248 { 'command': 'device-list-properties',
2249 'data': { 'typename': 'str'},
2250 'returns': [ 'DevicePropertyInfo' ] }
2255 # Migrates the current running guest to another Virtual Machine.
2257 # @uri: the Uniform Resource Identifier of the destination VM
2259 # @blk: #optional do block migration (full disk copy)
2261 # @inc: #optional incremental disk copy migration
2263 # @detach: this argument exists only for compatibility reasons and
2264 # is ignored by QEMU
2266 # Returns: nothing on success
2270 { 'command': 'migrate',
2271 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2273 # @xen-save-devices-state:
2275 # Save the state of all devices to file. The RAM and the block devices
2276 # of the VM are not saved by this command.
2278 # @filename: the file to save the state of the devices to as binary
2279 # data. See xen-save-devices-state.txt for a description of the binary
2282 # Returns: Nothing on success
2286 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2289 # @xen-set-global-dirty-log
2291 # Enable or disable the global dirty log mode.
2293 # @enable: true to enable, false to disable.
2299 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2304 # Remove a device from a guest
2306 # @id: the name of the device
2308 # Returns: Nothing on success
2309 # If @id is not a valid device, DeviceNotFound
2311 # Notes: When this command completes, the device may not be removed from the
2312 # guest. Hot removal is an operation that requires guest cooperation.
2313 # This command merely requests that the guest begin the hot removal
2318 { 'command': 'device_del', 'data': {'id': 'str'} }
2321 # @dump-guest-memory
2323 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2324 # very long depending on the amount of guest memory. This command is only
2325 # supported on i386 and x86_64.
2327 # @paging: if true, do paging to get guest's memory mapping. This allows
2328 # using gdb to process the core file.
2330 # IMPORTANT: this option can make QEMU allocate several gigabytes
2331 # of RAM. This can happen for a large guest, or a
2332 # malicious guest pretending to be large.
2334 # Also, paging=true has the following limitations:
2336 # 1. The guest may be in a catastrophic state or can have corrupted
2337 # memory, which cannot be trusted
2338 # 2. The guest can be in real-mode even if paging is enabled. For
2339 # example, the guest uses ACPI to sleep, and ACPI sleep state
2342 # @protocol: the filename or file descriptor of the vmcore. The supported
2345 # 1. file: the protocol starts with "file:", and the following
2346 # string is the file's path.
2347 # 2. fd: the protocol starts with "fd:", and the following string
2350 # @begin: #optional if specified, the starting physical address.
2352 # @length: #optional if specified, the memory size, in bytes. If you don't
2353 # want to dump all guest's memory, please specify the start @begin
2356 # Returns: nothing on success
2360 { 'command': 'dump-guest-memory',
2361 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2362 '*length': 'int' } }
2367 # Add a network backend.
2369 # @type: the type of network backend. Current valid values are 'user', 'tap',
2370 # 'vde', 'socket', 'dump' and 'bridge'
2372 # @id: the name of the new network backend
2374 # @props: #optional a list of properties to be passed to the backend in
2375 # the format 'name=value', like 'ifname=tap0,script=no'
2377 # Notes: The semantics of @props is not well defined. Future commands will be
2378 # introduced that provide stronger typing for backend creation.
2382 # Returns: Nothing on success
2383 # If @type is not a valid network backend, DeviceNotFound
2385 { 'command': 'netdev_add',
2386 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2392 # Remove a network backend.
2394 # @id: the name of the network backend to remove
2396 # Returns: Nothing on success
2397 # If @id is not a valid network backend, DeviceNotFound
2401 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2404 # @NetdevNoneOptions
2406 # Use it alone to have zero network devices.
2410 { 'type': 'NetdevNoneOptions',
2414 # @NetLegacyNicOptions
2416 # Create a new Network Interface Card.
2418 # @netdev: #optional id of -netdev to connect to
2420 # @macaddr: #optional MAC address
2422 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2424 # @addr: #optional PCI device address
2426 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2430 { 'type': 'NetLegacyNicOptions',
2436 '*vectors': 'uint32' } }
2441 # A fat type wrapping 'str', to be embedded in lists.
2450 # @NetdevUserOptions
2452 # Use the user mode network stack which requires no administrator privilege to
2455 # @hostname: #optional client hostname reported by the builtin DHCP server
2457 # @restrict: #optional isolate the guest from the host
2459 # @ip: #optional legacy parameter, use net= instead
2461 # @net: #optional IP address and optional netmask
2463 # @host: #optional guest-visible address of the host
2465 # @tftp: #optional root directory of the built-in TFTP server
2467 # @bootfile: #optional BOOTP filename, for use with tftp=
2469 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2472 # @dns: #optional guest-visible address of the virtual nameserver
2474 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2477 # @smb: #optional root directory of the built-in SMB server
2479 # @smbserver: #optional IP address of the built-in SMB server
2481 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2484 # @guestfwd: #optional forward guest TCP connections
2488 { 'type': 'NetdevUserOptions',
2491 '*restrict': 'bool',
2497 '*dhcpstart': 'str',
2499 '*dnssearch': ['String'],
2501 '*smbserver': 'str',
2502 '*hostfwd': ['String'],
2503 '*guestfwd': ['String'] } }
2508 # Connect the host TAP network interface name to the VLAN.
2510 # @ifname: #optional interface name
2512 # @fd: #optional file descriptor of an already opened tap
2514 # @script: #optional script to initialize the interface
2516 # @downscript: #optional script to shut down the interface
2518 # @helper: #optional command to execute to configure bridge
2520 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2522 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2524 # @vhost: #optional enable vhost-net network accelerator
2526 # @vhostfd: #optional file descriptor of an already opened vhost net device
2528 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2532 { 'type': 'NetdevTapOptions',
2537 '*downscript': 'str',
2540 '*vnet_hdr': 'bool',
2543 '*vhostforce': 'bool' } }
2546 # @NetdevSocketOptions
2548 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2549 # socket connection.
2551 # @fd: #optional file descriptor of an already opened socket
2553 # @listen: #optional port number, and optional hostname, to listen on
2555 # @connect: #optional port number, and optional hostname, to connect to
2557 # @mcast: #optional UDP multicast address and port number
2559 # @localaddr: #optional source address and port for multicast and udp packets
2561 # @udp: #optional UDP unicast address and port number
2565 { 'type': 'NetdevSocketOptions',
2571 '*localaddr': 'str',
2577 # Connect the VLAN to a vde switch running on the host.
2579 # @sock: #optional socket path
2581 # @port: #optional port number
2583 # @group: #optional group owner of socket
2585 # @mode: #optional permissions for socket
2589 { 'type': 'NetdevVdeOptions',
2594 '*mode': 'uint16' } }
2597 # @NetdevDumpOptions
2599 # Dump VLAN network traffic to a file.
2601 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2604 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2608 { 'type': 'NetdevDumpOptions',
2614 # @NetdevBridgeOptions
2616 # Connect a host TAP network interface to a host bridge device.
2618 # @br: #optional bridge name
2620 # @helper: #optional command to execute to configure bridge
2624 { 'type': 'NetdevBridgeOptions',
2627 '*helper': 'str' } }
2630 # @NetdevHubPortOptions
2632 # Connect two or more net clients through a software hub.
2634 # @hubid: hub identifier number
2638 { 'type': 'NetdevHubPortOptions',
2640 'hubid': 'int32' } }
2645 # A discriminated record of network device traits.
2649 { 'union': 'NetClientOptions',
2651 'none': 'NetdevNoneOptions',
2652 'nic': 'NetLegacyNicOptions',
2653 'user': 'NetdevUserOptions',
2654 'tap': 'NetdevTapOptions',
2655 'socket': 'NetdevSocketOptions',
2656 'vde': 'NetdevVdeOptions',
2657 'dump': 'NetdevDumpOptions',
2658 'bridge': 'NetdevBridgeOptions',
2659 'hubport': 'NetdevHubPortOptions' } }
2664 # Captures the configuration of a network device; legacy.
2666 # @vlan: #optional vlan number
2668 # @id: #optional identifier for monitor commands
2670 # @name: #optional identifier for monitor commands, ignored if @id is present
2672 # @opts: device type specific properties (legacy)
2676 { 'type': 'NetLegacy',
2681 'opts': 'NetClientOptions' } }
2686 # Captures the configuration of a network device.
2688 # @id: identifier for monitor commands.
2690 # @opts: device type specific properties
2697 'opts': 'NetClientOptions' } }
2700 # @InetSocketAddress
2702 # Captures a socket address or address range in the Internet namespace.
2704 # @host: host part of the address
2706 # @port: port part of the address, or lowest port if @to is present
2708 # @to: highest port to try
2710 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2713 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2718 { 'type': 'InetSocketAddress',
2727 # @UnixSocketAddress
2729 # Captures a socket address in the local ("Unix socket") namespace.
2731 # @path: filesystem path to use
2735 { 'type': 'UnixSocketAddress',
2742 # Captures the address of a socket, which could also be a named file descriptor
2746 { 'union': 'SocketAddress',
2748 'inet': 'InetSocketAddress',
2749 'unix': 'UnixSocketAddress',
2755 # Receive a file descriptor via SCM rights and assign it a name
2757 # @fdname: file descriptor name
2759 # Returns: Nothing on success
2763 # Notes: If @fdname already exists, the file descriptor assigned to
2764 # it will be closed and replaced by the received file
2766 # The 'closefd' command can be used to explicitly close the
2767 # file descriptor when it is no longer needed.
2769 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2774 # Close a file descriptor previously passed via SCM rights
2776 # @fdname: file descriptor name
2778 # Returns: Nothing on success
2782 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2787 # Information describing a machine.
2789 # @name: the name of the machine
2791 # @alias: #optional an alias for the machine name
2793 # @default: #optional whether the machine is default
2797 { 'type': 'MachineInfo',
2798 'data': { 'name': 'str', '*alias': 'str',
2799 '*is-default': 'bool' } }
2804 # Return a list of supported machines
2806 # Returns: a list of MachineInfo
2810 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2813 # @CpuDefinitionInfo:
2815 # Virtual CPU definition.
2817 # @name: the name of the CPU definition
2821 { 'type': 'CpuDefinitionInfo',
2822 'data': { 'name': 'str' } }
2825 # @query-cpu-definitions:
2827 # Return a list of supported virtual CPU definitions
2829 # Returns: a list of CpuDefInfo
2833 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2837 # Information about a file descriptor that was added to an fd set.
2839 # @fdset-id: The ID of the fd set that @fd was added to.
2841 # @fd: The file descriptor that was received via SCM rights and
2842 # added to the fd set.
2846 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2851 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2853 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2855 # @opaque: #optional A free-form string that can be used to describe the fd.
2857 # Returns: @AddfdInfo on success
2858 # If file descriptor was not received, FdNotSupplied
2859 # If @fdset-id is a negative value, InvalidParameterValue
2861 # Notes: The list of fd sets is shared by all monitor connections.
2863 # If @fdset-id is not specified, a new fd set will be created.
2867 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2868 'returns': 'AddfdInfo' }
2873 # Remove a file descriptor from an fd set.
2875 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2877 # @fd: #optional The file descriptor that is to be removed.
2879 # Returns: Nothing on success
2880 # If @fdset-id or @fd is not found, FdNotFound
2884 # Notes: The list of fd sets is shared by all monitor connections.
2886 # If @fd is not specified, all file descriptors in @fdset-id
2889 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2894 # Information about a file descriptor that belongs to an fd set.
2896 # @fd: The file descriptor value.
2898 # @opaque: #optional A free-form string that can be used to describe the fd.
2902 { 'type': 'FdsetFdInfo',
2903 'data': {'fd': 'int', '*opaque': 'str'} }
2908 # Information about an fd set.
2910 # @fdset-id: The ID of the fd set.
2912 # @fds: A list of file descriptors that belong to this fd set.
2916 { 'type': 'FdsetInfo',
2917 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2922 # Return information describing all fd sets.
2924 # Returns: A list of @FdsetInfo
2928 # Note: The list of fd sets is shared by all monitor connections.
2931 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
2936 # Target CPU emulation type
2938 # These parameters correspond to the softmmu binary CPU name that is currently
2943 { 'enum': 'TargetType',
2944 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2945 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2946 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2947 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2952 # Information describing the QEMU target.
2954 # @arch: the target architecture (eg "x86_64", "i386", etc)
2958 { 'type': 'TargetInfo',
2959 'data': { 'arch': 'TargetType' } }
2964 # Return information about the target for this QEMU
2966 # Returns: TargetInfo
2970 { 'command': 'query-target', 'returns': 'TargetInfo' }
2975 # An enumeration of key name.
2977 # This is used by the send-key command.
2981 { 'enum': 'QKeyCode',
2982 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2983 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2984 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2985 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2986 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2987 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2988 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2989 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2990 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2991 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2992 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2993 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2994 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2995 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2996 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3001 # Represents a keyboard key.
3005 { 'union': 'KeyValue',
3008 'qcode': 'QKeyCode' } }
3013 # Send keys to guest.
3015 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3016 # simultaneously sent to the guest. A @KeyValue.number value is sent
3017 # directly to the guest, while @KeyValue.qcode must be a valid
3020 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3023 # Returns: Nothing on success
3024 # If key is unknown or redundant, InvalidParameter
3029 { 'command': 'send-key',
3030 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3035 # Write a PPM of the VGA screen to a file.
3037 # @filename: the path of a new PPM file to store the image
3039 # Returns: Nothing on success
3043 { 'command': 'screendump', 'data': {'filename': 'str'} }
3046 # @nbd-server-start:
3048 # Start an NBD server listening on the given host and port. Block
3049 # devices can then be exported using @nbd-server-add. The NBD
3050 # server will present them as named exports; for example, another
3051 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3053 # @addr: Address on which to listen.
3055 # Returns: error if the server is already running.
3059 { 'command': 'nbd-server-start',
3060 'data': { 'addr': 'SocketAddress' } }
3065 # Export a device to QEMU's embedded NBD server.
3067 # @device: Block device to be exported
3069 # @writable: Whether clients should be able to write to the device via the
3070 # NBD connection (default false). #optional
3072 # Returns: error if the device is already marked for export.
3076 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3081 # Stop QEMU's embedded NBD server, and unregister all devices previously
3082 # added via @nbd-server-add.
3086 { 'command': 'nbd-server-stop' }
3091 # Configuration info for file chardevs.
3093 # @in: #optional The name of the input file
3094 # @out: The name of the output file
3098 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3104 # Configuration info for device chardevs.
3106 # @device: The name of the special file for the device,
3107 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3108 # @type: What kind of device this is.
3112 { 'enum': 'ChardevPortKind', 'data': [ 'serial',
3115 { 'type': 'ChardevPort', 'data': { 'device' : 'str',
3116 'type' : 'ChardevPortKind'} }
3121 # Configuration info for socket chardevs.
3123 # @addr: socket address to listen on (server=true)
3124 # or connect to (server=false)
3125 # @server: #optional create server socket (default: true)
3126 # @wait: #optional wait for connect (not used for server
3127 # sockets, default: false)
3128 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3129 # @telnet: #optional enable telnet protocol (default: false)
3133 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3136 '*nodelay' : 'bool',
3137 '*telnet' : 'bool' } }
3142 # Configuration info for the new chardev backend.
3146 { 'type': 'ChardevDummy', 'data': { } }
3148 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3149 'port' : 'ChardevPort',
3150 'socket' : 'ChardevSocket',
3151 'pty' : 'ChardevDummy',
3152 'null' : 'ChardevDummy' } }
3157 # Return info about the chardev backend just created.
3161 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3166 # Add a file chardev
3168 # @id: the chardev's ID, must be unique
3169 # @backend: backend type and parameters
3171 # Returns: chardev info.
3175 { 'command': 'chardev-add', 'data': {'id' : 'str',
3176 'backend' : 'ChardevBackend' },
3177 'returns': 'ChardevReturn' }
3184 # @id: the chardev's ID, must exist and not be in use
3186 # Returns: Nothing on success
3190 { 'command': 'chardev-remove', 'data': {'id': 'str'} }