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