2011-09-02 21:34:47 +04:00
|
|
|
# -*- Mode: Python -*-
|
|
|
|
#
|
|
|
|
# QAPI Schema
|
2011-09-02 21:34:48 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @NameInfo:
|
|
|
|
#
|
|
|
|
# Guest name information.
|
|
|
|
#
|
|
|
|
# @name: #optional The name of the guest
|
|
|
|
#
|
|
|
|
# Since 0.14.0
|
|
|
|
##
|
|
|
|
{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-name:
|
|
|
|
#
|
|
|
|
# Return the name information of a guest.
|
|
|
|
#
|
|
|
|
# Returns: @NameInfo of the guest
|
|
|
|
#
|
|
|
|
# Since 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-name', 'returns': 'NameInfo' }
|
2011-08-27 00:38:13 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @VersionInfo:
|
|
|
|
#
|
|
|
|
# A description of QEMU's version.
|
|
|
|
#
|
|
|
|
# @qemu.major: The major version of QEMU
|
|
|
|
#
|
|
|
|
# @qemu.minor: The minor version of QEMU
|
|
|
|
#
|
|
|
|
# @qemu.micro: The micro version of QEMU. By current convention, a micro
|
|
|
|
# version of 50 signifies a development branch. A micro version
|
|
|
|
# greater than or equal to 90 signifies a release candidate for
|
|
|
|
# the next minor version. A micro version of less than 50
|
|
|
|
# signifies a stable release.
|
|
|
|
#
|
|
|
|
# @package: QEMU will always set this field to an empty string. Downstream
|
|
|
|
# versions of QEMU should set this to a non-empty string. The
|
|
|
|
# exact format depends on the downstream however it highly
|
|
|
|
# recommended that a unique name is used.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'type': 'VersionInfo',
|
|
|
|
'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
|
|
|
|
'package': 'str'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-version:
|
|
|
|
#
|
|
|
|
# Returns the current version of QEMU.
|
|
|
|
#
|
|
|
|
# Returns: A @VersionInfo object describing the current version of QEMU.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-version', 'returns': 'VersionInfo' }
|
2011-09-12 22:10:53 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @KvmInfo:
|
|
|
|
#
|
|
|
|
# Information about support for KVM acceleration
|
|
|
|
#
|
|
|
|
# @enabled: true if KVM acceleration is active
|
|
|
|
#
|
|
|
|
# @present: true if KVM acceleration is built into this executable
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-kvm:
|
|
|
|
#
|
|
|
|
# Returns information about KVM acceleration
|
|
|
|
#
|
|
|
|
# Returns: @KvmInfo
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
|
|
|
|
|
2011-09-13 00:54:20 +04:00
|
|
|
##
|
|
|
|
# @RunState
|
|
|
|
#
|
|
|
|
# An enumation of VM run states.
|
|
|
|
#
|
|
|
|
# @debug: QEMU is running on a debugger
|
|
|
|
#
|
|
|
|
# @inmigrate: guest is paused waiting for an incoming migration
|
|
|
|
#
|
|
|
|
# @internal-error: An internal error that prevents further guest execution
|
|
|
|
# has occurred
|
|
|
|
#
|
|
|
|
# @io-error: the last IOP has failed and the device is configured to pause
|
|
|
|
# on I/O errors
|
|
|
|
#
|
|
|
|
# @paused: guest has been paused via the 'stop' command
|
|
|
|
#
|
|
|
|
# @postmigrate: guest is paused following a successful 'migrate'
|
|
|
|
#
|
|
|
|
# @prelaunch: QEMU was started with -S and guest has not started
|
|
|
|
#
|
|
|
|
# @finish-migrate: guest is paused to finish the migration process
|
|
|
|
#
|
|
|
|
# @restore-vm: guest is paused to restore VM state
|
|
|
|
#
|
|
|
|
# @running: guest is actively running
|
|
|
|
#
|
|
|
|
# @save-vm: guest is paused to save the VM state
|
|
|
|
#
|
|
|
|
# @shutdown: guest is shut down (and -no-shutdown is in use)
|
|
|
|
#
|
|
|
|
# @watchdog: the watchdog action is configured to pause and has been triggered
|
|
|
|
##
|
|
|
|
{ 'enum': 'RunState',
|
|
|
|
'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
|
|
|
|
'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
|
|
|
|
'running', 'save-vm', 'shutdown', 'watchdog' ] }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @StatusInfo:
|
|
|
|
#
|
|
|
|
# Information about VCPU run state
|
|
|
|
#
|
|
|
|
# @running: true if all VCPUs are runnable, false if not runnable
|
|
|
|
#
|
|
|
|
# @singlestep: true if VCPUs are in single-step mode
|
|
|
|
#
|
|
|
|
# @status: the virtual machine @RunState
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
#
|
|
|
|
# Notes: @singlestep is enabled through the GDB stub
|
|
|
|
##
|
|
|
|
{ 'type': 'StatusInfo',
|
|
|
|
'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-status:
|
|
|
|
#
|
|
|
|
# Query the run status of all VCPUs
|
|
|
|
#
|
|
|
|
# Returns: @StatusInfo reflecting all VCPUs
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-status', 'returns': 'StatusInfo' }
|
|
|
|
|
2011-09-14 00:16:25 +04:00
|
|
|
##
|
|
|
|
# @UuidInfo:
|
|
|
|
#
|
|
|
|
# Guest UUID information.
|
|
|
|
#
|
|
|
|
# @UUID: the UUID of the guest
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
#
|
|
|
|
# Notes: If no UUID was specified for the guest, a null UUID is returned.
|
|
|
|
##
|
|
|
|
{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-uuid:
|
|
|
|
#
|
|
|
|
# Query the guest UUID information.
|
|
|
|
#
|
|
|
|
# Returns: The @UuidInfo for the guest
|
|
|
|
#
|
|
|
|
# Since 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
|
|
|
|
|
2011-09-14 23:05:49 +04:00
|
|
|
##
|
|
|
|
# @ChardevInfo:
|
|
|
|
#
|
|
|
|
# Information about a character device.
|
|
|
|
#
|
|
|
|
# @label: the label of the character device
|
|
|
|
#
|
|
|
|
# @filename: the filename of the character device
|
|
|
|
#
|
|
|
|
# Notes: @filename is encoded using the QEMU command line character device
|
|
|
|
# encoding. See the QEMU man page for details.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-chardev:
|
|
|
|
#
|
|
|
|
# Returns information about current character devices.
|
|
|
|
#
|
|
|
|
# Returns: a list of @ChardevInfo
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
|
2011-09-21 21:31:51 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @CommandInfo:
|
|
|
|
#
|
|
|
|
# Information about a QMP command
|
|
|
|
#
|
|
|
|
# @name: The command name
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-commands:
|
|
|
|
#
|
|
|
|
# Return a list of supported QMP commands by this server
|
|
|
|
#
|
|
|
|
# Returns: A list of @CommandInfo for all supported commands
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
|
|
|
|
|
2011-09-14 00:37:16 +04:00
|
|
|
##
|
|
|
|
# @MigrationStats
|
|
|
|
#
|
|
|
|
# Detailed migration status.
|
|
|
|
#
|
|
|
|
# @transferred: amount of bytes already transferred to the target VM
|
|
|
|
#
|
|
|
|
# @remaining: amount of bytes remaining to be transferred to the target VM
|
|
|
|
#
|
|
|
|
# @total: total amount of bytes involved in the migration process
|
|
|
|
#
|
|
|
|
# Since: 0.14.0.
|
|
|
|
##
|
|
|
|
{ 'type': 'MigrationStats',
|
|
|
|
'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' } }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @MigrationInfo
|
|
|
|
#
|
|
|
|
# Information about current migration process.
|
|
|
|
#
|
|
|
|
# @status: #optional string describing the current migration status.
|
|
|
|
# As of 0.14.0 this can be 'active', 'completed', 'failed' or
|
|
|
|
# 'cancelled'. If this field is not returned, no migration process
|
|
|
|
# has been initiated
|
|
|
|
#
|
|
|
|
# @ram: #optional @MigrationStats containing detailed migration status,
|
|
|
|
# only returned if status is 'active'
|
|
|
|
#
|
|
|
|
# @disk: #optional @MigrationStats containing detailed disk migration
|
|
|
|
# status, only returned if status is 'active' and it is a block
|
|
|
|
# migration
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'type': 'MigrationInfo',
|
|
|
|
'data': {'*status': 'str', '*ram': 'MigrationStats',
|
|
|
|
'*disk': 'MigrationStats'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-migrate
|
|
|
|
#
|
|
|
|
# Returns information about current migration process.
|
|
|
|
#
|
|
|
|
# Returns: @MigrationInfo
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
|
|
|
|
|
2011-09-21 22:29:55 +04:00
|
|
|
##
|
|
|
|
# @MouseInfo:
|
|
|
|
#
|
|
|
|
# Information about a mouse device.
|
|
|
|
#
|
|
|
|
# @name: the name of the mouse device
|
|
|
|
#
|
|
|
|
# @index: the index of the mouse device
|
|
|
|
#
|
|
|
|
# @current: true if this device is currently receiving mouse events
|
|
|
|
#
|
|
|
|
# @absolute: true if this device supports absolute coordinates as input
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'type': 'MouseInfo',
|
|
|
|
'data': {'name': 'str', 'index': 'int', 'current': 'bool',
|
|
|
|
'absolute': 'bool'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-mice:
|
|
|
|
#
|
|
|
|
# Returns information about each active mouse device
|
|
|
|
#
|
|
|
|
# Returns: a list of @MouseInfo for each device
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
|
|
|
|
|
2011-09-21 23:38:35 +04:00
|
|
|
##
|
|
|
|
# @CpuInfo:
|
|
|
|
#
|
|
|
|
# Information about a virtual CPU
|
|
|
|
#
|
|
|
|
# @CPU: the index of the virtual CPU
|
|
|
|
#
|
|
|
|
# @current: this only exists for backwards compatible and should be ignored
|
|
|
|
#
|
|
|
|
# @halted: true if the virtual CPU is in the halt state. Halt usually refers
|
|
|
|
# to a processor specific low power mode.
|
|
|
|
#
|
|
|
|
# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
|
|
|
|
# pointer.
|
|
|
|
# If the target is Sparc, this is the PC component of the
|
|
|
|
# instruction pointer.
|
|
|
|
#
|
|
|
|
# @nip: #optional If the target is PPC, the instruction pointer
|
|
|
|
#
|
|
|
|
# @npc: #optional If the target is Sparc, the NPC component of the instruction
|
|
|
|
# pointer
|
|
|
|
#
|
|
|
|
# @PC: #optional If the target is MIPS, the instruction pointer
|
|
|
|
#
|
|
|
|
# @thread_id: ID of the underlying host thread
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
#
|
|
|
|
# Notes: @halted is a transient state that changes frequently. By the time the
|
|
|
|
# data is sent to the client, the guest may no longer be halted.
|
|
|
|
##
|
|
|
|
{ 'type': 'CpuInfo',
|
|
|
|
'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
|
|
|
|
'*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
|
|
|
|
|
|
|
|
##
|
|
|
|
# @query-cpus:
|
|
|
|
#
|
|
|
|
# Returns a list of information about each virtual CPU.
|
|
|
|
#
|
|
|
|
# Returns: a list of @CpuInfo for each virtual CPU
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
|
|
|
|
|
2011-09-15 21:20:28 +04:00
|
|
|
##
|
|
|
|
# @quit:
|
|
|
|
#
|
|
|
|
# This command will cause the QEMU process to exit gracefully. While every
|
|
|
|
# attempt is made to send the QMP response before terminating, this is not
|
|
|
|
# guaranteed. When using this interface, a premature EOF would not be
|
|
|
|
# unexpected.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'quit' }
|
2011-09-15 21:34:39 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @stop:
|
|
|
|
#
|
|
|
|
# Stop all guest VCPU execution.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
#
|
|
|
|
# Notes: This function will succeed even if the guest is already in the stopped
|
|
|
|
# state
|
|
|
|
##
|
|
|
|
{ 'command': 'stop' }
|
2011-09-15 21:41:46 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @system_reset:
|
|
|
|
#
|
|
|
|
# Performs a hard reset of a guest.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
##
|
|
|
|
{ 'command': 'system_reset' }
|
2011-09-28 18:06:15 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @system_powerdown:
|
|
|
|
#
|
|
|
|
# Requests that a guest perform a powerdown operation.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
#
|
|
|
|
# Notes: A guest may or may not respond to this command. This command
|
|
|
|
# returning does not indicate that a guest has accepted the request or
|
|
|
|
# that it has shut down. Many guests will respond to this command by
|
|
|
|
# prompting the user in some way.
|
|
|
|
##
|
|
|
|
{ 'command': 'system_powerdown' }
|
2011-10-06 21:31:39 +04:00
|
|
|
|
|
|
|
##
|
|
|
|
# @cpu:
|
|
|
|
#
|
|
|
|
# This command is a nop that is only provided for the purposes of compatibility.
|
|
|
|
#
|
|
|
|
# Since: 0.14.0
|
|
|
|
#
|
|
|
|
# Notes: Do not use this command.
|
|
|
|
##
|
|
|
|
{ 'command': 'cpu', 'data': {'index': 'int'} }
|