]> Git Repo - qemu.git/blob - qapi-schema.json
a92adb1d5ba064b114885a8f8f75ea085a621a9c
[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 # @encrypted: true if the backing device is encrypted
402 #
403 # @bps: total throughput limit in bytes per second is specified
404 #
405 # @bps_rd: read throughput limit in bytes per second is specified
406 #
407 # @bps_wr: write throughput limit in bytes per second is specified
408 #
409 # @iops: total I/O operations per second is specified
410 #
411 # @iops_rd: read I/O operations per second is specified
412 #
413 # @iops_wr: write I/O operations per second is specified
414 #
415 # Since: 0.14.0
416 #
417 # Notes: This interface is only found in @BlockInfo.
418 ##
419 { 'type': 'BlockDeviceInfo',
420   'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
421             '*backing_file': 'str', 'encrypted': 'bool',
422             'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
423             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
424
425 ##
426 # @BlockDeviceIoStatus:
427 #
428 # An enumeration of block device I/O status.
429 #
430 # @ok: The last I/O operation has succeeded
431 #
432 # @failed: The last I/O operation has failed
433 #
434 # @nospace: The last I/O operation has failed due to a no-space condition
435 #
436 # Since: 1.0
437 ##
438 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
439
440 ##
441 # @BlockInfo:
442 #
443 # Block device information.  This structure describes a virtual device and
444 # the backing device associated with it.
445 #
446 # @device: The device name associated with the virtual device.
447 #
448 # @type: This field is returned only for compatibility reasons, it should
449 #        not be used (always returns 'unknown')
450 #
451 # @removable: True if the device supports removable media.
452 #
453 # @locked: True if the guest has locked this device from having its media
454 #          removed
455 #
456 # @tray_open: #optional True if the device has a tray and it is open
457 #             (only present if removable is true)
458 #
459 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
460 #             supports it and the VM is configured to stop on errors
461 #
462 # @inserted: #optional @BlockDeviceInfo describing the device if media is
463 #            present
464 #
465 # Since:  0.14.0
466 ##
467 { 'type': 'BlockInfo',
468   'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
469            'locked': 'bool', '*inserted': 'BlockDeviceInfo',
470            '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus'} }
471
472 ##
473 # @query-block:
474 #
475 # Get a list of BlockInfo for all virtual block devices.
476 #
477 # Returns: a list of @BlockInfo describing each virtual block device
478 #
479 # Since: 0.14.0
480 ##
481 { 'command': 'query-block', 'returns': ['BlockInfo'] }
482
483 ##
484 # @BlockDeviceStats:
485 #
486 # Statistics of a virtual block device or a block backing device.
487 #
488 # @rd_bytes:      The number of bytes read by the device.
489 #
490 # @wr_bytes:      The number of bytes written by the device.
491 #
492 # @rd_operations: The number of read operations performed by the device.
493 #
494 # @wr_operations: The number of write operations performed by the device.
495 #
496 # @flush_operations: The number of cache flush operations performed by the
497 #                    device (since 0.15.0)
498 #
499 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
500 #                       (since 0.15.0).
501 #
502 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
503 #
504 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
505 #
506 # @wr_highest_offset: The offset after the greatest byte written to the
507 #                     device.  The intended use of this information is for
508 #                     growable sparse files (like qcow2) that are used on top
509 #                     of a physical device.
510 #
511 # Since: 0.14.0
512 ##
513 { 'type': 'BlockDeviceStats',
514   'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
515            'wr_operations': 'int', 'flush_operations': 'int',
516            'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
517            'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
518
519 ##
520 # @BlockStats:
521 #
522 # Statistics of a virtual block device or a block backing device.
523 #
524 # @device: #optional If the stats are for a virtual block device, the name
525 #          corresponding to the virtual block device.
526 #
527 # @stats:  A @BlockDeviceStats for the device.
528 #
529 # @parent: #optional This may point to the backing block device if this is a
530 #          a virtual block device.  If it's a backing block, this will point
531 #          to the backing file is one is present.
532 #
533 # Since: 0.14.0
534 ##
535 { 'type': 'BlockStats',
536   'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
537            '*parent': 'BlockStats'} }
538
539 ##
540 # @query-blockstats:
541 #
542 # Query the @BlockStats for all virtual block devices.
543 #
544 # Returns: A list of @BlockStats for each virtual block devices.
545 #
546 # Since: 0.14.0
547 ##
548 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
549
550 ##
551 # @VncClientInfo:
552 #
553 # Information about a connected VNC client.
554 #
555 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
556 #        when possible.
557 #
558 # @family: 'ipv6' if the client is connected via IPv6 and TCP
559 #          'ipv4' if the client is connected via IPv4 and TCP
560 #          'unix' if the client is connected via a unix domain socket
561 #          'unknown' otherwise
562 #
563 # @service: The service name of the client's port.  This may depends on the
564 #           host system's service database so symbolic names should not be
565 #           relied on.
566 #
567 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
568 #              Name of the client.
569 #
570 # @sasl_username: #optional If SASL authentication is in use, the SASL username
571 #                 used for authentication.
572 #
573 # Since: 0.14.0
574 ##
575 { 'type': 'VncClientInfo',
576   'data': {'host': 'str', 'family': 'str', 'service': 'str',
577            '*x509_dname': 'str', '*sasl_username': 'str'} }
578
579 ##
580 # @VncInfo:
581 #
582 # Information about the VNC session.
583 #
584 # @enabled: true if the VNC server is enabled, false otherwise
585 #
586 # @host: #optional The hostname the VNC server is bound to.  This depends on
587 #        the name resolution on the host and may be an IP address.
588 #
589 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
590 #                    'ipv4' if the host is listening for IPv4 connections
591 #                    'unix' if the host is listening on a unix domain socket
592 #                    'unknown' otherwise
593 #
594 # @service: #optional The service name of the server's port.  This may depends
595 #           on the host system's service database so symbolic names should not
596 #           be relied on.
597 #
598 # @auth: #optional the current authentication type used by the server
599 #        'none' if no authentication is being used
600 #        'vnc' if VNC authentication is being used
601 #        'vencrypt+plain' if VEncrypt is used with plain text authentication
602 #        'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
603 #        'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
604 #        'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
605 #        'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
606 #        'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
607 #        'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
608 #        'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
609 #        'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
610 #
611 # @clients: a list of @VncClientInfo of all currently connected clients
612 #
613 # Since: 0.14.0
614 ##
615 { 'type': 'VncInfo',
616   'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
617            '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
618
619 ##
620 # @query-vnc:
621 #
622 # Returns information about the current VNC server
623 #
624 # Returns: @VncInfo
625 #          If VNC support is not compiled in, FeatureDisabled
626 #
627 # Since: 0.14.0
628 ##
629 { 'command': 'query-vnc', 'returns': 'VncInfo' }
630
631 ##
632 # @SpiceChannel
633 #
634 # Information about a SPICE client channel.
635 #
636 # @host: The host name of the client.  QEMU tries to resolve this to a DNS name
637 #        when possible.
638 #
639 # @family: 'ipv6' if the client is connected via IPv6 and TCP
640 #          'ipv4' if the client is connected via IPv4 and TCP
641 #          'unix' if the client is connected via a unix domain socket
642 #          'unknown' otherwise
643 #
644 # @port: The client's port number.
645 #
646 # @connection-id: SPICE connection id number.  All channels with the same id
647 #                 belong to the same SPICE session.
648 #
649 # @connection-type: SPICE channel type number.  "1" is the main control
650 #                   channel, filter for this one if you want to track spice
651 #                   sessions only
652 #
653 # @channel-id: SPICE channel ID number.  Usually "0", might be different when
654 #              multiple channels of the same type exist, such as multiple
655 #              display channels in a multihead setup
656 #
657 # @tls: true if the channel is encrypted, false otherwise.
658 #
659 # Since: 0.14.0
660 ##
661 { 'type': 'SpiceChannel',
662   'data': {'host': 'str', 'family': 'str', 'port': 'str',
663            'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
664            'tls': 'bool'} }
665
666 ##
667 # @SpiceQueryMouseMode
668 #
669 # An enumation of Spice mouse states.
670 #
671 # @client: Mouse cursor position is determined by the client.
672 #
673 # @server: Mouse cursor position is determined by the server.
674 #
675 # @unknown: No information is available about mouse mode used by
676 #           the spice server.
677 #
678 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
679 #
680 # Since: 1.1
681 ##
682 { 'enum': 'SpiceQueryMouseMode',
683   'data': [ 'client', 'server', 'unknown' ] }
684
685 ##
686 # @SpiceInfo
687 #
688 # Information about the SPICE session.
689
690 # @enabled: true if the SPICE server is enabled, false otherwise
691 #
692 # @host: #optional The hostname the SPICE server is bound to.  This depends on
693 #        the name resolution on the host and may be an IP address.
694 #
695 # @port: #optional The SPICE server's port number.
696 #
697 # @compiled-version: #optional SPICE server version.
698 #
699 # @tls-port: #optional The SPICE server's TLS port number.
700 #
701 # @auth: #optional the current authentication type used by the server
702 #        'none'  if no authentication is being used
703 #        'spice' uses SASL or direct TLS authentication, depending on command
704 #                line options
705 #
706 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
707 #              be determined by the client or the server, or unknown if spice
708 #              server doesn't provide this information.
709 #
710 #              Since: 1.1
711 #
712 # @channels: a list of @SpiceChannel for each active spice channel
713 #
714 # Since: 0.14.0
715 ##
716 { 'type': 'SpiceInfo',
717   'data': {'enabled': 'bool', '*host': 'str', '*port': 'int',
718            '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
719            'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
720
721 ##
722 # @query-spice
723 #
724 # Returns information about the current SPICE server
725 #
726 # Returns: @SpiceInfo
727 #
728 # Since: 0.14.0
729 ##
730 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
731
732 ##
733 # @BalloonInfo:
734 #
735 # Information about the guest balloon device.
736 #
737 # @actual: the number of bytes the balloon currently contains
738 #
739 # @mem_swapped_in: #optional number of pages swapped in within the guest
740 #
741 # @mem_swapped_out: #optional number of pages swapped out within the guest
742 #
743 # @major_page_faults: #optional number of major page faults within the guest
744 #
745 # @minor_page_faults: #optional number of minor page faults within the guest
746 #
747 # @free_mem: #optional amount of memory (in bytes) free in the guest
748 #
749 # @total_mem: #optional amount of memory (in bytes) visible to the guest
750 #
751 # Since: 0.14.0
752 #
753 # Notes: all current versions of QEMU do not fill out optional information in
754 #        this structure.
755 ##
756 { 'type': 'BalloonInfo',
757   'data': {'actual': 'int', '*mem_swapped_in': 'int',
758            '*mem_swapped_out': 'int', '*major_page_faults': 'int',
759            '*minor_page_faults': 'int', '*free_mem': 'int',
760            '*total_mem': 'int'} }
761
762 ##
763 # @query-balloon:
764 #
765 # Return information about the balloon device.
766 #
767 # Returns: @BalloonInfo on success
768 #          If the balloon driver is enabled but not functional because the KVM
769 #          kernel module cannot support it, KvmMissingCap
770 #          If no balloon device is present, DeviceNotActive
771 #
772 # Since: 0.14.0
773 ##
774 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
775
776 ##
777 # @PciMemoryRange:
778 #
779 # A PCI device memory region
780 #
781 # @base: the starting address (guest physical)
782 #
783 # @limit: the ending address (guest physical)
784 #
785 # Since: 0.14.0
786 ##
787 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
788
789 ##
790 # @PciMemoryRegion
791 #
792 # Information about a PCI device I/O region.
793 #
794 # @bar: the index of the Base Address Register for this region
795 #
796 # @type: 'io' if the region is a PIO region
797 #        'memory' if the region is a MMIO region
798 #
799 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
800 #
801 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
802 #
803 # Since: 0.14.0
804 ##
805 { 'type': 'PciMemoryRegion',
806   'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
807            '*prefetch': 'bool', '*mem_type_64': 'bool' } }
808
809 ##
810 # @PciBridgeInfo:
811 #
812 # Information about a PCI Bridge device
813 #
814 # @bus.number: primary bus interface number.  This should be the number of the
815 #              bus the device resides on.
816 #
817 # @bus.secondary: secondary bus interface number.  This is the number of the
818 #                 main bus for the bridge
819 #
820 # @bus.subordinate: This is the highest number bus that resides below the
821 #                   bridge.
822 #
823 # @bus.io_range: The PIO range for all devices on this bridge
824 #
825 # @bus.memory_range: The MMIO range for all devices on this bridge
826 #
827 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
828 #                          this bridge
829 #
830 # @devices: a list of @PciDeviceInfo for each device on this bridge
831 #
832 # Since: 0.14.0
833 ##
834 { 'type': 'PciBridgeInfo',
835   'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
836                     'io_range': 'PciMemoryRange',
837                     'memory_range': 'PciMemoryRange',
838                     'prefetchable_range': 'PciMemoryRange' },
839            '*devices': ['PciDeviceInfo']} }
840
841 ##
842 # @PciDeviceInfo:
843 #
844 # Information about a PCI device
845 #
846 # @bus: the bus number of the device
847 #
848 # @slot: the slot the device is located in
849 #
850 # @function: the function of the slot used by the device
851 #
852 # @class_info.desc: #optional a string description of the device's class
853 #
854 # @class_info.class: the class code of the device
855 #
856 # @id.device: the PCI device id
857 #
858 # @id.vendor: the PCI vendor id
859 #
860 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
861 #
862 # @qdev_id: the device name of the PCI device
863 #
864 # @pci_bridge: if the device is a PCI bridge, the bridge information
865 #
866 # @regions: a list of the PCI I/O regions associated with the device
867 #
868 # Notes: the contents of @class_info.desc are not stable and should only be
869 #        treated as informational.
870 #
871 # Since: 0.14.0
872 ##
873 { 'type': 'PciDeviceInfo',
874   'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
875            'class_info': {'*desc': 'str', 'class': 'int'},
876            'id': {'device': 'int', 'vendor': 'int'},
877            '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
878            'regions': ['PciMemoryRegion']} }
879
880 ##
881 # @PciInfo:
882 #
883 # Information about a PCI bus
884 #
885 # @bus: the bus index
886 #
887 # @devices: a list of devices on this bus
888 #
889 # Since: 0.14.0
890 ##
891 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
892
893 ##
894 # @query-pci:
895 #
896 # Return information about the PCI bus topology of the guest.
897 #
898 # Returns: a list of @PciInfo for each PCI bus
899 #
900 # Since: 0.14.0
901 ##
902 { 'command': 'query-pci', 'returns': ['PciInfo'] }
903
904 ##
905 # @BlockJobInfo:
906 #
907 # Information about a long-running block device operation.
908 #
909 # @type: the job type ('stream' for image streaming)
910 #
911 # @device: the block device name
912 #
913 # @len: the maximum progress value
914 #
915 # @offset: the current progress value
916 #
917 # @speed: the rate limit, bytes per second
918 #
919 # Since: 1.1
920 ##
921 { 'type': 'BlockJobInfo',
922   'data': {'type': 'str', 'device': 'str', 'len': 'int',
923            'offset': 'int', 'speed': 'int'} }
924
925 ##
926 # @query-block-jobs:
927 #
928 # Return information about long-running block device operations.
929 #
930 # Returns: a list of @BlockJobInfo for each active block job
931 #
932 # Since: 1.1
933 ##
934 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
935
936 ##
937 # @quit:
938 #
939 # This command will cause the QEMU process to exit gracefully.  While every
940 # attempt is made to send the QMP response before terminating, this is not
941 # guaranteed.  When using this interface, a premature EOF would not be
942 # unexpected.
943 #
944 # Since: 0.14.0
945 ##
946 { 'command': 'quit' }
947
948 ##
949 # @stop:
950 #
951 # Stop all guest VCPU execution.
952 #
953 # Since:  0.14.0
954 #
955 # Notes:  This function will succeed even if the guest is already in the stopped
956 #         state
957 ##
958 { 'command': 'stop' }
959
960 ##
961 # @system_reset:
962 #
963 # Performs a hard reset of a guest.
964 #
965 # Since: 0.14.0
966 ##
967 { 'command': 'system_reset' }
968
969 ##
970 # @system_powerdown:
971 #
972 # Requests that a guest perform a powerdown operation.
973 #
974 # Since: 0.14.0
975 #
976 # Notes: A guest may or may not respond to this command.  This command
977 #        returning does not indicate that a guest has accepted the request or
978 #        that it has shut down.  Many guests will respond to this command by
979 #        prompting the user in some way.
980 ##
981 { 'command': 'system_powerdown' }
982
983 ##
984 # @cpu:
985 #
986 # This command is a nop that is only provided for the purposes of compatibility.
987 #
988 # Since: 0.14.0
989 #
990 # Notes: Do not use this command.
991 ##
992 { 'command': 'cpu', 'data': {'index': 'int'} }
993
994 ##
995 # @memsave:
996 #
997 # Save a portion of guest memory to a file.
998 #
999 # @val: the virtual address of the guest to start from
1000 #
1001 # @size: the size of memory region to save
1002 #
1003 # @filename: the file to save the memory to as binary data
1004 #
1005 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1006 #                       virtual address (defaults to CPU 0)
1007 #
1008 # Returns: Nothing on success
1009 #          If @cpu is not a valid VCPU, InvalidParameterValue
1010 #          If @filename cannot be opened, OpenFileFailed
1011 #          If an I/O error occurs while writing the file, IOError
1012 #
1013 # Since: 0.14.0
1014 #
1015 # Notes: Errors were not reliably returned until 1.1
1016 ##
1017 { 'command': 'memsave',
1018   'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1019
1020 ##
1021 # @pmemsave:
1022 #
1023 # Save a portion of guest physical memory to a file.
1024 #
1025 # @val: the physical address of the guest to start from
1026 #
1027 # @size: the size of memory region to save
1028 #
1029 # @filename: the file to save the memory to as binary data
1030 #
1031 # Returns: Nothing on success
1032 #          If @filename cannot be opened, OpenFileFailed
1033 #          If an I/O error occurs while writing the file, IOError
1034 #
1035 # Since: 0.14.0
1036 #
1037 # Notes: Errors were not reliably returned until 1.1
1038 ##
1039 { 'command': 'pmemsave',
1040   'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1041
1042 ##
1043 # @cont:
1044 #
1045 # Resume guest VCPU execution.
1046 #
1047 # Since:  0.14.0
1048 #
1049 # Returns:  If successful, nothing
1050 #           If the QEMU is waiting for an incoming migration, MigrationExpected
1051 #           If QEMU was started with an encrypted block device and a key has
1052 #              not yet been set, DeviceEncrypted.
1053 #
1054 # Notes:  This command will succeed if the guest is currently running.
1055 ##
1056 { 'command': 'cont' }
1057
1058 ##
1059 # @system_wakeup:
1060 #
1061 # Wakeup guest from suspend.  Does nothing in case the guest isn't suspended.
1062 #
1063 # Since:  1.1
1064 #
1065 # Returns:  nothing.
1066 ##
1067 { 'command': 'system_wakeup' }
1068
1069 ##
1070 # @inject-nmi:
1071 #
1072 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1073 #
1074 # Returns:  If successful, nothing
1075 #           If the Virtual Machine doesn't support NMI injection, Unsupported
1076 #
1077 # Since:  0.14.0
1078 #
1079 # Notes: Only x86 Virtual Machines support this command.
1080 ##
1081 { 'command': 'inject-nmi' }
1082
1083 ##
1084 # @set_link:
1085 #
1086 # Sets the link status of a virtual network adapter.
1087 #
1088 # @name: the device name of the virtual network adapter
1089 #
1090 # @up: true to set the link status to be up
1091 #
1092 # Returns: Nothing on success
1093 #          If @name is not a valid network device, DeviceNotFound
1094 #
1095 # Since: 0.14.0
1096 #
1097 # Notes: Not all network adapters support setting link status.  This command
1098 #        will succeed even if the network adapter does not support link status
1099 #        notification.
1100 ##
1101 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1102
1103 ##
1104 # @block_passwd:
1105 #
1106 # This command sets the password of a block device that has not been open
1107 # with a password and requires one.
1108 #
1109 # The two cases where this can happen are a block device is created through
1110 # QEMU's initial command line or a block device is changed through the legacy
1111 # @change interface.
1112 #
1113 # In the event that the block device is created through the initial command
1114 # line, the VM will start in the stopped state regardless of whether '-S' is
1115 # used.  The intention is for a management tool to query the block devices to
1116 # determine which ones are encrypted, set the passwords with this command, and
1117 # then start the guest with the @cont command.
1118 #
1119 # @device:   the name of the device to set the password on
1120 #
1121 # @password: the password to use for the device
1122 #
1123 # Returns: nothing on success
1124 #          If @device is not a valid block device, DeviceNotFound
1125 #          If @device is not encrypted, DeviceNotEncrypted
1126 #          If @password is not valid for this device, InvalidPassword
1127 #
1128 # Notes:  Not all block formats support encryption and some that do are not
1129 #         able to validate that a password is correct.  Disk corruption may
1130 #         occur if an invalid password is specified.
1131 #
1132 # Since: 0.14.0
1133 ##
1134 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1135
1136 ##
1137 # @balloon:
1138 #
1139 # Request the balloon driver to change its balloon size.
1140 #
1141 # @value: the target size of the balloon in bytes
1142 #
1143 # Returns: Nothing on success
1144 #          If the balloon driver is enabled but not functional because the KVM
1145 #            kernel module cannot support it, KvmMissingCap
1146 #          If no balloon device is present, DeviceNotActive
1147 #
1148 # Notes: This command just issues a request to the guest.  When it returns,
1149 #        the balloon size may not have changed.  A guest can change the balloon
1150 #        size independent of this command.
1151 #
1152 # Since: 0.14.0
1153 ##
1154 { 'command': 'balloon', 'data': {'value': 'int'} }
1155
1156 ##
1157 # @block_resize
1158 #
1159 # Resize a block image while a guest is running.
1160 #
1161 # @device:  the name of the device to get the image resized
1162 #
1163 # @size:  new image size in bytes
1164 #
1165 # Returns: nothing on success
1166 #          If @device is not a valid block device, DeviceNotFound
1167 #          If @size is negative, InvalidParameterValue
1168 #          If the block device has no medium inserted, DeviceHasNoMedium
1169 #          If the block device does not support resize, Unsupported
1170 #          If the block device is read-only, DeviceIsReadOnly
1171 #          If a long-running operation is using the device, DeviceInUse
1172 #
1173 # Since: 0.14.0
1174 ##
1175 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1176
1177 ##
1178 # @NewImageMode
1179 #
1180 # An enumeration that tells QEMU how to set the backing file path in
1181 # a new image file.
1182 #
1183 # @existing: QEMU should look for an existing image file.
1184 #
1185 # @absolute-paths: QEMU should create a new image with absolute paths
1186 # for the backing file.
1187 #
1188 # Since: 1.1
1189 ##
1190 { 'enum': 'NewImageMode'
1191   'data': [ 'existing', 'absolute-paths' ] }
1192
1193 ##
1194 # @BlockdevSnapshot
1195 #
1196 # @device:  the name of the device to generate the snapshot from.
1197 #
1198 # @snapshot-file: the target of the new image. A new file will be created.
1199 #
1200 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1201 #
1202 # @mode: #optional whether and how QEMU should create a new image, default is
1203 # 'absolute-paths'.
1204 ##
1205 { 'type': 'BlockdevSnapshot',
1206   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1207             '*mode': 'NewImageMode' } }
1208
1209 ##
1210 # @BlockdevAction
1211 #
1212 # A discriminated record of operations that can be performed with
1213 # @transaction.
1214 ##
1215 { 'union': 'BlockdevAction',
1216   'data': {
1217        'blockdev-snapshot-sync': 'BlockdevSnapshot',
1218    } }
1219
1220 ##
1221 # @transaction
1222 #
1223 # Atomically operate on a group of one or more block devices.  If
1224 # any operation fails, then the entire set of actions will be
1225 # abandoned and the appropriate error returned.  The only operation
1226 # supported is currently blockdev-snapshot-sync.
1227 #
1228 #  List of:
1229 #  @BlockdevAction: information needed for the device snapshot
1230 #
1231 # Returns: nothing on success
1232 #          If @device is not a valid block device, DeviceNotFound
1233 #          If @device is busy, DeviceInUse will be returned
1234 #          If @snapshot-file can't be created, OpenFileFailed
1235 #          If @snapshot-file can't be opened, OpenFileFailed
1236 #          If @format is invalid, InvalidBlockFormat
1237 #
1238 # Note: The transaction aborts on the first failure.  Therefore, there will
1239 # be only one device or snapshot file returned in an error condition, and
1240 # subsequent actions will not have been attempted.
1241 #
1242 # Since 1.1
1243 ##
1244 { 'command': 'transaction',
1245   'data': { 'actions': [ 'BlockdevAction' ] } }
1246
1247 ##
1248 # @blockdev-snapshot-sync
1249 #
1250 # Generates a synchronous snapshot of a block device.
1251 #
1252 # @device:  the name of the device to generate the snapshot from.
1253 #
1254 # @snapshot-file: the target of the new image. If the file exists, or if it
1255 #                 is a device, the snapshot will be created in the existing
1256 #                 file/device. If does not exist, a new file will be created.
1257 #
1258 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1259 #
1260 # @mode: #optional whether and how QEMU should create a new image, default is
1261 # 'absolute-paths'.
1262 #
1263 # Returns: nothing on success
1264 #          If @device is not a valid block device, DeviceNotFound
1265 #          If @snapshot-file can't be opened, OpenFileFailed
1266 #          If @format is invalid, InvalidBlockFormat
1267 #
1268 # Since 0.14.0
1269 ##
1270 { 'command': 'blockdev-snapshot-sync',
1271   'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1272             '*mode': 'NewImageMode'} }
1273
1274 ##
1275 # @human-monitor-command:
1276 #
1277 # Execute a command on the human monitor and return the output.
1278 #
1279 # @command-line: the command to execute in the human monitor
1280 #
1281 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1282 #
1283 # Returns: the output of the command as a string
1284 #
1285 # Since: 0.14.0
1286 #
1287 # Notes: This command only exists as a stop-gap.  It's use is highly
1288 #        discouraged.  The semantics of this command are not guaranteed.
1289 #
1290 #        Known limitations:
1291 #
1292 #        o This command is stateless, this means that commands that depend
1293 #          on state information (such as getfd) might not work
1294 #
1295 #       o Commands that prompt the user for data (eg. 'cont' when the block
1296 #         device is encrypted) don't currently work
1297 ##
1298 { 'command': 'human-monitor-command',
1299   'data': {'command-line': 'str', '*cpu-index': 'int'},
1300   'returns': 'str' } 
1301
1302 ##
1303 # @migrate_cancel
1304 #
1305 # Cancel the current executing migration process.
1306 #
1307 # Returns: nothing on success
1308 #
1309 # Notes: This command succeeds even if there is no migration process running.
1310 #
1311 # Since: 0.14.0
1312 ##
1313 { 'command': 'migrate_cancel' }
1314
1315 ##
1316 # @migrate_set_downtime
1317 #
1318 # Set maximum tolerated downtime for migration.
1319 #
1320 # @value: maximum downtime in seconds
1321 #
1322 # Returns: nothing on success
1323 #
1324 # Since: 0.14.0
1325 ##
1326 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1327
1328 ##
1329 # @migrate_set_speed
1330 #
1331 # Set maximum speed for migration.
1332 #
1333 # @value: maximum speed in bytes.
1334 #
1335 # Returns: nothing on success
1336 #
1337 # Notes: A value lesser than zero will be automatically round up to zero.
1338 #
1339 # Since: 0.14.0
1340 ##
1341 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1342
1343 ##
1344 # @ObjectPropertyInfo:
1345 #
1346 # @name: the name of the property
1347 #
1348 # @type: the type of the property.  This will typically come in one of four
1349 #        forms:
1350 #
1351 #        1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1352 #           These types are mapped to the appropriate JSON type.
1353 #
1354 #        2) A legacy type in the form 'legacy<subtype>' where subtype is the
1355 #           legacy qdev typename.  These types are always treated as strings.
1356 #
1357 #        3) A child type in the form 'child<subtype>' where subtype is a qdev
1358 #           device type name.  Child properties create the composition tree.
1359 #
1360 #        4) A link type in the form 'link<subtype>' where subtype is a qdev
1361 #           device type name.  Link properties form the device model graph.
1362 #
1363 # Since: 1.1
1364 #
1365 # Notes: This type is experimental.  Its syntax may change in future releases.
1366 ##
1367 { 'type': 'ObjectPropertyInfo',
1368   'data': { 'name': 'str', 'type': 'str' } }
1369
1370 ##
1371 # @qom-list:
1372 #
1373 # This command will list any properties of a object given a path in the object
1374 # model.
1375 #
1376 # @path: the path within the object model.  See @qom-get for a description of
1377 #        this parameter.
1378 #
1379 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1380 #          object.
1381 #
1382 # Since: 1.1
1383 #
1384 # Notes: This command is experimental.  It's syntax may change in future
1385 #        releases.
1386 ##
1387 { 'command': 'qom-list',
1388   'data': { 'path': 'str' },
1389   'returns': [ 'ObjectPropertyInfo' ] }
1390
1391 ##
1392 # @qom-get:
1393 #
1394 # This command will get a property from a object model path and return the
1395 # value.
1396 #
1397 # @path: The path within the object model.  There are two forms of supported
1398 #        paths--absolute and partial paths.
1399 #
1400 #        Absolute paths are derived from the root object and can follow child<>
1401 #        or link<> properties.  Since they can follow link<> properties, they
1402 #        can be arbitrarily long.  Absolute paths look like absolute filenames
1403 #        and are prefixed  with a leading slash.
1404 #
1405 #        Partial paths look like relative filenames.  They do not begin
1406 #        with a prefix.  The matching rules for partial paths are subtle but
1407 #        designed to make specifying objects easy.  At each level of the
1408 #        composition tree, the partial path is matched as an absolute path.
1409 #        The first match is not returned.  At least two matches are searched
1410 #        for.  A successful result is only returned if only one match is
1411 #        found.  If more than one match is found, a flag is return to
1412 #        indicate that the match was ambiguous.
1413 #
1414 # @property: The property name to read
1415 #
1416 # Returns: The property value.  The type depends on the property type.  legacy<>
1417 #          properties are returned as #str.  child<> and link<> properties are
1418 #          returns as #str pathnames.  All integer property types (u8, u16, etc)
1419 #          are returned as #int.
1420 #
1421 # Since: 1.1
1422 #
1423 # Notes: This command is experimental and may change syntax in future releases.
1424 ##
1425 { 'command': 'qom-get',
1426   'data': { 'path': 'str', 'property': 'str' },
1427   'returns': 'visitor',
1428   'gen': 'no' }
1429
1430 ##
1431 # @qom-set:
1432 #
1433 # This command will set a property from a object model path.
1434 #
1435 # @path: see @qom-get for a description of this parameter
1436 #
1437 # @property: the property name to set
1438 #
1439 # @value: a value who's type is appropriate for the property type.  See @qom-get
1440 #         for a description of type mapping.
1441 #
1442 # Since: 1.1
1443 #
1444 # Notes: This command is experimental and may change syntax in future releases.
1445 ##
1446 { 'command': 'qom-set',
1447   'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1448   'gen': 'no' }
1449
1450 ##
1451 # @set_password:
1452 #
1453 # Sets the password of a remote display session.
1454 #
1455 # @protocol: `vnc' to modify the VNC server password
1456 #            `spice' to modify the Spice server password
1457 #
1458 # @password: the new password
1459 #
1460 # @connected: #optional how to handle existing clients when changing the
1461 #                       password.  If nothing is specified, defaults to `keep' 
1462 #                       `fail' to fail the command if clients are connected
1463 #                       `disconnect' to disconnect existing clients
1464 #                       `keep' to maintain existing clients
1465 #
1466 # Returns: Nothing on success
1467 #          If Spice is not enabled, DeviceNotFound
1468 #          If @protocol does not support connected, InvalidParameter
1469 #          If @protocol is invalid, InvalidParameter
1470 #          If any other error occurs, SetPasswdFailed
1471 #
1472 # Notes: If VNC is not enabled, SetPasswdFailed is returned.
1473 #
1474 # Since: 0.14.0
1475 ##
1476 { 'command': 'set_password',
1477   'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1478
1479 ##
1480 # @expire_password:
1481 #
1482 # Expire the password of a remote display server.
1483 #
1484 # @protocol: the name of the remote display protocol `vnc' or `spice'
1485 #
1486 # @time: when to expire the password.
1487 #        `now' to expire the password immediately
1488 #        `never' to cancel password expiration
1489 #        `+INT' where INT is the number of seconds from now (integer)
1490 #        `INT' where INT is the absolute time in seconds
1491 #
1492 # Returns: Nothing on success
1493 #          If @protocol is `spice' and Spice is not active, DeviceNotFound
1494 #          If an error occurs setting password expiration, SetPasswdFailed
1495 #          If @protocol is not `spice' or 'vnc', InvalidParameter
1496 #
1497 # Since: 0.14.0
1498 #
1499 # Notes: Time is relative to the server and currently there is no way to
1500 #        coordinate server time with client time.  It is not recommended to
1501 #        use the absolute time version of the @time parameter unless you're
1502 #        sure you are on the same machine as the QEMU instance.
1503 ##
1504 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
1505
1506 ##
1507 # @eject:
1508 #
1509 # Ejects a device from a removable drive.
1510 #
1511 # @device:  The name of the device
1512 #
1513 # @force:   @optional If true, eject regardless of whether the drive is locked.
1514 #           If not specified, the default value is false.
1515 #
1516 # Returns:  Nothing on success
1517 #           If @device is not a valid block device, DeviceNotFound
1518 #           If @device is not removable and @force is false, DeviceNotRemovable
1519 #           If @force is false and @device is locked, DeviceLocked
1520 #
1521 # Notes:    Ejecting a device will no media results in success
1522 #
1523 # Since: 0.14.0
1524 ##
1525 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
1526
1527 ##
1528 # @change-vnc-password:
1529 #
1530 # Change the VNC server password.
1531 #
1532 # @target:  the new password to use with VNC authentication
1533 #
1534 # Since: 1.1
1535 #
1536 # Notes:  An empty password in this command will set the password to the empty
1537 #         string.  Existing clients are unaffected by executing this command.
1538 ##
1539 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
1540
1541 ##
1542 # @change:
1543 #
1544 # This command is multiple commands multiplexed together.
1545 #
1546 # @device: This is normally the name of a block device but it may also be 'vnc'.
1547 #          when it's 'vnc', then sub command depends on @target
1548 #
1549 # @target: If @device is a block device, then this is the new filename.
1550 #          If @device is 'vnc', then if the value 'password' selects the vnc
1551 #          change password command.   Otherwise, this specifies a new server URI
1552 #          address to listen to for VNC connections.
1553 #
1554 # @arg:    If @device is a block device, then this is an optional format to open
1555 #          the device with.
1556 #          If @device is 'vnc' and @target is 'password', this is the new VNC
1557 #          password to set.  If this argument is an empty string, then no future
1558 #          logins will be allowed.
1559 #
1560 # Returns: Nothing on success.
1561 #          If @device is not a valid block device, DeviceNotFound
1562 #          If @format is not a valid block format, InvalidBlockFormat
1563 #          If the new block device is encrypted, DeviceEncrypted.  Note that
1564 #          if this error is returned, the device has been opened successfully
1565 #          and an additional call to @block_passwd is required to set the
1566 #          device's password.  The behavior of reads and writes to the block
1567 #          device between when these calls are executed is undefined.
1568 #
1569 # Notes:  It is strongly recommended that this interface is not used especially
1570 #         for changing block devices.
1571 #
1572 # Since: 0.14.0
1573 ##
1574 { 'command': 'change',
1575   'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
1576
1577 ##
1578 # @block_set_io_throttle:
1579 #
1580 # Change I/O throttle limits for a block drive.
1581 #
1582 # @device: The name of the device
1583 #
1584 # @bps: total throughput limit in bytes per second
1585 #
1586 # @bps_rd: read throughput limit in bytes per second
1587 #
1588 # @bps_wr: write throughput limit in bytes per second
1589 #
1590 # @iops: total I/O operations per second
1591 #
1592 # @ops_rd: read I/O operations per second
1593 #
1594 # @iops_wr: write I/O operations per second
1595 #
1596 # Returns: Nothing on success
1597 #          If @device is not a valid block device, DeviceNotFound
1598 #          If the argument combination is invalid, InvalidParameterCombination
1599 #
1600 # Since: 1.1
1601 ## 
1602 { 'command': 'block_set_io_throttle',
1603   'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1604             'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
1605
1606 ##
1607 # @block-stream:
1608 #
1609 # Copy data from a backing file into a block device.
1610 #
1611 # The block streaming operation is performed in the background until the entire
1612 # backing file has been copied.  This command returns immediately once streaming
1613 # has started.  The status of ongoing block streaming operations can be checked
1614 # with query-block-jobs.  The operation can be stopped before it has completed
1615 # using the block-job-cancel command.
1616 #
1617 # If a base file is specified then sectors are not copied from that base file and
1618 # its backing chain.  When streaming completes the image file will have the base
1619 # file as its backing file.  This can be used to stream a subset of the backing
1620 # file chain instead of flattening the entire image.
1621 #
1622 # On successful completion the image file is updated to drop the backing file
1623 # and the BLOCK_JOB_COMPLETED event is emitted.
1624 #
1625 # @device: the device name
1626 #
1627 # @base:   #optional the common backing file name
1628 #
1629 # @speed:  #optional the maximum speed, in bytes per second
1630 #
1631 # Returns: Nothing on success
1632 #          If streaming is already active on this device, DeviceInUse
1633 #          If @device does not exist, DeviceNotFound
1634 #          If image streaming is not supported by this device, NotSupported
1635 #          If @base does not exist, BaseNotFound
1636 #          If @speed is invalid, InvalidParameter
1637 #
1638 # Since: 1.1
1639 ##
1640 { 'command': 'block-stream', 'data': { 'device': 'str', '*base': 'str',
1641                                        '*speed': 'int' } }
1642
1643 ##
1644 # @block-job-set-speed:
1645 #
1646 # Set maximum speed for a background block operation.
1647 #
1648 # This command can only be issued when there is an active block job.
1649 #
1650 # Throttling can be disabled by setting the speed to 0.
1651 #
1652 # @device: the device name
1653 #
1654 # @speed:  the maximum speed, in bytes per second, or 0 for unlimited.
1655 #          Defaults to 0.
1656 #
1657 # Returns: Nothing on success
1658 #          If the job type does not support throttling, NotSupported
1659 #          If the speed value is invalid, InvalidParameter
1660 #          If streaming is not active on this device, DeviceNotActive
1661 #
1662 # Since: 1.1
1663 ##
1664 { 'command': 'block-job-set-speed',
1665   'data': { 'device': 'str', 'speed': 'int' } }
1666
1667 ##
1668 # @block-job-cancel:
1669 #
1670 # Stop an active block streaming operation.
1671 #
1672 # This command returns immediately after marking the active block streaming
1673 # operation for cancellation.  It is an error to call this command if no
1674 # operation is in progress.
1675 #
1676 # The operation will cancel as soon as possible and then emit the
1677 # BLOCK_JOB_CANCELLED event.  Before that happens the job is still visible when
1678 # enumerated using query-block-jobs.
1679 #
1680 # The image file retains its backing file unless the streaming operation happens
1681 # to complete just as it is being cancelled.
1682 #
1683 # A new block streaming operation can be started at a later time to finish
1684 # copying all data from the backing file.
1685 #
1686 # @device: the device name
1687 #
1688 # Returns: Nothing on success
1689 #          If streaming is not active on this device, DeviceNotActive
1690 #          If cancellation already in progress, DeviceInUse
1691 #
1692 # Since: 1.1
1693 ##
1694 { 'command': 'block-job-cancel', 'data': { 'device': 'str' } }
1695
1696 ##
1697 # @ObjectTypeInfo:
1698 #
1699 # This structure describes a search result from @qom-list-types
1700 #
1701 # @name: the type name found in the search
1702 #
1703 # Since: 1.1
1704 #
1705 # Notes: This command is experimental and may change syntax in future releases.
1706 ##
1707 { 'type': 'ObjectTypeInfo',
1708   'data': { 'name': 'str' } }
1709
1710 ##
1711 # @qom-list-types:
1712 #
1713 # This command will return a list of types given search parameters
1714 #
1715 # @implements: if specified, only return types that implement this type name
1716 #
1717 # @abstract: if true, include abstract types in the results
1718 #
1719 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
1720 #
1721 # Since: 1.1
1722 #
1723 # Notes: This command is experimental and may change syntax in future releases.
1724 ##
1725 { 'command': 'qom-list-types',
1726   'data': { '*implements': 'str', '*abstract': 'bool' },
1727   'returns': [ 'ObjectTypeInfo' ] }
1728
1729 ##
1730 # @migrate
1731 #
1732 # Migrates the current running guest to another Virtual Machine.
1733 #
1734 # @uri: the Uniform Resource Identifier of the destination VM
1735 #
1736 # @blk: #optional do block migration (full disk copy)
1737 #
1738 # @inc: #optional incremental disk copy migration
1739 #
1740 # @detach: this argument exists only for compatibility reasons and
1741 #          is ignored by QEMU
1742 #
1743 # Returns: nothing on success
1744 #
1745 # Since: 0.14.0
1746 ##
1747 { 'command': 'migrate',
1748   'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
1749
1750 # @xen-save-devices-state:
1751 #
1752 # Save the state of all devices to file. The RAM and the block devices
1753 # of the VM are not saved by this command.
1754 #
1755 # @filename: the file to save the state of the devices to as binary
1756 # data. See xen-save-devices-state.txt for a description of the binary
1757 # format.
1758 #
1759 # Returns: Nothing on success
1760 #          If @filename cannot be opened, OpenFileFailed
1761 #          If an I/O error occurs while writing the file, IOError
1762 #
1763 # Since: 1.1
1764 ##
1765 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
1766
1767 ##
1768 # @device_del:
1769 #
1770 # Remove a device from a guest
1771 #
1772 # @id: the name of the device
1773 #
1774 # Returns: Nothing on success
1775 #          If @id is not a valid device, DeviceNotFound
1776 #          If the device does not support unplug, BusNoHotplug
1777 #
1778 # Notes: When this command completes, the device may not be removed from the
1779 #        guest.  Hot removal is an operation that requires guest cooperation.
1780 #        This command merely requests that the guest begin the hot removal
1781 #        process.
1782 #
1783 # Since: 0.14.0
1784 ##
1785 { 'command': 'device_del', 'data': {'id': 'str'} }
1786
1787 ##
1788 # @dump-guest-memory
1789 #
1790 # Dump guest's memory to vmcore. It is a synchronous operation that can take
1791 # very long depending on the amount of guest memory. This command is only
1792 # supported on i386 and x86_64.
1793 #
1794 # @paging: if true, do paging to get guest's memory mapping. This allows
1795 # using gdb to process the core file. However, setting @paging to false
1796 # may be desirable because of two reasons:
1797 #
1798 #   1. The guest may be in a catastrophic state or can have corrupted
1799 #      memory, which cannot be trusted
1800 #   2. The guest can be in real-mode even if paging is enabled. For example,
1801 #      the guest uses ACPI to sleep, and ACPI sleep state goes in real-mode
1802 #
1803 # @protocol: the filename or file descriptor of the vmcore. The supported
1804 # protocols are:
1805 #
1806 #   1. file: the protocol starts with "file:", and the following string is
1807 #      the file's path.
1808 #   2. fd: the protocol starts with "fd:", and the following string is the
1809 #      fd's name.
1810 #
1811 # @begin: #optional if specified, the starting physical address.
1812 #
1813 # @length: #optional if specified, the memory size, in bytes. If you don't
1814 # want to dump all guest's memory, please specify the start @begin and @length
1815 #
1816 # Returns: nothing on success
1817 #          If @begin contains an invalid address, InvalidParameter
1818 #          If only one of @begin and @length is specified, MissingParameter
1819 #          If @protocol stats with "fd:", and the fd cannot be found, FdNotFound
1820 #          If @protocol starts with "file:", and the file cannot be
1821 #             opened, OpenFileFailed
1822 #          If @protocol does not start with "fd:" or "file:", InvalidParameter
1823 #          If an I/O error occurs while writing the file, IOError
1824 #          If the target does not support this command, Unsupported
1825 #
1826 # Since: 1.2
1827 ##
1828 { 'command': 'dump-guest-memory',
1829   'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
1830             '*length': 'int' } }
1831 ##
1832 # @netdev_add:
1833 #
1834 # Add a network backend.
1835 #
1836 # @type: the type of network backend.  Current valid values are 'user', 'tap',
1837 #        'vde', 'socket', 'dump' and 'bridge'
1838 #
1839 # @id: the name of the new network backend
1840 #
1841 # @props: #optional a list of properties to be passed to the backend in
1842 #         the format 'name=value', like 'ifname=tap0,script=no'
1843 #
1844 # Notes: The semantics of @props is not well defined.  Future commands will be
1845 #        introduced that provide stronger typing for backend creation.
1846 #
1847 # Since: 0.14.0
1848 #
1849 # Returns: Nothing on success
1850 #          If @type is not a valid network backend, DeviceNotFound
1851 #          If @id is not a valid identifier, InvalidParameterValue
1852 #          if @id already exists, DuplicateId
1853 #          If @props contains an invalid parameter for this backend,
1854 #            InvalidParameter
1855 ##
1856 { 'command': 'netdev_add',
1857   'data': {'type': 'str', 'id': 'str', '*props': '**'},
1858   'gen': 'no' }
1859
1860 ##
1861 # @netdev_del:
1862 #
1863 # Remove a network backend.
1864 #
1865 # @id: the name of the network backend to remove
1866 #
1867 # Returns: Nothing on success
1868 #          If @id is not a valid network backend, DeviceNotFound
1869 #
1870 # Since: 0.14.0
1871 ##
1872 { 'command': 'netdev_del', 'data': {'id': 'str'} }
1873
1874 ##
1875 # @getfd:
1876 #
1877 # Receive a file descriptor via SCM rights and assign it a name
1878 #
1879 # @fdname: file descriptor name
1880 #
1881 # Returns: Nothing on success
1882 #          If file descriptor was not received, FdNotSupplied
1883 #          If @fdname is not valid, InvalidParameterType
1884 #
1885 # Since: 0.14.0
1886 #
1887 # Notes: If @fdname already exists, the file descriptor assigned to
1888 #        it will be closed and replaced by the received file
1889 #        descriptor.
1890 #        The 'closefd' command can be used to explicitly close the
1891 #        file descriptor when it is no longer needed.
1892 ##
1893 { 'command': 'getfd', 'data': {'fdname': 'str'} }
1894
1895 ##
1896 # @closefd:
1897 #
1898 # Close a file descriptor previously passed via SCM rights
1899 #
1900 # @fdname: file descriptor name
1901 #
1902 # Returns: Nothing on success
1903 #          If @fdname is not found, FdNotFound
1904 #
1905 # Since: 0.14.0
1906 ##
1907 { 'command': 'closefd', 'data': {'fdname': 'str'} }
This page took 0.119977 seconds and 2 git commands to generate.