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 # @DumpGuestMemoryFormat:
2800 # An enumeration of guest-memory-dump's format.
2804 # @kdump-zlib: kdump-compressed format with zlib-compressed
2806 # @kdump-lzo: kdump-compressed format with lzo-compressed
2808 # @kdump-snappy: kdump-compressed format with snappy-compressed
2812 { 'enum': 'DumpGuestMemoryFormat',
2813 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2816 # @dump-guest-memory
2818 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2819 # very long depending on the amount of guest memory. This command is only
2820 # supported on i386 and x86_64.
2822 # @paging: if true, do paging to get guest's memory mapping. This allows
2823 # using gdb to process the core file.
2825 # IMPORTANT: this option can make QEMU allocate several gigabytes
2826 # of RAM. This can happen for a large guest, or a
2827 # malicious guest pretending to be large.
2829 # Also, paging=true has the following limitations:
2831 # 1. The guest may be in a catastrophic state or can have corrupted
2832 # memory, which cannot be trusted
2833 # 2. The guest can be in real-mode even if paging is enabled. For
2834 # example, the guest uses ACPI to sleep, and ACPI sleep state
2837 # @protocol: the filename or file descriptor of the vmcore. The supported
2840 # 1. file: the protocol starts with "file:", and the following
2841 # string is the file's path.
2842 # 2. fd: the protocol starts with "fd:", and the following string
2845 # @begin: #optional if specified, the starting physical address.
2847 # @length: #optional if specified, the memory size, in bytes. If you don't
2848 # want to dump all guest's memory, please specify the start @begin
2851 # @format: #optional if specified, the format of guest memory dump. But non-elf
2852 # format is conflict with paging and filter, ie. @paging, @begin and
2853 # @length is not allowed to be specified with non-elf @format at the
2854 # same time (since 2.0)
2856 # Returns: nothing on success
2860 { 'command': 'dump-guest-memory',
2861 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2862 '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
2865 # @DumpGuestMemoryCapability:
2867 # A list of the available formats for dump-guest-memory
2871 { 'type': 'DumpGuestMemoryCapability',
2873 'formats': ['DumpGuestMemoryFormat'] } }
2876 # @query-dump-guest-memory-capability:
2878 # Returns the available formats for dump-guest-memory
2880 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2885 { 'command': 'query-dump-guest-memory-capability',
2886 'returns': 'DumpGuestMemoryCapability' }
2891 # Add a network backend.
2893 # @type: the type of network backend. Current valid values are 'user', 'tap',
2894 # 'vde', 'socket', 'dump' and 'bridge'
2896 # @id: the name of the new network backend
2898 # @props: #optional a list of properties to be passed to the backend in
2899 # the format 'name=value', like 'ifname=tap0,script=no'
2901 # Notes: The semantics of @props is not well defined. Future commands will be
2902 # introduced that provide stronger typing for backend creation.
2906 # Returns: Nothing on success
2907 # If @type is not a valid network backend, DeviceNotFound
2909 { 'command': 'netdev_add',
2910 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2916 # Remove a network backend.
2918 # @id: the name of the network backend to remove
2920 # Returns: Nothing on success
2921 # If @id is not a valid network backend, DeviceNotFound
2925 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2930 # Create a QOM object.
2932 # @qom-type: the class name for the object to be created
2934 # @id: the name of the new object
2936 # @props: #optional a dictionary of properties to be passed to the backend
2938 # Returns: Nothing on success
2939 # Error if @qom-type is not a valid class name
2943 { 'command': 'object-add',
2944 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
2950 # Remove a QOM object.
2952 # @id: the name of the QOM object to remove
2954 # Returns: Nothing on success
2955 # Error if @id is not a valid id for a QOM object
2959 { 'command': 'object-del', 'data': {'id': 'str'} }
2962 # @NetdevNoneOptions
2964 # Use it alone to have zero network devices.
2968 { 'type': 'NetdevNoneOptions',
2972 # @NetLegacyNicOptions
2974 # Create a new Network Interface Card.
2976 # @netdev: #optional id of -netdev to connect to
2978 # @macaddr: #optional MAC address
2980 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2982 # @addr: #optional PCI device address
2984 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2988 { 'type': 'NetLegacyNicOptions',
2994 '*vectors': 'uint32' } }
2999 # A fat type wrapping 'str', to be embedded in lists.
3008 # @NetdevUserOptions
3010 # Use the user mode network stack which requires no administrator privilege to
3013 # @hostname: #optional client hostname reported by the builtin DHCP server
3015 # @restrict: #optional isolate the guest from the host
3017 # @ip: #optional legacy parameter, use net= instead
3019 # @net: #optional IP address and optional netmask
3021 # @host: #optional guest-visible address of the host
3023 # @tftp: #optional root directory of the built-in TFTP server
3025 # @bootfile: #optional BOOTP filename, for use with tftp=
3027 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
3030 # @dns: #optional guest-visible address of the virtual nameserver
3032 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
3035 # @smb: #optional root directory of the built-in SMB server
3037 # @smbserver: #optional IP address of the built-in SMB server
3039 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3042 # @guestfwd: #optional forward guest TCP connections
3046 { 'type': 'NetdevUserOptions',
3049 '*restrict': 'bool',
3055 '*dhcpstart': 'str',
3057 '*dnssearch': ['String'],
3059 '*smbserver': 'str',
3060 '*hostfwd': ['String'],
3061 '*guestfwd': ['String'] } }
3066 # Connect the host TAP network interface name to the VLAN.
3068 # @ifname: #optional interface name
3070 # @fd: #optional file descriptor of an already opened tap
3072 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3075 # @script: #optional script to initialize the interface
3077 # @downscript: #optional script to shut down the interface
3079 # @helper: #optional command to execute to configure bridge
3081 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3083 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3085 # @vhost: #optional enable vhost-net network accelerator
3087 # @vhostfd: #optional file descriptor of an already opened vhost net device
3089 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3092 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3094 # @queues: #optional number of queues to be created for multiqueue capable tap
3098 { 'type': 'NetdevTapOptions',
3104 '*downscript': 'str',
3107 '*vnet_hdr': 'bool',
3111 '*vhostforce': 'bool',
3112 '*queues': 'uint32'} }
3115 # @NetdevSocketOptions
3117 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3118 # socket connection.
3120 # @fd: #optional file descriptor of an already opened socket
3122 # @listen: #optional port number, and optional hostname, to listen on
3124 # @connect: #optional port number, and optional hostname, to connect to
3126 # @mcast: #optional UDP multicast address and port number
3128 # @localaddr: #optional source address and port for multicast and udp packets
3130 # @udp: #optional UDP unicast address and port number
3134 { 'type': 'NetdevSocketOptions',
3140 '*localaddr': 'str',
3146 # Connect the VLAN to a vde switch running on the host.
3148 # @sock: #optional socket path
3150 # @port: #optional port number
3152 # @group: #optional group owner of socket
3154 # @mode: #optional permissions for socket
3158 { 'type': 'NetdevVdeOptions',
3163 '*mode': 'uint16' } }
3166 # @NetdevDumpOptions
3168 # Dump VLAN network traffic to a file.
3170 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3173 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3177 { 'type': 'NetdevDumpOptions',
3183 # @NetdevBridgeOptions
3185 # Connect a host TAP network interface to a host bridge device.
3187 # @br: #optional bridge name
3189 # @helper: #optional command to execute to configure bridge
3193 { 'type': 'NetdevBridgeOptions',
3196 '*helper': 'str' } }
3199 # @NetdevHubPortOptions
3201 # Connect two or more net clients through a software hub.
3203 # @hubid: hub identifier number
3207 { 'type': 'NetdevHubPortOptions',
3209 'hubid': 'int32' } }
3212 # @NetdevNetmapOptions
3214 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3216 # @ifname: Either the name of an existing network interface supported by
3217 # netmap, or the name of a VALE port (created on the fly).
3218 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3219 # YYY are non-negative integers. XXX identifies a switch and
3220 # YYY identifies a port of the switch. VALE ports having the
3221 # same XXX are therefore connected to the same switch.
3223 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3227 { 'type': 'NetdevNetmapOptions',
3230 '*devname': 'str' } }
3235 # A discriminated record of network device traits.
3239 { 'union': 'NetClientOptions',
3241 'none': 'NetdevNoneOptions',
3242 'nic': 'NetLegacyNicOptions',
3243 'user': 'NetdevUserOptions',
3244 'tap': 'NetdevTapOptions',
3245 'socket': 'NetdevSocketOptions',
3246 'vde': 'NetdevVdeOptions',
3247 'dump': 'NetdevDumpOptions',
3248 'bridge': 'NetdevBridgeOptions',
3249 'hubport': 'NetdevHubPortOptions',
3250 'netmap': 'NetdevNetmapOptions' } }
3255 # Captures the configuration of a network device; legacy.
3257 # @vlan: #optional vlan number
3259 # @id: #optional identifier for monitor commands
3261 # @name: #optional identifier for monitor commands, ignored if @id is present
3263 # @opts: device type specific properties (legacy)
3267 { 'type': 'NetLegacy',
3272 'opts': 'NetClientOptions' } }
3277 # Captures the configuration of a network device.
3279 # @id: identifier for monitor commands.
3281 # @opts: device type specific properties
3288 'opts': 'NetClientOptions' } }
3291 # @InetSocketAddress
3293 # Captures a socket address or address range in the Internet namespace.
3295 # @host: host part of the address
3297 # @port: port part of the address, or lowest port if @to is present
3299 # @to: highest port to try
3301 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3304 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3309 { 'type': 'InetSocketAddress',
3318 # @UnixSocketAddress
3320 # Captures a socket address in the local ("Unix socket") namespace.
3322 # @path: filesystem path to use
3326 { 'type': 'UnixSocketAddress',
3333 # Captures the address of a socket, which could also be a named file descriptor
3337 { 'union': 'SocketAddress',
3339 'inet': 'InetSocketAddress',
3340 'unix': 'UnixSocketAddress',
3346 # Receive a file descriptor via SCM rights and assign it a name
3348 # @fdname: file descriptor name
3350 # Returns: Nothing on success
3354 # Notes: If @fdname already exists, the file descriptor assigned to
3355 # it will be closed and replaced by the received file
3357 # The 'closefd' command can be used to explicitly close the
3358 # file descriptor when it is no longer needed.
3360 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3365 # Close a file descriptor previously passed via SCM rights
3367 # @fdname: file descriptor name
3369 # Returns: Nothing on success
3373 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3378 # Information describing a machine.
3380 # @name: the name of the machine
3382 # @alias: #optional an alias for the machine name
3384 # @default: #optional whether the machine is default
3386 # @cpu-max: maximum number of CPUs supported by the machine type
3391 { 'type': 'MachineInfo',
3392 'data': { 'name': 'str', '*alias': 'str',
3393 '*is-default': 'bool', 'cpu-max': 'int' } }
3398 # Return a list of supported machines
3400 # Returns: a list of MachineInfo
3404 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3407 # @CpuDefinitionInfo:
3409 # Virtual CPU definition.
3411 # @name: the name of the CPU definition
3415 { 'type': 'CpuDefinitionInfo',
3416 'data': { 'name': 'str' } }
3419 # @query-cpu-definitions:
3421 # Return a list of supported virtual CPU definitions
3423 # Returns: a list of CpuDefInfo
3427 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3431 # Information about a file descriptor that was added to an fd set.
3433 # @fdset-id: The ID of the fd set that @fd was added to.
3435 # @fd: The file descriptor that was received via SCM rights and
3436 # added to the fd set.
3440 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3445 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3447 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3449 # @opaque: #optional A free-form string that can be used to describe the fd.
3451 # Returns: @AddfdInfo on success
3452 # If file descriptor was not received, FdNotSupplied
3453 # If @fdset-id is a negative value, InvalidParameterValue
3455 # Notes: The list of fd sets is shared by all monitor connections.
3457 # If @fdset-id is not specified, a new fd set will be created.
3461 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3462 'returns': 'AddfdInfo' }
3467 # Remove a file descriptor from an fd set.
3469 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3471 # @fd: #optional The file descriptor that is to be removed.
3473 # Returns: Nothing on success
3474 # If @fdset-id or @fd is not found, FdNotFound
3478 # Notes: The list of fd sets is shared by all monitor connections.
3480 # If @fd is not specified, all file descriptors in @fdset-id
3483 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3488 # Information about a file descriptor that belongs to an fd set.
3490 # @fd: The file descriptor value.
3492 # @opaque: #optional A free-form string that can be used to describe the fd.
3496 { 'type': 'FdsetFdInfo',
3497 'data': {'fd': 'int', '*opaque': 'str'} }
3502 # Information about an fd set.
3504 # @fdset-id: The ID of the fd set.
3506 # @fds: A list of file descriptors that belong to this fd set.
3510 { 'type': 'FdsetInfo',
3511 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3516 # Return information describing all fd sets.
3518 # Returns: A list of @FdsetInfo
3522 # Note: The list of fd sets is shared by all monitor connections.
3525 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3530 # Information describing the QEMU target.
3532 # @arch: the target architecture (eg "x86_64", "i386", etc)
3536 { 'type': 'TargetInfo',
3537 'data': { 'arch': 'str' } }
3542 # Return information about the target for this QEMU
3544 # Returns: TargetInfo
3548 { 'command': 'query-target', 'returns': 'TargetInfo' }
3553 # An enumeration of key name.
3555 # This is used by the send-key command.
3559 # 'unmapped' and 'pause' since 2.0
3561 { 'enum': 'QKeyCode',
3562 'data': [ 'unmapped',
3563 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3564 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3565 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3566 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3567 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3568 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3569 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3570 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3571 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3572 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3573 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3574 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3575 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3576 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3577 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
3582 # Represents a keyboard key.
3586 { 'union': 'KeyValue',
3589 'qcode': 'QKeyCode' } }
3594 # Send keys to guest.
3596 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3597 # simultaneously sent to the guest. A @KeyValue.number value is sent
3598 # directly to the guest, while @KeyValue.qcode must be a valid
3601 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3604 # Returns: Nothing on success
3605 # If key is unknown or redundant, InvalidParameter
3610 { 'command': 'send-key',
3611 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3616 # Write a PPM of the VGA screen to a file.
3618 # @filename: the path of a new PPM file to store the image
3620 # Returns: Nothing on success
3624 { 'command': 'screendump', 'data': {'filename': 'str'} }
3627 # @nbd-server-start:
3629 # Start an NBD server listening on the given host and port. Block
3630 # devices can then be exported using @nbd-server-add. The NBD
3631 # server will present them as named exports; for example, another
3632 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3634 # @addr: Address on which to listen.
3636 # Returns: error if the server is already running.
3640 { 'command': 'nbd-server-start',
3641 'data': { 'addr': 'SocketAddress' } }
3646 # Export a device to QEMU's embedded NBD server.
3648 # @device: Block device to be exported
3650 # @writable: Whether clients should be able to write to the device via the
3651 # NBD connection (default false). #optional
3653 # Returns: error if the device is already marked for export.
3657 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3662 # Stop QEMU's embedded NBD server, and unregister all devices previously
3663 # added via @nbd-server-add.
3667 { 'command': 'nbd-server-stop' }
3672 # Configuration info for file chardevs.
3674 # @in: #optional The name of the input file
3675 # @out: The name of the output file
3679 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3685 # Configuration info for device and pipe chardevs.
3687 # @device: The name of the special file for the device,
3688 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3689 # @type: What kind of device this is.
3693 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3698 # Configuration info for (stream) socket chardevs.
3700 # @addr: socket address to listen on (server=true)
3701 # or connect to (server=false)
3702 # @server: #optional create server socket (default: true)
3703 # @wait: #optional wait for incoming connection on server
3704 # sockets (default: false).
3705 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3706 # @telnet: #optional enable telnet protocol on server
3707 # sockets (default: false)
3711 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3714 '*nodelay' : 'bool',
3715 '*telnet' : 'bool' } }
3720 # Configuration info for datagram socket chardevs.
3722 # @remote: remote address
3723 # @local: #optional local address
3727 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3728 '*local' : 'SocketAddress' } }
3733 # Configuration info for mux chardevs.
3735 # @chardev: name of the base chardev.
3739 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3744 # Configuration info for stdio chardevs.
3746 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3747 # be delivered to qemu. Default: true in -nographic mode,
3752 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3755 # @ChardevSpiceChannel:
3757 # Configuration info for spice vm channel chardevs.
3759 # @type: kind of channel (for example vdagent).
3763 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3766 # @ChardevSpicePort:
3768 # Configuration info for spice port chardevs.
3770 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3774 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3779 # Configuration info for virtual console chardevs.
3781 # @width: console width, in pixels
3782 # @height: console height, in pixels
3783 # @cols: console width, in chars
3784 # @rows: console height, in chars
3788 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3796 # Configuration info for ring buffer chardevs.
3798 # @size: #optional ring buffer size, must be power of two, default is 65536
3802 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3807 # Configuration info for the new chardev backend.
3811 { 'type': 'ChardevDummy', 'data': { } }
3813 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3814 'serial' : 'ChardevHostdev',
3815 'parallel': 'ChardevHostdev',
3816 'pipe' : 'ChardevHostdev',
3817 'socket' : 'ChardevSocket',
3818 'udp' : 'ChardevUdp',
3819 'pty' : 'ChardevDummy',
3820 'null' : 'ChardevDummy',
3821 'mux' : 'ChardevMux',
3822 'msmouse': 'ChardevDummy',
3823 'braille': 'ChardevDummy',
3824 'stdio' : 'ChardevStdio',
3825 'console': 'ChardevDummy',
3826 'spicevmc' : 'ChardevSpiceChannel',
3827 'spiceport' : 'ChardevSpicePort',
3829 'ringbuf': 'ChardevRingbuf',
3830 # next one is just for compatibility
3831 'memory' : 'ChardevRingbuf' } }
3836 # Return info about the chardev backend just created.
3838 # @pty: #optional name of the slave pseudoterminal device, present if
3839 # and only if a chardev of type 'pty' was created
3843 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3848 # Add a character device backend
3850 # @id: the chardev's ID, must be unique
3851 # @backend: backend type and parameters
3853 # Returns: ChardevReturn.
3857 { 'command': 'chardev-add', 'data': {'id' : 'str',
3858 'backend' : 'ChardevBackend' },
3859 'returns': 'ChardevReturn' }
3864 # Remove a character device backend
3866 # @id: the chardev's ID, must exist and not be in use
3868 # Returns: Nothing on success
3872 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3877 # An enumeration of TPM models
3879 # @tpm-tis: TPM TIS model
3883 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3886 # @query-tpm-models:
3888 # Return a list of supported TPM models
3890 # Returns: a list of TpmModel
3894 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3899 # An enumeration of TPM types
3901 # @passthrough: TPM passthrough type
3905 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3910 # Return a list of supported TPM types
3912 # Returns: a list of TpmType
3916 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3919 # @TPMPassthroughOptions:
3921 # Information about the TPM passthrough type
3923 # @path: #optional string describing the path used for accessing the TPM device
3925 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3926 # for cancellation of TPM commands while they are executing
3930 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3931 '*cancel-path' : 'str'} }
3936 # A union referencing different TPM backend types' configuration options
3938 # @passthrough: The configuration options for the TPM passthrough type
3942 { 'union': 'TpmTypeOptions',
3943 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3948 # Information about the TPM
3950 # @id: The Id of the TPM
3952 # @model: The TPM frontend model
3954 # @options: The TPM (backend) type configuration options
3958 { 'type': 'TPMInfo',
3959 'data': {'id': 'str',
3960 'model': 'TpmModel',
3961 'options': 'TpmTypeOptions' } }
3966 # Return information about the TPM device
3968 # Returns: @TPMInfo on success
3972 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3977 # Specify an ACPI table on the command line to load.
3979 # At most one of @file and @data can be specified. The list of files specified
3980 # by any one of them is loaded and concatenated in order. If both are omitted,
3983 # Other fields / optargs can be used to override fields of the generic ACPI
3984 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3985 # Description Table Header. If a header field is not overridden, then the
3986 # corresponding value from the concatenated blob is used (in case of @file), or
3987 # it is filled in with a hard-coded value (in case of @data).
3989 # String fields are copied into the matching ACPI member from lowest address
3990 # upwards, and silently truncated / NUL-padded to length.
3992 # @sig: #optional table signature / identifier (4 bytes)
3994 # @rev: #optional table revision number (dependent on signature, 1 byte)
3996 # @oem_id: #optional OEM identifier (6 bytes)
3998 # @oem_table_id: #optional OEM table identifier (8 bytes)
4000 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4002 # @asl_compiler_id: #optional identifier of the utility that created the table
4005 # @asl_compiler_rev: #optional revision number of the utility that created the
4008 # @file: #optional colon (:) separated list of pathnames to load and
4009 # concatenate as table data. The resultant binary blob is expected to
4010 # have an ACPI table header. At least one file is required. This field
4013 # @data: #optional colon (:) separated list of pathnames to load and
4014 # concatenate as table data. The resultant binary blob must not have an
4015 # ACPI table header. At least one file is required. This field excludes
4020 { 'type': 'AcpiTableOptions',
4025 '*oem_table_id': 'str',
4026 '*oem_rev': 'uint32',
4027 '*asl_compiler_id': 'str',
4028 '*asl_compiler_rev': 'uint32',
4033 # @CommandLineParameterType:
4035 # Possible types for an option parameter.
4037 # @string: accepts a character string
4039 # @boolean: accepts "on" or "off"
4041 # @number: accepts a number
4043 # @size: accepts a number followed by an optional suffix (K)ilo,
4044 # (M)ega, (G)iga, (T)era
4048 { 'enum': 'CommandLineParameterType',
4049 'data': ['string', 'boolean', 'number', 'size'] }
4052 # @CommandLineParameterInfo:
4054 # Details about a single parameter of a command line option.
4056 # @name: parameter name
4058 # @type: parameter @CommandLineParameterType
4060 # @help: #optional human readable text string, not suitable for parsing.
4064 { 'type': 'CommandLineParameterInfo',
4065 'data': { 'name': 'str',
4066 'type': 'CommandLineParameterType',
4070 # @CommandLineOptionInfo:
4072 # Details about a command line option, including its list of parameter details
4074 # @option: option name
4076 # @parameters: an array of @CommandLineParameterInfo
4080 { 'type': 'CommandLineOptionInfo',
4081 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4084 # @query-command-line-options:
4086 # Query command line option schema.
4088 # @option: #optional option name
4090 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4091 # @option). Returns an error if the given @option doesn't exist.
4095 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4096 'returns': ['CommandLineOptionInfo'] }
4101 # A X86 32-bit register
4105 { 'enum': 'X86CPURegister32',
4106 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4109 # @X86CPUFeatureWordInfo
4111 # Information about a X86 CPU feature word
4113 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4115 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4118 # @cpuid-register: Output register containing the feature bits
4120 # @features: value of output register, containing the feature bits
4124 { 'type': 'X86CPUFeatureWordInfo',
4125 'data': { 'cpuid-input-eax': 'int',
4126 '*cpuid-input-ecx': 'int',
4127 'cpuid-register': 'X86CPURegister32',
4128 'features': 'int' } }
4133 # Packets receiving state
4135 # @normal: filter assigned packets according to the mac-table
4137 # @none: don't receive any assigned packet
4139 # @all: receive all assigned packets
4143 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4148 # Rx-filter information for a NIC.
4150 # @name: net client name
4152 # @promiscuous: whether promiscuous mode is enabled
4154 # @multicast: multicast receive state
4156 # @unicast: unicast receive state
4158 # @broadcast-allowed: whether to receive broadcast
4160 # @multicast-overflow: multicast table is overflowed or not
4162 # @unicast-overflow: unicast table is overflowed or not
4164 # @main-mac: the main macaddr string
4166 # @vlan-table: a list of active vlan id
4168 # @unicast-table: a list of unicast macaddr string
4170 # @multicast-table: a list of multicast macaddr string
4175 { 'type': 'RxFilterInfo',
4178 'promiscuous': 'bool',
4179 'multicast': 'RxState',
4180 'unicast': 'RxState',
4181 'broadcast-allowed': 'bool',
4182 'multicast-overflow': 'bool',
4183 'unicast-overflow': 'bool',
4185 'vlan-table': ['int'],
4186 'unicast-table': ['str'],
4187 'multicast-table': ['str'] }}
4192 # Return rx-filter information for all NICs (or for the given NIC).
4194 # @name: #optional net client name
4196 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4197 # Returns an error if the given @name doesn't exist, or given
4198 # NIC doesn't support rx-filter querying, or given net client
4203 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4204 'returns': ['RxFilterInfo'] }
4208 # @BlockdevDiscardOptions
4210 # Determines how to handle discard requests.
4212 # @ignore: Ignore the request
4213 # @unmap: Forward as an unmap request
4217 { 'enum': 'BlockdevDiscardOptions',
4218 'data': [ 'ignore', 'unmap' ] }
4221 # @BlockdevAioOptions
4223 # Selects the AIO backend to handle I/O requests
4225 # @threads: Use qemu's thread pool
4226 # @native: Use native AIO backend (only Linux and Windows)
4230 { 'enum': 'BlockdevAioOptions',
4231 'data': [ 'threads', 'native' ] }
4234 # @BlockdevCacheOptions
4236 # Includes cache-related options for block devices
4238 # @writeback: #optional enables writeback mode for any caches (default: true)
4239 # @direct: #optional enables use of O_DIRECT (bypass the host page cache;
4241 # @no-flush: #optional ignore any flush requests for the device (default:
4246 { 'type': 'BlockdevCacheOptions',
4247 'data': { '*writeback': 'bool',
4249 '*no-flush': 'bool' } }
4254 # Drivers that are supported in block device operations.
4258 { 'enum': 'BlockdevDriver',
4259 'data': [ 'file', 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
4260 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
4261 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
4264 # @BlockdevOptionsBase
4266 # Options that are available for all block devices, independent of the block
4269 # @driver: block driver name
4270 # @id: #optional id by which the new block device can be referred to.
4271 # This is a required option on the top level of blockdev-add, and
4272 # currently not allowed on any other level.
4273 # @node-name: #optional the name of a block driver state node (Since 2.0)
4274 # @discard: #optional discard-related options (default: ignore)
4275 # @cache: #optional cache-related options
4276 # @aio: #optional AIO backend (default: threads)
4277 # @rerror: #optional how to handle read errors on the device
4279 # @werror: #optional how to handle write errors on the device
4281 # @read-only: #optional whether the block device should be read-only
4286 { 'type': 'BlockdevOptionsBase',
4287 'data': { 'driver': 'BlockdevDriver',
4289 '*node-name': 'str',
4290 '*discard': 'BlockdevDiscardOptions',
4291 '*cache': 'BlockdevCacheOptions',
4292 '*aio': 'BlockdevAioOptions',
4293 '*rerror': 'BlockdevOnError',
4294 '*werror': 'BlockdevOnError',
4295 '*read-only': 'bool' } }
4298 # @BlockdevOptionsFile
4300 # Driver specific block device options for the file backend and similar
4303 # @filename: path to the image file
4307 { 'type': 'BlockdevOptionsFile',
4308 'data': { 'filename': 'str' } }
4311 # @BlockdevOptionsVVFAT
4313 # Driver specific block device options for the vvfat protocol.
4315 # @dir: directory to be exported as FAT image
4316 # @fat-type: #optional FAT type: 12, 16 or 32
4317 # @floppy: #optional whether to export a floppy image (true) or
4318 # partitioned hard disk (false; default)
4319 # @rw: #optional whether to allow write operations (default: false)
4323 { 'type': 'BlockdevOptionsVVFAT',
4324 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
4328 # @BlockdevOptionsGenericFormat
4330 # Driver specific block device options for image format that have no option
4331 # besides their data source.
4333 # @file: reference to or definition of the data source block device
4337 { 'type': 'BlockdevOptionsGenericFormat',
4338 'data': { 'file': 'BlockdevRef' } }
4341 # @BlockdevOptionsGenericCOWFormat
4343 # Driver specific block device options for image format that have no option
4344 # besides their data source and an optional backing file.
4346 # @backing: #optional reference to or definition of the backing file block
4347 # device (if missing, taken from the image file content). It is
4348 # allowed to pass an empty string here in order to disable the
4349 # default backing file.
4353 { 'type': 'BlockdevOptionsGenericCOWFormat',
4354 'base': 'BlockdevOptionsGenericFormat',
4355 'data': { '*backing': 'BlockdevRef' } }
4358 # @BlockdevOptionsQcow2
4360 # Driver specific block device options for qcow2.
4362 # @lazy-refcounts: #optional whether to enable the lazy refcounts
4363 # feature (default is taken from the image file)
4365 # @pass-discard-request: #optional whether discard requests to the qcow2
4366 # device should be forwarded to the data source
4368 # @pass-discard-snapshot: #optional whether discard requests for the data source
4369 # should be issued when a snapshot operation (e.g.
4370 # deleting a snapshot) frees clusters in the qcow2 file
4372 # @pass-discard-other: #optional whether discard requests for the data source
4373 # should be issued on other occasions where a cluster
4378 { 'type': 'BlockdevOptionsQcow2',
4379 'base': 'BlockdevOptionsGenericCOWFormat',
4380 'data': { '*lazy-refcounts': 'bool',
4381 '*pass-discard-request': 'bool',
4382 '*pass-discard-snapshot': 'bool',
4383 '*pass-discard-other': 'bool' } }
4388 # Trigger events supported by blkdebug.
4390 { 'enum': 'BlkdebugEvent',
4391 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
4392 'l1_grow.activate_table', 'l2_load', 'l2_update',
4393 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
4394 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
4395 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
4396 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
4397 'refblock_load', 'refblock_update', 'refblock_update_part',
4398 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
4399 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
4400 'refblock_alloc.switch_table', 'cluster_alloc',
4401 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
4405 # @BlkdebugInjectErrorOptions
4407 # Describes a single error injection for blkdebug.
4409 # @event: trigger event
4411 # @state: #optional the state identifier blkdebug needs to be in to
4412 # actually trigger the event; defaults to "any"
4414 # @errno: #optional error identifier (errno) to be returned; defaults to
4417 # @sector: #optional specifies the sector index which has to be affected
4418 # in order to actually trigger the event; defaults to "any
4421 # @once: #optional disables further events after this one has been
4422 # triggered; defaults to false
4424 # @immediately: #optional fail immediately; defaults to false
4428 { 'type': 'BlkdebugInjectErrorOptions',
4429 'data': { 'event': 'BlkdebugEvent',
4434 '*immediately': 'bool' } }
4437 # @BlkdebugSetStateOptions
4439 # Describes a single state-change event for blkdebug.
4441 # @event: trigger event
4443 # @state: #optional the current state identifier blkdebug needs to be in;
4446 # @new_state: the state identifier blkdebug is supposed to assume if
4447 # this event is triggered
4451 { 'type': 'BlkdebugSetStateOptions',
4452 'data': { 'event': 'BlkdebugEvent',
4454 'new_state': 'int' } }
4457 # @BlockdevOptionsBlkdebug
4459 # Driver specific block device options for blkdebug.
4461 # @image: underlying raw block device (or image file)
4463 # @config: #optional filename of the configuration file
4465 # @align: #optional required alignment for requests in bytes
4467 # @inject-error: #optional array of error injection descriptions
4469 # @set-state: #optional array of state-change descriptions
4473 { 'type': 'BlockdevOptionsBlkdebug',
4474 'data': { 'image': 'BlockdevRef',
4477 '*inject-error': ['BlkdebugInjectErrorOptions'],
4478 '*set-state': ['BlkdebugSetStateOptions'] } }
4481 # @BlockdevOptionsBlkverify
4483 # Driver specific block device options for blkverify.
4485 # @test: block device to be tested
4487 # @raw: raw image used for verification
4491 { 'type': 'BlockdevOptionsBlkverify',
4492 'data': { 'test': 'BlockdevRef',
4493 'raw': 'BlockdevRef' } }
4496 # @BlockdevOptionsQuorum
4498 # Driver specific block device options for Quorum
4500 # @blkverify: #optional true if the driver must print content mismatch
4501 # set to false by default
4503 # @children: the children block devices to use
4505 # @vote-threshold: the vote limit under which a read will fail
4509 { 'type': 'BlockdevOptionsQuorum',
4510 'data': { '*blkverify': 'bool',
4511 'children': [ 'BlockdevRef' ],
4512 'vote-threshold': 'int' } }
4517 # Options for creating a block device.
4521 { 'union': 'BlockdevOptions',
4522 'base': 'BlockdevOptionsBase',
4523 'discriminator': 'driver',
4525 'file': 'BlockdevOptionsFile',
4526 'http': 'BlockdevOptionsFile',
4527 'https': 'BlockdevOptionsFile',
4528 'ftp': 'BlockdevOptionsFile',
4529 'ftps': 'BlockdevOptionsFile',
4530 'tftp': 'BlockdevOptionsFile',
4531 # TODO gluster: Wait for structured options
4532 # TODO iscsi: Wait for structured options
4533 # TODO nbd: Should take InetSocketAddress for 'host'?
4534 # TODO nfs: Wait for structured options
4535 # TODO rbd: Wait for structured options
4536 # TODO sheepdog: Wait for structured options
4537 # TODO ssh: Should take InetSocketAddress for 'host'?
4538 'vvfat': 'BlockdevOptionsVVFAT',
4539 'blkdebug': 'BlockdevOptionsBlkdebug',
4540 'blkverify': 'BlockdevOptionsBlkverify',
4541 'bochs': 'BlockdevOptionsGenericFormat',
4542 'cloop': 'BlockdevOptionsGenericFormat',
4543 'cow': 'BlockdevOptionsGenericCOWFormat',
4544 'dmg': 'BlockdevOptionsGenericFormat',
4545 'parallels': 'BlockdevOptionsGenericFormat',
4546 'qcow': 'BlockdevOptionsGenericCOWFormat',
4547 'qcow2': 'BlockdevOptionsQcow2',
4548 'qed': 'BlockdevOptionsGenericCOWFormat',
4549 'raw': 'BlockdevOptionsGenericFormat',
4550 'vdi': 'BlockdevOptionsGenericFormat',
4551 'vhdx': 'BlockdevOptionsGenericFormat',
4552 'vmdk': 'BlockdevOptionsGenericCOWFormat',
4553 'vpc': 'BlockdevOptionsGenericFormat',
4554 'quorum': 'BlockdevOptionsQuorum'
4560 # Reference to a block device.
4562 # @definition: defines a new block device inline
4563 # @reference: references the ID of an existing block device. An
4564 # empty string means that no block device should be
4569 { 'union': 'BlockdevRef',
4570 'discriminator': {},
4571 'data': { 'definition': 'BlockdevOptions',
4572 'reference': 'str' } }
4577 # Creates a new block device.
4579 # @options: block device options for the new device
4583 { 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }
4588 # Button of a pointer input device (mouse, tablet).
4592 { 'enum' : 'InputButton',
4593 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
4598 # Position axis of a pointer input device (mouse, tablet).
4602 { 'enum' : 'InputAxis',
4603 'data' : [ 'X', 'Y' ] }
4608 # Keyboard input event.
4610 # @key: Which key this event is for.
4611 # @down: True for key-down and false for key-up events.
4615 { 'type' : 'InputKeyEvent',
4616 'data' : { 'key' : 'KeyValue',
4622 # Pointer button input event.
4624 # @button: Which button this event is for.
4625 # @down: True for key-down and false for key-up events.
4629 { 'type' : 'InputBtnEvent',
4630 'data' : { 'button' : 'InputButton',
4636 # Pointer motion input event.
4638 # @axis: Which axis is referenced by @value.
4639 # @value: Pointer position. For absolute coordinates the
4640 # valid range is 0 -> 0x7ffff
4644 { 'type' : 'InputMoveEvent',
4645 'data' : { 'axis' : 'InputAxis',
4651 # Input event union.
4655 { 'union' : 'InputEvent',
4656 'data' : { 'key' : 'InputKeyEvent',
4657 'btn' : 'InputBtnEvent',
4658 'rel' : 'InputMoveEvent',
4659 'abs' : 'InputMoveEvent' } }