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' ] }
35 # Policy for handling lost ticks in timer devices.
37 # @discard: throw away the missed tick(s) and continue with future injection
38 # normally. Guest time may be delayed, unless the OS has explicit
39 # handling of lost ticks
41 # @delay: continue to deliver ticks at the normal rate. Guest time will be
42 # delayed due to the late tick
44 # @merge: merge the missed tick(s) into one tick and inject. Guest time
45 # may be delayed, depending on how the OS reacts to the merging
48 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
49 # guest time should not be delayed once catchup is complete.
53 { 'enum': 'LostTickPolicy',
54 'data': ['discard', 'delay', 'merge', 'slew' ] }
59 # Policy that BIOS should use to interpret cylinder/head/sector
60 # addresses. Note that Bochs BIOS and SeaBIOS will not actually
61 # translate logical CHS to physical; instead, they will use logical
64 # @auto: If cylinder/heads/sizes are passed, choose between none and LBA
65 # depending on the size of the disk. If they are not passed,
66 # choose none if QEMU can guess that the disk had 16 or fewer
67 # heads, large if QEMU can guess that the disk had 131072 or
68 # fewer tracks across all heads (i.e. cylinders*heads<131072),
71 # @none: The physical disk geometry is equal to the logical geometry.
73 # @lba: Assume 63 sectors per track and one of 16, 32, 64, 128 or 255
74 # heads (if fewer than 255 are enough to cover the whole disk
75 # with 1024 cylinders/head). The number of cylinders/head is
76 # then computed based on the number of sectors and heads.
78 # @large: The number of cylinders per head is scaled down to 1024
79 # by correspondingly scaling up the number of heads.
81 # @rechs: Same as @large, but first convert a 16-head geometry to
82 # 15-head, by proportionally scaling up the number of
87 { 'enum': 'BiosAtaTranslation',
88 'data': ['auto', 'none', 'lba', 'large', 'rechs']}
92 # Allow client connections for VNC, Spice and socket based
93 # character devices to be passed in to QEMU via SCM_RIGHTS.
95 # @protocol: protocol name. Valid names are "vnc", "spice" or the
96 # name of a character device (eg. from -chardev id=XXXX)
98 # @fdname: file descriptor name previously passed via 'getfd' command
100 # @skipauth: #optional whether to skip authentication. Only applies
101 # to "vnc" and "spice" protocols
103 # @tls: #optional whether to perform TLS. Only applies to the "spice"
106 # Returns: nothing on success.
110 { 'command': 'add_client',
111 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
117 # Guest name information.
119 # @name: #optional The name of the guest
123 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
128 # Return the name information of a guest.
130 # Returns: @NameInfo of the guest
134 { 'command': 'query-name', 'returns': 'NameInfo' }
139 # A description of QEMU's version.
141 # @qemu.major: The major version of QEMU
143 # @qemu.minor: The minor version of QEMU
145 # @qemu.micro: The micro version of QEMU. By current convention, a micro
146 # version of 50 signifies a development branch. A micro version
147 # greater than or equal to 90 signifies a release candidate for
148 # the next minor version. A micro version of less than 50
149 # signifies a stable release.
151 # @package: QEMU will always set this field to an empty string. Downstream
152 # versions of QEMU should set this to a non-empty string. The
153 # exact format depends on the downstream however it highly
154 # recommended that a unique name is used.
158 { 'type': 'VersionInfo',
159 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
165 # Returns the current version of QEMU.
167 # Returns: A @VersionInfo object describing the current version of QEMU.
171 { 'command': 'query-version', 'returns': 'VersionInfo' }
176 # Information about support for KVM acceleration
178 # @enabled: true if KVM acceleration is active
180 # @present: true if KVM acceleration is built into this executable
184 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
189 # Returns information about KVM acceleration
195 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
200 # An enumeration of VM run states.
202 # @debug: QEMU is running on a debugger
204 # @finish-migrate: guest is paused to finish the migration process
206 # @inmigrate: guest is paused waiting for an incoming migration. Note
207 # that this state does not tell whether the machine will start at the
208 # end of the migration. This depends on the command-line -S option and
209 # any invocation of 'stop' or 'cont' that has happened since QEMU was
212 # @internal-error: An internal error that prevents further guest execution
215 # @io-error: the last IOP has failed and the device is configured to pause
218 # @paused: guest has been paused via the 'stop' command
220 # @postmigrate: guest is paused following a successful 'migrate'
222 # @prelaunch: QEMU was started with -S and guest has not started
224 # @restore-vm: guest is paused to restore VM state
226 # @running: guest is actively running
228 # @save-vm: guest is paused to save the VM state
230 # @shutdown: guest is shut down (and -no-shutdown is in use)
232 # @suspended: guest is suspended (ACPI S3)
234 # @watchdog: the watchdog action is configured to pause and has been triggered
236 # @guest-panicked: guest has been panicked as a result of guest OS panic
238 { 'enum': 'RunState',
239 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
240 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
241 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
247 # @id: unique snapshot id
249 # @name: user chosen name
251 # @vm-state-size: size of the VM state
253 # @date-sec: UTC date of the snapshot in seconds
255 # @date-nsec: fractional part in nano seconds to be used with date-sec
257 # @vm-clock-sec: VM clock relative to boot in seconds
259 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
265 { 'type': 'SnapshotInfo',
266 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
267 'date-sec': 'int', 'date-nsec': 'int',
268 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
271 # @ImageInfoSpecificQCow2:
273 # @compat: compatibility level
275 # @lazy-refcounts: #optional on or off; only valid for compat >= 1.1
279 { 'type': 'ImageInfoSpecificQCow2',
282 '*lazy-refcounts': 'bool'
286 # @ImageInfoSpecificVmdk:
288 # @create-type: The create type of VMDK image
290 # @cid: Content id of image
292 # @parent-cid: Parent VMDK image's cid
294 # @extents: List of extent files
298 { 'type': 'ImageInfoSpecificVmdk',
300 'create-type': 'str',
303 'extents': ['ImageInfo']
307 # @ImageInfoSpecific:
309 # A discriminated record of image format specific information structures.
314 { 'union': 'ImageInfoSpecific',
316 'qcow2': 'ImageInfoSpecificQCow2',
317 'vmdk': 'ImageInfoSpecificVmdk'
323 # Information about a QEMU image file
325 # @filename: name of the image file
327 # @format: format of the image file
329 # @virtual-size: maximum capacity in bytes of the image
331 # @actual-size: #optional actual size on disk in bytes of the image
333 # @dirty-flag: #optional true if image is not cleanly closed
335 # @cluster-size: #optional size of a cluster in bytes
337 # @encrypted: #optional true if the image is encrypted
339 # @compressed: #optional true if the image is compressed (Since 1.7)
341 # @backing-filename: #optional name of the backing file
343 # @full-backing-filename: #optional full path of the backing file
345 # @backing-filename-format: #optional the format of the backing file
347 # @snapshots: #optional list of VM snapshots
349 # @backing-image: #optional info of the backing image (since 1.6)
351 # @format-specific: #optional structure supplying additional format-specific
352 # information (since 1.7)
358 { 'type': 'ImageInfo',
359 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
360 '*actual-size': 'int', 'virtual-size': 'int',
361 '*cluster-size': 'int', '*encrypted': 'bool', '*compressed': 'bool',
362 '*backing-filename': 'str', '*full-backing-filename': 'str',
363 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
364 '*backing-image': 'ImageInfo',
365 '*format-specific': 'ImageInfoSpecific' } }
370 # Information about a QEMU image file check
372 # @filename: name of the image file checked
374 # @format: format of the image file checked
376 # @check-errors: number of unexpected errors occurred during check
378 # @image-end-offset: #optional offset (in bytes) where the image ends, this
379 # field is present if the driver for the image format
382 # @corruptions: #optional number of corruptions found during the check if any
384 # @leaks: #optional number of leaks found during the check if any
386 # @corruptions-fixed: #optional number of corruptions fixed during the check
389 # @leaks-fixed: #optional number of leaks fixed during the check if any
391 # @total-clusters: #optional total number of clusters, this field is present
392 # if the driver for the image format supports it
394 # @allocated-clusters: #optional total number of allocated clusters, this
395 # field is present if the driver for the image format
398 # @fragmented-clusters: #optional total number of fragmented clusters, this
399 # field is present if the driver for the image format
402 # @compressed-clusters: #optional total number of compressed clusters, this
403 # field is present if the driver for the image format
410 { 'type': 'ImageCheck',
411 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
412 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
413 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
414 '*total-clusters': 'int', '*allocated-clusters': 'int',
415 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
420 # Information about VCPU run state
422 # @running: true if all VCPUs are runnable, false if not runnable
424 # @singlestep: true if VCPUs are in single-step mode
426 # @status: the virtual machine @RunState
430 # Notes: @singlestep is enabled through the GDB stub
432 { 'type': 'StatusInfo',
433 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
438 # Query the run status of all VCPUs
440 # Returns: @StatusInfo reflecting all VCPUs
444 { 'command': 'query-status', 'returns': 'StatusInfo' }
449 # Guest UUID information.
451 # @UUID: the UUID of the guest
455 # Notes: If no UUID was specified for the guest, a null UUID is returned.
457 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
462 # Query the guest UUID information.
464 # Returns: The @UuidInfo for the guest
468 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
473 # Information about a character device.
475 # @label: the label of the character device
477 # @filename: the filename of the character device
479 # Notes: @filename is encoded using the QEMU command line character device
480 # encoding. See the QEMU man page for details.
484 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
489 # Returns information about current character devices.
491 # Returns: a list of @ChardevInfo
495 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
498 # @ChardevBackendInfo:
500 # Information about a character device backend
502 # @name: The backend name
506 { 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
509 # @query-chardev-backends:
511 # Returns information about character device backends.
513 # Returns: a list of @ChardevBackendInfo
517 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
522 # An enumeration of data format.
524 # @utf8: Data is a UTF-8 string (RFC 3629)
526 # @base64: Data is Base64 encoded binary (RFC 3548)
530 { 'enum': 'DataFormat',
531 'data': [ 'utf8', 'base64' ] }
536 # Write to a ring buffer character device.
538 # @device: the ring buffer character device name
540 # @data: data to write
542 # @format: #optional data encoding (default 'utf8').
543 # - base64: data must be base64 encoded text. Its binary
544 # decoding gets written.
545 # Bug: invalid base64 is currently not rejected.
546 # Whitespace *is* invalid.
547 # - utf8: data's UTF-8 encoding is written
548 # - data itself is always Unicode regardless of format, like
551 # Returns: Nothing on success
555 { 'command': 'ringbuf-write',
556 'data': {'device': 'str', 'data': 'str',
557 '*format': 'DataFormat'} }
562 # Read from a ring buffer character device.
564 # @device: the ring buffer character device name
566 # @size: how many bytes to read at most
568 # @format: #optional data encoding (default 'utf8').
569 # - base64: the data read is returned in base64 encoding.
570 # - utf8: the data read is interpreted as UTF-8.
571 # Bug: can screw up when the buffer contains invalid UTF-8
572 # sequences, NUL characters, after the ring buffer lost
573 # data, and when reading stops because the size limit is
575 # - The return value is always Unicode regardless of format,
576 # like any other string.
578 # Returns: data read from the device
582 { 'command': 'ringbuf-read',
583 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
589 # Information about a QMP command
591 # @name: The command name
595 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
600 # Return a list of supported QMP commands by this server
602 # Returns: A list of @CommandInfo for all supported commands
606 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
611 # Information about a QMP event
613 # @name: The event name
617 { 'type': 'EventInfo', 'data': {'name': 'str'} }
622 # Return a list of supported QMP events by this server
624 # Returns: A list of @EventInfo for all supported events
628 { 'command': 'query-events', 'returns': ['EventInfo'] }
633 # Detailed migration status.
635 # @transferred: amount of bytes already transferred to the target VM
637 # @remaining: amount of bytes remaining to be transferred to the target VM
639 # @total: total amount of bytes involved in the migration process
641 # @duplicate: number of duplicate (zero) pages (since 1.2)
643 # @skipped: number of skipped zero pages (since 1.5)
645 # @normal : number of normal pages (since 1.2)
647 # @normal-bytes: number of normal bytes sent (since 1.2)
649 # @dirty-pages-rate: number of pages dirtied by second by the
652 # @mbps: throughput in megabits/sec. (since 1.6)
656 { 'type': 'MigrationStats',
657 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
658 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
659 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
660 'mbps' : 'number' } }
665 # Detailed XBZRLE migration cache statistics
667 # @cache-size: XBZRLE cache size
669 # @bytes: amount of bytes already transferred to the target VM
671 # @pages: amount of pages transferred to the target VM
673 # @cache-miss: number of cache miss
675 # @overflow: number of overflows
679 { 'type': 'XBZRLECacheStats',
680 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
681 'cache-miss': 'int', 'overflow': 'int' } }
686 # Information about current migration process.
688 # @status: #optional string describing the current migration status.
689 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
690 # 'cancelled'. If this field is not returned, no migration process
693 # @ram: #optional @MigrationStats containing detailed migration
694 # status, only returned if status is 'active' or
695 # 'completed'. 'comppleted' (since 1.2)
697 # @disk: #optional @MigrationStats containing detailed disk migration
698 # status, only returned if status is 'active' and it is a block
701 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
702 # migration statistics, only returned if XBZRLE feature is on and
703 # status is 'active' or 'completed' (since 1.2)
705 # @total-time: #optional total amount of milliseconds since migration started.
706 # If migration has ended, it returns the total migration
709 # @downtime: #optional only present when migration finishes correctly
710 # total downtime in milliseconds for the guest.
713 # @expected-downtime: #optional only present while migration is active
714 # expected downtime in milliseconds for the guest in last walk
715 # of the dirty bitmap. (since 1.3)
717 # @setup-time: #optional amount of setup time in milliseconds _before_ the
718 # iterations begin but _after_ the QMP command is issued. This is designed
719 # to provide an accounting of any activities (such as RDMA pinning) which
720 # may be expensive, but do not actually occur during the iterative
721 # migration rounds themselves. (since 1.6)
725 { 'type': 'MigrationInfo',
726 'data': {'*status': 'str', '*ram': 'MigrationStats',
727 '*disk': 'MigrationStats',
728 '*xbzrle-cache': 'XBZRLECacheStats',
729 '*total-time': 'int',
730 '*expected-downtime': 'int',
732 '*setup-time': 'int'} }
737 # Returns information about current migration process.
739 # Returns: @MigrationInfo
743 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
746 # @MigrationCapability
748 # Migration capabilities enumeration
750 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
751 # This feature allows us to minimize migration traffic for certain work
752 # loads, by sending compressed difference of the pages
754 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
755 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
756 # Disabled by default. (since 2.0)
758 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
759 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
760 # source and target VM to support this feature. To enable it is sufficient
761 # to enable the capability on the source VM. The feature is disabled by
762 # default. (since 1.6)
764 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
765 # to speed up convergence of RAM migration. (since 1.6)
769 { 'enum': 'MigrationCapability',
770 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
773 # @MigrationCapabilityStatus
775 # Migration capability information
777 # @capability: capability enum
779 # @state: capability state bool
783 { 'type': 'MigrationCapabilityStatus',
784 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
787 # @migrate-set-capabilities
789 # Enable/Disable the following migration capabilities (like xbzrle)
791 # @capabilities: json array of capability modifications to make
795 { 'command': 'migrate-set-capabilities',
796 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
799 # @query-migrate-capabilities
801 # Returns information about the current migration capabilities status
803 # Returns: @MigrationCapabilitiesStatus
807 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
812 # Information about a mouse device.
814 # @name: the name of the mouse device
816 # @index: the index of the mouse device
818 # @current: true if this device is currently receiving mouse events
820 # @absolute: true if this device supports absolute coordinates as input
824 { 'type': 'MouseInfo',
825 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
826 'absolute': 'bool'} }
831 # Returns information about each active mouse device
833 # Returns: a list of @MouseInfo for each device
837 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
842 # Information about a virtual CPU
844 # @CPU: the index of the virtual CPU
846 # @current: this only exists for backwards compatible and should be ignored
848 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
849 # to a processor specific low power mode.
851 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
853 # If the target is Sparc, this is the PC component of the
854 # instruction pointer.
856 # @nip: #optional If the target is PPC, the instruction pointer
858 # @npc: #optional If the target is Sparc, the NPC component of the instruction
861 # @PC: #optional If the target is MIPS, the instruction pointer
863 # @thread_id: ID of the underlying host thread
867 # Notes: @halted is a transient state that changes frequently. By the time the
868 # data is sent to the client, the guest may no longer be halted.
871 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
872 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
877 # Returns a list of information about each virtual CPU.
879 # Returns: a list of @CpuInfo for each virtual CPU
883 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
888 # Information about the backing device for a block device.
890 # @file: the filename of the backing device
892 # @node-name: #optional the name of the block driver node (Since 2.0)
894 # @ro: true if the backing device was open read-only
896 # @drv: the name of the block format used to open the backing device. As of
897 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
898 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
899 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
900 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
902 # @backing_file: #optional the name of the backing file (for copy-on-write)
904 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
906 # @encrypted: true if the backing device is encrypted
908 # @encryption_key_missing: true if the backing device is encrypted but an
909 # valid encryption key is missing
911 # @bps: total throughput limit in bytes per second is specified
913 # @bps_rd: read throughput limit in bytes per second is specified
915 # @bps_wr: write throughput limit in bytes per second is specified
917 # @iops: total I/O operations per second is specified
919 # @iops_rd: read I/O operations per second is specified
921 # @iops_wr: write I/O operations per second is specified
923 # @image: the info of image used (since: 1.6)
925 # @bps_max: #optional total max in bytes (Since 1.7)
927 # @bps_rd_max: #optional read max in bytes (Since 1.7)
929 # @bps_wr_max: #optional write max in bytes (Since 1.7)
931 # @iops_max: #optional total I/O operations max (Since 1.7)
933 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
935 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
937 # @iops_size: #optional an I/O size in bytes (Since 1.7)
942 { 'type': 'BlockDeviceInfo',
943 'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
944 '*backing_file': 'str', 'backing_file_depth': 'int',
945 'encrypted': 'bool', 'encryption_key_missing': 'bool',
946 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
947 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
948 'image': 'ImageInfo',
949 '*bps_max': 'int', '*bps_rd_max': 'int',
950 '*bps_wr_max': 'int', '*iops_max': 'int',
951 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
952 '*iops_size': 'int' } }
955 # @BlockDeviceIoStatus:
957 # An enumeration of block device I/O status.
959 # @ok: The last I/O operation has succeeded
961 # @failed: The last I/O operation has failed
963 # @nospace: The last I/O operation has failed due to a no-space condition
967 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
970 # @BlockDeviceMapEntry:
972 # Entry in the metadata map of the device (returned by "qemu-img map")
974 # @start: Offset in the image of the first byte described by this entry
977 # @length: Length of the range described by this entry (in bytes)
979 # @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.)
980 # before reaching one for which the range is allocated. The value is
981 # in the range 0 to the depth of the image chain - 1.
983 # @zero: the sectors in this range read as zeros
985 # @data: reading the image will actually read data from a file (in particular,
986 # if @offset is present this means that the sectors are not simply
987 # preallocated, but contain actual data in raw format)
989 # @offset: if present, the image file stores the data for this range in
990 # raw format at the given offset.
994 { 'type': 'BlockDeviceMapEntry',
995 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
996 'data': 'bool', '*offset': 'int' } }
1001 # Block dirty bitmap information.
1003 # @count: number of dirty bytes according to the dirty bitmap
1005 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
1009 { 'type': 'BlockDirtyInfo',
1010 'data': {'count': 'int', 'granularity': 'int'} }
1015 # Block device information. This structure describes a virtual device and
1016 # the backing device associated with it.
1018 # @device: The device name associated with the virtual device.
1020 # @type: This field is returned only for compatibility reasons, it should
1021 # not be used (always returns 'unknown')
1023 # @removable: True if the device supports removable media.
1025 # @locked: True if the guest has locked this device from having its media
1028 # @tray_open: #optional True if the device has a tray and it is open
1029 # (only present if removable is true)
1031 # @dirty-bitmaps: #optional dirty bitmaps information (only present if the
1032 # driver has one or more dirty bitmaps) (Since 2.0)
1034 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
1035 # supports it and the VM is configured to stop on errors
1037 # @inserted: #optional @BlockDeviceInfo describing the device if media is
1042 { 'type': 'BlockInfo',
1043 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
1044 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
1045 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
1046 '*dirty-bitmaps': ['BlockDirtyInfo'] } }
1051 # Get a list of BlockInfo for all virtual block devices.
1053 # Returns: a list of @BlockInfo describing each virtual block device
1057 { 'command': 'query-block', 'returns': ['BlockInfo'] }
1060 # @BlockDeviceStats:
1062 # Statistics of a virtual block device or a block backing device.
1064 # @rd_bytes: The number of bytes read by the device.
1066 # @wr_bytes: The number of bytes written by the device.
1068 # @rd_operations: The number of read operations performed by the device.
1070 # @wr_operations: The number of write operations performed by the device.
1072 # @flush_operations: The number of cache flush operations performed by the
1073 # device (since 0.15.0)
1075 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
1078 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
1080 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
1082 # @wr_highest_offset: The offset after the greatest byte written to the
1083 # device. The intended use of this information is for
1084 # growable sparse files (like qcow2) that are used on top
1085 # of a physical device.
1089 { 'type': 'BlockDeviceStats',
1090 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
1091 'wr_operations': 'int', 'flush_operations': 'int',
1092 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
1093 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
1098 # Statistics of a virtual block device or a block backing device.
1100 # @device: #optional If the stats are for a virtual block device, the name
1101 # corresponding to the virtual block device.
1103 # @stats: A @BlockDeviceStats for the device.
1105 # @parent: #optional This describes the file block device if it has one.
1107 # @backing: #optional This describes the backing block device if it has one.
1112 { 'type': 'BlockStats',
1113 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
1114 '*parent': 'BlockStats',
1115 '*backing': 'BlockStats'} }
1118 # @query-blockstats:
1120 # Query the @BlockStats for all virtual block devices.
1122 # Returns: A list of @BlockStats for each virtual block devices.
1126 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
1131 # Information about a connected VNC client.
1133 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1136 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1137 # 'ipv4' if the client is connected via IPv4 and TCP
1138 # 'unix' if the client is connected via a unix domain socket
1139 # 'unknown' otherwise
1141 # @service: The service name of the client's port. This may depends on the
1142 # host system's service database so symbolic names should not be
1145 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1146 # Name of the client.
1148 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1149 # used for authentication.
1153 { 'type': 'VncClientInfo',
1154 'data': {'host': 'str', 'family': 'str', 'service': 'str',
1155 '*x509_dname': 'str', '*sasl_username': 'str'} }
1160 # Information about the VNC session.
1162 # @enabled: true if the VNC server is enabled, false otherwise
1164 # @host: #optional The hostname the VNC server is bound to. This depends on
1165 # the name resolution on the host and may be an IP address.
1167 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1168 # 'ipv4' if the host is listening for IPv4 connections
1169 # 'unix' if the host is listening on a unix domain socket
1170 # 'unknown' otherwise
1172 # @service: #optional The service name of the server's port. This may depends
1173 # on the host system's service database so symbolic names should not
1176 # @auth: #optional the current authentication type used by the server
1177 # 'none' if no authentication is being used
1178 # 'vnc' if VNC authentication is being used
1179 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1180 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1181 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1182 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1183 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1184 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1185 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1186 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1187 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1189 # @clients: a list of @VncClientInfo of all currently connected clients
1193 { 'type': 'VncInfo',
1194 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1195 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1200 # Returns information about the current VNC server
1206 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1211 # Information about a SPICE client channel.
1213 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1216 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1217 # 'ipv4' if the client is connected via IPv4 and TCP
1218 # 'unix' if the client is connected via a unix domain socket
1219 # 'unknown' otherwise
1221 # @port: The client's port number.
1223 # @connection-id: SPICE connection id number. All channels with the same id
1224 # belong to the same SPICE session.
1226 # @connection-type: SPICE channel type number. "1" is the main control
1227 # channel, filter for this one if you want to track spice
1230 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1231 # multiple channels of the same type exist, such as multiple
1232 # display channels in a multihead setup
1234 # @tls: true if the channel is encrypted, false otherwise.
1238 { 'type': 'SpiceChannel',
1239 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1240 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1244 # @SpiceQueryMouseMode
1246 # An enumeration of Spice mouse states.
1248 # @client: Mouse cursor position is determined by the client.
1250 # @server: Mouse cursor position is determined by the server.
1252 # @unknown: No information is available about mouse mode used by
1255 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1259 { 'enum': 'SpiceQueryMouseMode',
1260 'data': [ 'client', 'server', 'unknown' ] }
1265 # Information about the SPICE session.
1267 # @enabled: true if the SPICE server is enabled, false otherwise
1269 # @migrated: true if the last guest migration completed and spice
1270 # migration had completed as well. false otherwise.
1272 # @host: #optional The hostname the SPICE server is bound to. This depends on
1273 # the name resolution on the host and may be an IP address.
1275 # @port: #optional The SPICE server's port number.
1277 # @compiled-version: #optional SPICE server version.
1279 # @tls-port: #optional The SPICE server's TLS port number.
1281 # @auth: #optional the current authentication type used by the server
1282 # 'none' if no authentication is being used
1283 # 'spice' uses SASL or direct TLS authentication, depending on command
1286 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1287 # be determined by the client or the server, or unknown if spice
1288 # server doesn't provide this information.
1292 # @channels: a list of @SpiceChannel for each active spice channel
1296 { 'type': 'SpiceInfo',
1297 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1298 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1299 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1304 # Returns information about the current SPICE server
1306 # Returns: @SpiceInfo
1310 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1315 # Information about the guest balloon device.
1317 # @actual: the number of bytes the balloon currently contains
1322 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1327 # Return information about the balloon device.
1329 # Returns: @BalloonInfo on success
1330 # If the balloon driver is enabled but not functional because the KVM
1331 # kernel module cannot support it, KvmMissingCap
1332 # If no balloon device is present, DeviceNotActive
1336 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1341 # A PCI device memory region
1343 # @base: the starting address (guest physical)
1345 # @limit: the ending address (guest physical)
1349 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1354 # Information about a PCI device I/O region.
1356 # @bar: the index of the Base Address Register for this region
1358 # @type: 'io' if the region is a PIO region
1359 # 'memory' if the region is a MMIO region
1361 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1363 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1367 { 'type': 'PciMemoryRegion',
1368 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1369 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1374 # Information about a PCI Bridge device
1376 # @bus.number: primary bus interface number. This should be the number of the
1377 # bus the device resides on.
1379 # @bus.secondary: secondary bus interface number. This is the number of the
1380 # main bus for the bridge
1382 # @bus.subordinate: This is the highest number bus that resides below the
1385 # @bus.io_range: The PIO range for all devices on this bridge
1387 # @bus.memory_range: The MMIO range for all devices on this bridge
1389 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1392 # @devices: a list of @PciDeviceInfo for each device on this bridge
1396 { 'type': 'PciBridgeInfo',
1397 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1398 'io_range': 'PciMemoryRange',
1399 'memory_range': 'PciMemoryRange',
1400 'prefetchable_range': 'PciMemoryRange' },
1401 '*devices': ['PciDeviceInfo']} }
1406 # Information about a PCI device
1408 # @bus: the bus number of the device
1410 # @slot: the slot the device is located in
1412 # @function: the function of the slot used by the device
1414 # @class_info.desc: #optional a string description of the device's class
1416 # @class_info.class: the class code of the device
1418 # @id.device: the PCI device id
1420 # @id.vendor: the PCI vendor id
1422 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1424 # @qdev_id: the device name of the PCI device
1426 # @pci_bridge: if the device is a PCI bridge, the bridge information
1428 # @regions: a list of the PCI I/O regions associated with the device
1430 # Notes: the contents of @class_info.desc are not stable and should only be
1431 # treated as informational.
1435 { 'type': 'PciDeviceInfo',
1436 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1437 'class_info': {'*desc': 'str', 'class': 'int'},
1438 'id': {'device': 'int', 'vendor': 'int'},
1439 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1440 'regions': ['PciMemoryRegion']} }
1445 # Information about a PCI bus
1447 # @bus: the bus index
1449 # @devices: a list of devices on this bus
1453 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1458 # Return information about the PCI bus topology of the guest.
1460 # Returns: a list of @PciInfo for each PCI bus
1464 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1469 # An enumeration of possible behaviors for errors on I/O operations.
1470 # The exact meaning depends on whether the I/O was initiated by a guest
1473 # @report: for guest operations, report the error to the guest;
1474 # for jobs, cancel the job
1476 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1477 # or BLOCK_JOB_ERROR)
1479 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1481 # @stop: for guest operations, stop the virtual machine;
1482 # for jobs, pause the job
1486 { 'enum': 'BlockdevOnError',
1487 'data': ['report', 'ignore', 'enospc', 'stop'] }
1492 # An enumeration of possible behaviors for the initial synchronization
1493 # phase of storage mirroring.
1495 # @top: copies data in the topmost image to the destination
1497 # @full: copies data from all images to the destination
1499 # @none: only copy data written from now on
1503 { 'enum': 'MirrorSyncMode',
1504 'data': ['top', 'full', 'none'] }
1509 # Type of a block job.
1511 # @commit: block commit job type, see "block-commit"
1513 # @stream: block stream job type, see "block-stream"
1515 # @mirror: drive mirror job type, see "drive-mirror"
1517 # @backup: drive backup job type, see "drive-backup"
1521 { 'enum': 'BlockJobType',
1522 'data': ['commit', 'stream', 'mirror', 'backup'] }
1527 # Information about a long-running block device operation.
1529 # @type: the job type ('stream' for image streaming)
1531 # @device: the block device name
1533 # @len: the maximum progress value
1535 # @busy: false if the job is known to be in a quiescent state, with
1536 # no pending I/O. Since 1.3.
1538 # @paused: whether the job is paused or, if @busy is true, will
1539 # pause itself as soon as possible. Since 1.3.
1541 # @offset: the current progress value
1543 # @speed: the rate limit, bytes per second
1545 # @io-status: the status of the job (since 1.3)
1549 { 'type': 'BlockJobInfo',
1550 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1551 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1552 'io-status': 'BlockDeviceIoStatus'} }
1555 # @query-block-jobs:
1557 # Return information about long-running block device operations.
1559 # Returns: a list of @BlockJobInfo for each active block job
1563 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1568 # This command will cause the QEMU process to exit gracefully. While every
1569 # attempt is made to send the QMP response before terminating, this is not
1570 # guaranteed. When using this interface, a premature EOF would not be
1575 { 'command': 'quit' }
1580 # Stop all guest VCPU execution.
1584 # Notes: This function will succeed even if the guest is already in the stopped
1585 # state. In "inmigrate" state, it will ensure that the guest
1586 # remains paused once migration finishes, as if the -S option was
1587 # passed on the command line.
1589 { 'command': 'stop' }
1594 # Performs a hard reset of a guest.
1598 { 'command': 'system_reset' }
1601 # @system_powerdown:
1603 # Requests that a guest perform a powerdown operation.
1607 # Notes: A guest may or may not respond to this command. This command
1608 # returning does not indicate that a guest has accepted the request or
1609 # that it has shut down. Many guests will respond to this command by
1610 # prompting the user in some way.
1612 { 'command': 'system_powerdown' }
1617 # This command is a nop that is only provided for the purposes of compatibility.
1621 # Notes: Do not use this command.
1623 { 'command': 'cpu', 'data': {'index': 'int'} }
1628 # Adds CPU with specified ID
1630 # @id: ID of CPU to be created, valid values [0..max_cpus)
1632 # Returns: Nothing on success
1636 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1641 # Save a portion of guest memory to a file.
1643 # @val: the virtual address of the guest to start from
1645 # @size: the size of memory region to save
1647 # @filename: the file to save the memory to as binary data
1649 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1650 # virtual address (defaults to CPU 0)
1652 # Returns: Nothing on success
1656 # Notes: Errors were not reliably returned until 1.1
1658 { 'command': 'memsave',
1659 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1664 # Save a portion of guest physical memory to a file.
1666 # @val: the physical address of the guest to start from
1668 # @size: the size of memory region to save
1670 # @filename: the file to save the memory to as binary data
1672 # Returns: Nothing on success
1676 # Notes: Errors were not reliably returned until 1.1
1678 { 'command': 'pmemsave',
1679 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1684 # Resume guest VCPU execution.
1688 # Returns: If successful, nothing
1689 # If QEMU was started with an encrypted block device and a key has
1690 # not yet been set, DeviceEncrypted.
1692 # Notes: This command will succeed if the guest is currently running. It
1693 # will also succeed if the guest is in the "inmigrate" state; in
1694 # this case, the effect of the command is to make sure the guest
1695 # starts once migration finishes, removing the effect of the -S
1696 # command line option if it was passed.
1698 { 'command': 'cont' }
1703 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1709 { 'command': 'system_wakeup' }
1714 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1716 # Returns: If successful, nothing
1720 # Notes: Only x86 Virtual Machines support this command.
1722 { 'command': 'inject-nmi' }
1727 # Sets the link status of a virtual network adapter.
1729 # @name: the device name of the virtual network adapter
1731 # @up: true to set the link status to be up
1733 # Returns: Nothing on success
1734 # If @name is not a valid network device, DeviceNotFound
1738 # Notes: Not all network adapters support setting link status. This command
1739 # will succeed even if the network adapter does not support link status
1742 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1747 # This command sets the password of a block device that has not been open
1748 # with a password and requires one.
1750 # The two cases where this can happen are a block device is created through
1751 # QEMU's initial command line or a block device is changed through the legacy
1752 # @change interface.
1754 # In the event that the block device is created through the initial command
1755 # line, the VM will start in the stopped state regardless of whether '-S' is
1756 # used. The intention is for a management tool to query the block devices to
1757 # determine which ones are encrypted, set the passwords with this command, and
1758 # then start the guest with the @cont command.
1760 # Either @device or @node-name must be set but not both.
1762 # @device: #optional the name of the block backend device to set the password on
1764 # @node-name: #optional graph node name to set the password on (Since 2.0)
1766 # @password: the password to use for the device
1768 # Returns: nothing on success
1769 # If @device is not a valid block device, DeviceNotFound
1770 # If @device is not encrypted, DeviceNotEncrypted
1772 # Notes: Not all block formats support encryption and some that do are not
1773 # able to validate that a password is correct. Disk corruption may
1774 # occur if an invalid password is specified.
1778 { 'command': 'block_passwd', 'data': {'*device': 'str',
1779 '*node-name': 'str', 'password': 'str'} }
1784 # Request the balloon driver to change its balloon size.
1786 # @value: the target size of the balloon in bytes
1788 # Returns: Nothing on success
1789 # If the balloon driver is enabled but not functional because the KVM
1790 # kernel module cannot support it, KvmMissingCap
1791 # If no balloon device is present, DeviceNotActive
1793 # Notes: This command just issues a request to the guest. When it returns,
1794 # the balloon size may not have changed. A guest can change the balloon
1795 # size independent of this command.
1799 { 'command': 'balloon', 'data': {'value': 'int'} }
1804 # Resize a block image while a guest is running.
1806 # Either @device or @node-name must be set but not both.
1808 # @device: #optional the name of the device to get the image resized
1810 # @node-name: #optional graph node name to get the image resized (Since 2.0)
1812 # @size: new image size in bytes
1814 # Returns: nothing on success
1815 # If @device is not a valid block device, DeviceNotFound
1819 { 'command': 'block_resize', 'data': { '*device': 'str',
1820 '*node-name': 'str',
1826 # An enumeration that tells QEMU how to set the backing file path in
1829 # @existing: QEMU should look for an existing image file.
1831 # @absolute-paths: QEMU should create a new image with absolute paths
1832 # for the backing file. If there is no backing file available, the new
1833 # image will not be backed either.
1837 { 'enum': 'NewImageMode',
1838 'data': [ 'existing', 'absolute-paths' ] }
1843 # Either @device or @node-name must be set but not both.
1845 # @device: #optional the name of the device to generate the snapshot from.
1847 # @node-name: #optional graph node name to generate the snapshot from (Since 2.0)
1849 # @snapshot-file: the target of the new image. A new file will be created.
1851 # @snapshot-node-name: #optional the graph node name of the new image (Since 2.0)
1853 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1855 # @mode: #optional whether and how QEMU should create a new image, default is
1858 { 'type': 'BlockdevSnapshot',
1859 'data': { '*device': 'str', '*node-name': 'str',
1860 'snapshot-file': 'str', '*snapshot-node-name': 'str',
1861 '*format': 'str', '*mode': 'NewImageMode' } }
1864 # @BlockdevSnapshotInternal
1866 # @device: the name of the device to generate the snapshot from
1868 # @name: the name of the internal snapshot to be created
1870 # Notes: In transaction, if @name is empty, or any snapshot matching @name
1871 # exists, the operation will fail. Only some image formats support it,
1872 # for example, qcow2, rbd, and sheepdog.
1876 { 'type': 'BlockdevSnapshotInternal',
1877 'data': { 'device': 'str', 'name': 'str' } }
1882 # @device: the name of the device which should be copied.
1884 # @target: the target of the new image. If the file exists, or if it
1885 # is a device, the existing file/device will be used as the new
1886 # destination. If it does not exist, a new file will be created.
1888 # @format: #optional the format of the new destination, default is to
1889 # probe if @mode is 'existing', else the format of the source
1891 # @sync: what parts of the disk image should be copied to the destination
1892 # (all the disk, only the sectors allocated in the topmost image, or
1895 # @mode: #optional whether and how QEMU should create a new image, default is
1898 # @speed: #optional the maximum speed, in bytes per second
1900 # @on-source-error: #optional the action to take on an error on the source,
1901 # default 'report'. 'stop' and 'enospc' can only be used
1902 # if the block device supports io-status (see BlockInfo).
1904 # @on-target-error: #optional the action to take on an error on the target,
1905 # default 'report' (no limitations, since this applies to
1906 # a different block device than @device).
1908 # Note that @on-source-error and @on-target-error only affect background I/O.
1909 # If an error occurs during a guest write request, the device's rerror/werror
1910 # actions will be used.
1914 { 'type': 'DriveBackup',
1915 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1916 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1918 '*on-source-error': 'BlockdevOnError',
1919 '*on-target-error': 'BlockdevOnError' } }
1924 # This action can be used to test transaction failure.
1932 # @TransactionAction
1934 # A discriminated record of operations that can be performed with
1937 { 'union': 'TransactionAction',
1939 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1940 'drive-backup': 'DriveBackup',
1942 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1948 # Executes a number of transactionable QMP commands atomically. If any
1949 # operation fails, then the entire set of actions will be abandoned and the
1950 # appropriate error returned.
1953 # @TransactionAction: information needed for the respective operation
1955 # Returns: nothing on success
1956 # Errors depend on the operations of the transaction
1958 # Note: The transaction aborts on the first failure. Therefore, there will be
1959 # information on only one failed operation returned in an error condition, and
1960 # subsequent actions will not have been attempted.
1964 { 'command': 'transaction',
1965 'data': { 'actions': [ 'TransactionAction' ] } }
1968 # @blockdev-snapshot-sync
1970 # Generates a synchronous snapshot of a block device.
1972 # For the arguments, see the documentation of BlockdevSnapshot.
1974 # Returns: nothing on success
1975 # If @device is not a valid block device, DeviceNotFound
1979 { 'command': 'blockdev-snapshot-sync',
1980 'data': 'BlockdevSnapshot' }
1983 # @blockdev-snapshot-internal-sync
1985 # Synchronously take an internal snapshot of a block device, when the format
1986 # of the image used supports it.
1988 # For the arguments, see the documentation of BlockdevSnapshotInternal.
1990 # Returns: nothing on success
1991 # If @device is not a valid block device, DeviceNotFound
1992 # If any snapshot matching @name exists, or @name is empty,
1994 # If the format of the image used does not support it,
1995 # BlockFormatFeatureNotSupported
1999 { 'command': 'blockdev-snapshot-internal-sync',
2000 'data': 'BlockdevSnapshotInternal' }
2003 # @blockdev-snapshot-delete-internal-sync
2005 # Synchronously delete an internal snapshot of a block device, when the format
2006 # of the image used support it. The snapshot is identified by name or id or
2007 # both. One of the name or id is required. Return SnapshotInfo for the
2008 # successfully deleted snapshot.
2010 # @device: the name of the device to delete the snapshot from
2012 # @id: optional the snapshot's ID to be deleted
2014 # @name: optional the snapshot's name to be deleted
2016 # Returns: SnapshotInfo on success
2017 # If @device is not a valid block device, DeviceNotFound
2018 # If snapshot not found, GenericError
2019 # If the format of the image used does not support it,
2020 # BlockFormatFeatureNotSupported
2021 # If @id and @name are both not specified, GenericError
2025 { 'command': 'blockdev-snapshot-delete-internal-sync',
2026 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
2027 'returns': 'SnapshotInfo' }
2030 # @human-monitor-command:
2032 # Execute a command on the human monitor and return the output.
2034 # @command-line: the command to execute in the human monitor
2036 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2038 # Returns: the output of the command as a string
2042 # Notes: This command only exists as a stop-gap. Its use is highly
2043 # discouraged. The semantics of this command are not guaranteed.
2045 # Known limitations:
2047 # o This command is stateless, this means that commands that depend
2048 # on state information (such as getfd) might not work
2050 # o Commands that prompt the user for data (eg. 'cont' when the block
2051 # device is encrypted) don't currently work
2053 { 'command': 'human-monitor-command',
2054 'data': {'command-line': 'str', '*cpu-index': 'int'},
2060 # Live commit of data from overlay image nodes into backing nodes - i.e.,
2061 # writes data between 'top' and 'base' into 'base'.
2063 # @device: the name of the device
2065 # @base: #optional The file name of the backing image to write data into.
2066 # If not specified, this is the deepest backing image
2068 # @top: The file name of the backing image within the image chain,
2069 # which contains the topmost data to be committed down.
2071 # If top == base, that is an error.
2072 # If top == active, the job will not be completed by itself,
2073 # user needs to complete the job with the block-job-complete
2074 # command after getting the ready event. (Since 2.0)
2076 # If the base image is smaller than top, then the base image
2077 # will be resized to be the same size as top. If top is
2078 # smaller than the base image, the base will not be
2079 # truncated. If you want the base image size to match the
2080 # size of the smaller top, you can safely truncate it
2081 # yourself once the commit operation successfully completes.
2084 # @speed: #optional the maximum speed, in bytes per second
2086 # Returns: Nothing on success
2087 # If commit or stream is already active on this device, DeviceInUse
2088 # If @device does not exist, DeviceNotFound
2089 # If image commit is not supported by this device, NotSupported
2090 # If @base or @top is invalid, a generic error is returned
2091 # If @speed is invalid, InvalidParameter
2096 { 'command': 'block-commit',
2097 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
2103 # Start a point-in-time copy of a block device to a new destination. The
2104 # status of ongoing drive-backup operations can be checked with
2105 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
2106 # The operation can be stopped before it has completed using the
2107 # block-job-cancel command.
2109 # For the arguments, see the documentation of DriveBackup.
2111 # Returns: nothing on success
2112 # If @device is not a valid block device, DeviceNotFound
2116 { 'command': 'drive-backup', 'data': 'DriveBackup' }
2119 # @query-named-block-nodes
2121 # Get the named block driver list
2123 # Returns: the list of BlockDeviceInfo
2127 { 'command': 'query-named-block-nodes', 'returns': [ 'BlockDeviceInfo' ] }
2132 # Start mirroring a block device's writes to a new destination.
2134 # @device: the name of the device whose writes should be mirrored.
2136 # @target: the target of the new image. If the file exists, or if it
2137 # is a device, the existing file/device will be used as the new
2138 # destination. If it does not exist, a new file will be created.
2140 # @format: #optional the format of the new destination, default is to
2141 # probe if @mode is 'existing', else the format of the source
2143 # @mode: #optional whether and how QEMU should create a new image, default is
2146 # @speed: #optional the maximum speed, in bytes per second
2148 # @sync: what parts of the disk image should be copied to the destination
2149 # (all the disk, only the sectors allocated in the topmost image, or
2152 # @granularity: #optional granularity of the dirty bitmap, default is 64K
2153 # if the image format doesn't have clusters, 4K if the clusters
2154 # are smaller than that, else the cluster size. Must be a
2155 # power of 2 between 512 and 64M (since 1.4).
2157 # @buf-size: #optional maximum amount of data in flight from source to
2158 # target (since 1.4).
2160 # @on-source-error: #optional the action to take on an error on the source,
2161 # default 'report'. 'stop' and 'enospc' can only be used
2162 # if the block device supports io-status (see BlockInfo).
2164 # @on-target-error: #optional the action to take on an error on the target,
2165 # default 'report' (no limitations, since this applies to
2166 # a different block device than @device).
2168 # Returns: nothing on success
2169 # If @device is not a valid block device, DeviceNotFound
2173 { 'command': 'drive-mirror',
2174 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
2175 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
2176 '*speed': 'int', '*granularity': 'uint32',
2177 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
2178 '*on-target-error': 'BlockdevOnError' } }
2183 # Cancel the current executing migration process.
2185 # Returns: nothing on success
2187 # Notes: This command succeeds even if there is no migration process running.
2191 { 'command': 'migrate_cancel' }
2194 # @migrate_set_downtime
2196 # Set maximum tolerated downtime for migration.
2198 # @value: maximum downtime in seconds
2200 # Returns: nothing on success
2204 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2207 # @migrate_set_speed
2209 # Set maximum speed for migration.
2211 # @value: maximum speed in bytes.
2213 # Returns: nothing on success
2215 # Notes: A value lesser than zero will be automatically round up to zero.
2219 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2222 # @migrate-set-cache-size
2224 # Set XBZRLE cache size
2226 # @value: cache size in bytes
2228 # The size will be rounded down to the nearest power of 2.
2229 # The cache size can be modified before and during ongoing migration
2231 # Returns: nothing on success
2235 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2238 # @query-migrate-cache-size
2240 # query XBZRLE cache size
2242 # Returns: XBZRLE cache size in bytes
2246 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2249 # @ObjectPropertyInfo:
2251 # @name: the name of the property
2253 # @type: the type of the property. This will typically come in one of four
2256 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2257 # These types are mapped to the appropriate JSON type.
2259 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
2260 # legacy qdev typename. These types are always treated as strings.
2262 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
2263 # device type name. Child properties create the composition tree.
2265 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
2266 # device type name. Link properties form the device model graph.
2270 { 'type': 'ObjectPropertyInfo',
2271 'data': { 'name': 'str', 'type': 'str' } }
2276 # This command will list any properties of a object given a path in the object
2279 # @path: the path within the object model. See @qom-get for a description of
2282 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2287 { 'command': 'qom-list',
2288 'data': { 'path': 'str' },
2289 'returns': [ 'ObjectPropertyInfo' ] }
2294 # This command will get a property from a object model path and return the
2297 # @path: The path within the object model. There are two forms of supported
2298 # paths--absolute and partial paths.
2300 # Absolute paths are derived from the root object and can follow child<>
2301 # or link<> properties. Since they can follow link<> properties, they
2302 # can be arbitrarily long. Absolute paths look like absolute filenames
2303 # and are prefixed with a leading slash.
2305 # Partial paths look like relative filenames. They do not begin
2306 # with a prefix. The matching rules for partial paths are subtle but
2307 # designed to make specifying objects easy. At each level of the
2308 # composition tree, the partial path is matched as an absolute path.
2309 # The first match is not returned. At least two matches are searched
2310 # for. A successful result is only returned if only one match is
2311 # found. If more than one match is found, a flag is return to
2312 # indicate that the match was ambiguous.
2314 # @property: The property name to read
2316 # Returns: The property value. The type depends on the property type. legacy<>
2317 # properties are returned as #str. child<> and link<> properties are
2318 # returns as #str pathnames. All integer property types (u8, u16, etc)
2319 # are returned as #int.
2323 { 'command': 'qom-get',
2324 'data': { 'path': 'str', 'property': 'str' },
2325 'returns': 'visitor',
2331 # This command will set a property from a object model path.
2333 # @path: see @qom-get for a description of this parameter
2335 # @property: the property name to set
2337 # @value: a value who's type is appropriate for the property type. See @qom-get
2338 # for a description of type mapping.
2342 { 'command': 'qom-set',
2343 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2349 # Sets the password of a remote display session.
2351 # @protocol: `vnc' to modify the VNC server password
2352 # `spice' to modify the Spice server password
2354 # @password: the new password
2356 # @connected: #optional how to handle existing clients when changing the
2357 # password. If nothing is specified, defaults to `keep'
2358 # `fail' to fail the command if clients are connected
2359 # `disconnect' to disconnect existing clients
2360 # `keep' to maintain existing clients
2362 # Returns: Nothing on success
2363 # If Spice is not enabled, DeviceNotFound
2367 { 'command': 'set_password',
2368 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2373 # Expire the password of a remote display server.
2375 # @protocol: the name of the remote display protocol `vnc' or `spice'
2377 # @time: when to expire the password.
2378 # `now' to expire the password immediately
2379 # `never' to cancel password expiration
2380 # `+INT' where INT is the number of seconds from now (integer)
2381 # `INT' where INT is the absolute time in seconds
2383 # Returns: Nothing on success
2384 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2388 # Notes: Time is relative to the server and currently there is no way to
2389 # coordinate server time with client time. It is not recommended to
2390 # use the absolute time version of the @time parameter unless you're
2391 # sure you are on the same machine as the QEMU instance.
2393 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2398 # Ejects a device from a removable drive.
2400 # @device: The name of the device
2402 # @force: @optional If true, eject regardless of whether the drive is locked.
2403 # If not specified, the default value is false.
2405 # Returns: Nothing on success
2406 # If @device is not a valid block device, DeviceNotFound
2408 # Notes: Ejecting a device will no media results in success
2412 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2415 # @change-vnc-password:
2417 # Change the VNC server password.
2419 # @target: the new password to use with VNC authentication
2423 # Notes: An empty password in this command will set the password to the empty
2424 # string. Existing clients are unaffected by executing this command.
2426 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2431 # This command is multiple commands multiplexed together.
2433 # @device: This is normally the name of a block device but it may also be 'vnc'.
2434 # when it's 'vnc', then sub command depends on @target
2436 # @target: If @device is a block device, then this is the new filename.
2437 # If @device is 'vnc', then if the value 'password' selects the vnc
2438 # change password command. Otherwise, this specifies a new server URI
2439 # address to listen to for VNC connections.
2441 # @arg: If @device is a block device, then this is an optional format to open
2443 # If @device is 'vnc' and @target is 'password', this is the new VNC
2444 # password to set. If this argument is an empty string, then no future
2445 # logins will be allowed.
2447 # Returns: Nothing on success.
2448 # If @device is not a valid block device, DeviceNotFound
2449 # If the new block device is encrypted, DeviceEncrypted. Note that
2450 # if this error is returned, the device has been opened successfully
2451 # and an additional call to @block_passwd is required to set the
2452 # device's password. The behavior of reads and writes to the block
2453 # device between when these calls are executed is undefined.
2455 # Notes: It is strongly recommended that this interface is not used especially
2456 # for changing block devices.
2460 { 'command': 'change',
2461 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2464 # @block_set_io_throttle:
2466 # Change I/O throttle limits for a block drive.
2468 # @device: The name of the device
2470 # @bps: total throughput limit in bytes per second
2472 # @bps_rd: read throughput limit in bytes per second
2474 # @bps_wr: write throughput limit in bytes per second
2476 # @iops: total I/O operations per second
2478 # @ops_rd: read I/O operations per second
2480 # @iops_wr: write I/O operations per second
2482 # @bps_max: #optional total max in bytes (Since 1.7)
2484 # @bps_rd_max: #optional read max in bytes (Since 1.7)
2486 # @bps_wr_max: #optional write max in bytes (Since 1.7)
2488 # @iops_max: #optional total I/O operations max (Since 1.7)
2490 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
2492 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
2494 # @iops_size: #optional an I/O size in bytes (Since 1.7)
2496 # Returns: Nothing on success
2497 # If @device is not a valid block device, DeviceNotFound
2501 { 'command': 'block_set_io_throttle',
2502 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2503 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
2504 '*bps_max': 'int', '*bps_rd_max': 'int',
2505 '*bps_wr_max': 'int', '*iops_max': 'int',
2506 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
2507 '*iops_size': 'int' } }
2512 # Copy data from a backing file into a block device.
2514 # The block streaming operation is performed in the background until the entire
2515 # backing file has been copied. This command returns immediately once streaming
2516 # has started. The status of ongoing block streaming operations can be checked
2517 # with query-block-jobs. The operation can be stopped before it has completed
2518 # using the block-job-cancel command.
2520 # If a base file is specified then sectors are not copied from that base file and
2521 # its backing chain. When streaming completes the image file will have the base
2522 # file as its backing file. This can be used to stream a subset of the backing
2523 # file chain instead of flattening the entire image.
2525 # On successful completion the image file is updated to drop the backing file
2526 # and the BLOCK_JOB_COMPLETED event is emitted.
2528 # @device: the device name
2530 # @base: #optional the common backing file name
2532 # @speed: #optional the maximum speed, in bytes per second
2534 # @on-error: #optional the action to take on an error (default report).
2535 # 'stop' and 'enospc' can only be used if the block device
2536 # supports io-status (see BlockInfo). Since 1.3.
2538 # Returns: Nothing on success
2539 # If @device does not exist, DeviceNotFound
2543 { 'command': 'block-stream',
2544 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2545 '*on-error': 'BlockdevOnError' } }
2548 # @block-job-set-speed:
2550 # Set maximum speed for a background block operation.
2552 # This command can only be issued when there is an active block job.
2554 # Throttling can be disabled by setting the speed to 0.
2556 # @device: the device name
2558 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2561 # Returns: Nothing on success
2562 # If no background operation is active on this device, DeviceNotActive
2566 { 'command': 'block-job-set-speed',
2567 'data': { 'device': 'str', 'speed': 'int' } }
2570 # @block-job-cancel:
2572 # Stop an active background block operation.
2574 # This command returns immediately after marking the active background block
2575 # operation for cancellation. It is an error to call this command if no
2576 # operation is in progress.
2578 # The operation will cancel as soon as possible and then emit the
2579 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2580 # enumerated using query-block-jobs.
2582 # For streaming, the image file retains its backing file unless the streaming
2583 # operation happens to complete just as it is being cancelled. A new streaming
2584 # operation can be started at a later time to finish copying all data from the
2587 # @device: the device name
2589 # @force: #optional whether to allow cancellation of a paused job (default
2590 # false). Since 1.3.
2592 # Returns: Nothing on success
2593 # If no background operation is active on this device, DeviceNotActive
2597 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2602 # Pause an active background block operation.
2604 # This command returns immediately after marking the active background block
2605 # operation for pausing. It is an error to call this command if no
2606 # operation is in progress. Pausing an already paused job has no cumulative
2607 # effect; a single block-job-resume command will resume the job.
2609 # The operation will pause as soon as possible. No event is emitted when
2610 # the operation is actually paused. Cancelling a paused job automatically
2613 # @device: the device name
2615 # Returns: Nothing on success
2616 # If no background operation is active on this device, DeviceNotActive
2620 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2623 # @block-job-resume:
2625 # Resume an active background block operation.
2627 # This command returns immediately after resuming a paused background block
2628 # operation. It is an error to call this command if no operation is in
2629 # progress. Resuming an already running job is not an error.
2631 # This command also clears the error status of the job.
2633 # @device: the device name
2635 # Returns: Nothing on success
2636 # If no background operation is active on this device, DeviceNotActive
2640 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2643 # @block-job-complete:
2645 # Manually trigger completion of an active background block operation. This
2646 # is supported for drive mirroring, where it also switches the device to
2647 # write to the target path only. The ability to complete is signaled with
2648 # a BLOCK_JOB_READY event.
2650 # This command completes an active background block operation synchronously.
2651 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2652 # is not defined. Note that if an I/O error occurs during the processing of
2653 # this command: 1) the command itself will fail; 2) the error will be processed
2654 # according to the rerror/werror arguments that were specified when starting
2657 # A cancelled or paused job cannot be completed.
2659 # @device: the device name
2661 # Returns: Nothing on success
2662 # If no background operation is active on this device, DeviceNotActive
2666 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2671 # This structure describes a search result from @qom-list-types
2673 # @name: the type name found in the search
2677 # Notes: This command is experimental and may change syntax in future releases.
2679 { 'type': 'ObjectTypeInfo',
2680 'data': { 'name': 'str' } }
2685 # This command will return a list of types given search parameters
2687 # @implements: if specified, only return types that implement this type name
2689 # @abstract: if true, include abstract types in the results
2691 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2695 { 'command': 'qom-list-types',
2696 'data': { '*implements': 'str', '*abstract': 'bool' },
2697 'returns': [ 'ObjectTypeInfo' ] }
2700 # @DevicePropertyInfo:
2702 # Information about device properties.
2704 # @name: the name of the property
2705 # @type: the typename of the property
2709 { 'type': 'DevicePropertyInfo',
2710 'data': { 'name': 'str', 'type': 'str' } }
2713 # @device-list-properties:
2715 # List properties associated with a device.
2717 # @typename: the type name of a device
2719 # Returns: a list of DevicePropertyInfo describing a devices properties
2723 { 'command': 'device-list-properties',
2724 'data': { 'typename': 'str'},
2725 'returns': [ 'DevicePropertyInfo' ] }
2730 # Migrates the current running guest to another Virtual Machine.
2732 # @uri: the Uniform Resource Identifier of the destination VM
2734 # @blk: #optional do block migration (full disk copy)
2736 # @inc: #optional incremental disk copy migration
2738 # @detach: this argument exists only for compatibility reasons and
2739 # is ignored by QEMU
2741 # Returns: nothing on success
2745 { 'command': 'migrate',
2746 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2748 # @xen-save-devices-state:
2750 # Save the state of all devices to file. The RAM and the block devices
2751 # of the VM are not saved by this command.
2753 # @filename: the file to save the state of the devices to as binary
2754 # data. See xen-save-devices-state.txt for a description of the binary
2757 # Returns: Nothing on success
2761 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2764 # @xen-set-global-dirty-log
2766 # Enable or disable the global dirty log mode.
2768 # @enable: true to enable, false to disable.
2774 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2779 # Remove a device from a guest
2781 # @id: the name of the device
2783 # Returns: Nothing on success
2784 # If @id is not a valid device, DeviceNotFound
2786 # Notes: When this command completes, the device may not be removed from the
2787 # guest. Hot removal is an operation that requires guest cooperation.
2788 # This command merely requests that the guest begin the hot removal
2789 # process. Completion of the device removal process is signaled with a
2790 # DEVICE_DELETED event. Guest reset will automatically complete removal
2795 { 'command': 'device_del', 'data': {'id': 'str'} }
2798 # @dump-guest-memory
2800 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2801 # very long depending on the amount of guest memory. This command is only
2802 # supported on i386 and x86_64.
2804 # @paging: if true, do paging to get guest's memory mapping. This allows
2805 # using gdb to process the core file.
2807 # IMPORTANT: this option can make QEMU allocate several gigabytes
2808 # of RAM. This can happen for a large guest, or a
2809 # malicious guest pretending to be large.
2811 # Also, paging=true has the following limitations:
2813 # 1. The guest may be in a catastrophic state or can have corrupted
2814 # memory, which cannot be trusted
2815 # 2. The guest can be in real-mode even if paging is enabled. For
2816 # example, the guest uses ACPI to sleep, and ACPI sleep state
2819 # @protocol: the filename or file descriptor of the vmcore. The supported
2822 # 1. file: the protocol starts with "file:", and the following
2823 # string is the file's path.
2824 # 2. fd: the protocol starts with "fd:", and the following string
2827 # @begin: #optional if specified, the starting physical address.
2829 # @length: #optional if specified, the memory size, in bytes. If you don't
2830 # want to dump all guest's memory, please specify the start @begin
2833 # Returns: nothing on success
2837 { 'command': 'dump-guest-memory',
2838 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2839 '*length': 'int' } }
2844 # Add a network backend.
2846 # @type: the type of network backend. Current valid values are 'user', 'tap',
2847 # 'vde', 'socket', 'dump' and 'bridge'
2849 # @id: the name of the new network backend
2851 # @props: #optional a list of properties to be passed to the backend in
2852 # the format 'name=value', like 'ifname=tap0,script=no'
2854 # Notes: The semantics of @props is not well defined. Future commands will be
2855 # introduced that provide stronger typing for backend creation.
2859 # Returns: Nothing on success
2860 # If @type is not a valid network backend, DeviceNotFound
2862 { 'command': 'netdev_add',
2863 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2869 # Remove a network backend.
2871 # @id: the name of the network backend to remove
2873 # Returns: Nothing on success
2874 # If @id is not a valid network backend, DeviceNotFound
2878 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2883 # Create a QOM object.
2885 # @qom-type: the class name for the object to be created
2887 # @id: the name of the new object
2889 # @props: #optional a dictionary of properties to be passed to the backend
2891 # Returns: Nothing on success
2892 # Error if @qom-type is not a valid class name
2896 { 'command': 'object-add',
2897 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
2903 # Remove a QOM object.
2905 # @id: the name of the QOM object to remove
2907 # Returns: Nothing on success
2908 # Error if @id is not a valid id for a QOM object
2912 { 'command': 'object-del', 'data': {'id': 'str'} }
2915 # @NetdevNoneOptions
2917 # Use it alone to have zero network devices.
2921 { 'type': 'NetdevNoneOptions',
2925 # @NetLegacyNicOptions
2927 # Create a new Network Interface Card.
2929 # @netdev: #optional id of -netdev to connect to
2931 # @macaddr: #optional MAC address
2933 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2935 # @addr: #optional PCI device address
2937 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2941 { 'type': 'NetLegacyNicOptions',
2947 '*vectors': 'uint32' } }
2952 # A fat type wrapping 'str', to be embedded in lists.
2961 # @NetdevUserOptions
2963 # Use the user mode network stack which requires no administrator privilege to
2966 # @hostname: #optional client hostname reported by the builtin DHCP server
2968 # @restrict: #optional isolate the guest from the host
2970 # @ip: #optional legacy parameter, use net= instead
2972 # @net: #optional IP address and optional netmask
2974 # @host: #optional guest-visible address of the host
2976 # @tftp: #optional root directory of the built-in TFTP server
2978 # @bootfile: #optional BOOTP filename, for use with tftp=
2980 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2983 # @dns: #optional guest-visible address of the virtual nameserver
2985 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2988 # @smb: #optional root directory of the built-in SMB server
2990 # @smbserver: #optional IP address of the built-in SMB server
2992 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2995 # @guestfwd: #optional forward guest TCP connections
2999 { 'type': 'NetdevUserOptions',
3002 '*restrict': 'bool',
3008 '*dhcpstart': 'str',
3010 '*dnssearch': ['String'],
3012 '*smbserver': 'str',
3013 '*hostfwd': ['String'],
3014 '*guestfwd': ['String'] } }
3019 # Connect the host TAP network interface name to the VLAN.
3021 # @ifname: #optional interface name
3023 # @fd: #optional file descriptor of an already opened tap
3025 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3028 # @script: #optional script to initialize the interface
3030 # @downscript: #optional script to shut down the interface
3032 # @helper: #optional command to execute to configure bridge
3034 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3036 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3038 # @vhost: #optional enable vhost-net network accelerator
3040 # @vhostfd: #optional file descriptor of an already opened vhost net device
3042 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3045 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3047 # @queues: #optional number of queues to be created for multiqueue capable tap
3051 { 'type': 'NetdevTapOptions',
3057 '*downscript': 'str',
3060 '*vnet_hdr': 'bool',
3064 '*vhostforce': 'bool',
3065 '*queues': 'uint32'} }
3068 # @NetdevSocketOptions
3070 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3071 # socket connection.
3073 # @fd: #optional file descriptor of an already opened socket
3075 # @listen: #optional port number, and optional hostname, to listen on
3077 # @connect: #optional port number, and optional hostname, to connect to
3079 # @mcast: #optional UDP multicast address and port number
3081 # @localaddr: #optional source address and port for multicast and udp packets
3083 # @udp: #optional UDP unicast address and port number
3087 { 'type': 'NetdevSocketOptions',
3093 '*localaddr': 'str',
3099 # Connect the VLAN to a vde switch running on the host.
3101 # @sock: #optional socket path
3103 # @port: #optional port number
3105 # @group: #optional group owner of socket
3107 # @mode: #optional permissions for socket
3111 { 'type': 'NetdevVdeOptions',
3116 '*mode': 'uint16' } }
3119 # @NetdevDumpOptions
3121 # Dump VLAN network traffic to a file.
3123 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3126 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3130 { 'type': 'NetdevDumpOptions',
3136 # @NetdevBridgeOptions
3138 # Connect a host TAP network interface to a host bridge device.
3140 # @br: #optional bridge name
3142 # @helper: #optional command to execute to configure bridge
3146 { 'type': 'NetdevBridgeOptions',
3149 '*helper': 'str' } }
3152 # @NetdevHubPortOptions
3154 # Connect two or more net clients through a software hub.
3156 # @hubid: hub identifier number
3160 { 'type': 'NetdevHubPortOptions',
3162 'hubid': 'int32' } }
3165 # @NetdevNetmapOptions
3167 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3169 # @ifname: Either the name of an existing network interface supported by
3170 # netmap, or the name of a VALE port (created on the fly).
3171 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3172 # YYY are non-negative integers. XXX identifies a switch and
3173 # YYY identifies a port of the switch. VALE ports having the
3174 # same XXX are therefore connected to the same switch.
3176 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3180 { 'type': 'NetdevNetmapOptions',
3183 '*devname': 'str' } }
3188 # A discriminated record of network device traits.
3192 { 'union': 'NetClientOptions',
3194 'none': 'NetdevNoneOptions',
3195 'nic': 'NetLegacyNicOptions',
3196 'user': 'NetdevUserOptions',
3197 'tap': 'NetdevTapOptions',
3198 'socket': 'NetdevSocketOptions',
3199 'vde': 'NetdevVdeOptions',
3200 'dump': 'NetdevDumpOptions',
3201 'bridge': 'NetdevBridgeOptions',
3202 'hubport': 'NetdevHubPortOptions',
3203 'netmap': 'NetdevNetmapOptions' } }
3208 # Captures the configuration of a network device; legacy.
3210 # @vlan: #optional vlan number
3212 # @id: #optional identifier for monitor commands
3214 # @name: #optional identifier for monitor commands, ignored if @id is present
3216 # @opts: device type specific properties (legacy)
3220 { 'type': 'NetLegacy',
3225 'opts': 'NetClientOptions' } }
3230 # Captures the configuration of a network device.
3232 # @id: identifier for monitor commands.
3234 # @opts: device type specific properties
3241 'opts': 'NetClientOptions' } }
3244 # @InetSocketAddress
3246 # Captures a socket address or address range in the Internet namespace.
3248 # @host: host part of the address
3250 # @port: port part of the address, or lowest port if @to is present
3252 # @to: highest port to try
3254 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3257 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3262 { 'type': 'InetSocketAddress',
3271 # @UnixSocketAddress
3273 # Captures a socket address in the local ("Unix socket") namespace.
3275 # @path: filesystem path to use
3279 { 'type': 'UnixSocketAddress',
3286 # Captures the address of a socket, which could also be a named file descriptor
3290 { 'union': 'SocketAddress',
3292 'inet': 'InetSocketAddress',
3293 'unix': 'UnixSocketAddress',
3299 # Receive a file descriptor via SCM rights and assign it a name
3301 # @fdname: file descriptor name
3303 # Returns: Nothing on success
3307 # Notes: If @fdname already exists, the file descriptor assigned to
3308 # it will be closed and replaced by the received file
3310 # The 'closefd' command can be used to explicitly close the
3311 # file descriptor when it is no longer needed.
3313 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3318 # Close a file descriptor previously passed via SCM rights
3320 # @fdname: file descriptor name
3322 # Returns: Nothing on success
3326 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3331 # Information describing a machine.
3333 # @name: the name of the machine
3335 # @alias: #optional an alias for the machine name
3337 # @default: #optional whether the machine is default
3339 # @cpu-max: maximum number of CPUs supported by the machine type
3344 { 'type': 'MachineInfo',
3345 'data': { 'name': 'str', '*alias': 'str',
3346 '*is-default': 'bool', 'cpu-max': 'int' } }
3351 # Return a list of supported machines
3353 # Returns: a list of MachineInfo
3357 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3360 # @CpuDefinitionInfo:
3362 # Virtual CPU definition.
3364 # @name: the name of the CPU definition
3368 { 'type': 'CpuDefinitionInfo',
3369 'data': { 'name': 'str' } }
3372 # @query-cpu-definitions:
3374 # Return a list of supported virtual CPU definitions
3376 # Returns: a list of CpuDefInfo
3380 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3384 # Information about a file descriptor that was added to an fd set.
3386 # @fdset-id: The ID of the fd set that @fd was added to.
3388 # @fd: The file descriptor that was received via SCM rights and
3389 # added to the fd set.
3393 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3398 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3400 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3402 # @opaque: #optional A free-form string that can be used to describe the fd.
3404 # Returns: @AddfdInfo on success
3405 # If file descriptor was not received, FdNotSupplied
3406 # If @fdset-id is a negative value, InvalidParameterValue
3408 # Notes: The list of fd sets is shared by all monitor connections.
3410 # If @fdset-id is not specified, a new fd set will be created.
3414 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3415 'returns': 'AddfdInfo' }
3420 # Remove a file descriptor from an fd set.
3422 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3424 # @fd: #optional The file descriptor that is to be removed.
3426 # Returns: Nothing on success
3427 # If @fdset-id or @fd is not found, FdNotFound
3431 # Notes: The list of fd sets is shared by all monitor connections.
3433 # If @fd is not specified, all file descriptors in @fdset-id
3436 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3441 # Information about a file descriptor that belongs to an fd set.
3443 # @fd: The file descriptor value.
3445 # @opaque: #optional A free-form string that can be used to describe the fd.
3449 { 'type': 'FdsetFdInfo',
3450 'data': {'fd': 'int', '*opaque': 'str'} }
3455 # Information about an fd set.
3457 # @fdset-id: The ID of the fd set.
3459 # @fds: A list of file descriptors that belong to this fd set.
3463 { 'type': 'FdsetInfo',
3464 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3469 # Return information describing all fd sets.
3471 # Returns: A list of @FdsetInfo
3475 # Note: The list of fd sets is shared by all monitor connections.
3478 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3483 # Information describing the QEMU target.
3485 # @arch: the target architecture (eg "x86_64", "i386", etc)
3489 { 'type': 'TargetInfo',
3490 'data': { 'arch': 'str' } }
3495 # Return information about the target for this QEMU
3497 # Returns: TargetInfo
3501 { 'command': 'query-target', 'returns': 'TargetInfo' }
3506 # An enumeration of key name.
3508 # This is used by the send-key command.
3512 { 'enum': 'QKeyCode',
3513 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3514 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3515 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3516 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3517 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3518 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3519 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3520 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3521 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3522 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3523 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3524 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3525 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3526 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3527 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3532 # Represents a keyboard key.
3536 { 'union': 'KeyValue',
3539 'qcode': 'QKeyCode' } }
3544 # Send keys to guest.
3546 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3547 # simultaneously sent to the guest. A @KeyValue.number value is sent
3548 # directly to the guest, while @KeyValue.qcode must be a valid
3551 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3554 # Returns: Nothing on success
3555 # If key is unknown or redundant, InvalidParameter
3560 { 'command': 'send-key',
3561 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3566 # Write a PPM of the VGA screen to a file.
3568 # @filename: the path of a new PPM file to store the image
3570 # Returns: Nothing on success
3574 { 'command': 'screendump', 'data': {'filename': 'str'} }
3577 # @nbd-server-start:
3579 # Start an NBD server listening on the given host and port. Block
3580 # devices can then be exported using @nbd-server-add. The NBD
3581 # server will present them as named exports; for example, another
3582 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3584 # @addr: Address on which to listen.
3586 # Returns: error if the server is already running.
3590 { 'command': 'nbd-server-start',
3591 'data': { 'addr': 'SocketAddress' } }
3596 # Export a device to QEMU's embedded NBD server.
3598 # @device: Block device to be exported
3600 # @writable: Whether clients should be able to write to the device via the
3601 # NBD connection (default false). #optional
3603 # Returns: error if the device is already marked for export.
3607 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3612 # Stop QEMU's embedded NBD server, and unregister all devices previously
3613 # added via @nbd-server-add.
3617 { 'command': 'nbd-server-stop' }
3622 # Configuration info for file chardevs.
3624 # @in: #optional The name of the input file
3625 # @out: The name of the output file
3629 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3635 # Configuration info for device and pipe chardevs.
3637 # @device: The name of the special file for the device,
3638 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3639 # @type: What kind of device this is.
3643 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3648 # Configuration info for (stream) socket chardevs.
3650 # @addr: socket address to listen on (server=true)
3651 # or connect to (server=false)
3652 # @server: #optional create server socket (default: true)
3653 # @wait: #optional wait for incoming connection on server
3654 # sockets (default: false).
3655 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3656 # @telnet: #optional enable telnet protocol on server
3657 # sockets (default: false)
3661 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3664 '*nodelay' : 'bool',
3665 '*telnet' : 'bool' } }
3670 # Configuration info for datagram socket chardevs.
3672 # @remote: remote address
3673 # @local: #optional local address
3677 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3678 '*local' : 'SocketAddress' } }
3683 # Configuration info for mux chardevs.
3685 # @chardev: name of the base chardev.
3689 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3694 # Configuration info for stdio chardevs.
3696 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3697 # be delivered to qemu. Default: true in -nographic mode,
3702 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3705 # @ChardevSpiceChannel:
3707 # Configuration info for spice vm channel chardevs.
3709 # @type: kind of channel (for example vdagent).
3713 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3716 # @ChardevSpicePort:
3718 # Configuration info for spice port chardevs.
3720 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3724 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3729 # Configuration info for virtual console chardevs.
3731 # @width: console width, in pixels
3732 # @height: console height, in pixels
3733 # @cols: console width, in chars
3734 # @rows: console height, in chars
3738 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3746 # Configuration info for ring buffer chardevs.
3748 # @size: #optional ring buffer size, must be power of two, default is 65536
3752 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3757 # Configuration info for the new chardev backend.
3761 { 'type': 'ChardevDummy', 'data': { } }
3763 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3764 'serial' : 'ChardevHostdev',
3765 'parallel': 'ChardevHostdev',
3766 'pipe' : 'ChardevHostdev',
3767 'socket' : 'ChardevSocket',
3768 'udp' : 'ChardevUdp',
3769 'pty' : 'ChardevDummy',
3770 'null' : 'ChardevDummy',
3771 'mux' : 'ChardevMux',
3772 'msmouse': 'ChardevDummy',
3773 'braille': 'ChardevDummy',
3774 'stdio' : 'ChardevStdio',
3775 'console': 'ChardevDummy',
3776 'spicevmc' : 'ChardevSpiceChannel',
3777 'spiceport' : 'ChardevSpicePort',
3779 'ringbuf': 'ChardevRingbuf',
3780 # next one is just for compatibility
3781 'memory' : 'ChardevRingbuf' } }
3786 # Return info about the chardev backend just created.
3788 # @pty: #optional name of the slave pseudoterminal device, present if
3789 # and only if a chardev of type 'pty' was created
3793 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3798 # Add a character device backend
3800 # @id: the chardev's ID, must be unique
3801 # @backend: backend type and parameters
3803 # Returns: ChardevReturn.
3807 { 'command': 'chardev-add', 'data': {'id' : 'str',
3808 'backend' : 'ChardevBackend' },
3809 'returns': 'ChardevReturn' }
3814 # Remove a character device backend
3816 # @id: the chardev's ID, must exist and not be in use
3818 # Returns: Nothing on success
3822 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3827 # An enumeration of TPM models
3829 # @tpm-tis: TPM TIS model
3833 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3836 # @query-tpm-models:
3838 # Return a list of supported TPM models
3840 # Returns: a list of TpmModel
3844 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3849 # An enumeration of TPM types
3851 # @passthrough: TPM passthrough type
3855 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3860 # Return a list of supported TPM types
3862 # Returns: a list of TpmType
3866 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3869 # @TPMPassthroughOptions:
3871 # Information about the TPM passthrough type
3873 # @path: #optional string describing the path used for accessing the TPM device
3875 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3876 # for cancellation of TPM commands while they are executing
3880 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3881 '*cancel-path' : 'str'} }
3886 # A union referencing different TPM backend types' configuration options
3888 # @passthrough: The configuration options for the TPM passthrough type
3892 { 'union': 'TpmTypeOptions',
3893 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3898 # Information about the TPM
3900 # @id: The Id of the TPM
3902 # @model: The TPM frontend model
3904 # @options: The TPM (backend) type configuration options
3908 { 'type': 'TPMInfo',
3909 'data': {'id': 'str',
3910 'model': 'TpmModel',
3911 'options': 'TpmTypeOptions' } }
3916 # Return information about the TPM device
3918 # Returns: @TPMInfo on success
3922 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3927 # Specify an ACPI table on the command line to load.
3929 # At most one of @file and @data can be specified. The list of files specified
3930 # by any one of them is loaded and concatenated in order. If both are omitted,
3933 # Other fields / optargs can be used to override fields of the generic ACPI
3934 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3935 # Description Table Header. If a header field is not overridden, then the
3936 # corresponding value from the concatenated blob is used (in case of @file), or
3937 # it is filled in with a hard-coded value (in case of @data).
3939 # String fields are copied into the matching ACPI member from lowest address
3940 # upwards, and silently truncated / NUL-padded to length.
3942 # @sig: #optional table signature / identifier (4 bytes)
3944 # @rev: #optional table revision number (dependent on signature, 1 byte)
3946 # @oem_id: #optional OEM identifier (6 bytes)
3948 # @oem_table_id: #optional OEM table identifier (8 bytes)
3950 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3952 # @asl_compiler_id: #optional identifier of the utility that created the table
3955 # @asl_compiler_rev: #optional revision number of the utility that created the
3958 # @file: #optional colon (:) separated list of pathnames to load and
3959 # concatenate as table data. The resultant binary blob is expected to
3960 # have an ACPI table header. At least one file is required. This field
3963 # @data: #optional colon (:) separated list of pathnames to load and
3964 # concatenate as table data. The resultant binary blob must not have an
3965 # ACPI table header. At least one file is required. This field excludes
3970 { 'type': 'AcpiTableOptions',
3975 '*oem_table_id': 'str',
3976 '*oem_rev': 'uint32',
3977 '*asl_compiler_id': 'str',
3978 '*asl_compiler_rev': 'uint32',
3983 # @CommandLineParameterType:
3985 # Possible types for an option parameter.
3987 # @string: accepts a character string
3989 # @boolean: accepts "on" or "off"
3991 # @number: accepts a number
3993 # @size: accepts a number followed by an optional suffix (K)ilo,
3994 # (M)ega, (G)iga, (T)era
3998 { 'enum': 'CommandLineParameterType',
3999 'data': ['string', 'boolean', 'number', 'size'] }
4002 # @CommandLineParameterInfo:
4004 # Details about a single parameter of a command line option.
4006 # @name: parameter name
4008 # @type: parameter @CommandLineParameterType
4010 # @help: #optional human readable text string, not suitable for parsing.
4014 { 'type': 'CommandLineParameterInfo',
4015 'data': { 'name': 'str',
4016 'type': 'CommandLineParameterType',
4020 # @CommandLineOptionInfo:
4022 # Details about a command line option, including its list of parameter details
4024 # @option: option name
4026 # @parameters: an array of @CommandLineParameterInfo
4030 { 'type': 'CommandLineOptionInfo',
4031 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4034 # @query-command-line-options:
4036 # Query command line option schema.
4038 # @option: #optional option name
4040 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4041 # @option). Returns an error if the given @option doesn't exist.
4045 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4046 'returns': ['CommandLineOptionInfo'] }
4051 # A X86 32-bit register
4055 { 'enum': 'X86CPURegister32',
4056 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4059 # @X86CPUFeatureWordInfo
4061 # Information about a X86 CPU feature word
4063 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4065 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4068 # @cpuid-register: Output register containing the feature bits
4070 # @features: value of output register, containing the feature bits
4074 { 'type': 'X86CPUFeatureWordInfo',
4075 'data': { 'cpuid-input-eax': 'int',
4076 '*cpuid-input-ecx': 'int',
4077 'cpuid-register': 'X86CPURegister32',
4078 'features': 'int' } }
4083 # Packets receiving state
4085 # @normal: filter assigned packets according to the mac-table
4087 # @none: don't receive any assigned packet
4089 # @all: receive all assigned packets
4093 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4098 # Rx-filter information for a NIC.
4100 # @name: net client name
4102 # @promiscuous: whether promiscuous mode is enabled
4104 # @multicast: multicast receive state
4106 # @unicast: unicast receive state
4108 # @broadcast-allowed: whether to receive broadcast
4110 # @multicast-overflow: multicast table is overflowed or not
4112 # @unicast-overflow: unicast table is overflowed or not
4114 # @main-mac: the main macaddr string
4116 # @vlan-table: a list of active vlan id
4118 # @unicast-table: a list of unicast macaddr string
4120 # @multicast-table: a list of multicast macaddr string
4125 { 'type': 'RxFilterInfo',
4128 'promiscuous': 'bool',
4129 'multicast': 'RxState',
4130 'unicast': 'RxState',
4131 'broadcast-allowed': 'bool',
4132 'multicast-overflow': 'bool',
4133 'unicast-overflow': 'bool',
4135 'vlan-table': ['int'],
4136 'unicast-table': ['str'],
4137 'multicast-table': ['str'] }}
4142 # Return rx-filter information for all NICs (or for the given NIC).
4144 # @name: #optional net client name
4146 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4147 # Returns an error if the given @name doesn't exist, or given
4148 # NIC doesn't support rx-filter querying, or given net client
4153 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4154 'returns': ['RxFilterInfo'] }
4158 # @BlockdevDiscardOptions
4160 # Determines how to handle discard requests.
4162 # @ignore: Ignore the request
4163 # @unmap: Forward as an unmap request
4167 { 'enum': 'BlockdevDiscardOptions',
4168 'data': [ 'ignore', 'unmap' ] }
4171 # @BlockdevAioOptions
4173 # Selects the AIO backend to handle I/O requests
4175 # @threads: Use qemu's thread pool
4176 # @native: Use native AIO backend (only Linux and Windows)
4180 { 'enum': 'BlockdevAioOptions',
4181 'data': [ 'threads', 'native' ] }
4184 # @BlockdevCacheOptions
4186 # Includes cache-related options for block devices
4188 # @writeback: #optional enables writeback mode for any caches (default: true)
4189 # @direct: #optional enables use of O_DIRECT (bypass the host page cache;
4191 # @no-flush: #optional ignore any flush requests for the device (default:
4196 { 'type': 'BlockdevCacheOptions',
4197 'data': { '*writeback': 'bool',
4199 '*no-flush': 'bool' } }
4202 # @BlockdevOptionsBase
4204 # Options that are available for all block devices, independent of the block
4207 # @driver: block driver name
4208 # @id: #optional id by which the new block device can be referred to.
4209 # This is a required option on the top level of blockdev-add, and
4210 # currently not allowed on any other level.
4211 # @node-name: #optional the name of a block driver state node (Since 2.0)
4212 # @discard: #optional discard-related options (default: ignore)
4213 # @cache: #optional cache-related options
4214 # @aio: #optional AIO backend (default: threads)
4215 # @rerror: #optional how to handle read errors on the device
4217 # @werror: #optional how to handle write errors on the device
4219 # @read-only: #optional whether the block device should be read-only
4224 { 'type': 'BlockdevOptionsBase',
4225 'data': { 'driver': 'str',
4227 '*node-name': 'str',
4228 '*discard': 'BlockdevDiscardOptions',
4229 '*cache': 'BlockdevCacheOptions',
4230 '*aio': 'BlockdevAioOptions',
4231 '*rerror': 'BlockdevOnError',
4232 '*werror': 'BlockdevOnError',
4233 '*read-only': 'bool' } }
4236 # @BlockdevOptionsFile
4238 # Driver specific block device options for the file backend and similar
4241 # @filename: path to the image file
4245 { 'type': 'BlockdevOptionsFile',
4246 'data': { 'filename': 'str' } }
4249 # @BlockdevOptionsVVFAT
4251 # Driver specific block device options for the vvfat protocol.
4253 # @dir: directory to be exported as FAT image
4254 # @fat-type: #optional FAT type: 12, 16 or 32
4255 # @floppy: #optional whether to export a floppy image (true) or
4256 # partitioned hard disk (false; default)
4257 # @rw: #optional whether to allow write operations (default: false)
4261 { 'type': 'BlockdevOptionsVVFAT',
4262 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
4266 # @BlockdevOptionsGenericFormat
4268 # Driver specific block device options for image format that have no option
4269 # besides their data source.
4271 # @file: reference to or definition of the data source block device
4275 { 'type': 'BlockdevOptionsGenericFormat',
4276 'data': { 'file': 'BlockdevRef' } }
4279 # @BlockdevOptionsGenericCOWFormat
4281 # Driver specific block device options for image format that have no option
4282 # besides their data source and an optional backing file.
4284 # @backing: #optional reference to or definition of the backing file block
4285 # device (if missing, taken from the image file content). It is
4286 # allowed to pass an empty string here in order to disable the
4287 # default backing file.
4291 { 'type': 'BlockdevOptionsGenericCOWFormat',
4292 'base': 'BlockdevOptionsGenericFormat',
4293 'data': { '*backing': 'BlockdevRef' } }
4296 # @BlockdevOptionsQcow2
4298 # Driver specific block device options for qcow2.
4300 # @lazy-refcounts: #optional whether to enable the lazy refcounts
4301 # feature (default is taken from the image file)
4303 # @pass-discard-request: #optional whether discard requests to the qcow2
4304 # device should be forwarded to the data source
4306 # @pass-discard-snapshot: #optional whether discard requests for the data source
4307 # should be issued when a snapshot operation (e.g.
4308 # deleting a snapshot) frees clusters in the qcow2 file
4310 # @pass-discard-other: #optional whether discard requests for the data source
4311 # should be issued on other occasions where a cluster
4316 { 'type': 'BlockdevOptionsQcow2',
4317 'base': 'BlockdevOptionsGenericCOWFormat',
4318 'data': { '*lazy-refcounts': 'bool',
4319 '*pass-discard-request': 'bool',
4320 '*pass-discard-snapshot': 'bool',
4321 '*pass-discard-other': 'bool' } }
4326 # Trigger events supported by blkdebug.
4328 { 'enum': 'BlkdebugEvent',
4329 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
4330 'l1_grow.activate_table', 'l2_load', 'l2_update',
4331 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
4332 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
4333 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
4334 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
4335 'refblock_load', 'refblock_update', 'refblock_update_part',
4336 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
4337 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
4338 'refblock_alloc.switch_table', 'cluster_alloc',
4339 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
4343 # @BlkdebugInjectErrorOptions
4345 # Describes a single error injection for blkdebug.
4347 # @event: trigger event
4349 # @state: #optional the state identifier blkdebug needs to be in to
4350 # actually trigger the event; defaults to "any"
4352 # @errno: #optional error identifier (errno) to be returned; defaults to
4355 # @sector: #optional specifies the sector index which has to be affected
4356 # in order to actually trigger the event; defaults to "any
4359 # @once: #optional disables further events after this one has been
4360 # triggered; defaults to false
4362 # @immediately: #optional fail immediately; defaults to false
4366 { 'type': 'BlkdebugInjectErrorOptions',
4367 'data': { 'event': 'BlkdebugEvent',
4372 '*immediately': 'bool' } }
4375 # @BlkdebugSetStateOptions
4377 # Describes a single state-change event for blkdebug.
4379 # @event: trigger event
4381 # @state: #optional the current state identifier blkdebug needs to be in;
4384 # @new_state: the state identifier blkdebug is supposed to assume if
4385 # this event is triggered
4389 { 'type': 'BlkdebugSetStateOptions',
4390 'data': { 'event': 'BlkdebugEvent',
4392 'new_state': 'int' } }
4395 # @BlockdevOptionsBlkdebug
4397 # Driver specific block device options for blkdebug.
4399 # @image: underlying raw block device (or image file)
4401 # @config: #optional filename of the configuration file
4403 # @align: #optional required alignment for requests in bytes
4405 # @inject-error: #optional array of error injection descriptions
4407 # @set-state: #optional array of state-change descriptions
4411 { 'type': 'BlockdevOptionsBlkdebug',
4412 'data': { 'image': 'BlockdevRef',
4415 '*inject-error': ['BlkdebugInjectErrorOptions'],
4416 '*set-state': ['BlkdebugSetStateOptions'] } }
4419 # @BlockdevOptionsBlkverify
4421 # Driver specific block device options for blkverify.
4423 # @test: block device to be tested
4425 # @raw: raw image used for verification
4429 { 'type': 'BlockdevOptionsBlkverify',
4430 'data': { 'test': 'BlockdevRef',
4431 'raw': 'BlockdevRef' } }
4434 # @BlockdevOptionsQuorum
4436 # Driver specific block device options for Quorum
4438 # @blkverify: #optional true if the driver must print content mismatch
4440 # @children: the children block device to use
4442 # @vote_threshold: the vote limit under which a read will fail
4446 { 'type': 'BlockdevOptionsQuorum',
4447 'data': { '*blkverify': 'bool',
4448 'children': [ 'BlockdevRef' ],
4449 'vote-threshold': 'int' } }
4454 # Options for creating a block device.
4458 { 'union': 'BlockdevOptions',
4459 'base': 'BlockdevOptionsBase',
4460 'discriminator': 'driver',
4462 'file': 'BlockdevOptionsFile',
4463 'http': 'BlockdevOptionsFile',
4464 'https': 'BlockdevOptionsFile',
4465 'ftp': 'BlockdevOptionsFile',
4466 'ftps': 'BlockdevOptionsFile',
4467 'tftp': 'BlockdevOptionsFile',
4468 # TODO gluster: Wait for structured options
4469 # TODO iscsi: Wait for structured options
4470 # TODO nbd: Should take InetSocketAddress for 'host'?
4471 # TODO nfs: Wait for structured options
4472 # TODO rbd: Wait for structured options
4473 # TODO sheepdog: Wait for structured options
4474 # TODO ssh: Should take InetSocketAddress for 'host'?
4475 'vvfat': 'BlockdevOptionsVVFAT',
4476 'blkdebug': 'BlockdevOptionsBlkdebug',
4477 'blkverify': 'BlockdevOptionsBlkverify',
4478 'bochs': 'BlockdevOptionsGenericFormat',
4479 'cloop': 'BlockdevOptionsGenericFormat',
4480 'cow': 'BlockdevOptionsGenericCOWFormat',
4481 'dmg': 'BlockdevOptionsGenericFormat',
4482 'parallels': 'BlockdevOptionsGenericFormat',
4483 'qcow': 'BlockdevOptionsGenericCOWFormat',
4484 'qcow2': 'BlockdevOptionsQcow2',
4485 'qed': 'BlockdevOptionsGenericCOWFormat',
4486 'raw': 'BlockdevOptionsGenericFormat',
4487 'vdi': 'BlockdevOptionsGenericFormat',
4488 'vhdx': 'BlockdevOptionsGenericFormat',
4489 'vmdk': 'BlockdevOptionsGenericCOWFormat',
4490 'vpc': 'BlockdevOptionsGenericFormat',
4491 'quorum': 'BlockdevOptionsQuorum'
4497 # Reference to a block device.
4499 # @definition: defines a new block device inline
4500 # @reference: references the ID of an existing block device. An
4501 # empty string means that no block device should be
4506 { 'union': 'BlockdevRef',
4507 'discriminator': {},
4508 'data': { 'definition': 'BlockdevOptions',
4509 'reference': 'str' } }
4514 # Creates a new block device.
4516 # @options: block device options for the new device
4520 { 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }