]> git.proxmox.com Git - mirror_qemu.git/blob - qapi-schema.json
qmp: query-block: add 'encryption_key_missing' field
[mirror_qemu.git] / qapi-schema.json
1 # -*- Mode: Python -*-
2 #
3 # QAPI Schema
4
5 ##
6 # @NameInfo:
7 #
8 # Guest name information.
9 #
10 # @name: #optional The name of the guest
11 #
12 # Since 0.14.0
13 ##
14 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
15
16 ##
17 # @query-name:
18 #
19 # Return the name information of a guest.
20 #
21 # Returns: @NameInfo of the guest
22 #
23 # Since 0.14.0
24 ##
25 { 'command': 'query-name', 'returns': 'NameInfo' }
26
27 ##
28 # @VersionInfo:
29 #
30 # A description of QEMU's version.
31 #
32 # @qemu.major: The major version of QEMU
33 #
34 # @qemu.minor: The minor version of QEMU
35 #
36 # @qemu.micro: The micro version of QEMU. By current convention, a micro
37 # version of 50 signifies a development branch. A micro version
38 # greater than or equal to 90 signifies a release candidate for
39 # the next minor version. A micro version of less than 50
40 # signifies a stable release.
41 #
42 # @package: QEMU will always set this field to an empty string. Downstream
43 # versions of QEMU should set this to a non-empty string. The
44 # exact format depends on the downstream however it highly
45 # recommended that a unique name is used.
46 #
47 # Since: 0.14.0
48 ##
49 { 'type': 'VersionInfo',
50 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
51 'package': 'str'} }
52
53 ##
54 # @query-version:
55 #
56 # Returns the current version of QEMU.
57 #
58 # Returns: A @VersionInfo object describing the current version of QEMU.
59 #
60 # Since: 0.14.0
61 ##
62 { 'command': 'query-version', 'returns': 'VersionInfo' }
63
64 ##
65 # @KvmInfo:
66 #
67 # Information about support for KVM acceleration
68 #
69 # @enabled: true if KVM acceleration is active
70 #
71 # @present: true if KVM acceleration is built into this executable
72 #
73 # Since: 0.14.0
74 ##
75 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
76
77 ##
78 # @query-kvm:
79 #
80 # Returns information about KVM acceleration
81 #
82 # Returns: @KvmInfo
83 #
84 # Since: 0.14.0
85 ##
86 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
87
88 ##
89 # @RunState
90 #
91 # An enumation of VM run states.
92 #
93 # @debug: QEMU is running on a debugger
94 #
95 # @finish-migrate: guest is paused to finish the migration process
96 #
97 # @inmigrate: guest is paused waiting for an incoming migration
98 #
99 # @internal-error: An internal error that prevents further guest execution
100 # has occurred
101 #
102 # @io-error: the last IOP has failed and the device is configured to pause
103 # on I/O errors
104 #
105 # @paused: guest has been paused via the 'stop' command
106 #
107 # @postmigrate: guest is paused following a successful 'migrate'
108 #
109 # @prelaunch: QEMU was started with -S and guest has not started
110 #
111 # @restore-vm: guest is paused to restore VM state
112 #
113 # @running: guest is actively running
114 #
115 # @save-vm: guest is paused to save the VM state
116 #
117 # @shutdown: guest is shut down (and -no-shutdown is in use)
118 #
119 # @suspended: guest is suspended (ACPI S3)
120 #
121 # @watchdog: the watchdog action is configured to pause and has been triggered
122 ##
123 { 'enum': 'RunState',
124 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
125 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
126 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
127
128 ##
129 # @StatusInfo:
130 #
131 # Information about VCPU run state
132 #
133 # @running: true if all VCPUs are runnable, false if not runnable
134 #
135 # @singlestep: true if VCPUs are in single-step mode
136 #
137 # @status: the virtual machine @RunState
138 #
139 # Since: 0.14.0
140 #
141 # Notes: @singlestep is enabled through the GDB stub
142 ##
143 { 'type': 'StatusInfo',
144 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
145
146 ##
147 # @query-status:
148 #
149 # Query the run status of all VCPUs
150 #
151 # Returns: @StatusInfo reflecting all VCPUs
152 #
153 # Since: 0.14.0
154 ##
155 { 'command': 'query-status', 'returns': 'StatusInfo' }
156
157 ##
158 # @UuidInfo:
159 #
160 # Guest UUID information.
161 #
162 # @UUID: the UUID of the guest
163 #
164 # Since: 0.14.0
165 #
166 # Notes: If no UUID was specified for the guest, a null UUID is returned.
167 ##
168 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
169
170 ##
171 # @query-uuid:
172 #
173 # Query the guest UUID information.
174 #
175 # Returns: The @UuidInfo for the guest
176 #
177 # Since 0.14.0
178 ##
179 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
180
181 ##
182 # @ChardevInfo:
183 #
184 # Information about a character device.
185 #
186 # @label: the label of the character device
187 #
188 # @filename: the filename of the character device
189 #
190 # Notes: @filename is encoded using the QEMU command line character device
191 # encoding. See the QEMU man page for details.
192 #
193 # Since: 0.14.0
194 ##
195 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
196
197 ##
198 # @query-chardev:
199 #
200 # Returns information about current character devices.
201 #
202 # Returns: a list of @ChardevInfo
203 #
204 # Since: 0.14.0
205 ##
206 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
207
208 ##
209 # @CommandInfo:
210 #
211 # Information about a QMP command
212 #
213 # @name: The command name
214 #
215 # Since: 0.14.0
216 ##
217 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
218
219 ##
220 # @query-commands:
221 #
222 # Return a list of supported QMP commands by this server
223 #
224 # Returns: A list of @CommandInfo for all supported commands
225 #
226 # Since: 0.14.0
227 ##
228 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
229
230 ##
231 # @EventInfo:
232 #
233 # Information about a QMP event
234 #
235 # @name: The event name
236 #
237 # Since: 1.2.0
238 ##
239 { 'type': 'EventInfo', 'data': {'name': 'str'} }
240
241 ##
242 # @query-events:
243 #
244 # Return a list of supported QMP events by this server
245 #
246 # Returns: A list of @EventInfo for all supported events
247 #
248 # Since: 1.2.0
249 ##
250 { 'command': 'query-events', 'returns': ['EventInfo'] }
251
252 ##
253 # @MigrationStats
254 #
255 # Detailed migration status.
256 #
257 # @transferred: amount of bytes already transferred to the target VM
258 #
259 # @remaining: amount of bytes remaining to be transferred to the target VM
260 #
261 # @total: total amount of bytes involved in the migration process
262 #
263 # @total_time: tota0l amount of ms since migration started. If
264 # migration has ended, it returns the total migration
265 # time. (since 1.2)
266 #
267 # Since: 0.14.0.
268 ##
269 { 'type': 'MigrationStats',
270 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
271 'total_time': 'int' } }
272
273 ##
274 # @MigrationInfo
275 #
276 # Information about current migration process.
277 #
278 # @status: #optional string describing the current migration status.
279 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
280 # 'cancelled'. If this field is not returned, no migration process
281 # has been initiated
282 #
283 # @ram: #optional @MigrationStats containing detailed migration
284 # status, only returned if status is 'active' or
285 # 'completed'. 'comppleted' (since 1.2)
286 #
287 # @disk: #optional @MigrationStats containing detailed disk migration
288 # status, only returned if status is 'active' and it is a block
289 # migration
290 #
291 # Since: 0.14.0
292 ##
293 { 'type': 'MigrationInfo',
294 'data': {'*status': 'str', '*ram': 'MigrationStats',
295 '*disk': 'MigrationStats'} }
296
297 ##
298 # @query-migrate
299 #
300 # Returns information about current migration process.
301 #
302 # Returns: @MigrationInfo
303 #
304 # Since: 0.14.0
305 ##
306 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
307
308 ##
309 # @MouseInfo:
310 #
311 # Information about a mouse device.
312 #
313 # @name: the name of the mouse device
314 #
315 # @index: the index of the mouse device
316 #
317 # @current: true if this device is currently receiving mouse events
318 #
319 # @absolute: true if this device supports absolute coordinates as input
320 #
321 # Since: 0.14.0
322 ##
323 { 'type': 'MouseInfo',
324 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
325 'absolute': 'bool'} }
326
327 ##
328 # @query-mice:
329 #
330 # Returns information about each active mouse device
331 #
332 # Returns: a list of @MouseInfo for each device
333 #
334 # Since: 0.14.0
335 ##
336 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
337
338 ##
339 # @CpuInfo:
340 #
341 # Information about a virtual CPU
342 #
343 # @CPU: the index of the virtual CPU
344 #
345 # @current: this only exists for backwards compatible and should be ignored
346 #
347 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
348 # to a processor specific low power mode.
349 #
350 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
351 # pointer.
352 # If the target is Sparc, this is the PC component of the
353 # instruction pointer.
354 #
355 # @nip: #optional If the target is PPC, the instruction pointer
356 #
357 # @npc: #optional If the target is Sparc, the NPC component of the instruction
358 # pointer
359 #
360 # @PC: #optional If the target is MIPS, the instruction pointer
361 #
362 # @thread_id: ID of the underlying host thread
363 #
364 # Since: 0.14.0
365 #
366 # Notes: @halted is a transient state that changes frequently. By the time the
367 # data is sent to the client, the guest may no longer be halted.
368 ##
369 { 'type': 'CpuInfo',
370 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
371 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
372
373 ##
374 # @query-cpus:
375 #
376 # Returns a list of information about each virtual CPU.
377 #
378 # Returns: a list of @CpuInfo for each virtual CPU
379 #
380 # Since: 0.14.0
381 ##
382 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
383
384 ##
385 # @BlockDeviceInfo:
386 #
387 # Information about the backing device for a block device.
388 #
389 # @file: the filename of the backing device
390 #
391 # @ro: true if the backing device was open read-only
392 #
393 # @drv: the name of the block format used to open the backing device. As of
394 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
395 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
396 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
397 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
398 #
399 # @backing_file: #optional the name of the backing file (for copy-on-write)
400 #
401 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
402 #
403 # @encrypted: true if the backing device is encrypted
404 #
405 # @encryption_key_missing: true if the backing device is encrypted but an
406 # valid encryption key is missing
407 #
408 # @bps: total throughput limit in bytes per second is specified
409 #
410 # @bps_rd: read throughput limit in bytes per second is specified
411 #
412 # @bps_wr: write throughput limit in bytes per second is specified
413 #
414 # @iops: total I/O operations per second is specified
415 #
416 # @iops_rd: read I/O operations per second is specified
417 #
418 # @iops_wr: write I/O operations per second is specified
419 #
420 # Since: 0.14.0
421 #
422 # Notes: This interface is only found in @BlockInfo.
423 ##
424 { 'type': 'BlockDeviceInfo',
425 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
426 '*backing_file': 'str', 'backing_file_depth': 'int',
427 'encrypted': 'bool', 'encryption_key_missing': 'bool',
428 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
429 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
430
431 ##
432 # @BlockDeviceIoStatus:
433 #
434 # An enumeration of block device I/O status.
435 #
436 # @ok: The last I/O operation has succeeded
437 #
438 # @failed: The last I/O operation has failed
439 #
440 # @nospace: The last I/O operation has failed due to a no-space condition
441 #
442 # Since: 1.0
443 ##
444 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
445
446 ##
447 # @BlockInfo:
448 #
449 # Block device information. This structure describes a virtual device and
450 # the backing device associated with it.
451 #
452 # @device: The device name associated with the virtual device.
453 #
454 # @type: This field is returned only for compatibility reasons, it should
455 # not be used (always returns 'unknown')
456 #
457 # @removable: True if the device supports removable media.
458 #
459 # @locked: True if the guest has locked this device from having its media
460 # removed
461 #
462 # @tray_open: #optional True if the device has a tray and it is open
463 # (only present if removable is true)
464 #
465 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
466 # supports it and the VM is configured to stop on errors
467 #
468 # @inserted: #optional @BlockDeviceInfo describing the device if media is
469 # present
470 #
471 # Since: 0.14.0
472 ##
473 { 'type': 'BlockInfo',
474 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
475 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
476 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
477
478 ##
479 # @query-block:
480 #
481 # Get a list of BlockInfo for all virtual block devices.
482 #
483 # Returns: a list of @BlockInfo describing each virtual block device
484 #
485 # Since: 0.14.0
486 ##
487 { 'command': 'query-block', 'returns': ['BlockInfo'] }
488
489 ##
490 # @BlockDeviceStats:
491 #
492 # Statistics of a virtual block device or a block backing device.
493 #
494 # @rd_bytes: The number of bytes read by the device.
495 #
496 # @wr_bytes: The number of bytes written by the device.
497 #
498 # @rd_operations: The number of read operations performed by the device.
499 #
500 # @wr_operations: The number of write operations performed by the device.
501 #
502 # @flush_operations: The number of cache flush operations performed by the
503 # device (since 0.15.0)
504 #
505 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
506 # (since 0.15.0).
507 #
508 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
509 #
510 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
511 #
512 # @wr_highest_offset: The offset after the greatest byte written to the
513 # device. The intended use of this information is for
514 # growable sparse files (like qcow2) that are used on top
515 # of a physical device.
516 #
517 # Since: 0.14.0
518 ##
519 { 'type': 'BlockDeviceStats',
520 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
521 'wr_operations': 'int', 'flush_operations': 'int',
522 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
523 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
524
525 ##
526 # @BlockStats:
527 #
528 # Statistics of a virtual block device or a block backing device.
529 #
530 # @device: #optional If the stats are for a virtual block device, the name
531 # corresponding to the virtual block device.
532 #
533 # @stats: A @BlockDeviceStats for the device.
534 #
535 # @parent: #optional This may point to the backing block device if this is a
536 # a virtual block device. If it's a backing block, this will point
537 # to the backing file is one is present.
538 #
539 # Since: 0.14.0
540 ##
541 { 'type': 'BlockStats',
542 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
543 '*parent': 'BlockStats'} }
544
545 ##
546 # @query-blockstats:
547 #
548 # Query the @BlockStats for all virtual block devices.
549 #
550 # Returns: A list of @BlockStats for each virtual block devices.
551 #
552 # Since: 0.14.0
553 ##
554 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
555
556 ##
557 # @VncClientInfo:
558 #
559 # Information about a connected VNC client.
560 #
561 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
562 # when possible.
563 #
564 # @family: 'ipv6' if the client is connected via IPv6 and TCP
565 # 'ipv4' if the client is connected via IPv4 and TCP
566 # 'unix' if the client is connected via a unix domain socket
567 # 'unknown' otherwise
568 #
569 # @service: The service name of the client's port. This may depends on the
570 # host system's service database so symbolic names should not be
571 # relied on.
572 #
573 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
574 # Name of the client.
575 #
576 # @sasl_username: #optional If SASL authentication is in use, the SASL username
577 # used for authentication.
578 #
579 # Since: 0.14.0
580 ##
581 { 'type': 'VncClientInfo',
582 'data': {'host': 'str', 'family': 'str', 'service': 'str',
583 '*x509_dname': 'str', '*sasl_username': 'str'} }
584
585 ##
586 # @VncInfo:
587 #
588 # Information about the VNC session.
589 #
590 # @enabled: true if the VNC server is enabled, false otherwise
591 #
592 # @host: #optional The hostname the VNC server is bound to. This depends on
593 # the name resolution on the host and may be an IP address.
594 #
595 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
596 # 'ipv4' if the host is listening for IPv4 connections
597 # 'unix' if the host is listening on a unix domain socket
598 # 'unknown' otherwise
599 #
600 # @service: #optional The service name of the server's port. This may depends
601 # on the host system's service database so symbolic names should not
602 # be relied on.
603 #
604 # @auth: #optional the current authentication type used by the server
605 # 'none' if no authentication is being used
606 # 'vnc' if VNC authentication is being used
607 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
608 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
609 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
610 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
611 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
612 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
613 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
614 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
615 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
616 #
617 # @clients: a list of @VncClientInfo of all currently connected clients
618 #
619 # Since: 0.14.0
620 ##
621 { 'type': 'VncInfo',
622 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
623 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
624
625 ##
626 # @query-vnc:
627 #
628 # Returns information about the current VNC server
629 #
630 # Returns: @VncInfo
631 # If VNC support is not compiled in, FeatureDisabled
632 #
633 # Since: 0.14.0
634 ##
635 { 'command': 'query-vnc', 'returns': 'VncInfo' }
636
637 ##
638 # @SpiceChannel
639 #
640 # Information about a SPICE client channel.
641 #
642 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
643 # when possible.
644 #
645 # @family: 'ipv6' if the client is connected via IPv6 and TCP
646 # 'ipv4' if the client is connected via IPv4 and TCP
647 # 'unix' if the client is connected via a unix domain socket
648 # 'unknown' otherwise
649 #
650 # @port: The client's port number.
651 #
652 # @connection-id: SPICE connection id number. All channels with the same id
653 # belong to the same SPICE session.
654 #
655 # @connection-type: SPICE channel type number. "1" is the main control
656 # channel, filter for this one if you want to track spice
657 # sessions only
658 #
659 # @channel-id: SPICE channel ID number. Usually "0", might be different when
660 # multiple channels of the same type exist, such as multiple
661 # display channels in a multihead setup
662 #
663 # @tls: true if the channel is encrypted, false otherwise.
664 #
665 # Since: 0.14.0
666 ##
667 { 'type': 'SpiceChannel',
668 'data': {'host': 'str', 'family': 'str', 'port': 'str',
669 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
670 'tls': 'bool'} }
671
672 ##
673 # @SpiceQueryMouseMode
674 #
675 # An enumation of Spice mouse states.
676 #
677 # @client: Mouse cursor position is determined by the client.
678 #
679 # @server: Mouse cursor position is determined by the server.
680 #
681 # @unknown: No information is available about mouse mode used by
682 # the spice server.
683 #
684 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
685 #
686 # Since: 1.1
687 ##
688 { 'enum': 'SpiceQueryMouseMode',
689 'data': [ 'client', 'server', 'unknown' ] }
690
691 ##
692 # @SpiceInfo
693 #
694 # Information about the SPICE session.
695 #
696 # @enabled: true if the SPICE server is enabled, false otherwise
697 #
698 # @host: #optional The hostname the SPICE server is bound to. This depends on
699 # the name resolution on the host and may be an IP address.
700 #
701 # @port: #optional The SPICE server's port number.
702 #
703 # @compiled-version: #optional SPICE server version.
704 #
705 # @tls-port: #optional The SPICE server's TLS port number.
706 #
707 # @auth: #optional the current authentication type used by the server
708 # 'none' if no authentication is being used
709 # 'spice' uses SASL or direct TLS authentication, depending on command
710 # line options
711 #
712 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
713 # be determined by the client or the server, or unknown if spice
714 # server doesn't provide this information.
715 #
716 # Since: 1.1
717 #
718 # @channels: a list of @SpiceChannel for each active spice channel
719 #
720 # Since: 0.14.0
721 ##
722 { 'type': 'SpiceInfo',
723 'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
724 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
725 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
726
727 ##
728 # @query-spice
729 #
730 # Returns information about the current SPICE server
731 #
732 # Returns: @SpiceInfo
733 #
734 # Since: 0.14.0
735 ##
736 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
737
738 ##
739 # @BalloonInfo:
740 #
741 # Information about the guest balloon device.
742 #
743 # @actual: the number of bytes the balloon currently contains
744 #
745 # @mem_swapped_in: #optional number of pages swapped in within the guest
746 #
747 # @mem_swapped_out: #optional number of pages swapped out within the guest
748 #
749 # @major_page_faults: #optional number of major page faults within the guest
750 #
751 # @minor_page_faults: #optional number of minor page faults within the guest
752 #
753 # @free_mem: #optional amount of memory (in bytes) free in the guest
754 #
755 # @total_mem: #optional amount of memory (in bytes) visible to the guest
756 #
757 # Since: 0.14.0
758 #
759 # Notes: all current versions of QEMU do not fill out optional information in
760 # this structure.
761 ##
762 { 'type': 'BalloonInfo',
763 'data': {'actual': 'int', '*mem_swapped_in': 'int',
764 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
765 '*minor_page_faults': 'int', '*free_mem': 'int',
766 '*total_mem': 'int'} }
767
768 ##
769 # @query-balloon:
770 #
771 # Return information about the balloon device.
772 #
773 # Returns: @BalloonInfo on success
774 # If the balloon driver is enabled but not functional because the KVM
775 # kernel module cannot support it, KvmMissingCap
776 # If no balloon device is present, DeviceNotActive
777 #
778 # Since: 0.14.0
779 ##
780 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
781
782 ##
783 # @PciMemoryRange:
784 #
785 # A PCI device memory region
786 #
787 # @base: the starting address (guest physical)
788 #
789 # @limit: the ending address (guest physical)
790 #
791 # Since: 0.14.0
792 ##
793 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
794
795 ##
796 # @PciMemoryRegion
797 #
798 # Information about a PCI device I/O region.
799 #
800 # @bar: the index of the Base Address Register for this region
801 #
802 # @type: 'io' if the region is a PIO region
803 # 'memory' if the region is a MMIO region
804 #
805 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
806 #
807 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
808 #
809 # Since: 0.14.0
810 ##
811 { 'type': 'PciMemoryRegion',
812 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
813 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
814
815 ##
816 # @PciBridgeInfo:
817 #
818 # Information about a PCI Bridge device
819 #
820 # @bus.number: primary bus interface number. This should be the number of the
821 # bus the device resides on.
822 #
823 # @bus.secondary: secondary bus interface number. This is the number of the
824 # main bus for the bridge
825 #
826 # @bus.subordinate: This is the highest number bus that resides below the
827 # bridge.
828 #
829 # @bus.io_range: The PIO range for all devices on this bridge
830 #
831 # @bus.memory_range: The MMIO range for all devices on this bridge
832 #
833 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
834 # this bridge
835 #
836 # @devices: a list of @PciDeviceInfo for each device on this bridge
837 #
838 # Since: 0.14.0
839 ##
840 { 'type': 'PciBridgeInfo',
841 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
842 'io_range': 'PciMemoryRange',
843 'memory_range': 'PciMemoryRange',
844 'prefetchable_range': 'PciMemoryRange' },
845 '*devices': ['PciDeviceInfo']} }
846
847 ##
848 # @PciDeviceInfo:
849 #
850 # Information about a PCI device
851 #
852 # @bus: the bus number of the device
853 #
854 # @slot: the slot the device is located in
855 #
856 # @function: the function of the slot used by the device
857 #
858 # @class_info.desc: #optional a string description of the device's class
859 #
860 # @class_info.class: the class code of the device
861 #
862 # @id.device: the PCI device id
863 #
864 # @id.vendor: the PCI vendor id
865 #
866 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
867 #
868 # @qdev_id: the device name of the PCI device
869 #
870 # @pci_bridge: if the device is a PCI bridge, the bridge information
871 #
872 # @regions: a list of the PCI I/O regions associated with the device
873 #
874 # Notes: the contents of @class_info.desc are not stable and should only be
875 # treated as informational.
876 #
877 # Since: 0.14.0
878 ##
879 { 'type': 'PciDeviceInfo',
880 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
881 'class_info': {'*desc': 'str', 'class': 'int'},
882 'id': {'device': 'int', 'vendor': 'int'},
883 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
884 'regions': ['PciMemoryRegion']} }
885
886 ##
887 # @PciInfo:
888 #
889 # Information about a PCI bus
890 #
891 # @bus: the bus index
892 #
893 # @devices: a list of devices on this bus
894 #
895 # Since: 0.14.0
896 ##
897 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
898
899 ##
900 # @query-pci:
901 #
902 # Return information about the PCI bus topology of the guest.
903 #
904 # Returns: a list of @PciInfo for each PCI bus
905 #
906 # Since: 0.14.0
907 ##
908 { 'command': 'query-pci', 'returns': ['PciInfo'] }
909
910 ##
911 # @BlockJobInfo:
912 #
913 # Information about a long-running block device operation.
914 #
915 # @type: the job type ('stream' for image streaming)
916 #
917 # @device: the block device name
918 #
919 # @len: the maximum progress value
920 #
921 # @offset: the current progress value
922 #
923 # @speed: the rate limit, bytes per second
924 #
925 # Since: 1.1
926 ##
927 { 'type': 'BlockJobInfo',
928 'data': {'type': 'str', 'device': 'str', 'len': 'int',
929 'offset': 'int', 'speed': 'int'} }
930
931 ##
932 # @query-block-jobs:
933 #
934 # Return information about long-running block device operations.
935 #
936 # Returns: a list of @BlockJobInfo for each active block job
937 #
938 # Since: 1.1
939 ##
940 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
941
942 ##
943 # @quit:
944 #
945 # This command will cause the QEMU process to exit gracefully. While every
946 # attempt is made to send the QMP response before terminating, this is not
947 # guaranteed. When using this interface, a premature EOF would not be
948 # unexpected.
949 #
950 # Since: 0.14.0
951 ##
952 { 'command': 'quit' }
953
954 ##
955 # @stop:
956 #
957 # Stop all guest VCPU execution.
958 #
959 # Since: 0.14.0
960 #
961 # Notes: This function will succeed even if the guest is already in the stopped
962 # state
963 ##
964 { 'command': 'stop' }
965
966 ##
967 # @system_reset:
968 #
969 # Performs a hard reset of a guest.
970 #
971 # Since: 0.14.0
972 ##
973 { 'command': 'system_reset' }
974
975 ##
976 # @system_powerdown:
977 #
978 # Requests that a guest perform a powerdown operation.
979 #
980 # Since: 0.14.0
981 #
982 # Notes: A guest may or may not respond to this command. This command
983 # returning does not indicate that a guest has accepted the request or
984 # that it has shut down. Many guests will respond to this command by
985 # prompting the user in some way.
986 ##
987 { 'command': 'system_powerdown' }
988
989 ##
990 # @cpu:
991 #
992 # This command is a nop that is only provided for the purposes of compatibility.
993 #
994 # Since: 0.14.0
995 #
996 # Notes: Do not use this command.
997 ##
998 { 'command': 'cpu', 'data': {'index': 'int'} }
999
1000 ##
1001 # @memsave:
1002 #
1003 # Save a portion of guest memory to a file.
1004 #
1005 # @val: the virtual address of the guest to start from
1006 #
1007 # @size: the size of memory region to save
1008 #
1009 # @filename: the file to save the memory to as binary data
1010 #
1011 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1012 # virtual address (defaults to CPU 0)
1013 #
1014 # Returns: Nothing on success
1015 # If @cpu is not a valid VCPU, InvalidParameterValue
1016 # If @filename cannot be opened, OpenFileFailed
1017 # If an I/O error occurs while writing the file, IOError
1018 #
1019 # Since: 0.14.0
1020 #
1021 # Notes: Errors were not reliably returned until 1.1
1022 ##
1023 { 'command': 'memsave',
1024 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1025
1026 ##
1027 # @pmemsave:
1028 #
1029 # Save a portion of guest physical memory to a file.
1030 #
1031 # @val: the physical address of the guest to start from
1032 #
1033 # @size: the size of memory region to save
1034 #
1035 # @filename: the file to save the memory to as binary data
1036 #
1037 # Returns: Nothing on success
1038 # If @filename cannot be opened, OpenFileFailed
1039 # If an I/O error occurs while writing the file, IOError
1040 #
1041 # Since: 0.14.0
1042 #
1043 # Notes: Errors were not reliably returned until 1.1
1044 ##
1045 { 'command': 'pmemsave',
1046 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1047
1048 ##
1049 # @cont:
1050 #
1051 # Resume guest VCPU execution.
1052 #
1053 # Since: 0.14.0
1054 #
1055 # Returns: If successful, nothing
1056 # If the QEMU is waiting for an incoming migration, MigrationExpected
1057 # If QEMU was started with an encrypted block device and a key has
1058 # not yet been set, DeviceEncrypted.
1059 #
1060 # Notes: This command will succeed if the guest is currently running.
1061 ##
1062 { 'command': 'cont' }
1063
1064 ##
1065 # @system_wakeup:
1066 #
1067 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1068 #
1069 # Since: 1.1
1070 #
1071 # Returns: nothing.
1072 ##
1073 { 'command': 'system_wakeup' }
1074
1075 ##
1076 # @inject-nmi:
1077 #
1078 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1079 #
1080 # Returns: If successful, nothing
1081 # If the Virtual Machine doesn't support NMI injection, Unsupported
1082 #
1083 # Since: 0.14.0
1084 #
1085 # Notes: Only x86 Virtual Machines support this command.
1086 ##
1087 { 'command': 'inject-nmi' }
1088
1089 ##
1090 # @set_link:
1091 #
1092 # Sets the link status of a virtual network adapter.
1093 #
1094 # @name: the device name of the virtual network adapter
1095 #
1096 # @up: true to set the link status to be up
1097 #
1098 # Returns: Nothing on success
1099 # If @name is not a valid network device, DeviceNotFound
1100 #
1101 # Since: 0.14.0
1102 #
1103 # Notes: Not all network adapters support setting link status. This command
1104 # will succeed even if the network adapter does not support link status
1105 # notification.
1106 ##
1107 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1108
1109 ##
1110 # @block_passwd:
1111 #
1112 # This command sets the password of a block device that has not been open
1113 # with a password and requires one.
1114 #
1115 # The two cases where this can happen are a block device is created through
1116 # QEMU's initial command line or a block device is changed through the legacy
1117 # @change interface.
1118 #
1119 # In the event that the block device is created through the initial command
1120 # line, the VM will start in the stopped state regardless of whether '-S' is
1121 # used. The intention is for a management tool to query the block devices to
1122 # determine which ones are encrypted, set the passwords with this command, and
1123 # then start the guest with the @cont command.
1124 #
1125 # @device: the name of the device to set the password on
1126 #
1127 # @password: the password to use for the device
1128 #
1129 # Returns: nothing on success
1130 # If @device is not a valid block device, DeviceNotFound
1131 # If @device is not encrypted, DeviceNotEncrypted
1132 # If @password is not valid for this device, InvalidPassword
1133 #
1134 # Notes: Not all block formats support encryption and some that do are not
1135 # able to validate that a password is correct. Disk corruption may
1136 # occur if an invalid password is specified.
1137 #
1138 # Since: 0.14.0
1139 ##
1140 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1141
1142 ##
1143 # @balloon:
1144 #
1145 # Request the balloon driver to change its balloon size.
1146 #
1147 # @value: the target size of the balloon in bytes
1148 #
1149 # Returns: Nothing on success
1150 # If the balloon driver is enabled but not functional because the KVM
1151 # kernel module cannot support it, KvmMissingCap
1152 # If no balloon device is present, DeviceNotActive
1153 #
1154 # Notes: This command just issues a request to the guest. When it returns,
1155 # the balloon size may not have changed. A guest can change the balloon
1156 # size independent of this command.
1157 #
1158 # Since: 0.14.0
1159 ##
1160 { 'command': 'balloon', 'data': {'value': 'int'} }
1161
1162 ##
1163 # @block_resize
1164 #
1165 # Resize a block image while a guest is running.
1166 #
1167 # @device: the name of the device to get the image resized
1168 #
1169 # @size: new image size in bytes
1170 #
1171 # Returns: nothing on success
1172 # If @device is not a valid block device, DeviceNotFound
1173 # If @size is negative, InvalidParameterValue
1174 # If the block device has no medium inserted, DeviceHasNoMedium
1175 # If the block device does not support resize, Unsupported
1176 # If the block device is read-only, DeviceIsReadOnly
1177 # If a long-running operation is using the device, DeviceInUse
1178 #
1179 # Since: 0.14.0
1180 ##
1181 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1182
1183 ##
1184 # @NewImageMode
1185 #
1186 # An enumeration that tells QEMU how to set the backing file path in
1187 # a new image file.
1188 #
1189 # @existing: QEMU should look for an existing image file.
1190 #
1191 # @absolute-paths: QEMU should create a new image with absolute paths
1192 # for the backing file.
1193 #
1194 # Since: 1.1
1195 ##
1196 { 'enum': 'NewImageMode'
1197 'data': [ 'existing', 'absolute-paths' ] }
1198
1199 ##
1200 # @BlockdevSnapshot
1201 #
1202 # @device: the name of the device to generate the snapshot from.
1203 #
1204 # @snapshot-file: the target of the new image. A new file will be created.
1205 #
1206 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1207 #
1208 # @mode: #optional whether and how QEMU should create a new image, default is
1209 # 'absolute-paths'.
1210 ##
1211 { 'type': 'BlockdevSnapshot',
1212 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1213 '*mode': 'NewImageMode' } }
1214
1215 ##
1216 # @BlockdevAction
1217 #
1218 # A discriminated record of operations that can be performed with
1219 # @transaction.
1220 ##
1221 { 'union': 'BlockdevAction',
1222 'data': {
1223 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1224 } }
1225
1226 ##
1227 # @transaction
1228 #
1229 # Atomically operate on a group of one or more block devices. If
1230 # any operation fails, then the entire set of actions will be
1231 # abandoned and the appropriate error returned. The only operation
1232 # supported is currently blockdev-snapshot-sync.
1233 #
1234 # List of:
1235 # @BlockdevAction: information needed for the device snapshot
1236 #
1237 # Returns: nothing on success
1238 # If @device is not a valid block device, DeviceNotFound
1239 # If @device is busy, DeviceInUse will be returned
1240 # If @snapshot-file can't be created, OpenFileFailed
1241 # If @snapshot-file can't be opened, OpenFileFailed
1242 # If @format is invalid, InvalidBlockFormat
1243 #
1244 # Note: The transaction aborts on the first failure. Therefore, there will
1245 # be only one device or snapshot file returned in an error condition, and
1246 # subsequent actions will not have been attempted.
1247 #
1248 # Since 1.1
1249 ##
1250 { 'command': 'transaction',
1251 'data': { 'actions': [ 'BlockdevAction' ] } }
1252
1253 ##
1254 # @blockdev-snapshot-sync
1255 #
1256 # Generates a synchronous snapshot of a block device.
1257 #
1258 # @device: the name of the device to generate the snapshot from.
1259 #
1260 # @snapshot-file: the target of the new image. If the file exists, or if it
1261 # is a device, the snapshot will be created in the existing
1262 # file/device. If does not exist, a new file will be created.
1263 #
1264 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1265 #
1266 # @mode: #optional whether and how QEMU should create a new image, default is
1267 # 'absolute-paths'.
1268 #
1269 # Returns: nothing on success
1270 # If @device is not a valid block device, DeviceNotFound
1271 # If @snapshot-file can't be opened, OpenFileFailed
1272 # If @format is invalid, InvalidBlockFormat
1273 #
1274 # Since 0.14.0
1275 ##
1276 { 'command': 'blockdev-snapshot-sync',
1277 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1278 '*mode': 'NewImageMode'} }
1279
1280 ##
1281 # @human-monitor-command:
1282 #
1283 # Execute a command on the human monitor and return the output.
1284 #
1285 # @command-line: the command to execute in the human monitor
1286 #
1287 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1288 #
1289 # Returns: the output of the command as a string
1290 #
1291 # Since: 0.14.0
1292 #
1293 # Notes: This command only exists as a stop-gap. It's use is highly
1294 # discouraged. The semantics of this command are not guaranteed.
1295 #
1296 # Known limitations:
1297 #
1298 # o This command is stateless, this means that commands that depend
1299 # on state information (such as getfd) might not work
1300 #
1301 # o Commands that prompt the user for data (eg. 'cont' when the block
1302 # device is encrypted) don't currently work
1303 ##
1304 { 'command': 'human-monitor-command',
1305 'data': {'command-line': 'str', '*cpu-index': 'int'},
1306 'returns': 'str' }
1307
1308 ##
1309 # @migrate_cancel
1310 #
1311 # Cancel the current executing migration process.
1312 #
1313 # Returns: nothing on success
1314 #
1315 # Notes: This command succeeds even if there is no migration process running.
1316 #
1317 # Since: 0.14.0
1318 ##
1319 { 'command': 'migrate_cancel' }
1320
1321 ##
1322 # @migrate_set_downtime
1323 #
1324 # Set maximum tolerated downtime for migration.
1325 #
1326 # @value: maximum downtime in seconds
1327 #
1328 # Returns: nothing on success
1329 #
1330 # Since: 0.14.0
1331 ##
1332 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1333
1334 ##
1335 # @migrate_set_speed
1336 #
1337 # Set maximum speed for migration.
1338 #
1339 # @value: maximum speed in bytes.
1340 #
1341 # Returns: nothing on success
1342 #
1343 # Notes: A value lesser than zero will be automatically round up to zero.
1344 #
1345 # Since: 0.14.0
1346 ##
1347 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1348
1349 ##
1350 # @ObjectPropertyInfo:
1351 #
1352 # @name: the name of the property
1353 #
1354 # @type: the type of the property. This will typically come in one of four
1355 # forms:
1356 #
1357 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1358 # These types are mapped to the appropriate JSON type.
1359 #
1360 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1361 # legacy qdev typename. These types are always treated as strings.
1362 #
1363 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1364 # device type name. Child properties create the composition tree.
1365 #
1366 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1367 # device type name. Link properties form the device model graph.
1368 #
1369 # Since: 1.1
1370 #
1371 # Notes: This type is experimental. Its syntax may change in future releases.
1372 ##
1373 { 'type': 'ObjectPropertyInfo',
1374 'data': { 'name': 'str', 'type': 'str' } }
1375
1376 ##
1377 # @qom-list:
1378 #
1379 # This command will list any properties of a object given a path in the object
1380 # model.
1381 #
1382 # @path: the path within the object model. See @qom-get for a description of
1383 # this parameter.
1384 #
1385 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1386 # object.
1387 #
1388 # Since: 1.1
1389 #
1390 # Notes: This command is experimental. It's syntax may change in future
1391 # releases.
1392 ##
1393 { 'command': 'qom-list',
1394 'data': { 'path': 'str' },
1395 'returns': [ 'ObjectPropertyInfo' ] }
1396
1397 ##
1398 # @qom-get:
1399 #
1400 # This command will get a property from a object model path and return the
1401 # value.
1402 #
1403 # @path: The path within the object model. There are two forms of supported
1404 # paths--absolute and partial paths.
1405 #
1406 # Absolute paths are derived from the root object and can follow child<>
1407 # or link<> properties. Since they can follow link<> properties, they
1408 # can be arbitrarily long. Absolute paths look like absolute filenames
1409 # and are prefixed with a leading slash.
1410 #
1411 # Partial paths look like relative filenames. They do not begin
1412 # with a prefix. The matching rules for partial paths are subtle but
1413 # designed to make specifying objects easy. At each level of the
1414 # composition tree, the partial path is matched as an absolute path.
1415 # The first match is not returned. At least two matches are searched
1416 # for. A successful result is only returned if only one match is
1417 # found. If more than one match is found, a flag is return to
1418 # indicate that the match was ambiguous.
1419 #
1420 # @property: The property name to read
1421 #
1422 # Returns: The property value. The type depends on the property type. legacy<>
1423 # properties are returned as #str. child<> and link<> properties are
1424 # returns as #str pathnames. All integer property types (u8, u16, etc)
1425 # are returned as #int.
1426 #
1427 # Since: 1.1
1428 #
1429 # Notes: This command is experimental and may change syntax in future releases.
1430 ##
1431 { 'command': 'qom-get',
1432 'data': { 'path': 'str', 'property': 'str' },
1433 'returns': 'visitor',
1434 'gen': 'no' }
1435
1436 ##
1437 # @qom-set:
1438 #
1439 # This command will set a property from a object model path.
1440 #
1441 # @path: see @qom-get for a description of this parameter
1442 #
1443 # @property: the property name to set
1444 #
1445 # @value: a value who's type is appropriate for the property type. See @qom-get
1446 # for a description of type mapping.
1447 #
1448 # Since: 1.1
1449 #
1450 # Notes: This command is experimental and may change syntax in future releases.
1451 ##
1452 { 'command': 'qom-set',
1453 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1454 'gen': 'no' }
1455
1456 ##
1457 # @set_password:
1458 #
1459 # Sets the password of a remote display session.
1460 #
1461 # @protocol: `vnc' to modify the VNC server password
1462 # `spice' to modify the Spice server password
1463 #
1464 # @password: the new password
1465 #
1466 # @connected: #optional how to handle existing clients when changing the
1467 # password. If nothing is specified, defaults to `keep'
1468 # `fail' to fail the command if clients are connected
1469 # `disconnect' to disconnect existing clients
1470 # `keep' to maintain existing clients
1471 #
1472 # Returns: Nothing on success
1473 # If Spice is not enabled, DeviceNotFound
1474 # If @protocol does not support connected, InvalidParameter
1475 # If @protocol is invalid, InvalidParameter
1476 # If any other error occurs, SetPasswdFailed
1477 #
1478 # Notes: If VNC is not enabled, SetPasswdFailed is returned.
1479 #
1480 # Since: 0.14.0
1481 ##
1482 { 'command': 'set_password',
1483 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1484
1485 ##
1486 # @expire_password:
1487 #
1488 # Expire the password of a remote display server.
1489 #
1490 # @protocol: the name of the remote display protocol `vnc' or `spice'
1491 #
1492 # @time: when to expire the password.
1493 # `now' to expire the password immediately
1494 # `never' to cancel password expiration
1495 # `+INT' where INT is the number of seconds from now (integer)
1496 # `INT' where INT is the absolute time in seconds
1497 #
1498 # Returns: Nothing on success
1499 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1500 # If an error occurs setting password expiration, SetPasswdFailed
1501 # If @protocol is not `spice' or 'vnc', InvalidParameter
1502 #
1503 # Since: 0.14.0
1504 #
1505 # Notes: Time is relative to the server and currently there is no way to
1506 # coordinate server time with client time. It is not recommended to
1507 # use the absolute time version of the @time parameter unless you're
1508 # sure you are on the same machine as the QEMU instance.
1509 ##
1510 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1511
1512 ##
1513 # @eject:
1514 #
1515 # Ejects a device from a removable drive.
1516 #
1517 # @device: The name of the device
1518 #
1519 # @force: @optional If true, eject regardless of whether the drive is locked.
1520 # If not specified, the default value is false.
1521 #
1522 # Returns: Nothing on success
1523 # If @device is not a valid block device, DeviceNotFound
1524 # If @device is not removable and @force is false, DeviceNotRemovable
1525 # If @force is false and @device is locked, DeviceLocked
1526 #
1527 # Notes: Ejecting a device will no media results in success
1528 #
1529 # Since: 0.14.0
1530 ##
1531 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1532
1533 ##
1534 # @change-vnc-password:
1535 #
1536 # Change the VNC server password.
1537 #
1538 # @target: the new password to use with VNC authentication
1539 #
1540 # Since: 1.1
1541 #
1542 # Notes: An empty password in this command will set the password to the empty
1543 # string. Existing clients are unaffected by executing this command.
1544 ##
1545 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1546
1547 ##
1548 # @change:
1549 #
1550 # This command is multiple commands multiplexed together.
1551 #
1552 # @device: This is normally the name of a block device but it may also be 'vnc'.
1553 # when it's 'vnc', then sub command depends on @target
1554 #
1555 # @target: If @device is a block device, then this is the new filename.
1556 # If @device is 'vnc', then if the value 'password' selects the vnc
1557 # change password command. Otherwise, this specifies a new server URI
1558 # address to listen to for VNC connections.
1559 #
1560 # @arg: If @device is a block device, then this is an optional format to open
1561 # the device with.
1562 # If @device is 'vnc' and @target is 'password', this is the new VNC
1563 # password to set. If this argument is an empty string, then no future
1564 # logins will be allowed.
1565 #
1566 # Returns: Nothing on success.
1567 # If @device is not a valid block device, DeviceNotFound
1568 # If @format is not a valid block format, InvalidBlockFormat
1569 # If the new block device is encrypted, DeviceEncrypted. Note that
1570 # if this error is returned, the device has been opened successfully
1571 # and an additional call to @block_passwd is required to set the
1572 # device's password. The behavior of reads and writes to the block
1573 # device between when these calls are executed is undefined.
1574 #
1575 # Notes: It is strongly recommended that this interface is not used especially
1576 # for changing block devices.
1577 #
1578 # Since: 0.14.0
1579 ##
1580 { 'command': 'change',
1581 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1582
1583 ##
1584 # @block_set_io_throttle:
1585 #
1586 # Change I/O throttle limits for a block drive.
1587 #
1588 # @device: The name of the device
1589 #
1590 # @bps: total throughput limit in bytes per second
1591 #
1592 # @bps_rd: read throughput limit in bytes per second
1593 #
1594 # @bps_wr: write throughput limit in bytes per second
1595 #
1596 # @iops: total I/O operations per second
1597 #
1598 # @ops_rd: read I/O operations per second
1599 #
1600 # @iops_wr: write I/O operations per second
1601 #
1602 # Returns: Nothing on success
1603 # If @device is not a valid block device, DeviceNotFound
1604 # If the argument combination is invalid, InvalidParameterCombination
1605 #
1606 # Since: 1.1
1607 ##
1608 { 'command': 'block_set_io_throttle',
1609 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1610 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1611
1612 ##
1613 # @block-stream:
1614 #
1615 # Copy data from a backing file into a block device.
1616 #
1617 # The block streaming operation is performed in the background until the entire
1618 # backing file has been copied. This command returns immediately once streaming
1619 # has started. The status of ongoing block streaming operations can be checked
1620 # with query-block-jobs. The operation can be stopped before it has completed
1621 # using the block-job-cancel command.
1622 #
1623 # If a base file is specified then sectors are not copied from that base file and
1624 # its backing chain. When streaming completes the image file will have the base
1625 # file as its backing file. This can be used to stream a subset of the backing
1626 # file chain instead of flattening the entire image.
1627 #
1628 # On successful completion the image file is updated to drop the backing file
1629 # and the BLOCK_JOB_COMPLETED event is emitted.
1630 #
1631 # @device: the device name
1632 #
1633 # @base: #optional the common backing file name
1634 #
1635 # @speed: #optional the maximum speed, in bytes per second
1636 #
1637 # Returns: Nothing on success
1638 # If streaming is already active on this device, DeviceInUse
1639 # If @device does not exist, DeviceNotFound
1640 # If image streaming is not supported by this device, NotSupported
1641 # If @base does not exist, BaseNotFound
1642 # If @speed is invalid, InvalidParameter
1643 #
1644 # Since: 1.1
1645 ##
1646 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1647 '*speed': 'int' } }
1648
1649 ##
1650 # @block-job-set-speed:
1651 #
1652 # Set maximum speed for a background block operation.
1653 #
1654 # This command can only be issued when there is an active block job.
1655 #
1656 # Throttling can be disabled by setting the speed to 0.
1657 #
1658 # @device: the device name
1659 #
1660 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
1661 # Defaults to 0.
1662 #
1663 # Returns: Nothing on success
1664 # If the job type does not support throttling, NotSupported
1665 # If the speed value is invalid, InvalidParameter
1666 # If no background operation is active on this device, DeviceNotActive
1667 #
1668 # Since: 1.1
1669 ##
1670 { 'command': 'block-job-set-speed',
1671 'data': { 'device': 'str', 'speed': 'int' } }
1672
1673 ##
1674 # @block-job-cancel:
1675 #
1676 # Stop an active background block operation.
1677 #
1678 # This command returns immediately after marking the active background block
1679 # operation for cancellation. It is an error to call this command if no
1680 # operation is in progress.
1681 #
1682 # The operation will cancel as soon as possible and then emit the
1683 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
1684 # enumerated using query-block-jobs.
1685 #
1686 # For streaming, the image file retains its backing file unless the streaming
1687 # operation happens to complete just as it is being cancelled. A new streaming
1688 # operation can be started at a later time to finish copying all data from the
1689 # backing file.
1690 #
1691 # @device: the device name
1692 #
1693 # Returns: Nothing on success
1694 # If no background operation is active on this device, DeviceNotActive
1695 # If cancellation already in progress, DeviceInUse
1696 #
1697 # Since: 1.1
1698 ##
1699 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1700
1701 ##
1702 # @ObjectTypeInfo:
1703 #
1704 # This structure describes a search result from @qom-list-types
1705 #
1706 # @name: the type name found in the search
1707 #
1708 # Since: 1.1
1709 #
1710 # Notes: This command is experimental and may change syntax in future releases.
1711 ##
1712 { 'type': 'ObjectTypeInfo',
1713 'data': { 'name': 'str' } }
1714
1715 ##
1716 # @qom-list-types:
1717 #
1718 # This command will return a list of types given search parameters
1719 #
1720 # @implements: if specified, only return types that implement this type name
1721 #
1722 # @abstract: if true, include abstract types in the results
1723 #
1724 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1725 #
1726 # Since: 1.1
1727 #
1728 # Notes: This command is experimental and may change syntax in future releases.
1729 ##
1730 { 'command': 'qom-list-types',
1731 'data': { '*implements': 'str', '*abstract': 'bool' },
1732 'returns': [ 'ObjectTypeInfo' ] }
1733
1734 ##
1735 # @migrate
1736 #
1737 # Migrates the current running guest to another Virtual Machine.
1738 #
1739 # @uri: the Uniform Resource Identifier of the destination VM
1740 #
1741 # @blk: #optional do block migration (full disk copy)
1742 #
1743 # @inc: #optional incremental disk copy migration
1744 #
1745 # @detach: this argument exists only for compatibility reasons and
1746 # is ignored by QEMU
1747 #
1748 # Returns: nothing on success
1749 #
1750 # Since: 0.14.0
1751 ##
1752 { 'command': 'migrate',
1753 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1754
1755 # @xen-save-devices-state:
1756 #
1757 # Save the state of all devices to file. The RAM and the block devices
1758 # of the VM are not saved by this command.
1759 #
1760 # @filename: the file to save the state of the devices to as binary
1761 # data. See xen-save-devices-state.txt for a description of the binary
1762 # format.
1763 #
1764 # Returns: Nothing on success
1765 # If @filename cannot be opened, OpenFileFailed
1766 # If an I/O error occurs while writing the file, IOError
1767 #
1768 # Since: 1.1
1769 ##
1770 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1771
1772 ##
1773 # @device_del:
1774 #
1775 # Remove a device from a guest
1776 #
1777 # @id: the name of the device
1778 #
1779 # Returns: Nothing on success
1780 # If @id is not a valid device, DeviceNotFound
1781 # If the device does not support unplug, BusNoHotplug
1782 #
1783 # Notes: When this command completes, the device may not be removed from the
1784 # guest. Hot removal is an operation that requires guest cooperation.
1785 # This command merely requests that the guest begin the hot removal
1786 # process.
1787 #
1788 # Since: 0.14.0
1789 ##
1790 { 'command': 'device_del', 'data': {'id': 'str'} }
1791
1792 ##
1793 # @dump-guest-memory
1794 #
1795 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1796 # very long depending on the amount of guest memory. This command is only
1797 # supported on i386 and x86_64.
1798 #
1799 # @paging: if true, do paging to get guest's memory mapping. This allows
1800 # using gdb to process the core file. However, setting @paging to false
1801 # may be desirable because of two reasons:
1802 #
1803 # 1. The guest may be in a catastrophic state or can have corrupted
1804 # memory, which cannot be trusted
1805 # 2. The guest can be in real-mode even if paging is enabled. For example,
1806 # the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
1807 #
1808 # @protocol: the filename or file descriptor of the vmcore. The supported
1809 # protocols are:
1810 #
1811 # 1. file: the protocol starts with "file:", and the following string is
1812 # the file's path.
1813 # 2. fd: the protocol starts with "fd:", and the following string is the
1814 # fd's name.
1815 #
1816 # @begin: #optional if specified, the starting physical address.
1817 #
1818 # @length: #optional if specified, the memory size, in bytes. If you don't
1819 # want to dump all guest's memory, please specify the start @begin and @length
1820 #
1821 # Returns: nothing on success
1822 # If @begin contains an invalid address, InvalidParameter
1823 # If only one of @begin and @length is specified, MissingParameter
1824 # If @protocol stats with "fd:", and the fd cannot be found, FdNotFound
1825 # If @protocol starts with "file:", and the file cannot be
1826 # opened, OpenFileFailed
1827 # If @protocol does not start with "fd:" or "file:", InvalidParameter
1828 # If an I/O error occurs while writing the file, IOError
1829 # If the target does not support this command, Unsupported
1830 #
1831 # Since: 1.2
1832 ##
1833 { 'command': 'dump-guest-memory',
1834 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1835 '*length': 'int' } }
1836 ##
1837 # @netdev_add:
1838 #
1839 # Add a network backend.
1840 #
1841 # @type: the type of network backend. Current valid values are 'user', 'tap',
1842 # 'vde', 'socket', 'dump' and 'bridge'
1843 #
1844 # @id: the name of the new network backend
1845 #
1846 # @props: #optional a list of properties to be passed to the backend in
1847 # the format 'name=value', like 'ifname=tap0,script=no'
1848 #
1849 # Notes: The semantics of @props is not well defined. Future commands will be
1850 # introduced that provide stronger typing for backend creation.
1851 #
1852 # Since: 0.14.0
1853 #
1854 # Returns: Nothing on success
1855 # If @type is not a valid network backend, DeviceNotFound
1856 # If @id is not a valid identifier, InvalidParameterValue
1857 # if @id already exists, DuplicateId
1858 # If @props contains an invalid parameter for this backend,
1859 # InvalidParameter
1860 ##
1861 { 'command': 'netdev_add',
1862 'data': {'type': 'str', 'id': 'str', '*props': '**'},
1863 'gen': 'no' }
1864
1865 ##
1866 # @netdev_del:
1867 #
1868 # Remove a network backend.
1869 #
1870 # @id: the name of the network backend to remove
1871 #
1872 # Returns: Nothing on success
1873 # If @id is not a valid network backend, DeviceNotFound
1874 #
1875 # Since: 0.14.0
1876 ##
1877 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1878
1879 ##
1880 # @NetdevNoneOptions
1881 #
1882 # Use it alone to have zero network devices.
1883 #
1884 # Since 1.2
1885 ##
1886 { 'type': 'NetdevNoneOptions',
1887 'data': { } }
1888
1889 ##
1890 # @NetLegacyNicOptions
1891 #
1892 # Create a new Network Interface Card.
1893 #
1894 # @netdev: #optional id of -netdev to connect to
1895 #
1896 # @macaddr: #optional MAC address
1897 #
1898 # @model: #optional device model (e1000, rtl8139, virtio etc.)
1899 #
1900 # @addr: #optional PCI device address
1901 #
1902 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
1903 #
1904 # Since 1.2
1905 ##
1906 { 'type': 'NetLegacyNicOptions',
1907 'data': {
1908 '*netdev': 'str',
1909 '*macaddr': 'str',
1910 '*model': 'str',
1911 '*addr': 'str',
1912 '*vectors': 'uint32' } }
1913
1914 ##
1915 # @String
1916 #
1917 # A fat type wrapping 'str', to be embedded in lists.
1918 #
1919 # Since 1.2
1920 ##
1921 { 'type': 'String',
1922 'data': {
1923 'str': 'str' } }
1924
1925 ##
1926 # @NetdevUserOptions
1927 #
1928 # Use the user mode network stack which requires no administrator privilege to
1929 # run.
1930 #
1931 # @hostname: #optional client hostname reported by the builtin DHCP server
1932 #
1933 # @restrict: #optional isolate the guest from the host
1934 #
1935 # @ip: #optional legacy parameter, use net= instead
1936 #
1937 # @net: #optional IP address and optional netmask
1938 #
1939 # @host: #optional guest-visible address of the host
1940 #
1941 # @tftp: #optional root directory of the built-in TFTP server
1942 #
1943 # @bootfile: #optional BOOTP filename, for use with tftp=
1944 #
1945 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
1946 # assign
1947 #
1948 # @dns: #optional guest-visible address of the virtual nameserver
1949 #
1950 # @smb: #optional root directory of the built-in SMB server
1951 #
1952 # @smbserver: #optional IP address of the built-in SMB server
1953 #
1954 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
1955 # endpoints
1956 #
1957 # @guestfwd: #optional forward guest TCP connections
1958 #
1959 # Since 1.2
1960 ##
1961 { 'type': 'NetdevUserOptions',
1962 'data': {
1963 '*hostname': 'str',
1964 '*restrict': 'bool',
1965 '*ip': 'str',
1966 '*net': 'str',
1967 '*host': 'str',
1968 '*tftp': 'str',
1969 '*bootfile': 'str',
1970 '*dhcpstart': 'str',
1971 '*dns': 'str',
1972 '*smb': 'str',
1973 '*smbserver': 'str',
1974 '*hostfwd': ['String'],
1975 '*guestfwd': ['String'] } }
1976
1977 ##
1978 # @NetdevTapOptions
1979 #
1980 # Connect the host TAP network interface name to the VLAN.
1981 #
1982 # @ifname: #optional interface name
1983 #
1984 # @fd: #optional file descriptor of an already opened tap
1985 #
1986 # @script: #optional script to initialize the interface
1987 #
1988 # @downscript: #optional script to shut down the interface
1989 #
1990 # @helper: #optional command to execute to configure bridge
1991 #
1992 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
1993 #
1994 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
1995 #
1996 # @vhost: #optional enable vhost-net network accelerator
1997 #
1998 # @vhostfd: #optional file descriptor of an already opened vhost net device
1999 #
2000 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2001 #
2002 # Since 1.2
2003 ##
2004 { 'type': 'NetdevTapOptions',
2005 'data': {
2006 '*ifname': 'str',
2007 '*fd': 'str',
2008 '*script': 'str',
2009 '*downscript': 'str',
2010 '*helper': 'str',
2011 '*sndbuf': 'size',
2012 '*vnet_hdr': 'bool',
2013 '*vhost': 'bool',
2014 '*vhostfd': 'str',
2015 '*vhostforce': 'bool' } }
2016
2017 ##
2018 # @NetdevSocketOptions
2019 #
2020 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2021 # socket connection.
2022 #
2023 # @fd: #optional file descriptor of an already opened socket
2024 #
2025 # @listen: #optional port number, and optional hostname, to listen on
2026 #
2027 # @connect: #optional port number, and optional hostname, to connect to
2028 #
2029 # @mcast: #optional UDP multicast address and port number
2030 #
2031 # @localaddr: #optional source address and port for multicast and udp packets
2032 #
2033 # @udp: #optional UDP unicast address and port number
2034 #
2035 # Since 1.2
2036 ##
2037 { 'type': 'NetdevSocketOptions',
2038 'data': {
2039 '*fd': 'str',
2040 '*listen': 'str',
2041 '*connect': 'str',
2042 '*mcast': 'str',
2043 '*localaddr': 'str',
2044 '*udp': 'str' } }
2045
2046 ##
2047 # @NetdevVdeOptions
2048 #
2049 # Connect the VLAN to a vde switch running on the host.
2050 #
2051 # @sock: #optional socket path
2052 #
2053 # @port: #optional port number
2054 #
2055 # @group: #optional group owner of socket
2056 #
2057 # @mode: #optional permissions for socket
2058 #
2059 # Since 1.2
2060 ##
2061 { 'type': 'NetdevVdeOptions',
2062 'data': {
2063 '*sock': 'str',
2064 '*port': 'uint16',
2065 '*group': 'str',
2066 '*mode': 'uint16' } }
2067
2068 ##
2069 # @NetdevDumpOptions
2070 #
2071 # Dump VLAN network traffic to a file.
2072 #
2073 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2074 # suffixes.
2075 #
2076 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2077 #
2078 # Since 1.2
2079 ##
2080 { 'type': 'NetdevDumpOptions',
2081 'data': {
2082 '*len': 'size',
2083 '*file': 'str' } }
2084
2085 ##
2086 # @NetdevBridgeOptions
2087 #
2088 # Connect a host TAP network interface to a host bridge device.
2089 #
2090 # @br: #optional bridge name
2091 #
2092 # @helper: #optional command to execute to configure bridge
2093 #
2094 # Since 1.2
2095 ##
2096 { 'type': 'NetdevBridgeOptions',
2097 'data': {
2098 '*br': 'str',
2099 '*helper': 'str' } }
2100
2101 ##
2102 # @NetdevHubPortOptions
2103 #
2104 # Connect two or more net clients through a software hub.
2105 #
2106 # @hubid: hub identifier number
2107 #
2108 # Since 1.2
2109 ##
2110 { 'type': 'NetdevHubPortOptions',
2111 'data': {
2112 'hubid': 'int32' } }
2113
2114 ##
2115 # @NetClientOptions
2116 #
2117 # A discriminated record of network device traits.
2118 #
2119 # Since 1.2
2120 ##
2121 { 'union': 'NetClientOptions',
2122 'data': {
2123 'none': 'NetdevNoneOptions',
2124 'nic': 'NetLegacyNicOptions',
2125 'user': 'NetdevUserOptions',
2126 'tap': 'NetdevTapOptions',
2127 'socket': 'NetdevSocketOptions',
2128 'vde': 'NetdevVdeOptions',
2129 'dump': 'NetdevDumpOptions',
2130 'bridge': 'NetdevBridgeOptions',
2131 'hubport': 'NetdevHubPortOptions' } }
2132
2133 ##
2134 # @NetLegacy
2135 #
2136 # Captures the configuration of a network device; legacy.
2137 #
2138 # @vlan: #optional vlan number
2139 #
2140 # @id: #optional identifier for monitor commands
2141 #
2142 # @name: #optional identifier for monitor commands, ignored if @id is present
2143 #
2144 # @opts: device type specific properties (legacy)
2145 #
2146 # Since 1.2
2147 ##
2148 { 'type': 'NetLegacy',
2149 'data': {
2150 '*vlan': 'int32',
2151 '*id': 'str',
2152 '*name': 'str',
2153 'opts': 'NetClientOptions' } }
2154
2155 ##
2156 # @Netdev
2157 #
2158 # Captures the configuration of a network device.
2159 #
2160 # @id: identifier for monitor commands.
2161 #
2162 # @opts: device type specific properties
2163 #
2164 # Since 1.2
2165 ##
2166 { 'type': 'Netdev',
2167 'data': {
2168 'id': 'str',
2169 'opts': 'NetClientOptions' } }
2170
2171 ##
2172 # @getfd:
2173 #
2174 # Receive a file descriptor via SCM rights and assign it a name
2175 #
2176 # @fdname: file descriptor name
2177 #
2178 # Returns: Nothing on success
2179 # If file descriptor was not received, FdNotSupplied
2180 # If @fdname is not valid, InvalidParameterType
2181 #
2182 # Since: 0.14.0
2183 #
2184 # Notes: If @fdname already exists, the file descriptor assigned to
2185 # it will be closed and replaced by the received file
2186 # descriptor.
2187 # The 'closefd' command can be used to explicitly close the
2188 # file descriptor when it is no longer needed.
2189 ##
2190 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2191
2192 ##
2193 # @closefd:
2194 #
2195 # Close a file descriptor previously passed via SCM rights
2196 #
2197 # @fdname: file descriptor name
2198 #
2199 # Returns: Nothing on success
2200 # If @fdname is not found, FdNotFound
2201 #
2202 # Since: 0.14.0
2203 ##
2204 { 'command': 'closefd', 'data': {'fdname': 'str'} }