Merge remote-tracking branch 'kwolf/for-anthony' into staging
[qemu.git] / qapi-schema.json
blob5922c4a920c7cda4de84c519570af760a2b7904f
1 # -*- Mode: Python -*-
3 # QAPI Schema
5 ##
6 # @NameInfo:
8 # Guest name information.
10 # @name: #optional The name of the guest
12 # Since 0.14.0
14 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
17 # @query-name:
19 # Return the name information of a guest.
21 # Returns: @NameInfo of the guest
23 # Since 0.14.0
25 { 'command': 'query-name', 'returns': 'NameInfo' }
28 # @VersionInfo:
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.
47 # Since: 0.14.0
49 { 'type': 'VersionInfo',
50   'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
51            'package': 'str'} }
54 # @query-version:
56 # Returns the current version of QEMU.
58 # Returns:  A @VersionInfo object describing the current version of QEMU.
60 # Since: 0.14.0
62 { 'command': 'query-version', 'returns': 'VersionInfo' }
65 # @KvmInfo:
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
73 # Since: 0.14.0
75 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
78 # @query-kvm:
80 # Returns information about KVM acceleration
82 # Returns: @KvmInfo
84 # Since: 0.14.0
86 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
89 # @RunState
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
98 # has occurred
100 # @io-error: the last IOP has failed and the device is configured to pause
101 # on I/O errors
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' ] }
127 # @StatusInfo:
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
137 # Since:  0.14.0
139 # Notes: @singlestep is enabled through the GDB stub
141 { 'type': 'StatusInfo',
142   'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
145 # @query-status:
147 # Query the run status of all VCPUs
149 # Returns: @StatusInfo reflecting all VCPUs
151 # Since:  0.14.0
153 { 'command': 'query-status', 'returns': 'StatusInfo' }
156 # @UuidInfo:
158 # Guest UUID information.
160 # @UUID: the UUID of the guest
162 # Since: 0.14.0
164 # Notes: If no UUID was specified for the guest, a null UUID is returned.
166 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
169 # @query-uuid:
171 # Query the guest UUID information.
173 # Returns: The @UuidInfo for the guest
175 # Since 0.14.0
177 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
180 # @ChardevInfo:
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.
191 # Since: 0.14.0
193 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
196 # @query-chardev:
198 # Returns information about current character devices.
200 # Returns: a list of @ChardevInfo
202 # Since: 0.14.0
204 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
207 # @CommandInfo:
209 # Information about a QMP command
211 # @name: The command name
213 # Since: 0.14.0
215 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
218 # @query-commands:
220 # Return a list of supported QMP commands by this server
222 # Returns: A list of @CommandInfo for all supported commands
224 # Since: 0.14.0
226 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
229 # @quit:
231 # This command will cause the QEMU process to exit gracefully.  While every
232 # attempt is made to send the QMP response before terminating, this is not
233 # guaranteed.  When using this interface, a premature EOF would not be
234 # unexpected.
236 # Since: 0.14.0
238 { 'command': 'quit' }
241 # @stop:
243 # Stop all guest VCPU execution.
245 # Since:  0.14.0
247 # Notes:  This function will succeed even if the guest is already in the stopped
248 #         state
250 { 'command': 'stop' }
253 # @system_reset:
255 # Performs a hard reset of a guest.
257 # Since: 0.14.0
259 { 'command': 'system_reset' }
262 # @system_powerdown:
264 # Requests that a guest perform a powerdown operation.
266 # Since: 0.14.0
268 # Notes: A guest may or may not respond to this command.  This command
269 #        returning does not indicate that a guest has accepted the request or
270 #        that it has shut down.  Many guests will respond to this command by
271 #        prompting the user in some way.
273 { 'command': 'system_powerdown' }