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 # @guest-panicked: guest has been panicked as a result of guest OS panic
180 { 'enum': 'RunState',
181 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
183 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
189 # @id: unique snapshot id
191 # @name: user chosen name
193 # @vm-state-size: size of the VM state
195 # @date-sec: UTC date of the snapshot in seconds
197 # @date-nsec: fractional part in nano seconds to be used with date-sec
199 # @vm-clock-sec: VM clock relative to boot in seconds
201 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
207 { 'type': 'SnapshotInfo',
208 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209 'date-sec': 'int', 'date-nsec': 'int',
210 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
215 # Information about a QEMU image file
217 # @filename: name of the image file
219 # @format: format of the image file
221 # @virtual-size: maximum capacity in bytes of the image
223 # @actual-size: #optional actual size on disk in bytes of the image
225 # @dirty-flag: #optional true if image is not cleanly closed
227 # @cluster-size: #optional size of a cluster in bytes
229 # @encrypted: #optional true if the image is encrypted
231 # @backing-filename: #optional name of the backing file
233 # @full-backing-filename: #optional full path of the backing file
235 # @backing-filename-format: #optional the format of the backing file
237 # @snapshots: #optional list of VM snapshots
239 # @backing-image: #optional info of the backing image (since 1.6)
245 { 'type': 'ImageInfo',
246 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
247 '*actual-size': 'int', 'virtual-size': 'int',
248 '*cluster-size': 'int', '*encrypted': 'bool',
249 '*backing-filename': 'str', '*full-backing-filename': 'str',
250 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
251 '*backing-image': 'ImageInfo' } }
256 # Information about a QEMU image file check
258 # @filename: name of the image file checked
260 # @format: format of the image file checked
262 # @check-errors: number of unexpected errors occurred during check
264 # @image-end-offset: #optional offset (in bytes) where the image ends, this
265 # field is present if the driver for the image format
268 # @corruptions: #optional number of corruptions found during the check if any
270 # @leaks: #optional number of leaks found during the check if any
272 # @corruptions-fixed: #optional number of corruptions fixed during the check
275 # @leaks-fixed: #optional number of leaks fixed during the check if any
277 # @total-clusters: #optional total number of clusters, this field is present
278 # if the driver for the image format supports it
280 # @allocated-clusters: #optional total number of allocated clusters, this
281 # field is present if the driver for the image format
284 # @fragmented-clusters: #optional total number of fragmented clusters, this
285 # field is present if the driver for the image format
288 # @compressed-clusters: #optional total number of compressed clusters, this
289 # field is present if the driver for the image format
296 { 'type': 'ImageCheck',
297 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
298 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
299 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
300 '*total-clusters': 'int', '*allocated-clusters': 'int',
301 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
306 # Information about VCPU run state
308 # @running: true if all VCPUs are runnable, false if not runnable
310 # @singlestep: true if VCPUs are in single-step mode
312 # @status: the virtual machine @RunState
316 # Notes: @singlestep is enabled through the GDB stub
318 { 'type': 'StatusInfo',
319 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
324 # Query the run status of all VCPUs
326 # Returns: @StatusInfo reflecting all VCPUs
330 { 'command': 'query-status', 'returns': 'StatusInfo' }
335 # Guest UUID information.
337 # @UUID: the UUID of the guest
341 # Notes: If no UUID was specified for the guest, a null UUID is returned.
343 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
348 # Query the guest UUID information.
350 # Returns: The @UuidInfo for the guest
354 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
359 # Information about a character device.
361 # @label: the label of the character device
363 # @filename: the filename of the character device
365 # Notes: @filename is encoded using the QEMU command line character device
366 # encoding. See the QEMU man page for details.
370 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
375 # Returns information about current character devices.
377 # Returns: a list of @ChardevInfo
381 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
386 # An enumeration of data format.
388 # @utf8: Data is a UTF-8 string (RFC 3629)
390 # @base64: Data is Base64 encoded binary (RFC 3548)
394 { 'enum': 'DataFormat',
395 'data': [ 'utf8', 'base64' ] }
400 # Write to a ring buffer character device.
402 # @device: the ring buffer character device name
404 # @data: data to write
406 # @format: #optional data encoding (default 'utf8').
407 # - base64: data must be base64 encoded text. Its binary
408 # decoding gets written.
409 # Bug: invalid base64 is currently not rejected.
410 # Whitespace *is* invalid.
411 # - utf8: data's UTF-8 encoding is written
412 # - data itself is always Unicode regardless of format, like
415 # Returns: Nothing on success
419 { 'command': 'ringbuf-write',
420 'data': {'device': 'str', 'data': 'str',
421 '*format': 'DataFormat'} }
426 # Read from a ring buffer character device.
428 # @device: the ring buffer character device name
430 # @size: how many bytes to read at most
432 # @format: #optional data encoding (default 'utf8').
433 # - base64: the data read is returned in base64 encoding.
434 # - utf8: the data read is interpreted as UTF-8.
435 # Bug: can screw up when the buffer contains invalid UTF-8
436 # sequences, NUL characters, after the ring buffer lost
437 # data, and when reading stops because the size limit is
439 # - The return value is always Unicode regardless of format,
440 # like any other string.
442 # Returns: data read from the device
446 { 'command': 'ringbuf-read',
447 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
453 # Information about a QMP command
455 # @name: The command name
459 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
464 # Return a list of supported QMP commands by this server
466 # Returns: A list of @CommandInfo for all supported commands
470 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
475 # Information about a QMP event
477 # @name: The event name
481 { 'type': 'EventInfo', 'data': {'name': 'str'} }
486 # Return a list of supported QMP events by this server
488 # Returns: A list of @EventInfo for all supported events
492 { 'command': 'query-events', 'returns': ['EventInfo'] }
497 # Detailed migration status.
499 # @transferred: amount of bytes already transferred to the target VM
501 # @remaining: amount of bytes remaining to be transferred to the target VM
503 # @total: total amount of bytes involved in the migration process
505 # @duplicate: number of duplicate (zero) pages (since 1.2)
507 # @skipped: number of skipped zero pages (since 1.5)
509 # @normal : number of normal pages (since 1.2)
511 # @normal-bytes: number of normal bytes sent (since 1.2)
513 # @dirty-pages-rate: number of pages dirtied by second by the
516 # @mbps: throughput in megabits/sec. (since 1.6)
520 { 'type': 'MigrationStats',
521 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
522 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
523 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
524 'mbps' : 'number' } }
529 # Detailed XBZRLE migration cache statistics
531 # @cache-size: XBZRLE cache size
533 # @bytes: amount of bytes already transferred to the target VM
535 # @pages: amount of pages transferred to the target VM
537 # @cache-miss: number of cache miss
539 # @overflow: number of overflows
543 { 'type': 'XBZRLECacheStats',
544 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
545 'cache-miss': 'int', 'overflow': 'int' } }
550 # Information about current migration process.
552 # @status: #optional string describing the current migration status.
553 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
554 # 'cancelled'. If this field is not returned, no migration process
557 # @ram: #optional @MigrationStats containing detailed migration
558 # status, only returned if status is 'active' or
559 # 'completed'. 'comppleted' (since 1.2)
561 # @disk: #optional @MigrationStats containing detailed disk migration
562 # status, only returned if status is 'active' and it is a block
565 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
566 # migration statistics, only returned if XBZRLE feature is on and
567 # status is 'active' or 'completed' (since 1.2)
569 # @total-time: #optional total amount of milliseconds since migration started.
570 # If migration has ended, it returns the total migration
573 # @downtime: #optional only present when migration finishes correctly
574 # total downtime in milliseconds for the guest.
577 # @expected-downtime: #optional only present while migration is active
578 # expected downtime in milliseconds for the guest in last walk
579 # of the dirty bitmap. (since 1.3)
581 # @setup-time: #optional amount of setup time in milliseconds _before_ the
582 # iterations begin but _after_ the QMP command is issued. This is designed
583 # to provide an accounting of any activities (such as RDMA pinning) which
584 # may be expensive, but do not actually occur during the iterative
585 # migration rounds themselves. (since 1.6)
589 { 'type': 'MigrationInfo',
590 'data': {'*status': 'str', '*ram': 'MigrationStats',
591 '*disk': 'MigrationStats',
592 '*xbzrle-cache': 'XBZRLECacheStats',
593 '*total-time': 'int',
594 '*expected-downtime': 'int',
596 '*setup-time': 'int'} }
601 # Returns information about current migration process.
603 # Returns: @MigrationInfo
607 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
610 # @MigrationCapability
612 # Migration capabilities enumeration
614 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
615 # This feature allows us to minimize migration traffic for certain work
616 # loads, by sending compressed difference of the pages
618 # @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is
619 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
620 # Disabled by default. Experimental: may (or may not) be renamed after
621 # further testing is complete. (since 1.6)
623 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
624 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
625 # source and target VM to support this feature. To enable it is sufficient
626 # to enable the capability on the source VM. The feature is disabled by
627 # default. (since 1.6)
629 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
630 # to speed up convergence of RAM migration. (since 1.6)
634 { 'enum': 'MigrationCapability',
635 'data': ['xbzrle', 'x-rdma-pin-all', 'auto-converge', 'zero-blocks'] }
638 # @MigrationCapabilityStatus
640 # Migration capability information
642 # @capability: capability enum
644 # @state: capability state bool
648 { 'type': 'MigrationCapabilityStatus',
649 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
652 # @migrate-set-capabilities
654 # Enable/Disable the following migration capabilities (like xbzrle)
656 # @capabilities: json array of capability modifications to make
660 { 'command': 'migrate-set-capabilities',
661 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
664 # @query-migrate-capabilities
666 # Returns information about the current migration capabilities status
668 # Returns: @MigrationCapabilitiesStatus
672 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
677 # Information about a mouse device.
679 # @name: the name of the mouse device
681 # @index: the index of the mouse device
683 # @current: true if this device is currently receiving mouse events
685 # @absolute: true if this device supports absolute coordinates as input
689 { 'type': 'MouseInfo',
690 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
691 'absolute': 'bool'} }
696 # Returns information about each active mouse device
698 # Returns: a list of @MouseInfo for each device
702 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
707 # Information about a virtual CPU
709 # @CPU: the index of the virtual CPU
711 # @current: this only exists for backwards compatible and should be ignored
713 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
714 # to a processor specific low power mode.
716 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
718 # If the target is Sparc, this is the PC component of the
719 # instruction pointer.
721 # @nip: #optional If the target is PPC, the instruction pointer
723 # @npc: #optional If the target is Sparc, the NPC component of the instruction
726 # @PC: #optional If the target is MIPS, the instruction pointer
728 # @thread_id: ID of the underlying host thread
732 # Notes: @halted is a transient state that changes frequently. By the time the
733 # data is sent to the client, the guest may no longer be halted.
736 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
737 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
742 # Returns a list of information about each virtual CPU.
744 # Returns: a list of @CpuInfo for each virtual CPU
748 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
753 # Information about the backing device for a block device.
755 # @file: the filename of the backing device
757 # @ro: true if the backing device was open read-only
759 # @drv: the name of the block format used to open the backing device. As of
760 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
761 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
762 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
763 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
765 # @backing_file: #optional the name of the backing file (for copy-on-write)
767 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
769 # @encrypted: true if the backing device is encrypted
771 # @encryption_key_missing: true if the backing device is encrypted but an
772 # valid encryption key is missing
774 # @bps: total throughput limit in bytes per second is specified
776 # @bps_rd: read throughput limit in bytes per second is specified
778 # @bps_wr: write throughput limit in bytes per second is specified
780 # @iops: total I/O operations per second is specified
782 # @iops_rd: read I/O operations per second is specified
784 # @iops_wr: write I/O operations per second is specified
786 # @image: the info of image used (since: 1.6)
788 # @bps_max: #optional total max in bytes (Since 1.7)
790 # @bps_rd_max: #optional read max in bytes (Since 1.7)
792 # @bps_wr_max: #optional write max in bytes (Since 1.7)
794 # @iops_max: #optional total I/O operations max (Since 1.7)
796 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
798 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
800 # @iops_size: #optional an I/O size in bytes (Since 1.7)
804 # Notes: This interface is only found in @BlockInfo.
806 { 'type': 'BlockDeviceInfo',
807 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
808 '*backing_file': 'str', 'backing_file_depth': 'int',
809 'encrypted': 'bool', 'encryption_key_missing': 'bool',
810 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
811 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
812 'image': 'ImageInfo',
813 '*bps_max': 'int', '*bps_rd_max': 'int',
814 '*bps_wr_max': 'int', '*iops_max': 'int',
815 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
816 '*iops_size': 'int' } }
819 # @BlockDeviceIoStatus:
821 # An enumeration of block device I/O status.
823 # @ok: The last I/O operation has succeeded
825 # @failed: The last I/O operation has failed
827 # @nospace: The last I/O operation has failed due to a no-space condition
831 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
834 # @BlockDeviceMapEntry:
836 # Entry in the metadata map of the device (returned by "qemu-img map")
838 # @start: Offset in the image of the first byte described by this entry
841 # @length: Length of the range described by this entry (in bytes)
843 # @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.)
844 # before reaching one for which the range is allocated. The value is
845 # in the range 0 to the depth of the image chain - 1.
847 # @zero: the sectors in this range read as zeros
849 # @data: reading the image will actually read data from a file (in particular,
850 # if @offset is present this means that the sectors are not simply
851 # preallocated, but contain actual data in raw format)
853 # @offset: if present, the image file stores the data for this range in
854 # raw format at the given offset.
858 { 'type': 'BlockDeviceMapEntry',
859 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
860 'data': 'bool', '*offset': 'int' } }
865 # Block dirty bitmap information.
867 # @count: number of dirty bytes according to the dirty bitmap
869 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
873 { 'type': 'BlockDirtyInfo',
874 'data': {'count': 'int', 'granularity': 'int'} }
879 # Block device information. This structure describes a virtual device and
880 # the backing device associated with it.
882 # @device: The device name associated with the virtual device.
884 # @type: This field is returned only for compatibility reasons, it should
885 # not be used (always returns 'unknown')
887 # @removable: True if the device supports removable media.
889 # @locked: True if the guest has locked this device from having its media
892 # @tray_open: #optional True if the device has a tray and it is open
893 # (only present if removable is true)
895 # @dirty: #optional dirty bitmap information (only present if the dirty
898 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
899 # supports it and the VM is configured to stop on errors
901 # @inserted: #optional @BlockDeviceInfo describing the device if media is
906 { 'type': 'BlockInfo',
907 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
908 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
909 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
910 '*dirty': 'BlockDirtyInfo' } }
915 # Get a list of BlockInfo for all virtual block devices.
917 # Returns: a list of @BlockInfo describing each virtual block device
921 { 'command': 'query-block', 'returns': ['BlockInfo'] }
926 # Statistics of a virtual block device or a block backing device.
928 # @rd_bytes: The number of bytes read by the device.
930 # @wr_bytes: The number of bytes written by the device.
932 # @rd_operations: The number of read operations performed by the device.
934 # @wr_operations: The number of write operations performed by the device.
936 # @flush_operations: The number of cache flush operations performed by the
937 # device (since 0.15.0)
939 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
942 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
944 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
946 # @wr_highest_offset: The offset after the greatest byte written to the
947 # device. The intended use of this information is for
948 # growable sparse files (like qcow2) that are used on top
949 # of a physical device.
953 { 'type': 'BlockDeviceStats',
954 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
955 'wr_operations': 'int', 'flush_operations': 'int',
956 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
957 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
962 # Statistics of a virtual block device or a block backing device.
964 # @device: #optional If the stats are for a virtual block device, the name
965 # corresponding to the virtual block device.
967 # @stats: A @BlockDeviceStats for the device.
969 # @parent: #optional This may point to the backing block device if this is a
970 # a virtual block device. If it's a backing block, this will point
971 # to the backing file is one is present.
975 { 'type': 'BlockStats',
976 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
977 '*parent': 'BlockStats'} }
982 # Query the @BlockStats for all virtual block devices.
984 # Returns: A list of @BlockStats for each virtual block devices.
988 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
993 # Information about a connected VNC client.
995 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
998 # @family: 'ipv6' if the client is connected via IPv6 and TCP
999 # 'ipv4' if the client is connected via IPv4 and TCP
1000 # 'unix' if the client is connected via a unix domain socket
1001 # 'unknown' otherwise
1003 # @service: The service name of the client's port. This may depends on the
1004 # host system's service database so symbolic names should not be
1007 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1008 # Name of the client.
1010 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1011 # used for authentication.
1015 { 'type': 'VncClientInfo',
1016 'data': {'host': 'str', 'family': 'str', 'service': 'str',
1017 '*x509_dname': 'str', '*sasl_username': 'str'} }
1022 # Information about the VNC session.
1024 # @enabled: true if the VNC server is enabled, false otherwise
1026 # @host: #optional The hostname the VNC server is bound to. This depends on
1027 # the name resolution on the host and may be an IP address.
1029 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1030 # 'ipv4' if the host is listening for IPv4 connections
1031 # 'unix' if the host is listening on a unix domain socket
1032 # 'unknown' otherwise
1034 # @service: #optional The service name of the server's port. This may depends
1035 # on the host system's service database so symbolic names should not
1038 # @auth: #optional the current authentication type used by the server
1039 # 'none' if no authentication is being used
1040 # 'vnc' if VNC authentication is being used
1041 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1042 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1043 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1044 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1045 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1046 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1047 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1048 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1049 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1051 # @clients: a list of @VncClientInfo of all currently connected clients
1055 { 'type': 'VncInfo',
1056 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1057 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1062 # Returns information about the current VNC server
1068 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1073 # Information about a SPICE client channel.
1075 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1078 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1079 # 'ipv4' if the client is connected via IPv4 and TCP
1080 # 'unix' if the client is connected via a unix domain socket
1081 # 'unknown' otherwise
1083 # @port: The client's port number.
1085 # @connection-id: SPICE connection id number. All channels with the same id
1086 # belong to the same SPICE session.
1088 # @connection-type: SPICE channel type number. "1" is the main control
1089 # channel, filter for this one if you want to track spice
1092 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1093 # multiple channels of the same type exist, such as multiple
1094 # display channels in a multihead setup
1096 # @tls: true if the channel is encrypted, false otherwise.
1100 { 'type': 'SpiceChannel',
1101 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1102 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1106 # @SpiceQueryMouseMode
1108 # An enumeration of Spice mouse states.
1110 # @client: Mouse cursor position is determined by the client.
1112 # @server: Mouse cursor position is determined by the server.
1114 # @unknown: No information is available about mouse mode used by
1117 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1121 { 'enum': 'SpiceQueryMouseMode',
1122 'data': [ 'client', 'server', 'unknown' ] }
1127 # Information about the SPICE session.
1129 # @enabled: true if the SPICE server is enabled, false otherwise
1131 # @migrated: true if the last guest migration completed and spice
1132 # migration had completed as well. false otherwise.
1134 # @host: #optional The hostname the SPICE server is bound to. This depends on
1135 # the name resolution on the host and may be an IP address.
1137 # @port: #optional The SPICE server's port number.
1139 # @compiled-version: #optional SPICE server version.
1141 # @tls-port: #optional The SPICE server's TLS port number.
1143 # @auth: #optional the current authentication type used by the server
1144 # 'none' if no authentication is being used
1145 # 'spice' uses SASL or direct TLS authentication, depending on command
1148 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1149 # be determined by the client or the server, or unknown if spice
1150 # server doesn't provide this information.
1154 # @channels: a list of @SpiceChannel for each active spice channel
1158 { 'type': 'SpiceInfo',
1159 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1160 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1161 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1166 # Returns information about the current SPICE server
1168 # Returns: @SpiceInfo
1172 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1177 # Information about the guest balloon device.
1179 # @actual: the number of bytes the balloon currently contains
1184 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1189 # Return information about the balloon device.
1191 # Returns: @BalloonInfo on success
1192 # If the balloon driver is enabled but not functional because the KVM
1193 # kernel module cannot support it, KvmMissingCap
1194 # If no balloon device is present, DeviceNotActive
1198 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1203 # A PCI device memory region
1205 # @base: the starting address (guest physical)
1207 # @limit: the ending address (guest physical)
1211 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1216 # Information about a PCI device I/O region.
1218 # @bar: the index of the Base Address Register for this region
1220 # @type: 'io' if the region is a PIO region
1221 # 'memory' if the region is a MMIO region
1223 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1225 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1229 { 'type': 'PciMemoryRegion',
1230 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1231 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1236 # Information about a PCI Bridge device
1238 # @bus.number: primary bus interface number. This should be the number of the
1239 # bus the device resides on.
1241 # @bus.secondary: secondary bus interface number. This is the number of the
1242 # main bus for the bridge
1244 # @bus.subordinate: This is the highest number bus that resides below the
1247 # @bus.io_range: The PIO range for all devices on this bridge
1249 # @bus.memory_range: The MMIO range for all devices on this bridge
1251 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1254 # @devices: a list of @PciDeviceInfo for each device on this bridge
1258 { 'type': 'PciBridgeInfo',
1259 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1260 'io_range': 'PciMemoryRange',
1261 'memory_range': 'PciMemoryRange',
1262 'prefetchable_range': 'PciMemoryRange' },
1263 '*devices': ['PciDeviceInfo']} }
1268 # Information about a PCI device
1270 # @bus: the bus number of the device
1272 # @slot: the slot the device is located in
1274 # @function: the function of the slot used by the device
1276 # @class_info.desc: #optional a string description of the device's class
1278 # @class_info.class: the class code of the device
1280 # @id.device: the PCI device id
1282 # @id.vendor: the PCI vendor id
1284 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1286 # @qdev_id: the device name of the PCI device
1288 # @pci_bridge: if the device is a PCI bridge, the bridge information
1290 # @regions: a list of the PCI I/O regions associated with the device
1292 # Notes: the contents of @class_info.desc are not stable and should only be
1293 # treated as informational.
1297 { 'type': 'PciDeviceInfo',
1298 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1299 'class_info': {'*desc': 'str', 'class': 'int'},
1300 'id': {'device': 'int', 'vendor': 'int'},
1301 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1302 'regions': ['PciMemoryRegion']} }
1307 # Information about a PCI bus
1309 # @bus: the bus index
1311 # @devices: a list of devices on this bus
1315 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1320 # Return information about the PCI bus topology of the guest.
1322 # Returns: a list of @PciInfo for each PCI bus
1326 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1331 # An enumeration of possible behaviors for errors on I/O operations.
1332 # The exact meaning depends on whether the I/O was initiated by a guest
1335 # @report: for guest operations, report the error to the guest;
1336 # for jobs, cancel the job
1338 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1339 # or BLOCK_JOB_ERROR)
1341 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1343 # @stop: for guest operations, stop the virtual machine;
1344 # for jobs, pause the job
1348 { 'enum': 'BlockdevOnError',
1349 'data': ['report', 'ignore', 'enospc', 'stop'] }
1354 # An enumeration of possible behaviors for the initial synchronization
1355 # phase of storage mirroring.
1357 # @top: copies data in the topmost image to the destination
1359 # @full: copies data from all images to the destination
1361 # @none: only copy data written from now on
1365 { 'enum': 'MirrorSyncMode',
1366 'data': ['top', 'full', 'none'] }
1371 # Information about a long-running block device operation.
1373 # @type: the job type ('stream' for image streaming)
1375 # @device: the block device name
1377 # @len: the maximum progress value
1379 # @busy: false if the job is known to be in a quiescent state, with
1380 # no pending I/O. Since 1.3.
1382 # @paused: whether the job is paused or, if @busy is true, will
1383 # pause itself as soon as possible. Since 1.3.
1385 # @offset: the current progress value
1387 # @speed: the rate limit, bytes per second
1389 # @io-status: the status of the job (since 1.3)
1393 { 'type': 'BlockJobInfo',
1394 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1395 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1396 'io-status': 'BlockDeviceIoStatus'} }
1399 # @query-block-jobs:
1401 # Return information about long-running block device operations.
1403 # Returns: a list of @BlockJobInfo for each active block job
1407 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1412 # This command will cause the QEMU process to exit gracefully. While every
1413 # attempt is made to send the QMP response before terminating, this is not
1414 # guaranteed. When using this interface, a premature EOF would not be
1419 { 'command': 'quit' }
1424 # Stop all guest VCPU execution.
1428 # Notes: This function will succeed even if the guest is already in the stopped
1429 # state. In "inmigrate" state, it will ensure that the guest
1430 # remains paused once migration finishes, as if the -S option was
1431 # passed on the command line.
1433 { 'command': 'stop' }
1438 # Performs a hard reset of a guest.
1442 { 'command': 'system_reset' }
1445 # @system_powerdown:
1447 # Requests that a guest perform a powerdown operation.
1451 # Notes: A guest may or may not respond to this command. This command
1452 # returning does not indicate that a guest has accepted the request or
1453 # that it has shut down. Many guests will respond to this command by
1454 # prompting the user in some way.
1456 { 'command': 'system_powerdown' }
1461 # This command is a nop that is only provided for the purposes of compatibility.
1465 # Notes: Do not use this command.
1467 { 'command': 'cpu', 'data': {'index': 'int'} }
1472 # Adds CPU with specified ID
1474 # @id: ID of CPU to be created, valid values [0..max_cpus)
1476 # Returns: Nothing on success
1480 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1485 # Save a portion of guest memory to a file.
1487 # @val: the virtual address of the guest to start from
1489 # @size: the size of memory region to save
1491 # @filename: the file to save the memory to as binary data
1493 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1494 # virtual address (defaults to CPU 0)
1496 # Returns: Nothing on success
1500 # Notes: Errors were not reliably returned until 1.1
1502 { 'command': 'memsave',
1503 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1508 # Save a portion of guest physical memory to a file.
1510 # @val: the physical address of the guest to start from
1512 # @size: the size of memory region to save
1514 # @filename: the file to save the memory to as binary data
1516 # Returns: Nothing on success
1520 # Notes: Errors were not reliably returned until 1.1
1522 { 'command': 'pmemsave',
1523 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1528 # Resume guest VCPU execution.
1532 # Returns: If successful, nothing
1533 # If QEMU was started with an encrypted block device and a key has
1534 # not yet been set, DeviceEncrypted.
1536 # Notes: This command will succeed if the guest is currently running. It
1537 # will also succeed if the guest is in the "inmigrate" state; in
1538 # this case, the effect of the command is to make sure the guest
1539 # starts once migration finishes, removing the effect of the -S
1540 # command line option if it was passed.
1542 { 'command': 'cont' }
1547 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1553 { 'command': 'system_wakeup' }
1558 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1560 # Returns: If successful, nothing
1564 # Notes: Only x86 Virtual Machines support this command.
1566 { 'command': 'inject-nmi' }
1571 # Sets the link status of a virtual network adapter.
1573 # @name: the device name of the virtual network adapter
1575 # @up: true to set the link status to be up
1577 # Returns: Nothing on success
1578 # If @name is not a valid network device, DeviceNotFound
1582 # Notes: Not all network adapters support setting link status. This command
1583 # will succeed even if the network adapter does not support link status
1586 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1591 # This command sets the password of a block device that has not been open
1592 # with a password and requires one.
1594 # The two cases where this can happen are a block device is created through
1595 # QEMU's initial command line or a block device is changed through the legacy
1596 # @change interface.
1598 # In the event that the block device is created through the initial command
1599 # line, the VM will start in the stopped state regardless of whether '-S' is
1600 # used. The intention is for a management tool to query the block devices to
1601 # determine which ones are encrypted, set the passwords with this command, and
1602 # then start the guest with the @cont command.
1604 # @device: the name of the device to set the password on
1606 # @password: the password to use for the device
1608 # Returns: nothing on success
1609 # If @device is not a valid block device, DeviceNotFound
1610 # If @device is not encrypted, DeviceNotEncrypted
1612 # Notes: Not all block formats support encryption and some that do are not
1613 # able to validate that a password is correct. Disk corruption may
1614 # occur if an invalid password is specified.
1618 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1623 # Request the balloon driver to change its balloon size.
1625 # @value: the target size of the balloon in bytes
1627 # Returns: Nothing on success
1628 # If the balloon driver is enabled but not functional because the KVM
1629 # kernel module cannot support it, KvmMissingCap
1630 # If no balloon device is present, DeviceNotActive
1632 # Notes: This command just issues a request to the guest. When it returns,
1633 # the balloon size may not have changed. A guest can change the balloon
1634 # size independent of this command.
1638 { 'command': 'balloon', 'data': {'value': 'int'} }
1643 # Resize a block image while a guest is running.
1645 # @device: the name of the device to get the image resized
1647 # @size: new image size in bytes
1649 # Returns: nothing on success
1650 # If @device is not a valid block device, DeviceNotFound
1654 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1659 # An enumeration that tells QEMU how to set the backing file path in
1662 # @existing: QEMU should look for an existing image file.
1664 # @absolute-paths: QEMU should create a new image with absolute paths
1665 # for the backing file.
1669 { 'enum': 'NewImageMode',
1670 'data': [ 'existing', 'absolute-paths' ] }
1675 # @device: the name of the device to generate the snapshot from.
1677 # @snapshot-file: the target of the new image. A new file will be created.
1679 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1681 # @mode: #optional whether and how QEMU should create a new image, default is
1684 { 'type': 'BlockdevSnapshot',
1685 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1686 '*mode': 'NewImageMode' } }
1691 # @device: the name of the device which should be copied.
1693 # @target: the target of the new image. If the file exists, or if it
1694 # is a device, the existing file/device will be used as the new
1695 # destination. If it does not exist, a new file will be created.
1697 # @format: #optional the format of the new destination, default is to
1698 # probe if @mode is 'existing', else the format of the source
1700 # @sync: what parts of the disk image should be copied to the destination
1701 # (all the disk, only the sectors allocated in the topmost image, or
1704 # @mode: #optional whether and how QEMU should create a new image, default is
1707 # @speed: #optional the maximum speed, in bytes per second
1709 # @on-source-error: #optional the action to take on an error on the source,
1710 # default 'report'. 'stop' and 'enospc' can only be used
1711 # if the block device supports io-status (see BlockInfo).
1713 # @on-target-error: #optional the action to take on an error on the target,
1714 # default 'report' (no limitations, since this applies to
1715 # a different block device than @device).
1717 # Note that @on-source-error and @on-target-error only affect background I/O.
1718 # If an error occurs during a guest write request, the device's rerror/werror
1719 # actions will be used.
1723 { 'type': 'DriveBackup',
1724 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1725 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1727 '*on-source-error': 'BlockdevOnError',
1728 '*on-target-error': 'BlockdevOnError' } }
1733 # This action can be used to test transaction failure.
1741 # @TransactionAction
1743 # A discriminated record of operations that can be performed with
1746 { 'union': 'TransactionAction',
1748 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1749 'drive-backup': 'DriveBackup',
1756 # Executes a number of transactionable QMP commands atomically. If any
1757 # operation fails, then the entire set of actions will be abandoned and the
1758 # appropriate error returned.
1761 # @TransactionAction: information needed for the respective operation
1763 # Returns: nothing on success
1764 # Errors depend on the operations of the transaction
1766 # Note: The transaction aborts on the first failure. Therefore, there will be
1767 # information on only one failed operation returned in an error condition, and
1768 # subsequent actions will not have been attempted.
1772 { 'command': 'transaction',
1773 'data': { 'actions': [ 'TransactionAction' ] } }
1776 # @blockdev-snapshot-sync
1778 # Generates a synchronous snapshot of a block device.
1780 # For the arguments, see the documentation of BlockdevSnapshot.
1782 # Returns: nothing on success
1783 # If @device is not a valid block device, DeviceNotFound
1787 { 'command': 'blockdev-snapshot-sync',
1788 'data': 'BlockdevSnapshot' }
1791 # @human-monitor-command:
1793 # Execute a command on the human monitor and return the output.
1795 # @command-line: the command to execute in the human monitor
1797 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1799 # Returns: the output of the command as a string
1803 # Notes: This command only exists as a stop-gap. It's use is highly
1804 # discouraged. The semantics of this command are not guaranteed.
1806 # Known limitations:
1808 # o This command is stateless, this means that commands that depend
1809 # on state information (such as getfd) might not work
1811 # o Commands that prompt the user for data (eg. 'cont' when the block
1812 # device is encrypted) don't currently work
1814 { 'command': 'human-monitor-command',
1815 'data': {'command-line': 'str', '*cpu-index': 'int'},
1821 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1822 # writes data between 'top' and 'base' into 'base'.
1824 # @device: the name of the device
1826 # @base: #optional The file name of the backing image to write data into.
1827 # If not specified, this is the deepest backing image
1829 # @top: The file name of the backing image within the image chain,
1830 # which contains the topmost data to be committed down.
1831 # Note, the active layer as 'top' is currently unsupported.
1833 # If top == base, that is an error.
1836 # @speed: #optional the maximum speed, in bytes per second
1838 # Returns: Nothing on success
1839 # If commit or stream is already active on this device, DeviceInUse
1840 # If @device does not exist, DeviceNotFound
1841 # If image commit is not supported by this device, NotSupported
1842 # If @base or @top is invalid, a generic error is returned
1843 # If @top is the active layer, or omitted, a generic error is returned
1844 # If @speed is invalid, InvalidParameter
1849 { 'command': 'block-commit',
1850 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1856 # Start a point-in-time copy of a block device to a new destination. The
1857 # status of ongoing drive-backup operations can be checked with
1858 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
1859 # The operation can be stopped before it has completed using the
1860 # block-job-cancel command.
1862 # For the arguments, see the documentation of DriveBackup.
1864 # Returns: nothing on success
1865 # If @device is not a valid block device, DeviceNotFound
1869 { 'command': 'drive-backup', 'data': 'DriveBackup' }
1874 # Start mirroring a block device's writes to a new destination.
1876 # @device: the name of the device whose writes should be mirrored.
1878 # @target: the target of the new image. If the file exists, or if it
1879 # is a device, the existing file/device will be used as the new
1880 # destination. If it does not exist, a new file will be created.
1882 # @format: #optional the format of the new destination, default is to
1883 # probe if @mode is 'existing', else the format of the source
1885 # @mode: #optional whether and how QEMU should create a new image, default is
1888 # @speed: #optional the maximum speed, in bytes per second
1890 # @sync: what parts of the disk image should be copied to the destination
1891 # (all the disk, only the sectors allocated in the topmost image, or
1894 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1895 # if the image format doesn't have clusters, 4K if the clusters
1896 # are smaller than that, else the cluster size. Must be a
1897 # power of 2 between 512 and 64M (since 1.4).
1899 # @buf-size: #optional maximum amount of data in flight from source to
1900 # target (since 1.4).
1902 # @on-source-error: #optional the action to take on an error on the source,
1903 # default 'report'. 'stop' and 'enospc' can only be used
1904 # if the block device supports io-status (see BlockInfo).
1906 # @on-target-error: #optional the action to take on an error on the target,
1907 # default 'report' (no limitations, since this applies to
1908 # a different block device than @device).
1910 # Returns: nothing on success
1911 # If @device is not a valid block device, DeviceNotFound
1915 { 'command': 'drive-mirror',
1916 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1917 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1918 '*speed': 'int', '*granularity': 'uint32',
1919 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1920 '*on-target-error': 'BlockdevOnError' } }
1925 # Cancel the current executing migration process.
1927 # Returns: nothing on success
1929 # Notes: This command succeeds even if there is no migration process running.
1933 { 'command': 'migrate_cancel' }
1936 # @migrate_set_downtime
1938 # Set maximum tolerated downtime for migration.
1940 # @value: maximum downtime in seconds
1942 # Returns: nothing on success
1946 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1949 # @migrate_set_speed
1951 # Set maximum speed for migration.
1953 # @value: maximum speed in bytes.
1955 # Returns: nothing on success
1957 # Notes: A value lesser than zero will be automatically round up to zero.
1961 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1964 # @migrate-set-cache-size
1966 # Set XBZRLE cache size
1968 # @value: cache size in bytes
1970 # The size will be rounded down to the nearest power of 2.
1971 # The cache size can be modified before and during ongoing migration
1973 # Returns: nothing on success
1977 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1980 # @query-migrate-cache-size
1982 # query XBZRLE cache size
1984 # Returns: XBZRLE cache size in bytes
1988 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1991 # @ObjectPropertyInfo:
1993 # @name: the name of the property
1995 # @type: the type of the property. This will typically come in one of four
1998 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1999 # These types are mapped to the appropriate JSON type.
2001 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
2002 # legacy qdev typename. These types are always treated as strings.
2004 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
2005 # device type name. Child properties create the composition tree.
2007 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
2008 # device type name. Link properties form the device model graph.
2012 { 'type': 'ObjectPropertyInfo',
2013 'data': { 'name': 'str', 'type': 'str' } }
2018 # This command will list any properties of a object given a path in the object
2021 # @path: the path within the object model. See @qom-get for a description of
2024 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2029 { 'command': 'qom-list',
2030 'data': { 'path': 'str' },
2031 'returns': [ 'ObjectPropertyInfo' ] }
2036 # This command will get a property from a object model path and return the
2039 # @path: The path within the object model. There are two forms of supported
2040 # paths--absolute and partial paths.
2042 # Absolute paths are derived from the root object and can follow child<>
2043 # or link<> properties. Since they can follow link<> properties, they
2044 # can be arbitrarily long. Absolute paths look like absolute filenames
2045 # and are prefixed with a leading slash.
2047 # Partial paths look like relative filenames. They do not begin
2048 # with a prefix. The matching rules for partial paths are subtle but
2049 # designed to make specifying objects easy. At each level of the
2050 # composition tree, the partial path is matched as an absolute path.
2051 # The first match is not returned. At least two matches are searched
2052 # for. A successful result is only returned if only one match is
2053 # found. If more than one match is found, a flag is return to
2054 # indicate that the match was ambiguous.
2056 # @property: The property name to read
2058 # Returns: The property value. The type depends on the property type. legacy<>
2059 # properties are returned as #str. child<> and link<> properties are
2060 # returns as #str pathnames. All integer property types (u8, u16, etc)
2061 # are returned as #int.
2065 { 'command': 'qom-get',
2066 'data': { 'path': 'str', 'property': 'str' },
2067 'returns': 'visitor',
2073 # This command will set a property from a object model path.
2075 # @path: see @qom-get for a description of this parameter
2077 # @property: the property name to set
2079 # @value: a value who's type is appropriate for the property type. See @qom-get
2080 # for a description of type mapping.
2084 { 'command': 'qom-set',
2085 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2091 # Sets the password of a remote display session.
2093 # @protocol: `vnc' to modify the VNC server password
2094 # `spice' to modify the Spice server password
2096 # @password: the new password
2098 # @connected: #optional how to handle existing clients when changing the
2099 # password. If nothing is specified, defaults to `keep'
2100 # `fail' to fail the command if clients are connected
2101 # `disconnect' to disconnect existing clients
2102 # `keep' to maintain existing clients
2104 # Returns: Nothing on success
2105 # If Spice is not enabled, DeviceNotFound
2109 { 'command': 'set_password',
2110 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2115 # Expire the password of a remote display server.
2117 # @protocol: the name of the remote display protocol `vnc' or `spice'
2119 # @time: when to expire the password.
2120 # `now' to expire the password immediately
2121 # `never' to cancel password expiration
2122 # `+INT' where INT is the number of seconds from now (integer)
2123 # `INT' where INT is the absolute time in seconds
2125 # Returns: Nothing on success
2126 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2130 # Notes: Time is relative to the server and currently there is no way to
2131 # coordinate server time with client time. It is not recommended to
2132 # use the absolute time version of the @time parameter unless you're
2133 # sure you are on the same machine as the QEMU instance.
2135 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2140 # Ejects a device from a removable drive.
2142 # @device: The name of the device
2144 # @force: @optional If true, eject regardless of whether the drive is locked.
2145 # If not specified, the default value is false.
2147 # Returns: Nothing on success
2148 # If @device is not a valid block device, DeviceNotFound
2150 # Notes: Ejecting a device will no media results in success
2154 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2157 # @change-vnc-password:
2159 # Change the VNC server password.
2161 # @target: the new password to use with VNC authentication
2165 # Notes: An empty password in this command will set the password to the empty
2166 # string. Existing clients are unaffected by executing this command.
2168 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2173 # This command is multiple commands multiplexed together.
2175 # @device: This is normally the name of a block device but it may also be 'vnc'.
2176 # when it's 'vnc', then sub command depends on @target
2178 # @target: If @device is a block device, then this is the new filename.
2179 # If @device is 'vnc', then if the value 'password' selects the vnc
2180 # change password command. Otherwise, this specifies a new server URI
2181 # address to listen to for VNC connections.
2183 # @arg: If @device is a block device, then this is an optional format to open
2185 # If @device is 'vnc' and @target is 'password', this is the new VNC
2186 # password to set. If this argument is an empty string, then no future
2187 # logins will be allowed.
2189 # Returns: Nothing on success.
2190 # If @device is not a valid block device, DeviceNotFound
2191 # If the new block device is encrypted, DeviceEncrypted. Note that
2192 # if this error is returned, the device has been opened successfully
2193 # and an additional call to @block_passwd is required to set the
2194 # device's password. The behavior of reads and writes to the block
2195 # device between when these calls are executed is undefined.
2197 # Notes: It is strongly recommended that this interface is not used especially
2198 # for changing block devices.
2202 { 'command': 'change',
2203 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2206 # @block_set_io_throttle:
2208 # Change I/O throttle limits for a block drive.
2210 # @device: The name of the device
2212 # @bps: total throughput limit in bytes per second
2214 # @bps_rd: read throughput limit in bytes per second
2216 # @bps_wr: write throughput limit in bytes per second
2218 # @iops: total I/O operations per second
2220 # @ops_rd: read I/O operations per second
2222 # @iops_wr: write I/O operations per second
2224 # @bps_max: #optional total max in bytes (Since 1.7)
2226 # @bps_rd_max: #optional read max in bytes (Since 1.7)
2228 # @bps_wr_max: #optional write max in bytes (Since 1.7)
2230 # @iops_max: #optional total I/O operations max (Since 1.7)
2232 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
2234 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
2236 # @iops_size: #optional an I/O size in bytes (Since 1.7)
2238 # Returns: Nothing on success
2239 # If @device is not a valid block device, DeviceNotFound
2243 { 'command': 'block_set_io_throttle',
2244 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2245 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
2246 '*bps_max': 'int', '*bps_rd_max': 'int',
2247 '*bps_wr_max': 'int', '*iops_max': 'int',
2248 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
2249 '*iops_size': 'int' } }
2254 # Copy data from a backing file into a block device.
2256 # The block streaming operation is performed in the background until the entire
2257 # backing file has been copied. This command returns immediately once streaming
2258 # has started. The status of ongoing block streaming operations can be checked
2259 # with query-block-jobs. The operation can be stopped before it has completed
2260 # using the block-job-cancel command.
2262 # If a base file is specified then sectors are not copied from that base file and
2263 # its backing chain. When streaming completes the image file will have the base
2264 # file as its backing file. This can be used to stream a subset of the backing
2265 # file chain instead of flattening the entire image.
2267 # On successful completion the image file is updated to drop the backing file
2268 # and the BLOCK_JOB_COMPLETED event is emitted.
2270 # @device: the device name
2272 # @base: #optional the common backing file name
2274 # @speed: #optional the maximum speed, in bytes per second
2276 # @on-error: #optional the action to take on an error (default report).
2277 # 'stop' and 'enospc' can only be used if the block device
2278 # supports io-status (see BlockInfo). Since 1.3.
2280 # Returns: Nothing on success
2281 # If @device does not exist, DeviceNotFound
2285 { 'command': 'block-stream',
2286 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2287 '*on-error': 'BlockdevOnError' } }
2290 # @block-job-set-speed:
2292 # Set maximum speed for a background block operation.
2294 # This command can only be issued when there is an active block job.
2296 # Throttling can be disabled by setting the speed to 0.
2298 # @device: the device name
2300 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2303 # Returns: Nothing on success
2304 # If no background operation is active on this device, DeviceNotActive
2308 { 'command': 'block-job-set-speed',
2309 'data': { 'device': 'str', 'speed': 'int' } }
2312 # @block-job-cancel:
2314 # Stop an active background block operation.
2316 # This command returns immediately after marking the active background block
2317 # operation for cancellation. It is an error to call this command if no
2318 # operation is in progress.
2320 # The operation will cancel as soon as possible and then emit the
2321 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2322 # enumerated using query-block-jobs.
2324 # For streaming, the image file retains its backing file unless the streaming
2325 # operation happens to complete just as it is being cancelled. A new streaming
2326 # operation can be started at a later time to finish copying all data from the
2329 # @device: the device name
2331 # @force: #optional whether to allow cancellation of a paused job (default
2332 # false). Since 1.3.
2334 # Returns: Nothing on success
2335 # If no background operation is active on this device, DeviceNotActive
2339 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2344 # Pause an active background block operation.
2346 # This command returns immediately after marking the active background block
2347 # operation for pausing. It is an error to call this command if no
2348 # operation is in progress. Pausing an already paused job has no cumulative
2349 # effect; a single block-job-resume command will resume the job.
2351 # The operation will pause as soon as possible. No event is emitted when
2352 # the operation is actually paused. Cancelling a paused job automatically
2355 # @device: the device name
2357 # Returns: Nothing on success
2358 # If no background operation is active on this device, DeviceNotActive
2362 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2365 # @block-job-resume:
2367 # Resume an active background block operation.
2369 # This command returns immediately after resuming a paused background block
2370 # operation. It is an error to call this command if no operation is in
2371 # progress. Resuming an already running job is not an error.
2373 # This command also clears the error status of the job.
2375 # @device: the device name
2377 # Returns: Nothing on success
2378 # If no background operation is active on this device, DeviceNotActive
2382 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2385 # @block-job-complete:
2387 # Manually trigger completion of an active background block operation. This
2388 # is supported for drive mirroring, where it also switches the device to
2389 # write to the target path only. The ability to complete is signaled with
2390 # a BLOCK_JOB_READY event.
2392 # This command completes an active background block operation synchronously.
2393 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2394 # is not defined. Note that if an I/O error occurs during the processing of
2395 # this command: 1) the command itself will fail; 2) the error will be processed
2396 # according to the rerror/werror arguments that were specified when starting
2399 # A cancelled or paused job cannot be completed.
2401 # @device: the device name
2403 # Returns: Nothing on success
2404 # If no background operation is active on this device, DeviceNotActive
2408 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2413 # This structure describes a search result from @qom-list-types
2415 # @name: the type name found in the search
2419 # Notes: This command is experimental and may change syntax in future releases.
2421 { 'type': 'ObjectTypeInfo',
2422 'data': { 'name': 'str' } }
2427 # This command will return a list of types given search parameters
2429 # @implements: if specified, only return types that implement this type name
2431 # @abstract: if true, include abstract types in the results
2433 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2437 { 'command': 'qom-list-types',
2438 'data': { '*implements': 'str', '*abstract': 'bool' },
2439 'returns': [ 'ObjectTypeInfo' ] }
2442 # @DevicePropertyInfo:
2444 # Information about device properties.
2446 # @name: the name of the property
2447 # @type: the typename of the property
2451 { 'type': 'DevicePropertyInfo',
2452 'data': { 'name': 'str', 'type': 'str' } }
2455 # @device-list-properties:
2457 # List properties associated with a device.
2459 # @typename: the type name of a device
2461 # Returns: a list of DevicePropertyInfo describing a devices properties
2465 { 'command': 'device-list-properties',
2466 'data': { 'typename': 'str'},
2467 'returns': [ 'DevicePropertyInfo' ] }
2472 # Migrates the current running guest to another Virtual Machine.
2474 # @uri: the Uniform Resource Identifier of the destination VM
2476 # @blk: #optional do block migration (full disk copy)
2478 # @inc: #optional incremental disk copy migration
2480 # @detach: this argument exists only for compatibility reasons and
2481 # is ignored by QEMU
2483 # Returns: nothing on success
2487 { 'command': 'migrate',
2488 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2490 # @xen-save-devices-state:
2492 # Save the state of all devices to file. The RAM and the block devices
2493 # of the VM are not saved by this command.
2495 # @filename: the file to save the state of the devices to as binary
2496 # data. See xen-save-devices-state.txt for a description of the binary
2499 # Returns: Nothing on success
2503 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2506 # @xen-set-global-dirty-log
2508 # Enable or disable the global dirty log mode.
2510 # @enable: true to enable, false to disable.
2516 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2521 # Remove a device from a guest
2523 # @id: the name of the device
2525 # Returns: Nothing on success
2526 # If @id is not a valid device, DeviceNotFound
2528 # Notes: When this command completes, the device may not be removed from the
2529 # guest. Hot removal is an operation that requires guest cooperation.
2530 # This command merely requests that the guest begin the hot removal
2531 # process. Completion of the device removal process is signaled with a
2532 # DEVICE_DELETED event. Guest reset will automatically complete removal
2537 { 'command': 'device_del', 'data': {'id': 'str'} }
2540 # @dump-guest-memory
2542 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2543 # very long depending on the amount of guest memory. This command is only
2544 # supported on i386 and x86_64.
2546 # @paging: if true, do paging to get guest's memory mapping. This allows
2547 # using gdb to process the core file.
2549 # IMPORTANT: this option can make QEMU allocate several gigabytes
2550 # of RAM. This can happen for a large guest, or a
2551 # malicious guest pretending to be large.
2553 # Also, paging=true has the following limitations:
2555 # 1. The guest may be in a catastrophic state or can have corrupted
2556 # memory, which cannot be trusted
2557 # 2. The guest can be in real-mode even if paging is enabled. For
2558 # example, the guest uses ACPI to sleep, and ACPI sleep state
2561 # @protocol: the filename or file descriptor of the vmcore. The supported
2564 # 1. file: the protocol starts with "file:", and the following
2565 # string is the file's path.
2566 # 2. fd: the protocol starts with "fd:", and the following string
2569 # @begin: #optional if specified, the starting physical address.
2571 # @length: #optional if specified, the memory size, in bytes. If you don't
2572 # want to dump all guest's memory, please specify the start @begin
2575 # Returns: nothing on success
2579 { 'command': 'dump-guest-memory',
2580 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2581 '*length': 'int' } }
2586 # Add a network backend.
2588 # @type: the type of network backend. Current valid values are 'user', 'tap',
2589 # 'vde', 'socket', 'dump' and 'bridge'
2591 # @id: the name of the new network backend
2593 # @props: #optional a list of properties to be passed to the backend in
2594 # the format 'name=value', like 'ifname=tap0,script=no'
2596 # Notes: The semantics of @props is not well defined. Future commands will be
2597 # introduced that provide stronger typing for backend creation.
2601 # Returns: Nothing on success
2602 # If @type is not a valid network backend, DeviceNotFound
2604 { 'command': 'netdev_add',
2605 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2611 # Remove a network backend.
2613 # @id: the name of the network backend to remove
2615 # Returns: Nothing on success
2616 # If @id is not a valid network backend, DeviceNotFound
2620 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2623 # @NetdevNoneOptions
2625 # Use it alone to have zero network devices.
2629 { 'type': 'NetdevNoneOptions',
2633 # @NetLegacyNicOptions
2635 # Create a new Network Interface Card.
2637 # @netdev: #optional id of -netdev to connect to
2639 # @macaddr: #optional MAC address
2641 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2643 # @addr: #optional PCI device address
2645 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2649 { 'type': 'NetLegacyNicOptions',
2655 '*vectors': 'uint32' } }
2660 # A fat type wrapping 'str', to be embedded in lists.
2669 # @NetdevUserOptions
2671 # Use the user mode network stack which requires no administrator privilege to
2674 # @hostname: #optional client hostname reported by the builtin DHCP server
2676 # @restrict: #optional isolate the guest from the host
2678 # @ip: #optional legacy parameter, use net= instead
2680 # @net: #optional IP address and optional netmask
2682 # @host: #optional guest-visible address of the host
2684 # @tftp: #optional root directory of the built-in TFTP server
2686 # @bootfile: #optional BOOTP filename, for use with tftp=
2688 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2691 # @dns: #optional guest-visible address of the virtual nameserver
2693 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2696 # @smb: #optional root directory of the built-in SMB server
2698 # @smbserver: #optional IP address of the built-in SMB server
2700 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2703 # @guestfwd: #optional forward guest TCP connections
2707 { 'type': 'NetdevUserOptions',
2710 '*restrict': 'bool',
2716 '*dhcpstart': 'str',
2718 '*dnssearch': ['String'],
2720 '*smbserver': 'str',
2721 '*hostfwd': ['String'],
2722 '*guestfwd': ['String'] } }
2727 # Connect the host TAP network interface name to the VLAN.
2729 # @ifname: #optional interface name
2731 # @fd: #optional file descriptor of an already opened tap
2733 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2736 # @script: #optional script to initialize the interface
2738 # @downscript: #optional script to shut down the interface
2740 # @helper: #optional command to execute to configure bridge
2742 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2744 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2746 # @vhost: #optional enable vhost-net network accelerator
2748 # @vhostfd: #optional file descriptor of an already opened vhost net device
2750 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2753 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2755 # @queues: #optional number of queues to be created for multiqueue capable tap
2759 { 'type': 'NetdevTapOptions',
2765 '*downscript': 'str',
2768 '*vnet_hdr': 'bool',
2772 '*vhostforce': 'bool',
2773 '*queues': 'uint32'} }
2776 # @NetdevSocketOptions
2778 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2779 # socket connection.
2781 # @fd: #optional file descriptor of an already opened socket
2783 # @listen: #optional port number, and optional hostname, to listen on
2785 # @connect: #optional port number, and optional hostname, to connect to
2787 # @mcast: #optional UDP multicast address and port number
2789 # @localaddr: #optional source address and port for multicast and udp packets
2791 # @udp: #optional UDP unicast address and port number
2795 { 'type': 'NetdevSocketOptions',
2801 '*localaddr': 'str',
2807 # Connect the VLAN to a vde switch running on the host.
2809 # @sock: #optional socket path
2811 # @port: #optional port number
2813 # @group: #optional group owner of socket
2815 # @mode: #optional permissions for socket
2819 { 'type': 'NetdevVdeOptions',
2824 '*mode': 'uint16' } }
2827 # @NetdevDumpOptions
2829 # Dump VLAN network traffic to a file.
2831 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2834 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2838 { 'type': 'NetdevDumpOptions',
2844 # @NetdevBridgeOptions
2846 # Connect a host TAP network interface to a host bridge device.
2848 # @br: #optional bridge name
2850 # @helper: #optional command to execute to configure bridge
2854 { 'type': 'NetdevBridgeOptions',
2857 '*helper': 'str' } }
2860 # @NetdevHubPortOptions
2862 # Connect two or more net clients through a software hub.
2864 # @hubid: hub identifier number
2868 { 'type': 'NetdevHubPortOptions',
2870 'hubid': 'int32' } }
2875 # A discriminated record of network device traits.
2879 { 'union': 'NetClientOptions',
2881 'none': 'NetdevNoneOptions',
2882 'nic': 'NetLegacyNicOptions',
2883 'user': 'NetdevUserOptions',
2884 'tap': 'NetdevTapOptions',
2885 'socket': 'NetdevSocketOptions',
2886 'vde': 'NetdevVdeOptions',
2887 'dump': 'NetdevDumpOptions',
2888 'bridge': 'NetdevBridgeOptions',
2889 'hubport': 'NetdevHubPortOptions' } }
2894 # Captures the configuration of a network device; legacy.
2896 # @vlan: #optional vlan number
2898 # @id: #optional identifier for monitor commands
2900 # @name: #optional identifier for monitor commands, ignored if @id is present
2902 # @opts: device type specific properties (legacy)
2906 { 'type': 'NetLegacy',
2911 'opts': 'NetClientOptions' } }
2916 # Captures the configuration of a network device.
2918 # @id: identifier for monitor commands.
2920 # @opts: device type specific properties
2927 'opts': 'NetClientOptions' } }
2930 # @InetSocketAddress
2932 # Captures a socket address or address range in the Internet namespace.
2934 # @host: host part of the address
2936 # @port: port part of the address, or lowest port if @to is present
2938 # @to: highest port to try
2940 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2943 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2948 { 'type': 'InetSocketAddress',
2957 # @UnixSocketAddress
2959 # Captures a socket address in the local ("Unix socket") namespace.
2961 # @path: filesystem path to use
2965 { 'type': 'UnixSocketAddress',
2972 # Captures the address of a socket, which could also be a named file descriptor
2976 { 'union': 'SocketAddress',
2978 'inet': 'InetSocketAddress',
2979 'unix': 'UnixSocketAddress',
2985 # Receive a file descriptor via SCM rights and assign it a name
2987 # @fdname: file descriptor name
2989 # Returns: Nothing on success
2993 # Notes: If @fdname already exists, the file descriptor assigned to
2994 # it will be closed and replaced by the received file
2996 # The 'closefd' command can be used to explicitly close the
2997 # file descriptor when it is no longer needed.
2999 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3004 # Close a file descriptor previously passed via SCM rights
3006 # @fdname: file descriptor name
3008 # Returns: Nothing on success
3012 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3017 # Information describing a machine.
3019 # @name: the name of the machine
3021 # @alias: #optional an alias for the machine name
3023 # @default: #optional whether the machine is default
3025 # @cpu-max: maximum number of CPUs supported by the machine type
3030 { 'type': 'MachineInfo',
3031 'data': { 'name': 'str', '*alias': 'str',
3032 '*is-default': 'bool', 'cpu-max': 'int' } }
3037 # Return a list of supported machines
3039 # Returns: a list of MachineInfo
3043 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3046 # @CpuDefinitionInfo:
3048 # Virtual CPU definition.
3050 # @name: the name of the CPU definition
3054 { 'type': 'CpuDefinitionInfo',
3055 'data': { 'name': 'str' } }
3058 # @query-cpu-definitions:
3060 # Return a list of supported virtual CPU definitions
3062 # Returns: a list of CpuDefInfo
3066 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3070 # Information about a file descriptor that was added to an fd set.
3072 # @fdset-id: The ID of the fd set that @fd was added to.
3074 # @fd: The file descriptor that was received via SCM rights and
3075 # added to the fd set.
3079 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3084 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3086 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3088 # @opaque: #optional A free-form string that can be used to describe the fd.
3090 # Returns: @AddfdInfo on success
3091 # If file descriptor was not received, FdNotSupplied
3092 # If @fdset-id is a negative value, InvalidParameterValue
3094 # Notes: The list of fd sets is shared by all monitor connections.
3096 # If @fdset-id is not specified, a new fd set will be created.
3100 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3101 'returns': 'AddfdInfo' }
3106 # Remove a file descriptor from an fd set.
3108 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3110 # @fd: #optional The file descriptor that is to be removed.
3112 # Returns: Nothing on success
3113 # If @fdset-id or @fd is not found, FdNotFound
3117 # Notes: The list of fd sets is shared by all monitor connections.
3119 # If @fd is not specified, all file descriptors in @fdset-id
3122 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3127 # Information about a file descriptor that belongs to an fd set.
3129 # @fd: The file descriptor value.
3131 # @opaque: #optional A free-form string that can be used to describe the fd.
3135 { 'type': 'FdsetFdInfo',
3136 'data': {'fd': 'int', '*opaque': 'str'} }
3141 # Information about an fd set.
3143 # @fdset-id: The ID of the fd set.
3145 # @fds: A list of file descriptors that belong to this fd set.
3149 { 'type': 'FdsetInfo',
3150 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3155 # Return information describing all fd sets.
3157 # Returns: A list of @FdsetInfo
3161 # Note: The list of fd sets is shared by all monitor connections.
3164 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3169 # Information describing the QEMU target.
3171 # @arch: the target architecture (eg "x86_64", "i386", etc)
3175 { 'type': 'TargetInfo',
3176 'data': { 'arch': 'str' } }
3181 # Return information about the target for this QEMU
3183 # Returns: TargetInfo
3187 { 'command': 'query-target', 'returns': 'TargetInfo' }
3192 # An enumeration of key name.
3194 # This is used by the send-key command.
3198 { 'enum': 'QKeyCode',
3199 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3200 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3201 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3202 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3203 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3204 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3205 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3206 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3207 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3208 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3209 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3210 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3211 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3212 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3213 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3218 # Represents a keyboard key.
3222 { 'union': 'KeyValue',
3225 'qcode': 'QKeyCode' } }
3230 # Send keys to guest.
3232 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3233 # simultaneously sent to the guest. A @KeyValue.number value is sent
3234 # directly to the guest, while @KeyValue.qcode must be a valid
3237 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3240 # Returns: Nothing on success
3241 # If key is unknown or redundant, InvalidParameter
3246 { 'command': 'send-key',
3247 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3252 # Write a PPM of the VGA screen to a file.
3254 # @filename: the path of a new PPM file to store the image
3256 # Returns: Nothing on success
3260 { 'command': 'screendump', 'data': {'filename': 'str'} }
3263 # @nbd-server-start:
3265 # Start an NBD server listening on the given host and port. Block
3266 # devices can then be exported using @nbd-server-add. The NBD
3267 # server will present them as named exports; for example, another
3268 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3270 # @addr: Address on which to listen.
3272 # Returns: error if the server is already running.
3276 { 'command': 'nbd-server-start',
3277 'data': { 'addr': 'SocketAddress' } }
3282 # Export a device to QEMU's embedded NBD server.
3284 # @device: Block device to be exported
3286 # @writable: Whether clients should be able to write to the device via the
3287 # NBD connection (default false). #optional
3289 # Returns: error if the device is already marked for export.
3293 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3298 # Stop QEMU's embedded NBD server, and unregister all devices previously
3299 # added via @nbd-server-add.
3303 { 'command': 'nbd-server-stop' }
3308 # Configuration info for file chardevs.
3310 # @in: #optional The name of the input file
3311 # @out: The name of the output file
3315 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3321 # Configuration info for device and pipe chardevs.
3323 # @device: The name of the special file for the device,
3324 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3325 # @type: What kind of device this is.
3329 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3334 # Configuration info for (stream) socket chardevs.
3336 # @addr: socket address to listen on (server=true)
3337 # or connect to (server=false)
3338 # @server: #optional create server socket (default: true)
3339 # @wait: #optional wait for incoming connection on server
3340 # sockets (default: false).
3341 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3342 # @telnet: #optional enable telnet protocol on server
3343 # sockets (default: false)
3347 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3350 '*nodelay' : 'bool',
3351 '*telnet' : 'bool' } }
3356 # Configuration info for datagram socket chardevs.
3358 # @remote: remote address
3359 # @local: #optional local address
3363 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3364 '*local' : 'SocketAddress' } }
3369 # Configuration info for mux chardevs.
3371 # @chardev: name of the base chardev.
3375 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3380 # Configuration info for stdio chardevs.
3382 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3383 # be delivered to qemu. Default: true in -nographic mode,
3388 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3391 # @ChardevSpiceChannel:
3393 # Configuration info for spice vm channel chardevs.
3395 # @type: kind of channel (for example vdagent).
3399 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3402 # @ChardevSpicePort:
3404 # Configuration info for spice port chardevs.
3406 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3410 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3415 # Configuration info for virtual console chardevs.
3417 # @width: console width, in pixels
3418 # @height: console height, in pixels
3419 # @cols: console width, in chars
3420 # @rows: console height, in chars
3424 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3432 # Configuration info for ring buffer chardevs.
3434 # @size: #optional ring buffer size, must be power of two, default is 65536
3438 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3443 # Configuration info for the new chardev backend.
3447 { 'type': 'ChardevDummy', 'data': { } }
3449 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3450 'serial' : 'ChardevHostdev',
3451 'parallel': 'ChardevHostdev',
3452 'pipe' : 'ChardevHostdev',
3453 'socket' : 'ChardevSocket',
3454 'udp' : 'ChardevUdp',
3455 'pty' : 'ChardevDummy',
3456 'null' : 'ChardevDummy',
3457 'mux' : 'ChardevMux',
3458 'msmouse': 'ChardevDummy',
3459 'braille': 'ChardevDummy',
3460 'stdio' : 'ChardevStdio',
3461 'console': 'ChardevDummy',
3462 'spicevmc' : 'ChardevSpiceChannel',
3463 'spiceport' : 'ChardevSpicePort',
3465 'ringbuf': 'ChardevRingbuf',
3466 # next one is just for compatibility
3467 'memory' : 'ChardevRingbuf' } }
3472 # Return info about the chardev backend just created.
3474 # @pty: #optional name of the slave pseudoterminal device, present if
3475 # and only if a chardev of type 'pty' was created
3479 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3484 # Add a character device backend
3486 # @id: the chardev's ID, must be unique
3487 # @backend: backend type and parameters
3489 # Returns: ChardevReturn.
3493 { 'command': 'chardev-add', 'data': {'id' : 'str',
3494 'backend' : 'ChardevBackend' },
3495 'returns': 'ChardevReturn' }
3500 # Remove a character device backend
3502 # @id: the chardev's ID, must exist and not be in use
3504 # Returns: Nothing on success
3508 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3513 # An enumeration of TPM models
3515 # @tpm-tis: TPM TIS model
3519 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3522 # @query-tpm-models:
3524 # Return a list of supported TPM models
3526 # Returns: a list of TpmModel
3530 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3535 # An enumeration of TPM types
3537 # @passthrough: TPM passthrough type
3541 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3546 # Return a list of supported TPM types
3548 # Returns: a list of TpmType
3552 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3555 # @TPMPassthroughOptions:
3557 # Information about the TPM passthrough type
3559 # @path: #optional string describing the path used for accessing the TPM device
3561 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3562 # for cancellation of TPM commands while they are executing
3566 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3567 '*cancel-path' : 'str'} }
3572 # A union referencing different TPM backend types' configuration options
3574 # @passthrough: The configuration options for the TPM passthrough type
3578 { 'union': 'TpmTypeOptions',
3579 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3584 # Information about the TPM
3586 # @id: The Id of the TPM
3588 # @model: The TPM frontend model
3590 # @options: The TPM (backend) type configuration options
3594 { 'type': 'TPMInfo',
3595 'data': {'id': 'str',
3596 'model': 'TpmModel',
3597 'options': 'TpmTypeOptions' } }
3602 # Return information about the TPM device
3604 # Returns: @TPMInfo on success
3608 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3613 # Specify an ACPI table on the command line to load.
3615 # At most one of @file and @data can be specified. The list of files specified
3616 # by any one of them is loaded and concatenated in order. If both are omitted,
3619 # Other fields / optargs can be used to override fields of the generic ACPI
3620 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3621 # Description Table Header. If a header field is not overridden, then the
3622 # corresponding value from the concatenated blob is used (in case of @file), or
3623 # it is filled in with a hard-coded value (in case of @data).
3625 # String fields are copied into the matching ACPI member from lowest address
3626 # upwards, and silently truncated / NUL-padded to length.
3628 # @sig: #optional table signature / identifier (4 bytes)
3630 # @rev: #optional table revision number (dependent on signature, 1 byte)
3632 # @oem_id: #optional OEM identifier (6 bytes)
3634 # @oem_table_id: #optional OEM table identifier (8 bytes)
3636 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3638 # @asl_compiler_id: #optional identifier of the utility that created the table
3641 # @asl_compiler_rev: #optional revision number of the utility that created the
3644 # @file: #optional colon (:) separated list of pathnames to load and
3645 # concatenate as table data. The resultant binary blob is expected to
3646 # have an ACPI table header. At least one file is required. This field
3649 # @data: #optional colon (:) separated list of pathnames to load and
3650 # concatenate as table data. The resultant binary blob must not have an
3651 # ACPI table header. At least one file is required. This field excludes
3656 { 'type': 'AcpiTableOptions',
3661 '*oem_table_id': 'str',
3662 '*oem_rev': 'uint32',
3663 '*asl_compiler_id': 'str',
3664 '*asl_compiler_rev': 'uint32',
3669 # @CommandLineParameterType:
3671 # Possible types for an option parameter.
3673 # @string: accepts a character string
3675 # @boolean: accepts "on" or "off"
3677 # @number: accepts a number
3679 # @size: accepts a number followed by an optional suffix (K)ilo,
3680 # (M)ega, (G)iga, (T)era
3684 { 'enum': 'CommandLineParameterType',
3685 'data': ['string', 'boolean', 'number', 'size'] }
3688 # @CommandLineParameterInfo:
3690 # Details about a single parameter of a command line option.
3692 # @name: parameter name
3694 # @type: parameter @CommandLineParameterType
3696 # @help: #optional human readable text string, not suitable for parsing.
3700 { 'type': 'CommandLineParameterInfo',
3701 'data': { 'name': 'str',
3702 'type': 'CommandLineParameterType',
3706 # @CommandLineOptionInfo:
3708 # Details about a command line option, including its list of parameter details
3710 # @option: option name
3712 # @parameters: an array of @CommandLineParameterInfo
3716 { 'type': 'CommandLineOptionInfo',
3717 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3720 # @query-command-line-options:
3722 # Query command line option schema.
3724 # @option: #optional option name
3726 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3727 # @option). Returns an error if the given @option doesn't exist.
3731 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3732 'returns': ['CommandLineOptionInfo'] }
3737 # A X86 32-bit register
3741 { 'enum': 'X86CPURegister32',
3742 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3745 # @X86CPUFeatureWordInfo
3747 # Information about a X86 CPU feature word
3749 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3751 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3754 # @cpuid-register: Output register containing the feature bits
3756 # @features: value of output register, containing the feature bits
3760 { 'type': 'X86CPUFeatureWordInfo',
3761 'data': { 'cpuid-input-eax': 'int',
3762 '*cpuid-input-ecx': 'int',
3763 'cpuid-register': 'X86CPURegister32',
3764 'features': 'int' } }
3769 # Packets receiving state
3771 # @normal: filter assigned packets according to the mac-table
3773 # @none: don't receive any assigned packet
3775 # @all: receive all assigned packets
3779 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3784 # Rx-filter information for a NIC.
3786 # @name: net client name
3788 # @promiscuous: whether promiscuous mode is enabled
3790 # @multicast: multicast receive state
3792 # @unicast: unicast receive state
3794 # @broadcast-allowed: whether to receive broadcast
3796 # @multicast-overflow: multicast table is overflowed or not
3798 # @unicast-overflow: unicast table is overflowed or not
3800 # @main-mac: the main macaddr string
3802 # @vlan-table: a list of active vlan id
3804 # @unicast-table: a list of unicast macaddr string
3806 # @multicast-table: a list of multicast macaddr string
3811 { 'type': 'RxFilterInfo',
3814 'promiscuous': 'bool',
3815 'multicast': 'RxState',
3816 'unicast': 'RxState',
3817 'broadcast-allowed': 'bool',
3818 'multicast-overflow': 'bool',
3819 'unicast-overflow': 'bool',
3821 'vlan-table': ['int'],
3822 'unicast-table': ['str'],
3823 'multicast-table': ['str'] }}
3828 # Return rx-filter information for all NICs (or for the given NIC).
3830 # @name: #optional net client name
3832 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
3833 # Returns an error if the given @name doesn't exist, or given
3834 # NIC doesn't support rx-filter querying, or given net client
3839 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
3840 'returns': ['RxFilterInfo'] }