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)
654 # @dirty-sync-count: number of times that dirty ram was synchronized (since 2.1)
658 { 'type': 'MigrationStats',
659 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
660 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
661 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
662 'mbps' : 'number', 'dirty-sync-count' : 'int' } }
667 # Detailed XBZRLE migration cache statistics
669 # @cache-size: XBZRLE cache size
671 # @bytes: amount of bytes already transferred to the target VM
673 # @pages: amount of pages transferred to the target VM
675 # @cache-miss: number of cache miss
677 # @cache-miss-rate: rate of cache miss (since 2.1)
679 # @overflow: number of overflows
683 { 'type': 'XBZRLECacheStats',
684 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
685 'cache-miss': 'int', 'cache-miss-rate': 'number',
686 'overflow': 'int' } }
691 # Information about current migration process.
693 # @status: #optional string describing the current migration status.
694 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
695 # 'cancelled'. If this field is not returned, no migration process
698 # @ram: #optional @MigrationStats containing detailed migration
699 # status, only returned if status is 'active' or
700 # 'completed'. 'comppleted' (since 1.2)
702 # @disk: #optional @MigrationStats containing detailed disk migration
703 # status, only returned if status is 'active' and it is a block
706 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
707 # migration statistics, only returned if XBZRLE feature is on and
708 # status is 'active' or 'completed' (since 1.2)
710 # @total-time: #optional total amount of milliseconds since migration started.
711 # If migration has ended, it returns the total migration
714 # @downtime: #optional only present when migration finishes correctly
715 # total downtime in milliseconds for the guest.
718 # @expected-downtime: #optional only present while migration is active
719 # expected downtime in milliseconds for the guest in last walk
720 # of the dirty bitmap. (since 1.3)
722 # @setup-time: #optional amount of setup time in milliseconds _before_ the
723 # iterations begin but _after_ the QMP command is issued. This is designed
724 # to provide an accounting of any activities (such as RDMA pinning) which
725 # may be expensive, but do not actually occur during the iterative
726 # migration rounds themselves. (since 1.6)
730 { 'type': 'MigrationInfo',
731 'data': {'*status': 'str', '*ram': 'MigrationStats',
732 '*disk': 'MigrationStats',
733 '*xbzrle-cache': 'XBZRLECacheStats',
734 '*total-time': 'int',
735 '*expected-downtime': 'int',
737 '*setup-time': 'int'} }
742 # Returns information about current migration process.
744 # Returns: @MigrationInfo
748 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
751 # @MigrationCapability
753 # Migration capabilities enumeration
755 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
756 # This feature allows us to minimize migration traffic for certain work
757 # loads, by sending compressed difference of the pages
759 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
760 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
761 # Disabled by default. (since 2.0)
763 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
764 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
765 # source and target VM to support this feature. To enable it is sufficient
766 # to enable the capability on the source VM. The feature is disabled by
767 # default. (since 1.6)
769 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
770 # to speed up convergence of RAM migration. (since 1.6)
774 { 'enum': 'MigrationCapability',
775 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
778 # @MigrationCapabilityStatus
780 # Migration capability information
782 # @capability: capability enum
784 # @state: capability state bool
788 { 'type': 'MigrationCapabilityStatus',
789 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
792 # @migrate-set-capabilities
794 # Enable/Disable the following migration capabilities (like xbzrle)
796 # @capabilities: json array of capability modifications to make
800 { 'command': 'migrate-set-capabilities',
801 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
804 # @query-migrate-capabilities
806 # Returns information about the current migration capabilities status
808 # Returns: @MigrationCapabilitiesStatus
812 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
817 # Information about a mouse device.
819 # @name: the name of the mouse device
821 # @index: the index of the mouse device
823 # @current: true if this device is currently receiving mouse events
825 # @absolute: true if this device supports absolute coordinates as input
829 { 'type': 'MouseInfo',
830 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
831 'absolute': 'bool'} }
836 # Returns information about each active mouse device
838 # Returns: a list of @MouseInfo for each device
842 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
847 # Information about a virtual CPU
849 # @CPU: the index of the virtual CPU
851 # @current: this only exists for backwards compatible and should be ignored
853 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
854 # to a processor specific low power mode.
856 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
858 # If the target is Sparc, this is the PC component of the
859 # instruction pointer.
861 # @nip: #optional If the target is PPC, the instruction pointer
863 # @npc: #optional If the target is Sparc, the NPC component of the instruction
866 # @PC: #optional If the target is MIPS, the instruction pointer
868 # @thread_id: ID of the underlying host thread
872 # Notes: @halted is a transient state that changes frequently. By the time the
873 # data is sent to the client, the guest may no longer be halted.
876 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
877 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
882 # Returns a list of information about each virtual CPU.
884 # Returns: a list of @CpuInfo for each virtual CPU
888 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
893 # Information about an iothread
895 # @id: the identifier of the iothread
897 # @thread-id: ID of the underlying host thread
901 { 'type': 'IOThreadInfo',
902 'data': {'id': 'str', 'thread-id': 'int'} }
907 # Returns a list of information about each iothread.
909 # Note this list excludes the QEMU main loop thread, which is not declared
910 # using the -object iothread command-line option. It is always the main thread
913 # Returns: a list of @IOThreadInfo for each iothread
917 { 'command': 'query-iothreads', 'returns': ['IOThreadInfo'] }
922 # Information about the backing device for a block device.
924 # @file: the filename of the backing device
926 # @node-name: #optional the name of the block driver node (Since 2.0)
928 # @ro: true if the backing device was open read-only
930 # @drv: the name of the block format used to open the backing device. As of
931 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
932 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
933 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
934 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
936 # @backing_file: #optional the name of the backing file (for copy-on-write)
938 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
940 # @encrypted: true if the backing device is encrypted
942 # @encryption_key_missing: true if the backing device is encrypted but an
943 # valid encryption key is missing
945 # @bps: total throughput limit in bytes per second is specified
947 # @bps_rd: read throughput limit in bytes per second is specified
949 # @bps_wr: write throughput limit in bytes per second is specified
951 # @iops: total I/O operations per second is specified
953 # @iops_rd: read I/O operations per second is specified
955 # @iops_wr: write I/O operations per second is specified
957 # @image: the info of image used (since: 1.6)
959 # @bps_max: #optional total max in bytes (Since 1.7)
961 # @bps_rd_max: #optional read max in bytes (Since 1.7)
963 # @bps_wr_max: #optional write max in bytes (Since 1.7)
965 # @iops_max: #optional total I/O operations max (Since 1.7)
967 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
969 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
971 # @iops_size: #optional an I/O size in bytes (Since 1.7)
976 { 'type': 'BlockDeviceInfo',
977 'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
978 '*backing_file': 'str', 'backing_file_depth': 'int',
979 'encrypted': 'bool', 'encryption_key_missing': 'bool',
980 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
981 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
982 'image': 'ImageInfo',
983 '*bps_max': 'int', '*bps_rd_max': 'int',
984 '*bps_wr_max': 'int', '*iops_max': 'int',
985 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
986 '*iops_size': 'int' } }
989 # @BlockDeviceIoStatus:
991 # An enumeration of block device I/O status.
993 # @ok: The last I/O operation has succeeded
995 # @failed: The last I/O operation has failed
997 # @nospace: The last I/O operation has failed due to a no-space condition
1001 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
1004 # @BlockDeviceMapEntry:
1006 # Entry in the metadata map of the device (returned by "qemu-img map")
1008 # @start: Offset in the image of the first byte described by this entry
1011 # @length: Length of the range described by this entry (in bytes)
1013 # @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.)
1014 # before reaching one for which the range is allocated. The value is
1015 # in the range 0 to the depth of the image chain - 1.
1017 # @zero: the sectors in this range read as zeros
1019 # @data: reading the image will actually read data from a file (in particular,
1020 # if @offset is present this means that the sectors are not simply
1021 # preallocated, but contain actual data in raw format)
1023 # @offset: if present, the image file stores the data for this range in
1024 # raw format at the given offset.
1028 { 'type': 'BlockDeviceMapEntry',
1029 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
1030 'data': 'bool', '*offset': 'int' } }
1035 # Block dirty bitmap information.
1037 # @count: number of dirty bytes according to the dirty bitmap
1039 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
1043 { 'type': 'BlockDirtyInfo',
1044 'data': {'count': 'int', 'granularity': 'int'} }
1049 # Block device information. This structure describes a virtual device and
1050 # the backing device associated with it.
1052 # @device: The device name associated with the virtual device.
1054 # @type: This field is returned only for compatibility reasons, it should
1055 # not be used (always returns 'unknown')
1057 # @removable: True if the device supports removable media.
1059 # @locked: True if the guest has locked this device from having its media
1062 # @tray_open: #optional True if the device has a tray and it is open
1063 # (only present if removable is true)
1065 # @dirty-bitmaps: #optional dirty bitmaps information (only present if the
1066 # driver has one or more dirty bitmaps) (Since 2.0)
1068 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
1069 # supports it and the VM is configured to stop on errors
1071 # @inserted: #optional @BlockDeviceInfo describing the device if media is
1076 { 'type': 'BlockInfo',
1077 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
1078 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
1079 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
1080 '*dirty-bitmaps': ['BlockDirtyInfo'] } }
1085 # Get a list of BlockInfo for all virtual block devices.
1087 # Returns: a list of @BlockInfo describing each virtual block device
1091 { 'command': 'query-block', 'returns': ['BlockInfo'] }
1094 # @BlockDeviceStats:
1096 # Statistics of a virtual block device or a block backing device.
1098 # @rd_bytes: The number of bytes read by the device.
1100 # @wr_bytes: The number of bytes written by the device.
1102 # @rd_operations: The number of read operations performed by the device.
1104 # @wr_operations: The number of write operations performed by the device.
1106 # @flush_operations: The number of cache flush operations performed by the
1107 # device (since 0.15.0)
1109 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
1112 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
1114 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
1116 # @wr_highest_offset: The offset after the greatest byte written to the
1117 # device. The intended use of this information is for
1118 # growable sparse files (like qcow2) that are used on top
1119 # of a physical device.
1123 { 'type': 'BlockDeviceStats',
1124 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
1125 'wr_operations': 'int', 'flush_operations': 'int',
1126 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
1127 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
1132 # Statistics of a virtual block device or a block backing device.
1134 # @device: #optional If the stats are for a virtual block device, the name
1135 # corresponding to the virtual block device.
1137 # @stats: A @BlockDeviceStats for the device.
1139 # @parent: #optional This describes the file block device if it has one.
1141 # @backing: #optional This describes the backing block device if it has one.
1146 { 'type': 'BlockStats',
1147 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
1148 '*parent': 'BlockStats',
1149 '*backing': 'BlockStats'} }
1152 # @query-blockstats:
1154 # Query the @BlockStats for all virtual block devices.
1156 # Returns: A list of @BlockStats for each virtual block devices.
1160 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
1165 # Information about a connected VNC client.
1167 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1170 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1171 # 'ipv4' if the client is connected via IPv4 and TCP
1172 # 'unix' if the client is connected via a unix domain socket
1173 # 'unknown' otherwise
1175 # @service: The service name of the client's port. This may depends on the
1176 # host system's service database so symbolic names should not be
1179 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1180 # Name of the client.
1182 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1183 # used for authentication.
1187 { 'type': 'VncClientInfo',
1188 'data': {'host': 'str', 'family': 'str', 'service': 'str',
1189 '*x509_dname': 'str', '*sasl_username': 'str'} }
1194 # Information about the VNC session.
1196 # @enabled: true if the VNC server is enabled, false otherwise
1198 # @host: #optional The hostname the VNC server is bound to. This depends on
1199 # the name resolution on the host and may be an IP address.
1201 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1202 # 'ipv4' if the host is listening for IPv4 connections
1203 # 'unix' if the host is listening on a unix domain socket
1204 # 'unknown' otherwise
1206 # @service: #optional The service name of the server's port. This may depends
1207 # on the host system's service database so symbolic names should not
1210 # @auth: #optional the current authentication type used by the server
1211 # 'none' if no authentication is being used
1212 # 'vnc' if VNC authentication is being used
1213 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1214 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1215 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1216 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1217 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1218 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1219 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1220 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1221 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1223 # @clients: a list of @VncClientInfo of all currently connected clients
1227 { 'type': 'VncInfo',
1228 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1229 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1234 # Returns information about the current VNC server
1240 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1245 # Information about a SPICE client channel.
1247 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1250 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1251 # 'ipv4' if the client is connected via IPv4 and TCP
1252 # 'unix' if the client is connected via a unix domain socket
1253 # 'unknown' otherwise
1255 # @port: The client's port number.
1257 # @connection-id: SPICE connection id number. All channels with the same id
1258 # belong to the same SPICE session.
1260 # @connection-type: SPICE channel type number. "1" is the main control
1261 # channel, filter for this one if you want to track spice
1264 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1265 # multiple channels of the same type exist, such as multiple
1266 # display channels in a multihead setup
1268 # @tls: true if the channel is encrypted, false otherwise.
1272 { 'type': 'SpiceChannel',
1273 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1274 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1278 # @SpiceQueryMouseMode
1280 # An enumeration of Spice mouse states.
1282 # @client: Mouse cursor position is determined by the client.
1284 # @server: Mouse cursor position is determined by the server.
1286 # @unknown: No information is available about mouse mode used by
1289 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1293 { 'enum': 'SpiceQueryMouseMode',
1294 'data': [ 'client', 'server', 'unknown' ] }
1299 # Information about the SPICE session.
1301 # @enabled: true if the SPICE server is enabled, false otherwise
1303 # @migrated: true if the last guest migration completed and spice
1304 # migration had completed as well. false otherwise.
1306 # @host: #optional The hostname the SPICE server is bound to. This depends on
1307 # the name resolution on the host and may be an IP address.
1309 # @port: #optional The SPICE server's port number.
1311 # @compiled-version: #optional SPICE server version.
1313 # @tls-port: #optional The SPICE server's TLS port number.
1315 # @auth: #optional the current authentication type used by the server
1316 # 'none' if no authentication is being used
1317 # 'spice' uses SASL or direct TLS authentication, depending on command
1320 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1321 # be determined by the client or the server, or unknown if spice
1322 # server doesn't provide this information.
1326 # @channels: a list of @SpiceChannel for each active spice channel
1330 { 'type': 'SpiceInfo',
1331 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1332 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1333 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1338 # Returns information about the current SPICE server
1340 # Returns: @SpiceInfo
1344 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1349 # Information about the guest balloon device.
1351 # @actual: the number of bytes the balloon currently contains
1356 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1361 # Return information about the balloon device.
1363 # Returns: @BalloonInfo on success
1364 # If the balloon driver is enabled but not functional because the KVM
1365 # kernel module cannot support it, KvmMissingCap
1366 # If no balloon device is present, DeviceNotActive
1370 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1375 # A PCI device memory region
1377 # @base: the starting address (guest physical)
1379 # @limit: the ending address (guest physical)
1383 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1388 # Information about a PCI device I/O region.
1390 # @bar: the index of the Base Address Register for this region
1392 # @type: 'io' if the region is a PIO region
1393 # 'memory' if the region is a MMIO region
1395 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1397 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1401 { 'type': 'PciMemoryRegion',
1402 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1403 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1408 # Information about a PCI Bridge device
1410 # @bus.number: primary bus interface number. This should be the number of the
1411 # bus the device resides on.
1413 # @bus.secondary: secondary bus interface number. This is the number of the
1414 # main bus for the bridge
1416 # @bus.subordinate: This is the highest number bus that resides below the
1419 # @bus.io_range: The PIO range for all devices on this bridge
1421 # @bus.memory_range: The MMIO range for all devices on this bridge
1423 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1426 # @devices: a list of @PciDeviceInfo for each device on this bridge
1430 { 'type': 'PciBridgeInfo',
1431 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1432 'io_range': 'PciMemoryRange',
1433 'memory_range': 'PciMemoryRange',
1434 'prefetchable_range': 'PciMemoryRange' },
1435 '*devices': ['PciDeviceInfo']} }
1440 # Information about a PCI device
1442 # @bus: the bus number of the device
1444 # @slot: the slot the device is located in
1446 # @function: the function of the slot used by the device
1448 # @class_info.desc: #optional a string description of the device's class
1450 # @class_info.class: the class code of the device
1452 # @id.device: the PCI device id
1454 # @id.vendor: the PCI vendor id
1456 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1458 # @qdev_id: the device name of the PCI device
1460 # @pci_bridge: if the device is a PCI bridge, the bridge information
1462 # @regions: a list of the PCI I/O regions associated with the device
1464 # Notes: the contents of @class_info.desc are not stable and should only be
1465 # treated as informational.
1469 { 'type': 'PciDeviceInfo',
1470 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1471 'class_info': {'*desc': 'str', 'class': 'int'},
1472 'id': {'device': 'int', 'vendor': 'int'},
1473 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1474 'regions': ['PciMemoryRegion']} }
1479 # Information about a PCI bus
1481 # @bus: the bus index
1483 # @devices: a list of devices on this bus
1487 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1492 # Return information about the PCI bus topology of the guest.
1494 # Returns: a list of @PciInfo for each PCI bus
1498 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1503 # An enumeration of possible behaviors for errors on I/O operations.
1504 # The exact meaning depends on whether the I/O was initiated by a guest
1507 # @report: for guest operations, report the error to the guest;
1508 # for jobs, cancel the job
1510 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1511 # or BLOCK_JOB_ERROR)
1513 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1515 # @stop: for guest operations, stop the virtual machine;
1516 # for jobs, pause the job
1520 { 'enum': 'BlockdevOnError',
1521 'data': ['report', 'ignore', 'enospc', 'stop'] }
1526 # An enumeration of possible behaviors for the initial synchronization
1527 # phase of storage mirroring.
1529 # @top: copies data in the topmost image to the destination
1531 # @full: copies data from all images to the destination
1533 # @none: only copy data written from now on
1537 { 'enum': 'MirrorSyncMode',
1538 'data': ['top', 'full', 'none'] }
1543 # Type of a block job.
1545 # @commit: block commit job type, see "block-commit"
1547 # @stream: block stream job type, see "block-stream"
1549 # @mirror: drive mirror job type, see "drive-mirror"
1551 # @backup: drive backup job type, see "drive-backup"
1555 { 'enum': 'BlockJobType',
1556 'data': ['commit', 'stream', 'mirror', 'backup'] }
1561 # Information about a long-running block device operation.
1563 # @type: the job type ('stream' for image streaming)
1565 # @device: the block device name
1567 # @len: the maximum progress value
1569 # @busy: false if the job is known to be in a quiescent state, with
1570 # no pending I/O. Since 1.3.
1572 # @paused: whether the job is paused or, if @busy is true, will
1573 # pause itself as soon as possible. Since 1.3.
1575 # @offset: the current progress value
1577 # @speed: the rate limit, bytes per second
1579 # @io-status: the status of the job (since 1.3)
1583 { 'type': 'BlockJobInfo',
1584 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1585 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1586 'io-status': 'BlockDeviceIoStatus'} }
1589 # @query-block-jobs:
1591 # Return information about long-running block device operations.
1593 # Returns: a list of @BlockJobInfo for each active block job
1597 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1602 # This command will cause the QEMU process to exit gracefully. While every
1603 # attempt is made to send the QMP response before terminating, this is not
1604 # guaranteed. When using this interface, a premature EOF would not be
1609 { 'command': 'quit' }
1614 # Stop all guest VCPU execution.
1618 # Notes: This function will succeed even if the guest is already in the stopped
1619 # state. In "inmigrate" state, it will ensure that the guest
1620 # remains paused once migration finishes, as if the -S option was
1621 # passed on the command line.
1623 { 'command': 'stop' }
1628 # Performs a hard reset of a guest.
1632 { 'command': 'system_reset' }
1635 # @system_powerdown:
1637 # Requests that a guest perform a powerdown operation.
1641 # Notes: A guest may or may not respond to this command. This command
1642 # returning does not indicate that a guest has accepted the request or
1643 # that it has shut down. Many guests will respond to this command by
1644 # prompting the user in some way.
1646 { 'command': 'system_powerdown' }
1651 # This command is a nop that is only provided for the purposes of compatibility.
1655 # Notes: Do not use this command.
1657 { 'command': 'cpu', 'data': {'index': 'int'} }
1662 # Adds CPU with specified ID
1664 # @id: ID of CPU to be created, valid values [0..max_cpus)
1666 # Returns: Nothing on success
1670 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1675 # Save a portion of guest memory to a file.
1677 # @val: the virtual address of the guest to start from
1679 # @size: the size of memory region to save
1681 # @filename: the file to save the memory to as binary data
1683 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1684 # virtual address (defaults to CPU 0)
1686 # Returns: Nothing on success
1690 # Notes: Errors were not reliably returned until 1.1
1692 { 'command': 'memsave',
1693 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1698 # Save a portion of guest physical memory to a file.
1700 # @val: the physical address of the guest to start from
1702 # @size: the size of memory region to save
1704 # @filename: the file to save the memory to as binary data
1706 # Returns: Nothing on success
1710 # Notes: Errors were not reliably returned until 1.1
1712 { 'command': 'pmemsave',
1713 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1718 # Resume guest VCPU execution.
1722 # Returns: If successful, nothing
1723 # If QEMU was started with an encrypted block device and a key has
1724 # not yet been set, DeviceEncrypted.
1726 # Notes: This command will succeed if the guest is currently running. It
1727 # will also succeed if the guest is in the "inmigrate" state; in
1728 # this case, the effect of the command is to make sure the guest
1729 # starts once migration finishes, removing the effect of the -S
1730 # command line option if it was passed.
1732 { 'command': 'cont' }
1737 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1743 { 'command': 'system_wakeup' }
1748 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1750 # Returns: If successful, nothing
1754 # Notes: Only x86 Virtual Machines support this command.
1756 { 'command': 'inject-nmi' }
1761 # Sets the link status of a virtual network adapter.
1763 # @name: the device name of the virtual network adapter
1765 # @up: true to set the link status to be up
1767 # Returns: Nothing on success
1768 # If @name is not a valid network device, DeviceNotFound
1772 # Notes: Not all network adapters support setting link status. This command
1773 # will succeed even if the network adapter does not support link status
1776 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1781 # This command sets the password of a block device that has not been open
1782 # with a password and requires one.
1784 # The two cases where this can happen are a block device is created through
1785 # QEMU's initial command line or a block device is changed through the legacy
1786 # @change interface.
1788 # In the event that the block device is created through the initial command
1789 # line, the VM will start in the stopped state regardless of whether '-S' is
1790 # used. The intention is for a management tool to query the block devices to
1791 # determine which ones are encrypted, set the passwords with this command, and
1792 # then start the guest with the @cont command.
1794 # Either @device or @node-name must be set but not both.
1796 # @device: #optional the name of the block backend device to set the password on
1798 # @node-name: #optional graph node name to set the password on (Since 2.0)
1800 # @password: the password to use for the device
1802 # Returns: nothing on success
1803 # If @device is not a valid block device, DeviceNotFound
1804 # If @device is not encrypted, DeviceNotEncrypted
1806 # Notes: Not all block formats support encryption and some that do are not
1807 # able to validate that a password is correct. Disk corruption may
1808 # occur if an invalid password is specified.
1812 { 'command': 'block_passwd', 'data': {'*device': 'str',
1813 '*node-name': 'str', 'password': 'str'} }
1818 # Request the balloon driver to change its balloon size.
1820 # @value: the target size of the balloon in bytes
1822 # Returns: Nothing on success
1823 # If the balloon driver is enabled but not functional because the KVM
1824 # kernel module cannot support it, KvmMissingCap
1825 # If no balloon device is present, DeviceNotActive
1827 # Notes: This command just issues a request to the guest. When it returns,
1828 # the balloon size may not have changed. A guest can change the balloon
1829 # size independent of this command.
1833 { 'command': 'balloon', 'data': {'value': 'int'} }
1838 # Resize a block image while a guest is running.
1840 # Either @device or @node-name must be set but not both.
1842 # @device: #optional the name of the device to get the image resized
1844 # @node-name: #optional graph node name to get the image resized (Since 2.0)
1846 # @size: new image size in bytes
1848 # Returns: nothing on success
1849 # If @device is not a valid block device, DeviceNotFound
1853 { 'command': 'block_resize', 'data': { '*device': 'str',
1854 '*node-name': 'str',
1860 # An enumeration that tells QEMU how to set the backing file path in
1863 # @existing: QEMU should look for an existing image file.
1865 # @absolute-paths: QEMU should create a new image with absolute paths
1866 # for the backing file. If there is no backing file available, the new
1867 # image will not be backed either.
1871 { 'enum': 'NewImageMode',
1872 'data': [ 'existing', 'absolute-paths' ] }
1877 # Either @device or @node-name must be set but not both.
1879 # @device: #optional the name of the device to generate the snapshot from.
1881 # @node-name: #optional graph node name to generate the snapshot from (Since 2.0)
1883 # @snapshot-file: the target of the new image. A new file will be created.
1885 # @snapshot-node-name: #optional the graph node name of the new image (Since 2.0)
1887 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1889 # @mode: #optional whether and how QEMU should create a new image, default is
1892 { 'type': 'BlockdevSnapshot',
1893 'data': { '*device': 'str', '*node-name': 'str',
1894 'snapshot-file': 'str', '*snapshot-node-name': 'str',
1895 '*format': 'str', '*mode': 'NewImageMode' } }
1898 # @BlockdevSnapshotInternal
1900 # @device: the name of the device to generate the snapshot from
1902 # @name: the name of the internal snapshot to be created
1904 # Notes: In transaction, if @name is empty, or any snapshot matching @name
1905 # exists, the operation will fail. Only some image formats support it,
1906 # for example, qcow2, rbd, and sheepdog.
1910 { 'type': 'BlockdevSnapshotInternal',
1911 'data': { 'device': 'str', 'name': 'str' } }
1916 # @device: the name of the device which should be copied.
1918 # @target: the target of the new image. If the file exists, or if it
1919 # is a device, the existing file/device will be used as the new
1920 # destination. If it does not exist, a new file will be created.
1922 # @format: #optional the format of the new destination, default is to
1923 # probe if @mode is 'existing', else the format of the source
1925 # @sync: what parts of the disk image should be copied to the destination
1926 # (all the disk, only the sectors allocated in the topmost image, or
1929 # @mode: #optional whether and how QEMU should create a new image, default is
1932 # @speed: #optional the maximum speed, in bytes per second
1934 # @on-source-error: #optional the action to take on an error on the source,
1935 # default 'report'. 'stop' and 'enospc' can only be used
1936 # if the block device supports io-status (see BlockInfo).
1938 # @on-target-error: #optional the action to take on an error on the target,
1939 # default 'report' (no limitations, since this applies to
1940 # a different block device than @device).
1942 # Note that @on-source-error and @on-target-error only affect background I/O.
1943 # If an error occurs during a guest write request, the device's rerror/werror
1944 # actions will be used.
1948 { 'type': 'DriveBackup',
1949 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1950 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1952 '*on-source-error': 'BlockdevOnError',
1953 '*on-target-error': 'BlockdevOnError' } }
1958 # This action can be used to test transaction failure.
1966 # @TransactionAction
1968 # A discriminated record of operations that can be performed with
1971 { 'union': 'TransactionAction',
1973 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1974 'drive-backup': 'DriveBackup',
1976 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1982 # Executes a number of transactionable QMP commands atomically. If any
1983 # operation fails, then the entire set of actions will be abandoned and the
1984 # appropriate error returned.
1987 # @TransactionAction: information needed for the respective operation
1989 # Returns: nothing on success
1990 # Errors depend on the operations of the transaction
1992 # Note: The transaction aborts on the first failure. Therefore, there will be
1993 # information on only one failed operation returned in an error condition, and
1994 # subsequent actions will not have been attempted.
1998 { 'command': 'transaction',
1999 'data': { 'actions': [ 'TransactionAction' ] } }
2002 # @blockdev-snapshot-sync
2004 # Generates a synchronous snapshot of a block device.
2006 # For the arguments, see the documentation of BlockdevSnapshot.
2008 # Returns: nothing on success
2009 # If @device is not a valid block device, DeviceNotFound
2013 { 'command': 'blockdev-snapshot-sync',
2014 'data': 'BlockdevSnapshot' }
2017 # @blockdev-snapshot-internal-sync
2019 # Synchronously take an internal snapshot of a block device, when the format
2020 # of the image used supports it.
2022 # For the arguments, see the documentation of BlockdevSnapshotInternal.
2024 # Returns: nothing on success
2025 # If @device is not a valid block device, DeviceNotFound
2026 # If any snapshot matching @name exists, or @name is empty,
2028 # If the format of the image used does not support it,
2029 # BlockFormatFeatureNotSupported
2033 { 'command': 'blockdev-snapshot-internal-sync',
2034 'data': 'BlockdevSnapshotInternal' }
2037 # @blockdev-snapshot-delete-internal-sync
2039 # Synchronously delete an internal snapshot of a block device, when the format
2040 # of the image used support it. The snapshot is identified by name or id or
2041 # both. One of the name or id is required. Return SnapshotInfo for the
2042 # successfully deleted snapshot.
2044 # @device: the name of the device to delete the snapshot from
2046 # @id: optional the snapshot's ID to be deleted
2048 # @name: optional the snapshot's name to be deleted
2050 # Returns: SnapshotInfo on success
2051 # If @device is not a valid block device, DeviceNotFound
2052 # If snapshot not found, GenericError
2053 # If the format of the image used does not support it,
2054 # BlockFormatFeatureNotSupported
2055 # If @id and @name are both not specified, GenericError
2059 { 'command': 'blockdev-snapshot-delete-internal-sync',
2060 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
2061 'returns': 'SnapshotInfo' }
2064 # @human-monitor-command:
2066 # Execute a command on the human monitor and return the output.
2068 # @command-line: the command to execute in the human monitor
2070 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2072 # Returns: the output of the command as a string
2076 # Notes: This command only exists as a stop-gap. Its use is highly
2077 # discouraged. The semantics of this command are not guaranteed.
2079 # Known limitations:
2081 # o This command is stateless, this means that commands that depend
2082 # on state information (such as getfd) might not work
2084 # o Commands that prompt the user for data (eg. 'cont' when the block
2085 # device is encrypted) don't currently work
2087 { 'command': 'human-monitor-command',
2088 'data': {'command-line': 'str', '*cpu-index': 'int'},
2094 # Live commit of data from overlay image nodes into backing nodes - i.e.,
2095 # writes data between 'top' and 'base' into 'base'.
2097 # @device: the name of the device
2099 # @base: #optional The file name of the backing image to write data into.
2100 # If not specified, this is the deepest backing image
2102 # @top: The file name of the backing image within the image chain,
2103 # which contains the topmost data to be committed down.
2105 # If top == base, that is an error.
2106 # If top == active, the job will not be completed by itself,
2107 # user needs to complete the job with the block-job-complete
2108 # command after getting the ready event. (Since 2.0)
2110 # If the base image is smaller than top, then the base image
2111 # will be resized to be the same size as top. If top is
2112 # smaller than the base image, the base will not be
2113 # truncated. If you want the base image size to match the
2114 # size of the smaller top, you can safely truncate it
2115 # yourself once the commit operation successfully completes.
2118 # @speed: #optional the maximum speed, in bytes per second
2120 # Returns: Nothing on success
2121 # If commit or stream is already active on this device, DeviceInUse
2122 # If @device does not exist, DeviceNotFound
2123 # If image commit is not supported by this device, NotSupported
2124 # If @base or @top is invalid, a generic error is returned
2125 # If @speed is invalid, InvalidParameter
2130 { 'command': 'block-commit',
2131 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
2137 # Start a point-in-time copy of a block device to a new destination. The
2138 # status of ongoing drive-backup operations can be checked with
2139 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
2140 # The operation can be stopped before it has completed using the
2141 # block-job-cancel command.
2143 # For the arguments, see the documentation of DriveBackup.
2145 # Returns: nothing on success
2146 # If @device is not a valid block device, DeviceNotFound
2150 { 'command': 'drive-backup', 'data': 'DriveBackup' }
2153 # @query-named-block-nodes
2155 # Get the named block driver list
2157 # Returns: the list of BlockDeviceInfo
2161 { 'command': 'query-named-block-nodes', 'returns': [ 'BlockDeviceInfo' ] }
2166 # Start mirroring a block device's writes to a new destination.
2168 # @device: the name of the device whose writes should be mirrored.
2170 # @target: the target of the new image. If the file exists, or if it
2171 # is a device, the existing file/device will be used as the new
2172 # destination. If it does not exist, a new file will be created.
2174 # @format: #optional the format of the new destination, default is to
2175 # probe if @mode is 'existing', else the format of the source
2177 # @mode: #optional whether and how QEMU should create a new image, default is
2180 # @speed: #optional the maximum speed, in bytes per second
2182 # @sync: what parts of the disk image should be copied to the destination
2183 # (all the disk, only the sectors allocated in the topmost image, or
2186 # @granularity: #optional granularity of the dirty bitmap, default is 64K
2187 # if the image format doesn't have clusters, 4K if the clusters
2188 # are smaller than that, else the cluster size. Must be a
2189 # power of 2 between 512 and 64M (since 1.4).
2191 # @buf-size: #optional maximum amount of data in flight from source to
2192 # target (since 1.4).
2194 # @on-source-error: #optional the action to take on an error on the source,
2195 # default 'report'. 'stop' and 'enospc' can only be used
2196 # if the block device supports io-status (see BlockInfo).
2198 # @on-target-error: #optional the action to take on an error on the target,
2199 # default 'report' (no limitations, since this applies to
2200 # a different block device than @device).
2202 # Returns: nothing on success
2203 # If @device is not a valid block device, DeviceNotFound
2207 { 'command': 'drive-mirror',
2208 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
2209 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
2210 '*speed': 'int', '*granularity': 'uint32',
2211 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
2212 '*on-target-error': 'BlockdevOnError' } }
2217 # Cancel the current executing migration process.
2219 # Returns: nothing on success
2221 # Notes: This command succeeds even if there is no migration process running.
2225 { 'command': 'migrate_cancel' }
2228 # @migrate_set_downtime
2230 # Set maximum tolerated downtime for migration.
2232 # @value: maximum downtime in seconds
2234 # Returns: nothing on success
2238 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2241 # @migrate_set_speed
2243 # Set maximum speed for migration.
2245 # @value: maximum speed in bytes.
2247 # Returns: nothing on success
2249 # Notes: A value lesser than zero will be automatically round up to zero.
2253 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2256 # @migrate-set-cache-size
2258 # Set XBZRLE cache size
2260 # @value: cache size in bytes
2262 # The size will be rounded down to the nearest power of 2.
2263 # The cache size can be modified before and during ongoing migration
2265 # Returns: nothing on success
2269 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2272 # @query-migrate-cache-size
2274 # query XBZRLE cache size
2276 # Returns: XBZRLE cache size in bytes
2280 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2283 # @ObjectPropertyInfo:
2285 # @name: the name of the property
2287 # @type: the type of the property. This will typically come in one of four
2290 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2291 # These types are mapped to the appropriate JSON type.
2293 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
2294 # legacy qdev typename. These types are always treated as strings.
2296 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
2297 # device type name. Child properties create the composition tree.
2299 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
2300 # device type name. Link properties form the device model graph.
2304 { 'type': 'ObjectPropertyInfo',
2305 'data': { 'name': 'str', 'type': 'str' } }
2310 # This command will list any properties of a object given a path in the object
2313 # @path: the path within the object model. See @qom-get for a description of
2316 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2321 { 'command': 'qom-list',
2322 'data': { 'path': 'str' },
2323 'returns': [ 'ObjectPropertyInfo' ] }
2328 # This command will get a property from a object model path and return the
2331 # @path: The path within the object model. There are two forms of supported
2332 # paths--absolute and partial paths.
2334 # Absolute paths are derived from the root object and can follow child<>
2335 # or link<> properties. Since they can follow link<> properties, they
2336 # can be arbitrarily long. Absolute paths look like absolute filenames
2337 # and are prefixed with a leading slash.
2339 # Partial paths look like relative filenames. They do not begin
2340 # with a prefix. The matching rules for partial paths are subtle but
2341 # designed to make specifying objects easy. At each level of the
2342 # composition tree, the partial path is matched as an absolute path.
2343 # The first match is not returned. At least two matches are searched
2344 # for. A successful result is only returned if only one match is
2345 # found. If more than one match is found, a flag is return to
2346 # indicate that the match was ambiguous.
2348 # @property: The property name to read
2350 # Returns: The property value. The type depends on the property type. legacy<>
2351 # properties are returned as #str. child<> and link<> properties are
2352 # returns as #str pathnames. All integer property types (u8, u16, etc)
2353 # are returned as #int.
2357 { 'command': 'qom-get',
2358 'data': { 'path': 'str', 'property': 'str' },
2359 'returns': 'visitor',
2365 # This command will set a property from a object model path.
2367 # @path: see @qom-get for a description of this parameter
2369 # @property: the property name to set
2371 # @value: a value who's type is appropriate for the property type. See @qom-get
2372 # for a description of type mapping.
2376 { 'command': 'qom-set',
2377 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2383 # Sets the password of a remote display session.
2385 # @protocol: `vnc' to modify the VNC server password
2386 # `spice' to modify the Spice server password
2388 # @password: the new password
2390 # @connected: #optional how to handle existing clients when changing the
2391 # password. If nothing is specified, defaults to `keep'
2392 # `fail' to fail the command if clients are connected
2393 # `disconnect' to disconnect existing clients
2394 # `keep' to maintain existing clients
2396 # Returns: Nothing on success
2397 # If Spice is not enabled, DeviceNotFound
2401 { 'command': 'set_password',
2402 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2407 # Expire the password of a remote display server.
2409 # @protocol: the name of the remote display protocol `vnc' or `spice'
2411 # @time: when to expire the password.
2412 # `now' to expire the password immediately
2413 # `never' to cancel password expiration
2414 # `+INT' where INT is the number of seconds from now (integer)
2415 # `INT' where INT is the absolute time in seconds
2417 # Returns: Nothing on success
2418 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2422 # Notes: Time is relative to the server and currently there is no way to
2423 # coordinate server time with client time. It is not recommended to
2424 # use the absolute time version of the @time parameter unless you're
2425 # sure you are on the same machine as the QEMU instance.
2427 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2432 # Ejects a device from a removable drive.
2434 # @device: The name of the device
2436 # @force: @optional If true, eject regardless of whether the drive is locked.
2437 # If not specified, the default value is false.
2439 # Returns: Nothing on success
2440 # If @device is not a valid block device, DeviceNotFound
2442 # Notes: Ejecting a device will no media results in success
2446 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2449 # @change-vnc-password:
2451 # Change the VNC server password.
2453 # @target: the new password to use with VNC authentication
2457 # Notes: An empty password in this command will set the password to the empty
2458 # string. Existing clients are unaffected by executing this command.
2460 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2465 # This command is multiple commands multiplexed together.
2467 # @device: This is normally the name of a block device but it may also be 'vnc'.
2468 # when it's 'vnc', then sub command depends on @target
2470 # @target: If @device is a block device, then this is the new filename.
2471 # If @device is 'vnc', then if the value 'password' selects the vnc
2472 # change password command. Otherwise, this specifies a new server URI
2473 # address to listen to for VNC connections.
2475 # @arg: If @device is a block device, then this is an optional format to open
2477 # If @device is 'vnc' and @target is 'password', this is the new VNC
2478 # password to set. If this argument is an empty string, then no future
2479 # logins will be allowed.
2481 # Returns: Nothing on success.
2482 # If @device is not a valid block device, DeviceNotFound
2483 # If the new block device is encrypted, DeviceEncrypted. Note that
2484 # if this error is returned, the device has been opened successfully
2485 # and an additional call to @block_passwd is required to set the
2486 # device's password. The behavior of reads and writes to the block
2487 # device between when these calls are executed is undefined.
2489 # Notes: It is strongly recommended that this interface is not used especially
2490 # for changing block devices.
2494 { 'command': 'change',
2495 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2498 # @block_set_io_throttle:
2500 # Change I/O throttle limits for a block drive.
2502 # @device: The name of the device
2504 # @bps: total throughput limit in bytes per second
2506 # @bps_rd: read throughput limit in bytes per second
2508 # @bps_wr: write throughput limit in bytes per second
2510 # @iops: total I/O operations per second
2512 # @ops_rd: read I/O operations per second
2514 # @iops_wr: write I/O operations per second
2516 # @bps_max: #optional total max in bytes (Since 1.7)
2518 # @bps_rd_max: #optional read max in bytes (Since 1.7)
2520 # @bps_wr_max: #optional write max in bytes (Since 1.7)
2522 # @iops_max: #optional total I/O operations max (Since 1.7)
2524 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
2526 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
2528 # @iops_size: #optional an I/O size in bytes (Since 1.7)
2530 # Returns: Nothing on success
2531 # If @device is not a valid block device, DeviceNotFound
2535 { 'command': 'block_set_io_throttle',
2536 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2537 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
2538 '*bps_max': 'int', '*bps_rd_max': 'int',
2539 '*bps_wr_max': 'int', '*iops_max': 'int',
2540 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
2541 '*iops_size': 'int' } }
2546 # Copy data from a backing file into a block device.
2548 # The block streaming operation is performed in the background until the entire
2549 # backing file has been copied. This command returns immediately once streaming
2550 # has started. The status of ongoing block streaming operations can be checked
2551 # with query-block-jobs. The operation can be stopped before it has completed
2552 # using the block-job-cancel command.
2554 # If a base file is specified then sectors are not copied from that base file and
2555 # its backing chain. When streaming completes the image file will have the base
2556 # file as its backing file. This can be used to stream a subset of the backing
2557 # file chain instead of flattening the entire image.
2559 # On successful completion the image file is updated to drop the backing file
2560 # and the BLOCK_JOB_COMPLETED event is emitted.
2562 # @device: the device name
2564 # @base: #optional the common backing file name
2566 # @speed: #optional the maximum speed, in bytes per second
2568 # @on-error: #optional the action to take on an error (default report).
2569 # 'stop' and 'enospc' can only be used if the block device
2570 # supports io-status (see BlockInfo). Since 1.3.
2572 # Returns: Nothing on success
2573 # If @device does not exist, DeviceNotFound
2577 { 'command': 'block-stream',
2578 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2579 '*on-error': 'BlockdevOnError' } }
2582 # @block-job-set-speed:
2584 # Set maximum speed for a background block operation.
2586 # This command can only be issued when there is an active block job.
2588 # Throttling can be disabled by setting the speed to 0.
2590 # @device: the device name
2592 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2595 # Returns: Nothing on success
2596 # If no background operation is active on this device, DeviceNotActive
2600 { 'command': 'block-job-set-speed',
2601 'data': { 'device': 'str', 'speed': 'int' } }
2604 # @block-job-cancel:
2606 # Stop an active background block operation.
2608 # This command returns immediately after marking the active background block
2609 # operation for cancellation. It is an error to call this command if no
2610 # operation is in progress.
2612 # The operation will cancel as soon as possible and then emit the
2613 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2614 # enumerated using query-block-jobs.
2616 # For streaming, the image file retains its backing file unless the streaming
2617 # operation happens to complete just as it is being cancelled. A new streaming
2618 # operation can be started at a later time to finish copying all data from the
2621 # @device: the device name
2623 # @force: #optional whether to allow cancellation of a paused job (default
2624 # false). Since 1.3.
2626 # Returns: Nothing on success
2627 # If no background operation is active on this device, DeviceNotActive
2631 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2636 # Pause an active background block operation.
2638 # This command returns immediately after marking the active background block
2639 # operation for pausing. It is an error to call this command if no
2640 # operation is in progress. Pausing an already paused job has no cumulative
2641 # effect; a single block-job-resume command will resume the job.
2643 # The operation will pause as soon as possible. No event is emitted when
2644 # the operation is actually paused. Cancelling a paused job automatically
2647 # @device: the device name
2649 # Returns: Nothing on success
2650 # If no background operation is active on this device, DeviceNotActive
2654 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2657 # @block-job-resume:
2659 # Resume an active background block operation.
2661 # This command returns immediately after resuming a paused background block
2662 # operation. It is an error to call this command if no operation is in
2663 # progress. Resuming an already running job is not an error.
2665 # This command also clears the error status of the job.
2667 # @device: the device name
2669 # Returns: Nothing on success
2670 # If no background operation is active on this device, DeviceNotActive
2674 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2677 # @block-job-complete:
2679 # Manually trigger completion of an active background block operation. This
2680 # is supported for drive mirroring, where it also switches the device to
2681 # write to the target path only. The ability to complete is signaled with
2682 # a BLOCK_JOB_READY event.
2684 # This command completes an active background block operation synchronously.
2685 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2686 # is not defined. Note that if an I/O error occurs during the processing of
2687 # this command: 1) the command itself will fail; 2) the error will be processed
2688 # according to the rerror/werror arguments that were specified when starting
2691 # A cancelled or paused job cannot be completed.
2693 # @device: the device name
2695 # Returns: Nothing on success
2696 # If no background operation is active on this device, DeviceNotActive
2700 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2705 # This structure describes a search result from @qom-list-types
2707 # @name: the type name found in the search
2711 # Notes: This command is experimental and may change syntax in future releases.
2713 { 'type': 'ObjectTypeInfo',
2714 'data': { 'name': 'str' } }
2719 # This command will return a list of types given search parameters
2721 # @implements: if specified, only return types that implement this type name
2723 # @abstract: if true, include abstract types in the results
2725 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2729 { 'command': 'qom-list-types',
2730 'data': { '*implements': 'str', '*abstract': 'bool' },
2731 'returns': [ 'ObjectTypeInfo' ] }
2734 # @DevicePropertyInfo:
2736 # Information about device properties.
2738 # @name: the name of the property
2739 # @type: the typename of the property
2743 { 'type': 'DevicePropertyInfo',
2744 'data': { 'name': 'str', 'type': 'str' } }
2747 # @device-list-properties:
2749 # List properties associated with a device.
2751 # @typename: the type name of a device
2753 # Returns: a list of DevicePropertyInfo describing a devices properties
2757 { 'command': 'device-list-properties',
2758 'data': { 'typename': 'str'},
2759 'returns': [ 'DevicePropertyInfo' ] }
2764 # Migrates the current running guest to another Virtual Machine.
2766 # @uri: the Uniform Resource Identifier of the destination VM
2768 # @blk: #optional do block migration (full disk copy)
2770 # @inc: #optional incremental disk copy migration
2772 # @detach: this argument exists only for compatibility reasons and
2773 # is ignored by QEMU
2775 # Returns: nothing on success
2779 { 'command': 'migrate',
2780 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2782 # @xen-save-devices-state:
2784 # Save the state of all devices to file. The RAM and the block devices
2785 # of the VM are not saved by this command.
2787 # @filename: the file to save the state of the devices to as binary
2788 # data. See xen-save-devices-state.txt for a description of the binary
2791 # Returns: Nothing on success
2795 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2798 # @xen-set-global-dirty-log
2800 # Enable or disable the global dirty log mode.
2802 # @enable: true to enable, false to disable.
2808 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2813 # Remove a device from a guest
2815 # @id: the name of the device
2817 # Returns: Nothing on success
2818 # If @id is not a valid device, DeviceNotFound
2820 # Notes: When this command completes, the device may not be removed from the
2821 # guest. Hot removal is an operation that requires guest cooperation.
2822 # This command merely requests that the guest begin the hot removal
2823 # process. Completion of the device removal process is signaled with a
2824 # DEVICE_DELETED event. Guest reset will automatically complete removal
2829 { 'command': 'device_del', 'data': {'id': 'str'} }
2832 # @DumpGuestMemoryFormat:
2834 # An enumeration of guest-memory-dump's format.
2838 # @kdump-zlib: kdump-compressed format with zlib-compressed
2840 # @kdump-lzo: kdump-compressed format with lzo-compressed
2842 # @kdump-snappy: kdump-compressed format with snappy-compressed
2846 { 'enum': 'DumpGuestMemoryFormat',
2847 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2850 # @dump-guest-memory
2852 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2853 # very long depending on the amount of guest memory. This command is only
2854 # supported on i386 and x86_64.
2856 # @paging: if true, do paging to get guest's memory mapping. This allows
2857 # using gdb to process the core file.
2859 # IMPORTANT: this option can make QEMU allocate several gigabytes
2860 # of RAM. This can happen for a large guest, or a
2861 # malicious guest pretending to be large.
2863 # Also, paging=true has the following limitations:
2865 # 1. The guest may be in a catastrophic state or can have corrupted
2866 # memory, which cannot be trusted
2867 # 2. The guest can be in real-mode even if paging is enabled. For
2868 # example, the guest uses ACPI to sleep, and ACPI sleep state
2871 # @protocol: the filename or file descriptor of the vmcore. The supported
2874 # 1. file: the protocol starts with "file:", and the following
2875 # string is the file's path.
2876 # 2. fd: the protocol starts with "fd:", and the following string
2879 # @begin: #optional if specified, the starting physical address.
2881 # @length: #optional if specified, the memory size, in bytes. If you don't
2882 # want to dump all guest's memory, please specify the start @begin
2885 # @format: #optional if specified, the format of guest memory dump. But non-elf
2886 # format is conflict with paging and filter, ie. @paging, @begin and
2887 # @length is not allowed to be specified with non-elf @format at the
2888 # same time (since 2.0)
2890 # Returns: nothing on success
2894 { 'command': 'dump-guest-memory',
2895 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2896 '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
2899 # @DumpGuestMemoryCapability:
2901 # A list of the available formats for dump-guest-memory
2905 { 'type': 'DumpGuestMemoryCapability',
2907 'formats': ['DumpGuestMemoryFormat'] } }
2910 # @query-dump-guest-memory-capability:
2912 # Returns the available formats for dump-guest-memory
2914 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2919 { 'command': 'query-dump-guest-memory-capability',
2920 'returns': 'DumpGuestMemoryCapability' }
2925 # Add a network backend.
2927 # @type: the type of network backend. Current valid values are 'user', 'tap',
2928 # 'vde', 'socket', 'dump' and 'bridge'
2930 # @id: the name of the new network backend
2932 # @props: #optional a list of properties to be passed to the backend in
2933 # the format 'name=value', like 'ifname=tap0,script=no'
2935 # Notes: The semantics of @props is not well defined. Future commands will be
2936 # introduced that provide stronger typing for backend creation.
2940 # Returns: Nothing on success
2941 # If @type is not a valid network backend, DeviceNotFound
2943 { 'command': 'netdev_add',
2944 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2950 # Remove a network backend.
2952 # @id: the name of the network backend to remove
2954 # Returns: Nothing on success
2955 # If @id is not a valid network backend, DeviceNotFound
2959 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2964 # Create a QOM object.
2966 # @qom-type: the class name for the object to be created
2968 # @id: the name of the new object
2970 # @props: #optional a dictionary of properties to be passed to the backend
2972 # Returns: Nothing on success
2973 # Error if @qom-type is not a valid class name
2977 { 'command': 'object-add',
2978 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
2984 # Remove a QOM object.
2986 # @id: the name of the QOM object to remove
2988 # Returns: Nothing on success
2989 # Error if @id is not a valid id for a QOM object
2993 { 'command': 'object-del', 'data': {'id': 'str'} }
2996 # @NetdevNoneOptions
2998 # Use it alone to have zero network devices.
3002 { 'type': 'NetdevNoneOptions',
3006 # @NetLegacyNicOptions
3008 # Create a new Network Interface Card.
3010 # @netdev: #optional id of -netdev to connect to
3012 # @macaddr: #optional MAC address
3014 # @model: #optional device model (e1000, rtl8139, virtio etc.)
3016 # @addr: #optional PCI device address
3018 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
3022 { 'type': 'NetLegacyNicOptions',
3028 '*vectors': 'uint32' } }
3033 # A fat type wrapping 'str', to be embedded in lists.
3042 # @NetdevUserOptions
3044 # Use the user mode network stack which requires no administrator privilege to
3047 # @hostname: #optional client hostname reported by the builtin DHCP server
3049 # @restrict: #optional isolate the guest from the host
3051 # @ip: #optional legacy parameter, use net= instead
3053 # @net: #optional IP address and optional netmask
3055 # @host: #optional guest-visible address of the host
3057 # @tftp: #optional root directory of the built-in TFTP server
3059 # @bootfile: #optional BOOTP filename, for use with tftp=
3061 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
3064 # @dns: #optional guest-visible address of the virtual nameserver
3066 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
3069 # @smb: #optional root directory of the built-in SMB server
3071 # @smbserver: #optional IP address of the built-in SMB server
3073 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3076 # @guestfwd: #optional forward guest TCP connections
3080 { 'type': 'NetdevUserOptions',
3083 '*restrict': 'bool',
3089 '*dhcpstart': 'str',
3091 '*dnssearch': ['String'],
3093 '*smbserver': 'str',
3094 '*hostfwd': ['String'],
3095 '*guestfwd': ['String'] } }
3100 # Connect the host TAP network interface name to the VLAN.
3102 # @ifname: #optional interface name
3104 # @fd: #optional file descriptor of an already opened tap
3106 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3109 # @script: #optional script to initialize the interface
3111 # @downscript: #optional script to shut down the interface
3113 # @helper: #optional command to execute to configure bridge
3115 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3117 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3119 # @vhost: #optional enable vhost-net network accelerator
3121 # @vhostfd: #optional file descriptor of an already opened vhost net device
3123 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3126 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3128 # @queues: #optional number of queues to be created for multiqueue capable tap
3132 { 'type': 'NetdevTapOptions',
3138 '*downscript': 'str',
3141 '*vnet_hdr': 'bool',
3145 '*vhostforce': 'bool',
3146 '*queues': 'uint32'} }
3149 # @NetdevSocketOptions
3151 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3152 # socket connection.
3154 # @fd: #optional file descriptor of an already opened socket
3156 # @listen: #optional port number, and optional hostname, to listen on
3158 # @connect: #optional port number, and optional hostname, to connect to
3160 # @mcast: #optional UDP multicast address and port number
3162 # @localaddr: #optional source address and port for multicast and udp packets
3164 # @udp: #optional UDP unicast address and port number
3168 { 'type': 'NetdevSocketOptions',
3174 '*localaddr': 'str',
3180 # Connect the VLAN to a vde switch running on the host.
3182 # @sock: #optional socket path
3184 # @port: #optional port number
3186 # @group: #optional group owner of socket
3188 # @mode: #optional permissions for socket
3192 { 'type': 'NetdevVdeOptions',
3197 '*mode': 'uint16' } }
3200 # @NetdevDumpOptions
3202 # Dump VLAN network traffic to a file.
3204 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3207 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3211 { 'type': 'NetdevDumpOptions',
3217 # @NetdevBridgeOptions
3219 # Connect a host TAP network interface to a host bridge device.
3221 # @br: #optional bridge name
3223 # @helper: #optional command to execute to configure bridge
3227 { 'type': 'NetdevBridgeOptions',
3230 '*helper': 'str' } }
3233 # @NetdevHubPortOptions
3235 # Connect two or more net clients through a software hub.
3237 # @hubid: hub identifier number
3241 { 'type': 'NetdevHubPortOptions',
3243 'hubid': 'int32' } }
3246 # @NetdevNetmapOptions
3248 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3250 # @ifname: Either the name of an existing network interface supported by
3251 # netmap, or the name of a VALE port (created on the fly).
3252 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3253 # YYY are non-negative integers. XXX identifies a switch and
3254 # YYY identifies a port of the switch. VALE ports having the
3255 # same XXX are therefore connected to the same switch.
3257 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3261 { 'type': 'NetdevNetmapOptions',
3264 '*devname': 'str' } }
3269 # A discriminated record of network device traits.
3273 { 'union': 'NetClientOptions',
3275 'none': 'NetdevNoneOptions',
3276 'nic': 'NetLegacyNicOptions',
3277 'user': 'NetdevUserOptions',
3278 'tap': 'NetdevTapOptions',
3279 'socket': 'NetdevSocketOptions',
3280 'vde': 'NetdevVdeOptions',
3281 'dump': 'NetdevDumpOptions',
3282 'bridge': 'NetdevBridgeOptions',
3283 'hubport': 'NetdevHubPortOptions',
3284 'netmap': 'NetdevNetmapOptions' } }
3289 # Captures the configuration of a network device; legacy.
3291 # @vlan: #optional vlan number
3293 # @id: #optional identifier for monitor commands
3295 # @name: #optional identifier for monitor commands, ignored if @id is present
3297 # @opts: device type specific properties (legacy)
3301 { 'type': 'NetLegacy',
3306 'opts': 'NetClientOptions' } }
3311 # Captures the configuration of a network device.
3313 # @id: identifier for monitor commands.
3315 # @opts: device type specific properties
3322 'opts': 'NetClientOptions' } }
3325 # @InetSocketAddress
3327 # Captures a socket address or address range in the Internet namespace.
3329 # @host: host part of the address
3331 # @port: port part of the address, or lowest port if @to is present
3333 # @to: highest port to try
3335 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3338 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3343 { 'type': 'InetSocketAddress',
3352 # @UnixSocketAddress
3354 # Captures a socket address in the local ("Unix socket") namespace.
3356 # @path: filesystem path to use
3360 { 'type': 'UnixSocketAddress',
3367 # Captures the address of a socket, which could also be a named file descriptor
3371 { 'union': 'SocketAddress',
3373 'inet': 'InetSocketAddress',
3374 'unix': 'UnixSocketAddress',
3380 # Receive a file descriptor via SCM rights and assign it a name
3382 # @fdname: file descriptor name
3384 # Returns: Nothing on success
3388 # Notes: If @fdname already exists, the file descriptor assigned to
3389 # it will be closed and replaced by the received file
3391 # The 'closefd' command can be used to explicitly close the
3392 # file descriptor when it is no longer needed.
3394 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3399 # Close a file descriptor previously passed via SCM rights
3401 # @fdname: file descriptor name
3403 # Returns: Nothing on success
3407 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3412 # Information describing a machine.
3414 # @name: the name of the machine
3416 # @alias: #optional an alias for the machine name
3418 # @default: #optional whether the machine is default
3420 # @cpu-max: maximum number of CPUs supported by the machine type
3425 { 'type': 'MachineInfo',
3426 'data': { 'name': 'str', '*alias': 'str',
3427 '*is-default': 'bool', 'cpu-max': 'int' } }
3432 # Return a list of supported machines
3434 # Returns: a list of MachineInfo
3438 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3441 # @CpuDefinitionInfo:
3443 # Virtual CPU definition.
3445 # @name: the name of the CPU definition
3449 { 'type': 'CpuDefinitionInfo',
3450 'data': { 'name': 'str' } }
3453 # @query-cpu-definitions:
3455 # Return a list of supported virtual CPU definitions
3457 # Returns: a list of CpuDefInfo
3461 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3465 # Information about a file descriptor that was added to an fd set.
3467 # @fdset-id: The ID of the fd set that @fd was added to.
3469 # @fd: The file descriptor that was received via SCM rights and
3470 # added to the fd set.
3474 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3479 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3481 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3483 # @opaque: #optional A free-form string that can be used to describe the fd.
3485 # Returns: @AddfdInfo on success
3486 # If file descriptor was not received, FdNotSupplied
3487 # If @fdset-id is a negative value, InvalidParameterValue
3489 # Notes: The list of fd sets is shared by all monitor connections.
3491 # If @fdset-id is not specified, a new fd set will be created.
3495 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3496 'returns': 'AddfdInfo' }
3501 # Remove a file descriptor from an fd set.
3503 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3505 # @fd: #optional The file descriptor that is to be removed.
3507 # Returns: Nothing on success
3508 # If @fdset-id or @fd is not found, FdNotFound
3512 # Notes: The list of fd sets is shared by all monitor connections.
3514 # If @fd is not specified, all file descriptors in @fdset-id
3517 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3522 # Information about a file descriptor that belongs to an fd set.
3524 # @fd: The file descriptor value.
3526 # @opaque: #optional A free-form string that can be used to describe the fd.
3530 { 'type': 'FdsetFdInfo',
3531 'data': {'fd': 'int', '*opaque': 'str'} }
3536 # Information about an fd set.
3538 # @fdset-id: The ID of the fd set.
3540 # @fds: A list of file descriptors that belong to this fd set.
3544 { 'type': 'FdsetInfo',
3545 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3550 # Return information describing all fd sets.
3552 # Returns: A list of @FdsetInfo
3556 # Note: The list of fd sets is shared by all monitor connections.
3559 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3564 # Information describing the QEMU target.
3566 # @arch: the target architecture (eg "x86_64", "i386", etc)
3570 { 'type': 'TargetInfo',
3571 'data': { 'arch': 'str' } }
3576 # Return information about the target for this QEMU
3578 # Returns: TargetInfo
3582 { 'command': 'query-target', 'returns': 'TargetInfo' }
3587 # An enumeration of key name.
3589 # This is used by the send-key command.
3593 # 'unmapped' and 'pause' since 2.0
3595 { 'enum': 'QKeyCode',
3596 'data': [ 'unmapped',
3597 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3598 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3599 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3600 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3601 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3602 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3603 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3604 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3605 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3606 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3607 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3608 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3609 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3610 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3611 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
3616 # Represents a keyboard key.
3620 { 'union': 'KeyValue',
3623 'qcode': 'QKeyCode' } }
3628 # Send keys to guest.
3630 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3631 # simultaneously sent to the guest. A @KeyValue.number value is sent
3632 # directly to the guest, while @KeyValue.qcode must be a valid
3635 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3638 # Returns: Nothing on success
3639 # If key is unknown or redundant, InvalidParameter
3644 { 'command': 'send-key',
3645 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3650 # Write a PPM of the VGA screen to a file.
3652 # @filename: the path of a new PPM file to store the image
3654 # Returns: Nothing on success
3658 { 'command': 'screendump', 'data': {'filename': 'str'} }
3661 # @nbd-server-start:
3663 # Start an NBD server listening on the given host and port. Block
3664 # devices can then be exported using @nbd-server-add. The NBD
3665 # server will present them as named exports; for example, another
3666 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3668 # @addr: Address on which to listen.
3670 # Returns: error if the server is already running.
3674 { 'command': 'nbd-server-start',
3675 'data': { 'addr': 'SocketAddress' } }
3680 # Export a device to QEMU's embedded NBD server.
3682 # @device: Block device to be exported
3684 # @writable: Whether clients should be able to write to the device via the
3685 # NBD connection (default false). #optional
3687 # Returns: error if the device is already marked for export.
3691 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3696 # Stop QEMU's embedded NBD server, and unregister all devices previously
3697 # added via @nbd-server-add.
3701 { 'command': 'nbd-server-stop' }
3706 # Configuration info for file chardevs.
3708 # @in: #optional The name of the input file
3709 # @out: The name of the output file
3713 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3719 # Configuration info for device and pipe chardevs.
3721 # @device: The name of the special file for the device,
3722 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3723 # @type: What kind of device this is.
3727 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3732 # Configuration info for (stream) socket chardevs.
3734 # @addr: socket address to listen on (server=true)
3735 # or connect to (server=false)
3736 # @server: #optional create server socket (default: true)
3737 # @wait: #optional wait for incoming connection on server
3738 # sockets (default: false).
3739 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3740 # @telnet: #optional enable telnet protocol on server
3741 # sockets (default: false)
3745 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3748 '*nodelay' : 'bool',
3749 '*telnet' : 'bool' } }
3754 # Configuration info for datagram socket chardevs.
3756 # @remote: remote address
3757 # @local: #optional local address
3761 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3762 '*local' : 'SocketAddress' } }
3767 # Configuration info for mux chardevs.
3769 # @chardev: name of the base chardev.
3773 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3778 # Configuration info for stdio chardevs.
3780 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3781 # be delivered to qemu. Default: true in -nographic mode,
3786 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3789 # @ChardevSpiceChannel:
3791 # Configuration info for spice vm channel chardevs.
3793 # @type: kind of channel (for example vdagent).
3797 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3800 # @ChardevSpicePort:
3802 # Configuration info for spice port chardevs.
3804 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3808 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3813 # Configuration info for virtual console chardevs.
3815 # @width: console width, in pixels
3816 # @height: console height, in pixels
3817 # @cols: console width, in chars
3818 # @rows: console height, in chars
3822 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3830 # Configuration info for ring buffer chardevs.
3832 # @size: #optional ring buffer size, must be power of two, default is 65536
3836 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3841 # Configuration info for the new chardev backend.
3845 { 'type': 'ChardevDummy', 'data': { } }
3847 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3848 'serial' : 'ChardevHostdev',
3849 'parallel': 'ChardevHostdev',
3850 'pipe' : 'ChardevHostdev',
3851 'socket' : 'ChardevSocket',
3852 'udp' : 'ChardevUdp',
3853 'pty' : 'ChardevDummy',
3854 'null' : 'ChardevDummy',
3855 'mux' : 'ChardevMux',
3856 'msmouse': 'ChardevDummy',
3857 'braille': 'ChardevDummy',
3858 'stdio' : 'ChardevStdio',
3859 'console': 'ChardevDummy',
3860 'spicevmc' : 'ChardevSpiceChannel',
3861 'spiceport' : 'ChardevSpicePort',
3863 'ringbuf': 'ChardevRingbuf',
3864 # next one is just for compatibility
3865 'memory' : 'ChardevRingbuf' } }
3870 # Return info about the chardev backend just created.
3872 # @pty: #optional name of the slave pseudoterminal device, present if
3873 # and only if a chardev of type 'pty' was created
3877 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3882 # Add a character device backend
3884 # @id: the chardev's ID, must be unique
3885 # @backend: backend type and parameters
3887 # Returns: ChardevReturn.
3891 { 'command': 'chardev-add', 'data': {'id' : 'str',
3892 'backend' : 'ChardevBackend' },
3893 'returns': 'ChardevReturn' }
3898 # Remove a character device backend
3900 # @id: the chardev's ID, must exist and not be in use
3902 # Returns: Nothing on success
3906 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3911 # An enumeration of TPM models
3913 # @tpm-tis: TPM TIS model
3917 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3920 # @query-tpm-models:
3922 # Return a list of supported TPM models
3924 # Returns: a list of TpmModel
3928 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3933 # An enumeration of TPM types
3935 # @passthrough: TPM passthrough type
3939 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3944 # Return a list of supported TPM types
3946 # Returns: a list of TpmType
3950 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3953 # @TPMPassthroughOptions:
3955 # Information about the TPM passthrough type
3957 # @path: #optional string describing the path used for accessing the TPM device
3959 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3960 # for cancellation of TPM commands while they are executing
3964 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3965 '*cancel-path' : 'str'} }
3970 # A union referencing different TPM backend types' configuration options
3972 # @passthrough: The configuration options for the TPM passthrough type
3976 { 'union': 'TpmTypeOptions',
3977 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3982 # Information about the TPM
3984 # @id: The Id of the TPM
3986 # @model: The TPM frontend model
3988 # @options: The TPM (backend) type configuration options
3992 { 'type': 'TPMInfo',
3993 'data': {'id': 'str',
3994 'model': 'TpmModel',
3995 'options': 'TpmTypeOptions' } }
4000 # Return information about the TPM device
4002 # Returns: @TPMInfo on success
4006 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
4011 # Specify an ACPI table on the command line to load.
4013 # At most one of @file and @data can be specified. The list of files specified
4014 # by any one of them is loaded and concatenated in order. If both are omitted,
4017 # Other fields / optargs can be used to override fields of the generic ACPI
4018 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
4019 # Description Table Header. If a header field is not overridden, then the
4020 # corresponding value from the concatenated blob is used (in case of @file), or
4021 # it is filled in with a hard-coded value (in case of @data).
4023 # String fields are copied into the matching ACPI member from lowest address
4024 # upwards, and silently truncated / NUL-padded to length.
4026 # @sig: #optional table signature / identifier (4 bytes)
4028 # @rev: #optional table revision number (dependent on signature, 1 byte)
4030 # @oem_id: #optional OEM identifier (6 bytes)
4032 # @oem_table_id: #optional OEM table identifier (8 bytes)
4034 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4036 # @asl_compiler_id: #optional identifier of the utility that created the table
4039 # @asl_compiler_rev: #optional revision number of the utility that created the
4042 # @file: #optional colon (:) separated list of pathnames to load and
4043 # concatenate as table data. The resultant binary blob is expected to
4044 # have an ACPI table header. At least one file is required. This field
4047 # @data: #optional colon (:) separated list of pathnames to load and
4048 # concatenate as table data. The resultant binary blob must not have an
4049 # ACPI table header. At least one file is required. This field excludes
4054 { 'type': 'AcpiTableOptions',
4059 '*oem_table_id': 'str',
4060 '*oem_rev': 'uint32',
4061 '*asl_compiler_id': 'str',
4062 '*asl_compiler_rev': 'uint32',
4067 # @CommandLineParameterType:
4069 # Possible types for an option parameter.
4071 # @string: accepts a character string
4073 # @boolean: accepts "on" or "off"
4075 # @number: accepts a number
4077 # @size: accepts a number followed by an optional suffix (K)ilo,
4078 # (M)ega, (G)iga, (T)era
4082 { 'enum': 'CommandLineParameterType',
4083 'data': ['string', 'boolean', 'number', 'size'] }
4086 # @CommandLineParameterInfo:
4088 # Details about a single parameter of a command line option.
4090 # @name: parameter name
4092 # @type: parameter @CommandLineParameterType
4094 # @help: #optional human readable text string, not suitable for parsing.
4098 { 'type': 'CommandLineParameterInfo',
4099 'data': { 'name': 'str',
4100 'type': 'CommandLineParameterType',
4104 # @CommandLineOptionInfo:
4106 # Details about a command line option, including its list of parameter details
4108 # @option: option name
4110 # @parameters: an array of @CommandLineParameterInfo
4114 { 'type': 'CommandLineOptionInfo',
4115 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4118 # @query-command-line-options:
4120 # Query command line option schema.
4122 # @option: #optional option name
4124 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4125 # @option). Returns an error if the given @option doesn't exist.
4129 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4130 'returns': ['CommandLineOptionInfo'] }
4135 # A X86 32-bit register
4139 { 'enum': 'X86CPURegister32',
4140 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4143 # @X86CPUFeatureWordInfo
4145 # Information about a X86 CPU feature word
4147 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4149 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4152 # @cpuid-register: Output register containing the feature bits
4154 # @features: value of output register, containing the feature bits
4158 { 'type': 'X86CPUFeatureWordInfo',
4159 'data': { 'cpuid-input-eax': 'int',
4160 '*cpuid-input-ecx': 'int',
4161 'cpuid-register': 'X86CPURegister32',
4162 'features': 'int' } }
4167 # Packets receiving state
4169 # @normal: filter assigned packets according to the mac-table
4171 # @none: don't receive any assigned packet
4173 # @all: receive all assigned packets
4177 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4182 # Rx-filter information for a NIC.
4184 # @name: net client name
4186 # @promiscuous: whether promiscuous mode is enabled
4188 # @multicast: multicast receive state
4190 # @unicast: unicast receive state
4192 # @vlan: vlan receive state (Since 2.0)
4194 # @broadcast-allowed: whether to receive broadcast
4196 # @multicast-overflow: multicast table is overflowed or not
4198 # @unicast-overflow: unicast table is overflowed or not
4200 # @main-mac: the main macaddr string
4202 # @vlan-table: a list of active vlan id
4204 # @unicast-table: a list of unicast macaddr string
4206 # @multicast-table: a list of multicast macaddr string
4211 { 'type': 'RxFilterInfo',
4214 'promiscuous': 'bool',
4215 'multicast': 'RxState',
4216 'unicast': 'RxState',
4218 'broadcast-allowed': 'bool',
4219 'multicast-overflow': 'bool',
4220 'unicast-overflow': 'bool',
4222 'vlan-table': ['int'],
4223 'unicast-table': ['str'],
4224 'multicast-table': ['str'] }}
4229 # Return rx-filter information for all NICs (or for the given NIC).
4231 # @name: #optional net client name
4233 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4234 # Returns an error if the given @name doesn't exist, or given
4235 # NIC doesn't support rx-filter querying, or given net client
4240 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4241 'returns': ['RxFilterInfo'] }
4245 # @BlockdevDiscardOptions
4247 # Determines how to handle discard requests.
4249 # @ignore: Ignore the request
4250 # @unmap: Forward as an unmap request
4254 { 'enum': 'BlockdevDiscardOptions',
4255 'data': [ 'ignore', 'unmap' ] }
4258 # @BlockdevAioOptions
4260 # Selects the AIO backend to handle I/O requests
4262 # @threads: Use qemu's thread pool
4263 # @native: Use native AIO backend (only Linux and Windows)
4267 { 'enum': 'BlockdevAioOptions',
4268 'data': [ 'threads', 'native' ] }
4271 # @BlockdevCacheOptions
4273 # Includes cache-related options for block devices
4275 # @writeback: #optional enables writeback mode for any caches (default: true)
4276 # @direct: #optional enables use of O_DIRECT (bypass the host page cache;
4278 # @no-flush: #optional ignore any flush requests for the device (default:
4283 { 'type': 'BlockdevCacheOptions',
4284 'data': { '*writeback': 'bool',
4286 '*no-flush': 'bool' } }
4291 # Drivers that are supported in block device operations.
4293 # @host_device, @host_cdrom, @host_floppy: Since 2.1
4297 { 'enum': 'BlockdevDriver',
4298 'data': [ 'file', 'host_device', 'host_cdrom', 'host_floppy',
4299 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
4300 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
4301 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
4304 # @BlockdevOptionsBase
4306 # Options that are available for all block devices, independent of the block
4309 # @driver: block driver name
4310 # @id: #optional id by which the new block device can be referred to.
4311 # This is a required option on the top level of blockdev-add, and
4312 # currently not allowed on any other level.
4313 # @node-name: #optional the name of a block driver state node (Since 2.0)
4314 # @discard: #optional discard-related options (default: ignore)
4315 # @cache: #optional cache-related options
4316 # @aio: #optional AIO backend (default: threads)
4317 # @rerror: #optional how to handle read errors on the device
4319 # @werror: #optional how to handle write errors on the device
4321 # @read-only: #optional whether the block device should be read-only
4326 { 'type': 'BlockdevOptionsBase',
4327 'data': { 'driver': 'BlockdevDriver',
4329 '*node-name': 'str',
4330 '*discard': 'BlockdevDiscardOptions',
4331 '*cache': 'BlockdevCacheOptions',
4332 '*aio': 'BlockdevAioOptions',
4333 '*rerror': 'BlockdevOnError',
4334 '*werror': 'BlockdevOnError',
4335 '*read-only': 'bool' } }
4338 # @BlockdevOptionsFile
4340 # Driver specific block device options for the file backend and similar
4343 # @filename: path to the image file
4347 { 'type': 'BlockdevOptionsFile',
4348 'data': { 'filename': 'str' } }
4351 # @BlockdevOptionsVVFAT
4353 # Driver specific block device options for the vvfat protocol.
4355 # @dir: directory to be exported as FAT image
4356 # @fat-type: #optional FAT type: 12, 16 or 32
4357 # @floppy: #optional whether to export a floppy image (true) or
4358 # partitioned hard disk (false; default)
4359 # @rw: #optional whether to allow write operations (default: false)
4363 { 'type': 'BlockdevOptionsVVFAT',
4364 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
4368 # @BlockdevOptionsGenericFormat
4370 # Driver specific block device options for image format that have no option
4371 # besides their data source.
4373 # @file: reference to or definition of the data source block device
4377 { 'type': 'BlockdevOptionsGenericFormat',
4378 'data': { 'file': 'BlockdevRef' } }
4381 # @BlockdevOptionsGenericCOWFormat
4383 # Driver specific block device options for image format that have no option
4384 # besides their data source and an optional backing file.
4386 # @backing: #optional reference to or definition of the backing file block
4387 # device (if missing, taken from the image file content). It is
4388 # allowed to pass an empty string here in order to disable the
4389 # default backing file.
4393 { 'type': 'BlockdevOptionsGenericCOWFormat',
4394 'base': 'BlockdevOptionsGenericFormat',
4395 'data': { '*backing': 'BlockdevRef' } }
4398 # @BlockdevOptionsQcow2
4400 # Driver specific block device options for qcow2.
4402 # @lazy-refcounts: #optional whether to enable the lazy refcounts
4403 # feature (default is taken from the image file)
4405 # @pass-discard-request: #optional whether discard requests to the qcow2
4406 # device should be forwarded to the data source
4408 # @pass-discard-snapshot: #optional whether discard requests for the data source
4409 # should be issued when a snapshot operation (e.g.
4410 # deleting a snapshot) frees clusters in the qcow2 file
4412 # @pass-discard-other: #optional whether discard requests for the data source
4413 # should be issued on other occasions where a cluster
4418 { 'type': 'BlockdevOptionsQcow2',
4419 'base': 'BlockdevOptionsGenericCOWFormat',
4420 'data': { '*lazy-refcounts': 'bool',
4421 '*pass-discard-request': 'bool',
4422 '*pass-discard-snapshot': 'bool',
4423 '*pass-discard-other': 'bool' } }
4428 # Trigger events supported by blkdebug.
4430 { 'enum': 'BlkdebugEvent',
4431 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
4432 'l1_grow.activate_table', 'l2_load', 'l2_update',
4433 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
4434 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
4435 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
4436 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
4437 'refblock_load', 'refblock_update', 'refblock_update_part',
4438 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
4439 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
4440 'refblock_alloc.switch_table', 'cluster_alloc',
4441 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
4445 # @BlkdebugInjectErrorOptions
4447 # Describes a single error injection for blkdebug.
4449 # @event: trigger event
4451 # @state: #optional the state identifier blkdebug needs to be in to
4452 # actually trigger the event; defaults to "any"
4454 # @errno: #optional error identifier (errno) to be returned; defaults to
4457 # @sector: #optional specifies the sector index which has to be affected
4458 # in order to actually trigger the event; defaults to "any
4461 # @once: #optional disables further events after this one has been
4462 # triggered; defaults to false
4464 # @immediately: #optional fail immediately; defaults to false
4468 { 'type': 'BlkdebugInjectErrorOptions',
4469 'data': { 'event': 'BlkdebugEvent',
4474 '*immediately': 'bool' } }
4477 # @BlkdebugSetStateOptions
4479 # Describes a single state-change event for blkdebug.
4481 # @event: trigger event
4483 # @state: #optional the current state identifier blkdebug needs to be in;
4486 # @new_state: the state identifier blkdebug is supposed to assume if
4487 # this event is triggered
4491 { 'type': 'BlkdebugSetStateOptions',
4492 'data': { 'event': 'BlkdebugEvent',
4494 'new_state': 'int' } }
4497 # @BlockdevOptionsBlkdebug
4499 # Driver specific block device options for blkdebug.
4501 # @image: underlying raw block device (or image file)
4503 # @config: #optional filename of the configuration file
4505 # @align: #optional required alignment for requests in bytes
4507 # @inject-error: #optional array of error injection descriptions
4509 # @set-state: #optional array of state-change descriptions
4513 { 'type': 'BlockdevOptionsBlkdebug',
4514 'data': { 'image': 'BlockdevRef',
4517 '*inject-error': ['BlkdebugInjectErrorOptions'],
4518 '*set-state': ['BlkdebugSetStateOptions'] } }
4521 # @BlockdevOptionsBlkverify
4523 # Driver specific block device options for blkverify.
4525 # @test: block device to be tested
4527 # @raw: raw image used for verification
4531 { 'type': 'BlockdevOptionsBlkverify',
4532 'data': { 'test': 'BlockdevRef',
4533 'raw': 'BlockdevRef' } }
4536 # @BlockdevOptionsQuorum
4538 # Driver specific block device options for Quorum
4540 # @blkverify: #optional true if the driver must print content mismatch
4541 # set to false by default
4543 # @children: the children block devices to use
4545 # @vote-threshold: the vote limit under which a read will fail
4549 { 'type': 'BlockdevOptionsQuorum',
4550 'data': { '*blkverify': 'bool',
4551 'children': [ 'BlockdevRef' ],
4552 'vote-threshold': 'int' } }
4557 # Options for creating a block device.
4561 { 'union': 'BlockdevOptions',
4562 'base': 'BlockdevOptionsBase',
4563 'discriminator': 'driver',
4565 'file': 'BlockdevOptionsFile',
4566 'host_device':'BlockdevOptionsFile',
4567 'host_cdrom': 'BlockdevOptionsFile',
4568 'host_floppy':'BlockdevOptionsFile',
4569 'http': 'BlockdevOptionsFile',
4570 'https': 'BlockdevOptionsFile',
4571 'ftp': 'BlockdevOptionsFile',
4572 'ftps': 'BlockdevOptionsFile',
4573 'tftp': 'BlockdevOptionsFile',
4574 # TODO gluster: Wait for structured options
4575 # TODO iscsi: Wait for structured options
4576 # TODO nbd: Should take InetSocketAddress for 'host'?
4577 # TODO nfs: Wait for structured options
4578 # TODO rbd: Wait for structured options
4579 # TODO sheepdog: Wait for structured options
4580 # TODO ssh: Should take InetSocketAddress for 'host'?
4581 'vvfat': 'BlockdevOptionsVVFAT',
4582 'blkdebug': 'BlockdevOptionsBlkdebug',
4583 'blkverify': 'BlockdevOptionsBlkverify',
4584 'bochs': 'BlockdevOptionsGenericFormat',
4585 'cloop': 'BlockdevOptionsGenericFormat',
4586 'cow': 'BlockdevOptionsGenericCOWFormat',
4587 'dmg': 'BlockdevOptionsGenericFormat',
4588 'parallels': 'BlockdevOptionsGenericFormat',
4589 'qcow': 'BlockdevOptionsGenericCOWFormat',
4590 'qcow2': 'BlockdevOptionsQcow2',
4591 'qed': 'BlockdevOptionsGenericCOWFormat',
4592 'raw': 'BlockdevOptionsGenericFormat',
4593 'vdi': 'BlockdevOptionsGenericFormat',
4594 'vhdx': 'BlockdevOptionsGenericFormat',
4595 'vmdk': 'BlockdevOptionsGenericCOWFormat',
4596 'vpc': 'BlockdevOptionsGenericFormat',
4597 'quorum': 'BlockdevOptionsQuorum'
4603 # Reference to a block device.
4605 # @definition: defines a new block device inline
4606 # @reference: references the ID of an existing block device. An
4607 # empty string means that no block device should be
4612 { 'union': 'BlockdevRef',
4613 'discriminator': {},
4614 'data': { 'definition': 'BlockdevOptions',
4615 'reference': 'str' } }
4620 # Creates a new block device.
4622 # @options: block device options for the new device
4626 { 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }
4631 # Button of a pointer input device (mouse, tablet).
4635 { 'enum' : 'InputButton',
4636 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
4641 # Position axis of a pointer input device (mouse, tablet).
4645 { 'enum' : 'InputAxis',
4646 'data' : [ 'X', 'Y' ] }
4651 # Keyboard input event.
4653 # @key: Which key this event is for.
4654 # @down: True for key-down and false for key-up events.
4658 { 'type' : 'InputKeyEvent',
4659 'data' : { 'key' : 'KeyValue',
4665 # Pointer button input event.
4667 # @button: Which button this event is for.
4668 # @down: True for key-down and false for key-up events.
4672 { 'type' : 'InputBtnEvent',
4673 'data' : { 'button' : 'InputButton',
4679 # Pointer motion input event.
4681 # @axis: Which axis is referenced by @value.
4682 # @value: Pointer position. For absolute coordinates the
4683 # valid range is 0 -> 0x7ffff
4687 { 'type' : 'InputMoveEvent',
4688 'data' : { 'axis' : 'InputAxis',
4694 # Input event union.
4698 { 'union' : 'InputEvent',
4699 'data' : { 'key' : 'InputKeyEvent',
4700 'btn' : 'InputBtnEvent',
4701 'rel' : 'InputMoveEvent',
4702 'abs' : 'InputMoveEvent' } }