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 an iothread
890 # @id: the identifier of the iothread
892 # @thread-id: ID of the underlying host thread
896 { 'type': 'IOThreadInfo',
897 'data': {'id': 'str', 'thread-id': 'int'} }
902 # Returns a list of information about each iothread.
904 # Note this list excludes the QEMU main loop thread, which is not declared
905 # using the -object iothread command-line option. It is always the main thread
908 # Returns: a list of @IOThreadInfo for each iothread
912 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
917 # Information about the backing device for a block device.
919 # @file: the filename of the backing device
921 # @node-name: #optional the name of the block driver node (Since 2.0)
923 # @ro: true if the backing device was open read-only
925 # @drv: the name of the block format used to open the backing device. As of
926 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
927 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
928 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
929 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
931 # @backing_file: #optional the name of the backing file (for copy-on-write)
933 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
935 # @encrypted: true if the backing device is encrypted
937 # @encryption_key_missing: true if the backing device is encrypted but an
938 # valid encryption key is missing
940 # @bps: total throughput limit in bytes per second is specified
942 # @bps_rd: read throughput limit in bytes per second is specified
944 # @bps_wr: write throughput limit in bytes per second is specified
946 # @iops: total I/O operations per second is specified
948 # @iops_rd: read I/O operations per second is specified
950 # @iops_wr: write I/O operations per second is specified
952 # @image: the info of image used (since: 1.6)
954 # @bps_max: #optional total max in bytes (Since 1.7)
956 # @bps_rd_max: #optional read max in bytes (Since 1.7)
958 # @bps_wr_max: #optional write max in bytes (Since 1.7)
960 # @iops_max: #optional total I/O operations max (Since 1.7)
962 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
964 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
966 # @iops_size: #optional an I/O size in bytes (Since 1.7)
971 { 'type': 'BlockDeviceInfo',
972 'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
973 '*backing_file': 'str', 'backing_file_depth': 'int',
974 'encrypted': 'bool', 'encryption_key_missing': 'bool',
975 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
976 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
977 'image': 'ImageInfo',
978 '*bps_max': 'int', '*bps_rd_max': 'int',
979 '*bps_wr_max': 'int', '*iops_max': 'int',
980 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
981 '*iops_size': 'int' } }
984 # @BlockDeviceIoStatus:
986 # An enumeration of block device I/O status.
988 # @ok: The last I/O operation has succeeded
990 # @failed: The last I/O operation has failed
992 # @nospace: The last I/O operation has failed due to a no-space condition
996 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
999 # @BlockDeviceMapEntry:
1001 # Entry in the metadata map of the device (returned by "qemu-img map")
1003 # @start: Offset in the image of the first byte described by this entry
1006 # @length: Length of the range described by this entry (in bytes)
1008 # @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.)
1009 # before reaching one for which the range is allocated. The value is
1010 # in the range 0 to the depth of the image chain - 1.
1012 # @zero: the sectors in this range read as zeros
1014 # @data: reading the image will actually read data from a file (in particular,
1015 # if @offset is present this means that the sectors are not simply
1016 # preallocated, but contain actual data in raw format)
1018 # @offset: if present, the image file stores the data for this range in
1019 # raw format at the given offset.
1023 { 'type': 'BlockDeviceMapEntry',
1024 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
1025 'data': 'bool', '*offset': 'int' } }
1030 # Block dirty bitmap information.
1032 # @count: number of dirty bytes according to the dirty bitmap
1034 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
1038 { 'type': 'BlockDirtyInfo',
1039 'data': {'count': 'int', 'granularity': 'int'} }
1044 # Block device information. This structure describes a virtual device and
1045 # the backing device associated with it.
1047 # @device: The device name associated with the virtual device.
1049 # @type: This field is returned only for compatibility reasons, it should
1050 # not be used (always returns 'unknown')
1052 # @removable: True if the device supports removable media.
1054 # @locked: True if the guest has locked this device from having its media
1057 # @tray_open: #optional True if the device has a tray and it is open
1058 # (only present if removable is true)
1060 # @dirty-bitmaps: #optional dirty bitmaps information (only present if the
1061 # driver has one or more dirty bitmaps) (Since 2.0)
1063 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
1064 # supports it and the VM is configured to stop on errors
1066 # @inserted: #optional @BlockDeviceInfo describing the device if media is
1071 { 'type': 'BlockInfo',
1072 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
1073 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
1074 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
1075 '*dirty-bitmaps': ['BlockDirtyInfo'] } }
1080 # Get a list of BlockInfo for all virtual block devices.
1082 # Returns: a list of @BlockInfo describing each virtual block device
1086 { 'command': 'query-block', 'returns': ['BlockInfo'] }
1089 # @BlockDeviceStats:
1091 # Statistics of a virtual block device or a block backing device.
1093 # @rd_bytes: The number of bytes read by the device.
1095 # @wr_bytes: The number of bytes written by the device.
1097 # @rd_operations: The number of read operations performed by the device.
1099 # @wr_operations: The number of write operations performed by the device.
1101 # @flush_operations: The number of cache flush operations performed by the
1102 # device (since 0.15.0)
1104 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
1107 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
1109 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
1111 # @wr_highest_offset: The offset after the greatest byte written to the
1112 # device. The intended use of this information is for
1113 # growable sparse files (like qcow2) that are used on top
1114 # of a physical device.
1118 { 'type': 'BlockDeviceStats',
1119 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
1120 'wr_operations': 'int', 'flush_operations': 'int',
1121 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
1122 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
1127 # Statistics of a virtual block device or a block backing device.
1129 # @device: #optional If the stats are for a virtual block device, the name
1130 # corresponding to the virtual block device.
1132 # @stats: A @BlockDeviceStats for the device.
1134 # @parent: #optional This describes the file block device if it has one.
1136 # @backing: #optional This describes the backing block device if it has one.
1141 { 'type': 'BlockStats',
1142 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
1143 '*parent': 'BlockStats',
1144 '*backing': 'BlockStats'} }
1147 # @query-blockstats:
1149 # Query the @BlockStats for all virtual block devices.
1151 # Returns: A list of @BlockStats for each virtual block devices.
1155 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
1160 # Information about a connected VNC client.
1162 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1165 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1166 # 'ipv4' if the client is connected via IPv4 and TCP
1167 # 'unix' if the client is connected via a unix domain socket
1168 # 'unknown' otherwise
1170 # @service: The service name of the client's port. This may depends on the
1171 # host system's service database so symbolic names should not be
1174 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1175 # Name of the client.
1177 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1178 # used for authentication.
1182 { 'type': 'VncClientInfo',
1183 'data': {'host': 'str', 'family': 'str', 'service': 'str',
1184 '*x509_dname': 'str', '*sasl_username': 'str'} }
1189 # Information about the VNC session.
1191 # @enabled: true if the VNC server is enabled, false otherwise
1193 # @host: #optional The hostname the VNC server is bound to. This depends on
1194 # the name resolution on the host and may be an IP address.
1196 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1197 # 'ipv4' if the host is listening for IPv4 connections
1198 # 'unix' if the host is listening on a unix domain socket
1199 # 'unknown' otherwise
1201 # @service: #optional The service name of the server's port. This may depends
1202 # on the host system's service database so symbolic names should not
1205 # @auth: #optional the current authentication type used by the server
1206 # 'none' if no authentication is being used
1207 # 'vnc' if VNC authentication is being used
1208 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1209 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1210 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1211 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1212 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1213 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1214 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1215 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1216 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1218 # @clients: a list of @VncClientInfo of all currently connected clients
1222 { 'type': 'VncInfo',
1223 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1224 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1229 # Returns information about the current VNC server
1235 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1240 # Information about a SPICE client channel.
1242 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1245 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1246 # 'ipv4' if the client is connected via IPv4 and TCP
1247 # 'unix' if the client is connected via a unix domain socket
1248 # 'unknown' otherwise
1250 # @port: The client's port number.
1252 # @connection-id: SPICE connection id number. All channels with the same id
1253 # belong to the same SPICE session.
1255 # @connection-type: SPICE channel type number. "1" is the main control
1256 # channel, filter for this one if you want to track spice
1259 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1260 # multiple channels of the same type exist, such as multiple
1261 # display channels in a multihead setup
1263 # @tls: true if the channel is encrypted, false otherwise.
1267 { 'type': 'SpiceChannel',
1268 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1269 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1273 # @SpiceQueryMouseMode
1275 # An enumeration of Spice mouse states.
1277 # @client: Mouse cursor position is determined by the client.
1279 # @server: Mouse cursor position is determined by the server.
1281 # @unknown: No information is available about mouse mode used by
1284 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1288 { 'enum': 'SpiceQueryMouseMode',
1289 'data': [ 'client', 'server', 'unknown' ] }
1294 # Information about the SPICE session.
1296 # @enabled: true if the SPICE server is enabled, false otherwise
1298 # @migrated: true if the last guest migration completed and spice
1299 # migration had completed as well. false otherwise.
1301 # @host: #optional The hostname the SPICE server is bound to. This depends on
1302 # the name resolution on the host and may be an IP address.
1304 # @port: #optional The SPICE server's port number.
1306 # @compiled-version: #optional SPICE server version.
1308 # @tls-port: #optional The SPICE server's TLS port number.
1310 # @auth: #optional the current authentication type used by the server
1311 # 'none' if no authentication is being used
1312 # 'spice' uses SASL or direct TLS authentication, depending on command
1315 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1316 # be determined by the client or the server, or unknown if spice
1317 # server doesn't provide this information.
1321 # @channels: a list of @SpiceChannel for each active spice channel
1325 { 'type': 'SpiceInfo',
1326 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1327 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1328 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1333 # Returns information about the current SPICE server
1335 # Returns: @SpiceInfo
1339 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1344 # Information about the guest balloon device.
1346 # @actual: the number of bytes the balloon currently contains
1351 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1356 # Return information about the balloon device.
1358 # Returns: @BalloonInfo on success
1359 # If the balloon driver is enabled but not functional because the KVM
1360 # kernel module cannot support it, KvmMissingCap
1361 # If no balloon device is present, DeviceNotActive
1365 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1370 # A PCI device memory region
1372 # @base: the starting address (guest physical)
1374 # @limit: the ending address (guest physical)
1378 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1383 # Information about a PCI device I/O region.
1385 # @bar: the index of the Base Address Register for this region
1387 # @type: 'io' if the region is a PIO region
1388 # 'memory' if the region is a MMIO region
1390 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1392 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1396 { 'type': 'PciMemoryRegion',
1397 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1398 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1403 # Information about a PCI Bridge device
1405 # @bus.number: primary bus interface number. This should be the number of the
1406 # bus the device resides on.
1408 # @bus.secondary: secondary bus interface number. This is the number of the
1409 # main bus for the bridge
1411 # @bus.subordinate: This is the highest number bus that resides below the
1414 # @bus.io_range: The PIO range for all devices on this bridge
1416 # @bus.memory_range: The MMIO range for all devices on this bridge
1418 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1421 # @devices: a list of @PciDeviceInfo for each device on this bridge
1425 { 'type': 'PciBridgeInfo',
1426 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1427 'io_range': 'PciMemoryRange',
1428 'memory_range': 'PciMemoryRange',
1429 'prefetchable_range': 'PciMemoryRange' },
1430 '*devices': ['PciDeviceInfo']} }
1435 # Information about a PCI device
1437 # @bus: the bus number of the device
1439 # @slot: the slot the device is located in
1441 # @function: the function of the slot used by the device
1443 # @class_info.desc: #optional a string description of the device's class
1445 # @class_info.class: the class code of the device
1447 # @id.device: the PCI device id
1449 # @id.vendor: the PCI vendor id
1451 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1453 # @qdev_id: the device name of the PCI device
1455 # @pci_bridge: if the device is a PCI bridge, the bridge information
1457 # @regions: a list of the PCI I/O regions associated with the device
1459 # Notes: the contents of @class_info.desc are not stable and should only be
1460 # treated as informational.
1464 { 'type': 'PciDeviceInfo',
1465 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1466 'class_info': {'*desc': 'str', 'class': 'int'},
1467 'id': {'device': 'int', 'vendor': 'int'},
1468 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1469 'regions': ['PciMemoryRegion']} }
1474 # Information about a PCI bus
1476 # @bus: the bus index
1478 # @devices: a list of devices on this bus
1482 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1487 # Return information about the PCI bus topology of the guest.
1489 # Returns: a list of @PciInfo for each PCI bus
1493 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1498 # An enumeration of possible behaviors for errors on I/O operations.
1499 # The exact meaning depends on whether the I/O was initiated by a guest
1502 # @report: for guest operations, report the error to the guest;
1503 # for jobs, cancel the job
1505 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1506 # or BLOCK_JOB_ERROR)
1508 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1510 # @stop: for guest operations, stop the virtual machine;
1511 # for jobs, pause the job
1515 { 'enum': 'BlockdevOnError',
1516 'data': ['report', 'ignore', 'enospc', 'stop'] }
1521 # An enumeration of possible behaviors for the initial synchronization
1522 # phase of storage mirroring.
1524 # @top: copies data in the topmost image to the destination
1526 # @full: copies data from all images to the destination
1528 # @none: only copy data written from now on
1532 { 'enum': 'MirrorSyncMode',
1533 'data': ['top', 'full', 'none'] }
1538 # Type of a block job.
1540 # @commit: block commit job type, see "block-commit"
1542 # @stream: block stream job type, see "block-stream"
1544 # @mirror: drive mirror job type, see "drive-mirror"
1546 # @backup: drive backup job type, see "drive-backup"
1550 { 'enum': 'BlockJobType',
1551 'data': ['commit', 'stream', 'mirror', 'backup'] }
1556 # Information about a long-running block device operation.
1558 # @type: the job type ('stream' for image streaming)
1560 # @device: the block device name
1562 # @len: the maximum progress value
1564 # @busy: false if the job is known to be in a quiescent state, with
1565 # no pending I/O. Since 1.3.
1567 # @paused: whether the job is paused or, if @busy is true, will
1568 # pause itself as soon as possible. Since 1.3.
1570 # @offset: the current progress value
1572 # @speed: the rate limit, bytes per second
1574 # @io-status: the status of the job (since 1.3)
1578 { 'type': 'BlockJobInfo',
1579 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1580 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1581 'io-status': 'BlockDeviceIoStatus'} }
1584 # @query-block-jobs:
1586 # Return information about long-running block device operations.
1588 # Returns: a list of @BlockJobInfo for each active block job
1592 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1597 # This command will cause the QEMU process to exit gracefully. While every
1598 # attempt is made to send the QMP response before terminating, this is not
1599 # guaranteed. When using this interface, a premature EOF would not be
1604 { 'command': 'quit' }
1609 # Stop all guest VCPU execution.
1613 # Notes: This function will succeed even if the guest is already in the stopped
1614 # state. In "inmigrate" state, it will ensure that the guest
1615 # remains paused once migration finishes, as if the -S option was
1616 # passed on the command line.
1618 { 'command': 'stop' }
1623 # Performs a hard reset of a guest.
1627 { 'command': 'system_reset' }
1630 # @system_powerdown:
1632 # Requests that a guest perform a powerdown operation.
1636 # Notes: A guest may or may not respond to this command. This command
1637 # returning does not indicate that a guest has accepted the request or
1638 # that it has shut down. Many guests will respond to this command by
1639 # prompting the user in some way.
1641 { 'command': 'system_powerdown' }
1646 # This command is a nop that is only provided for the purposes of compatibility.
1650 # Notes: Do not use this command.
1652 { 'command': 'cpu', 'data': {'index': 'int'} }
1657 # Adds CPU with specified ID
1659 # @id: ID of CPU to be created, valid values [0..max_cpus)
1661 # Returns: Nothing on success
1665 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1670 # Save a portion of guest memory to a file.
1672 # @val: the virtual address of the guest to start from
1674 # @size: the size of memory region to save
1676 # @filename: the file to save the memory to as binary data
1678 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1679 # virtual address (defaults to CPU 0)
1681 # Returns: Nothing on success
1685 # Notes: Errors were not reliably returned until 1.1
1687 { 'command': 'memsave',
1688 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1693 # Save a portion of guest physical memory to a file.
1695 # @val: the physical address of the guest to start from
1697 # @size: the size of memory region to save
1699 # @filename: the file to save the memory to as binary data
1701 # Returns: Nothing on success
1705 # Notes: Errors were not reliably returned until 1.1
1707 { 'command': 'pmemsave',
1708 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1713 # Resume guest VCPU execution.
1717 # Returns: If successful, nothing
1718 # If QEMU was started with an encrypted block device and a key has
1719 # not yet been set, DeviceEncrypted.
1721 # Notes: This command will succeed if the guest is currently running. It
1722 # will also succeed if the guest is in the "inmigrate" state; in
1723 # this case, the effect of the command is to make sure the guest
1724 # starts once migration finishes, removing the effect of the -S
1725 # command line option if it was passed.
1727 { 'command': 'cont' }
1732 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1738 { 'command': 'system_wakeup' }
1743 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1745 # Returns: If successful, nothing
1749 # Notes: Only x86 Virtual Machines support this command.
1751 { 'command': 'inject-nmi' }
1756 # Sets the link status of a virtual network adapter.
1758 # @name: the device name of the virtual network adapter
1760 # @up: true to set the link status to be up
1762 # Returns: Nothing on success
1763 # If @name is not a valid network device, DeviceNotFound
1767 # Notes: Not all network adapters support setting link status. This command
1768 # will succeed even if the network adapter does not support link status
1771 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1776 # This command sets the password of a block device that has not been open
1777 # with a password and requires one.
1779 # The two cases where this can happen are a block device is created through
1780 # QEMU's initial command line or a block device is changed through the legacy
1781 # @change interface.
1783 # In the event that the block device is created through the initial command
1784 # line, the VM will start in the stopped state regardless of whether '-S' is
1785 # used. The intention is for a management tool to query the block devices to
1786 # determine which ones are encrypted, set the passwords with this command, and
1787 # then start the guest with the @cont command.
1789 # Either @device or @node-name must be set but not both.
1791 # @device: #optional the name of the block backend device to set the password on
1793 # @node-name: #optional graph node name to set the password on (Since 2.0)
1795 # @password: the password to use for the device
1797 # Returns: nothing on success
1798 # If @device is not a valid block device, DeviceNotFound
1799 # If @device is not encrypted, DeviceNotEncrypted
1801 # Notes: Not all block formats support encryption and some that do are not
1802 # able to validate that a password is correct. Disk corruption may
1803 # occur if an invalid password is specified.
1807 { 'command': 'block_passwd', 'data': {'*device': 'str',
1808 '*node-name': 'str', 'password': 'str'} }
1813 # Request the balloon driver to change its balloon size.
1815 # @value: the target size of the balloon in bytes
1817 # Returns: Nothing on success
1818 # If the balloon driver is enabled but not functional because the KVM
1819 # kernel module cannot support it, KvmMissingCap
1820 # If no balloon device is present, DeviceNotActive
1822 # Notes: This command just issues a request to the guest. When it returns,
1823 # the balloon size may not have changed. A guest can change the balloon
1824 # size independent of this command.
1828 { 'command': 'balloon', 'data': {'value': 'int'} }
1833 # Resize a block image while a guest is running.
1835 # Either @device or @node-name must be set but not both.
1837 # @device: #optional the name of the device to get the image resized
1839 # @node-name: #optional graph node name to get the image resized (Since 2.0)
1841 # @size: new image size in bytes
1843 # Returns: nothing on success
1844 # If @device is not a valid block device, DeviceNotFound
1848 { 'command': 'block_resize', 'data': { '*device': 'str',
1849 '*node-name': 'str',
1855 # An enumeration that tells QEMU how to set the backing file path in
1858 # @existing: QEMU should look for an existing image file.
1860 # @absolute-paths: QEMU should create a new image with absolute paths
1861 # for the backing file. If there is no backing file available, the new
1862 # image will not be backed either.
1866 { 'enum': 'NewImageMode',
1867 'data': [ 'existing', 'absolute-paths' ] }
1872 # Either @device or @node-name must be set but not both.
1874 # @device: #optional the name of the device to generate the snapshot from.
1876 # @node-name: #optional graph node name to generate the snapshot from (Since 2.0)
1878 # @snapshot-file: the target of the new image. A new file will be created.
1880 # @snapshot-node-name: #optional the graph node name of the new image (Since 2.0)
1882 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1884 # @mode: #optional whether and how QEMU should create a new image, default is
1887 { 'type': 'BlockdevSnapshot',
1888 'data': { '*device': 'str', '*node-name': 'str',
1889 'snapshot-file': 'str', '*snapshot-node-name': 'str',
1890 '*format': 'str', '*mode': 'NewImageMode' } }
1893 # @BlockdevSnapshotInternal
1895 # @device: the name of the device to generate the snapshot from
1897 # @name: the name of the internal snapshot to be created
1899 # Notes: In transaction, if @name is empty, or any snapshot matching @name
1900 # exists, the operation will fail. Only some image formats support it,
1901 # for example, qcow2, rbd, and sheepdog.
1905 { 'type': 'BlockdevSnapshotInternal',
1906 'data': { 'device': 'str', 'name': 'str' } }
1911 # @device: the name of the device which should be copied.
1913 # @target: the target of the new image. If the file exists, or if it
1914 # is a device, the existing file/device will be used as the new
1915 # destination. If it does not exist, a new file will be created.
1917 # @format: #optional the format of the new destination, default is to
1918 # probe if @mode is 'existing', else the format of the source
1920 # @sync: what parts of the disk image should be copied to the destination
1921 # (all the disk, only the sectors allocated in the topmost image, or
1924 # @mode: #optional whether and how QEMU should create a new image, default is
1927 # @speed: #optional the maximum speed, in bytes per second
1929 # @on-source-error: #optional the action to take on an error on the source,
1930 # default 'report'. 'stop' and 'enospc' can only be used
1931 # if the block device supports io-status (see BlockInfo).
1933 # @on-target-error: #optional the action to take on an error on the target,
1934 # default 'report' (no limitations, since this applies to
1935 # a different block device than @device).
1937 # Note that @on-source-error and @on-target-error only affect background I/O.
1938 # If an error occurs during a guest write request, the device's rerror/werror
1939 # actions will be used.
1943 { 'type': 'DriveBackup',
1944 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1945 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1947 '*on-source-error': 'BlockdevOnError',
1948 '*on-target-error': 'BlockdevOnError' } }
1953 # This action can be used to test transaction failure.
1961 # @TransactionAction
1963 # A discriminated record of operations that can be performed with
1966 { 'union': 'TransactionAction',
1968 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1969 'drive-backup': 'DriveBackup',
1971 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1977 # Executes a number of transactionable QMP commands atomically. If any
1978 # operation fails, then the entire set of actions will be abandoned and the
1979 # appropriate error returned.
1982 # @TransactionAction: information needed for the respective operation
1984 # Returns: nothing on success
1985 # Errors depend on the operations of the transaction
1987 # Note: The transaction aborts on the first failure. Therefore, there will be
1988 # information on only one failed operation returned in an error condition, and
1989 # subsequent actions will not have been attempted.
1993 { 'command': 'transaction',
1994 'data': { 'actions': [ 'TransactionAction' ] } }
1997 # @blockdev-snapshot-sync
1999 # Generates a synchronous snapshot of a block device.
2001 # For the arguments, see the documentation of BlockdevSnapshot.
2003 # Returns: nothing on success
2004 # If @device is not a valid block device, DeviceNotFound
2008 { 'command': 'blockdev-snapshot-sync',
2009 'data': 'BlockdevSnapshot' }
2012 # @blockdev-snapshot-internal-sync
2014 # Synchronously take an internal snapshot of a block device, when the format
2015 # of the image used supports it.
2017 # For the arguments, see the documentation of BlockdevSnapshotInternal.
2019 # Returns: nothing on success
2020 # If @device is not a valid block device, DeviceNotFound
2021 # If any snapshot matching @name exists, or @name is empty,
2023 # If the format of the image used does not support it,
2024 # BlockFormatFeatureNotSupported
2028 { 'command': 'blockdev-snapshot-internal-sync',
2029 'data': 'BlockdevSnapshotInternal' }
2032 # @blockdev-snapshot-delete-internal-sync
2034 # Synchronously delete an internal snapshot of a block device, when the format
2035 # of the image used support it. The snapshot is identified by name or id or
2036 # both. One of the name or id is required. Return SnapshotInfo for the
2037 # successfully deleted snapshot.
2039 # @device: the name of the device to delete the snapshot from
2041 # @id: optional the snapshot's ID to be deleted
2043 # @name: optional the snapshot's name to be deleted
2045 # Returns: SnapshotInfo on success
2046 # If @device is not a valid block device, DeviceNotFound
2047 # If snapshot not found, GenericError
2048 # If the format of the image used does not support it,
2049 # BlockFormatFeatureNotSupported
2050 # If @id and @name are both not specified, GenericError
2054 { 'command': 'blockdev-snapshot-delete-internal-sync',
2055 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
2056 'returns': 'SnapshotInfo' }
2059 # @human-monitor-command:
2061 # Execute a command on the human monitor and return the output.
2063 # @command-line: the command to execute in the human monitor
2065 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2067 # Returns: the output of the command as a string
2071 # Notes: This command only exists as a stop-gap. Its use is highly
2072 # discouraged. The semantics of this command are not guaranteed.
2074 # Known limitations:
2076 # o This command is stateless, this means that commands that depend
2077 # on state information (such as getfd) might not work
2079 # o Commands that prompt the user for data (eg. 'cont' when the block
2080 # device is encrypted) don't currently work
2082 { 'command': 'human-monitor-command',
2083 'data': {'command-line': 'str', '*cpu-index': 'int'},
2089 # Live commit of data from overlay image nodes into backing nodes - i.e.,
2090 # writes data between 'top' and 'base' into 'base'.
2092 # @device: the name of the device
2094 # @base: #optional The file name of the backing image to write data into.
2095 # If not specified, this is the deepest backing image
2097 # @top: The file name of the backing image within the image chain,
2098 # which contains the topmost data to be committed down.
2100 # If top == base, that is an error.
2101 # If top == active, the job will not be completed by itself,
2102 # user needs to complete the job with the block-job-complete
2103 # command after getting the ready event. (Since 2.0)
2105 # If the base image is smaller than top, then the base image
2106 # will be resized to be the same size as top. If top is
2107 # smaller than the base image, the base will not be
2108 # truncated. If you want the base image size to match the
2109 # size of the smaller top, you can safely truncate it
2110 # yourself once the commit operation successfully completes.
2113 # @speed: #optional the maximum speed, in bytes per second
2115 # Returns: Nothing on success
2116 # If commit or stream is already active on this device, DeviceInUse
2117 # If @device does not exist, DeviceNotFound
2118 # If image commit is not supported by this device, NotSupported
2119 # If @base or @top is invalid, a generic error is returned
2120 # If @speed is invalid, InvalidParameter
2125 { 'command': 'block-commit',
2126 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
2132 # Start a point-in-time copy of a block device to a new destination. The
2133 # status of ongoing drive-backup operations can be checked with
2134 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
2135 # The operation can be stopped before it has completed using the
2136 # block-job-cancel command.
2138 # For the arguments, see the documentation of DriveBackup.
2140 # Returns: nothing on success
2141 # If @device is not a valid block device, DeviceNotFound
2145 { 'command': 'drive-backup', 'data': 'DriveBackup' }
2148 # @query-named-block-nodes
2150 # Get the named block driver list
2152 # Returns: the list of BlockDeviceInfo
2156 { 'command': 'query-named-block-nodes', 'returns': [ 'BlockDeviceInfo' ] }
2161 # Start mirroring a block device's writes to a new destination.
2163 # @device: the name of the device whose writes should be mirrored.
2165 # @target: the target of the new image. If the file exists, or if it
2166 # is a device, the existing file/device will be used as the new
2167 # destination. If it does not exist, a new file will be created.
2169 # @format: #optional the format of the new destination, default is to
2170 # probe if @mode is 'existing', else the format of the source
2172 # @mode: #optional whether and how QEMU should create a new image, default is
2175 # @speed: #optional the maximum speed, in bytes per second
2177 # @sync: what parts of the disk image should be copied to the destination
2178 # (all the disk, only the sectors allocated in the topmost image, or
2181 # @granularity: #optional granularity of the dirty bitmap, default is 64K
2182 # if the image format doesn't have clusters, 4K if the clusters
2183 # are smaller than that, else the cluster size. Must be a
2184 # power of 2 between 512 and 64M (since 1.4).
2186 # @buf-size: #optional maximum amount of data in flight from source to
2187 # target (since 1.4).
2189 # @on-source-error: #optional the action to take on an error on the source,
2190 # default 'report'. 'stop' and 'enospc' can only be used
2191 # if the block device supports io-status (see BlockInfo).
2193 # @on-target-error: #optional the action to take on an error on the target,
2194 # default 'report' (no limitations, since this applies to
2195 # a different block device than @device).
2197 # Returns: nothing on success
2198 # If @device is not a valid block device, DeviceNotFound
2202 { 'command': 'drive-mirror',
2203 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
2204 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
2205 '*speed': 'int', '*granularity': 'uint32',
2206 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
2207 '*on-target-error': 'BlockdevOnError' } }
2212 # Cancel the current executing migration process.
2214 # Returns: nothing on success
2216 # Notes: This command succeeds even if there is no migration process running.
2220 { 'command': 'migrate_cancel' }
2223 # @migrate_set_downtime
2225 # Set maximum tolerated downtime for migration.
2227 # @value: maximum downtime in seconds
2229 # Returns: nothing on success
2233 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2236 # @migrate_set_speed
2238 # Set maximum speed for migration.
2240 # @value: maximum speed in bytes.
2242 # Returns: nothing on success
2244 # Notes: A value lesser than zero will be automatically round up to zero.
2248 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2251 # @migrate-set-cache-size
2253 # Set XBZRLE cache size
2255 # @value: cache size in bytes
2257 # The size will be rounded down to the nearest power of 2.
2258 # The cache size can be modified before and during ongoing migration
2260 # Returns: nothing on success
2264 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2267 # @query-migrate-cache-size
2269 # query XBZRLE cache size
2271 # Returns: XBZRLE cache size in bytes
2275 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2278 # @ObjectPropertyInfo:
2280 # @name: the name of the property
2282 # @type: the type of the property. This will typically come in one of four
2285 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2286 # These types are mapped to the appropriate JSON type.
2288 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
2289 # legacy qdev typename. These types are always treated as strings.
2291 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
2292 # device type name. Child properties create the composition tree.
2294 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
2295 # device type name. Link properties form the device model graph.
2299 { 'type': 'ObjectPropertyInfo',
2300 'data': { 'name': 'str', 'type': 'str' } }
2305 # This command will list any properties of a object given a path in the object
2308 # @path: the path within the object model. See @qom-get for a description of
2311 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2316 { 'command': 'qom-list',
2317 'data': { 'path': 'str' },
2318 'returns': [ 'ObjectPropertyInfo' ] }
2323 # This command will get a property from a object model path and return the
2326 # @path: The path within the object model. There are two forms of supported
2327 # paths--absolute and partial paths.
2329 # Absolute paths are derived from the root object and can follow child<>
2330 # or link<> properties. Since they can follow link<> properties, they
2331 # can be arbitrarily long. Absolute paths look like absolute filenames
2332 # and are prefixed with a leading slash.
2334 # Partial paths look like relative filenames. They do not begin
2335 # with a prefix. The matching rules for partial paths are subtle but
2336 # designed to make specifying objects easy. At each level of the
2337 # composition tree, the partial path is matched as an absolute path.
2338 # The first match is not returned. At least two matches are searched
2339 # for. A successful result is only returned if only one match is
2340 # found. If more than one match is found, a flag is return to
2341 # indicate that the match was ambiguous.
2343 # @property: The property name to read
2345 # Returns: The property value. The type depends on the property type. legacy<>
2346 # properties are returned as #str. child<> and link<> properties are
2347 # returns as #str pathnames. All integer property types (u8, u16, etc)
2348 # are returned as #int.
2352 { 'command': 'qom-get',
2353 'data': { 'path': 'str', 'property': 'str' },
2354 'returns': 'visitor',
2360 # This command will set a property from a object model path.
2362 # @path: see @qom-get for a description of this parameter
2364 # @property: the property name to set
2366 # @value: a value who's type is appropriate for the property type. See @qom-get
2367 # for a description of type mapping.
2371 { 'command': 'qom-set',
2372 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2378 # Sets the password of a remote display session.
2380 # @protocol: `vnc' to modify the VNC server password
2381 # `spice' to modify the Spice server password
2383 # @password: the new password
2385 # @connected: #optional how to handle existing clients when changing the
2386 # password. If nothing is specified, defaults to `keep'
2387 # `fail' to fail the command if clients are connected
2388 # `disconnect' to disconnect existing clients
2389 # `keep' to maintain existing clients
2391 # Returns: Nothing on success
2392 # If Spice is not enabled, DeviceNotFound
2396 { 'command': 'set_password',
2397 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2402 # Expire the password of a remote display server.
2404 # @protocol: the name of the remote display protocol `vnc' or `spice'
2406 # @time: when to expire the password.
2407 # `now' to expire the password immediately
2408 # `never' to cancel password expiration
2409 # `+INT' where INT is the number of seconds from now (integer)
2410 # `INT' where INT is the absolute time in seconds
2412 # Returns: Nothing on success
2413 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2417 # Notes: Time is relative to the server and currently there is no way to
2418 # coordinate server time with client time. It is not recommended to
2419 # use the absolute time version of the @time parameter unless you're
2420 # sure you are on the same machine as the QEMU instance.
2422 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2427 # Ejects a device from a removable drive.
2429 # @device: The name of the device
2431 # @force: @optional If true, eject regardless of whether the drive is locked.
2432 # If not specified, the default value is false.
2434 # Returns: Nothing on success
2435 # If @device is not a valid block device, DeviceNotFound
2437 # Notes: Ejecting a device will no media results in success
2441 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2444 # @change-vnc-password:
2446 # Change the VNC server password.
2448 # @target: the new password to use with VNC authentication
2452 # Notes: An empty password in this command will set the password to the empty
2453 # string. Existing clients are unaffected by executing this command.
2455 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2460 # This command is multiple commands multiplexed together.
2462 # @device: This is normally the name of a block device but it may also be 'vnc'.
2463 # when it's 'vnc', then sub command depends on @target
2465 # @target: If @device is a block device, then this is the new filename.
2466 # If @device is 'vnc', then if the value 'password' selects the vnc
2467 # change password command. Otherwise, this specifies a new server URI
2468 # address to listen to for VNC connections.
2470 # @arg: If @device is a block device, then this is an optional format to open
2472 # If @device is 'vnc' and @target is 'password', this is the new VNC
2473 # password to set. If this argument is an empty string, then no future
2474 # logins will be allowed.
2476 # Returns: Nothing on success.
2477 # If @device is not a valid block device, DeviceNotFound
2478 # If the new block device is encrypted, DeviceEncrypted. Note that
2479 # if this error is returned, the device has been opened successfully
2480 # and an additional call to @block_passwd is required to set the
2481 # device's password. The behavior of reads and writes to the block
2482 # device between when these calls are executed is undefined.
2484 # Notes: It is strongly recommended that this interface is not used especially
2485 # for changing block devices.
2489 { 'command': 'change',
2490 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2493 # @block_set_io_throttle:
2495 # Change I/O throttle limits for a block drive.
2497 # @device: The name of the device
2499 # @bps: total throughput limit in bytes per second
2501 # @bps_rd: read throughput limit in bytes per second
2503 # @bps_wr: write throughput limit in bytes per second
2505 # @iops: total I/O operations per second
2507 # @ops_rd: read I/O operations per second
2509 # @iops_wr: write I/O operations per second
2511 # @bps_max: #optional total max in bytes (Since 1.7)
2513 # @bps_rd_max: #optional read max in bytes (Since 1.7)
2515 # @bps_wr_max: #optional write max in bytes (Since 1.7)
2517 # @iops_max: #optional total I/O operations max (Since 1.7)
2519 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
2521 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
2523 # @iops_size: #optional an I/O size in bytes (Since 1.7)
2525 # Returns: Nothing on success
2526 # If @device is not a valid block device, DeviceNotFound
2530 { 'command': 'block_set_io_throttle',
2531 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2532 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
2533 '*bps_max': 'int', '*bps_rd_max': 'int',
2534 '*bps_wr_max': 'int', '*iops_max': 'int',
2535 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
2536 '*iops_size': 'int' } }
2541 # Copy data from a backing file into a block device.
2543 # The block streaming operation is performed in the background until the entire
2544 # backing file has been copied. This command returns immediately once streaming
2545 # has started. The status of ongoing block streaming operations can be checked
2546 # with query-block-jobs. The operation can be stopped before it has completed
2547 # using the block-job-cancel command.
2549 # If a base file is specified then sectors are not copied from that base file and
2550 # its backing chain. When streaming completes the image file will have the base
2551 # file as its backing file. This can be used to stream a subset of the backing
2552 # file chain instead of flattening the entire image.
2554 # On successful completion the image file is updated to drop the backing file
2555 # and the BLOCK_JOB_COMPLETED event is emitted.
2557 # @device: the device name
2559 # @base: #optional the common backing file name
2561 # @speed: #optional the maximum speed, in bytes per second
2563 # @on-error: #optional the action to take on an error (default report).
2564 # 'stop' and 'enospc' can only be used if the block device
2565 # supports io-status (see BlockInfo). Since 1.3.
2567 # Returns: Nothing on success
2568 # If @device does not exist, DeviceNotFound
2572 { 'command': 'block-stream',
2573 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2574 '*on-error': 'BlockdevOnError' } }
2577 # @block-job-set-speed:
2579 # Set maximum speed for a background block operation.
2581 # This command can only be issued when there is an active block job.
2583 # Throttling can be disabled by setting the speed to 0.
2585 # @device: the device name
2587 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2590 # Returns: Nothing on success
2591 # If no background operation is active on this device, DeviceNotActive
2595 { 'command': 'block-job-set-speed',
2596 'data': { 'device': 'str', 'speed': 'int' } }
2599 # @block-job-cancel:
2601 # Stop an active background block operation.
2603 # This command returns immediately after marking the active background block
2604 # operation for cancellation. It is an error to call this command if no
2605 # operation is in progress.
2607 # The operation will cancel as soon as possible and then emit the
2608 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2609 # enumerated using query-block-jobs.
2611 # For streaming, the image file retains its backing file unless the streaming
2612 # operation happens to complete just as it is being cancelled. A new streaming
2613 # operation can be started at a later time to finish copying all data from the
2616 # @device: the device name
2618 # @force: #optional whether to allow cancellation of a paused job (default
2619 # false). Since 1.3.
2621 # Returns: Nothing on success
2622 # If no background operation is active on this device, DeviceNotActive
2626 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2631 # Pause an active background block operation.
2633 # This command returns immediately after marking the active background block
2634 # operation for pausing. It is an error to call this command if no
2635 # operation is in progress. Pausing an already paused job has no cumulative
2636 # effect; a single block-job-resume command will resume the job.
2638 # The operation will pause as soon as possible. No event is emitted when
2639 # the operation is actually paused. Cancelling a paused job automatically
2642 # @device: the device name
2644 # Returns: Nothing on success
2645 # If no background operation is active on this device, DeviceNotActive
2649 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2652 # @block-job-resume:
2654 # Resume an active background block operation.
2656 # This command returns immediately after resuming a paused background block
2657 # operation. It is an error to call this command if no operation is in
2658 # progress. Resuming an already running job is not an error.
2660 # This command also clears the error status of the job.
2662 # @device: the device name
2664 # Returns: Nothing on success
2665 # If no background operation is active on this device, DeviceNotActive
2669 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2672 # @block-job-complete:
2674 # Manually trigger completion of an active background block operation. This
2675 # is supported for drive mirroring, where it also switches the device to
2676 # write to the target path only. The ability to complete is signaled with
2677 # a BLOCK_JOB_READY event.
2679 # This command completes an active background block operation synchronously.
2680 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2681 # is not defined. Note that if an I/O error occurs during the processing of
2682 # this command: 1) the command itself will fail; 2) the error will be processed
2683 # according to the rerror/werror arguments that were specified when starting
2686 # A cancelled or paused job cannot be completed.
2688 # @device: the device name
2690 # Returns: Nothing on success
2691 # If no background operation is active on this device, DeviceNotActive
2695 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2700 # This structure describes a search result from @qom-list-types
2702 # @name: the type name found in the search
2706 # Notes: This command is experimental and may change syntax in future releases.
2708 { 'type': 'ObjectTypeInfo',
2709 'data': { 'name': 'str' } }
2714 # This command will return a list of types given search parameters
2716 # @implements: if specified, only return types that implement this type name
2718 # @abstract: if true, include abstract types in the results
2720 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2724 { 'command': 'qom-list-types',
2725 'data': { '*implements': 'str', '*abstract': 'bool' },
2726 'returns': [ 'ObjectTypeInfo' ] }
2729 # @DevicePropertyInfo:
2731 # Information about device properties.
2733 # @name: the name of the property
2734 # @type: the typename of the property
2738 { 'type': 'DevicePropertyInfo',
2739 'data': { 'name': 'str', 'type': 'str' } }
2742 # @device-list-properties:
2744 # List properties associated with a device.
2746 # @typename: the type name of a device
2748 # Returns: a list of DevicePropertyInfo describing a devices properties
2752 { 'command': 'device-list-properties',
2753 'data': { 'typename': 'str'},
2754 'returns': [ 'DevicePropertyInfo' ] }
2759 # Migrates the current running guest to another Virtual Machine.
2761 # @uri: the Uniform Resource Identifier of the destination VM
2763 # @blk: #optional do block migration (full disk copy)
2765 # @inc: #optional incremental disk copy migration
2767 # @detach: this argument exists only for compatibility reasons and
2768 # is ignored by QEMU
2770 # Returns: nothing on success
2774 { 'command': 'migrate',
2775 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2777 # @xen-save-devices-state:
2779 # Save the state of all devices to file. The RAM and the block devices
2780 # of the VM are not saved by this command.
2782 # @filename: the file to save the state of the devices to as binary
2783 # data. See xen-save-devices-state.txt for a description of the binary
2786 # Returns: Nothing on success
2790 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2793 # @xen-set-global-dirty-log
2795 # Enable or disable the global dirty log mode.
2797 # @enable: true to enable, false to disable.
2803 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2808 # Remove a device from a guest
2810 # @id: the name of the device
2812 # Returns: Nothing on success
2813 # If @id is not a valid device, DeviceNotFound
2815 # Notes: When this command completes, the device may not be removed from the
2816 # guest. Hot removal is an operation that requires guest cooperation.
2817 # This command merely requests that the guest begin the hot removal
2818 # process. Completion of the device removal process is signaled with a
2819 # DEVICE_DELETED event. Guest reset will automatically complete removal
2824 { 'command': 'device_del', 'data': {'id': 'str'} }
2827 # @DumpGuestMemoryFormat:
2829 # An enumeration of guest-memory-dump's format.
2833 # @kdump-zlib: kdump-compressed format with zlib-compressed
2835 # @kdump-lzo: kdump-compressed format with lzo-compressed
2837 # @kdump-snappy: kdump-compressed format with snappy-compressed
2841 { 'enum': 'DumpGuestMemoryFormat',
2842 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2845 # @dump-guest-memory
2847 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2848 # very long depending on the amount of guest memory. This command is only
2849 # supported on i386 and x86_64.
2851 # @paging: if true, do paging to get guest's memory mapping. This allows
2852 # using gdb to process the core file.
2854 # IMPORTANT: this option can make QEMU allocate several gigabytes
2855 # of RAM. This can happen for a large guest, or a
2856 # malicious guest pretending to be large.
2858 # Also, paging=true has the following limitations:
2860 # 1. The guest may be in a catastrophic state or can have corrupted
2861 # memory, which cannot be trusted
2862 # 2. The guest can be in real-mode even if paging is enabled. For
2863 # example, the guest uses ACPI to sleep, and ACPI sleep state
2866 # @protocol: the filename or file descriptor of the vmcore. The supported
2869 # 1. file: the protocol starts with "file:", and the following
2870 # string is the file's path.
2871 # 2. fd: the protocol starts with "fd:", and the following string
2874 # @begin: #optional if specified, the starting physical address.
2876 # @length: #optional if specified, the memory size, in bytes. If you don't
2877 # want to dump all guest's memory, please specify the start @begin
2880 # @format: #optional if specified, the format of guest memory dump. But non-elf
2881 # format is conflict with paging and filter, ie. @paging, @begin and
2882 # @length is not allowed to be specified with non-elf @format at the
2883 # same time (since 2.0)
2885 # Returns: nothing on success
2889 { 'command': 'dump-guest-memory',
2890 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2891 '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
2894 # @DumpGuestMemoryCapability:
2896 # A list of the available formats for dump-guest-memory
2900 { 'type': 'DumpGuestMemoryCapability',
2902 'formats': ['DumpGuestMemoryFormat'] } }
2905 # @query-dump-guest-memory-capability:
2907 # Returns the available formats for dump-guest-memory
2909 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2914 { 'command': 'query-dump-guest-memory-capability',
2915 'returns': 'DumpGuestMemoryCapability' }
2920 # Add a network backend.
2922 # @type: the type of network backend. Current valid values are 'user', 'tap',
2923 # 'vde', 'socket', 'dump' and 'bridge'
2925 # @id: the name of the new network backend
2927 # @props: #optional a list of properties to be passed to the backend in
2928 # the format 'name=value', like 'ifname=tap0,script=no'
2930 # Notes: The semantics of @props is not well defined. Future commands will be
2931 # introduced that provide stronger typing for backend creation.
2935 # Returns: Nothing on success
2936 # If @type is not a valid network backend, DeviceNotFound
2938 { 'command': 'netdev_add',
2939 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2945 # Remove a network backend.
2947 # @id: the name of the network backend to remove
2949 # Returns: Nothing on success
2950 # If @id is not a valid network backend, DeviceNotFound
2954 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2959 # Create a QOM object.
2961 # @qom-type: the class name for the object to be created
2963 # @id: the name of the new object
2965 # @props: #optional a dictionary of properties to be passed to the backend
2967 # Returns: Nothing on success
2968 # Error if @qom-type is not a valid class name
2972 { 'command': 'object-add',
2973 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
2979 # Remove a QOM object.
2981 # @id: the name of the QOM object to remove
2983 # Returns: Nothing on success
2984 # Error if @id is not a valid id for a QOM object
2988 { 'command': 'object-del', 'data': {'id': 'str'} }
2991 # @NetdevNoneOptions
2993 # Use it alone to have zero network devices.
2997 { 'type': 'NetdevNoneOptions',
3001 # @NetLegacyNicOptions
3003 # Create a new Network Interface Card.
3005 # @netdev: #optional id of -netdev to connect to
3007 # @macaddr: #optional MAC address
3009 # @model: #optional device model (e1000, rtl8139, virtio etc.)
3011 # @addr: #optional PCI device address
3013 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
3017 { 'type': 'NetLegacyNicOptions',
3023 '*vectors': 'uint32' } }
3028 # A fat type wrapping 'str', to be embedded in lists.
3037 # @NetdevUserOptions
3039 # Use the user mode network stack which requires no administrator privilege to
3042 # @hostname: #optional client hostname reported by the builtin DHCP server
3044 # @restrict: #optional isolate the guest from the host
3046 # @ip: #optional legacy parameter, use net= instead
3048 # @net: #optional IP address and optional netmask
3050 # @host: #optional guest-visible address of the host
3052 # @tftp: #optional root directory of the built-in TFTP server
3054 # @bootfile: #optional BOOTP filename, for use with tftp=
3056 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
3059 # @dns: #optional guest-visible address of the virtual nameserver
3061 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
3064 # @smb: #optional root directory of the built-in SMB server
3066 # @smbserver: #optional IP address of the built-in SMB server
3068 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3071 # @guestfwd: #optional forward guest TCP connections
3075 { 'type': 'NetdevUserOptions',
3078 '*restrict': 'bool',
3084 '*dhcpstart': 'str',
3086 '*dnssearch': ['String'],
3088 '*smbserver': 'str',
3089 '*hostfwd': ['String'],
3090 '*guestfwd': ['String'] } }
3095 # Connect the host TAP network interface name to the VLAN.
3097 # @ifname: #optional interface name
3099 # @fd: #optional file descriptor of an already opened tap
3101 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3104 # @script: #optional script to initialize the interface
3106 # @downscript: #optional script to shut down the interface
3108 # @helper: #optional command to execute to configure bridge
3110 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3112 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3114 # @vhost: #optional enable vhost-net network accelerator
3116 # @vhostfd: #optional file descriptor of an already opened vhost net device
3118 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3121 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3123 # @queues: #optional number of queues to be created for multiqueue capable tap
3127 { 'type': 'NetdevTapOptions',
3133 '*downscript': 'str',
3136 '*vnet_hdr': 'bool',
3140 '*vhostforce': 'bool',
3141 '*queues': 'uint32'} }
3144 # @NetdevSocketOptions
3146 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3147 # socket connection.
3149 # @fd: #optional file descriptor of an already opened socket
3151 # @listen: #optional port number, and optional hostname, to listen on
3153 # @connect: #optional port number, and optional hostname, to connect to
3155 # @mcast: #optional UDP multicast address and port number
3157 # @localaddr: #optional source address and port for multicast and udp packets
3159 # @udp: #optional UDP unicast address and port number
3163 { 'type': 'NetdevSocketOptions',
3169 '*localaddr': 'str',
3175 # Connect the VLAN to a vde switch running on the host.
3177 # @sock: #optional socket path
3179 # @port: #optional port number
3181 # @group: #optional group owner of socket
3183 # @mode: #optional permissions for socket
3187 { 'type': 'NetdevVdeOptions',
3192 '*mode': 'uint16' } }
3195 # @NetdevDumpOptions
3197 # Dump VLAN network traffic to a file.
3199 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3202 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3206 { 'type': 'NetdevDumpOptions',
3212 # @NetdevBridgeOptions
3214 # Connect a host TAP network interface to a host bridge device.
3216 # @br: #optional bridge name
3218 # @helper: #optional command to execute to configure bridge
3222 { 'type': 'NetdevBridgeOptions',
3225 '*helper': 'str' } }
3228 # @NetdevHubPortOptions
3230 # Connect two or more net clients through a software hub.
3232 # @hubid: hub identifier number
3236 { 'type': 'NetdevHubPortOptions',
3238 'hubid': 'int32' } }
3241 # @NetdevNetmapOptions
3243 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3245 # @ifname: Either the name of an existing network interface supported by
3246 # netmap, or the name of a VALE port (created on the fly).
3247 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3248 # YYY are non-negative integers. XXX identifies a switch and
3249 # YYY identifies a port of the switch. VALE ports having the
3250 # same XXX are therefore connected to the same switch.
3252 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3256 { 'type': 'NetdevNetmapOptions',
3259 '*devname': 'str' } }
3264 # A discriminated record of network device traits.
3268 { 'union': 'NetClientOptions',
3270 'none': 'NetdevNoneOptions',
3271 'nic': 'NetLegacyNicOptions',
3272 'user': 'NetdevUserOptions',
3273 'tap': 'NetdevTapOptions',
3274 'socket': 'NetdevSocketOptions',
3275 'vde': 'NetdevVdeOptions',
3276 'dump': 'NetdevDumpOptions',
3277 'bridge': 'NetdevBridgeOptions',
3278 'hubport': 'NetdevHubPortOptions',
3279 'netmap': 'NetdevNetmapOptions' } }
3284 # Captures the configuration of a network device; legacy.
3286 # @vlan: #optional vlan number
3288 # @id: #optional identifier for monitor commands
3290 # @name: #optional identifier for monitor commands, ignored if @id is present
3292 # @opts: device type specific properties (legacy)
3296 { 'type': 'NetLegacy',
3301 'opts': 'NetClientOptions' } }
3306 # Captures the configuration of a network device.
3308 # @id: identifier for monitor commands.
3310 # @opts: device type specific properties
3317 'opts': 'NetClientOptions' } }
3320 # @InetSocketAddress
3322 # Captures a socket address or address range in the Internet namespace.
3324 # @host: host part of the address
3326 # @port: port part of the address, or lowest port if @to is present
3328 # @to: highest port to try
3330 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3333 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3338 { 'type': 'InetSocketAddress',
3347 # @UnixSocketAddress
3349 # Captures a socket address in the local ("Unix socket") namespace.
3351 # @path: filesystem path to use
3355 { 'type': 'UnixSocketAddress',
3362 # Captures the address of a socket, which could also be a named file descriptor
3366 { 'union': 'SocketAddress',
3368 'inet': 'InetSocketAddress',
3369 'unix': 'UnixSocketAddress',
3375 # Receive a file descriptor via SCM rights and assign it a name
3377 # @fdname: file descriptor name
3379 # Returns: Nothing on success
3383 # Notes: If @fdname already exists, the file descriptor assigned to
3384 # it will be closed and replaced by the received file
3386 # The 'closefd' command can be used to explicitly close the
3387 # file descriptor when it is no longer needed.
3389 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3394 # Close a file descriptor previously passed via SCM rights
3396 # @fdname: file descriptor name
3398 # Returns: Nothing on success
3402 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3407 # Information describing a machine.
3409 # @name: the name of the machine
3411 # @alias: #optional an alias for the machine name
3413 # @default: #optional whether the machine is default
3415 # @cpu-max: maximum number of CPUs supported by the machine type
3420 { 'type': 'MachineInfo',
3421 'data': { 'name': 'str', '*alias': 'str',
3422 '*is-default': 'bool', 'cpu-max': 'int' } }
3427 # Return a list of supported machines
3429 # Returns: a list of MachineInfo
3433 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3436 # @CpuDefinitionInfo:
3438 # Virtual CPU definition.
3440 # @name: the name of the CPU definition
3444 { 'type': 'CpuDefinitionInfo',
3445 'data': { 'name': 'str' } }
3448 # @query-cpu-definitions:
3450 # Return a list of supported virtual CPU definitions
3452 # Returns: a list of CpuDefInfo
3456 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3460 # Information about a file descriptor that was added to an fd set.
3462 # @fdset-id: The ID of the fd set that @fd was added to.
3464 # @fd: The file descriptor that was received via SCM rights and
3465 # added to the fd set.
3469 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3474 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3476 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3478 # @opaque: #optional A free-form string that can be used to describe the fd.
3480 # Returns: @AddfdInfo on success
3481 # If file descriptor was not received, FdNotSupplied
3482 # If @fdset-id is a negative value, InvalidParameterValue
3484 # Notes: The list of fd sets is shared by all monitor connections.
3486 # If @fdset-id is not specified, a new fd set will be created.
3490 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3491 'returns': 'AddfdInfo' }
3496 # Remove a file descriptor from an fd set.
3498 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3500 # @fd: #optional The file descriptor that is to be removed.
3502 # Returns: Nothing on success
3503 # If @fdset-id or @fd is not found, FdNotFound
3507 # Notes: The list of fd sets is shared by all monitor connections.
3509 # If @fd is not specified, all file descriptors in @fdset-id
3512 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3517 # Information about a file descriptor that belongs to an fd set.
3519 # @fd: The file descriptor value.
3521 # @opaque: #optional A free-form string that can be used to describe the fd.
3525 { 'type': 'FdsetFdInfo',
3526 'data': {'fd': 'int', '*opaque': 'str'} }
3531 # Information about an fd set.
3533 # @fdset-id: The ID of the fd set.
3535 # @fds: A list of file descriptors that belong to this fd set.
3539 { 'type': 'FdsetInfo',
3540 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3545 # Return information describing all fd sets.
3547 # Returns: A list of @FdsetInfo
3551 # Note: The list of fd sets is shared by all monitor connections.
3554 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3559 # Information describing the QEMU target.
3561 # @arch: the target architecture (eg "x86_64", "i386", etc)
3565 { 'type': 'TargetInfo',
3566 'data': { 'arch': 'str' } }
3571 # Return information about the target for this QEMU
3573 # Returns: TargetInfo
3577 { 'command': 'query-target', 'returns': 'TargetInfo' }
3582 # An enumeration of key name.
3584 # This is used by the send-key command.
3588 # 'unmapped' and 'pause' since 2.0
3590 { 'enum': 'QKeyCode',
3591 'data': [ 'unmapped',
3592 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3593 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3594 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3595 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3596 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3597 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3598 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3599 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3600 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3601 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3602 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3603 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3604 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3605 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3606 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
3611 # Represents a keyboard key.
3615 { 'union': 'KeyValue',
3618 'qcode': 'QKeyCode' } }
3623 # Send keys to guest.
3625 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3626 # simultaneously sent to the guest. A @KeyValue.number value is sent
3627 # directly to the guest, while @KeyValue.qcode must be a valid
3630 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3633 # Returns: Nothing on success
3634 # If key is unknown or redundant, InvalidParameter
3639 { 'command': 'send-key',
3640 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3645 # Write a PPM of the VGA screen to a file.
3647 # @filename: the path of a new PPM file to store the image
3649 # Returns: Nothing on success
3653 { 'command': 'screendump', 'data': {'filename': 'str'} }
3656 # @nbd-server-start:
3658 # Start an NBD server listening on the given host and port. Block
3659 # devices can then be exported using @nbd-server-add. The NBD
3660 # server will present them as named exports; for example, another
3661 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3663 # @addr: Address on which to listen.
3665 # Returns: error if the server is already running.
3669 { 'command': 'nbd-server-start',
3670 'data': { 'addr': 'SocketAddress' } }
3675 # Export a device to QEMU's embedded NBD server.
3677 # @device: Block device to be exported
3679 # @writable: Whether clients should be able to write to the device via the
3680 # NBD connection (default false). #optional
3682 # Returns: error if the device is already marked for export.
3686 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3691 # Stop QEMU's embedded NBD server, and unregister all devices previously
3692 # added via @nbd-server-add.
3696 { 'command': 'nbd-server-stop' }
3701 # Configuration info for file chardevs.
3703 # @in: #optional The name of the input file
3704 # @out: The name of the output file
3708 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3714 # Configuration info for device and pipe chardevs.
3716 # @device: The name of the special file for the device,
3717 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3718 # @type: What kind of device this is.
3722 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3727 # Configuration info for (stream) socket chardevs.
3729 # @addr: socket address to listen on (server=true)
3730 # or connect to (server=false)
3731 # @server: #optional create server socket (default: true)
3732 # @wait: #optional wait for incoming connection on server
3733 # sockets (default: false).
3734 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3735 # @telnet: #optional enable telnet protocol on server
3736 # sockets (default: false)
3740 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3743 '*nodelay' : 'bool',
3744 '*telnet' : 'bool' } }
3749 # Configuration info for datagram socket chardevs.
3751 # @remote: remote address
3752 # @local: #optional local address
3756 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3757 '*local' : 'SocketAddress' } }
3762 # Configuration info for mux chardevs.
3764 # @chardev: name of the base chardev.
3768 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3773 # Configuration info for stdio chardevs.
3775 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3776 # be delivered to qemu. Default: true in -nographic mode,
3781 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3784 # @ChardevSpiceChannel:
3786 # Configuration info for spice vm channel chardevs.
3788 # @type: kind of channel (for example vdagent).
3792 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3795 # @ChardevSpicePort:
3797 # Configuration info for spice port chardevs.
3799 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3803 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3808 # Configuration info for virtual console chardevs.
3810 # @width: console width, in pixels
3811 # @height: console height, in pixels
3812 # @cols: console width, in chars
3813 # @rows: console height, in chars
3817 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3825 # Configuration info for ring buffer chardevs.
3827 # @size: #optional ring buffer size, must be power of two, default is 65536
3831 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3836 # Configuration info for the new chardev backend.
3840 { 'type': 'ChardevDummy', 'data': { } }
3842 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3843 'serial' : 'ChardevHostdev',
3844 'parallel': 'ChardevHostdev',
3845 'pipe' : 'ChardevHostdev',
3846 'socket' : 'ChardevSocket',
3847 'udp' : 'ChardevUdp',
3848 'pty' : 'ChardevDummy',
3849 'null' : 'ChardevDummy',
3850 'mux' : 'ChardevMux',
3851 'msmouse': 'ChardevDummy',
3852 'braille': 'ChardevDummy',
3853 'stdio' : 'ChardevStdio',
3854 'console': 'ChardevDummy',
3855 'spicevmc' : 'ChardevSpiceChannel',
3856 'spiceport' : 'ChardevSpicePort',
3858 'ringbuf': 'ChardevRingbuf',
3859 # next one is just for compatibility
3860 'memory' : 'ChardevRingbuf' } }
3865 # Return info about the chardev backend just created.
3867 # @pty: #optional name of the slave pseudoterminal device, present if
3868 # and only if a chardev of type 'pty' was created
3872 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3877 # Add a character device backend
3879 # @id: the chardev's ID, must be unique
3880 # @backend: backend type and parameters
3882 # Returns: ChardevReturn.
3886 { 'command': 'chardev-add', 'data': {'id' : 'str',
3887 'backend' : 'ChardevBackend' },
3888 'returns': 'ChardevReturn' }
3893 # Remove a character device backend
3895 # @id: the chardev's ID, must exist and not be in use
3897 # Returns: Nothing on success
3901 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3906 # An enumeration of TPM models
3908 # @tpm-tis: TPM TIS model
3912 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3915 # @query-tpm-models:
3917 # Return a list of supported TPM models
3919 # Returns: a list of TpmModel
3923 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3928 # An enumeration of TPM types
3930 # @passthrough: TPM passthrough type
3934 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3939 # Return a list of supported TPM types
3941 # Returns: a list of TpmType
3945 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3948 # @TPMPassthroughOptions:
3950 # Information about the TPM passthrough type
3952 # @path: #optional string describing the path used for accessing the TPM device
3954 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3955 # for cancellation of TPM commands while they are executing
3959 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3960 '*cancel-path' : 'str'} }
3965 # A union referencing different TPM backend types' configuration options
3967 # @passthrough: The configuration options for the TPM passthrough type
3971 { 'union': 'TpmTypeOptions',
3972 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3977 # Information about the TPM
3979 # @id: The Id of the TPM
3981 # @model: The TPM frontend model
3983 # @options: The TPM (backend) type configuration options
3987 { 'type': 'TPMInfo',
3988 'data': {'id': 'str',
3989 'model': 'TpmModel',
3990 'options': 'TpmTypeOptions' } }
3995 # Return information about the TPM device
3997 # Returns: @TPMInfo on success
4001 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4006 # Specify an ACPI table on the command line to load.
4008 # At most one of @file and @data can be specified. The list of files specified
4009 # by any one of them is loaded and concatenated in order. If both are omitted,
4012 # Other fields / optargs can be used to override fields of the generic ACPI
4013 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4014 # Description Table Header. If a header field is not overridden, then the
4015 # corresponding value from the concatenated blob is used (in case of @file), or
4016 # it is filled in with a hard-coded value (in case of @data).
4018 # String fields are copied into the matching ACPI member from lowest address
4019 # upwards, and silently truncated / NUL-padded to length.
4021 # @sig: #optional table signature / identifier (4 bytes)
4023 # @rev: #optional table revision number (dependent on signature, 1 byte)
4025 # @oem_id: #optional OEM identifier (6 bytes)
4027 # @oem_table_id: #optional OEM table identifier (8 bytes)
4029 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4031 # @asl_compiler_id: #optional identifier of the utility that created the table
4034 # @asl_compiler_rev: #optional revision number of the utility that created the
4037 # @file: #optional colon (:) separated list of pathnames to load and
4038 # concatenate as table data. The resultant binary blob is expected to
4039 # have an ACPI table header. At least one file is required. This field
4042 # @data: #optional colon (:) separated list of pathnames to load and
4043 # concatenate as table data. The resultant binary blob must not have an
4044 # ACPI table header. At least one file is required. This field excludes
4049 { 'type': 'AcpiTableOptions',
4054 '*oem_table_id': 'str',
4055 '*oem_rev': 'uint32',
4056 '*asl_compiler_id': 'str',
4057 '*asl_compiler_rev': 'uint32',
4062 # @CommandLineParameterType:
4064 # Possible types for an option parameter.
4066 # @string: accepts a character string
4068 # @boolean: accepts "on" or "off"
4070 # @number: accepts a number
4072 # @size: accepts a number followed by an optional suffix (K)ilo,
4073 # (M)ega, (G)iga, (T)era
4077 { 'enum': 'CommandLineParameterType',
4078 'data': ['string', 'boolean', 'number', 'size'] }
4081 # @CommandLineParameterInfo:
4083 # Details about a single parameter of a command line option.
4085 # @name: parameter name
4087 # @type: parameter @CommandLineParameterType
4089 # @help: #optional human readable text string, not suitable for parsing.
4093 { 'type': 'CommandLineParameterInfo',
4094 'data': { 'name': 'str',
4095 'type': 'CommandLineParameterType',
4099 # @CommandLineOptionInfo:
4101 # Details about a command line option, including its list of parameter details
4103 # @option: option name
4105 # @parameters: an array of @CommandLineParameterInfo
4109 { 'type': 'CommandLineOptionInfo',
4110 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4113 # @query-command-line-options:
4115 # Query command line option schema.
4117 # @option: #optional option name
4119 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4120 # @option). Returns an error if the given @option doesn't exist.
4124 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4125 'returns': ['CommandLineOptionInfo'] }
4130 # A X86 32-bit register
4134 { 'enum': 'X86CPURegister32',
4135 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4138 # @X86CPUFeatureWordInfo
4140 # Information about a X86 CPU feature word
4142 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4144 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4147 # @cpuid-register: Output register containing the feature bits
4149 # @features: value of output register, containing the feature bits
4153 { 'type': 'X86CPUFeatureWordInfo',
4154 'data': { 'cpuid-input-eax': 'int',
4155 '*cpuid-input-ecx': 'int',
4156 'cpuid-register': 'X86CPURegister32',
4157 'features': 'int' } }
4162 # Packets receiving state
4164 # @normal: filter assigned packets according to the mac-table
4166 # @none: don't receive any assigned packet
4168 # @all: receive all assigned packets
4172 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4177 # Rx-filter information for a NIC.
4179 # @name: net client name
4181 # @promiscuous: whether promiscuous mode is enabled
4183 # @multicast: multicast receive state
4185 # @unicast: unicast receive state
4187 # @vlan: vlan receive state (Since 2.0)
4189 # @broadcast-allowed: whether to receive broadcast
4191 # @multicast-overflow: multicast table is overflowed or not
4193 # @unicast-overflow: unicast table is overflowed or not
4195 # @main-mac: the main macaddr string
4197 # @vlan-table: a list of active vlan id
4199 # @unicast-table: a list of unicast macaddr string
4201 # @multicast-table: a list of multicast macaddr string
4206 { 'type': 'RxFilterInfo',
4209 'promiscuous': 'bool',
4210 'multicast': 'RxState',
4211 'unicast': 'RxState',
4213 'broadcast-allowed': 'bool',
4214 'multicast-overflow': 'bool',
4215 'unicast-overflow': 'bool',
4217 'vlan-table': ['int'],
4218 'unicast-table': ['str'],
4219 'multicast-table': ['str'] }}
4224 # Return rx-filter information for all NICs (or for the given NIC).
4226 # @name: #optional net client name
4228 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4229 # Returns an error if the given @name doesn't exist, or given
4230 # NIC doesn't support rx-filter querying, or given net client
4235 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4236 'returns': ['RxFilterInfo'] }
4240 # @BlockdevDiscardOptions
4242 # Determines how to handle discard requests.
4244 # @ignore: Ignore the request
4245 # @unmap: Forward as an unmap request
4249 { 'enum': 'BlockdevDiscardOptions',
4250 'data': [ 'ignore', 'unmap' ] }
4253 # @BlockdevAioOptions
4255 # Selects the AIO backend to handle I/O requests
4257 # @threads: Use qemu's thread pool
4258 # @native: Use native AIO backend (only Linux and Windows)
4262 { 'enum': 'BlockdevAioOptions',
4263 'data': [ 'threads', 'native' ] }
4266 # @BlockdevCacheOptions
4268 # Includes cache-related options for block devices
4270 # @writeback: #optional enables writeback mode for any caches (default: true)
4271 # @direct: #optional enables use of O_DIRECT (bypass the host page cache;
4273 # @no-flush: #optional ignore any flush requests for the device (default:
4278 { 'type': 'BlockdevCacheOptions',
4279 'data': { '*writeback': 'bool',
4281 '*no-flush': 'bool' } }
4286 # Drivers that are supported in block device operations.
4288 # @host_device, @host_cdrom, @host_floppy: Since 2.1
4292 { 'enum': 'BlockdevDriver',
4293 'data': [ 'file', 'host_device', 'host_cdrom', 'host_floppy',
4294 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
4295 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
4296 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
4299 # @BlockdevOptionsBase
4301 # Options that are available for all block devices, independent of the block
4304 # @driver: block driver name
4305 # @id: #optional id by which the new block device can be referred to.
4306 # This is a required option on the top level of blockdev-add, and
4307 # currently not allowed on any other level.
4308 # @node-name: #optional the name of a block driver state node (Since 2.0)
4309 # @discard: #optional discard-related options (default: ignore)
4310 # @cache: #optional cache-related options
4311 # @aio: #optional AIO backend (default: threads)
4312 # @rerror: #optional how to handle read errors on the device
4314 # @werror: #optional how to handle write errors on the device
4316 # @read-only: #optional whether the block device should be read-only
4321 { 'type': 'BlockdevOptionsBase',
4322 'data': { 'driver': 'BlockdevDriver',
4324 '*node-name': 'str',
4325 '*discard': 'BlockdevDiscardOptions',
4326 '*cache': 'BlockdevCacheOptions',
4327 '*aio': 'BlockdevAioOptions',
4328 '*rerror': 'BlockdevOnError',
4329 '*werror': 'BlockdevOnError',
4330 '*read-only': 'bool' } }
4333 # @BlockdevOptionsFile
4335 # Driver specific block device options for the file backend and similar
4338 # @filename: path to the image file
4342 { 'type': 'BlockdevOptionsFile',
4343 'data': { 'filename': 'str' } }
4346 # @BlockdevOptionsVVFAT
4348 # Driver specific block device options for the vvfat protocol.
4350 # @dir: directory to be exported as FAT image
4351 # @fat-type: #optional FAT type: 12, 16 or 32
4352 # @floppy: #optional whether to export a floppy image (true) or
4353 # partitioned hard disk (false; default)
4354 # @rw: #optional whether to allow write operations (default: false)
4358 { 'type': 'BlockdevOptionsVVFAT',
4359 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
4363 # @BlockdevOptionsGenericFormat
4365 # Driver specific block device options for image format that have no option
4366 # besides their data source.
4368 # @file: reference to or definition of the data source block device
4372 { 'type': 'BlockdevOptionsGenericFormat',
4373 'data': { 'file': 'BlockdevRef' } }
4376 # @BlockdevOptionsGenericCOWFormat
4378 # Driver specific block device options for image format that have no option
4379 # besides their data source and an optional backing file.
4381 # @backing: #optional reference to or definition of the backing file block
4382 # device (if missing, taken from the image file content). It is
4383 # allowed to pass an empty string here in order to disable the
4384 # default backing file.
4388 { 'type': 'BlockdevOptionsGenericCOWFormat',
4389 'base': 'BlockdevOptionsGenericFormat',
4390 'data': { '*backing': 'BlockdevRef' } }
4393 # @BlockdevOptionsQcow2
4395 # Driver specific block device options for qcow2.
4397 # @lazy-refcounts: #optional whether to enable the lazy refcounts
4398 # feature (default is taken from the image file)
4400 # @pass-discard-request: #optional whether discard requests to the qcow2
4401 # device should be forwarded to the data source
4403 # @pass-discard-snapshot: #optional whether discard requests for the data source
4404 # should be issued when a snapshot operation (e.g.
4405 # deleting a snapshot) frees clusters in the qcow2 file
4407 # @pass-discard-other: #optional whether discard requests for the data source
4408 # should be issued on other occasions where a cluster
4413 { 'type': 'BlockdevOptionsQcow2',
4414 'base': 'BlockdevOptionsGenericCOWFormat',
4415 'data': { '*lazy-refcounts': 'bool',
4416 '*pass-discard-request': 'bool',
4417 '*pass-discard-snapshot': 'bool',
4418 '*pass-discard-other': 'bool' } }
4423 # Trigger events supported by blkdebug.
4425 { 'enum': 'BlkdebugEvent',
4426 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
4427 'l1_grow.activate_table', 'l2_load', 'l2_update',
4428 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
4429 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
4430 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
4431 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
4432 'refblock_load', 'refblock_update', 'refblock_update_part',
4433 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
4434 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
4435 'refblock_alloc.switch_table', 'cluster_alloc',
4436 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
4440 # @BlkdebugInjectErrorOptions
4442 # Describes a single error injection for blkdebug.
4444 # @event: trigger event
4446 # @state: #optional the state identifier blkdebug needs to be in to
4447 # actually trigger the event; defaults to "any"
4449 # @errno: #optional error identifier (errno) to be returned; defaults to
4452 # @sector: #optional specifies the sector index which has to be affected
4453 # in order to actually trigger the event; defaults to "any
4456 # @once: #optional disables further events after this one has been
4457 # triggered; defaults to false
4459 # @immediately: #optional fail immediately; defaults to false
4463 { 'type': 'BlkdebugInjectErrorOptions',
4464 'data': { 'event': 'BlkdebugEvent',
4469 '*immediately': 'bool' } }
4472 # @BlkdebugSetStateOptions
4474 # Describes a single state-change event for blkdebug.
4476 # @event: trigger event
4478 # @state: #optional the current state identifier blkdebug needs to be in;
4481 # @new_state: the state identifier blkdebug is supposed to assume if
4482 # this event is triggered
4486 { 'type': 'BlkdebugSetStateOptions',
4487 'data': { 'event': 'BlkdebugEvent',
4489 'new_state': 'int' } }
4492 # @BlockdevOptionsBlkdebug
4494 # Driver specific block device options for blkdebug.
4496 # @image: underlying raw block device (or image file)
4498 # @config: #optional filename of the configuration file
4500 # @align: #optional required alignment for requests in bytes
4502 # @inject-error: #optional array of error injection descriptions
4504 # @set-state: #optional array of state-change descriptions
4508 { 'type': 'BlockdevOptionsBlkdebug',
4509 'data': { 'image': 'BlockdevRef',
4512 '*inject-error': ['BlkdebugInjectErrorOptions'],
4513 '*set-state': ['BlkdebugSetStateOptions'] } }
4516 # @BlockdevOptionsBlkverify
4518 # Driver specific block device options for blkverify.
4520 # @test: block device to be tested
4522 # @raw: raw image used for verification
4526 { 'type': 'BlockdevOptionsBlkverify',
4527 'data': { 'test': 'BlockdevRef',
4528 'raw': 'BlockdevRef' } }
4531 # @BlockdevOptionsQuorum
4533 # Driver specific block device options for Quorum
4535 # @blkverify: #optional true if the driver must print content mismatch
4536 # set to false by default
4538 # @children: the children block devices to use
4540 # @vote-threshold: the vote limit under which a read will fail
4544 { 'type': 'BlockdevOptionsQuorum',
4545 'data': { '*blkverify': 'bool',
4546 'children': [ 'BlockdevRef' ],
4547 'vote-threshold': 'int' } }
4552 # Options for creating a block device.
4556 { 'union': 'BlockdevOptions',
4557 'base': 'BlockdevOptionsBase',
4558 'discriminator': 'driver',
4560 'file': 'BlockdevOptionsFile',
4561 'host_device':'BlockdevOptionsFile',
4562 'host_cdrom': 'BlockdevOptionsFile',
4563 'host_floppy':'BlockdevOptionsFile',
4564 'http': 'BlockdevOptionsFile',
4565 'https': 'BlockdevOptionsFile',
4566 'ftp': 'BlockdevOptionsFile',
4567 'ftps': 'BlockdevOptionsFile',
4568 'tftp': 'BlockdevOptionsFile',
4569 # TODO gluster: Wait for structured options
4570 # TODO iscsi: Wait for structured options
4571 # TODO nbd: Should take InetSocketAddress for 'host'?
4572 # TODO nfs: Wait for structured options
4573 # TODO rbd: Wait for structured options
4574 # TODO sheepdog: Wait for structured options
4575 # TODO ssh: Should take InetSocketAddress for 'host'?
4576 'vvfat': 'BlockdevOptionsVVFAT',
4577 'blkdebug': 'BlockdevOptionsBlkdebug',
4578 'blkverify': 'BlockdevOptionsBlkverify',
4579 'bochs': 'BlockdevOptionsGenericFormat',
4580 'cloop': 'BlockdevOptionsGenericFormat',
4581 'cow': 'BlockdevOptionsGenericCOWFormat',
4582 'dmg': 'BlockdevOptionsGenericFormat',
4583 'parallels': 'BlockdevOptionsGenericFormat',
4584 'qcow': 'BlockdevOptionsGenericCOWFormat',
4585 'qcow2': 'BlockdevOptionsQcow2',
4586 'qed': 'BlockdevOptionsGenericCOWFormat',
4587 'raw': 'BlockdevOptionsGenericFormat',
4588 'vdi': 'BlockdevOptionsGenericFormat',
4589 'vhdx': 'BlockdevOptionsGenericFormat',
4590 'vmdk': 'BlockdevOptionsGenericCOWFormat',
4591 'vpc': 'BlockdevOptionsGenericFormat',
4592 'quorum': 'BlockdevOptionsQuorum'
4598 # Reference to a block device.
4600 # @definition: defines a new block device inline
4601 # @reference: references the ID of an existing block device. An
4602 # empty string means that no block device should be
4607 { 'union': 'BlockdevRef',
4608 'discriminator': {},
4609 'data': { 'definition': 'BlockdevOptions',
4610 'reference': 'str' } }
4615 # Creates a new block device.
4617 # @options: block device options for the new device
4621 { 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }
4626 # Button of a pointer input device (mouse, tablet).
4630 { 'enum' : 'InputButton',
4631 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
4636 # Position axis of a pointer input device (mouse, tablet).
4640 { 'enum' : 'InputAxis',
4641 'data' : [ 'X', 'Y' ] }
4646 # Keyboard input event.
4648 # @key: Which key this event is for.
4649 # @down: True for key-down and false for key-up events.
4653 { 'type' : 'InputKeyEvent',
4654 'data' : { 'key' : 'KeyValue',
4660 # Pointer button input event.
4662 # @button: Which button this event is for.
4663 # @down: True for key-down and false for key-up events.
4667 { 'type' : 'InputBtnEvent',
4668 'data' : { 'button' : 'InputButton',
4674 # Pointer motion input event.
4676 # @axis: Which axis is referenced by @value.
4677 # @value: Pointer position. For absolute coordinates the
4678 # valid range is 0 -> 0x7ffff
4682 { 'type' : 'InputMoveEvent',
4683 'data' : { 'axis' : 'InputAxis',
4689 # Input event union.
4693 { 'union' : 'InputEvent',
4694 'data' : { 'key' : 'InputKeyEvent',
4695 'btn' : 'InputBtnEvent',
4696 'rel' : 'InputMoveEvent',
4697 'abs' : 'InputMoveEvent' } }