Statistics
| Branch: | Revision:

root / qapi-schema.json @ 60e1b2a6

History | View | Annotate | Download (47.1 kB)

1 e3193601 Anthony Liguori
# -*- Mode: Python -*-
2 e3193601 Anthony Liguori
#
3 e3193601 Anthony Liguori
# QAPI Schema
4 48a32bed Anthony Liguori
5 48a32bed Anthony Liguori
##
6 48a32bed Anthony Liguori
# @NameInfo:
7 48a32bed Anthony Liguori
#
8 48a32bed Anthony Liguori
# Guest name information.
9 48a32bed Anthony Liguori
#
10 48a32bed Anthony Liguori
# @name: #optional The name of the guest
11 48a32bed Anthony Liguori
#
12 48a32bed Anthony Liguori
# Since 0.14.0
13 48a32bed Anthony Liguori
##
14 48a32bed Anthony Liguori
{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
15 48a32bed Anthony Liguori
16 48a32bed Anthony Liguori
##
17 48a32bed Anthony Liguori
# @query-name:
18 48a32bed Anthony Liguori
#
19 48a32bed Anthony Liguori
# Return the name information of a guest.
20 48a32bed Anthony Liguori
#
21 48a32bed Anthony Liguori
# Returns: @NameInfo of the guest
22 48a32bed Anthony Liguori
#
23 48a32bed Anthony Liguori
# Since 0.14.0
24 48a32bed Anthony Liguori
##
25 48a32bed Anthony Liguori
{ 'command': 'query-name', 'returns': 'NameInfo' }
26 b9c15f16 Luiz Capitulino
27 b9c15f16 Luiz Capitulino
##
28 b9c15f16 Luiz Capitulino
# @VersionInfo:
29 b9c15f16 Luiz Capitulino
#
30 b9c15f16 Luiz Capitulino
# A description of QEMU's version.
31 b9c15f16 Luiz Capitulino
#
32 b9c15f16 Luiz Capitulino
# @qemu.major:  The major version of QEMU
33 b9c15f16 Luiz Capitulino
#
34 b9c15f16 Luiz Capitulino
# @qemu.minor:  The minor version of QEMU
35 b9c15f16 Luiz Capitulino
#
36 b9c15f16 Luiz Capitulino
# @qemu.micro:  The micro version of QEMU.  By current convention, a micro
37 b9c15f16 Luiz Capitulino
#               version of 50 signifies a development branch.  A micro version
38 b9c15f16 Luiz Capitulino
#               greater than or equal to 90 signifies a release candidate for
39 b9c15f16 Luiz Capitulino
#               the next minor version.  A micro version of less than 50
40 b9c15f16 Luiz Capitulino
#               signifies a stable release.
41 b9c15f16 Luiz Capitulino
#
42 b9c15f16 Luiz Capitulino
# @package:     QEMU will always set this field to an empty string.  Downstream
43 b9c15f16 Luiz Capitulino
#               versions of QEMU should set this to a non-empty string.  The
44 b9c15f16 Luiz Capitulino
#               exact format depends on the downstream however it highly
45 b9c15f16 Luiz Capitulino
#               recommended that a unique name is used.
46 b9c15f16 Luiz Capitulino
#
47 b9c15f16 Luiz Capitulino
# Since: 0.14.0
48 b9c15f16 Luiz Capitulino
##
49 b9c15f16 Luiz Capitulino
{ 'type': 'VersionInfo',
50 b9c15f16 Luiz Capitulino
  'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
51 b9c15f16 Luiz Capitulino
           'package': 'str'} }
52 b9c15f16 Luiz Capitulino
53 b9c15f16 Luiz Capitulino
##
54 b9c15f16 Luiz Capitulino
# @query-version:
55 b9c15f16 Luiz Capitulino
#
56 b9c15f16 Luiz Capitulino
# Returns the current version of QEMU.
57 b9c15f16 Luiz Capitulino
#
58 b9c15f16 Luiz Capitulino
# Returns:  A @VersionInfo object describing the current version of QEMU.
59 b9c15f16 Luiz Capitulino
#
60 b9c15f16 Luiz Capitulino
# Since: 0.14.0
61 b9c15f16 Luiz Capitulino
##
62 b9c15f16 Luiz Capitulino
{ 'command': 'query-version', 'returns': 'VersionInfo' }
63 292a2602 Luiz Capitulino
64 292a2602 Luiz Capitulino
##
65 292a2602 Luiz Capitulino
# @KvmInfo:
66 292a2602 Luiz Capitulino
#
67 292a2602 Luiz Capitulino
# Information about support for KVM acceleration
68 292a2602 Luiz Capitulino
#
69 292a2602 Luiz Capitulino
# @enabled: true if KVM acceleration is active
70 292a2602 Luiz Capitulino
#
71 292a2602 Luiz Capitulino
# @present: true if KVM acceleration is built into this executable
72 292a2602 Luiz Capitulino
#
73 292a2602 Luiz Capitulino
# Since: 0.14.0
74 292a2602 Luiz Capitulino
##
75 292a2602 Luiz Capitulino
{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
76 292a2602 Luiz Capitulino
77 292a2602 Luiz Capitulino
##
78 292a2602 Luiz Capitulino
# @query-kvm:
79 292a2602 Luiz Capitulino
#
80 292a2602 Luiz Capitulino
# Returns information about KVM acceleration
81 292a2602 Luiz Capitulino
#
82 292a2602 Luiz Capitulino
# Returns: @KvmInfo
83 292a2602 Luiz Capitulino
#
84 292a2602 Luiz Capitulino
# Since: 0.14.0
85 292a2602 Luiz Capitulino
##
86 292a2602 Luiz Capitulino
{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
87 292a2602 Luiz Capitulino
88 1fa9a5e4 Luiz Capitulino
##
89 1fa9a5e4 Luiz Capitulino
# @RunState
90 1fa9a5e4 Luiz Capitulino
#
91 1fa9a5e4 Luiz Capitulino
# An enumation of VM run states.
92 1fa9a5e4 Luiz Capitulino
#
93 1fa9a5e4 Luiz Capitulino
# @debug: QEMU is running on a debugger
94 1fa9a5e4 Luiz Capitulino
#
95 1fa9a5e4 Luiz Capitulino
# @inmigrate: guest is paused waiting for an incoming migration
96 1fa9a5e4 Luiz Capitulino
#
97 1fa9a5e4 Luiz Capitulino
# @internal-error: An internal error that prevents further guest execution
98 1fa9a5e4 Luiz Capitulino
# has occurred
99 1fa9a5e4 Luiz Capitulino
#
100 1fa9a5e4 Luiz Capitulino
# @io-error: the last IOP has failed and the device is configured to pause
101 1fa9a5e4 Luiz Capitulino
# on I/O errors
102 1fa9a5e4 Luiz Capitulino
#
103 1fa9a5e4 Luiz Capitulino
# @paused: guest has been paused via the 'stop' command
104 1fa9a5e4 Luiz Capitulino
#
105 1fa9a5e4 Luiz Capitulino
# @postmigrate: guest is paused following a successful 'migrate'
106 1fa9a5e4 Luiz Capitulino
#
107 1fa9a5e4 Luiz Capitulino
# @prelaunch: QEMU was started with -S and guest has not started
108 1fa9a5e4 Luiz Capitulino
#
109 1fa9a5e4 Luiz Capitulino
# @finish-migrate: guest is paused to finish the migration process
110 1fa9a5e4 Luiz Capitulino
#
111 1fa9a5e4 Luiz Capitulino
# @restore-vm: guest is paused to restore VM state
112 1fa9a5e4 Luiz Capitulino
#
113 1fa9a5e4 Luiz Capitulino
# @running: guest is actively running
114 1fa9a5e4 Luiz Capitulino
#
115 1fa9a5e4 Luiz Capitulino
# @save-vm: guest is paused to save the VM state
116 1fa9a5e4 Luiz Capitulino
#
117 1fa9a5e4 Luiz Capitulino
# @shutdown: guest is shut down (and -no-shutdown is in use)
118 1fa9a5e4 Luiz Capitulino
#
119 1fa9a5e4 Luiz Capitulino
# @watchdog: the watchdog action is configured to pause and has been triggered
120 1fa9a5e4 Luiz Capitulino
##
121 1fa9a5e4 Luiz Capitulino
{ 'enum': 'RunState',
122 1fa9a5e4 Luiz Capitulino
  'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
123 1fa9a5e4 Luiz Capitulino
            'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
124 1fa9a5e4 Luiz Capitulino
            'running', 'save-vm', 'shutdown', 'watchdog' ] }
125 1fa9a5e4 Luiz Capitulino
126 1fa9a5e4 Luiz Capitulino
##
127 1fa9a5e4 Luiz Capitulino
# @StatusInfo:
128 1fa9a5e4 Luiz Capitulino
#
129 1fa9a5e4 Luiz Capitulino
# Information about VCPU run state
130 1fa9a5e4 Luiz Capitulino
#
131 1fa9a5e4 Luiz Capitulino
# @running: true if all VCPUs are runnable, false if not runnable
132 1fa9a5e4 Luiz Capitulino
#
133 1fa9a5e4 Luiz Capitulino
# @singlestep: true if VCPUs are in single-step mode
134 1fa9a5e4 Luiz Capitulino
#
135 1fa9a5e4 Luiz Capitulino
# @status: the virtual machine @RunState
136 1fa9a5e4 Luiz Capitulino
#
137 1fa9a5e4 Luiz Capitulino
# Since:  0.14.0
138 1fa9a5e4 Luiz Capitulino
#
139 1fa9a5e4 Luiz Capitulino
# Notes: @singlestep is enabled through the GDB stub
140 1fa9a5e4 Luiz Capitulino
##
141 1fa9a5e4 Luiz Capitulino
{ 'type': 'StatusInfo',
142 1fa9a5e4 Luiz Capitulino
  'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
143 1fa9a5e4 Luiz Capitulino
144 1fa9a5e4 Luiz Capitulino
##
145 1fa9a5e4 Luiz Capitulino
# @query-status:
146 1fa9a5e4 Luiz Capitulino
#
147 1fa9a5e4 Luiz Capitulino
# Query the run status of all VCPUs
148 1fa9a5e4 Luiz Capitulino
#
149 1fa9a5e4 Luiz Capitulino
# Returns: @StatusInfo reflecting all VCPUs
150 1fa9a5e4 Luiz Capitulino
#
151 1fa9a5e4 Luiz Capitulino
# Since:  0.14.0
152 1fa9a5e4 Luiz Capitulino
##
153 1fa9a5e4 Luiz Capitulino
{ 'command': 'query-status', 'returns': 'StatusInfo' }
154 1fa9a5e4 Luiz Capitulino
155 efab767e Luiz Capitulino
##
156 efab767e Luiz Capitulino
# @UuidInfo:
157 efab767e Luiz Capitulino
#
158 efab767e Luiz Capitulino
# Guest UUID information.
159 efab767e Luiz Capitulino
#
160 efab767e Luiz Capitulino
# @UUID: the UUID of the guest
161 efab767e Luiz Capitulino
#
162 efab767e Luiz Capitulino
# Since: 0.14.0
163 efab767e Luiz Capitulino
#
164 efab767e Luiz Capitulino
# Notes: If no UUID was specified for the guest, a null UUID is returned.
165 efab767e Luiz Capitulino
##
166 efab767e Luiz Capitulino
{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
167 efab767e Luiz Capitulino
168 efab767e Luiz Capitulino
##
169 efab767e Luiz Capitulino
# @query-uuid:
170 efab767e Luiz Capitulino
#
171 efab767e Luiz Capitulino
# Query the guest UUID information.
172 efab767e Luiz Capitulino
#
173 efab767e Luiz Capitulino
# Returns: The @UuidInfo for the guest
174 efab767e Luiz Capitulino
#
175 efab767e Luiz Capitulino
# Since 0.14.0
176 efab767e Luiz Capitulino
##
177 efab767e Luiz Capitulino
{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
178 efab767e Luiz Capitulino
179 c5a415a0 Luiz Capitulino
##
180 c5a415a0 Luiz Capitulino
# @ChardevInfo:
181 c5a415a0 Luiz Capitulino
#
182 c5a415a0 Luiz Capitulino
# Information about a character device.
183 c5a415a0 Luiz Capitulino
#
184 c5a415a0 Luiz Capitulino
# @label: the label of the character device
185 c5a415a0 Luiz Capitulino
#
186 c5a415a0 Luiz Capitulino
# @filename: the filename of the character device
187 c5a415a0 Luiz Capitulino
#
188 c5a415a0 Luiz Capitulino
# Notes: @filename is encoded using the QEMU command line character device
189 c5a415a0 Luiz Capitulino
#        encoding.  See the QEMU man page for details.
190 c5a415a0 Luiz Capitulino
#
191 c5a415a0 Luiz Capitulino
# Since: 0.14.0
192 c5a415a0 Luiz Capitulino
##
193 c5a415a0 Luiz Capitulino
{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
194 c5a415a0 Luiz Capitulino
195 c5a415a0 Luiz Capitulino
##
196 c5a415a0 Luiz Capitulino
# @query-chardev:
197 c5a415a0 Luiz Capitulino
#
198 c5a415a0 Luiz Capitulino
# Returns information about current character devices.
199 c5a415a0 Luiz Capitulino
#
200 c5a415a0 Luiz Capitulino
# Returns: a list of @ChardevInfo
201 c5a415a0 Luiz Capitulino
#
202 c5a415a0 Luiz Capitulino
# Since: 0.14.0
203 c5a415a0 Luiz Capitulino
##
204 c5a415a0 Luiz Capitulino
{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
205 aa9b79bc Luiz Capitulino
206 aa9b79bc Luiz Capitulino
##
207 aa9b79bc Luiz Capitulino
# @CommandInfo:
208 aa9b79bc Luiz Capitulino
#
209 aa9b79bc Luiz Capitulino
# Information about a QMP command
210 aa9b79bc Luiz Capitulino
#
211 aa9b79bc Luiz Capitulino
# @name: The command name
212 aa9b79bc Luiz Capitulino
#
213 aa9b79bc Luiz Capitulino
# Since: 0.14.0
214 aa9b79bc Luiz Capitulino
##
215 aa9b79bc Luiz Capitulino
{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
216 aa9b79bc Luiz Capitulino
217 aa9b79bc Luiz Capitulino
##
218 aa9b79bc Luiz Capitulino
# @query-commands:
219 aa9b79bc Luiz Capitulino
#
220 aa9b79bc Luiz Capitulino
# Return a list of supported QMP commands by this server
221 aa9b79bc Luiz Capitulino
#
222 aa9b79bc Luiz Capitulino
# Returns: A list of @CommandInfo for all supported commands
223 aa9b79bc Luiz Capitulino
#
224 aa9b79bc Luiz Capitulino
# Since: 0.14.0
225 aa9b79bc Luiz Capitulino
##
226 aa9b79bc Luiz Capitulino
{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
227 aa9b79bc Luiz Capitulino
228 7a7f325e Luiz Capitulino
##
229 791e7c82 Luiz Capitulino
# @MigrationStats
230 791e7c82 Luiz Capitulino
#
231 791e7c82 Luiz Capitulino
# Detailed migration status.
232 791e7c82 Luiz Capitulino
#
233 791e7c82 Luiz Capitulino
# @transferred: amount of bytes already transferred to the target VM
234 791e7c82 Luiz Capitulino
#
235 791e7c82 Luiz Capitulino
# @remaining: amount of bytes remaining to be transferred to the target VM
236 791e7c82 Luiz Capitulino
#
237 791e7c82 Luiz Capitulino
# @total: total amount of bytes involved in the migration process
238 791e7c82 Luiz Capitulino
#
239 791e7c82 Luiz Capitulino
# Since: 0.14.0.
240 791e7c82 Luiz Capitulino
##
241 791e7c82 Luiz Capitulino
{ 'type': 'MigrationStats',
242 791e7c82 Luiz Capitulino
  'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' } }
243 791e7c82 Luiz Capitulino
244 791e7c82 Luiz Capitulino
##
245 791e7c82 Luiz Capitulino
# @MigrationInfo
246 791e7c82 Luiz Capitulino
#
247 791e7c82 Luiz Capitulino
# Information about current migration process.
248 791e7c82 Luiz Capitulino
#
249 791e7c82 Luiz Capitulino
# @status: #optional string describing the current migration status.
250 791e7c82 Luiz Capitulino
#          As of 0.14.0 this can be 'active', 'completed', 'failed' or
251 791e7c82 Luiz Capitulino
#          'cancelled'. If this field is not returned, no migration process
252 791e7c82 Luiz Capitulino
#          has been initiated
253 791e7c82 Luiz Capitulino
#
254 791e7c82 Luiz Capitulino
# @ram: #optional @MigrationStats containing detailed migration status,
255 791e7c82 Luiz Capitulino
#       only returned if status is 'active'
256 791e7c82 Luiz Capitulino
#
257 791e7c82 Luiz Capitulino
# @disk: #optional @MigrationStats containing detailed disk migration
258 791e7c82 Luiz Capitulino
#        status, only returned if status is 'active' and it is a block
259 791e7c82 Luiz Capitulino
#        migration
260 791e7c82 Luiz Capitulino
#
261 791e7c82 Luiz Capitulino
# Since: 0.14.0
262 791e7c82 Luiz Capitulino
##
263 791e7c82 Luiz Capitulino
{ 'type': 'MigrationInfo',
264 791e7c82 Luiz Capitulino
  'data': {'*status': 'str', '*ram': 'MigrationStats',
265 791e7c82 Luiz Capitulino
           '*disk': 'MigrationStats'} }
266 791e7c82 Luiz Capitulino
267 791e7c82 Luiz Capitulino
##
268 791e7c82 Luiz Capitulino
# @query-migrate
269 791e7c82 Luiz Capitulino
#
270 791e7c82 Luiz Capitulino
# Returns information about current migration process.
271 791e7c82 Luiz Capitulino
#
272 791e7c82 Luiz Capitulino
# Returns: @MigrationInfo
273 791e7c82 Luiz Capitulino
#
274 791e7c82 Luiz Capitulino
# Since: 0.14.0
275 791e7c82 Luiz Capitulino
##
276 791e7c82 Luiz Capitulino
{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
277 791e7c82 Luiz Capitulino
278 791e7c82 Luiz Capitulino
##
279 e235cec3 Luiz Capitulino
# @MouseInfo:
280 e235cec3 Luiz Capitulino
#
281 e235cec3 Luiz Capitulino
# Information about a mouse device.
282 e235cec3 Luiz Capitulino
#
283 e235cec3 Luiz Capitulino
# @name: the name of the mouse device
284 e235cec3 Luiz Capitulino
#
285 e235cec3 Luiz Capitulino
# @index: the index of the mouse device
286 e235cec3 Luiz Capitulino
#
287 e235cec3 Luiz Capitulino
# @current: true if this device is currently receiving mouse events
288 e235cec3 Luiz Capitulino
#
289 e235cec3 Luiz Capitulino
# @absolute: true if this device supports absolute coordinates as input
290 e235cec3 Luiz Capitulino
#
291 e235cec3 Luiz Capitulino
# Since: 0.14.0
292 e235cec3 Luiz Capitulino
##
293 e235cec3 Luiz Capitulino
{ 'type': 'MouseInfo',
294 e235cec3 Luiz Capitulino
  'data': {'name': 'str', 'index': 'int', 'current': 'bool',
295 e235cec3 Luiz Capitulino
           'absolute': 'bool'} }
296 e235cec3 Luiz Capitulino
297 e235cec3 Luiz Capitulino
##
298 e235cec3 Luiz Capitulino
# @query-mice:
299 e235cec3 Luiz Capitulino
#
300 e235cec3 Luiz Capitulino
# Returns information about each active mouse device
301 e235cec3 Luiz Capitulino
#
302 e235cec3 Luiz Capitulino
# Returns: a list of @MouseInfo for each device
303 e235cec3 Luiz Capitulino
#
304 e235cec3 Luiz Capitulino
# Since: 0.14.0
305 e235cec3 Luiz Capitulino
##
306 e235cec3 Luiz Capitulino
{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
307 e235cec3 Luiz Capitulino
308 e235cec3 Luiz Capitulino
##
309 de0b36b6 Luiz Capitulino
# @CpuInfo:
310 de0b36b6 Luiz Capitulino
#
311 de0b36b6 Luiz Capitulino
# Information about a virtual CPU
312 de0b36b6 Luiz Capitulino
#
313 de0b36b6 Luiz Capitulino
# @CPU: the index of the virtual CPU
314 de0b36b6 Luiz Capitulino
#
315 de0b36b6 Luiz Capitulino
# @current: this only exists for backwards compatible and should be ignored
316 de0b36b6 Luiz Capitulino
# 
317 de0b36b6 Luiz Capitulino
# @halted: true if the virtual CPU is in the halt state.  Halt usually refers
318 de0b36b6 Luiz Capitulino
#          to a processor specific low power mode.
319 de0b36b6 Luiz Capitulino
#
320 de0b36b6 Luiz Capitulino
# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
321 de0b36b6 Luiz Capitulino
#                pointer.
322 de0b36b6 Luiz Capitulino
#                If the target is Sparc, this is the PC component of the
323 de0b36b6 Luiz Capitulino
#                instruction pointer.
324 de0b36b6 Luiz Capitulino
#
325 de0b36b6 Luiz Capitulino
# @nip: #optional If the target is PPC, the instruction pointer
326 de0b36b6 Luiz Capitulino
#
327 de0b36b6 Luiz Capitulino
# @npc: #optional If the target is Sparc, the NPC component of the instruction
328 de0b36b6 Luiz Capitulino
#                 pointer
329 de0b36b6 Luiz Capitulino
#
330 de0b36b6 Luiz Capitulino
# @PC: #optional If the target is MIPS, the instruction pointer
331 de0b36b6 Luiz Capitulino
#
332 de0b36b6 Luiz Capitulino
# @thread_id: ID of the underlying host thread
333 de0b36b6 Luiz Capitulino
#
334 de0b36b6 Luiz Capitulino
# Since: 0.14.0
335 de0b36b6 Luiz Capitulino
#
336 de0b36b6 Luiz Capitulino
# Notes: @halted is a transient state that changes frequently.  By the time the
337 de0b36b6 Luiz Capitulino
#        data is sent to the client, the guest may no longer be halted.
338 de0b36b6 Luiz Capitulino
##
339 de0b36b6 Luiz Capitulino
{ 'type': 'CpuInfo',
340 de0b36b6 Luiz Capitulino
  'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
341 de0b36b6 Luiz Capitulino
           '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
342 de0b36b6 Luiz Capitulino
343 de0b36b6 Luiz Capitulino
##
344 de0b36b6 Luiz Capitulino
# @query-cpus:
345 de0b36b6 Luiz Capitulino
#
346 de0b36b6 Luiz Capitulino
# Returns a list of information about each virtual CPU.
347 de0b36b6 Luiz Capitulino
#
348 de0b36b6 Luiz Capitulino
# Returns: a list of @CpuInfo for each virtual CPU
349 de0b36b6 Luiz Capitulino
#
350 de0b36b6 Luiz Capitulino
# Since: 0.14.0
351 de0b36b6 Luiz Capitulino
##
352 de0b36b6 Luiz Capitulino
{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
353 de0b36b6 Luiz Capitulino
354 de0b36b6 Luiz Capitulino
##
355 b2023818 Luiz Capitulino
# @BlockDeviceInfo:
356 b2023818 Luiz Capitulino
#
357 b2023818 Luiz Capitulino
# Information about the backing device for a block device.
358 b2023818 Luiz Capitulino
#
359 b2023818 Luiz Capitulino
# @file: the filename of the backing device
360 b2023818 Luiz Capitulino
#
361 b2023818 Luiz Capitulino
# @ro: true if the backing device was open read-only
362 b2023818 Luiz Capitulino
#
363 b2023818 Luiz Capitulino
# @drv: the name of the block format used to open the backing device. As of
364 b2023818 Luiz Capitulino
#       0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
365 b2023818 Luiz Capitulino
#       'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
366 b2023818 Luiz Capitulino
#       'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
367 b2023818 Luiz Capitulino
#       'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
368 b2023818 Luiz Capitulino
#
369 b2023818 Luiz Capitulino
# @backing_file: #optional the name of the backing file (for copy-on-write)
370 b2023818 Luiz Capitulino
#
371 b2023818 Luiz Capitulino
# @encrypted: true if the backing device is encrypted
372 b2023818 Luiz Capitulino
#
373 727f005e Zhi Yong Wu
# @bps: total throughput limit in bytes per second is specified
374 727f005e Zhi Yong Wu
#
375 727f005e Zhi Yong Wu
# @bps_rd: read throughput limit in bytes per second is specified
376 727f005e Zhi Yong Wu
#
377 727f005e Zhi Yong Wu
# @bps_wr: write throughput limit in bytes per second is specified
378 727f005e Zhi Yong Wu
#
379 727f005e Zhi Yong Wu
# @iops: total I/O operations per second is specified
380 727f005e Zhi Yong Wu
#
381 727f005e Zhi Yong Wu
# @iops_rd: read I/O operations per second is specified
382 727f005e Zhi Yong Wu
#
383 727f005e Zhi Yong Wu
# @iops_wr: write I/O operations per second is specified
384 727f005e Zhi Yong Wu
#
385 b2023818 Luiz Capitulino
# Since: 0.14.0
386 b2023818 Luiz Capitulino
#
387 b2023818 Luiz Capitulino
# Notes: This interface is only found in @BlockInfo.
388 b2023818 Luiz Capitulino
##
389 b2023818 Luiz Capitulino
{ 'type': 'BlockDeviceInfo',
390 b2023818 Luiz Capitulino
  'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
391 727f005e Zhi Yong Wu
            '*backing_file': 'str', 'encrypted': 'bool',
392 727f005e Zhi Yong Wu
            'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
393 727f005e Zhi Yong Wu
            'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
394 b2023818 Luiz Capitulino
395 b2023818 Luiz Capitulino
##
396 b2023818 Luiz Capitulino
# @BlockDeviceIoStatus:
397 b2023818 Luiz Capitulino
#
398 b2023818 Luiz Capitulino
# An enumeration of block device I/O status.
399 b2023818 Luiz Capitulino
#
400 b2023818 Luiz Capitulino
# @ok: The last I/O operation has succeeded
401 b2023818 Luiz Capitulino
#
402 b2023818 Luiz Capitulino
# @failed: The last I/O operation has failed
403 b2023818 Luiz Capitulino
#
404 b2023818 Luiz Capitulino
# @nospace: The last I/O operation has failed due to a no-space condition
405 b2023818 Luiz Capitulino
#
406 b2023818 Luiz Capitulino
# Since: 1.0
407 b2023818 Luiz Capitulino
##
408 b2023818 Luiz Capitulino
{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
409 b2023818 Luiz Capitulino
410 b2023818 Luiz Capitulino
##
411 b2023818 Luiz Capitulino
# @BlockInfo:
412 b2023818 Luiz Capitulino
#
413 b2023818 Luiz Capitulino
# Block device information.  This structure describes a virtual device and
414 b2023818 Luiz Capitulino
# the backing device associated with it.
415 b2023818 Luiz Capitulino
#
416 b2023818 Luiz Capitulino
# @device: The device name associated with the virtual device.
417 b2023818 Luiz Capitulino
#
418 b2023818 Luiz Capitulino
# @type: This field is returned only for compatibility reasons, it should
419 b2023818 Luiz Capitulino
#        not be used (always returns 'unknown')
420 b2023818 Luiz Capitulino
#
421 b2023818 Luiz Capitulino
# @removable: True if the device supports removable media.
422 b2023818 Luiz Capitulino
#
423 b2023818 Luiz Capitulino
# @locked: True if the guest has locked this device from having its media
424 b2023818 Luiz Capitulino
#          removed
425 b2023818 Luiz Capitulino
#
426 b2023818 Luiz Capitulino
# @tray_open: #optional True if the device has a tray and it is open
427 b2023818 Luiz Capitulino
#             (only present if removable is true)
428 b2023818 Luiz Capitulino
#
429 b2023818 Luiz Capitulino
# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
430 b2023818 Luiz Capitulino
#             supports it and the VM is configured to stop on errors
431 b2023818 Luiz Capitulino
#
432 b2023818 Luiz Capitulino
# @inserted: #optional @BlockDeviceInfo describing the device if media is
433 b2023818 Luiz Capitulino
#            present
434 b2023818 Luiz Capitulino
#
435 b2023818 Luiz Capitulino
# Since:  0.14.0
436 b2023818 Luiz Capitulino
##
437 b2023818 Luiz Capitulino
{ 'type': 'BlockInfo',
438 b2023818 Luiz Capitulino
  'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
439 b2023818 Luiz Capitulino
           'locked': 'bool', '*inserted': 'BlockDeviceInfo',
440 b2023818 Luiz Capitulino
           '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
441 b2023818 Luiz Capitulino
442 b2023818 Luiz Capitulino
##
443 b2023818 Luiz Capitulino
# @query-block:
444 b2023818 Luiz Capitulino
#
445 b2023818 Luiz Capitulino
# Get a list of BlockInfo for all virtual block devices.
446 b2023818 Luiz Capitulino
#
447 b2023818 Luiz Capitulino
# Returns: a list of @BlockInfo describing each virtual block device
448 b2023818 Luiz Capitulino
#
449 b2023818 Luiz Capitulino
# Since: 0.14.0
450 b2023818 Luiz Capitulino
##
451 b2023818 Luiz Capitulino
{ 'command': 'query-block', 'returns': ['BlockInfo'] }
452 b2023818 Luiz Capitulino
453 b2023818 Luiz Capitulino
##
454 f11f57e4 Luiz Capitulino
# @BlockDeviceStats:
455 f11f57e4 Luiz Capitulino
#
456 f11f57e4 Luiz Capitulino
# Statistics of a virtual block device or a block backing device.
457 f11f57e4 Luiz Capitulino
#
458 f11f57e4 Luiz Capitulino
# @rd_bytes:      The number of bytes read by the device.
459 f11f57e4 Luiz Capitulino
#
460 f11f57e4 Luiz Capitulino
# @wr_bytes:      The number of bytes written by the device.
461 f11f57e4 Luiz Capitulino
#
462 f11f57e4 Luiz Capitulino
# @rd_operations: The number of read operations performed by the device.
463 f11f57e4 Luiz Capitulino
#
464 f11f57e4 Luiz Capitulino
# @wr_operations: The number of write operations performed by the device.
465 f11f57e4 Luiz Capitulino
#
466 f11f57e4 Luiz Capitulino
# @flush_operations: The number of cache flush operations performed by the
467 f11f57e4 Luiz Capitulino
#                    device (since 0.15.0)
468 f11f57e4 Luiz Capitulino
#
469 f11f57e4 Luiz Capitulino
# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
470 f11f57e4 Luiz Capitulino
#                       (since 0.15.0).
471 f11f57e4 Luiz Capitulino
#
472 f11f57e4 Luiz Capitulino
# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
473 f11f57e4 Luiz Capitulino
#
474 f11f57e4 Luiz Capitulino
# @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
475 f11f57e4 Luiz Capitulino
#
476 f11f57e4 Luiz Capitulino
# @wr_highest_offset: The offset after the greatest byte written to the
477 f11f57e4 Luiz Capitulino
#                     device.  The intended use of this information is for
478 f11f57e4 Luiz Capitulino
#                     growable sparse files (like qcow2) that are used on top
479 f11f57e4 Luiz Capitulino
#                     of a physical device.
480 f11f57e4 Luiz Capitulino
#
481 f11f57e4 Luiz Capitulino
# Since: 0.14.0
482 f11f57e4 Luiz Capitulino
##
483 f11f57e4 Luiz Capitulino
{ 'type': 'BlockDeviceStats',
484 f11f57e4 Luiz Capitulino
  'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
485 f11f57e4 Luiz Capitulino
           'wr_operations': 'int', 'flush_operations': 'int',
486 f11f57e4 Luiz Capitulino
           'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
487 f11f57e4 Luiz Capitulino
           'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
488 f11f57e4 Luiz Capitulino
489 f11f57e4 Luiz Capitulino
##
490 f11f57e4 Luiz Capitulino
# @BlockStats:
491 f11f57e4 Luiz Capitulino
#
492 f11f57e4 Luiz Capitulino
# Statistics of a virtual block device or a block backing device.
493 f11f57e4 Luiz Capitulino
#
494 f11f57e4 Luiz Capitulino
# @device: #optional If the stats are for a virtual block device, the name
495 f11f57e4 Luiz Capitulino
#          corresponding to the virtual block device.
496 f11f57e4 Luiz Capitulino
#
497 f11f57e4 Luiz Capitulino
# @stats:  A @BlockDeviceStats for the device.
498 f11f57e4 Luiz Capitulino
#
499 f11f57e4 Luiz Capitulino
# @parent: #optional This may point to the backing block device if this is a
500 f11f57e4 Luiz Capitulino
#          a virtual block device.  If it's a backing block, this will point
501 f11f57e4 Luiz Capitulino
#          to the backing file is one is present.
502 f11f57e4 Luiz Capitulino
#
503 f11f57e4 Luiz Capitulino
# Since: 0.14.0
504 f11f57e4 Luiz Capitulino
##
505 f11f57e4 Luiz Capitulino
{ 'type': 'BlockStats',
506 f11f57e4 Luiz Capitulino
  'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
507 f11f57e4 Luiz Capitulino
           '*parent': 'BlockStats'} }
508 f11f57e4 Luiz Capitulino
509 f11f57e4 Luiz Capitulino
##
510 f11f57e4 Luiz Capitulino
# @query-blockstats:
511 f11f57e4 Luiz Capitulino
#
512 f11f57e4 Luiz Capitulino
# Query the @BlockStats for all virtual block devices.
513 f11f57e4 Luiz Capitulino
#
514 f11f57e4 Luiz Capitulino
# Returns: A list of @BlockStats for each virtual block devices.
515 f11f57e4 Luiz Capitulino
#
516 f11f57e4 Luiz Capitulino
# Since: 0.14.0
517 f11f57e4 Luiz Capitulino
##
518 f11f57e4 Luiz Capitulino
{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
519 f11f57e4 Luiz Capitulino
520 f11f57e4 Luiz Capitulino
##
521 2b54aa87 Luiz Capitulino
# @VncClientInfo:
522 2b54aa87 Luiz Capitulino
#
523 2b54aa87 Luiz Capitulino
# Information about a connected VNC client.
524 2b54aa87 Luiz Capitulino
#
525 2b54aa87 Luiz Capitulino
# @host: The host name of the client.  QEMU tries to resolve this to a DNS name
526 2b54aa87 Luiz Capitulino
#        when possible.
527 2b54aa87 Luiz Capitulino
#
528 2b54aa87 Luiz Capitulino
# @family: 'ipv6' if the client is connected via IPv6 and TCP
529 2b54aa87 Luiz Capitulino
#          'ipv4' if the client is connected via IPv4 and TCP
530 2b54aa87 Luiz Capitulino
#          'unix' if the client is connected via a unix domain socket
531 2b54aa87 Luiz Capitulino
#          'unknown' otherwise
532 2b54aa87 Luiz Capitulino
#
533 2b54aa87 Luiz Capitulino
# @service: The service name of the client's port.  This may depends on the
534 2b54aa87 Luiz Capitulino
#           host system's service database so symbolic names should not be
535 2b54aa87 Luiz Capitulino
#           relied on.
536 2b54aa87 Luiz Capitulino
#
537 2b54aa87 Luiz Capitulino
# @x509_dname: #optional If x509 authentication is in use, the Distinguished
538 2b54aa87 Luiz Capitulino
#              Name of the client.
539 2b54aa87 Luiz Capitulino
#
540 2b54aa87 Luiz Capitulino
# @sasl_username: #optional If SASL authentication is in use, the SASL username
541 2b54aa87 Luiz Capitulino
#                 used for authentication.
542 2b54aa87 Luiz Capitulino
#
543 2b54aa87 Luiz Capitulino
# Since: 0.14.0
544 2b54aa87 Luiz Capitulino
##
545 2b54aa87 Luiz Capitulino
{ 'type': 'VncClientInfo',
546 2b54aa87 Luiz Capitulino
  'data': {'host': 'str', 'family': 'str', 'service': 'str',
547 2b54aa87 Luiz Capitulino
           '*x509_dname': 'str', '*sasl_username': 'str'} }
548 2b54aa87 Luiz Capitulino
549 2b54aa87 Luiz Capitulino
##
550 2b54aa87 Luiz Capitulino
# @VncInfo:
551 2b54aa87 Luiz Capitulino
#
552 2b54aa87 Luiz Capitulino
# Information about the VNC session.
553 2b54aa87 Luiz Capitulino
#
554 2b54aa87 Luiz Capitulino
# @enabled: true if the VNC server is enabled, false otherwise
555 2b54aa87 Luiz Capitulino
#
556 2b54aa87 Luiz Capitulino
# @host: #optional The hostname the VNC server is bound to.  This depends on
557 2b54aa87 Luiz Capitulino
#        the name resolution on the host and may be an IP address.
558 2b54aa87 Luiz Capitulino
#
559 2b54aa87 Luiz Capitulino
# @family: #optional 'ipv6' if the host is listening for IPv6 connections
560 2b54aa87 Luiz Capitulino
#                    'ipv4' if the host is listening for IPv4 connections
561 2b54aa87 Luiz Capitulino
#                    'unix' if the host is listening on a unix domain socket
562 2b54aa87 Luiz Capitulino
#                    'unknown' otherwise
563 2b54aa87 Luiz Capitulino
#
564 2b54aa87 Luiz Capitulino
# @service: #optional The service name of the server's port.  This may depends
565 2b54aa87 Luiz Capitulino
#           on the host system's service database so symbolic names should not
566 2b54aa87 Luiz Capitulino
#           be relied on.
567 2b54aa87 Luiz Capitulino
#
568 2b54aa87 Luiz Capitulino
# @auth: #optional the current authentication type used by the server
569 2b54aa87 Luiz Capitulino
#        'none' if no authentication is being used
570 2b54aa87 Luiz Capitulino
#        'vnc' if VNC authentication is being used
571 2b54aa87 Luiz Capitulino
#        'vencrypt+plain' if VEncrypt is used with plain text authentication
572 2b54aa87 Luiz Capitulino
#        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
573 2b54aa87 Luiz Capitulino
#        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
574 2b54aa87 Luiz Capitulino
#        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
575 2b54aa87 Luiz Capitulino
#        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
576 2b54aa87 Luiz Capitulino
#        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
577 2b54aa87 Luiz Capitulino
#        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
578 2b54aa87 Luiz Capitulino
#        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
579 2b54aa87 Luiz Capitulino
#        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
580 2b54aa87 Luiz Capitulino
#
581 2b54aa87 Luiz Capitulino
# @clients: a list of @VncClientInfo of all currently connected clients
582 2b54aa87 Luiz Capitulino
#
583 2b54aa87 Luiz Capitulino
# Since: 0.14.0
584 2b54aa87 Luiz Capitulino
##
585 2b54aa87 Luiz Capitulino
{ 'type': 'VncInfo',
586 2b54aa87 Luiz Capitulino
  'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
587 2b54aa87 Luiz Capitulino
           '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
588 2b54aa87 Luiz Capitulino
589 2b54aa87 Luiz Capitulino
##
590 2b54aa87 Luiz Capitulino
# @query-vnc:
591 2b54aa87 Luiz Capitulino
#
592 2b54aa87 Luiz Capitulino
# Returns information about the current VNC server
593 2b54aa87 Luiz Capitulino
#
594 2b54aa87 Luiz Capitulino
# Returns: @VncInfo
595 2b54aa87 Luiz Capitulino
#          If VNC support is not compiled in, FeatureDisabled
596 2b54aa87 Luiz Capitulino
#
597 2b54aa87 Luiz Capitulino
# Since: 0.14.0
598 2b54aa87 Luiz Capitulino
##
599 2b54aa87 Luiz Capitulino
{ 'command': 'query-vnc', 'returns': 'VncInfo' }
600 2b54aa87 Luiz Capitulino
601 2b54aa87 Luiz Capitulino
##
602 d1f29646 Luiz Capitulino
# @SpiceChannel
603 d1f29646 Luiz Capitulino
#
604 d1f29646 Luiz Capitulino
# Information about a SPICE client channel.
605 d1f29646 Luiz Capitulino
#
606 d1f29646 Luiz Capitulino
# @host: The host name of the client.  QEMU tries to resolve this to a DNS name
607 d1f29646 Luiz Capitulino
#        when possible.
608 d1f29646 Luiz Capitulino
#
609 d1f29646 Luiz Capitulino
# @family: 'ipv6' if the client is connected via IPv6 and TCP
610 d1f29646 Luiz Capitulino
#          'ipv4' if the client is connected via IPv4 and TCP
611 d1f29646 Luiz Capitulino
#          'unix' if the client is connected via a unix domain socket
612 d1f29646 Luiz Capitulino
#          'unknown' otherwise
613 d1f29646 Luiz Capitulino
#
614 d1f29646 Luiz Capitulino
# @port: The client's port number.
615 d1f29646 Luiz Capitulino
#
616 d1f29646 Luiz Capitulino
# @connection-id: SPICE connection id number.  All channels with the same id
617 d1f29646 Luiz Capitulino
#                 belong to the same SPICE session.
618 d1f29646 Luiz Capitulino
#
619 419e1bdf Alon Levy
# @connection-type: SPICE channel type number.  "1" is the main control
620 419e1bdf Alon Levy
#                   channel, filter for this one if you want to track spice
621 419e1bdf Alon Levy
#                   sessions only
622 d1f29646 Luiz Capitulino
#
623 419e1bdf Alon Levy
# @channel-id: SPICE channel ID number.  Usually "0", might be different when
624 419e1bdf Alon Levy
#              multiple channels of the same type exist, such as multiple
625 d1f29646 Luiz Capitulino
#              display channels in a multihead setup
626 d1f29646 Luiz Capitulino
#
627 d1f29646 Luiz Capitulino
# @tls: true if the channel is encrypted, false otherwise.
628 d1f29646 Luiz Capitulino
#
629 d1f29646 Luiz Capitulino
# Since: 0.14.0
630 d1f29646 Luiz Capitulino
##
631 d1f29646 Luiz Capitulino
{ 'type': 'SpiceChannel',
632 d1f29646 Luiz Capitulino
  'data': {'host': 'str', 'family': 'str', 'port': 'str',
633 d1f29646 Luiz Capitulino
           'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
634 d1f29646 Luiz Capitulino
           'tls': 'bool'} }
635 d1f29646 Luiz Capitulino
636 d1f29646 Luiz Capitulino
##
637 d1f29646 Luiz Capitulino
# @SpiceInfo
638 d1f29646 Luiz Capitulino
#
639 d1f29646 Luiz Capitulino
# Information about the SPICE session.
640 d1f29646 Luiz Capitulino
# 
641 d1f29646 Luiz Capitulino
# @enabled: true if the SPICE server is enabled, false otherwise
642 d1f29646 Luiz Capitulino
#
643 d1f29646 Luiz Capitulino
# @host: #optional The hostname the SPICE server is bound to.  This depends on
644 d1f29646 Luiz Capitulino
#        the name resolution on the host and may be an IP address.
645 d1f29646 Luiz Capitulino
#
646 d1f29646 Luiz Capitulino
# @port: #optional The SPICE server's port number.
647 d1f29646 Luiz Capitulino
#
648 d1f29646 Luiz Capitulino
# @compiled-version: #optional SPICE server version.
649 d1f29646 Luiz Capitulino
#
650 d1f29646 Luiz Capitulino
# @tls-port: #optional The SPICE server's TLS port number.
651 d1f29646 Luiz Capitulino
#
652 d1f29646 Luiz Capitulino
# @auth: #optional the current authentication type used by the server
653 419e1bdf Alon Levy
#        'none'  if no authentication is being used
654 419e1bdf Alon Levy
#        'spice' uses SASL or direct TLS authentication, depending on command
655 419e1bdf Alon Levy
#                line options
656 d1f29646 Luiz Capitulino
#
657 d1f29646 Luiz Capitulino
# @channels: a list of @SpiceChannel for each active spice channel
658 d1f29646 Luiz Capitulino
#
659 d1f29646 Luiz Capitulino
# Since: 0.14.0
660 d1f29646 Luiz Capitulino
##
661 d1f29646 Luiz Capitulino
{ 'type': 'SpiceInfo',
662 d1f29646 Luiz Capitulino
  'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
663 d1f29646 Luiz Capitulino
           '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
664 d1f29646 Luiz Capitulino
           '*channels': ['SpiceChannel']} }
665 d1f29646 Luiz Capitulino
666 d1f29646 Luiz Capitulino
##
667 d1f29646 Luiz Capitulino
# @query-spice
668 d1f29646 Luiz Capitulino
#
669 d1f29646 Luiz Capitulino
# Returns information about the current SPICE server
670 d1f29646 Luiz Capitulino
#
671 d1f29646 Luiz Capitulino
# Returns: @SpiceInfo
672 d1f29646 Luiz Capitulino
#
673 d1f29646 Luiz Capitulino
# Since: 0.14.0
674 d1f29646 Luiz Capitulino
##
675 d1f29646 Luiz Capitulino
{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
676 d1f29646 Luiz Capitulino
677 d1f29646 Luiz Capitulino
##
678 96637bcd Luiz Capitulino
# @BalloonInfo:
679 96637bcd Luiz Capitulino
#
680 96637bcd Luiz Capitulino
# Information about the guest balloon device.
681 96637bcd Luiz Capitulino
#
682 96637bcd Luiz Capitulino
# @actual: the number of bytes the balloon currently contains
683 96637bcd Luiz Capitulino
#
684 96637bcd Luiz Capitulino
# @mem_swapped_in: #optional number of pages swapped in within the guest
685 96637bcd Luiz Capitulino
#
686 96637bcd Luiz Capitulino
# @mem_swapped_out: #optional number of pages swapped out within the guest
687 96637bcd Luiz Capitulino
#
688 96637bcd Luiz Capitulino
# @major_page_faults: #optional number of major page faults within the guest
689 96637bcd Luiz Capitulino
#
690 96637bcd Luiz Capitulino
# @minor_page_faults: #optional number of minor page faults within the guest
691 96637bcd Luiz Capitulino
#
692 96637bcd Luiz Capitulino
# @free_mem: #optional amount of memory (in bytes) free in the guest
693 96637bcd Luiz Capitulino
#
694 96637bcd Luiz Capitulino
# @total_mem: #optional amount of memory (in bytes) visible to the guest
695 96637bcd Luiz Capitulino
#
696 96637bcd Luiz Capitulino
# Since: 0.14.0
697 96637bcd Luiz Capitulino
#
698 96637bcd Luiz Capitulino
# Notes: all current versions of QEMU do not fill out optional information in
699 96637bcd Luiz Capitulino
#        this structure.
700 96637bcd Luiz Capitulino
##
701 96637bcd Luiz Capitulino
{ 'type': 'BalloonInfo',
702 96637bcd Luiz Capitulino
  'data': {'actual': 'int', '*mem_swapped_in': 'int',
703 96637bcd Luiz Capitulino
           '*mem_swapped_out': 'int', '*major_page_faults': 'int',
704 96637bcd Luiz Capitulino
           '*minor_page_faults': 'int', '*free_mem': 'int',
705 96637bcd Luiz Capitulino
           '*total_mem': 'int'} }
706 96637bcd Luiz Capitulino
707 96637bcd Luiz Capitulino
##
708 96637bcd Luiz Capitulino
# @query-balloon:
709 96637bcd Luiz Capitulino
#
710 96637bcd Luiz Capitulino
# Return information about the balloon device.
711 96637bcd Luiz Capitulino
#
712 96637bcd Luiz Capitulino
# Returns: @BalloonInfo on success
713 96637bcd Luiz Capitulino
#          If the balloon driver is enabled but not functional because the KVM
714 96637bcd Luiz Capitulino
#          kernel module cannot support it, KvmMissingCap
715 96637bcd Luiz Capitulino
#          If no balloon device is present, DeviceNotActive
716 96637bcd Luiz Capitulino
#
717 96637bcd Luiz Capitulino
# Since: 0.14.0
718 96637bcd Luiz Capitulino
##
719 96637bcd Luiz Capitulino
{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
720 96637bcd Luiz Capitulino
721 96637bcd Luiz Capitulino
##
722 79627472 Luiz Capitulino
# @PciMemoryRange:
723 79627472 Luiz Capitulino
#
724 79627472 Luiz Capitulino
# A PCI device memory region
725 79627472 Luiz Capitulino
#
726 79627472 Luiz Capitulino
# @base: the starting address (guest physical)
727 79627472 Luiz Capitulino
#
728 79627472 Luiz Capitulino
# @limit: the ending address (guest physical)
729 79627472 Luiz Capitulino
#
730 79627472 Luiz Capitulino
# Since: 0.14.0
731 79627472 Luiz Capitulino
##
732 79627472 Luiz Capitulino
{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
733 79627472 Luiz Capitulino
734 79627472 Luiz Capitulino
##
735 79627472 Luiz Capitulino
# @PciMemoryRegion
736 79627472 Luiz Capitulino
#
737 79627472 Luiz Capitulino
# Information about a PCI device I/O region.
738 79627472 Luiz Capitulino
#
739 79627472 Luiz Capitulino
# @bar: the index of the Base Address Register for this region
740 79627472 Luiz Capitulino
#
741 79627472 Luiz Capitulino
# @type: 'io' if the region is a PIO region
742 79627472 Luiz Capitulino
#        'memory' if the region is a MMIO region
743 79627472 Luiz Capitulino
#
744 79627472 Luiz Capitulino
# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
745 79627472 Luiz Capitulino
#
746 79627472 Luiz Capitulino
# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
747 79627472 Luiz Capitulino
#
748 79627472 Luiz Capitulino
# Since: 0.14.0
749 79627472 Luiz Capitulino
##
750 79627472 Luiz Capitulino
{ 'type': 'PciMemoryRegion',
751 79627472 Luiz Capitulino
  'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
752 79627472 Luiz Capitulino
           '*prefetch': 'bool', '*mem_type_64': 'bool' } }
753 79627472 Luiz Capitulino
754 79627472 Luiz Capitulino
##
755 79627472 Luiz Capitulino
# @PciBridgeInfo:
756 79627472 Luiz Capitulino
#
757 79627472 Luiz Capitulino
# Information about a PCI Bridge device
758 79627472 Luiz Capitulino
#
759 79627472 Luiz Capitulino
# @bus.number: primary bus interface number.  This should be the number of the
760 79627472 Luiz Capitulino
#              bus the device resides on.
761 79627472 Luiz Capitulino
#
762 79627472 Luiz Capitulino
# @bus.secondary: secondary bus interface number.  This is the number of the
763 79627472 Luiz Capitulino
#                 main bus for the bridge
764 79627472 Luiz Capitulino
#
765 79627472 Luiz Capitulino
# @bus.subordinate: This is the highest number bus that resides below the
766 79627472 Luiz Capitulino
#                   bridge.
767 79627472 Luiz Capitulino
#
768 79627472 Luiz Capitulino
# @bus.io_range: The PIO range for all devices on this bridge
769 79627472 Luiz Capitulino
#
770 79627472 Luiz Capitulino
# @bus.memory_range: The MMIO range for all devices on this bridge
771 79627472 Luiz Capitulino
#
772 79627472 Luiz Capitulino
# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
773 79627472 Luiz Capitulino
#                          this bridge
774 79627472 Luiz Capitulino
#
775 79627472 Luiz Capitulino
# @devices: a list of @PciDeviceInfo for each device on this bridge
776 79627472 Luiz Capitulino
#
777 79627472 Luiz Capitulino
# Since: 0.14.0
778 79627472 Luiz Capitulino
##
779 79627472 Luiz Capitulino
{ 'type': 'PciBridgeInfo',
780 79627472 Luiz Capitulino
  'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
781 79627472 Luiz Capitulino
                    'io_range': 'PciMemoryRange',
782 79627472 Luiz Capitulino
                    'memory_range': 'PciMemoryRange',
783 79627472 Luiz Capitulino
                    'prefetchable_range': 'PciMemoryRange' },
784 79627472 Luiz Capitulino
           '*devices': ['PciDeviceInfo']} }
785 79627472 Luiz Capitulino
786 79627472 Luiz Capitulino
##
787 79627472 Luiz Capitulino
# @PciDeviceInfo:
788 79627472 Luiz Capitulino
#
789 79627472 Luiz Capitulino
# Information about a PCI device
790 79627472 Luiz Capitulino
#
791 79627472 Luiz Capitulino
# @bus: the bus number of the device
792 79627472 Luiz Capitulino
#
793 79627472 Luiz Capitulino
# @slot: the slot the device is located in
794 79627472 Luiz Capitulino
#
795 79627472 Luiz Capitulino
# @function: the function of the slot used by the device
796 79627472 Luiz Capitulino
#
797 79627472 Luiz Capitulino
# @class_info.desc: #optional a string description of the device's class
798 79627472 Luiz Capitulino
#
799 79627472 Luiz Capitulino
# @class_info.class: the class code of the device
800 79627472 Luiz Capitulino
#
801 79627472 Luiz Capitulino
# @id.device: the PCI device id
802 79627472 Luiz Capitulino
#
803 79627472 Luiz Capitulino
# @id.vendor: the PCI vendor id
804 79627472 Luiz Capitulino
#
805 79627472 Luiz Capitulino
# @irq: #optional if an IRQ is assigned to the device, the IRQ number
806 79627472 Luiz Capitulino
#
807 79627472 Luiz Capitulino
# @qdev_id: the device name of the PCI device
808 79627472 Luiz Capitulino
#
809 79627472 Luiz Capitulino
# @pci_bridge: if the device is a PCI bridge, the bridge information
810 79627472 Luiz Capitulino
#
811 79627472 Luiz Capitulino
# @regions: a list of the PCI I/O regions associated with the device
812 79627472 Luiz Capitulino
#
813 79627472 Luiz Capitulino
# Notes: the contents of @class_info.desc are not stable and should only be
814 79627472 Luiz Capitulino
#        treated as informational.
815 79627472 Luiz Capitulino
#
816 79627472 Luiz Capitulino
# Since: 0.14.0
817 79627472 Luiz Capitulino
##
818 79627472 Luiz Capitulino
{ 'type': 'PciDeviceInfo',
819 79627472 Luiz Capitulino
  'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
820 79627472 Luiz Capitulino
           'class_info': {'*desc': 'str', 'class': 'int'},
821 79627472 Luiz Capitulino
           'id': {'device': 'int', 'vendor': 'int'},
822 79627472 Luiz Capitulino
           '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
823 79627472 Luiz Capitulino
           'regions': ['PciMemoryRegion']} }
824 79627472 Luiz Capitulino
825 79627472 Luiz Capitulino
##
826 79627472 Luiz Capitulino
# @PciInfo:
827 79627472 Luiz Capitulino
#
828 79627472 Luiz Capitulino
# Information about a PCI bus
829 79627472 Luiz Capitulino
#
830 79627472 Luiz Capitulino
# @bus: the bus index
831 79627472 Luiz Capitulino
#
832 79627472 Luiz Capitulino
# @devices: a list of devices on this bus
833 79627472 Luiz Capitulino
#
834 79627472 Luiz Capitulino
# Since: 0.14.0
835 79627472 Luiz Capitulino
##
836 79627472 Luiz Capitulino
{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
837 79627472 Luiz Capitulino
838 79627472 Luiz Capitulino
##
839 79627472 Luiz Capitulino
# @query-pci:
840 79627472 Luiz Capitulino
#
841 79627472 Luiz Capitulino
# Return information about the PCI bus topology of the guest.
842 79627472 Luiz Capitulino
#
843 79627472 Luiz Capitulino
# Returns: a list of @PciInfo for each PCI bus
844 79627472 Luiz Capitulino
#
845 79627472 Luiz Capitulino
# Since: 0.14.0
846 79627472 Luiz Capitulino
##
847 79627472 Luiz Capitulino
{ 'command': 'query-pci', 'returns': ['PciInfo'] }
848 79627472 Luiz Capitulino
849 79627472 Luiz Capitulino
##
850 fb5458cd Stefan Hajnoczi
# @BlockJobInfo:
851 fb5458cd Stefan Hajnoczi
#
852 fb5458cd Stefan Hajnoczi
# Information about a long-running block device operation.
853 fb5458cd Stefan Hajnoczi
#
854 fb5458cd Stefan Hajnoczi
# @type: the job type ('stream' for image streaming)
855 fb5458cd Stefan Hajnoczi
#
856 fb5458cd Stefan Hajnoczi
# @device: the block device name
857 fb5458cd Stefan Hajnoczi
#
858 fb5458cd Stefan Hajnoczi
# @len: the maximum progress value
859 fb5458cd Stefan Hajnoczi
#
860 fb5458cd Stefan Hajnoczi
# @offset: the current progress value
861 fb5458cd Stefan Hajnoczi
#
862 fb5458cd Stefan Hajnoczi
# @speed: the rate limit, bytes per second
863 fb5458cd Stefan Hajnoczi
#
864 fb5458cd Stefan Hajnoczi
# Since: 1.1
865 fb5458cd Stefan Hajnoczi
##
866 fb5458cd Stefan Hajnoczi
{ 'type': 'BlockJobInfo',
867 fb5458cd Stefan Hajnoczi
  'data': {'type': 'str', 'device': 'str', 'len': 'int',
868 fb5458cd Stefan Hajnoczi
           'offset': 'int', 'speed': 'int'} }
869 fb5458cd Stefan Hajnoczi
870 fb5458cd Stefan Hajnoczi
##
871 fb5458cd Stefan Hajnoczi
# @query-block-jobs:
872 fb5458cd Stefan Hajnoczi
#
873 fb5458cd Stefan Hajnoczi
# Return information about long-running block device operations.
874 fb5458cd Stefan Hajnoczi
#
875 fb5458cd Stefan Hajnoczi
# Returns: a list of @BlockJobInfo for each active block job
876 fb5458cd Stefan Hajnoczi
#
877 fb5458cd Stefan Hajnoczi
# Since: 1.1
878 fb5458cd Stefan Hajnoczi
##
879 fb5458cd Stefan Hajnoczi
{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
880 fb5458cd Stefan Hajnoczi
881 fb5458cd Stefan Hajnoczi
##
882 7a7f325e Luiz Capitulino
# @quit:
883 7a7f325e Luiz Capitulino
#
884 7a7f325e Luiz Capitulino
# This command will cause the QEMU process to exit gracefully.  While every
885 7a7f325e Luiz Capitulino
# attempt is made to send the QMP response before terminating, this is not
886 7a7f325e Luiz Capitulino
# guaranteed.  When using this interface, a premature EOF would not be
887 7a7f325e Luiz Capitulino
# unexpected.
888 7a7f325e Luiz Capitulino
#
889 7a7f325e Luiz Capitulino
# Since: 0.14.0
890 7a7f325e Luiz Capitulino
##
891 7a7f325e Luiz Capitulino
{ 'command': 'quit' }
892 5f158f21 Luiz Capitulino
893 5f158f21 Luiz Capitulino
##
894 5f158f21 Luiz Capitulino
# @stop:
895 5f158f21 Luiz Capitulino
#
896 5f158f21 Luiz Capitulino
# Stop all guest VCPU execution.
897 5f158f21 Luiz Capitulino
#
898 5f158f21 Luiz Capitulino
# Since:  0.14.0
899 5f158f21 Luiz Capitulino
#
900 5f158f21 Luiz Capitulino
# Notes:  This function will succeed even if the guest is already in the stopped
901 5f158f21 Luiz Capitulino
#         state
902 5f158f21 Luiz Capitulino
##
903 5f158f21 Luiz Capitulino
{ 'command': 'stop' }
904 38d22653 Luiz Capitulino
905 38d22653 Luiz Capitulino
##
906 38d22653 Luiz Capitulino
# @system_reset:
907 38d22653 Luiz Capitulino
#
908 38d22653 Luiz Capitulino
# Performs a hard reset of a guest.
909 38d22653 Luiz Capitulino
#
910 38d22653 Luiz Capitulino
# Since: 0.14.0
911 38d22653 Luiz Capitulino
##
912 38d22653 Luiz Capitulino
{ 'command': 'system_reset' }
913 5bc465e4 Luiz Capitulino
914 5bc465e4 Luiz Capitulino
##
915 5bc465e4 Luiz Capitulino
# @system_powerdown:
916 5bc465e4 Luiz Capitulino
#
917 5bc465e4 Luiz Capitulino
# Requests that a guest perform a powerdown operation.
918 5bc465e4 Luiz Capitulino
#
919 5bc465e4 Luiz Capitulino
# Since: 0.14.0
920 5bc465e4 Luiz Capitulino
#
921 5bc465e4 Luiz Capitulino
# Notes: A guest may or may not respond to this command.  This command
922 5bc465e4 Luiz Capitulino
#        returning does not indicate that a guest has accepted the request or
923 5bc465e4 Luiz Capitulino
#        that it has shut down.  Many guests will respond to this command by
924 5bc465e4 Luiz Capitulino
#        prompting the user in some way.
925 5bc465e4 Luiz Capitulino
##
926 5bc465e4 Luiz Capitulino
{ 'command': 'system_powerdown' }
927 755f1968 Luiz Capitulino
928 755f1968 Luiz Capitulino
##
929 755f1968 Luiz Capitulino
# @cpu:
930 755f1968 Luiz Capitulino
#
931 755f1968 Luiz Capitulino
# This command is a nop that is only provided for the purposes of compatibility.
932 755f1968 Luiz Capitulino
#
933 755f1968 Luiz Capitulino
# Since: 0.14.0
934 755f1968 Luiz Capitulino
#
935 755f1968 Luiz Capitulino
# Notes: Do not use this command.
936 755f1968 Luiz Capitulino
##
937 755f1968 Luiz Capitulino
{ 'command': 'cpu', 'data': {'index': 'int'} }
938 0cfd6a9a Luiz Capitulino
939 0cfd6a9a Luiz Capitulino
##
940 0cfd6a9a Luiz Capitulino
# @memsave:
941 0cfd6a9a Luiz Capitulino
#
942 0cfd6a9a Luiz Capitulino
# Save a portion of guest memory to a file.
943 0cfd6a9a Luiz Capitulino
#
944 0cfd6a9a Luiz Capitulino
# @val: the virtual address of the guest to start from
945 0cfd6a9a Luiz Capitulino
#
946 0cfd6a9a Luiz Capitulino
# @size: the size of memory region to save
947 0cfd6a9a Luiz Capitulino
#
948 0cfd6a9a Luiz Capitulino
# @filename: the file to save the memory to as binary data
949 0cfd6a9a Luiz Capitulino
#
950 0cfd6a9a Luiz Capitulino
# @cpu-index: #optional the index of the virtual CPU to use for translating the
951 0cfd6a9a Luiz Capitulino
#                       virtual address (defaults to CPU 0)
952 0cfd6a9a Luiz Capitulino
#
953 0cfd6a9a Luiz Capitulino
# Returns: Nothing on success
954 0cfd6a9a Luiz Capitulino
#          If @cpu is not a valid VCPU, InvalidParameterValue
955 0cfd6a9a Luiz Capitulino
#          If @filename cannot be opened, OpenFileFailed
956 0cfd6a9a Luiz Capitulino
#          If an I/O error occurs while writing the file, IOError
957 0cfd6a9a Luiz Capitulino
#
958 0cfd6a9a Luiz Capitulino
# Since: 0.14.0
959 0cfd6a9a Luiz Capitulino
#
960 0cfd6a9a Luiz Capitulino
# Notes: Errors were not reliably returned until 1.1
961 0cfd6a9a Luiz Capitulino
##
962 0cfd6a9a Luiz Capitulino
{ 'command': 'memsave',
963 0cfd6a9a Luiz Capitulino
  'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
964 6d3962bf Luiz Capitulino
965 6d3962bf Luiz Capitulino
##
966 6d3962bf Luiz Capitulino
# @pmemsave:
967 6d3962bf Luiz Capitulino
#
968 6d3962bf Luiz Capitulino
# Save a portion of guest physical memory to a file.
969 6d3962bf Luiz Capitulino
#
970 6d3962bf Luiz Capitulino
# @val: the physical address of the guest to start from
971 6d3962bf Luiz Capitulino
#
972 6d3962bf Luiz Capitulino
# @size: the size of memory region to save
973 6d3962bf Luiz Capitulino
#
974 6d3962bf Luiz Capitulino
# @filename: the file to save the memory to as binary data
975 6d3962bf Luiz Capitulino
#
976 6d3962bf Luiz Capitulino
# Returns: Nothing on success
977 6d3962bf Luiz Capitulino
#          If @filename cannot be opened, OpenFileFailed
978 6d3962bf Luiz Capitulino
#          If an I/O error occurs while writing the file, IOError
979 6d3962bf Luiz Capitulino
#
980 6d3962bf Luiz Capitulino
# Since: 0.14.0
981 6d3962bf Luiz Capitulino
#
982 6d3962bf Luiz Capitulino
# Notes: Errors were not reliably returned until 1.1
983 6d3962bf Luiz Capitulino
##
984 6d3962bf Luiz Capitulino
{ 'command': 'pmemsave',
985 6d3962bf Luiz Capitulino
  'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
986 e42e818b Luiz Capitulino
987 e42e818b Luiz Capitulino
##
988 e42e818b Luiz Capitulino
# @cont:
989 e42e818b Luiz Capitulino
#
990 e42e818b Luiz Capitulino
# Resume guest VCPU execution.
991 e42e818b Luiz Capitulino
#
992 e42e818b Luiz Capitulino
# Since:  0.14.0
993 e42e818b Luiz Capitulino
#
994 e42e818b Luiz Capitulino
# Returns:  If successful, nothing
995 e42e818b Luiz Capitulino
#           If the QEMU is waiting for an incoming migration, MigrationExpected
996 e42e818b Luiz Capitulino
#           If QEMU was started with an encrypted block device and a key has
997 e42e818b Luiz Capitulino
#              not yet been set, DeviceEncrypted.
998 e42e818b Luiz Capitulino
#
999 e42e818b Luiz Capitulino
# Notes:  This command will succeed if the guest is currently running.
1000 e42e818b Luiz Capitulino
##
1001 e42e818b Luiz Capitulino
{ 'command': 'cont' }
1002 e42e818b Luiz Capitulino
1003 ab49ab5c Luiz Capitulino
##
1004 9b9df25a Gerd Hoffmann
# @system_wakeup:
1005 9b9df25a Gerd Hoffmann
#
1006 9b9df25a Gerd Hoffmann
# Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1007 9b9df25a Gerd Hoffmann
#
1008 9b9df25a Gerd Hoffmann
# Since:  1.1
1009 9b9df25a Gerd Hoffmann
#
1010 9b9df25a Gerd Hoffmann
# Returns:  nothing.
1011 9b9df25a Gerd Hoffmann
##
1012 9b9df25a Gerd Hoffmann
{ 'command': 'system_wakeup' }
1013 9b9df25a Gerd Hoffmann
1014 9b9df25a Gerd Hoffmann
##
1015 ab49ab5c Luiz Capitulino
# @inject-nmi:
1016 ab49ab5c Luiz Capitulino
#
1017 ab49ab5c Luiz Capitulino
# Injects an Non-Maskable Interrupt into all guest's VCPUs.
1018 ab49ab5c Luiz Capitulino
#
1019 ab49ab5c Luiz Capitulino
# Returns:  If successful, nothing
1020 ab49ab5c Luiz Capitulino
#           If the Virtual Machine doesn't support NMI injection, Unsupported
1021 ab49ab5c Luiz Capitulino
#
1022 ab49ab5c Luiz Capitulino
# Since:  0.14.0
1023 ab49ab5c Luiz Capitulino
#
1024 ab49ab5c Luiz Capitulino
# Notes: Only x86 Virtual Machines support this command.
1025 ab49ab5c Luiz Capitulino
##
1026 ab49ab5c Luiz Capitulino
{ 'command': 'inject-nmi' }
1027 4b37156c Luiz Capitulino
1028 4b37156c Luiz Capitulino
##
1029 4b37156c Luiz Capitulino
# @set_link:
1030 4b37156c Luiz Capitulino
#
1031 4b37156c Luiz Capitulino
# Sets the link status of a virtual network adapter.
1032 4b37156c Luiz Capitulino
#
1033 4b37156c Luiz Capitulino
# @name: the device name of the virtual network adapter
1034 4b37156c Luiz Capitulino
#
1035 4b37156c Luiz Capitulino
# @up: true to set the link status to be up
1036 4b37156c Luiz Capitulino
#
1037 4b37156c Luiz Capitulino
# Returns: Nothing on success
1038 4b37156c Luiz Capitulino
#          If @name is not a valid network device, DeviceNotFound
1039 4b37156c Luiz Capitulino
#
1040 4b37156c Luiz Capitulino
# Since: 0.14.0
1041 4b37156c Luiz Capitulino
#
1042 4b37156c Luiz Capitulino
# Notes: Not all network adapters support setting link status.  This command
1043 4b37156c Luiz Capitulino
#        will succeed even if the network adapter does not support link status
1044 4b37156c Luiz Capitulino
#        notification.
1045 4b37156c Luiz Capitulino
##
1046 4b37156c Luiz Capitulino
{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1047 a4dea8a9 Luiz Capitulino
1048 a4dea8a9 Luiz Capitulino
##
1049 a4dea8a9 Luiz Capitulino
# @block_passwd:
1050 a4dea8a9 Luiz Capitulino
#
1051 a4dea8a9 Luiz Capitulino
# This command sets the password of a block device that has not been open
1052 a4dea8a9 Luiz Capitulino
# with a password and requires one.
1053 a4dea8a9 Luiz Capitulino
#
1054 a4dea8a9 Luiz Capitulino
# The two cases where this can happen are a block device is created through
1055 a4dea8a9 Luiz Capitulino
# QEMU's initial command line or a block device is changed through the legacy
1056 a4dea8a9 Luiz Capitulino
# @change interface.
1057 a4dea8a9 Luiz Capitulino
#
1058 a4dea8a9 Luiz Capitulino
# In the event that the block device is created through the initial command
1059 a4dea8a9 Luiz Capitulino
# line, the VM will start in the stopped state regardless of whether '-S' is
1060 a4dea8a9 Luiz Capitulino
# used.  The intention is for a management tool to query the block devices to
1061 a4dea8a9 Luiz Capitulino
# determine which ones are encrypted, set the passwords with this command, and
1062 a4dea8a9 Luiz Capitulino
# then start the guest with the @cont command.
1063 a4dea8a9 Luiz Capitulino
#
1064 a4dea8a9 Luiz Capitulino
# @device:   the name of the device to set the password on
1065 a4dea8a9 Luiz Capitulino
#
1066 a4dea8a9 Luiz Capitulino
# @password: the password to use for the device
1067 a4dea8a9 Luiz Capitulino
#
1068 a4dea8a9 Luiz Capitulino
# Returns: nothing on success
1069 a4dea8a9 Luiz Capitulino
#          If @device is not a valid block device, DeviceNotFound
1070 a4dea8a9 Luiz Capitulino
#          If @device is not encrypted, DeviceNotEncrypted
1071 a4dea8a9 Luiz Capitulino
#          If @password is not valid for this device, InvalidPassword
1072 a4dea8a9 Luiz Capitulino
#
1073 a4dea8a9 Luiz Capitulino
# Notes:  Not all block formats support encryption and some that do are not
1074 a4dea8a9 Luiz Capitulino
#         able to validate that a password is correct.  Disk corruption may
1075 a4dea8a9 Luiz Capitulino
#         occur if an invalid password is specified.
1076 a4dea8a9 Luiz Capitulino
#
1077 a4dea8a9 Luiz Capitulino
# Since: 0.14.0
1078 a4dea8a9 Luiz Capitulino
##
1079 a4dea8a9 Luiz Capitulino
{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1080 d72f3264 Luiz Capitulino
1081 d72f3264 Luiz Capitulino
##
1082 d72f3264 Luiz Capitulino
# @balloon:
1083 d72f3264 Luiz Capitulino
#
1084 d72f3264 Luiz Capitulino
# Request the balloon driver to change its balloon size.
1085 d72f3264 Luiz Capitulino
#
1086 d72f3264 Luiz Capitulino
# @value: the target size of the balloon in bytes
1087 d72f3264 Luiz Capitulino
#
1088 d72f3264 Luiz Capitulino
# Returns: Nothing on success
1089 d72f3264 Luiz Capitulino
#          If the balloon driver is enabled but not functional because the KVM
1090 d72f3264 Luiz Capitulino
#            kernel module cannot support it, KvmMissingCap
1091 d72f3264 Luiz Capitulino
#          If no balloon device is present, DeviceNotActive
1092 d72f3264 Luiz Capitulino
#
1093 d72f3264 Luiz Capitulino
# Notes: This command just issues a request to the guest.  When it returns,
1094 d72f3264 Luiz Capitulino
#        the balloon size may not have changed.  A guest can change the balloon
1095 d72f3264 Luiz Capitulino
#        size independent of this command.
1096 d72f3264 Luiz Capitulino
#
1097 d72f3264 Luiz Capitulino
# Since: 0.14.0
1098 d72f3264 Luiz Capitulino
##
1099 d72f3264 Luiz Capitulino
{ 'command': 'balloon', 'data': {'value': 'int'} }
1100 5e7caacb Luiz Capitulino
1101 5e7caacb Luiz Capitulino
##
1102 5e7caacb Luiz Capitulino
# @block_resize
1103 5e7caacb Luiz Capitulino
#
1104 5e7caacb Luiz Capitulino
# Resize a block image while a guest is running.
1105 5e7caacb Luiz Capitulino
#
1106 5e7caacb Luiz Capitulino
# @device:  the name of the device to get the image resized
1107 5e7caacb Luiz Capitulino
#
1108 5e7caacb Luiz Capitulino
# @size:  new image size in bytes
1109 5e7caacb Luiz Capitulino
#
1110 5e7caacb Luiz Capitulino
# Returns: nothing on success
1111 5e7caacb Luiz Capitulino
#          If @device is not a valid block device, DeviceNotFound
1112 939a1cc3 Stefan Hajnoczi
#          If @size is negative, InvalidParameterValue
1113 939a1cc3 Stefan Hajnoczi
#          If the block device has no medium inserted, DeviceHasNoMedium
1114 939a1cc3 Stefan Hajnoczi
#          If the block device does not support resize, Unsupported
1115 939a1cc3 Stefan Hajnoczi
#          If the block device is read-only, DeviceIsReadOnly
1116 939a1cc3 Stefan Hajnoczi
#          If a long-running operation is using the device, DeviceInUse
1117 5e7caacb Luiz Capitulino
#
1118 5e7caacb Luiz Capitulino
# Since: 0.14.0
1119 5e7caacb Luiz Capitulino
##
1120 5e7caacb Luiz Capitulino
{ 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1121 6106e249 Luiz Capitulino
1122 6106e249 Luiz Capitulino
##
1123 bc8b094f Paolo Bonzini
# @NewImageMode
1124 bc8b094f Paolo Bonzini
#
1125 bc8b094f Paolo Bonzini
# An enumeration that tells QEMU how to set the backing file path in
1126 bc8b094f Paolo Bonzini
# a new image file.
1127 bc8b094f Paolo Bonzini
#
1128 bc8b094f Paolo Bonzini
# @existing: QEMU should look for an existing image file.
1129 bc8b094f Paolo Bonzini
#
1130 bc8b094f Paolo Bonzini
# @absolute-paths: QEMU should create a new image with absolute paths
1131 bc8b094f Paolo Bonzini
# for the backing file.
1132 bc8b094f Paolo Bonzini
#
1133 bc8b094f Paolo Bonzini
# Since: 1.1
1134 bc8b094f Paolo Bonzini
##
1135 bc8b094f Paolo Bonzini
{ 'enum': 'NewImageMode'
1136 bc8b094f Paolo Bonzini
  'data': [ 'existing', 'absolute-paths' ] }
1137 bc8b094f Paolo Bonzini
1138 bc8b094f Paolo Bonzini
##
1139 52e7c241 Paolo Bonzini
# @BlockdevSnapshot
1140 8802d1fd Jeff Cody
#
1141 8802d1fd Jeff Cody
# @device:  the name of the device to generate the snapshot from.
1142 8802d1fd Jeff Cody
#
1143 8802d1fd Jeff Cody
# @snapshot-file: the target of the new image. A new file will be created.
1144 8802d1fd Jeff Cody
#
1145 8802d1fd Jeff Cody
# @format: #optional the format of the snapshot image, default is 'qcow2'.
1146 6cc2a415 Paolo Bonzini
#
1147 6cc2a415 Paolo Bonzini
# @mode: #optional whether and how QEMU should create a new image, default is
1148 6cc2a415 Paolo Bonzini
# 'absolute-paths'.
1149 8802d1fd Jeff Cody
##
1150 52e7c241 Paolo Bonzini
{ 'type': 'BlockdevSnapshot',
1151 bc8b094f Paolo Bonzini
  'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1152 bc8b094f Paolo Bonzini
            '*mode': 'NewImageMode' } }
1153 8802d1fd Jeff Cody
1154 8802d1fd Jeff Cody
##
1155 52e7c241 Paolo Bonzini
# @BlockdevAction
1156 8802d1fd Jeff Cody
#
1157 52e7c241 Paolo Bonzini
# A discriminated record of operations that can be performed with
1158 52e7c241 Paolo Bonzini
# @transaction.
1159 8802d1fd Jeff Cody
##
1160 52e7c241 Paolo Bonzini
{ 'union': 'BlockdevAction',
1161 52e7c241 Paolo Bonzini
  'data': {
1162 52e7c241 Paolo Bonzini
       'blockdev-snapshot-sync': 'BlockdevSnapshot',
1163 52e7c241 Paolo Bonzini
   } }
1164 8802d1fd Jeff Cody
1165 8802d1fd Jeff Cody
##
1166 52e7c241 Paolo Bonzini
# @transaction
1167 8802d1fd Jeff Cody
#
1168 52e7c241 Paolo Bonzini
# Atomically operate on a group of one or more block devices.  If
1169 52e7c241 Paolo Bonzini
# any operation fails, then the entire set of actions will be
1170 52e7c241 Paolo Bonzini
# abandoned and the appropriate error returned.  The only operation
1171 52e7c241 Paolo Bonzini
# supported is currently blockdev-snapshot-sync.
1172 8802d1fd Jeff Cody
#
1173 8802d1fd Jeff Cody
#  List of:
1174 52e7c241 Paolo Bonzini
#  @BlockdevAction: information needed for the device snapshot
1175 8802d1fd Jeff Cody
#
1176 8802d1fd Jeff Cody
# Returns: nothing on success
1177 8802d1fd Jeff Cody
#          If @device is not a valid block device, DeviceNotFound
1178 8802d1fd Jeff Cody
#          If @device is busy, DeviceInUse will be returned
1179 8802d1fd Jeff Cody
#          If @snapshot-file can't be created, OpenFileFailed
1180 8802d1fd Jeff Cody
#          If @snapshot-file can't be opened, OpenFileFailed
1181 8802d1fd Jeff Cody
#          If @format is invalid, InvalidBlockFormat
1182 8802d1fd Jeff Cody
#
1183 52e7c241 Paolo Bonzini
# Note: The transaction aborts on the first failure.  Therefore, there will
1184 52e7c241 Paolo Bonzini
# be only one device or snapshot file returned in an error condition, and
1185 52e7c241 Paolo Bonzini
# subsequent actions will not have been attempted.
1186 52e7c241 Paolo Bonzini
#
1187 52e7c241 Paolo Bonzini
# Since 1.1
1188 8802d1fd Jeff Cody
##
1189 52e7c241 Paolo Bonzini
{ 'command': 'transaction',
1190 52e7c241 Paolo Bonzini
  'data': { 'actions': [ 'BlockdevAction' ] } }
1191 8802d1fd Jeff Cody
1192 8802d1fd Jeff Cody
##
1193 6106e249 Luiz Capitulino
# @blockdev-snapshot-sync
1194 6106e249 Luiz Capitulino
#
1195 6106e249 Luiz Capitulino
# Generates a synchronous snapshot of a block device.
1196 6106e249 Luiz Capitulino
#
1197 6106e249 Luiz Capitulino
# @device:  the name of the device to generate the snapshot from.
1198 6106e249 Luiz Capitulino
#
1199 6106e249 Luiz Capitulino
# @snapshot-file: the target of the new image. If the file exists, or if it
1200 6106e249 Luiz Capitulino
#                 is a device, the snapshot will be created in the existing
1201 6106e249 Luiz Capitulino
#                 file/device. If does not exist, a new file will be created.
1202 6106e249 Luiz Capitulino
#
1203 6106e249 Luiz Capitulino
# @format: #optional the format of the snapshot image, default is 'qcow2'.
1204 6106e249 Luiz Capitulino
#
1205 6cc2a415 Paolo Bonzini
# @mode: #optional whether and how QEMU should create a new image, default is
1206 6cc2a415 Paolo Bonzini
# 'absolute-paths'.
1207 6cc2a415 Paolo Bonzini
#
1208 6106e249 Luiz Capitulino
# Returns: nothing on success
1209 6106e249 Luiz Capitulino
#          If @device is not a valid block device, DeviceNotFound
1210 6106e249 Luiz Capitulino
#          If @snapshot-file can't be opened, OpenFileFailed
1211 6106e249 Luiz Capitulino
#          If @format is invalid, InvalidBlockFormat
1212 6106e249 Luiz Capitulino
#
1213 6106e249 Luiz Capitulino
# Since 0.14.0
1214 6106e249 Luiz Capitulino
##
1215 6106e249 Luiz Capitulino
{ 'command': 'blockdev-snapshot-sync',
1216 6cc2a415 Paolo Bonzini
  'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1217 6cc2a415 Paolo Bonzini
            '*mode': 'NewImageMode'} }
1218 d51a67b4 Luiz Capitulino
1219 d51a67b4 Luiz Capitulino
##
1220 d51a67b4 Luiz Capitulino
# @human-monitor-command:
1221 d51a67b4 Luiz Capitulino
#
1222 d51a67b4 Luiz Capitulino
# Execute a command on the human monitor and return the output.
1223 d51a67b4 Luiz Capitulino
#
1224 d51a67b4 Luiz Capitulino
# @command-line: the command to execute in the human monitor
1225 d51a67b4 Luiz Capitulino
#
1226 d51a67b4 Luiz Capitulino
# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1227 d51a67b4 Luiz Capitulino
#
1228 d51a67b4 Luiz Capitulino
# Returns: the output of the command as a string
1229 d51a67b4 Luiz Capitulino
#
1230 d51a67b4 Luiz Capitulino
# Since: 0.14.0
1231 d51a67b4 Luiz Capitulino
#
1232 d51a67b4 Luiz Capitulino
# Notes: This command only exists as a stop-gap.  It's use is highly
1233 d51a67b4 Luiz Capitulino
#        discouraged.  The semantics of this command are not guaranteed.
1234 d51a67b4 Luiz Capitulino
#
1235 d51a67b4 Luiz Capitulino
#        Known limitations:
1236 d51a67b4 Luiz Capitulino
#
1237 d51a67b4 Luiz Capitulino
#        o This command is stateless, this means that commands that depend
1238 d51a67b4 Luiz Capitulino
#          on state information (such as getfd) might not work
1239 d51a67b4 Luiz Capitulino
#
1240 d51a67b4 Luiz Capitulino
#       o Commands that prompt the user for data (eg. 'cont' when the block
1241 d51a67b4 Luiz Capitulino
#         device is encrypted) don't currently work
1242 d51a67b4 Luiz Capitulino
##
1243 d51a67b4 Luiz Capitulino
{ 'command': 'human-monitor-command',
1244 d51a67b4 Luiz Capitulino
  'data': {'command-line': 'str', '*cpu-index': 'int'},
1245 d51a67b4 Luiz Capitulino
  'returns': 'str' } 
1246 6cdedb07 Luiz Capitulino
1247 6cdedb07 Luiz Capitulino
##
1248 6cdedb07 Luiz Capitulino
# @migrate_cancel
1249 6cdedb07 Luiz Capitulino
#
1250 6cdedb07 Luiz Capitulino
# Cancel the current executing migration process.
1251 6cdedb07 Luiz Capitulino
#
1252 6cdedb07 Luiz Capitulino
# Returns: nothing on success
1253 6cdedb07 Luiz Capitulino
#
1254 6cdedb07 Luiz Capitulino
# Notes: This command succeeds even if there is no migration process running.
1255 6cdedb07 Luiz Capitulino
#
1256 6cdedb07 Luiz Capitulino
# Since: 0.14.0
1257 6cdedb07 Luiz Capitulino
##
1258 6cdedb07 Luiz Capitulino
{ 'command': 'migrate_cancel' }
1259 4f0a993b Luiz Capitulino
1260 4f0a993b Luiz Capitulino
##
1261 4f0a993b Luiz Capitulino
# @migrate_set_downtime
1262 4f0a993b Luiz Capitulino
#
1263 4f0a993b Luiz Capitulino
# Set maximum tolerated downtime for migration.
1264 4f0a993b Luiz Capitulino
#
1265 4f0a993b Luiz Capitulino
# @value: maximum downtime in seconds
1266 4f0a993b Luiz Capitulino
#
1267 4f0a993b Luiz Capitulino
# Returns: nothing on success
1268 4f0a993b Luiz Capitulino
#
1269 4f0a993b Luiz Capitulino
# Since: 0.14.0
1270 4f0a993b Luiz Capitulino
##
1271 4f0a993b Luiz Capitulino
{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1272 3dc85383 Luiz Capitulino
1273 3dc85383 Luiz Capitulino
##
1274 3dc85383 Luiz Capitulino
# @migrate_set_speed
1275 3dc85383 Luiz Capitulino
#
1276 3dc85383 Luiz Capitulino
# Set maximum speed for migration.
1277 3dc85383 Luiz Capitulino
#
1278 3dc85383 Luiz Capitulino
# @value: maximum speed in bytes.
1279 3dc85383 Luiz Capitulino
#
1280 3dc85383 Luiz Capitulino
# Returns: nothing on success
1281 3dc85383 Luiz Capitulino
#
1282 3dc85383 Luiz Capitulino
# Notes: A value lesser than zero will be automatically round up to zero.
1283 3dc85383 Luiz Capitulino
#
1284 3dc85383 Luiz Capitulino
# Since: 0.14.0
1285 3dc85383 Luiz Capitulino
##
1286 3dc85383 Luiz Capitulino
{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1287 b4b12c62 Anthony Liguori
1288 b4b12c62 Anthony Liguori
##
1289 d03ee401 Alon Levy
# @ObjectPropertyInfo:
1290 b4b12c62 Anthony Liguori
#
1291 b4b12c62 Anthony Liguori
# @name: the name of the property
1292 b4b12c62 Anthony Liguori
#
1293 b4b12c62 Anthony Liguori
# @type: the type of the property.  This will typically come in one of four
1294 b4b12c62 Anthony Liguori
#        forms:
1295 b4b12c62 Anthony Liguori
#
1296 b4b12c62 Anthony Liguori
#        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1297 b4b12c62 Anthony Liguori
#           These types are mapped to the appropriate JSON type.
1298 b4b12c62 Anthony Liguori
#
1299 b4b12c62 Anthony Liguori
#        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1300 b4b12c62 Anthony Liguori
#           legacy qdev typename.  These types are always treated as strings.
1301 b4b12c62 Anthony Liguori
#
1302 b4b12c62 Anthony Liguori
#        3) A child type in the form 'child<subtype>' where subtype is a qdev
1303 b4b12c62 Anthony Liguori
#           device type name.  Child properties create the composition tree.
1304 b4b12c62 Anthony Liguori
#
1305 b4b12c62 Anthony Liguori
#        4) A link type in the form 'link<subtype>' where subtype is a qdev
1306 b4b12c62 Anthony Liguori
#           device type name.  Link properties form the device model graph.
1307 b4b12c62 Anthony Liguori
#
1308 b4b12c62 Anthony Liguori
# Since: 1.1
1309 b4b12c62 Anthony Liguori
#
1310 b4b12c62 Anthony Liguori
# Notes: This type is experimental.  Its syntax may change in future releases.
1311 b4b12c62 Anthony Liguori
##
1312 57c9fafe Anthony Liguori
{ 'type': 'ObjectPropertyInfo',
1313 b4b12c62 Anthony Liguori
  'data': { 'name': 'str', 'type': 'str' } }
1314 b4b12c62 Anthony Liguori
1315 b4b12c62 Anthony Liguori
##
1316 b4b12c62 Anthony Liguori
# @qom-list:
1317 b4b12c62 Anthony Liguori
#
1318 57c9fafe Anthony Liguori
# This command will list any properties of a object given a path in the object
1319 b4b12c62 Anthony Liguori
# model.
1320 b4b12c62 Anthony Liguori
#
1321 57c9fafe Anthony Liguori
# @path: the path within the object model.  See @qom-get for a description of
1322 b4b12c62 Anthony Liguori
#        this parameter.
1323 b4b12c62 Anthony Liguori
#
1324 57c9fafe Anthony Liguori
# Returns: a list of @ObjectPropertyInfo that describe the properties of the
1325 57c9fafe Anthony Liguori
#          object.
1326 b4b12c62 Anthony Liguori
#
1327 b4b12c62 Anthony Liguori
# Since: 1.1
1328 b4b12c62 Anthony Liguori
#
1329 b4b12c62 Anthony Liguori
# Notes: This command is experimental.  It's syntax may change in future
1330 b4b12c62 Anthony Liguori
#        releases.
1331 b4b12c62 Anthony Liguori
##
1332 b4b12c62 Anthony Liguori
{ 'command': 'qom-list',
1333 b4b12c62 Anthony Liguori
  'data': { 'path': 'str' },
1334 57c9fafe Anthony Liguori
  'returns': [ 'ObjectPropertyInfo' ] }
1335 eb6e8ea5 Anthony Liguori
1336 eb6e8ea5 Anthony Liguori
##
1337 eb6e8ea5 Anthony Liguori
# @qom-get:
1338 eb6e8ea5 Anthony Liguori
#
1339 57c9fafe Anthony Liguori
# This command will get a property from a object model path and return the
1340 eb6e8ea5 Anthony Liguori
# value.
1341 eb6e8ea5 Anthony Liguori
#
1342 57c9fafe Anthony Liguori
# @path: The path within the object model.  There are two forms of supported
1343 eb6e8ea5 Anthony Liguori
#        paths--absolute and partial paths.
1344 eb6e8ea5 Anthony Liguori
#
1345 57c9fafe Anthony Liguori
#        Absolute paths are derived from the root object and can follow child<>
1346 eb6e8ea5 Anthony Liguori
#        or link<> properties.  Since they can follow link<> properties, they
1347 eb6e8ea5 Anthony Liguori
#        can be arbitrarily long.  Absolute paths look like absolute filenames
1348 eb6e8ea5 Anthony Liguori
#        and are prefixed  with a leading slash.
1349 eb6e8ea5 Anthony Liguori
#
1350 eb6e8ea5 Anthony Liguori
#        Partial paths look like relative filenames.  They do not begin
1351 eb6e8ea5 Anthony Liguori
#        with a prefix.  The matching rules for partial paths are subtle but
1352 57c9fafe Anthony Liguori
#        designed to make specifying objects easy.  At each level of the
1353 eb6e8ea5 Anthony Liguori
#        composition tree, the partial path is matched as an absolute path.
1354 eb6e8ea5 Anthony Liguori
#        The first match is not returned.  At least two matches are searched
1355 eb6e8ea5 Anthony Liguori
#        for.  A successful result is only returned if only one match is
1356 eb6e8ea5 Anthony Liguori
#        found.  If more than one match is found, a flag is return to
1357 eb6e8ea5 Anthony Liguori
#        indicate that the match was ambiguous.
1358 eb6e8ea5 Anthony Liguori
#
1359 eb6e8ea5 Anthony Liguori
# @property: The property name to read
1360 eb6e8ea5 Anthony Liguori
#
1361 eb6e8ea5 Anthony Liguori
# Returns: The property value.  The type depends on the property type.  legacy<>
1362 eb6e8ea5 Anthony Liguori
#          properties are returned as #str.  child<> and link<> properties are
1363 eb6e8ea5 Anthony Liguori
#          returns as #str pathnames.  All integer property types (u8, u16, etc)
1364 eb6e8ea5 Anthony Liguori
#          are returned as #int.
1365 eb6e8ea5 Anthony Liguori
#
1366 eb6e8ea5 Anthony Liguori
# Since: 1.1
1367 eb6e8ea5 Anthony Liguori
#
1368 eb6e8ea5 Anthony Liguori
# Notes: This command is experimental and may change syntax in future releases.
1369 eb6e8ea5 Anthony Liguori
##
1370 eb6e8ea5 Anthony Liguori
{ 'command': 'qom-get',
1371 eb6e8ea5 Anthony Liguori
  'data': { 'path': 'str', 'property': 'str' },
1372 eb6e8ea5 Anthony Liguori
  'returns': 'visitor',
1373 eb6e8ea5 Anthony Liguori
  'gen': 'no' }
1374 eb6e8ea5 Anthony Liguori
1375 eb6e8ea5 Anthony Liguori
##
1376 eb6e8ea5 Anthony Liguori
# @qom-set:
1377 eb6e8ea5 Anthony Liguori
#
1378 57c9fafe Anthony Liguori
# This command will set a property from a object model path.
1379 eb6e8ea5 Anthony Liguori
#
1380 eb6e8ea5 Anthony Liguori
# @path: see @qom-get for a description of this parameter
1381 eb6e8ea5 Anthony Liguori
#
1382 eb6e8ea5 Anthony Liguori
# @property: the property name to set
1383 eb6e8ea5 Anthony Liguori
#
1384 eb6e8ea5 Anthony Liguori
# @value: a value who's type is appropriate for the property type.  See @qom-get
1385 eb6e8ea5 Anthony Liguori
#         for a description of type mapping.
1386 eb6e8ea5 Anthony Liguori
#
1387 eb6e8ea5 Anthony Liguori
# Since: 1.1
1388 eb6e8ea5 Anthony Liguori
#
1389 eb6e8ea5 Anthony Liguori
# Notes: This command is experimental and may change syntax in future releases.
1390 eb6e8ea5 Anthony Liguori
##
1391 eb6e8ea5 Anthony Liguori
{ 'command': 'qom-set',
1392 eb6e8ea5 Anthony Liguori
  'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1393 eb6e8ea5 Anthony Liguori
  'gen': 'no' }
1394 fbf796fd Luiz Capitulino
1395 fbf796fd Luiz Capitulino
##
1396 fbf796fd Luiz Capitulino
# @set_password:
1397 fbf796fd Luiz Capitulino
#
1398 fbf796fd Luiz Capitulino
# Sets the password of a remote display session.
1399 fbf796fd Luiz Capitulino
#
1400 fbf796fd Luiz Capitulino
# @protocol: `vnc' to modify the VNC server password
1401 fbf796fd Luiz Capitulino
#            `spice' to modify the Spice server password
1402 fbf796fd Luiz Capitulino
#
1403 fbf796fd Luiz Capitulino
# @password: the new password
1404 fbf796fd Luiz Capitulino
#
1405 fbf796fd Luiz Capitulino
# @connected: #optional how to handle existing clients when changing the
1406 fbf796fd Luiz Capitulino
#                       password.  If nothing is specified, defaults to `keep' 
1407 fbf796fd Luiz Capitulino
#                       `fail' to fail the command if clients are connected
1408 fbf796fd Luiz Capitulino
#                       `disconnect' to disconnect existing clients
1409 fbf796fd Luiz Capitulino
#                       `keep' to maintain existing clients
1410 fbf796fd Luiz Capitulino
#
1411 fbf796fd Luiz Capitulino
# Returns: Nothing on success
1412 fbf796fd Luiz Capitulino
#          If Spice is not enabled, DeviceNotFound
1413 fbf796fd Luiz Capitulino
#          If @protocol does not support connected, InvalidParameter
1414 fbf796fd Luiz Capitulino
#          If @protocol is invalid, InvalidParameter
1415 fbf796fd Luiz Capitulino
#          If any other error occurs, SetPasswdFailed
1416 fbf796fd Luiz Capitulino
#
1417 fbf796fd Luiz Capitulino
# Notes: If VNC is not enabled, SetPasswdFailed is returned.
1418 fbf796fd Luiz Capitulino
#
1419 fbf796fd Luiz Capitulino
# Since: 0.14.0
1420 fbf796fd Luiz Capitulino
##
1421 fbf796fd Luiz Capitulino
{ 'command': 'set_password',
1422 fbf796fd Luiz Capitulino
  'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1423 9ad5372d Luiz Capitulino
1424 9ad5372d Luiz Capitulino
##
1425 9ad5372d Luiz Capitulino
# @expire_password:
1426 9ad5372d Luiz Capitulino
#
1427 9ad5372d Luiz Capitulino
# Expire the password of a remote display server.
1428 9ad5372d Luiz Capitulino
#
1429 9ad5372d Luiz Capitulino
# @protocol: the name of the remote display protocol `vnc' or `spice'
1430 9ad5372d Luiz Capitulino
#
1431 9ad5372d Luiz Capitulino
# @time: when to expire the password.
1432 9ad5372d Luiz Capitulino
#        `now' to expire the password immediately
1433 9ad5372d Luiz Capitulino
#        `never' to cancel password expiration
1434 9ad5372d Luiz Capitulino
#        `+INT' where INT is the number of seconds from now (integer)
1435 9ad5372d Luiz Capitulino
#        `INT' where INT is the absolute time in seconds
1436 9ad5372d Luiz Capitulino
#
1437 9ad5372d Luiz Capitulino
# Returns: Nothing on success
1438 9ad5372d Luiz Capitulino
#          If @protocol is `spice' and Spice is not active, DeviceNotFound
1439 9ad5372d Luiz Capitulino
#          If an error occurs setting password expiration, SetPasswdFailed
1440 9ad5372d Luiz Capitulino
#          If @protocol is not `spice' or 'vnc', InvalidParameter
1441 9ad5372d Luiz Capitulino
#
1442 9ad5372d Luiz Capitulino
# Since: 0.14.0
1443 9ad5372d Luiz Capitulino
#
1444 9ad5372d Luiz Capitulino
# Notes: Time is relative to the server and currently there is no way to
1445 9ad5372d Luiz Capitulino
#        coordinate server time with client time.  It is not recommended to
1446 9ad5372d Luiz Capitulino
#        use the absolute time version of the @time parameter unless you're
1447 9ad5372d Luiz Capitulino
#        sure you are on the same machine as the QEMU instance.
1448 9ad5372d Luiz Capitulino
##
1449 9ad5372d Luiz Capitulino
{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1450 c245b6a3 Luiz Capitulino
1451 c245b6a3 Luiz Capitulino
##
1452 c245b6a3 Luiz Capitulino
# @eject:
1453 c245b6a3 Luiz Capitulino
#
1454 c245b6a3 Luiz Capitulino
# Ejects a device from a removable drive.
1455 c245b6a3 Luiz Capitulino
#
1456 c245b6a3 Luiz Capitulino
# @device:  The name of the device
1457 c245b6a3 Luiz Capitulino
#
1458 c245b6a3 Luiz Capitulino
# @force:   @optional If true, eject regardless of whether the drive is locked.
1459 c245b6a3 Luiz Capitulino
#           If not specified, the default value is false.
1460 c245b6a3 Luiz Capitulino
#
1461 c245b6a3 Luiz Capitulino
# Returns:  Nothing on success
1462 c245b6a3 Luiz Capitulino
#           If @device is not a valid block device, DeviceNotFound
1463 c245b6a3 Luiz Capitulino
#           If @device is not removable and @force is false, DeviceNotRemovable
1464 c245b6a3 Luiz Capitulino
#           If @force is false and @device is locked, DeviceLocked
1465 c245b6a3 Luiz Capitulino
#
1466 c245b6a3 Luiz Capitulino
# Notes:    Ejecting a device will no media results in success
1467 c245b6a3 Luiz Capitulino
#
1468 c245b6a3 Luiz Capitulino
# Since: 0.14.0
1469 c245b6a3 Luiz Capitulino
##
1470 c245b6a3 Luiz Capitulino
{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1471 270b243f Luiz Capitulino
1472 270b243f Luiz Capitulino
##
1473 270b243f Luiz Capitulino
# @change-vnc-password:
1474 270b243f Luiz Capitulino
#
1475 270b243f Luiz Capitulino
# Change the VNC server password.
1476 270b243f Luiz Capitulino
#
1477 270b243f Luiz Capitulino
# @target:  the new password to use with VNC authentication
1478 270b243f Luiz Capitulino
#
1479 270b243f Luiz Capitulino
# Since: 1.1
1480 270b243f Luiz Capitulino
#
1481 270b243f Luiz Capitulino
# Notes:  An empty password in this command will set the password to the empty
1482 270b243f Luiz Capitulino
#         string.  Existing clients are unaffected by executing this command.
1483 270b243f Luiz Capitulino
##
1484 270b243f Luiz Capitulino
{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1485 333a96ec Luiz Capitulino
1486 333a96ec Luiz Capitulino
##
1487 333a96ec Luiz Capitulino
# @change:
1488 333a96ec Luiz Capitulino
#
1489 333a96ec Luiz Capitulino
# This command is multiple commands multiplexed together.
1490 333a96ec Luiz Capitulino
#
1491 333a96ec Luiz Capitulino
# @device: This is normally the name of a block device but it may also be 'vnc'.
1492 333a96ec Luiz Capitulino
#          when it's 'vnc', then sub command depends on @target
1493 333a96ec Luiz Capitulino
#
1494 333a96ec Luiz Capitulino
# @target: If @device is a block device, then this is the new filename.
1495 333a96ec Luiz Capitulino
#          If @device is 'vnc', then if the value 'password' selects the vnc
1496 333a96ec Luiz Capitulino
#          change password command.   Otherwise, this specifies a new server URI
1497 333a96ec Luiz Capitulino
#          address to listen to for VNC connections.
1498 333a96ec Luiz Capitulino
#
1499 333a96ec Luiz Capitulino
# @arg:    If @device is a block device, then this is an optional format to open
1500 333a96ec Luiz Capitulino
#          the device with.
1501 333a96ec Luiz Capitulino
#          If @device is 'vnc' and @target is 'password', this is the new VNC
1502 333a96ec Luiz Capitulino
#          password to set.  If this argument is an empty string, then no future
1503 333a96ec Luiz Capitulino
#          logins will be allowed.
1504 333a96ec Luiz Capitulino
#
1505 333a96ec Luiz Capitulino
# Returns: Nothing on success.
1506 333a96ec Luiz Capitulino
#          If @device is not a valid block device, DeviceNotFound
1507 333a96ec Luiz Capitulino
#          If @format is not a valid block format, InvalidBlockFormat
1508 333a96ec Luiz Capitulino
#          If the new block device is encrypted, DeviceEncrypted.  Note that
1509 333a96ec Luiz Capitulino
#          if this error is returned, the device has been opened successfully
1510 333a96ec Luiz Capitulino
#          and an additional call to @block_passwd is required to set the
1511 333a96ec Luiz Capitulino
#          device's password.  The behavior of reads and writes to the block
1512 333a96ec Luiz Capitulino
#          device between when these calls are executed is undefined.
1513 333a96ec Luiz Capitulino
#
1514 333a96ec Luiz Capitulino
# Notes:  It is strongly recommended that this interface is not used especially
1515 333a96ec Luiz Capitulino
#         for changing block devices.
1516 333a96ec Luiz Capitulino
#
1517 333a96ec Luiz Capitulino
# Since: 0.14.0
1518 333a96ec Luiz Capitulino
##
1519 333a96ec Luiz Capitulino
{ 'command': 'change',
1520 333a96ec Luiz Capitulino
  'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1521 80047da5 Luiz Capitulino
1522 80047da5 Luiz Capitulino
##
1523 80047da5 Luiz Capitulino
# @block_set_io_throttle:
1524 80047da5 Luiz Capitulino
#
1525 80047da5 Luiz Capitulino
# Change I/O throttle limits for a block drive.
1526 80047da5 Luiz Capitulino
#
1527 80047da5 Luiz Capitulino
# @device: The name of the device
1528 80047da5 Luiz Capitulino
#
1529 80047da5 Luiz Capitulino
# @bps: total throughput limit in bytes per second
1530 80047da5 Luiz Capitulino
#
1531 80047da5 Luiz Capitulino
# @bps_rd: read throughput limit in bytes per second
1532 80047da5 Luiz Capitulino
#
1533 80047da5 Luiz Capitulino
# @bps_wr: write throughput limit in bytes per second
1534 80047da5 Luiz Capitulino
#
1535 80047da5 Luiz Capitulino
# @iops: total I/O operations per second
1536 80047da5 Luiz Capitulino
#
1537 80047da5 Luiz Capitulino
# @ops_rd: read I/O operations per second
1538 80047da5 Luiz Capitulino
#
1539 80047da5 Luiz Capitulino
# @iops_wr: write I/O operations per second
1540 80047da5 Luiz Capitulino
#
1541 80047da5 Luiz Capitulino
# Returns: Nothing on success
1542 80047da5 Luiz Capitulino
#          If @device is not a valid block device, DeviceNotFound
1543 80047da5 Luiz Capitulino
#          If the argument combination is invalid, InvalidParameterCombination
1544 80047da5 Luiz Capitulino
#
1545 80047da5 Luiz Capitulino
# Since: 1.1
1546 80047da5 Luiz Capitulino
## 
1547 80047da5 Luiz Capitulino
{ 'command': 'block_set_io_throttle',
1548 80047da5 Luiz Capitulino
  'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1549 80047da5 Luiz Capitulino
            'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1550 12bd451f Stefan Hajnoczi
1551 12bd451f Stefan Hajnoczi
# @block_stream:
1552 12bd451f Stefan Hajnoczi
#
1553 12bd451f Stefan Hajnoczi
# Copy data from a backing file into a block device.
1554 12bd451f Stefan Hajnoczi
#
1555 12bd451f Stefan Hajnoczi
# The block streaming operation is performed in the background until the entire
1556 12bd451f Stefan Hajnoczi
# backing file has been copied.  This command returns immediately once streaming
1557 12bd451f Stefan Hajnoczi
# has started.  The status of ongoing block streaming operations can be checked
1558 12bd451f Stefan Hajnoczi
# with query-block-jobs.  The operation can be stopped before it has completed
1559 12bd451f Stefan Hajnoczi
# using the block_job_cancel command.
1560 12bd451f Stefan Hajnoczi
#
1561 12bd451f Stefan Hajnoczi
# If a base file is specified then sectors are not copied from that base file and
1562 12bd451f Stefan Hajnoczi
# its backing chain.  When streaming completes the image file will have the base
1563 12bd451f Stefan Hajnoczi
# file as its backing file.  This can be used to stream a subset of the backing
1564 12bd451f Stefan Hajnoczi
# file chain instead of flattening the entire image.
1565 12bd451f Stefan Hajnoczi
#
1566 12bd451f Stefan Hajnoczi
# On successful completion the image file is updated to drop the backing file
1567 12bd451f Stefan Hajnoczi
# and the BLOCK_JOB_COMPLETED event is emitted.
1568 12bd451f Stefan Hajnoczi
#
1569 12bd451f Stefan Hajnoczi
# @device: the device name
1570 12bd451f Stefan Hajnoczi
#
1571 12bd451f Stefan Hajnoczi
# @base:   #optional the common backing file name
1572 12bd451f Stefan Hajnoczi
#
1573 12bd451f Stefan Hajnoczi
# Returns: Nothing on success
1574 12bd451f Stefan Hajnoczi
#          If streaming is already active on this device, DeviceInUse
1575 12bd451f Stefan Hajnoczi
#          If @device does not exist, DeviceNotFound
1576 12bd451f Stefan Hajnoczi
#          If image streaming is not supported by this device, NotSupported
1577 019b8cbf Marcelo Tosatti
#          If @base does not exist, BaseNotFound
1578 12bd451f Stefan Hajnoczi
#
1579 12bd451f Stefan Hajnoczi
# Since: 1.1
1580 12bd451f Stefan Hajnoczi
##
1581 12bd451f Stefan Hajnoczi
{ 'command': 'block_stream', 'data': { 'device': 'str', '*base': 'str' } }
1582 2d47c6e9 Stefan Hajnoczi
1583 2d47c6e9 Stefan Hajnoczi
##
1584 2d47c6e9 Stefan Hajnoczi
# @block_job_set_speed:
1585 2d47c6e9 Stefan Hajnoczi
#
1586 2d47c6e9 Stefan Hajnoczi
# Set maximum speed for a background block operation.
1587 2d47c6e9 Stefan Hajnoczi
#
1588 2d47c6e9 Stefan Hajnoczi
# This command can only be issued when there is an active block job.
1589 2d47c6e9 Stefan Hajnoczi
#
1590 2d47c6e9 Stefan Hajnoczi
# Throttling can be disabled by setting the speed to 0.
1591 2d47c6e9 Stefan Hajnoczi
#
1592 2d47c6e9 Stefan Hajnoczi
# @device: the device name
1593 2d47c6e9 Stefan Hajnoczi
#
1594 2d47c6e9 Stefan Hajnoczi
# @value:  the maximum speed, in bytes per second
1595 2d47c6e9 Stefan Hajnoczi
#
1596 2d47c6e9 Stefan Hajnoczi
# Returns: Nothing on success
1597 2d47c6e9 Stefan Hajnoczi
#          If the job type does not support throttling, NotSupported
1598 2d47c6e9 Stefan Hajnoczi
#          If streaming is not active on this device, DeviceNotActive
1599 2d47c6e9 Stefan Hajnoczi
#
1600 2d47c6e9 Stefan Hajnoczi
# Since: 1.1
1601 2d47c6e9 Stefan Hajnoczi
##
1602 2d47c6e9 Stefan Hajnoczi
{ 'command': 'block_job_set_speed',
1603 2d47c6e9 Stefan Hajnoczi
  'data': { 'device': 'str', 'value': 'int' } }
1604 370521a1 Stefan Hajnoczi
1605 370521a1 Stefan Hajnoczi
##
1606 370521a1 Stefan Hajnoczi
# @block_job_cancel:
1607 370521a1 Stefan Hajnoczi
#
1608 370521a1 Stefan Hajnoczi
# Stop an active block streaming operation.
1609 370521a1 Stefan Hajnoczi
#
1610 370521a1 Stefan Hajnoczi
# This command returns immediately after marking the active block streaming
1611 370521a1 Stefan Hajnoczi
# operation for cancellation.  It is an error to call this command if no
1612 370521a1 Stefan Hajnoczi
# operation is in progress.
1613 370521a1 Stefan Hajnoczi
#
1614 370521a1 Stefan Hajnoczi
# The operation will cancel as soon as possible and then emit the
1615 370521a1 Stefan Hajnoczi
# BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
1616 370521a1 Stefan Hajnoczi
# enumerated using query-block-jobs.
1617 370521a1 Stefan Hajnoczi
#
1618 370521a1 Stefan Hajnoczi
# The image file retains its backing file unless the streaming operation happens
1619 370521a1 Stefan Hajnoczi
# to complete just as it is being cancelled.
1620 370521a1 Stefan Hajnoczi
#
1621 370521a1 Stefan Hajnoczi
# A new block streaming operation can be started at a later time to finish
1622 370521a1 Stefan Hajnoczi
# copying all data from the backing file.
1623 370521a1 Stefan Hajnoczi
#
1624 370521a1 Stefan Hajnoczi
# @device: the device name
1625 370521a1 Stefan Hajnoczi
#
1626 370521a1 Stefan Hajnoczi
# Returns: Nothing on success
1627 370521a1 Stefan Hajnoczi
#          If streaming is not active on this device, DeviceNotActive
1628 370521a1 Stefan Hajnoczi
#          If cancellation already in progress, DeviceInUse
1629 370521a1 Stefan Hajnoczi
#
1630 370521a1 Stefan Hajnoczi
# Since: 1.1
1631 370521a1 Stefan Hajnoczi
##
1632 370521a1 Stefan Hajnoczi
{ 'command': 'block_job_cancel', 'data': { 'device': 'str' } }
1633 5eeee3fa Anthony Liguori
1634 5eeee3fa Anthony Liguori
##
1635 5eeee3fa Anthony Liguori
# @ObjectTypeInfo:
1636 5eeee3fa Anthony Liguori
#
1637 5eeee3fa Anthony Liguori
# This structure describes a search result from @qom-list-types
1638 5eeee3fa Anthony Liguori
#
1639 5eeee3fa Anthony Liguori
# @name: the type name found in the search
1640 5eeee3fa Anthony Liguori
#
1641 5eeee3fa Anthony Liguori
# Since: 1.1
1642 5eeee3fa Anthony Liguori
#
1643 5eeee3fa Anthony Liguori
# Notes: This command is experimental and may change syntax in future releases.
1644 5eeee3fa Anthony Liguori
##
1645 5eeee3fa Anthony Liguori
{ 'type': 'ObjectTypeInfo',
1646 5eeee3fa Anthony Liguori
  'data': { 'name': 'str' } }
1647 5eeee3fa Anthony Liguori
1648 5eeee3fa Anthony Liguori
##
1649 5eeee3fa Anthony Liguori
# @qom-list-types:
1650 5eeee3fa Anthony Liguori
#
1651 5eeee3fa Anthony Liguori
# This command will return a list of types given search parameters
1652 5eeee3fa Anthony Liguori
#
1653 5eeee3fa Anthony Liguori
# @implements: if specified, only return types that implement this type name
1654 5eeee3fa Anthony Liguori
#
1655 5eeee3fa Anthony Liguori
# @abstract: if true, include abstract types in the results
1656 5eeee3fa Anthony Liguori
#
1657 5eeee3fa Anthony Liguori
# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1658 5eeee3fa Anthony Liguori
#
1659 5eeee3fa Anthony Liguori
# Since: 1.1
1660 5eeee3fa Anthony Liguori
#
1661 5eeee3fa Anthony Liguori
# Notes: This command is experimental and may change syntax in future releases.
1662 5eeee3fa Anthony Liguori
##
1663 5eeee3fa Anthony Liguori
{ 'command': 'qom-list-types',
1664 5eeee3fa Anthony Liguori
  'data': { '*implements': 'str', '*abstract': 'bool' },
1665 5eeee3fa Anthony Liguori
  'returns': [ 'ObjectTypeInfo' ] }