]>
Commit | Line | Data |
---|---|---|
e3193601 AL |
1 | # -*- Mode: Python -*- |
2 | # | |
3 | # QAPI Schema | |
48a32bed | 4 | |
dcafd323 LC |
5 | ## |
6 | # @ErrorClass | |
7 | # | |
8 | # QEMU error classes | |
9 | # | |
10 | # @GenericError: this is used for errors that don't require a specific error | |
11 | # class. This should be the default case for most errors | |
12 | # | |
13 | # @CommandNotFound: the requested command has not been found | |
14 | # | |
15 | # @DeviceEncrypted: the requested operation can't be fulfilled because the | |
16 | # selected device is encrypted | |
17 | # | |
18 | # @DeviceNotActive: a device has failed to be become active | |
19 | # | |
20 | # @DeviceNotFound: the requested device has not been found | |
21 | # | |
22 | # @KVMMissingCap: the requested operation can't be fulfilled because a | |
23 | # required KVM capability is missing | |
24 | # | |
25 | # @MigrationExpected: the requested operation can't be fulfilled because a | |
26 | # migration process is expected | |
27 | # | |
28 | # Since: 1.2 | |
29 | ## | |
30 | { 'enum': 'ErrorClass', | |
31 | 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted', | |
32 | 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap', | |
33 | 'MigrationExpected' ] } | |
34 | ||
b224e5e2 LC |
35 | ## |
36 | # @add_client | |
37 | # | |
38 | # Allow client connections for VNC, Spice and socket based | |
39 | # character devices to be passed in to QEMU via SCM_RIGHTS. | |
40 | # | |
41 | # @protocol: protocol name. Valid names are "vnc", "spice" or the | |
42 | # name of a character device (eg. from -chardev id=XXXX) | |
43 | # | |
44 | # @fdname: file descriptor name previously passed via 'getfd' command | |
45 | # | |
46 | # @skipauth: #optional whether to skip authentication. Only applies | |
47 | # to "vnc" and "spice" protocols | |
48 | # | |
49 | # @tls: #optional whether to perform TLS. Only applies to the "spice" | |
50 | # protocol | |
51 | # | |
52 | # Returns: nothing on success. | |
53 | # | |
54 | # Since: 0.14.0 | |
55 | ## | |
56 | { 'command': 'add_client', | |
57 | 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool', | |
58 | '*tls': 'bool' } } | |
59 | ||
48a32bed AL |
60 | ## |
61 | # @NameInfo: | |
62 | # | |
63 | # Guest name information. | |
64 | # | |
65 | # @name: #optional The name of the guest | |
66 | # | |
67 | # Since 0.14.0 | |
68 | ## | |
69 | { 'type': 'NameInfo', 'data': {'*name': 'str'} } | |
70 | ||
71 | ## | |
72 | # @query-name: | |
73 | # | |
74 | # Return the name information of a guest. | |
75 | # | |
76 | # Returns: @NameInfo of the guest | |
77 | # | |
78 | # Since 0.14.0 | |
79 | ## | |
80 | { 'command': 'query-name', 'returns': 'NameInfo' } | |
b9c15f16 LC |
81 | |
82 | ## | |
83 | # @VersionInfo: | |
84 | # | |
85 | # A description of QEMU's version. | |
86 | # | |
87 | # @qemu.major: The major version of QEMU | |
88 | # | |
89 | # @qemu.minor: The minor version of QEMU | |
90 | # | |
91 | # @qemu.micro: The micro version of QEMU. By current convention, a micro | |
92 | # version of 50 signifies a development branch. A micro version | |
93 | # greater than or equal to 90 signifies a release candidate for | |
94 | # the next minor version. A micro version of less than 50 | |
95 | # signifies a stable release. | |
96 | # | |
97 | # @package: QEMU will always set this field to an empty string. Downstream | |
98 | # versions of QEMU should set this to a non-empty string. The | |
99 | # exact format depends on the downstream however it highly | |
100 | # recommended that a unique name is used. | |
101 | # | |
102 | # Since: 0.14.0 | |
103 | ## | |
104 | { 'type': 'VersionInfo', | |
105 | 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'}, | |
106 | 'package': 'str'} } | |
107 | ||
108 | ## | |
109 | # @query-version: | |
110 | # | |
111 | # Returns the current version of QEMU. | |
112 | # | |
113 | # Returns: A @VersionInfo object describing the current version of QEMU. | |
114 | # | |
115 | # Since: 0.14.0 | |
116 | ## | |
117 | { 'command': 'query-version', 'returns': 'VersionInfo' } | |
292a2602 LC |
118 | |
119 | ## | |
120 | # @KvmInfo: | |
121 | # | |
122 | # Information about support for KVM acceleration | |
123 | # | |
124 | # @enabled: true if KVM acceleration is active | |
125 | # | |
126 | # @present: true if KVM acceleration is built into this executable | |
127 | # | |
128 | # Since: 0.14.0 | |
129 | ## | |
130 | { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} } | |
131 | ||
132 | ## | |
133 | # @query-kvm: | |
134 | # | |
135 | # Returns information about KVM acceleration | |
136 | # | |
137 | # Returns: @KvmInfo | |
138 | # | |
139 | # Since: 0.14.0 | |
140 | ## | |
141 | { 'command': 'query-kvm', 'returns': 'KvmInfo' } | |
142 | ||
1fa9a5e4 LC |
143 | ## |
144 | # @RunState | |
145 | # | |
6932a69b | 146 | # An enumeration of VM run states. |
1fa9a5e4 LC |
147 | # |
148 | # @debug: QEMU is running on a debugger | |
149 | # | |
0a24c7b1 LC |
150 | # @finish-migrate: guest is paused to finish the migration process |
151 | # | |
1fa9a5e4 LC |
152 | # @inmigrate: guest is paused waiting for an incoming migration |
153 | # | |
154 | # @internal-error: An internal error that prevents further guest execution | |
155 | # has occurred | |
156 | # | |
157 | # @io-error: the last IOP has failed and the device is configured to pause | |
158 | # on I/O errors | |
159 | # | |
160 | # @paused: guest has been paused via the 'stop' command | |
161 | # | |
162 | # @postmigrate: guest is paused following a successful 'migrate' | |
163 | # | |
164 | # @prelaunch: QEMU was started with -S and guest has not started | |
165 | # | |
1fa9a5e4 LC |
166 | # @restore-vm: guest is paused to restore VM state |
167 | # | |
168 | # @running: guest is actively running | |
169 | # | |
170 | # @save-vm: guest is paused to save the VM state | |
171 | # | |
172 | # @shutdown: guest is shut down (and -no-shutdown is in use) | |
173 | # | |
ad02b96a LC |
174 | # @suspended: guest is suspended (ACPI S3) |
175 | # | |
1fa9a5e4 LC |
176 | # @watchdog: the watchdog action is configured to pause and has been triggered |
177 | ## | |
178 | { 'enum': 'RunState', | |
179 | 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused', | |
180 | 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm', | |
ad02b96a | 181 | 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] } |
1fa9a5e4 | 182 | |
c249ee68 BC |
183 | ## |
184 | # @SnapshotInfo | |
185 | # | |
186 | # @id: unique snapshot id | |
187 | # | |
188 | # @name: user chosen name | |
189 | # | |
190 | # @vm-state-size: size of the VM state | |
191 | # | |
192 | # @date-sec: UTC date of the snapshot in seconds | |
193 | # | |
194 | # @date-nsec: fractional part in nano seconds to be used with date-sec | |
195 | # | |
196 | # @vm-clock-sec: VM clock relative to boot in seconds | |
197 | # | |
198 | # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec | |
199 | # | |
200 | # Since: 1.3 | |
201 | # | |
202 | ## | |
203 | ||
204 | { 'type': 'SnapshotInfo', | |
205 | 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int', | |
206 | 'date-sec': 'int', 'date-nsec': 'int', | |
207 | 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } } | |
208 | ||
209 | ## | |
210 | # @ImageInfo: | |
211 | # | |
212 | # Information about a QEMU image file | |
213 | # | |
214 | # @filename: name of the image file | |
215 | # | |
216 | # @format: format of the image file | |
217 | # | |
218 | # @virtual-size: maximum capacity in bytes of the image | |
219 | # | |
220 | # @actual-size: #optional actual size on disk in bytes of the image | |
221 | # | |
222 | # @dirty-flag: #optional true if image is not cleanly closed | |
223 | # | |
224 | # @cluster-size: #optional size of a cluster in bytes | |
225 | # | |
226 | # @encrypted: #optional true if the image is encrypted | |
227 | # | |
228 | # @backing-filename: #optional name of the backing file | |
229 | # | |
230 | # @full-backing-filename: #optional full path of the backing file | |
231 | # | |
232 | # @backing-filename-format: #optional the format of the backing file | |
233 | # | |
234 | # @snapshots: #optional list of VM snapshots | |
235 | # | |
236 | # Since: 1.3 | |
237 | # | |
238 | ## | |
239 | ||
240 | { 'type': 'ImageInfo', | |
241 | 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool', | |
242 | '*actual-size': 'int', 'virtual-size': 'int', | |
243 | '*cluster-size': 'int', '*encrypted': 'bool', | |
244 | '*backing-filename': 'str', '*full-backing-filename': 'str', | |
245 | '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } } | |
246 | ||
1fa9a5e4 LC |
247 | ## |
248 | # @StatusInfo: | |
249 | # | |
250 | # Information about VCPU run state | |
251 | # | |
252 | # @running: true if all VCPUs are runnable, false if not runnable | |
253 | # | |
254 | # @singlestep: true if VCPUs are in single-step mode | |
255 | # | |
256 | # @status: the virtual machine @RunState | |
257 | # | |
258 | # Since: 0.14.0 | |
259 | # | |
260 | # Notes: @singlestep is enabled through the GDB stub | |
261 | ## | |
262 | { 'type': 'StatusInfo', | |
263 | 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} } | |
264 | ||
265 | ## | |
266 | # @query-status: | |
267 | # | |
268 | # Query the run status of all VCPUs | |
269 | # | |
270 | # Returns: @StatusInfo reflecting all VCPUs | |
271 | # | |
272 | # Since: 0.14.0 | |
273 | ## | |
274 | { 'command': 'query-status', 'returns': 'StatusInfo' } | |
275 | ||
efab767e LC |
276 | ## |
277 | # @UuidInfo: | |
278 | # | |
279 | # Guest UUID information. | |
280 | # | |
281 | # @UUID: the UUID of the guest | |
282 | # | |
283 | # Since: 0.14.0 | |
284 | # | |
285 | # Notes: If no UUID was specified for the guest, a null UUID is returned. | |
286 | ## | |
287 | { 'type': 'UuidInfo', 'data': {'UUID': 'str'} } | |
288 | ||
289 | ## | |
290 | # @query-uuid: | |
291 | # | |
292 | # Query the guest UUID information. | |
293 | # | |
294 | # Returns: The @UuidInfo for the guest | |
295 | # | |
296 | # Since 0.14.0 | |
297 | ## | |
298 | { 'command': 'query-uuid', 'returns': 'UuidInfo' } | |
299 | ||
c5a415a0 LC |
300 | ## |
301 | # @ChardevInfo: | |
302 | # | |
303 | # Information about a character device. | |
304 | # | |
305 | # @label: the label of the character device | |
306 | # | |
307 | # @filename: the filename of the character device | |
308 | # | |
309 | # Notes: @filename is encoded using the QEMU command line character device | |
310 | # encoding. See the QEMU man page for details. | |
311 | # | |
312 | # Since: 0.14.0 | |
313 | ## | |
314 | { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} } | |
315 | ||
316 | ## | |
317 | # @query-chardev: | |
318 | # | |
319 | # Returns information about current character devices. | |
320 | # | |
321 | # Returns: a list of @ChardevInfo | |
322 | # | |
323 | # Since: 0.14.0 | |
324 | ## | |
325 | { 'command': 'query-chardev', 'returns': ['ChardevInfo'] } | |
aa9b79bc LC |
326 | |
327 | ## | |
328 | # @CommandInfo: | |
329 | # | |
330 | # Information about a QMP command | |
331 | # | |
332 | # @name: The command name | |
333 | # | |
334 | # Since: 0.14.0 | |
335 | ## | |
336 | { 'type': 'CommandInfo', 'data': {'name': 'str'} } | |
337 | ||
338 | ## | |
339 | # @query-commands: | |
340 | # | |
341 | # Return a list of supported QMP commands by this server | |
342 | # | |
343 | # Returns: A list of @CommandInfo for all supported commands | |
344 | # | |
345 | # Since: 0.14.0 | |
346 | ## | |
347 | { 'command': 'query-commands', 'returns': ['CommandInfo'] } | |
348 | ||
4860853d DB |
349 | ## |
350 | # @EventInfo: | |
351 | # | |
352 | # Information about a QMP event | |
353 | # | |
354 | # @name: The event name | |
355 | # | |
356 | # Since: 1.2.0 | |
357 | ## | |
358 | { 'type': 'EventInfo', 'data': {'name': 'str'} } | |
359 | ||
360 | ## | |
361 | # @query-events: | |
362 | # | |
363 | # Return a list of supported QMP events by this server | |
364 | # | |
365 | # Returns: A list of @EventInfo for all supported events | |
366 | # | |
367 | # Since: 1.2.0 | |
368 | ## | |
369 | { 'command': 'query-events', 'returns': ['EventInfo'] } | |
370 | ||
791e7c82 LC |
371 | ## |
372 | # @MigrationStats | |
373 | # | |
374 | # Detailed migration status. | |
375 | # | |
376 | # @transferred: amount of bytes already transferred to the target VM | |
377 | # | |
378 | # @remaining: amount of bytes remaining to be transferred to the target VM | |
379 | # | |
380 | # @total: total amount of bytes involved in the migration process | |
381 | # | |
004d4c10 OW |
382 | # @duplicate: number of duplicate pages (since 1.2) |
383 | # | |
384 | # @normal : number of normal pages (since 1.2) | |
385 | # | |
386 | # @normal-bytes : number of normal bytes sent (since 1.2) | |
387 | # | |
388 | # Since: 0.14.0 | |
791e7c82 LC |
389 | ## |
390 | { 'type': 'MigrationStats', | |
d5f8a570 | 391 | 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' , |
7aa939af | 392 | 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int' } } |
791e7c82 | 393 | |
f36d55af OW |
394 | ## |
395 | # @XBZRLECacheStats | |
396 | # | |
397 | # Detailed XBZRLE migration cache statistics | |
398 | # | |
399 | # @cache-size: XBZRLE cache size | |
400 | # | |
401 | # @bytes: amount of bytes already transferred to the target VM | |
402 | # | |
403 | # @pages: amount of pages transferred to the target VM | |
404 | # | |
405 | # @cache-miss: number of cache miss | |
406 | # | |
407 | # @overflow: number of overflows | |
408 | # | |
409 | # Since: 1.2 | |
410 | ## | |
411 | { 'type': 'XBZRLECacheStats', | |
412 | 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int', | |
413 | 'cache-miss': 'int', 'overflow': 'int' } } | |
414 | ||
791e7c82 LC |
415 | ## |
416 | # @MigrationInfo | |
417 | # | |
418 | # Information about current migration process. | |
419 | # | |
420 | # @status: #optional string describing the current migration status. | |
421 | # As of 0.14.0 this can be 'active', 'completed', 'failed' or | |
422 | # 'cancelled'. If this field is not returned, no migration process | |
423 | # has been initiated | |
424 | # | |
d5f8a570 JQ |
425 | # @ram: #optional @MigrationStats containing detailed migration |
426 | # status, only returned if status is 'active' or | |
427 | # 'completed'. 'comppleted' (since 1.2) | |
791e7c82 LC |
428 | # |
429 | # @disk: #optional @MigrationStats containing detailed disk migration | |
430 | # status, only returned if status is 'active' and it is a block | |
431 | # migration | |
432 | # | |
f36d55af OW |
433 | # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE |
434 | # migration statistics, only returned if XBZRLE feature is on and | |
435 | # status is 'active' or 'completed' (since 1.2) | |
436 | # | |
7aa939af JQ |
437 | # @total-time: #optional total amount of milliseconds since migration started. |
438 | # If migration has ended, it returns the total migration | |
439 | # time. (since 1.2) | |
440 | # | |
791e7c82 LC |
441 | # Since: 0.14.0 |
442 | ## | |
443 | { 'type': 'MigrationInfo', | |
444 | 'data': {'*status': 'str', '*ram': 'MigrationStats', | |
f36d55af | 445 | '*disk': 'MigrationStats', |
7aa939af JQ |
446 | '*xbzrle-cache': 'XBZRLECacheStats', |
447 | '*total-time': 'int'} } | |
791e7c82 LC |
448 | |
449 | ## | |
450 | # @query-migrate | |
451 | # | |
452 | # Returns information about current migration process. | |
453 | # | |
454 | # Returns: @MigrationInfo | |
455 | # | |
456 | # Since: 0.14.0 | |
457 | ## | |
458 | { 'command': 'query-migrate', 'returns': 'MigrationInfo' } | |
459 | ||
bbf6da32 OW |
460 | ## |
461 | # @MigrationCapability | |
462 | # | |
463 | # Migration capabilities enumeration | |
464 | # | |
465 | # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding). | |
466 | # This feature allows us to minimize migration traffic for certain work | |
467 | # loads, by sending compressed difference of the pages | |
468 | # | |
469 | # Since: 1.2 | |
470 | ## | |
471 | { 'enum': 'MigrationCapability', | |
472 | 'data': ['xbzrle'] } | |
473 | ||
474 | ## | |
475 | # @MigrationCapabilityStatus | |
476 | # | |
477 | # Migration capability information | |
478 | # | |
479 | # @capability: capability enum | |
480 | # | |
481 | # @state: capability state bool | |
482 | # | |
483 | # Since: 1.2 | |
484 | ## | |
485 | { 'type': 'MigrationCapabilityStatus', | |
486 | 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } } | |
487 | ||
488 | ## | |
00458433 OW |
489 | # @migrate-set-capabilities |
490 | # | |
491 | # Enable/Disable the following migration capabilities (like xbzrle) | |
492 | # | |
493 | # @capabilities: json array of capability modifications to make | |
494 | # | |
495 | # Since: 1.2 | |
496 | ## | |
497 | { 'command': 'migrate-set-capabilities', | |
498 | 'data': { 'capabilities': ['MigrationCapabilityStatus'] } } | |
499 | ||
500 | ## | |
bbf6da32 OW |
501 | # @query-migrate-capabilities |
502 | # | |
503 | # Returns information about the current migration capabilities status | |
504 | # | |
505 | # Returns: @MigrationCapabilitiesStatus | |
506 | # | |
507 | # Since: 1.2 | |
508 | ## | |
509 | { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']} | |
510 | ||
e235cec3 LC |
511 | ## |
512 | # @MouseInfo: | |
513 | # | |
514 | # Information about a mouse device. | |
515 | # | |
516 | # @name: the name of the mouse device | |
517 | # | |
518 | # @index: the index of the mouse device | |
519 | # | |
520 | # @current: true if this device is currently receiving mouse events | |
521 | # | |
522 | # @absolute: true if this device supports absolute coordinates as input | |
523 | # | |
524 | # Since: 0.14.0 | |
525 | ## | |
526 | { 'type': 'MouseInfo', | |
527 | 'data': {'name': 'str', 'index': 'int', 'current': 'bool', | |
528 | 'absolute': 'bool'} } | |
529 | ||
530 | ## | |
531 | # @query-mice: | |
532 | # | |
533 | # Returns information about each active mouse device | |
534 | # | |
535 | # Returns: a list of @MouseInfo for each device | |
536 | # | |
537 | # Since: 0.14.0 | |
538 | ## | |
539 | { 'command': 'query-mice', 'returns': ['MouseInfo'] } | |
540 | ||
de0b36b6 LC |
541 | ## |
542 | # @CpuInfo: | |
543 | # | |
544 | # Information about a virtual CPU | |
545 | # | |
546 | # @CPU: the index of the virtual CPU | |
547 | # | |
548 | # @current: this only exists for backwards compatible and should be ignored | |
b80e560b | 549 | # |
de0b36b6 LC |
550 | # @halted: true if the virtual CPU is in the halt state. Halt usually refers |
551 | # to a processor specific low power mode. | |
552 | # | |
553 | # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction | |
554 | # pointer. | |
555 | # If the target is Sparc, this is the PC component of the | |
556 | # instruction pointer. | |
557 | # | |
558 | # @nip: #optional If the target is PPC, the instruction pointer | |
559 | # | |
560 | # @npc: #optional If the target is Sparc, the NPC component of the instruction | |
561 | # pointer | |
562 | # | |
563 | # @PC: #optional If the target is MIPS, the instruction pointer | |
564 | # | |
565 | # @thread_id: ID of the underlying host thread | |
566 | # | |
567 | # Since: 0.14.0 | |
568 | # | |
569 | # Notes: @halted is a transient state that changes frequently. By the time the | |
570 | # data is sent to the client, the guest may no longer be halted. | |
571 | ## | |
572 | { 'type': 'CpuInfo', | |
573 | 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int', | |
574 | '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} } | |
575 | ||
576 | ## | |
577 | # @query-cpus: | |
578 | # | |
579 | # Returns a list of information about each virtual CPU. | |
580 | # | |
581 | # Returns: a list of @CpuInfo for each virtual CPU | |
582 | # | |
583 | # Since: 0.14.0 | |
584 | ## | |
585 | { 'command': 'query-cpus', 'returns': ['CpuInfo'] } | |
586 | ||
b2023818 LC |
587 | ## |
588 | # @BlockDeviceInfo: | |
589 | # | |
590 | # Information about the backing device for a block device. | |
591 | # | |
592 | # @file: the filename of the backing device | |
593 | # | |
594 | # @ro: true if the backing device was open read-only | |
595 | # | |
596 | # @drv: the name of the block format used to open the backing device. As of | |
597 | # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg', | |
598 | # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device', | |
599 | # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow', | |
600 | # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat' | |
601 | # | |
602 | # @backing_file: #optional the name of the backing file (for copy-on-write) | |
603 | # | |
2e3e3317 BC |
604 | # @backing_file_depth: number of files in the backing file chain (since: 1.2) |
605 | # | |
b2023818 LC |
606 | # @encrypted: true if the backing device is encrypted |
607 | # | |
c75a1a8a LC |
608 | # @encryption_key_missing: true if the backing device is encrypted but an |
609 | # valid encryption key is missing | |
610 | # | |
727f005e ZYW |
611 | # @bps: total throughput limit in bytes per second is specified |
612 | # | |
613 | # @bps_rd: read throughput limit in bytes per second is specified | |
614 | # | |
615 | # @bps_wr: write throughput limit in bytes per second is specified | |
616 | # | |
617 | # @iops: total I/O operations per second is specified | |
618 | # | |
619 | # @iops_rd: read I/O operations per second is specified | |
620 | # | |
621 | # @iops_wr: write I/O operations per second is specified | |
622 | # | |
b2023818 LC |
623 | # Since: 0.14.0 |
624 | # | |
625 | # Notes: This interface is only found in @BlockInfo. | |
626 | ## | |
627 | { 'type': 'BlockDeviceInfo', | |
628 | 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str', | |
2e3e3317 | 629 | '*backing_file': 'str', 'backing_file_depth': 'int', |
c75a1a8a LC |
630 | 'encrypted': 'bool', 'encryption_key_missing': 'bool', |
631 | 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', | |
632 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} } | |
b2023818 LC |
633 | |
634 | ## | |
635 | # @BlockDeviceIoStatus: | |
636 | # | |
637 | # An enumeration of block device I/O status. | |
638 | # | |
639 | # @ok: The last I/O operation has succeeded | |
640 | # | |
641 | # @failed: The last I/O operation has failed | |
642 | # | |
643 | # @nospace: The last I/O operation has failed due to a no-space condition | |
644 | # | |
645 | # Since: 1.0 | |
646 | ## | |
647 | { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] } | |
648 | ||
649 | ## | |
650 | # @BlockInfo: | |
651 | # | |
652 | # Block device information. This structure describes a virtual device and | |
653 | # the backing device associated with it. | |
654 | # | |
655 | # @device: The device name associated with the virtual device. | |
656 | # | |
657 | # @type: This field is returned only for compatibility reasons, it should | |
658 | # not be used (always returns 'unknown') | |
659 | # | |
660 | # @removable: True if the device supports removable media. | |
661 | # | |
662 | # @locked: True if the guest has locked this device from having its media | |
663 | # removed | |
664 | # | |
665 | # @tray_open: #optional True if the device has a tray and it is open | |
666 | # (only present if removable is true) | |
667 | # | |
668 | # @io-status: #optional @BlockDeviceIoStatus. Only present if the device | |
669 | # supports it and the VM is configured to stop on errors | |
670 | # | |
671 | # @inserted: #optional @BlockDeviceInfo describing the device if media is | |
672 | # present | |
673 | # | |
674 | # Since: 0.14.0 | |
675 | ## | |
676 | { 'type': 'BlockInfo', | |
677 | 'data': {'device': 'str', 'type': 'str', 'removable': 'bool', | |
678 | 'locked': 'bool', '*inserted': 'BlockDeviceInfo', | |
679 | '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} } | |
680 | ||
681 | ## | |
682 | # @query-block: | |
683 | # | |
684 | # Get a list of BlockInfo for all virtual block devices. | |
685 | # | |
686 | # Returns: a list of @BlockInfo describing each virtual block device | |
687 | # | |
688 | # Since: 0.14.0 | |
689 | ## | |
690 | { 'command': 'query-block', 'returns': ['BlockInfo'] } | |
691 | ||
f11f57e4 LC |
692 | ## |
693 | # @BlockDeviceStats: | |
694 | # | |
695 | # Statistics of a virtual block device or a block backing device. | |
696 | # | |
697 | # @rd_bytes: The number of bytes read by the device. | |
698 | # | |
699 | # @wr_bytes: The number of bytes written by the device. | |
700 | # | |
701 | # @rd_operations: The number of read operations performed by the device. | |
702 | # | |
703 | # @wr_operations: The number of write operations performed by the device. | |
704 | # | |
705 | # @flush_operations: The number of cache flush operations performed by the | |
706 | # device (since 0.15.0) | |
707 | # | |
708 | # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds | |
709 | # (since 0.15.0). | |
710 | # | |
711 | # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0). | |
712 | # | |
713 | # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0). | |
714 | # | |
715 | # @wr_highest_offset: The offset after the greatest byte written to the | |
716 | # device. The intended use of this information is for | |
717 | # growable sparse files (like qcow2) that are used on top | |
718 | # of a physical device. | |
719 | # | |
720 | # Since: 0.14.0 | |
721 | ## | |
722 | { 'type': 'BlockDeviceStats', | |
723 | 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int', | |
724 | 'wr_operations': 'int', 'flush_operations': 'int', | |
725 | 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int', | |
726 | 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } } | |
727 | ||
728 | ## | |
729 | # @BlockStats: | |
730 | # | |
731 | # Statistics of a virtual block device or a block backing device. | |
732 | # | |
733 | # @device: #optional If the stats are for a virtual block device, the name | |
734 | # corresponding to the virtual block device. | |
735 | # | |
736 | # @stats: A @BlockDeviceStats for the device. | |
737 | # | |
738 | # @parent: #optional This may point to the backing block device if this is a | |
739 | # a virtual block device. If it's a backing block, this will point | |
740 | # to the backing file is one is present. | |
741 | # | |
742 | # Since: 0.14.0 | |
743 | ## | |
744 | { 'type': 'BlockStats', | |
745 | 'data': {'*device': 'str', 'stats': 'BlockDeviceStats', | |
746 | '*parent': 'BlockStats'} } | |
747 | ||
748 | ## | |
749 | # @query-blockstats: | |
750 | # | |
751 | # Query the @BlockStats for all virtual block devices. | |
752 | # | |
753 | # Returns: A list of @BlockStats for each virtual block devices. | |
754 | # | |
755 | # Since: 0.14.0 | |
756 | ## | |
757 | { 'command': 'query-blockstats', 'returns': ['BlockStats'] } | |
758 | ||
2b54aa87 LC |
759 | ## |
760 | # @VncClientInfo: | |
761 | # | |
762 | # Information about a connected VNC client. | |
763 | # | |
764 | # @host: The host name of the client. QEMU tries to resolve this to a DNS name | |
765 | # when possible. | |
766 | # | |
767 | # @family: 'ipv6' if the client is connected via IPv6 and TCP | |
768 | # 'ipv4' if the client is connected via IPv4 and TCP | |
769 | # 'unix' if the client is connected via a unix domain socket | |
770 | # 'unknown' otherwise | |
771 | # | |
772 | # @service: The service name of the client's port. This may depends on the | |
773 | # host system's service database so symbolic names should not be | |
774 | # relied on. | |
775 | # | |
776 | # @x509_dname: #optional If x509 authentication is in use, the Distinguished | |
777 | # Name of the client. | |
778 | # | |
779 | # @sasl_username: #optional If SASL authentication is in use, the SASL username | |
780 | # used for authentication. | |
781 | # | |
782 | # Since: 0.14.0 | |
783 | ## | |
784 | { 'type': 'VncClientInfo', | |
785 | 'data': {'host': 'str', 'family': 'str', 'service': 'str', | |
786 | '*x509_dname': 'str', '*sasl_username': 'str'} } | |
787 | ||
788 | ## | |
789 | # @VncInfo: | |
790 | # | |
791 | # Information about the VNC session. | |
792 | # | |
793 | # @enabled: true if the VNC server is enabled, false otherwise | |
794 | # | |
795 | # @host: #optional The hostname the VNC server is bound to. This depends on | |
796 | # the name resolution on the host and may be an IP address. | |
797 | # | |
798 | # @family: #optional 'ipv6' if the host is listening for IPv6 connections | |
799 | # 'ipv4' if the host is listening for IPv4 connections | |
800 | # 'unix' if the host is listening on a unix domain socket | |
801 | # 'unknown' otherwise | |
802 | # | |
803 | # @service: #optional The service name of the server's port. This may depends | |
804 | # on the host system's service database so symbolic names should not | |
805 | # be relied on. | |
806 | # | |
807 | # @auth: #optional the current authentication type used by the server | |
808 | # 'none' if no authentication is being used | |
809 | # 'vnc' if VNC authentication is being used | |
810 | # 'vencrypt+plain' if VEncrypt is used with plain text authentication | |
811 | # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication | |
812 | # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication | |
813 | # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth | |
814 | # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth | |
815 | # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth | |
816 | # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth | |
817 | # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth | |
818 | # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth | |
819 | # | |
820 | # @clients: a list of @VncClientInfo of all currently connected clients | |
821 | # | |
822 | # Since: 0.14.0 | |
823 | ## | |
824 | { 'type': 'VncInfo', | |
825 | 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str', | |
826 | '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} } | |
827 | ||
828 | ## | |
829 | # @query-vnc: | |
830 | # | |
831 | # Returns information about the current VNC server | |
832 | # | |
833 | # Returns: @VncInfo | |
2b54aa87 LC |
834 | # |
835 | # Since: 0.14.0 | |
836 | ## | |
837 | { 'command': 'query-vnc', 'returns': 'VncInfo' } | |
838 | ||
d1f29646 LC |
839 | ## |
840 | # @SpiceChannel | |
841 | # | |
842 | # Information about a SPICE client channel. | |
843 | # | |
844 | # @host: The host name of the client. QEMU tries to resolve this to a DNS name | |
845 | # when possible. | |
846 | # | |
847 | # @family: 'ipv6' if the client is connected via IPv6 and TCP | |
848 | # 'ipv4' if the client is connected via IPv4 and TCP | |
849 | # 'unix' if the client is connected via a unix domain socket | |
850 | # 'unknown' otherwise | |
851 | # | |
852 | # @port: The client's port number. | |
853 | # | |
854 | # @connection-id: SPICE connection id number. All channels with the same id | |
855 | # belong to the same SPICE session. | |
856 | # | |
419e1bdf AL |
857 | # @connection-type: SPICE channel type number. "1" is the main control |
858 | # channel, filter for this one if you want to track spice | |
859 | # sessions only | |
d1f29646 | 860 | # |
419e1bdf AL |
861 | # @channel-id: SPICE channel ID number. Usually "0", might be different when |
862 | # multiple channels of the same type exist, such as multiple | |
d1f29646 LC |
863 | # display channels in a multihead setup |
864 | # | |
865 | # @tls: true if the channel is encrypted, false otherwise. | |
866 | # | |
867 | # Since: 0.14.0 | |
868 | ## | |
869 | { 'type': 'SpiceChannel', | |
870 | 'data': {'host': 'str', 'family': 'str', 'port': 'str', | |
871 | 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int', | |
872 | 'tls': 'bool'} } | |
873 | ||
4efee029 AL |
874 | ## |
875 | # @SpiceQueryMouseMode | |
876 | # | |
6932a69b | 877 | # An enumeration of Spice mouse states. |
4efee029 AL |
878 | # |
879 | # @client: Mouse cursor position is determined by the client. | |
880 | # | |
881 | # @server: Mouse cursor position is determined by the server. | |
882 | # | |
883 | # @unknown: No information is available about mouse mode used by | |
884 | # the spice server. | |
885 | # | |
886 | # Note: spice/enums.h has a SpiceMouseMode already, hence the name. | |
887 | # | |
888 | # Since: 1.1 | |
889 | ## | |
890 | { 'enum': 'SpiceQueryMouseMode', | |
891 | 'data': [ 'client', 'server', 'unknown' ] } | |
892 | ||
d1f29646 LC |
893 | ## |
894 | # @SpiceInfo | |
895 | # | |
896 | # Information about the SPICE session. | |
b80e560b | 897 | # |
d1f29646 LC |
898 | # @enabled: true if the SPICE server is enabled, false otherwise |
899 | # | |
61c4efe2 YH |
900 | # @migrated: true if the last guest migration completed and spice |
901 | # migration had completed as well. false otherwise. | |
902 | # | |
d1f29646 LC |
903 | # @host: #optional The hostname the SPICE server is bound to. This depends on |
904 | # the name resolution on the host and may be an IP address. | |
905 | # | |
906 | # @port: #optional The SPICE server's port number. | |
907 | # | |
908 | # @compiled-version: #optional SPICE server version. | |
909 | # | |
910 | # @tls-port: #optional The SPICE server's TLS port number. | |
911 | # | |
912 | # @auth: #optional the current authentication type used by the server | |
419e1bdf AL |
913 | # 'none' if no authentication is being used |
914 | # 'spice' uses SASL or direct TLS authentication, depending on command | |
915 | # line options | |
d1f29646 | 916 | # |
4efee029 AL |
917 | # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can |
918 | # be determined by the client or the server, or unknown if spice | |
919 | # server doesn't provide this information. | |
920 | # | |
921 | # Since: 1.1 | |
922 | # | |
d1f29646 LC |
923 | # @channels: a list of @SpiceChannel for each active spice channel |
924 | # | |
925 | # Since: 0.14.0 | |
926 | ## | |
927 | { 'type': 'SpiceInfo', | |
61c4efe2 | 928 | 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int', |
d1f29646 | 929 | '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str', |
4efee029 | 930 | 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} } |
d1f29646 LC |
931 | |
932 | ## | |
933 | # @query-spice | |
934 | # | |
935 | # Returns information about the current SPICE server | |
936 | # | |
937 | # Returns: @SpiceInfo | |
938 | # | |
939 | # Since: 0.14.0 | |
940 | ## | |
941 | { 'command': 'query-spice', 'returns': 'SpiceInfo' } | |
942 | ||
96637bcd LC |
943 | ## |
944 | # @BalloonInfo: | |
945 | # | |
946 | # Information about the guest balloon device. | |
947 | # | |
948 | # @actual: the number of bytes the balloon currently contains | |
949 | # | |
950 | # @mem_swapped_in: #optional number of pages swapped in within the guest | |
951 | # | |
952 | # @mem_swapped_out: #optional number of pages swapped out within the guest | |
953 | # | |
954 | # @major_page_faults: #optional number of major page faults within the guest | |
955 | # | |
956 | # @minor_page_faults: #optional number of minor page faults within the guest | |
957 | # | |
958 | # @free_mem: #optional amount of memory (in bytes) free in the guest | |
959 | # | |
960 | # @total_mem: #optional amount of memory (in bytes) visible to the guest | |
961 | # | |
962 | # Since: 0.14.0 | |
963 | # | |
964 | # Notes: all current versions of QEMU do not fill out optional information in | |
965 | # this structure. | |
966 | ## | |
967 | { 'type': 'BalloonInfo', | |
968 | 'data': {'actual': 'int', '*mem_swapped_in': 'int', | |
969 | '*mem_swapped_out': 'int', '*major_page_faults': 'int', | |
970 | '*minor_page_faults': 'int', '*free_mem': 'int', | |
971 | '*total_mem': 'int'} } | |
972 | ||
973 | ## | |
974 | # @query-balloon: | |
975 | # | |
976 | # Return information about the balloon device. | |
977 | # | |
978 | # Returns: @BalloonInfo on success | |
979 | # If the balloon driver is enabled but not functional because the KVM | |
980 | # kernel module cannot support it, KvmMissingCap | |
981 | # If no balloon device is present, DeviceNotActive | |
982 | # | |
983 | # Since: 0.14.0 | |
984 | ## | |
985 | { 'command': 'query-balloon', 'returns': 'BalloonInfo' } | |
986 | ||
79627472 LC |
987 | ## |
988 | # @PciMemoryRange: | |
989 | # | |
990 | # A PCI device memory region | |
991 | # | |
992 | # @base: the starting address (guest physical) | |
993 | # | |
994 | # @limit: the ending address (guest physical) | |
995 | # | |
996 | # Since: 0.14.0 | |
997 | ## | |
998 | { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} } | |
999 | ||
1000 | ## | |
1001 | # @PciMemoryRegion | |
1002 | # | |
1003 | # Information about a PCI device I/O region. | |
1004 | # | |
1005 | # @bar: the index of the Base Address Register for this region | |
1006 | # | |
1007 | # @type: 'io' if the region is a PIO region | |
1008 | # 'memory' if the region is a MMIO region | |
1009 | # | |
1010 | # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable | |
1011 | # | |
1012 | # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit | |
1013 | # | |
1014 | # Since: 0.14.0 | |
1015 | ## | |
1016 | { 'type': 'PciMemoryRegion', | |
1017 | 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int', | |
1018 | '*prefetch': 'bool', '*mem_type_64': 'bool' } } | |
1019 | ||
1020 | ## | |
1021 | # @PciBridgeInfo: | |
1022 | # | |
1023 | # Information about a PCI Bridge device | |
1024 | # | |
1025 | # @bus.number: primary bus interface number. This should be the number of the | |
1026 | # bus the device resides on. | |
1027 | # | |
1028 | # @bus.secondary: secondary bus interface number. This is the number of the | |
1029 | # main bus for the bridge | |
1030 | # | |
1031 | # @bus.subordinate: This is the highest number bus that resides below the | |
1032 | # bridge. | |
1033 | # | |
1034 | # @bus.io_range: The PIO range for all devices on this bridge | |
1035 | # | |
1036 | # @bus.memory_range: The MMIO range for all devices on this bridge | |
1037 | # | |
1038 | # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on | |
1039 | # this bridge | |
1040 | # | |
1041 | # @devices: a list of @PciDeviceInfo for each device on this bridge | |
1042 | # | |
1043 | # Since: 0.14.0 | |
1044 | ## | |
1045 | { 'type': 'PciBridgeInfo', | |
1046 | 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int', | |
1047 | 'io_range': 'PciMemoryRange', | |
1048 | 'memory_range': 'PciMemoryRange', | |
1049 | 'prefetchable_range': 'PciMemoryRange' }, | |
1050 | '*devices': ['PciDeviceInfo']} } | |
1051 | ||
1052 | ## | |
1053 | # @PciDeviceInfo: | |
1054 | # | |
1055 | # Information about a PCI device | |
1056 | # | |
1057 | # @bus: the bus number of the device | |
1058 | # | |
1059 | # @slot: the slot the device is located in | |
1060 | # | |
1061 | # @function: the function of the slot used by the device | |
1062 | # | |
1063 | # @class_info.desc: #optional a string description of the device's class | |
1064 | # | |
1065 | # @class_info.class: the class code of the device | |
1066 | # | |
1067 | # @id.device: the PCI device id | |
1068 | # | |
1069 | # @id.vendor: the PCI vendor id | |
1070 | # | |
1071 | # @irq: #optional if an IRQ is assigned to the device, the IRQ number | |
1072 | # | |
1073 | # @qdev_id: the device name of the PCI device | |
1074 | # | |
1075 | # @pci_bridge: if the device is a PCI bridge, the bridge information | |
1076 | # | |
1077 | # @regions: a list of the PCI I/O regions associated with the device | |
1078 | # | |
1079 | # Notes: the contents of @class_info.desc are not stable and should only be | |
1080 | # treated as informational. | |
1081 | # | |
1082 | # Since: 0.14.0 | |
1083 | ## | |
1084 | { 'type': 'PciDeviceInfo', | |
1085 | 'data': {'bus': 'int', 'slot': 'int', 'function': 'int', | |
1086 | 'class_info': {'*desc': 'str', 'class': 'int'}, | |
1087 | 'id': {'device': 'int', 'vendor': 'int'}, | |
1088 | '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo', | |
1089 | 'regions': ['PciMemoryRegion']} } | |
1090 | ||
1091 | ## | |
1092 | # @PciInfo: | |
1093 | # | |
1094 | # Information about a PCI bus | |
1095 | # | |
1096 | # @bus: the bus index | |
1097 | # | |
1098 | # @devices: a list of devices on this bus | |
1099 | # | |
1100 | # Since: 0.14.0 | |
1101 | ## | |
1102 | { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} } | |
1103 | ||
1104 | ## | |
1105 | # @query-pci: | |
1106 | # | |
1107 | # Return information about the PCI bus topology of the guest. | |
1108 | # | |
1109 | # Returns: a list of @PciInfo for each PCI bus | |
1110 | # | |
1111 | # Since: 0.14.0 | |
1112 | ## | |
1113 | { 'command': 'query-pci', 'returns': ['PciInfo'] } | |
1114 | ||
92aa5c6d PB |
1115 | ## |
1116 | # @BlockdevOnError: | |
1117 | # | |
1118 | # An enumeration of possible behaviors for errors on I/O operations. | |
1119 | # The exact meaning depends on whether the I/O was initiated by a guest | |
1120 | # or by a block job | |
1121 | # | |
1122 | # @report: for guest operations, report the error to the guest; | |
1123 | # for jobs, cancel the job | |
1124 | # | |
1125 | # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR | |
1126 | # or BLOCK_JOB_ERROR) | |
1127 | # | |
1128 | # @enospc: same as @stop on ENOSPC, same as @report otherwise. | |
1129 | # | |
1130 | # @stop: for guest operations, stop the virtual machine; | |
1131 | # for jobs, pause the job | |
1132 | # | |
1133 | # Since: 1.3 | |
1134 | ## | |
1135 | { 'enum': 'BlockdevOnError', | |
1136 | 'data': ['report', 'ignore', 'enospc', 'stop'] } | |
1137 | ||
fb5458cd SH |
1138 | ## |
1139 | # @BlockJobInfo: | |
1140 | # | |
1141 | # Information about a long-running block device operation. | |
1142 | # | |
1143 | # @type: the job type ('stream' for image streaming) | |
1144 | # | |
1145 | # @device: the block device name | |
1146 | # | |
1147 | # @len: the maximum progress value | |
1148 | # | |
8d65883f PB |
1149 | # @busy: false if the job is known to be in a quiescent state, with |
1150 | # no pending I/O. Since 1.3. | |
1151 | # | |
8acc72a4 PB |
1152 | # @paused: whether the job is paused or, if @busy is true, will |
1153 | # pause itself as soon as possible. Since 1.3. | |
1154 | # | |
fb5458cd SH |
1155 | # @offset: the current progress value |
1156 | # | |
1157 | # @speed: the rate limit, bytes per second | |
1158 | # | |
32c81a4a PB |
1159 | # @io-status: the status of the job (since 1.3) |
1160 | # | |
fb5458cd SH |
1161 | # Since: 1.1 |
1162 | ## | |
1163 | { 'type': 'BlockJobInfo', | |
1164 | 'data': {'type': 'str', 'device': 'str', 'len': 'int', | |
32c81a4a PB |
1165 | 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int', |
1166 | 'io-status': 'BlockDeviceIoStatus'} } | |
fb5458cd SH |
1167 | |
1168 | ## | |
1169 | # @query-block-jobs: | |
1170 | # | |
1171 | # Return information about long-running block device operations. | |
1172 | # | |
1173 | # Returns: a list of @BlockJobInfo for each active block job | |
1174 | # | |
1175 | # Since: 1.1 | |
1176 | ## | |
1177 | { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] } | |
1178 | ||
7a7f325e LC |
1179 | ## |
1180 | # @quit: | |
1181 | # | |
1182 | # This command will cause the QEMU process to exit gracefully. While every | |
1183 | # attempt is made to send the QMP response before terminating, this is not | |
1184 | # guaranteed. When using this interface, a premature EOF would not be | |
1185 | # unexpected. | |
1186 | # | |
1187 | # Since: 0.14.0 | |
1188 | ## | |
1189 | { 'command': 'quit' } | |
5f158f21 LC |
1190 | |
1191 | ## | |
1192 | # @stop: | |
1193 | # | |
1194 | # Stop all guest VCPU execution. | |
1195 | # | |
1196 | # Since: 0.14.0 | |
1197 | # | |
1198 | # Notes: This function will succeed even if the guest is already in the stopped | |
1199 | # state | |
1200 | ## | |
1201 | { 'command': 'stop' } | |
38d22653 LC |
1202 | |
1203 | ## | |
1204 | # @system_reset: | |
1205 | # | |
1206 | # Performs a hard reset of a guest. | |
1207 | # | |
1208 | # Since: 0.14.0 | |
1209 | ## | |
1210 | { 'command': 'system_reset' } | |
5bc465e4 LC |
1211 | |
1212 | ## | |
1213 | # @system_powerdown: | |
1214 | # | |
1215 | # Requests that a guest perform a powerdown operation. | |
1216 | # | |
1217 | # Since: 0.14.0 | |
1218 | # | |
1219 | # Notes: A guest may or may not respond to this command. This command | |
1220 | # returning does not indicate that a guest has accepted the request or | |
1221 | # that it has shut down. Many guests will respond to this command by | |
1222 | # prompting the user in some way. | |
1223 | ## | |
1224 | { 'command': 'system_powerdown' } | |
755f1968 LC |
1225 | |
1226 | ## | |
1227 | # @cpu: | |
1228 | # | |
1229 | # This command is a nop that is only provided for the purposes of compatibility. | |
1230 | # | |
1231 | # Since: 0.14.0 | |
1232 | # | |
1233 | # Notes: Do not use this command. | |
1234 | ## | |
1235 | { 'command': 'cpu', 'data': {'index': 'int'} } | |
0cfd6a9a LC |
1236 | |
1237 | ## | |
1238 | # @memsave: | |
1239 | # | |
1240 | # Save a portion of guest memory to a file. | |
1241 | # | |
1242 | # @val: the virtual address of the guest to start from | |
1243 | # | |
1244 | # @size: the size of memory region to save | |
1245 | # | |
1246 | # @filename: the file to save the memory to as binary data | |
1247 | # | |
1248 | # @cpu-index: #optional the index of the virtual CPU to use for translating the | |
1249 | # virtual address (defaults to CPU 0) | |
1250 | # | |
1251 | # Returns: Nothing on success | |
0cfd6a9a LC |
1252 | # |
1253 | # Since: 0.14.0 | |
1254 | # | |
1255 | # Notes: Errors were not reliably returned until 1.1 | |
1256 | ## | |
1257 | { 'command': 'memsave', | |
1258 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} } | |
6d3962bf LC |
1259 | |
1260 | ## | |
1261 | # @pmemsave: | |
1262 | # | |
1263 | # Save a portion of guest physical memory to a file. | |
1264 | # | |
1265 | # @val: the physical address of the guest to start from | |
1266 | # | |
1267 | # @size: the size of memory region to save | |
1268 | # | |
1269 | # @filename: the file to save the memory to as binary data | |
1270 | # | |
1271 | # Returns: Nothing on success | |
6d3962bf LC |
1272 | # |
1273 | # Since: 0.14.0 | |
1274 | # | |
1275 | # Notes: Errors were not reliably returned until 1.1 | |
1276 | ## | |
1277 | { 'command': 'pmemsave', | |
1278 | 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} } | |
e42e818b LC |
1279 | |
1280 | ## | |
1281 | # @cont: | |
1282 | # | |
1283 | # Resume guest VCPU execution. | |
1284 | # | |
1285 | # Since: 0.14.0 | |
1286 | # | |
1287 | # Returns: If successful, nothing | |
1288 | # If the QEMU is waiting for an incoming migration, MigrationExpected | |
1289 | # If QEMU was started with an encrypted block device and a key has | |
1290 | # not yet been set, DeviceEncrypted. | |
1291 | # | |
1292 | # Notes: This command will succeed if the guest is currently running. | |
1293 | ## | |
1294 | { 'command': 'cont' } | |
1295 | ||
9b9df25a GH |
1296 | ## |
1297 | # @system_wakeup: | |
1298 | # | |
1299 | # Wakeup guest from suspend. Does nothing in case the guest isn't suspended. | |
1300 | # | |
1301 | # Since: 1.1 | |
1302 | # | |
1303 | # Returns: nothing. | |
1304 | ## | |
1305 | { 'command': 'system_wakeup' } | |
1306 | ||
ab49ab5c LC |
1307 | ## |
1308 | # @inject-nmi: | |
1309 | # | |
1310 | # Injects an Non-Maskable Interrupt into all guest's VCPUs. | |
1311 | # | |
1312 | # Returns: If successful, nothing | |
ab49ab5c LC |
1313 | # |
1314 | # Since: 0.14.0 | |
1315 | # | |
1316 | # Notes: Only x86 Virtual Machines support this command. | |
1317 | ## | |
1318 | { 'command': 'inject-nmi' } | |
4b37156c LC |
1319 | |
1320 | ## | |
1321 | # @set_link: | |
1322 | # | |
1323 | # Sets the link status of a virtual network adapter. | |
1324 | # | |
1325 | # @name: the device name of the virtual network adapter | |
1326 | # | |
1327 | # @up: true to set the link status to be up | |
1328 | # | |
1329 | # Returns: Nothing on success | |
1330 | # If @name is not a valid network device, DeviceNotFound | |
1331 | # | |
1332 | # Since: 0.14.0 | |
1333 | # | |
1334 | # Notes: Not all network adapters support setting link status. This command | |
1335 | # will succeed even if the network adapter does not support link status | |
1336 | # notification. | |
1337 | ## | |
1338 | { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} } | |
a4dea8a9 LC |
1339 | |
1340 | ## | |
1341 | # @block_passwd: | |
1342 | # | |
1343 | # This command sets the password of a block device that has not been open | |
1344 | # with a password and requires one. | |
1345 | # | |
1346 | # The two cases where this can happen are a block device is created through | |
1347 | # QEMU's initial command line or a block device is changed through the legacy | |
1348 | # @change interface. | |
1349 | # | |
1350 | # In the event that the block device is created through the initial command | |
1351 | # line, the VM will start in the stopped state regardless of whether '-S' is | |
1352 | # used. The intention is for a management tool to query the block devices to | |
1353 | # determine which ones are encrypted, set the passwords with this command, and | |
1354 | # then start the guest with the @cont command. | |
1355 | # | |
1356 | # @device: the name of the device to set the password on | |
1357 | # | |
1358 | # @password: the password to use for the device | |
1359 | # | |
1360 | # Returns: nothing on success | |
1361 | # If @device is not a valid block device, DeviceNotFound | |
1362 | # If @device is not encrypted, DeviceNotEncrypted | |
a4dea8a9 LC |
1363 | # |
1364 | # Notes: Not all block formats support encryption and some that do are not | |
1365 | # able to validate that a password is correct. Disk corruption may | |
1366 | # occur if an invalid password is specified. | |
1367 | # | |
1368 | # Since: 0.14.0 | |
1369 | ## | |
1370 | { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} } | |
d72f3264 LC |
1371 | |
1372 | ## | |
1373 | # @balloon: | |
1374 | # | |
1375 | # Request the balloon driver to change its balloon size. | |
1376 | # | |
1377 | # @value: the target size of the balloon in bytes | |
1378 | # | |
1379 | # Returns: Nothing on success | |
1380 | # If the balloon driver is enabled but not functional because the KVM | |
1381 | # kernel module cannot support it, KvmMissingCap | |
1382 | # If no balloon device is present, DeviceNotActive | |
1383 | # | |
1384 | # Notes: This command just issues a request to the guest. When it returns, | |
1385 | # the balloon size may not have changed. A guest can change the balloon | |
1386 | # size independent of this command. | |
1387 | # | |
1388 | # Since: 0.14.0 | |
1389 | ## | |
1390 | { 'command': 'balloon', 'data': {'value': 'int'} } | |
5e7caacb LC |
1391 | |
1392 | ## | |
1393 | # @block_resize | |
1394 | # | |
1395 | # Resize a block image while a guest is running. | |
1396 | # | |
1397 | # @device: the name of the device to get the image resized | |
1398 | # | |
1399 | # @size: new image size in bytes | |
1400 | # | |
1401 | # Returns: nothing on success | |
1402 | # If @device is not a valid block device, DeviceNotFound | |
5e7caacb LC |
1403 | # |
1404 | # Since: 0.14.0 | |
1405 | ## | |
1406 | { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }} | |
6106e249 | 1407 | |
8802d1fd | 1408 | ## |
bc8b094f PB |
1409 | # @NewImageMode |
1410 | # | |
1411 | # An enumeration that tells QEMU how to set the backing file path in | |
1412 | # a new image file. | |
1413 | # | |
1414 | # @existing: QEMU should look for an existing image file. | |
1415 | # | |
1416 | # @absolute-paths: QEMU should create a new image with absolute paths | |
1417 | # for the backing file. | |
1418 | # | |
1419 | # Since: 1.1 | |
1420 | ## | |
1421 | { 'enum': 'NewImageMode' | |
1422 | 'data': [ 'existing', 'absolute-paths' ] } | |
1423 | ||
8802d1fd | 1424 | ## |
52e7c241 | 1425 | # @BlockdevSnapshot |
8802d1fd JC |
1426 | # |
1427 | # @device: the name of the device to generate the snapshot from. | |
1428 | # | |
1429 | # @snapshot-file: the target of the new image. A new file will be created. | |
1430 | # | |
1431 | # @format: #optional the format of the snapshot image, default is 'qcow2'. | |
6cc2a415 PB |
1432 | # |
1433 | # @mode: #optional whether and how QEMU should create a new image, default is | |
8bde9b6f | 1434 | # 'absolute-paths'. |
8802d1fd | 1435 | ## |
52e7c241 | 1436 | { 'type': 'BlockdevSnapshot', |
bc8b094f PB |
1437 | 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str', |
1438 | '*mode': 'NewImageMode' } } | |
8802d1fd JC |
1439 | |
1440 | ## | |
52e7c241 | 1441 | # @BlockdevAction |
8802d1fd | 1442 | # |
52e7c241 PB |
1443 | # A discriminated record of operations that can be performed with |
1444 | # @transaction. | |
8802d1fd | 1445 | ## |
52e7c241 PB |
1446 | { 'union': 'BlockdevAction', |
1447 | 'data': { | |
1448 | 'blockdev-snapshot-sync': 'BlockdevSnapshot', | |
1449 | } } | |
8802d1fd JC |
1450 | |
1451 | ## | |
52e7c241 | 1452 | # @transaction |
8802d1fd | 1453 | # |
52e7c241 PB |
1454 | # Atomically operate on a group of one or more block devices. If |
1455 | # any operation fails, then the entire set of actions will be | |
1456 | # abandoned and the appropriate error returned. The only operation | |
1457 | # supported is currently blockdev-snapshot-sync. | |
8802d1fd JC |
1458 | # |
1459 | # List of: | |
52e7c241 | 1460 | # @BlockdevAction: information needed for the device snapshot |
8802d1fd JC |
1461 | # |
1462 | # Returns: nothing on success | |
1463 | # If @device is not a valid block device, DeviceNotFound | |
8802d1fd | 1464 | # |
52e7c241 PB |
1465 | # Note: The transaction aborts on the first failure. Therefore, there will |
1466 | # be only one device or snapshot file returned in an error condition, and | |
1467 | # subsequent actions will not have been attempted. | |
1468 | # | |
1469 | # Since 1.1 | |
8802d1fd | 1470 | ## |
52e7c241 PB |
1471 | { 'command': 'transaction', |
1472 | 'data': { 'actions': [ 'BlockdevAction' ] } } | |
8802d1fd | 1473 | |
6106e249 LC |
1474 | ## |
1475 | # @blockdev-snapshot-sync | |
1476 | # | |
1477 | # Generates a synchronous snapshot of a block device. | |
1478 | # | |
1479 | # @device: the name of the device to generate the snapshot from. | |
1480 | # | |
1481 | # @snapshot-file: the target of the new image. If the file exists, or if it | |
1482 | # is a device, the snapshot will be created in the existing | |
1483 | # file/device. If does not exist, a new file will be created. | |
1484 | # | |
1485 | # @format: #optional the format of the snapshot image, default is 'qcow2'. | |
1486 | # | |
6cc2a415 | 1487 | # @mode: #optional whether and how QEMU should create a new image, default is |
8bde9b6f | 1488 | # 'absolute-paths'. |
6cc2a415 | 1489 | # |
6106e249 LC |
1490 | # Returns: nothing on success |
1491 | # If @device is not a valid block device, DeviceNotFound | |
6106e249 | 1492 | # |
6106e249 LC |
1493 | # Since 0.14.0 |
1494 | ## | |
1495 | { 'command': 'blockdev-snapshot-sync', | |
6cc2a415 PB |
1496 | 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str', |
1497 | '*mode': 'NewImageMode'} } | |
d51a67b4 LC |
1498 | |
1499 | ## | |
1500 | # @human-monitor-command: | |
1501 | # | |
1502 | # Execute a command on the human monitor and return the output. | |
1503 | # | |
1504 | # @command-line: the command to execute in the human monitor | |
1505 | # | |
1506 | # @cpu-index: #optional The CPU to use for commands that require an implicit CPU | |
1507 | # | |
1508 | # Returns: the output of the command as a string | |
1509 | # | |
1510 | # Since: 0.14.0 | |
1511 | # | |
1512 | # Notes: This command only exists as a stop-gap. It's use is highly | |
1513 | # discouraged. The semantics of this command are not guaranteed. | |
1514 | # | |
1515 | # Known limitations: | |
1516 | # | |
1517 | # o This command is stateless, this means that commands that depend | |
1518 | # on state information (such as getfd) might not work | |
1519 | # | |
1520 | # o Commands that prompt the user for data (eg. 'cont' when the block | |
1521 | # device is encrypted) don't currently work | |
1522 | ## | |
1523 | { 'command': 'human-monitor-command', | |
1524 | 'data': {'command-line': 'str', '*cpu-index': 'int'}, | |
b80e560b | 1525 | 'returns': 'str' } |
6cdedb07 LC |
1526 | |
1527 | ## | |
ed61fc10 JC |
1528 | # @block-commit |
1529 | # | |
1530 | # Live commit of data from overlay image nodes into backing nodes - i.e., | |
1531 | # writes data between 'top' and 'base' into 'base'. | |
1532 | # | |
1533 | # @device: the name of the device | |
1534 | # | |
1535 | # @base: #optional The file name of the backing image to write data into. | |
1536 | # If not specified, this is the deepest backing image | |
1537 | # | |
1538 | # @top: The file name of the backing image within the image chain, | |
1539 | # which contains the topmost data to be committed down. | |
1540 | # Note, the active layer as 'top' is currently unsupported. | |
1541 | # | |
1542 | # If top == base, that is an error. | |
1543 | # | |
1544 | # | |
1545 | # @speed: #optional the maximum speed, in bytes per second | |
1546 | # | |
1547 | # Returns: Nothing on success | |
1548 | # If commit or stream is already active on this device, DeviceInUse | |
1549 | # If @device does not exist, DeviceNotFound | |
1550 | # If image commit is not supported by this device, NotSupported | |
1551 | # If @base or @top is invalid, a generic error is returned | |
1552 | # If @top is the active layer, or omitted, a generic error is returned | |
1553 | # If @speed is invalid, InvalidParameter | |
1554 | # | |
1555 | # Since: 1.3 | |
1556 | # | |
1557 | ## | |
1558 | { 'command': 'block-commit', | |
1559 | 'data': { 'device': 'str', '*base': 'str', 'top': 'str', | |
1560 | '*speed': 'int' } } | |
1561 | ||
6cdedb07 LC |
1562 | # @migrate_cancel |
1563 | # | |
1564 | # Cancel the current executing migration process. | |
1565 | # | |
1566 | # Returns: nothing on success | |
1567 | # | |
1568 | # Notes: This command succeeds even if there is no migration process running. | |
1569 | # | |
1570 | # Since: 0.14.0 | |
1571 | ## | |
1572 | { 'command': 'migrate_cancel' } | |
4f0a993b LC |
1573 | |
1574 | ## | |
1575 | # @migrate_set_downtime | |
1576 | # | |
1577 | # Set maximum tolerated downtime for migration. | |
1578 | # | |
1579 | # @value: maximum downtime in seconds | |
1580 | # | |
1581 | # Returns: nothing on success | |
1582 | # | |
1583 | # Since: 0.14.0 | |
1584 | ## | |
1585 | { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} } | |
3dc85383 LC |
1586 | |
1587 | ## | |
1588 | # @migrate_set_speed | |
1589 | # | |
1590 | # Set maximum speed for migration. | |
1591 | # | |
1592 | # @value: maximum speed in bytes. | |
1593 | # | |
1594 | # Returns: nothing on success | |
1595 | # | |
1596 | # Notes: A value lesser than zero will be automatically round up to zero. | |
1597 | # | |
1598 | # Since: 0.14.0 | |
1599 | ## | |
1600 | { 'command': 'migrate_set_speed', 'data': {'value': 'int'} } | |
b4b12c62 | 1601 | |
9e1ba4cc OW |
1602 | ## |
1603 | # @migrate-set-cache-size | |
1604 | # | |
1605 | # Set XBZRLE cache size | |
1606 | # | |
1607 | # @value: cache size in bytes | |
1608 | # | |
1609 | # The size will be rounded down to the nearest power of 2. | |
1610 | # The cache size can be modified before and during ongoing migration | |
1611 | # | |
1612 | # Returns: nothing on success | |
1613 | # | |
1614 | # Since: 1.2 | |
1615 | ## | |
1616 | { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} } | |
1617 | ||
1618 | ## | |
1619 | # @query-migrate-cache-size | |
1620 | # | |
1621 | # query XBZRLE cache size | |
1622 | # | |
1623 | # Returns: XBZRLE cache size in bytes | |
1624 | # | |
1625 | # Since: 1.2 | |
1626 | ## | |
1627 | { 'command': 'query-migrate-cache-size', 'returns': 'int' } | |
1628 | ||
b4b12c62 | 1629 | ## |
d03ee401 | 1630 | # @ObjectPropertyInfo: |
b4b12c62 AL |
1631 | # |
1632 | # @name: the name of the property | |
1633 | # | |
1634 | # @type: the type of the property. This will typically come in one of four | |
1635 | # forms: | |
1636 | # | |
1637 | # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'. | |
1638 | # These types are mapped to the appropriate JSON type. | |
1639 | # | |
1640 | # 2) A legacy type in the form 'legacy<subtype>' where subtype is the | |
1641 | # legacy qdev typename. These types are always treated as strings. | |
1642 | # | |
1643 | # 3) A child type in the form 'child<subtype>' where subtype is a qdev | |
1644 | # device type name. Child properties create the composition tree. | |
1645 | # | |
1646 | # 4) A link type in the form 'link<subtype>' where subtype is a qdev | |
1647 | # device type name. Link properties form the device model graph. | |
1648 | # | |
51920820 | 1649 | # Since: 1.2 |
b4b12c62 | 1650 | ## |
57c9fafe | 1651 | { 'type': 'ObjectPropertyInfo', |
b4b12c62 AL |
1652 | 'data': { 'name': 'str', 'type': 'str' } } |
1653 | ||
1654 | ## | |
1655 | # @qom-list: | |
1656 | # | |
57c9fafe | 1657 | # This command will list any properties of a object given a path in the object |
b4b12c62 AL |
1658 | # model. |
1659 | # | |
57c9fafe | 1660 | # @path: the path within the object model. See @qom-get for a description of |
b4b12c62 AL |
1661 | # this parameter. |
1662 | # | |
57c9fafe AL |
1663 | # Returns: a list of @ObjectPropertyInfo that describe the properties of the |
1664 | # object. | |
b4b12c62 | 1665 | # |
51920820 | 1666 | # Since: 1.2 |
b4b12c62 AL |
1667 | ## |
1668 | { 'command': 'qom-list', | |
1669 | 'data': { 'path': 'str' }, | |
57c9fafe | 1670 | 'returns': [ 'ObjectPropertyInfo' ] } |
eb6e8ea5 AL |
1671 | |
1672 | ## | |
1673 | # @qom-get: | |
1674 | # | |
57c9fafe | 1675 | # This command will get a property from a object model path and return the |
eb6e8ea5 AL |
1676 | # value. |
1677 | # | |
57c9fafe | 1678 | # @path: The path within the object model. There are two forms of supported |
eb6e8ea5 AL |
1679 | # paths--absolute and partial paths. |
1680 | # | |
57c9fafe | 1681 | # Absolute paths are derived from the root object and can follow child<> |
eb6e8ea5 AL |
1682 | # or link<> properties. Since they can follow link<> properties, they |
1683 | # can be arbitrarily long. Absolute paths look like absolute filenames | |
1684 | # and are prefixed with a leading slash. | |
1685 | # | |
1686 | # Partial paths look like relative filenames. They do not begin | |
1687 | # with a prefix. The matching rules for partial paths are subtle but | |
57c9fafe | 1688 | # designed to make specifying objects easy. At each level of the |
eb6e8ea5 AL |
1689 | # composition tree, the partial path is matched as an absolute path. |
1690 | # The first match is not returned. At least two matches are searched | |
1691 | # for. A successful result is only returned if only one match is | |
1692 | # found. If more than one match is found, a flag is return to | |
1693 | # indicate that the match was ambiguous. | |
1694 | # | |
1695 | # @property: The property name to read | |
1696 | # | |
1697 | # Returns: The property value. The type depends on the property type. legacy<> | |
1698 | # properties are returned as #str. child<> and link<> properties are | |
1699 | # returns as #str pathnames. All integer property types (u8, u16, etc) | |
1700 | # are returned as #int. | |
1701 | # | |
51920820 | 1702 | # Since: 1.2 |
eb6e8ea5 AL |
1703 | ## |
1704 | { 'command': 'qom-get', | |
1705 | 'data': { 'path': 'str', 'property': 'str' }, | |
1706 | 'returns': 'visitor', | |
1707 | 'gen': 'no' } | |
1708 | ||
1709 | ## | |
1710 | # @qom-set: | |
1711 | # | |
57c9fafe | 1712 | # This command will set a property from a object model path. |
eb6e8ea5 AL |
1713 | # |
1714 | # @path: see @qom-get for a description of this parameter | |
1715 | # | |
1716 | # @property: the property name to set | |
1717 | # | |
1718 | # @value: a value who's type is appropriate for the property type. See @qom-get | |
1719 | # for a description of type mapping. | |
1720 | # | |
51920820 | 1721 | # Since: 1.2 |
eb6e8ea5 AL |
1722 | ## |
1723 | { 'command': 'qom-set', | |
1724 | 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' }, | |
1725 | 'gen': 'no' } | |
fbf796fd LC |
1726 | |
1727 | ## | |
1728 | # @set_password: | |
1729 | # | |
1730 | # Sets the password of a remote display session. | |
1731 | # | |
1732 | # @protocol: `vnc' to modify the VNC server password | |
1733 | # `spice' to modify the Spice server password | |
1734 | # | |
1735 | # @password: the new password | |
1736 | # | |
1737 | # @connected: #optional how to handle existing clients when changing the | |
b80e560b | 1738 | # password. If nothing is specified, defaults to `keep' |
fbf796fd LC |
1739 | # `fail' to fail the command if clients are connected |
1740 | # `disconnect' to disconnect existing clients | |
1741 | # `keep' to maintain existing clients | |
1742 | # | |
1743 | # Returns: Nothing on success | |
1744 | # If Spice is not enabled, DeviceNotFound | |
fbf796fd LC |
1745 | # |
1746 | # Since: 0.14.0 | |
1747 | ## | |
1748 | { 'command': 'set_password', | |
1749 | 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} } | |
9ad5372d LC |
1750 | |
1751 | ## | |
1752 | # @expire_password: | |
1753 | # | |
1754 | # Expire the password of a remote display server. | |
1755 | # | |
1756 | # @protocol: the name of the remote display protocol `vnc' or `spice' | |
1757 | # | |
1758 | # @time: when to expire the password. | |
1759 | # `now' to expire the password immediately | |
1760 | # `never' to cancel password expiration | |
1761 | # `+INT' where INT is the number of seconds from now (integer) | |
1762 | # `INT' where INT is the absolute time in seconds | |
1763 | # | |
1764 | # Returns: Nothing on success | |
1765 | # If @protocol is `spice' and Spice is not active, DeviceNotFound | |
9ad5372d LC |
1766 | # |
1767 | # Since: 0.14.0 | |
1768 | # | |
1769 | # Notes: Time is relative to the server and currently there is no way to | |
1770 | # coordinate server time with client time. It is not recommended to | |
1771 | # use the absolute time version of the @time parameter unless you're | |
1772 | # sure you are on the same machine as the QEMU instance. | |
1773 | ## | |
1774 | { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} } | |
c245b6a3 LC |
1775 | |
1776 | ## | |
1777 | # @eject: | |
1778 | # | |
1779 | # Ejects a device from a removable drive. | |
1780 | # | |
1781 | # @device: The name of the device | |
1782 | # | |
1783 | # @force: @optional If true, eject regardless of whether the drive is locked. | |
1784 | # If not specified, the default value is false. | |
1785 | # | |
1786 | # Returns: Nothing on success | |
1787 | # If @device is not a valid block device, DeviceNotFound | |
c245b6a3 LC |
1788 | # |
1789 | # Notes: Ejecting a device will no media results in success | |
1790 | # | |
1791 | # Since: 0.14.0 | |
1792 | ## | |
1793 | { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} } | |
270b243f LC |
1794 | |
1795 | ## | |
1796 | # @change-vnc-password: | |
1797 | # | |
1798 | # Change the VNC server password. | |
1799 | # | |
1800 | # @target: the new password to use with VNC authentication | |
1801 | # | |
1802 | # Since: 1.1 | |
1803 | # | |
1804 | # Notes: An empty password in this command will set the password to the empty | |
1805 | # string. Existing clients are unaffected by executing this command. | |
1806 | ## | |
1807 | { 'command': 'change-vnc-password', 'data': {'password': 'str'} } | |
333a96ec LC |
1808 | |
1809 | ## | |
1810 | # @change: | |
1811 | # | |
1812 | # This command is multiple commands multiplexed together. | |
1813 | # | |
1814 | # @device: This is normally the name of a block device but it may also be 'vnc'. | |
1815 | # when it's 'vnc', then sub command depends on @target | |
1816 | # | |
1817 | # @target: If @device is a block device, then this is the new filename. | |
1818 | # If @device is 'vnc', then if the value 'password' selects the vnc | |
1819 | # change password command. Otherwise, this specifies a new server URI | |
1820 | # address to listen to for VNC connections. | |
1821 | # | |
1822 | # @arg: If @device is a block device, then this is an optional format to open | |
1823 | # the device with. | |
1824 | # If @device is 'vnc' and @target is 'password', this is the new VNC | |
1825 | # password to set. If this argument is an empty string, then no future | |
1826 | # logins will be allowed. | |
1827 | # | |
1828 | # Returns: Nothing on success. | |
1829 | # If @device is not a valid block device, DeviceNotFound | |
333a96ec LC |
1830 | # If the new block device is encrypted, DeviceEncrypted. Note that |
1831 | # if this error is returned, the device has been opened successfully | |
1832 | # and an additional call to @block_passwd is required to set the | |
1833 | # device's password. The behavior of reads and writes to the block | |
1834 | # device between when these calls are executed is undefined. | |
1835 | # | |
1836 | # Notes: It is strongly recommended that this interface is not used especially | |
1837 | # for changing block devices. | |
1838 | # | |
1839 | # Since: 0.14.0 | |
1840 | ## | |
1841 | { 'command': 'change', | |
1842 | 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} } | |
80047da5 LC |
1843 | |
1844 | ## | |
1845 | # @block_set_io_throttle: | |
1846 | # | |
1847 | # Change I/O throttle limits for a block drive. | |
1848 | # | |
1849 | # @device: The name of the device | |
1850 | # | |
1851 | # @bps: total throughput limit in bytes per second | |
1852 | # | |
1853 | # @bps_rd: read throughput limit in bytes per second | |
1854 | # | |
1855 | # @bps_wr: write throughput limit in bytes per second | |
1856 | # | |
1857 | # @iops: total I/O operations per second | |
1858 | # | |
1859 | # @ops_rd: read I/O operations per second | |
1860 | # | |
1861 | # @iops_wr: write I/O operations per second | |
1862 | # | |
1863 | # Returns: Nothing on success | |
1864 | # If @device is not a valid block device, DeviceNotFound | |
80047da5 LC |
1865 | # |
1866 | # Since: 1.1 | |
b80e560b | 1867 | ## |
80047da5 LC |
1868 | { 'command': 'block_set_io_throttle', |
1869 | 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int', | |
1870 | 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } } | |
12bd451f | 1871 | |
db58f9c0 SH |
1872 | ## |
1873 | # @block-stream: | |
12bd451f SH |
1874 | # |
1875 | # Copy data from a backing file into a block device. | |
1876 | # | |
1877 | # The block streaming operation is performed in the background until the entire | |
1878 | # backing file has been copied. This command returns immediately once streaming | |
1879 | # has started. The status of ongoing block streaming operations can be checked | |
1880 | # with query-block-jobs. The operation can be stopped before it has completed | |
db58f9c0 | 1881 | # using the block-job-cancel command. |
12bd451f SH |
1882 | # |
1883 | # If a base file is specified then sectors are not copied from that base file and | |
1884 | # its backing chain. When streaming completes the image file will have the base | |
1885 | # file as its backing file. This can be used to stream a subset of the backing | |
1886 | # file chain instead of flattening the entire image. | |
1887 | # | |
1888 | # On successful completion the image file is updated to drop the backing file | |
1889 | # and the BLOCK_JOB_COMPLETED event is emitted. | |
1890 | # | |
1891 | # @device: the device name | |
1892 | # | |
1893 | # @base: #optional the common backing file name | |
1894 | # | |
c83c66c3 SH |
1895 | # @speed: #optional the maximum speed, in bytes per second |
1896 | # | |
1d809098 PB |
1897 | # @on-error: #optional the action to take on an error (default report). |
1898 | # 'stop' and 'enospc' can only be used if the block device | |
1899 | # supports io-status (see BlockInfo). Since 1.3. | |
1900 | # | |
12bd451f | 1901 | # Returns: Nothing on success |
12bd451f | 1902 | # If @device does not exist, DeviceNotFound |
12bd451f SH |
1903 | # |
1904 | # Since: 1.1 | |
1905 | ## | |
1d809098 PB |
1906 | { 'command': 'block-stream', |
1907 | 'data': { 'device': 'str', '*base': 'str', '*speed': 'int', | |
1908 | '*on-error': 'BlockdevOnError' } } | |
2d47c6e9 SH |
1909 | |
1910 | ## | |
db58f9c0 | 1911 | # @block-job-set-speed: |
2d47c6e9 SH |
1912 | # |
1913 | # Set maximum speed for a background block operation. | |
1914 | # | |
1915 | # This command can only be issued when there is an active block job. | |
1916 | # | |
1917 | # Throttling can be disabled by setting the speed to 0. | |
1918 | # | |
1919 | # @device: the device name | |
1920 | # | |
c83c66c3 SH |
1921 | # @speed: the maximum speed, in bytes per second, or 0 for unlimited. |
1922 | # Defaults to 0. | |
2d47c6e9 SH |
1923 | # |
1924 | # Returns: Nothing on success | |
05290d80 | 1925 | # If no background operation is active on this device, DeviceNotActive |
2d47c6e9 SH |
1926 | # |
1927 | # Since: 1.1 | |
1928 | ## | |
db58f9c0 | 1929 | { 'command': 'block-job-set-speed', |
882ec7ce | 1930 | 'data': { 'device': 'str', 'speed': 'int' } } |
370521a1 SH |
1931 | |
1932 | ## | |
db58f9c0 | 1933 | # @block-job-cancel: |
370521a1 | 1934 | # |
05290d80 | 1935 | # Stop an active background block operation. |
370521a1 | 1936 | # |
05290d80 | 1937 | # This command returns immediately after marking the active background block |
370521a1 SH |
1938 | # operation for cancellation. It is an error to call this command if no |
1939 | # operation is in progress. | |
1940 | # | |
1941 | # The operation will cancel as soon as possible and then emit the | |
1942 | # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when | |
1943 | # enumerated using query-block-jobs. | |
1944 | # | |
05290d80 PB |
1945 | # For streaming, the image file retains its backing file unless the streaming |
1946 | # operation happens to complete just as it is being cancelled. A new streaming | |
1947 | # operation can be started at a later time to finish copying all data from the | |
1948 | # backing file. | |
370521a1 SH |
1949 | # |
1950 | # @device: the device name | |
1951 | # | |
6e37fb81 PB |
1952 | # @force: #optional whether to allow cancellation of a paused job (default |
1953 | # false). Since 1.3. | |
1954 | # | |
370521a1 | 1955 | # Returns: Nothing on success |
05290d80 | 1956 | # If no background operation is active on this device, DeviceNotActive |
370521a1 SH |
1957 | # |
1958 | # Since: 1.1 | |
1959 | ## | |
6e37fb81 PB |
1960 | { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } } |
1961 | ||
1962 | ## | |
1963 | # @block-job-pause: | |
1964 | # | |
1965 | # Pause an active background block operation. | |
1966 | # | |
1967 | # This command returns immediately after marking the active background block | |
1968 | # operation for pausing. It is an error to call this command if no | |
1969 | # operation is in progress. Pausing an already paused job has no cumulative | |
1970 | # effect; a single block-job-resume command will resume the job. | |
1971 | # | |
1972 | # The operation will pause as soon as possible. No event is emitted when | |
1973 | # the operation is actually paused. Cancelling a paused job automatically | |
1974 | # resumes it. | |
1975 | # | |
1976 | # @device: the device name | |
1977 | # | |
1978 | # Returns: Nothing on success | |
1979 | # If no background operation is active on this device, DeviceNotActive | |
1980 | # | |
1981 | # Since: 1.3 | |
1982 | ## | |
1983 | { 'command': 'block-job-pause', 'data': { 'device': 'str' } } | |
1984 | ||
1985 | ## | |
1986 | # @block-job-resume: | |
1987 | # | |
1988 | # Resume an active background block operation. | |
1989 | # | |
1990 | # This command returns immediately after resuming a paused background block | |
1991 | # operation. It is an error to call this command if no operation is in | |
1992 | # progress. Resuming an already running job is not an error. | |
1993 | # | |
32c81a4a PB |
1994 | # This command also clears the error status of the job. |
1995 | # | |
6e37fb81 PB |
1996 | # @device: the device name |
1997 | # | |
1998 | # Returns: Nothing on success | |
1999 | # If no background operation is active on this device, DeviceNotActive | |
2000 | # | |
2001 | # Since: 1.3 | |
2002 | ## | |
2003 | { 'command': 'block-job-resume', 'data': { 'device': 'str' } } | |
5eeee3fa AL |
2004 | |
2005 | ## | |
2006 | # @ObjectTypeInfo: | |
2007 | # | |
2008 | # This structure describes a search result from @qom-list-types | |
2009 | # | |
2010 | # @name: the type name found in the search | |
2011 | # | |
2012 | # Since: 1.1 | |
2013 | # | |
2014 | # Notes: This command is experimental and may change syntax in future releases. | |
2015 | ## | |
2016 | { 'type': 'ObjectTypeInfo', | |
2017 | 'data': { 'name': 'str' } } | |
2018 | ||
2019 | ## | |
2020 | # @qom-list-types: | |
2021 | # | |
2022 | # This command will return a list of types given search parameters | |
2023 | # | |
2024 | # @implements: if specified, only return types that implement this type name | |
2025 | # | |
2026 | # @abstract: if true, include abstract types in the results | |
2027 | # | |
2028 | # Returns: a list of @ObjectTypeInfo or an empty list if no results are found | |
2029 | # | |
2030 | # Since: 1.1 | |
5eeee3fa AL |
2031 | ## |
2032 | { 'command': 'qom-list-types', | |
2033 | 'data': { '*implements': 'str', '*abstract': 'bool' }, | |
2034 | 'returns': [ 'ObjectTypeInfo' ] } | |
e1c37d0e | 2035 | |
1daa31b9 AL |
2036 | ## |
2037 | # @DevicePropertyInfo: | |
2038 | # | |
2039 | # Information about device properties. | |
2040 | # | |
2041 | # @name: the name of the property | |
2042 | # @type: the typename of the property | |
2043 | # | |
2044 | # Since: 1.2 | |
2045 | ## | |
2046 | { 'type': 'DevicePropertyInfo', | |
2047 | 'data': { 'name': 'str', 'type': 'str' } } | |
2048 | ||
2049 | ## | |
2050 | # @device-list-properties: | |
2051 | # | |
2052 | # List properties associated with a device. | |
2053 | # | |
2054 | # @typename: the type name of a device | |
2055 | # | |
2056 | # Returns: a list of DevicePropertyInfo describing a devices properties | |
2057 | # | |
2058 | # Since: 1.2 | |
2059 | ## | |
2060 | { 'command': 'device-list-properties', | |
2061 | 'data': { 'typename': 'str'}, | |
2062 | 'returns': [ 'DevicePropertyInfo' ] } | |
2063 | ||
e1c37d0e LC |
2064 | ## |
2065 | # @migrate | |
2066 | # | |
2067 | # Migrates the current running guest to another Virtual Machine. | |
2068 | # | |
2069 | # @uri: the Uniform Resource Identifier of the destination VM | |
2070 | # | |
2071 | # @blk: #optional do block migration (full disk copy) | |
2072 | # | |
2073 | # @inc: #optional incremental disk copy migration | |
2074 | # | |
2075 | # @detach: this argument exists only for compatibility reasons and | |
2076 | # is ignored by QEMU | |
2077 | # | |
2078 | # Returns: nothing on success | |
2079 | # | |
2080 | # Since: 0.14.0 | |
2081 | ## | |
2082 | { 'command': 'migrate', | |
2083 | 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } } | |
33cf629a | 2084 | |
a7ae8355 SS |
2085 | # @xen-save-devices-state: |
2086 | # | |
2087 | # Save the state of all devices to file. The RAM and the block devices | |
2088 | # of the VM are not saved by this command. | |
2089 | # | |
2090 | # @filename: the file to save the state of the devices to as binary | |
2091 | # data. See xen-save-devices-state.txt for a description of the binary | |
2092 | # format. | |
2093 | # | |
2094 | # Returns: Nothing on success | |
a7ae8355 SS |
2095 | # |
2096 | # Since: 1.1 | |
2097 | ## | |
2098 | { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} } | |
a15fef21 | 2099 | |
39f42439 AP |
2100 | ## |
2101 | # @xen-set-global-dirty-log | |
2102 | # | |
2103 | # Enable or disable the global dirty log mode. | |
2104 | # | |
2105 | # @enable: true to enable, false to disable. | |
2106 | # | |
2107 | # Returns: nothing | |
2108 | # | |
2109 | # Since: 1.3 | |
2110 | ## | |
2111 | { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } } | |
2112 | ||
a15fef21 LC |
2113 | ## |
2114 | # @device_del: | |
2115 | # | |
2116 | # Remove a device from a guest | |
2117 | # | |
2118 | # @id: the name of the device | |
2119 | # | |
2120 | # Returns: Nothing on success | |
2121 | # If @id is not a valid device, DeviceNotFound | |
a15fef21 LC |
2122 | # |
2123 | # Notes: When this command completes, the device may not be removed from the | |
2124 | # guest. Hot removal is an operation that requires guest cooperation. | |
2125 | # This command merely requests that the guest begin the hot removal | |
2126 | # process. | |
2127 | # | |
2128 | # Since: 0.14.0 | |
2129 | ## | |
2130 | { 'command': 'device_del', 'data': {'id': 'str'} } | |
783e9b48 WC |
2131 | |
2132 | ## | |
2133 | # @dump-guest-memory | |
2134 | # | |
2135 | # Dump guest's memory to vmcore. It is a synchronous operation that can take | |
2136 | # very long depending on the amount of guest memory. This command is only | |
f5b0d93b LC |
2137 | # supported on i386 and x86_64. |
2138 | # | |
2139 | # @paging: if true, do paging to get guest's memory mapping. This allows | |
d691180e | 2140 | # using gdb to process the core file. |
f5b0d93b | 2141 | # |
d691180e LC |
2142 | # IMPORTANT: this option can make QEMU allocate several gigabytes |
2143 | # of RAM. This can happen for a large guest, or a | |
2144 | # malicious guest pretending to be large. | |
2145 | # | |
2146 | # Also, paging=true has the following limitations: | |
2147 | # | |
2148 | # 1. The guest may be in a catastrophic state or can have corrupted | |
2149 | # memory, which cannot be trusted | |
2150 | # 2. The guest can be in real-mode even if paging is enabled. For | |
2151 | # example, the guest uses ACPI to sleep, and ACPI sleep state | |
2152 | # goes in real-mode | |
f5b0d93b | 2153 | # |
783e9b48 | 2154 | # @protocol: the filename or file descriptor of the vmcore. The supported |
d691180e | 2155 | # protocols are: |
f5b0d93b | 2156 | # |
d691180e LC |
2157 | # 1. file: the protocol starts with "file:", and the following |
2158 | # string is the file's path. | |
2159 | # 2. fd: the protocol starts with "fd:", and the following string | |
2160 | # is the fd's name. | |
f5b0d93b | 2161 | # |
783e9b48 | 2162 | # @begin: #optional if specified, the starting physical address. |
f5b0d93b | 2163 | # |
783e9b48 | 2164 | # @length: #optional if specified, the memory size, in bytes. If you don't |
d691180e LC |
2165 | # want to dump all guest's memory, please specify the start @begin |
2166 | # and @length | |
783e9b48 WC |
2167 | # |
2168 | # Returns: nothing on success | |
783e9b48 WC |
2169 | # |
2170 | # Since: 1.2 | |
2171 | ## | |
2172 | { 'command': 'dump-guest-memory', | |
2173 | 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int', | |
2174 | '*length': 'int' } } | |
d691180e | 2175 | |
928059a3 LC |
2176 | ## |
2177 | # @netdev_add: | |
2178 | # | |
2179 | # Add a network backend. | |
2180 | # | |
2181 | # @type: the type of network backend. Current valid values are 'user', 'tap', | |
2182 | # 'vde', 'socket', 'dump' and 'bridge' | |
2183 | # | |
2184 | # @id: the name of the new network backend | |
2185 | # | |
2186 | # @props: #optional a list of properties to be passed to the backend in | |
2187 | # the format 'name=value', like 'ifname=tap0,script=no' | |
2188 | # | |
2189 | # Notes: The semantics of @props is not well defined. Future commands will be | |
2190 | # introduced that provide stronger typing for backend creation. | |
2191 | # | |
2192 | # Since: 0.14.0 | |
2193 | # | |
2194 | # Returns: Nothing on success | |
2195 | # If @type is not a valid network backend, DeviceNotFound | |
928059a3 LC |
2196 | ## |
2197 | { 'command': 'netdev_add', | |
2198 | 'data': {'type': 'str', 'id': 'str', '*props': '**'}, | |
2199 | 'gen': 'no' } | |
5f964155 LC |
2200 | |
2201 | ## | |
2202 | # @netdev_del: | |
2203 | # | |
2204 | # Remove a network backend. | |
2205 | # | |
2206 | # @id: the name of the network backend to remove | |
2207 | # | |
2208 | # Returns: Nothing on success | |
2209 | # If @id is not a valid network backend, DeviceNotFound | |
2210 | # | |
2211 | # Since: 0.14.0 | |
2212 | ## | |
2213 | { 'command': 'netdev_del', 'data': {'id': 'str'} } | |
208c9d1b | 2214 | |
14aa0c2d LE |
2215 | ## |
2216 | # @NetdevNoneOptions | |
2217 | # | |
2218 | # Use it alone to have zero network devices. | |
2219 | # | |
2220 | # Since 1.2 | |
2221 | ## | |
2222 | { 'type': 'NetdevNoneOptions', | |
2223 | 'data': { } } | |
2224 | ||
2225 | ## | |
2226 | # @NetLegacyNicOptions | |
2227 | # | |
2228 | # Create a new Network Interface Card. | |
2229 | # | |
2230 | # @netdev: #optional id of -netdev to connect to | |
2231 | # | |
2232 | # @macaddr: #optional MAC address | |
2233 | # | |
2234 | # @model: #optional device model (e1000, rtl8139, virtio etc.) | |
2235 | # | |
2236 | # @addr: #optional PCI device address | |
2237 | # | |
2238 | # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X | |
2239 | # | |
2240 | # Since 1.2 | |
2241 | ## | |
2242 | { 'type': 'NetLegacyNicOptions', | |
2243 | 'data': { | |
2244 | '*netdev': 'str', | |
2245 | '*macaddr': 'str', | |
2246 | '*model': 'str', | |
2247 | '*addr': 'str', | |
2248 | '*vectors': 'uint32' } } | |
2249 | ||
2250 | ## | |
2251 | # @String | |
2252 | # | |
2253 | # A fat type wrapping 'str', to be embedded in lists. | |
2254 | # | |
2255 | # Since 1.2 | |
2256 | ## | |
2257 | { 'type': 'String', | |
2258 | 'data': { | |
2259 | 'str': 'str' } } | |
2260 | ||
2261 | ## | |
2262 | # @NetdevUserOptions | |
2263 | # | |
2264 | # Use the user mode network stack which requires no administrator privilege to | |
2265 | # run. | |
2266 | # | |
2267 | # @hostname: #optional client hostname reported by the builtin DHCP server | |
2268 | # | |
2269 | # @restrict: #optional isolate the guest from the host | |
2270 | # | |
2271 | # @ip: #optional legacy parameter, use net= instead | |
2272 | # | |
2273 | # @net: #optional IP address and optional netmask | |
2274 | # | |
2275 | # @host: #optional guest-visible address of the host | |
2276 | # | |
2277 | # @tftp: #optional root directory of the built-in TFTP server | |
2278 | # | |
2279 | # @bootfile: #optional BOOTP filename, for use with tftp= | |
2280 | # | |
2281 | # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can | |
2282 | # assign | |
2283 | # | |
2284 | # @dns: #optional guest-visible address of the virtual nameserver | |
2285 | # | |
2286 | # @smb: #optional root directory of the built-in SMB server | |
2287 | # | |
2288 | # @smbserver: #optional IP address of the built-in SMB server | |
2289 | # | |
2290 | # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest | |
2291 | # endpoints | |
2292 | # | |
2293 | # @guestfwd: #optional forward guest TCP connections | |
2294 | # | |
2295 | # Since 1.2 | |
2296 | ## | |
2297 | { 'type': 'NetdevUserOptions', | |
2298 | 'data': { | |
2299 | '*hostname': 'str', | |
2300 | '*restrict': 'bool', | |
2301 | '*ip': 'str', | |
2302 | '*net': 'str', | |
2303 | '*host': 'str', | |
2304 | '*tftp': 'str', | |
2305 | '*bootfile': 'str', | |
2306 | '*dhcpstart': 'str', | |
2307 | '*dns': 'str', | |
2308 | '*smb': 'str', | |
2309 | '*smbserver': 'str', | |
2310 | '*hostfwd': ['String'], | |
2311 | '*guestfwd': ['String'] } } | |
2312 | ||
2313 | ## | |
2314 | # @NetdevTapOptions | |
2315 | # | |
2316 | # Connect the host TAP network interface name to the VLAN. | |
2317 | # | |
2318 | # @ifname: #optional interface name | |
2319 | # | |
2320 | # @fd: #optional file descriptor of an already opened tap | |
2321 | # | |
2322 | # @script: #optional script to initialize the interface | |
2323 | # | |
2324 | # @downscript: #optional script to shut down the interface | |
2325 | # | |
2326 | # @helper: #optional command to execute to configure bridge | |
2327 | # | |
2328 | # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes. | |
2329 | # | |
2330 | # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface | |
2331 | # | |
2332 | # @vhost: #optional enable vhost-net network accelerator | |
2333 | # | |
2334 | # @vhostfd: #optional file descriptor of an already opened vhost net device | |
2335 | # | |
2336 | # @vhostforce: #optional vhost on for non-MSIX virtio guests | |
2337 | # | |
2338 | # Since 1.2 | |
2339 | ## | |
2340 | { 'type': 'NetdevTapOptions', | |
2341 | 'data': { | |
2342 | '*ifname': 'str', | |
2343 | '*fd': 'str', | |
2344 | '*script': 'str', | |
2345 | '*downscript': 'str', | |
2346 | '*helper': 'str', | |
2347 | '*sndbuf': 'size', | |
2348 | '*vnet_hdr': 'bool', | |
2349 | '*vhost': 'bool', | |
2350 | '*vhostfd': 'str', | |
2351 | '*vhostforce': 'bool' } } | |
2352 | ||
2353 | ## | |
2354 | # @NetdevSocketOptions | |
2355 | # | |
2356 | # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP | |
2357 | # socket connection. | |
2358 | # | |
2359 | # @fd: #optional file descriptor of an already opened socket | |
2360 | # | |
2361 | # @listen: #optional port number, and optional hostname, to listen on | |
2362 | # | |
2363 | # @connect: #optional port number, and optional hostname, to connect to | |
2364 | # | |
2365 | # @mcast: #optional UDP multicast address and port number | |
2366 | # | |
2367 | # @localaddr: #optional source address and port for multicast and udp packets | |
2368 | # | |
2369 | # @udp: #optional UDP unicast address and port number | |
2370 | # | |
2371 | # Since 1.2 | |
2372 | ## | |
2373 | { 'type': 'NetdevSocketOptions', | |
2374 | 'data': { | |
2375 | '*fd': 'str', | |
2376 | '*listen': 'str', | |
2377 | '*connect': 'str', | |
2378 | '*mcast': 'str', | |
2379 | '*localaddr': 'str', | |
2380 | '*udp': 'str' } } | |
2381 | ||
2382 | ## | |
2383 | # @NetdevVdeOptions | |
2384 | # | |
2385 | # Connect the VLAN to a vde switch running on the host. | |
2386 | # | |
2387 | # @sock: #optional socket path | |
2388 | # | |
2389 | # @port: #optional port number | |
2390 | # | |
2391 | # @group: #optional group owner of socket | |
2392 | # | |
2393 | # @mode: #optional permissions for socket | |
2394 | # | |
2395 | # Since 1.2 | |
2396 | ## | |
2397 | { 'type': 'NetdevVdeOptions', | |
2398 | 'data': { | |
2399 | '*sock': 'str', | |
2400 | '*port': 'uint16', | |
2401 | '*group': 'str', | |
2402 | '*mode': 'uint16' } } | |
2403 | ||
2404 | ## | |
2405 | # @NetdevDumpOptions | |
2406 | # | |
2407 | # Dump VLAN network traffic to a file. | |
2408 | # | |
2409 | # @len: #optional per-packet size limit (64k default). Understands [TGMKkb] | |
2410 | # suffixes. | |
2411 | # | |
2412 | # @file: #optional dump file path (default is qemu-vlan0.pcap) | |
2413 | # | |
2414 | # Since 1.2 | |
2415 | ## | |
2416 | { 'type': 'NetdevDumpOptions', | |
2417 | 'data': { | |
2418 | '*len': 'size', | |
2419 | '*file': 'str' } } | |
2420 | ||
2421 | ## | |
2422 | # @NetdevBridgeOptions | |
2423 | # | |
2424 | # Connect a host TAP network interface to a host bridge device. | |
2425 | # | |
2426 | # @br: #optional bridge name | |
2427 | # | |
2428 | # @helper: #optional command to execute to configure bridge | |
2429 | # | |
2430 | # Since 1.2 | |
2431 | ## | |
2432 | { 'type': 'NetdevBridgeOptions', | |
2433 | 'data': { | |
2434 | '*br': 'str', | |
2435 | '*helper': 'str' } } | |
2436 | ||
f6c874e3 SH |
2437 | ## |
2438 | # @NetdevHubPortOptions | |
2439 | # | |
2440 | # Connect two or more net clients through a software hub. | |
2441 | # | |
2442 | # @hubid: hub identifier number | |
2443 | # | |
2444 | # Since 1.2 | |
2445 | ## | |
2446 | { 'type': 'NetdevHubPortOptions', | |
2447 | 'data': { | |
2448 | 'hubid': 'int32' } } | |
2449 | ||
14aa0c2d LE |
2450 | ## |
2451 | # @NetClientOptions | |
2452 | # | |
2453 | # A discriminated record of network device traits. | |
2454 | # | |
2455 | # Since 1.2 | |
2456 | ## | |
2457 | { 'union': 'NetClientOptions', | |
2458 | 'data': { | |
f6c874e3 SH |
2459 | 'none': 'NetdevNoneOptions', |
2460 | 'nic': 'NetLegacyNicOptions', | |
2461 | 'user': 'NetdevUserOptions', | |
2462 | 'tap': 'NetdevTapOptions', | |
2463 | 'socket': 'NetdevSocketOptions', | |
2464 | 'vde': 'NetdevVdeOptions', | |
2465 | 'dump': 'NetdevDumpOptions', | |
2466 | 'bridge': 'NetdevBridgeOptions', | |
2467 | 'hubport': 'NetdevHubPortOptions' } } | |
14aa0c2d LE |
2468 | |
2469 | ## | |
2470 | # @NetLegacy | |
2471 | # | |
2472 | # Captures the configuration of a network device; legacy. | |
2473 | # | |
2474 | # @vlan: #optional vlan number | |
2475 | # | |
2476 | # @id: #optional identifier for monitor commands | |
2477 | # | |
2478 | # @name: #optional identifier for monitor commands, ignored if @id is present | |
2479 | # | |
2480 | # @opts: device type specific properties (legacy) | |
2481 | # | |
2482 | # Since 1.2 | |
2483 | ## | |
2484 | { 'type': 'NetLegacy', | |
2485 | 'data': { | |
2486 | '*vlan': 'int32', | |
2487 | '*id': 'str', | |
2488 | '*name': 'str', | |
2489 | 'opts': 'NetClientOptions' } } | |
2490 | ||
2491 | ## | |
2492 | # @Netdev | |
2493 | # | |
2494 | # Captures the configuration of a network device. | |
2495 | # | |
2496 | # @id: identifier for monitor commands. | |
2497 | # | |
2498 | # @opts: device type specific properties | |
2499 | # | |
2500 | # Since 1.2 | |
2501 | ## | |
2502 | { 'type': 'Netdev', | |
2503 | 'data': { | |
2504 | 'id': 'str', | |
2505 | 'opts': 'NetClientOptions' } } | |
2506 | ||
208c9d1b CB |
2507 | ## |
2508 | # @getfd: | |
2509 | # | |
2510 | # Receive a file descriptor via SCM rights and assign it a name | |
2511 | # | |
2512 | # @fdname: file descriptor name | |
2513 | # | |
2514 | # Returns: Nothing on success | |
208c9d1b CB |
2515 | # |
2516 | # Since: 0.14.0 | |
2517 | # | |
2518 | # Notes: If @fdname already exists, the file descriptor assigned to | |
2519 | # it will be closed and replaced by the received file | |
2520 | # descriptor. | |
2521 | # The 'closefd' command can be used to explicitly close the | |
2522 | # file descriptor when it is no longer needed. | |
2523 | ## | |
2524 | { 'command': 'getfd', 'data': {'fdname': 'str'} } | |
2525 | ||
2526 | ## | |
2527 | # @closefd: | |
2528 | # | |
2529 | # Close a file descriptor previously passed via SCM rights | |
2530 | # | |
2531 | # @fdname: file descriptor name | |
2532 | # | |
2533 | # Returns: Nothing on success | |
208c9d1b CB |
2534 | # |
2535 | # Since: 0.14.0 | |
2536 | ## | |
2537 | { 'command': 'closefd', 'data': {'fdname': 'str'} } | |
01d3c80d AL |
2538 | |
2539 | ## | |
2540 | # @MachineInfo: | |
2541 | # | |
2542 | # Information describing a machine. | |
2543 | # | |
2544 | # @name: the name of the machine | |
2545 | # | |
2546 | # @alias: #optional an alias for the machine name | |
2547 | # | |
2548 | # @default: #optional whether the machine is default | |
2549 | # | |
2550 | # Since: 1.2.0 | |
2551 | ## | |
2552 | { 'type': 'MachineInfo', | |
2553 | 'data': { 'name': 'str', '*alias': 'str', | |
2554 | '*is-default': 'bool' } } | |
2555 | ||
2556 | ## | |
2557 | # @query-machines: | |
2558 | # | |
2559 | # Return a list of supported machines | |
2560 | # | |
2561 | # Returns: a list of MachineInfo | |
2562 | # | |
2563 | # Since: 1.2.0 | |
2564 | ## | |
2565 | { 'command': 'query-machines', 'returns': ['MachineInfo'] } | |
e4e31c63 AL |
2566 | |
2567 | ## | |
2568 | # @CpuDefinitionInfo: | |
2569 | # | |
2570 | # Virtual CPU definition. | |
2571 | # | |
2572 | # @name: the name of the CPU definition | |
2573 | # | |
2574 | # Since: 1.2.0 | |
2575 | ## | |
2576 | { 'type': 'CpuDefinitionInfo', | |
2577 | 'data': { 'name': 'str' } } | |
2578 | ||
2579 | ## | |
2580 | # @query-cpu-definitions: | |
2581 | # | |
2582 | # Return a list of supported virtual CPU definitions | |
2583 | # | |
2584 | # Returns: a list of CpuDefInfo | |
2585 | # | |
2586 | # Since: 1.2.0 | |
2587 | ## | |
2588 | { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] } | |
ba1c048a CB |
2589 | |
2590 | # @AddfdInfo: | |
2591 | # | |
2592 | # Information about a file descriptor that was added to an fd set. | |
2593 | # | |
2594 | # @fdset-id: The ID of the fd set that @fd was added to. | |
2595 | # | |
2596 | # @fd: The file descriptor that was received via SCM rights and | |
2597 | # added to the fd set. | |
2598 | # | |
2599 | # Since: 1.2.0 | |
2600 | ## | |
2601 | { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} } | |
2602 | ||
2603 | ## | |
2604 | # @add-fd: | |
2605 | # | |
2606 | # Add a file descriptor, that was passed via SCM rights, to an fd set. | |
2607 | # | |
2608 | # @fdset-id: #optional The ID of the fd set to add the file descriptor to. | |
2609 | # | |
2610 | # @opaque: #optional A free-form string that can be used to describe the fd. | |
2611 | # | |
2612 | # Returns: @AddfdInfo on success | |
2613 | # If file descriptor was not received, FdNotSupplied | |
2614 | # If @fdset-id does not exist, InvalidParameterValue | |
2615 | # | |
2616 | # Notes: The list of fd sets is shared by all monitor connections. | |
2617 | # | |
2618 | # If @fdset-id is not specified, a new fd set will be created. | |
2619 | # | |
2620 | # Since: 1.2.0 | |
2621 | ## | |
2622 | { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'}, | |
2623 | 'returns': 'AddfdInfo' } | |
2624 | ||
2625 | ## | |
2626 | # @remove-fd: | |
2627 | # | |
2628 | # Remove a file descriptor from an fd set. | |
2629 | # | |
2630 | # @fdset-id: The ID of the fd set that the file descriptor belongs to. | |
2631 | # | |
2632 | # @fd: #optional The file descriptor that is to be removed. | |
2633 | # | |
2634 | # Returns: Nothing on success | |
2635 | # If @fdset-id or @fd is not found, FdNotFound | |
2636 | # | |
2637 | # Since: 1.2.0 | |
2638 | # | |
2639 | # Notes: The list of fd sets is shared by all monitor connections. | |
2640 | # | |
2641 | # If @fd is not specified, all file descriptors in @fdset-id | |
2642 | # will be removed. | |
2643 | ## | |
2644 | { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} } | |
2645 | ||
2646 | ## | |
2647 | # @FdsetFdInfo: | |
2648 | # | |
2649 | # Information about a file descriptor that belongs to an fd set. | |
2650 | # | |
2651 | # @fd: The file descriptor value. | |
2652 | # | |
2653 | # @opaque: #optional A free-form string that can be used to describe the fd. | |
2654 | # | |
2655 | # Since: 1.2.0 | |
2656 | ## | |
2657 | { 'type': 'FdsetFdInfo', | |
2658 | 'data': {'fd': 'int', '*opaque': 'str'} } | |
2659 | ||
2660 | ## | |
2661 | # @FdsetInfo: | |
2662 | # | |
2663 | # Information about an fd set. | |
2664 | # | |
2665 | # @fdset-id: The ID of the fd set. | |
2666 | # | |
2667 | # @fds: A list of file descriptors that belong to this fd set. | |
2668 | # | |
2669 | # Since: 1.2.0 | |
2670 | ## | |
2671 | { 'type': 'FdsetInfo', | |
2672 | 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} } | |
2673 | ||
2674 | ## | |
2675 | # @query-fdsets: | |
2676 | # | |
2677 | # Return information describing all fd sets. | |
2678 | # | |
2679 | # Returns: A list of @FdsetInfo | |
2680 | # | |
2681 | # Since: 1.2.0 | |
2682 | # | |
2683 | # Note: The list of fd sets is shared by all monitor connections. | |
2684 | # | |
2685 | ## | |
2686 | { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] } | |
99afc91d DB |
2687 | |
2688 | ## | |
2689 | # @TargetType | |
2690 | # | |
2691 | # Target CPU emulation type | |
2692 | # | |
2693 | # These parameters correspond to the softmmu binary CPU name that is currently | |
2694 | # running. | |
2695 | # | |
2696 | # Since: 1.2.0 | |
2697 | ## | |
2698 | { 'enum': 'TargetType', | |
2699 | 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel', | |
2700 | 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32', | |
2701 | 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64', | |
2702 | 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] } | |
2703 | ||
2704 | ## | |
2705 | # @TargetInfo: | |
2706 | # | |
2707 | # Information describing the QEMU target. | |
2708 | # | |
2709 | # @arch: the target architecture (eg "x86_64", "i386", etc) | |
2710 | # | |
2711 | # Since: 1.2.0 | |
2712 | ## | |
2713 | { 'type': 'TargetInfo', | |
2714 | 'data': { 'arch': 'TargetType' } } | |
2715 | ||
2716 | ## | |
2717 | # @query-target: | |
2718 | # | |
2719 | # Return information about the target for this QEMU | |
2720 | # | |
2721 | # Returns: TargetInfo | |
2722 | # | |
2723 | # Since: 1.2.0 | |
2724 | ## | |
2725 | { 'command': 'query-target', 'returns': 'TargetInfo' } | |
411656f4 AK |
2726 | |
2727 | ## | |
2728 | # @QKeyCode: | |
2729 | # | |
2730 | # An enumeration of key name. | |
2731 | # | |
2732 | # This is used by the send-key command. | |
2733 | # | |
2734 | # Since: 1.3.0 | |
2735 | ## | |
2736 | { 'enum': 'QKeyCode', | |
2737 | 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl', | |
2738 | 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8', | |
2739 | '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e', | |
2740 | 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right', | |
2741 | 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon', | |
2742 | 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b', | |
2743 | 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock', | |
2744 | 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', | |
2745 | 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply', | |
2746 | 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0', | |
2747 | 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8', | |
2748 | 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end', | |
2749 | 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again', | |
2750 | 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut', | |
2751 | 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] } | |
e4c8f004 | 2752 | |
9f328977 LC |
2753 | ## |
2754 | # @KeyValue | |
2755 | # | |
2756 | # Represents a keyboard key. | |
2757 | # | |
2758 | # Since: 1.3.0 | |
2759 | ## | |
2760 | { 'union': 'KeyValue', | |
2761 | 'data': { | |
2762 | 'number': 'int', | |
2763 | 'qcode': 'QKeyCode' } } | |
2764 | ||
e4c8f004 AK |
2765 | ## |
2766 | # @send-key: | |
2767 | # | |
2768 | # Send keys to guest. | |
2769 | # | |
9f328977 LC |
2770 | # @keys: An array of @KeyValue elements. All @KeyValues in this array are |
2771 | # simultaneously sent to the guest. A @KeyValue.number value is sent | |
2772 | # directly to the guest, while @KeyValue.qcode must be a valid | |
2773 | # @QKeyCode value | |
e4c8f004 AK |
2774 | # |
2775 | # @hold-time: #optional time to delay key up events, milliseconds. Defaults | |
2776 | # to 100 | |
2777 | # | |
2778 | # Returns: Nothing on success | |
2779 | # If key is unknown or redundant, InvalidParameter | |
2780 | # | |
2781 | # Since: 1.3.0 | |
2782 | # | |
2783 | ## | |
2784 | { 'command': 'send-key', | |
9f328977 | 2785 | 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } } |
ad39cf6d LC |
2786 | |
2787 | ## | |
2788 | # @screendump: | |
2789 | # | |
2790 | # Write a PPM of the VGA screen to a file. | |
2791 | # | |
2792 | # @filename: the path of a new PPM file to store the image | |
2793 | # | |
2794 | # Returns: Nothing on success | |
2795 | # | |
2796 | # Since: 0.14.0 | |
2797 | ## | |
2798 | { 'command': 'screendump', 'data': {'filename': 'str'} } |