8 # Guest name information.
10 # @name: #optional The name of the guest
14 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
19 # Return the name information of a guest.
21 # Returns: @NameInfo of the guest
25 { 'command': 'query-name', 'returns': 'NameInfo' }
30 # A description of QEMU's version.
32 # @qemu.major: The major version of QEMU
34 # @qemu.minor: The minor version of QEMU
36 # @qemu.micro: The micro version of QEMU. By current convention, a micro
37 # version of 50 signifies a development branch. A micro version
38 # greater than or equal to 90 signifies a release candidate for
39 # the next minor version. A micro version of less than 50
40 # signifies a stable release.
42 # @package: QEMU will always set this field to an empty string. Downstream
43 # versions of QEMU should set this to a non-empty string. The
44 # exact format depends on the downstream however it highly
45 # recommended that a unique name is used.
49 { 'type': 'VersionInfo',
50 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
56 # Returns the current version of QEMU.
58 # Returns: A @VersionInfo object describing the current version of QEMU.
62 { 'command': 'query-version', 'returns': 'VersionInfo' }
67 # Information about support for KVM acceleration
69 # @enabled: true if KVM acceleration is active
71 # @present: true if KVM acceleration is built into this executable
75 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
80 # Returns information about KVM acceleration
86 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
91 # An enumation of VM run states.
93 # @debug: QEMU is running on a debugger
95 # @inmigrate: guest is paused waiting for an incoming migration
97 # @internal-error: An internal error that prevents further guest execution
100 # @io-error: the last IOP has failed and the device is configured to pause
103 # @paused: guest has been paused via the 'stop' command
105 # @postmigrate: guest is paused following a successful 'migrate'
107 # @prelaunch: QEMU was started with -S and guest has not started
109 # @finish-migrate: guest is paused to finish the migration process
111 # @restore-vm: guest is paused to restore VM state
113 # @running: guest is actively running
115 # @save-vm: guest is paused to save the VM state
117 # @shutdown: guest is shut down (and -no-shutdown is in use)
119 # @watchdog: the watchdog action is configured to pause and has been triggered
121 { 'enum': 'RunState',
122 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
123 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
124 'running', 'save-vm', 'shutdown', 'watchdog' ] }
129 # Information about VCPU run state
131 # @running: true if all VCPUs are runnable, false if not runnable
133 # @singlestep: true if VCPUs are in single-step mode
135 # @status: the virtual machine @RunState
139 # Notes: @singlestep is enabled through the GDB stub
141 { 'type': 'StatusInfo',
142 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
147 # Query the run status of all VCPUs
149 # Returns: @StatusInfo reflecting all VCPUs
153 { 'command': 'query-status', 'returns': 'StatusInfo' }
158 # Guest UUID information.
160 # @UUID: the UUID of the guest
164 # Notes: If no UUID was specified for the guest, a null UUID is returned.
166 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
171 # Query the guest UUID information.
173 # Returns: The @UuidInfo for the guest
177 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
182 # Information about a character device.
184 # @label: the label of the character device
186 # @filename: the filename of the character device
188 # Notes: @filename is encoded using the QEMU command line character device
189 # encoding. See the QEMU man page for details.
193 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
198 # Returns information about current character devices.
200 # Returns: a list of @ChardevInfo
204 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
209 # Information about a QMP command
211 # @name: The command name
215 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
220 # Return a list of supported QMP commands by this server
222 # Returns: A list of @CommandInfo for all supported commands
226 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
231 # Detailed migration status.
233 # @transferred: amount of bytes already transferred to the target VM
235 # @remaining: amount of bytes remaining to be transferred to the target VM
237 # @total: total amount of bytes involved in the migration process
241 { 'type': 'MigrationStats',
242 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' } }
247 # Information about current migration process.
249 # @status: #optional string describing the current migration status.
250 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
251 # 'cancelled'. If this field is not returned, no migration process
254 # @ram: #optional @MigrationStats containing detailed migration status,
255 # only returned if status is 'active'
257 # @disk: #optional @MigrationStats containing detailed disk migration
258 # status, only returned if status is 'active' and it is a block
263 { 'type': 'MigrationInfo',
264 'data': {'*status': 'str', '*ram': 'MigrationStats',
265 '*disk': 'MigrationStats'} }
270 # Returns information about current migration process.
272 # Returns: @MigrationInfo
276 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
281 # Information about a mouse device.
283 # @name: the name of the mouse device
285 # @index: the index of the mouse device
287 # @current: true if this device is currently receiving mouse events
289 # @absolute: true if this device supports absolute coordinates as input
293 { 'type': 'MouseInfo',
294 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
295 'absolute': 'bool'} }
300 # Returns information about each active mouse device
302 # Returns: a list of @MouseInfo for each device
306 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
311 # Information about a virtual CPU
313 # @CPU: the index of the virtual CPU
315 # @current: this only exists for backwards compatible and should be ignored
317 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
318 # to a processor specific low power mode.
320 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
322 # If the target is Sparc, this is the PC component of the
323 # instruction pointer.
325 # @nip: #optional If the target is PPC, the instruction pointer
327 # @npc: #optional If the target is Sparc, the NPC component of the instruction
330 # @PC: #optional If the target is MIPS, the instruction pointer
332 # @thread_id: ID of the underlying host thread
336 # Notes: @halted is a transient state that changes frequently. By the time the
337 # data is sent to the client, the guest may no longer be halted.
340 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
341 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
346 # Returns a list of information about each virtual CPU.
348 # Returns: a list of @CpuInfo for each virtual CPU
352 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
357 # Information about the backing device for a block device.
359 # @file: the filename of the backing device
361 # @ro: true if the backing device was open read-only
363 # @drv: the name of the block format used to open the backing device. As of
364 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
365 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
366 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
367 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
369 # @backing_file: #optional the name of the backing file (for copy-on-write)
371 # @encrypted: true if the backing device is encrypted
375 # Notes: This interface is only found in @BlockInfo.
377 { 'type': 'BlockDeviceInfo',
378 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
379 '*backing_file': 'str', 'encrypted': 'bool' } }
382 # @BlockDeviceIoStatus:
384 # An enumeration of block device I/O status.
386 # @ok: The last I/O operation has succeeded
388 # @failed: The last I/O operation has failed
390 # @nospace: The last I/O operation has failed due to a no-space condition
394 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
399 # Block device information. This structure describes a virtual device and
400 # the backing device associated with it.
402 # @device: The device name associated with the virtual device.
404 # @type: This field is returned only for compatibility reasons, it should
405 # not be used (always returns 'unknown')
407 # @removable: True if the device supports removable media.
409 # @locked: True if the guest has locked this device from having its media
412 # @tray_open: #optional True if the device has a tray and it is open
413 # (only present if removable is true)
415 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
416 # supports it and the VM is configured to stop on errors
418 # @inserted: #optional @BlockDeviceInfo describing the device if media is
423 { 'type': 'BlockInfo',
424 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
425 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
426 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
431 # Get a list of BlockInfo for all virtual block devices.
433 # Returns: a list of @BlockInfo describing each virtual block device
437 { 'command': 'query-block', 'returns': ['BlockInfo'] }
442 # Statistics of a virtual block device or a block backing device.
444 # @rd_bytes: The number of bytes read by the device.
446 # @wr_bytes: The number of bytes written by the device.
448 # @rd_operations: The number of read operations performed by the device.
450 # @wr_operations: The number of write operations performed by the device.
452 # @flush_operations: The number of cache flush operations performed by the
453 # device (since 0.15.0)
455 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
458 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
460 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
462 # @wr_highest_offset: The offset after the greatest byte written to the
463 # device. The intended use of this information is for
464 # growable sparse files (like qcow2) that are used on top
465 # of a physical device.
469 { 'type': 'BlockDeviceStats',
470 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
471 'wr_operations': 'int', 'flush_operations': 'int',
472 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
473 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
478 # Statistics of a virtual block device or a block backing device.
480 # @device: #optional If the stats are for a virtual block device, the name
481 # corresponding to the virtual block device.
483 # @stats: A @BlockDeviceStats for the device.
485 # @parent: #optional This may point to the backing block device if this is a
486 # a virtual block device. If it's a backing block, this will point
487 # to the backing file is one is present.
491 { 'type': 'BlockStats',
492 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
493 '*parent': 'BlockStats'} }
498 # Query the @BlockStats for all virtual block devices.
500 # Returns: A list of @BlockStats for each virtual block devices.
504 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
509 # This command will cause the QEMU process to exit gracefully. While every
510 # attempt is made to send the QMP response before terminating, this is not
511 # guaranteed. When using this interface, a premature EOF would not be
516 { 'command': 'quit' }
521 # Stop all guest VCPU execution.
525 # Notes: This function will succeed even if the guest is already in the stopped
528 { 'command': 'stop' }
533 # Performs a hard reset of a guest.
537 { 'command': 'system_reset' }
542 # Requests that a guest perform a powerdown operation.
546 # Notes: A guest may or may not respond to this command. This command
547 # returning does not indicate that a guest has accepted the request or
548 # that it has shut down. Many guests will respond to this command by
549 # prompting the user in some way.
551 { 'command': 'system_powerdown' }
556 # This command is a nop that is only provided for the purposes of compatibility.
560 # Notes: Do not use this command.
562 { 'command': 'cpu', 'data': {'index': 'int'} }