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