]> git.proxmox.com Git - mirror_qemu.git/blob - qapi-schema.json
f4f9439fe6fcfc4c1db7dad73a9420342f77a4f5
[mirror_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 # Since: 1.2
26 ##
27 { 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
30
31
32 ##
33 # LostTickPolicy:
34 #
35 # Policy for handling lost ticks in timer devices.
36 #
37 # @discard: throw away the missed tick(s) and continue with future injection
38 # normally. Guest time may be delayed, unless the OS has explicit
39 # handling of lost ticks
40 #
41 # @delay: continue to deliver ticks at the normal rate. Guest time will be
42 # delayed due to the late tick
43 #
44 # @merge: merge the missed tick(s) into one tick and inject. Guest time
45 # may be delayed, depending on how the OS reacts to the merging
46 # of ticks
47 #
48 # @slew: deliver ticks at a higher rate to catch up with the missed tick. The
49 # guest time should not be delayed once catchup is complete.
50 #
51 # Since: 2.0
52 ##
53 { 'enum': 'LostTickPolicy',
54 'data': ['discard', 'delay', 'merge', 'slew' ] }
55
56 ##
57 # BiosAtaTranslation:
58 #
59 # Policy that BIOS should use to interpret cylinder/head/sector
60 # addresses. Note that Bochs BIOS and SeaBIOS will not actually
61 # translate logical CHS to physical; instead, they will use logical
62 # block addressing.
63 #
64 # @auto: If cylinder/heads/sizes are passed, choose between none and LBA
65 # depending on the size of the disk. If they are not passed,
66 # choose none if QEMU can guess that the disk had 16 or fewer
67 # heads, large if QEMU can guess that the disk had 131072 or
68 # fewer tracks across all heads (i.e. cylinders*heads<131072),
69 # otherwise LBA.
70 #
71 # @none: The physical disk geometry is equal to the logical geometry.
72 #
73 # @lba: Assume 63 sectors per track and one of 16, 32, 64, 128 or 255
74 # heads (if fewer than 255 are enough to cover the whole disk
75 # with 1024 cylinders/head). The number of cylinders/head is
76 # then computed based on the number of sectors and heads.
77 #
78 # @large: The number of cylinders per head is scaled down to 1024
79 # by correspondingly scaling up the number of heads.
80 #
81 # @rechs: Same as @large, but first convert a 16-head geometry to
82 # 15-head, by proportionally scaling up the number of
83 # cylinders/head.
84 #
85 # Since: 2.0
86 ##
87 { 'enum': 'BiosAtaTranslation',
88 'data': ['auto', 'none', 'lba', 'large', 'rechs']}
89
90 # @add_client
91 #
92 # Allow client connections for VNC, Spice and socket based
93 # character devices to be passed in to QEMU via SCM_RIGHTS.
94 #
95 # @protocol: protocol name. Valid names are "vnc", "spice" or the
96 # name of a character device (eg. from -chardev id=XXXX)
97 #
98 # @fdname: file descriptor name previously passed via 'getfd' command
99 #
100 # @skipauth: #optional whether to skip authentication. Only applies
101 # to "vnc" and "spice" protocols
102 #
103 # @tls: #optional whether to perform TLS. Only applies to the "spice"
104 # protocol
105 #
106 # Returns: nothing on success.
107 #
108 # Since: 0.14.0
109 ##
110 { 'command': 'add_client',
111 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
112 '*tls': 'bool' } }
113
114 ##
115 # @NameInfo:
116 #
117 # Guest name information.
118 #
119 # @name: #optional The name of the guest
120 #
121 # Since 0.14.0
122 ##
123 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
124
125 ##
126 # @query-name:
127 #
128 # Return the name information of a guest.
129 #
130 # Returns: @NameInfo of the guest
131 #
132 # Since 0.14.0
133 ##
134 { 'command': 'query-name', 'returns': 'NameInfo' }
135
136 ##
137 # @VersionInfo:
138 #
139 # A description of QEMU's version.
140 #
141 # @qemu.major: The major version of QEMU
142 #
143 # @qemu.minor: The minor version of QEMU
144 #
145 # @qemu.micro: The micro version of QEMU. By current convention, a micro
146 # version of 50 signifies a development branch. A micro version
147 # greater than or equal to 90 signifies a release candidate for
148 # the next minor version. A micro version of less than 50
149 # signifies a stable release.
150 #
151 # @package: QEMU will always set this field to an empty string. Downstream
152 # versions of QEMU should set this to a non-empty string. The
153 # exact format depends on the downstream however it highly
154 # recommended that a unique name is used.
155 #
156 # Since: 0.14.0
157 ##
158 { 'type': 'VersionInfo',
159 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
160 'package': 'str'} }
161
162 ##
163 # @query-version:
164 #
165 # Returns the current version of QEMU.
166 #
167 # Returns: A @VersionInfo object describing the current version of QEMU.
168 #
169 # Since: 0.14.0
170 ##
171 { 'command': 'query-version', 'returns': 'VersionInfo' }
172
173 ##
174 # @KvmInfo:
175 #
176 # Information about support for KVM acceleration
177 #
178 # @enabled: true if KVM acceleration is active
179 #
180 # @present: true if KVM acceleration is built into this executable
181 #
182 # Since: 0.14.0
183 ##
184 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
185
186 ##
187 # @query-kvm:
188 #
189 # Returns information about KVM acceleration
190 #
191 # Returns: @KvmInfo
192 #
193 # Since: 0.14.0
194 ##
195 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
196
197 ##
198 # @RunState
199 #
200 # An enumeration of VM run states.
201 #
202 # @debug: QEMU is running on a debugger
203 #
204 # @finish-migrate: guest is paused to finish the migration process
205 #
206 # @inmigrate: guest is paused waiting for an incoming migration. Note
207 # that this state does not tell whether the machine will start at the
208 # end of the migration. This depends on the command-line -S option and
209 # any invocation of 'stop' or 'cont' that has happened since QEMU was
210 # started.
211 #
212 # @internal-error: An internal error that prevents further guest execution
213 # has occurred
214 #
215 # @io-error: the last IOP has failed and the device is configured to pause
216 # on I/O errors
217 #
218 # @paused: guest has been paused via the 'stop' command
219 #
220 # @postmigrate: guest is paused following a successful 'migrate'
221 #
222 # @prelaunch: QEMU was started with -S and guest has not started
223 #
224 # @restore-vm: guest is paused to restore VM state
225 #
226 # @running: guest is actively running
227 #
228 # @save-vm: guest is paused to save the VM state
229 #
230 # @shutdown: guest is shut down (and -no-shutdown is in use)
231 #
232 # @suspended: guest is suspended (ACPI S3)
233 #
234 # @watchdog: the watchdog action is configured to pause and has been triggered
235 #
236 # @guest-panicked: guest has been panicked as a result of guest OS panic
237 ##
238 { 'enum': 'RunState',
239 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
240 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
241 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
242 'guest-panicked' ] }
243
244 ##
245 # @SnapshotInfo
246 #
247 # @id: unique snapshot id
248 #
249 # @name: user chosen name
250 #
251 # @vm-state-size: size of the VM state
252 #
253 # @date-sec: UTC date of the snapshot in seconds
254 #
255 # @date-nsec: fractional part in nano seconds to be used with date-sec
256 #
257 # @vm-clock-sec: VM clock relative to boot in seconds
258 #
259 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
260 #
261 # Since: 1.3
262 #
263 ##
264
265 { 'type': 'SnapshotInfo',
266 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
267 'date-sec': 'int', 'date-nsec': 'int',
268 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
269
270 ##
271 # @ImageInfoSpecificQCow2:
272 #
273 # @compat: compatibility level
274 #
275 # @lazy-refcounts: #optional on or off; only valid for compat >= 1.1
276 #
277 # Since: 1.7
278 ##
279 { 'type': 'ImageInfoSpecificQCow2',
280 'data': {
281 'compat': 'str',
282 '*lazy-refcounts': 'bool'
283 } }
284
285 ##
286 # @ImageInfoSpecificVmdk:
287 #
288 # @create-type: The create type of VMDK image
289 #
290 # @cid: Content id of image
291 #
292 # @parent-cid: Parent VMDK image's cid
293 #
294 # @extents: List of extent files
295 #
296 # Since: 1.7
297 ##
298 { 'type': 'ImageInfoSpecificVmdk',
299 'data': {
300 'create-type': 'str',
301 'cid': 'int',
302 'parent-cid': 'int',
303 'extents': ['ImageInfo']
304 } }
305
306 ##
307 # @ImageInfoSpecific:
308 #
309 # A discriminated record of image format specific information structures.
310 #
311 # Since: 1.7
312 ##
313
314 { 'union': 'ImageInfoSpecific',
315 'data': {
316 'qcow2': 'ImageInfoSpecificQCow2',
317 'vmdk': 'ImageInfoSpecificVmdk'
318 } }
319
320 ##
321 # @ImageInfo:
322 #
323 # Information about a QEMU image file
324 #
325 # @filename: name of the image file
326 #
327 # @format: format of the image file
328 #
329 # @virtual-size: maximum capacity in bytes of the image
330 #
331 # @actual-size: #optional actual size on disk in bytes of the image
332 #
333 # @dirty-flag: #optional true if image is not cleanly closed
334 #
335 # @cluster-size: #optional size of a cluster in bytes
336 #
337 # @encrypted: #optional true if the image is encrypted
338 #
339 # @compressed: #optional true if the image is compressed (Since 1.7)
340 #
341 # @backing-filename: #optional name of the backing file
342 #
343 # @full-backing-filename: #optional full path of the backing file
344 #
345 # @backing-filename-format: #optional the format of the backing file
346 #
347 # @snapshots: #optional list of VM snapshots
348 #
349 # @backing-image: #optional info of the backing image (since 1.6)
350 #
351 # @format-specific: #optional structure supplying additional format-specific
352 # information (since 1.7)
353 #
354 # Since: 1.3
355 #
356 ##
357
358 { 'type': 'ImageInfo',
359 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
360 '*actual-size': 'int', 'virtual-size': 'int',
361 '*cluster-size': 'int', '*encrypted': 'bool', '*compressed': 'bool',
362 '*backing-filename': 'str', '*full-backing-filename': 'str',
363 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
364 '*backing-image': 'ImageInfo',
365 '*format-specific': 'ImageInfoSpecific' } }
366
367 ##
368 # @ImageCheck:
369 #
370 # Information about a QEMU image file check
371 #
372 # @filename: name of the image file checked
373 #
374 # @format: format of the image file checked
375 #
376 # @check-errors: number of unexpected errors occurred during check
377 #
378 # @image-end-offset: #optional offset (in bytes) where the image ends, this
379 # field is present if the driver for the image format
380 # supports it
381 #
382 # @corruptions: #optional number of corruptions found during the check if any
383 #
384 # @leaks: #optional number of leaks found during the check if any
385 #
386 # @corruptions-fixed: #optional number of corruptions fixed during the check
387 # if any
388 #
389 # @leaks-fixed: #optional number of leaks fixed during the check if any
390 #
391 # @total-clusters: #optional total number of clusters, this field is present
392 # if the driver for the image format supports it
393 #
394 # @allocated-clusters: #optional total number of allocated clusters, this
395 # field is present if the driver for the image format
396 # supports it
397 #
398 # @fragmented-clusters: #optional total number of fragmented clusters, this
399 # field is present if the driver for the image format
400 # supports it
401 #
402 # @compressed-clusters: #optional total number of compressed clusters, this
403 # field is present if the driver for the image format
404 # supports it
405 #
406 # Since: 1.4
407 #
408 ##
409
410 { 'type': 'ImageCheck',
411 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
412 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
413 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
414 '*total-clusters': 'int', '*allocated-clusters': 'int',
415 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
416
417 ##
418 # @StatusInfo:
419 #
420 # Information about VCPU run state
421 #
422 # @running: true if all VCPUs are runnable, false if not runnable
423 #
424 # @singlestep: true if VCPUs are in single-step mode
425 #
426 # @status: the virtual machine @RunState
427 #
428 # Since: 0.14.0
429 #
430 # Notes: @singlestep is enabled through the GDB stub
431 ##
432 { 'type': 'StatusInfo',
433 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
434
435 ##
436 # @query-status:
437 #
438 # Query the run status of all VCPUs
439 #
440 # Returns: @StatusInfo reflecting all VCPUs
441 #
442 # Since: 0.14.0
443 ##
444 { 'command': 'query-status', 'returns': 'StatusInfo' }
445
446 ##
447 # @UuidInfo:
448 #
449 # Guest UUID information.
450 #
451 # @UUID: the UUID of the guest
452 #
453 # Since: 0.14.0
454 #
455 # Notes: If no UUID was specified for the guest, a null UUID is returned.
456 ##
457 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
458
459 ##
460 # @query-uuid:
461 #
462 # Query the guest UUID information.
463 #
464 # Returns: The @UuidInfo for the guest
465 #
466 # Since 0.14.0
467 ##
468 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
469
470 ##
471 # @ChardevInfo:
472 #
473 # Information about a character device.
474 #
475 # @label: the label of the character device
476 #
477 # @filename: the filename of the character device
478 #
479 # Notes: @filename is encoded using the QEMU command line character device
480 # encoding. See the QEMU man page for details.
481 #
482 # Since: 0.14.0
483 ##
484 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
485
486 ##
487 # @query-chardev:
488 #
489 # Returns information about current character devices.
490 #
491 # Returns: a list of @ChardevInfo
492 #
493 # Since: 0.14.0
494 ##
495 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
496
497 ##
498 # @ChardevBackendInfo:
499 #
500 # Information about a character device backend
501 #
502 # @name: The backend name
503 #
504 # Since: 2.0
505 ##
506 { 'type': 'ChardevBackendInfo', 'data': {'name': 'str'} }
507
508 ##
509 # @query-chardev-backends:
510 #
511 # Returns information about character device backends.
512 #
513 # Returns: a list of @ChardevBackendInfo
514 #
515 # Since: 2.0
516 ##
517 { 'command': 'query-chardev-backends', 'returns': ['ChardevBackendInfo'] }
518
519 ##
520 # @DataFormat:
521 #
522 # An enumeration of data format.
523 #
524 # @utf8: Data is a UTF-8 string (RFC 3629)
525 #
526 # @base64: Data is Base64 encoded binary (RFC 3548)
527 #
528 # Since: 1.4
529 ##
530 { 'enum': 'DataFormat',
531 'data': [ 'utf8', 'base64' ] }
532
533 ##
534 # @ringbuf-write:
535 #
536 # Write to a ring buffer character device.
537 #
538 # @device: the ring buffer character device name
539 #
540 # @data: data to write
541 #
542 # @format: #optional data encoding (default 'utf8').
543 # - base64: data must be base64 encoded text. Its binary
544 # decoding gets written.
545 # Bug: invalid base64 is currently not rejected.
546 # Whitespace *is* invalid.
547 # - utf8: data's UTF-8 encoding is written
548 # - data itself is always Unicode regardless of format, like
549 # any other string.
550 #
551 # Returns: Nothing on success
552 #
553 # Since: 1.4
554 ##
555 { 'command': 'ringbuf-write',
556 'data': {'device': 'str', 'data': 'str',
557 '*format': 'DataFormat'} }
558
559 ##
560 # @ringbuf-read:
561 #
562 # Read from a ring buffer character device.
563 #
564 # @device: the ring buffer character device name
565 #
566 # @size: how many bytes to read at most
567 #
568 # @format: #optional data encoding (default 'utf8').
569 # - base64: the data read is returned in base64 encoding.
570 # - utf8: the data read is interpreted as UTF-8.
571 # Bug: can screw up when the buffer contains invalid UTF-8
572 # sequences, NUL characters, after the ring buffer lost
573 # data, and when reading stops because the size limit is
574 # reached.
575 # - The return value is always Unicode regardless of format,
576 # like any other string.
577 #
578 # Returns: data read from the device
579 #
580 # Since: 1.4
581 ##
582 { 'command': 'ringbuf-read',
583 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
584 'returns': 'str' }
585
586 ##
587 # @CommandInfo:
588 #
589 # Information about a QMP command
590 #
591 # @name: The command name
592 #
593 # Since: 0.14.0
594 ##
595 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
596
597 ##
598 # @query-commands:
599 #
600 # Return a list of supported QMP commands by this server
601 #
602 # Returns: A list of @CommandInfo for all supported commands
603 #
604 # Since: 0.14.0
605 ##
606 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
607
608 ##
609 # @EventInfo:
610 #
611 # Information about a QMP event
612 #
613 # @name: The event name
614 #
615 # Since: 1.2.0
616 ##
617 { 'type': 'EventInfo', 'data': {'name': 'str'} }
618
619 ##
620 # @query-events:
621 #
622 # Return a list of supported QMP events by this server
623 #
624 # Returns: A list of @EventInfo for all supported events
625 #
626 # Since: 1.2.0
627 ##
628 { 'command': 'query-events', 'returns': ['EventInfo'] }
629
630 ##
631 # @MigrationStats
632 #
633 # Detailed migration status.
634 #
635 # @transferred: amount of bytes already transferred to the target VM
636 #
637 # @remaining: amount of bytes remaining to be transferred to the target VM
638 #
639 # @total: total amount of bytes involved in the migration process
640 #
641 # @duplicate: number of duplicate (zero) pages (since 1.2)
642 #
643 # @skipped: number of skipped zero pages (since 1.5)
644 #
645 # @normal : number of normal pages (since 1.2)
646 #
647 # @normal-bytes: number of normal bytes sent (since 1.2)
648 #
649 # @dirty-pages-rate: number of pages dirtied by second by the
650 # guest (since 1.3)
651 #
652 # @mbps: throughput in megabits/sec. (since 1.6)
653 #
654 # Since: 0.14.0
655 ##
656 { 'type': 'MigrationStats',
657 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
658 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
659 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
660 'mbps' : 'number' } }
661
662 ##
663 # @XBZRLECacheStats
664 #
665 # Detailed XBZRLE migration cache statistics
666 #
667 # @cache-size: XBZRLE cache size
668 #
669 # @bytes: amount of bytes already transferred to the target VM
670 #
671 # @pages: amount of pages transferred to the target VM
672 #
673 # @cache-miss: number of cache miss
674 #
675 # @overflow: number of overflows
676 #
677 # Since: 1.2
678 ##
679 { 'type': 'XBZRLECacheStats',
680 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
681 'cache-miss': 'int', 'overflow': 'int' } }
682
683 ##
684 # @MigrationInfo
685 #
686 # Information about current migration process.
687 #
688 # @status: #optional string describing the current migration status.
689 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
690 # 'cancelled'. If this field is not returned, no migration process
691 # has been initiated
692 #
693 # @ram: #optional @MigrationStats containing detailed migration
694 # status, only returned if status is 'active' or
695 # 'completed'. 'comppleted' (since 1.2)
696 #
697 # @disk: #optional @MigrationStats containing detailed disk migration
698 # status, only returned if status is 'active' and it is a block
699 # migration
700 #
701 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
702 # migration statistics, only returned if XBZRLE feature is on and
703 # status is 'active' or 'completed' (since 1.2)
704 #
705 # @total-time: #optional total amount of milliseconds since migration started.
706 # If migration has ended, it returns the total migration
707 # time. (since 1.2)
708 #
709 # @downtime: #optional only present when migration finishes correctly
710 # total downtime in milliseconds for the guest.
711 # (since 1.3)
712 #
713 # @expected-downtime: #optional only present while migration is active
714 # expected downtime in milliseconds for the guest in last walk
715 # of the dirty bitmap. (since 1.3)
716 #
717 # @setup-time: #optional amount of setup time in milliseconds _before_ the
718 # iterations begin but _after_ the QMP command is issued. This is designed
719 # to provide an accounting of any activities (such as RDMA pinning) which
720 # may be expensive, but do not actually occur during the iterative
721 # migration rounds themselves. (since 1.6)
722 #
723 # Since: 0.14.0
724 ##
725 { 'type': 'MigrationInfo',
726 'data': {'*status': 'str', '*ram': 'MigrationStats',
727 '*disk': 'MigrationStats',
728 '*xbzrle-cache': 'XBZRLECacheStats',
729 '*total-time': 'int',
730 '*expected-downtime': 'int',
731 '*downtime': 'int',
732 '*setup-time': 'int'} }
733
734 ##
735 # @query-migrate
736 #
737 # Returns information about current migration process.
738 #
739 # Returns: @MigrationInfo
740 #
741 # Since: 0.14.0
742 ##
743 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
744
745 ##
746 # @MigrationCapability
747 #
748 # Migration capabilities enumeration
749 #
750 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
751 # This feature allows us to minimize migration traffic for certain work
752 # loads, by sending compressed difference of the pages
753 #
754 # @rdma-pin-all: Controls whether or not the entire VM memory footprint is
755 # mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
756 # Disabled by default. (since 2.0)
757 #
758 # @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
759 # essentially saves 1MB of zeroes per block on the wire. Enabling requires
760 # source and target VM to support this feature. To enable it is sufficient
761 # to enable the capability on the source VM. The feature is disabled by
762 # default. (since 1.6)
763 #
764 # @auto-converge: If enabled, QEMU will automatically throttle down the guest
765 # to speed up convergence of RAM migration. (since 1.6)
766 #
767 # Since: 1.2
768 ##
769 { 'enum': 'MigrationCapability',
770 'data': ['xbzrle', 'rdma-pin-all', 'auto-converge', 'zero-blocks'] }
771
772 ##
773 # @MigrationCapabilityStatus
774 #
775 # Migration capability information
776 #
777 # @capability: capability enum
778 #
779 # @state: capability state bool
780 #
781 # Since: 1.2
782 ##
783 { 'type': 'MigrationCapabilityStatus',
784 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
785
786 ##
787 # @migrate-set-capabilities
788 #
789 # Enable/Disable the following migration capabilities (like xbzrle)
790 #
791 # @capabilities: json array of capability modifications to make
792 #
793 # Since: 1.2
794 ##
795 { 'command': 'migrate-set-capabilities',
796 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
797
798 ##
799 # @query-migrate-capabilities
800 #
801 # Returns information about the current migration capabilities status
802 #
803 # Returns: @MigrationCapabilitiesStatus
804 #
805 # Since: 1.2
806 ##
807 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
808
809 ##
810 # @MouseInfo:
811 #
812 # Information about a mouse device.
813 #
814 # @name: the name of the mouse device
815 #
816 # @index: the index of the mouse device
817 #
818 # @current: true if this device is currently receiving mouse events
819 #
820 # @absolute: true if this device supports absolute coordinates as input
821 #
822 # Since: 0.14.0
823 ##
824 { 'type': 'MouseInfo',
825 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
826 'absolute': 'bool'} }
827
828 ##
829 # @query-mice:
830 #
831 # Returns information about each active mouse device
832 #
833 # Returns: a list of @MouseInfo for each device
834 #
835 # Since: 0.14.0
836 ##
837 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
838
839 ##
840 # @CpuInfo:
841 #
842 # Information about a virtual CPU
843 #
844 # @CPU: the index of the virtual CPU
845 #
846 # @current: this only exists for backwards compatible and should be ignored
847 #
848 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
849 # to a processor specific low power mode.
850 #
851 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
852 # pointer.
853 # If the target is Sparc, this is the PC component of the
854 # instruction pointer.
855 #
856 # @nip: #optional If the target is PPC, the instruction pointer
857 #
858 # @npc: #optional If the target is Sparc, the NPC component of the instruction
859 # pointer
860 #
861 # @PC: #optional If the target is MIPS, the instruction pointer
862 #
863 # @thread_id: ID of the underlying host thread
864 #
865 # Since: 0.14.0
866 #
867 # Notes: @halted is a transient state that changes frequently. By the time the
868 # data is sent to the client, the guest may no longer be halted.
869 ##
870 { 'type': 'CpuInfo',
871 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
872 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
873
874 ##
875 # @query-cpus:
876 #
877 # Returns a list of information about each virtual CPU.
878 #
879 # Returns: a list of @CpuInfo for each virtual CPU
880 #
881 # Since: 0.14.0
882 ##
883 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
884
885 ##
886 # @BlockDeviceInfo:
887 #
888 # Information about the backing device for a block device.
889 #
890 # @file: the filename of the backing device
891 #
892 # @node-name: #optional the name of the block driver node (Since 2.0)
893 #
894 # @ro: true if the backing device was open read-only
895 #
896 # @drv: the name of the block format used to open the backing device. As of
897 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
898 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
899 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
900 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
901 #
902 # @backing_file: #optional the name of the backing file (for copy-on-write)
903 #
904 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
905 #
906 # @encrypted: true if the backing device is encrypted
907 #
908 # @encryption_key_missing: true if the backing device is encrypted but an
909 # valid encryption key is missing
910 #
911 # @bps: total throughput limit in bytes per second is specified
912 #
913 # @bps_rd: read throughput limit in bytes per second is specified
914 #
915 # @bps_wr: write throughput limit in bytes per second is specified
916 #
917 # @iops: total I/O operations per second is specified
918 #
919 # @iops_rd: read I/O operations per second is specified
920 #
921 # @iops_wr: write I/O operations per second is specified
922 #
923 # @image: the info of image used (since: 1.6)
924 #
925 # @bps_max: #optional total max in bytes (Since 1.7)
926 #
927 # @bps_rd_max: #optional read max in bytes (Since 1.7)
928 #
929 # @bps_wr_max: #optional write max in bytes (Since 1.7)
930 #
931 # @iops_max: #optional total I/O operations max (Since 1.7)
932 #
933 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
934 #
935 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
936 #
937 # @iops_size: #optional an I/O size in bytes (Since 1.7)
938 #
939 # Since: 0.14.0
940 #
941 ##
942 { 'type': 'BlockDeviceInfo',
943 'data': { 'file': 'str', '*node-name': 'str', 'ro': 'bool', 'drv': 'str',
944 '*backing_file': 'str', 'backing_file_depth': 'int',
945 'encrypted': 'bool', 'encryption_key_missing': 'bool',
946 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
947 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
948 'image': 'ImageInfo',
949 '*bps_max': 'int', '*bps_rd_max': 'int',
950 '*bps_wr_max': 'int', '*iops_max': 'int',
951 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
952 '*iops_size': 'int' } }
953
954 ##
955 # @BlockDeviceIoStatus:
956 #
957 # An enumeration of block device I/O status.
958 #
959 # @ok: The last I/O operation has succeeded
960 #
961 # @failed: The last I/O operation has failed
962 #
963 # @nospace: The last I/O operation has failed due to a no-space condition
964 #
965 # Since: 1.0
966 ##
967 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
968
969 ##
970 # @BlockDeviceMapEntry:
971 #
972 # Entry in the metadata map of the device (returned by "qemu-img map")
973 #
974 # @start: Offset in the image of the first byte described by this entry
975 # (in bytes)
976 #
977 # @length: Length of the range described by this entry (in bytes)
978 #
979 # @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.)
980 # before reaching one for which the range is allocated. The value is
981 # in the range 0 to the depth of the image chain - 1.
982 #
983 # @zero: the sectors in this range read as zeros
984 #
985 # @data: reading the image will actually read data from a file (in particular,
986 # if @offset is present this means that the sectors are not simply
987 # preallocated, but contain actual data in raw format)
988 #
989 # @offset: if present, the image file stores the data for this range in
990 # raw format at the given offset.
991 #
992 # Since 1.7
993 ##
994 { 'type': 'BlockDeviceMapEntry',
995 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
996 'data': 'bool', '*offset': 'int' } }
997
998 ##
999 # @BlockDirtyInfo:
1000 #
1001 # Block dirty bitmap information.
1002 #
1003 # @count: number of dirty bytes according to the dirty bitmap
1004 #
1005 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
1006 #
1007 # Since: 1.3
1008 ##
1009 { 'type': 'BlockDirtyInfo',
1010 'data': {'count': 'int', 'granularity': 'int'} }
1011
1012 ##
1013 # @BlockInfo:
1014 #
1015 # Block device information. This structure describes a virtual device and
1016 # the backing device associated with it.
1017 #
1018 # @device: The device name associated with the virtual device.
1019 #
1020 # @type: This field is returned only for compatibility reasons, it should
1021 # not be used (always returns 'unknown')
1022 #
1023 # @removable: True if the device supports removable media.
1024 #
1025 # @locked: True if the guest has locked this device from having its media
1026 # removed
1027 #
1028 # @tray_open: #optional True if the device has a tray and it is open
1029 # (only present if removable is true)
1030 #
1031 # @dirty-bitmaps: #optional dirty bitmaps information (only present if the
1032 # driver has one or more dirty bitmaps) (Since 2.0)
1033 #
1034 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
1035 # supports it and the VM is configured to stop on errors
1036 #
1037 # @inserted: #optional @BlockDeviceInfo describing the device if media is
1038 # present
1039 #
1040 # Since: 0.14.0
1041 ##
1042 { 'type': 'BlockInfo',
1043 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
1044 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
1045 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
1046 '*dirty-bitmaps': ['BlockDirtyInfo'] } }
1047
1048 ##
1049 # @query-block:
1050 #
1051 # Get a list of BlockInfo for all virtual block devices.
1052 #
1053 # Returns: a list of @BlockInfo describing each virtual block device
1054 #
1055 # Since: 0.14.0
1056 ##
1057 { 'command': 'query-block', 'returns': ['BlockInfo'] }
1058
1059 ##
1060 # @BlockDeviceStats:
1061 #
1062 # Statistics of a virtual block device or a block backing device.
1063 #
1064 # @rd_bytes: The number of bytes read by the device.
1065 #
1066 # @wr_bytes: The number of bytes written by the device.
1067 #
1068 # @rd_operations: The number of read operations performed by the device.
1069 #
1070 # @wr_operations: The number of write operations performed by the device.
1071 #
1072 # @flush_operations: The number of cache flush operations performed by the
1073 # device (since 0.15.0)
1074 #
1075 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
1076 # (since 0.15.0).
1077 #
1078 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
1079 #
1080 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
1081 #
1082 # @wr_highest_offset: The offset after the greatest byte written to the
1083 # device. The intended use of this information is for
1084 # growable sparse files (like qcow2) that are used on top
1085 # of a physical device.
1086 #
1087 # Since: 0.14.0
1088 ##
1089 { 'type': 'BlockDeviceStats',
1090 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
1091 'wr_operations': 'int', 'flush_operations': 'int',
1092 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
1093 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
1094
1095 ##
1096 # @BlockStats:
1097 #
1098 # Statistics of a virtual block device or a block backing device.
1099 #
1100 # @device: #optional If the stats are for a virtual block device, the name
1101 # corresponding to the virtual block device.
1102 #
1103 # @stats: A @BlockDeviceStats for the device.
1104 #
1105 # @parent: #optional This describes the file block device if it has one.
1106 #
1107 # @backing: #optional This describes the backing block device if it has one.
1108 # (Since 2.0)
1109 #
1110 # Since: 0.14.0
1111 ##
1112 { 'type': 'BlockStats',
1113 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
1114 '*parent': 'BlockStats',
1115 '*backing': 'BlockStats'} }
1116
1117 ##
1118 # @query-blockstats:
1119 #
1120 # Query the @BlockStats for all virtual block devices.
1121 #
1122 # Returns: A list of @BlockStats for each virtual block devices.
1123 #
1124 # Since: 0.14.0
1125 ##
1126 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
1127
1128 ##
1129 # @VncClientInfo:
1130 #
1131 # Information about a connected VNC client.
1132 #
1133 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1134 # when possible.
1135 #
1136 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1137 # 'ipv4' if the client is connected via IPv4 and TCP
1138 # 'unix' if the client is connected via a unix domain socket
1139 # 'unknown' otherwise
1140 #
1141 # @service: The service name of the client's port. This may depends on the
1142 # host system's service database so symbolic names should not be
1143 # relied on.
1144 #
1145 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
1146 # Name of the client.
1147 #
1148 # @sasl_username: #optional If SASL authentication is in use, the SASL username
1149 # used for authentication.
1150 #
1151 # Since: 0.14.0
1152 ##
1153 { 'type': 'VncClientInfo',
1154 'data': {'host': 'str', 'family': 'str', 'service': 'str',
1155 '*x509_dname': 'str', '*sasl_username': 'str'} }
1156
1157 ##
1158 # @VncInfo:
1159 #
1160 # Information about the VNC session.
1161 #
1162 # @enabled: true if the VNC server is enabled, false otherwise
1163 #
1164 # @host: #optional The hostname the VNC server is bound to. This depends on
1165 # the name resolution on the host and may be an IP address.
1166 #
1167 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
1168 # 'ipv4' if the host is listening for IPv4 connections
1169 # 'unix' if the host is listening on a unix domain socket
1170 # 'unknown' otherwise
1171 #
1172 # @service: #optional The service name of the server's port. This may depends
1173 # on the host system's service database so symbolic names should not
1174 # be relied on.
1175 #
1176 # @auth: #optional the current authentication type used by the server
1177 # 'none' if no authentication is being used
1178 # 'vnc' if VNC authentication is being used
1179 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
1180 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1181 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1182 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1183 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1184 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1185 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1186 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1187 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1188 #
1189 # @clients: a list of @VncClientInfo of all currently connected clients
1190 #
1191 # Since: 0.14.0
1192 ##
1193 { 'type': 'VncInfo',
1194 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1195 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1196
1197 ##
1198 # @query-vnc:
1199 #
1200 # Returns information about the current VNC server
1201 #
1202 # Returns: @VncInfo
1203 #
1204 # Since: 0.14.0
1205 ##
1206 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1207
1208 ##
1209 # @SpiceChannel
1210 #
1211 # Information about a SPICE client channel.
1212 #
1213 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1214 # when possible.
1215 #
1216 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1217 # 'ipv4' if the client is connected via IPv4 and TCP
1218 # 'unix' if the client is connected via a unix domain socket
1219 # 'unknown' otherwise
1220 #
1221 # @port: The client's port number.
1222 #
1223 # @connection-id: SPICE connection id number. All channels with the same id
1224 # belong to the same SPICE session.
1225 #
1226 # @connection-type: SPICE channel type number. "1" is the main control
1227 # channel, filter for this one if you want to track spice
1228 # sessions only
1229 #
1230 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1231 # multiple channels of the same type exist, such as multiple
1232 # display channels in a multihead setup
1233 #
1234 # @tls: true if the channel is encrypted, false otherwise.
1235 #
1236 # Since: 0.14.0
1237 ##
1238 { 'type': 'SpiceChannel',
1239 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1240 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1241 'tls': 'bool'} }
1242
1243 ##
1244 # @SpiceQueryMouseMode
1245 #
1246 # An enumeration of Spice mouse states.
1247 #
1248 # @client: Mouse cursor position is determined by the client.
1249 #
1250 # @server: Mouse cursor position is determined by the server.
1251 #
1252 # @unknown: No information is available about mouse mode used by
1253 # the spice server.
1254 #
1255 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1256 #
1257 # Since: 1.1
1258 ##
1259 { 'enum': 'SpiceQueryMouseMode',
1260 'data': [ 'client', 'server', 'unknown' ] }
1261
1262 ##
1263 # @SpiceInfo
1264 #
1265 # Information about the SPICE session.
1266 #
1267 # @enabled: true if the SPICE server is enabled, false otherwise
1268 #
1269 # @migrated: true if the last guest migration completed and spice
1270 # migration had completed as well. false otherwise.
1271 #
1272 # @host: #optional The hostname the SPICE server is bound to. This depends on
1273 # the name resolution on the host and may be an IP address.
1274 #
1275 # @port: #optional The SPICE server's port number.
1276 #
1277 # @compiled-version: #optional SPICE server version.
1278 #
1279 # @tls-port: #optional The SPICE server's TLS port number.
1280 #
1281 # @auth: #optional the current authentication type used by the server
1282 # 'none' if no authentication is being used
1283 # 'spice' uses SASL or direct TLS authentication, depending on command
1284 # line options
1285 #
1286 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1287 # be determined by the client or the server, or unknown if spice
1288 # server doesn't provide this information.
1289 #
1290 # Since: 1.1
1291 #
1292 # @channels: a list of @SpiceChannel for each active spice channel
1293 #
1294 # Since: 0.14.0
1295 ##
1296 { 'type': 'SpiceInfo',
1297 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1298 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1299 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1300
1301 ##
1302 # @query-spice
1303 #
1304 # Returns information about the current SPICE server
1305 #
1306 # Returns: @SpiceInfo
1307 #
1308 # Since: 0.14.0
1309 ##
1310 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1311
1312 ##
1313 # @BalloonInfo:
1314 #
1315 # Information about the guest balloon device.
1316 #
1317 # @actual: the number of bytes the balloon currently contains
1318 #
1319 # Since: 0.14.0
1320 #
1321 ##
1322 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1323
1324 ##
1325 # @query-balloon:
1326 #
1327 # Return information about the balloon device.
1328 #
1329 # Returns: @BalloonInfo on success
1330 # If the balloon driver is enabled but not functional because the KVM
1331 # kernel module cannot support it, KvmMissingCap
1332 # If no balloon device is present, DeviceNotActive
1333 #
1334 # Since: 0.14.0
1335 ##
1336 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1337
1338 ##
1339 # @PciMemoryRange:
1340 #
1341 # A PCI device memory region
1342 #
1343 # @base: the starting address (guest physical)
1344 #
1345 # @limit: the ending address (guest physical)
1346 #
1347 # Since: 0.14.0
1348 ##
1349 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1350
1351 ##
1352 # @PciMemoryRegion
1353 #
1354 # Information about a PCI device I/O region.
1355 #
1356 # @bar: the index of the Base Address Register for this region
1357 #
1358 # @type: 'io' if the region is a PIO region
1359 # 'memory' if the region is a MMIO region
1360 #
1361 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1362 #
1363 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1364 #
1365 # Since: 0.14.0
1366 ##
1367 { 'type': 'PciMemoryRegion',
1368 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1369 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1370
1371 ##
1372 # @PciBridgeInfo:
1373 #
1374 # Information about a PCI Bridge device
1375 #
1376 # @bus.number: primary bus interface number. This should be the number of the
1377 # bus the device resides on.
1378 #
1379 # @bus.secondary: secondary bus interface number. This is the number of the
1380 # main bus for the bridge
1381 #
1382 # @bus.subordinate: This is the highest number bus that resides below the
1383 # bridge.
1384 #
1385 # @bus.io_range: The PIO range for all devices on this bridge
1386 #
1387 # @bus.memory_range: The MMIO range for all devices on this bridge
1388 #
1389 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1390 # this bridge
1391 #
1392 # @devices: a list of @PciDeviceInfo for each device on this bridge
1393 #
1394 # Since: 0.14.0
1395 ##
1396 { 'type': 'PciBridgeInfo',
1397 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1398 'io_range': 'PciMemoryRange',
1399 'memory_range': 'PciMemoryRange',
1400 'prefetchable_range': 'PciMemoryRange' },
1401 '*devices': ['PciDeviceInfo']} }
1402
1403 ##
1404 # @PciDeviceInfo:
1405 #
1406 # Information about a PCI device
1407 #
1408 # @bus: the bus number of the device
1409 #
1410 # @slot: the slot the device is located in
1411 #
1412 # @function: the function of the slot used by the device
1413 #
1414 # @class_info.desc: #optional a string description of the device's class
1415 #
1416 # @class_info.class: the class code of the device
1417 #
1418 # @id.device: the PCI device id
1419 #
1420 # @id.vendor: the PCI vendor id
1421 #
1422 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1423 #
1424 # @qdev_id: the device name of the PCI device
1425 #
1426 # @pci_bridge: if the device is a PCI bridge, the bridge information
1427 #
1428 # @regions: a list of the PCI I/O regions associated with the device
1429 #
1430 # Notes: the contents of @class_info.desc are not stable and should only be
1431 # treated as informational.
1432 #
1433 # Since: 0.14.0
1434 ##
1435 { 'type': 'PciDeviceInfo',
1436 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1437 'class_info': {'*desc': 'str', 'class': 'int'},
1438 'id': {'device': 'int', 'vendor': 'int'},
1439 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1440 'regions': ['PciMemoryRegion']} }
1441
1442 ##
1443 # @PciInfo:
1444 #
1445 # Information about a PCI bus
1446 #
1447 # @bus: the bus index
1448 #
1449 # @devices: a list of devices on this bus
1450 #
1451 # Since: 0.14.0
1452 ##
1453 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1454
1455 ##
1456 # @query-pci:
1457 #
1458 # Return information about the PCI bus topology of the guest.
1459 #
1460 # Returns: a list of @PciInfo for each PCI bus
1461 #
1462 # Since: 0.14.0
1463 ##
1464 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1465
1466 ##
1467 # @BlockdevOnError:
1468 #
1469 # An enumeration of possible behaviors for errors on I/O operations.
1470 # The exact meaning depends on whether the I/O was initiated by a guest
1471 # or by a block job
1472 #
1473 # @report: for guest operations, report the error to the guest;
1474 # for jobs, cancel the job
1475 #
1476 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1477 # or BLOCK_JOB_ERROR)
1478 #
1479 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1480 #
1481 # @stop: for guest operations, stop the virtual machine;
1482 # for jobs, pause the job
1483 #
1484 # Since: 1.3
1485 ##
1486 { 'enum': 'BlockdevOnError',
1487 'data': ['report', 'ignore', 'enospc', 'stop'] }
1488
1489 ##
1490 # @MirrorSyncMode:
1491 #
1492 # An enumeration of possible behaviors for the initial synchronization
1493 # phase of storage mirroring.
1494 #
1495 # @top: copies data in the topmost image to the destination
1496 #
1497 # @full: copies data from all images to the destination
1498 #
1499 # @none: only copy data written from now on
1500 #
1501 # Since: 1.3
1502 ##
1503 { 'enum': 'MirrorSyncMode',
1504 'data': ['top', 'full', 'none'] }
1505
1506 ##
1507 # @BlockJobType:
1508 #
1509 # Type of a block job.
1510 #
1511 # @commit: block commit job type, see "block-commit"
1512 #
1513 # @stream: block stream job type, see "block-stream"
1514 #
1515 # @mirror: drive mirror job type, see "drive-mirror"
1516 #
1517 # @backup: drive backup job type, see "drive-backup"
1518 #
1519 # Since: 1.7
1520 ##
1521 { 'enum': 'BlockJobType',
1522 'data': ['commit', 'stream', 'mirror', 'backup'] }
1523
1524 ##
1525 # @BlockJobInfo:
1526 #
1527 # Information about a long-running block device operation.
1528 #
1529 # @type: the job type ('stream' for image streaming)
1530 #
1531 # @device: the block device name
1532 #
1533 # @len: the maximum progress value
1534 #
1535 # @busy: false if the job is known to be in a quiescent state, with
1536 # no pending I/O. Since 1.3.
1537 #
1538 # @paused: whether the job is paused or, if @busy is true, will
1539 # pause itself as soon as possible. Since 1.3.
1540 #
1541 # @offset: the current progress value
1542 #
1543 # @speed: the rate limit, bytes per second
1544 #
1545 # @io-status: the status of the job (since 1.3)
1546 #
1547 # Since: 1.1
1548 ##
1549 { 'type': 'BlockJobInfo',
1550 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1551 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1552 'io-status': 'BlockDeviceIoStatus'} }
1553
1554 ##
1555 # @query-block-jobs:
1556 #
1557 # Return information about long-running block device operations.
1558 #
1559 # Returns: a list of @BlockJobInfo for each active block job
1560 #
1561 # Since: 1.1
1562 ##
1563 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1564
1565 ##
1566 # @quit:
1567 #
1568 # This command will cause the QEMU process to exit gracefully. While every
1569 # attempt is made to send the QMP response before terminating, this is not
1570 # guaranteed. When using this interface, a premature EOF would not be
1571 # unexpected.
1572 #
1573 # Since: 0.14.0
1574 ##
1575 { 'command': 'quit' }
1576
1577 ##
1578 # @stop:
1579 #
1580 # Stop all guest VCPU execution.
1581 #
1582 # Since: 0.14.0
1583 #
1584 # Notes: This function will succeed even if the guest is already in the stopped
1585 # state. In "inmigrate" state, it will ensure that the guest
1586 # remains paused once migration finishes, as if the -S option was
1587 # passed on the command line.
1588 ##
1589 { 'command': 'stop' }
1590
1591 ##
1592 # @system_reset:
1593 #
1594 # Performs a hard reset of a guest.
1595 #
1596 # Since: 0.14.0
1597 ##
1598 { 'command': 'system_reset' }
1599
1600 ##
1601 # @system_powerdown:
1602 #
1603 # Requests that a guest perform a powerdown operation.
1604 #
1605 # Since: 0.14.0
1606 #
1607 # Notes: A guest may or may not respond to this command. This command
1608 # returning does not indicate that a guest has accepted the request or
1609 # that it has shut down. Many guests will respond to this command by
1610 # prompting the user in some way.
1611 ##
1612 { 'command': 'system_powerdown' }
1613
1614 ##
1615 # @cpu:
1616 #
1617 # This command is a nop that is only provided for the purposes of compatibility.
1618 #
1619 # Since: 0.14.0
1620 #
1621 # Notes: Do not use this command.
1622 ##
1623 { 'command': 'cpu', 'data': {'index': 'int'} }
1624
1625 ##
1626 # @cpu-add
1627 #
1628 # Adds CPU with specified ID
1629 #
1630 # @id: ID of CPU to be created, valid values [0..max_cpus)
1631 #
1632 # Returns: Nothing on success
1633 #
1634 # Since 1.5
1635 ##
1636 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1637
1638 ##
1639 # @memsave:
1640 #
1641 # Save a portion of guest memory to a file.
1642 #
1643 # @val: the virtual address of the guest to start from
1644 #
1645 # @size: the size of memory region to save
1646 #
1647 # @filename: the file to save the memory to as binary data
1648 #
1649 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1650 # virtual address (defaults to CPU 0)
1651 #
1652 # Returns: Nothing on success
1653 #
1654 # Since: 0.14.0
1655 #
1656 # Notes: Errors were not reliably returned until 1.1
1657 ##
1658 { 'command': 'memsave',
1659 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1660
1661 ##
1662 # @pmemsave:
1663 #
1664 # Save a portion of guest physical memory to a file.
1665 #
1666 # @val: the physical address of the guest to start from
1667 #
1668 # @size: the size of memory region to save
1669 #
1670 # @filename: the file to save the memory to as binary data
1671 #
1672 # Returns: Nothing on success
1673 #
1674 # Since: 0.14.0
1675 #
1676 # Notes: Errors were not reliably returned until 1.1
1677 ##
1678 { 'command': 'pmemsave',
1679 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1680
1681 ##
1682 # @cont:
1683 #
1684 # Resume guest VCPU execution.
1685 #
1686 # Since: 0.14.0
1687 #
1688 # Returns: If successful, nothing
1689 # If QEMU was started with an encrypted block device and a key has
1690 # not yet been set, DeviceEncrypted.
1691 #
1692 # Notes: This command will succeed if the guest is currently running. It
1693 # will also succeed if the guest is in the "inmigrate" state; in
1694 # this case, the effect of the command is to make sure the guest
1695 # starts once migration finishes, removing the effect of the -S
1696 # command line option if it was passed.
1697 ##
1698 { 'command': 'cont' }
1699
1700 ##
1701 # @system_wakeup:
1702 #
1703 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1704 #
1705 # Since: 1.1
1706 #
1707 # Returns: nothing.
1708 ##
1709 { 'command': 'system_wakeup' }
1710
1711 ##
1712 # @inject-nmi:
1713 #
1714 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1715 #
1716 # Returns: If successful, nothing
1717 #
1718 # Since: 0.14.0
1719 #
1720 # Notes: Only x86 Virtual Machines support this command.
1721 ##
1722 { 'command': 'inject-nmi' }
1723
1724 ##
1725 # @set_link:
1726 #
1727 # Sets the link status of a virtual network adapter.
1728 #
1729 # @name: the device name of the virtual network adapter
1730 #
1731 # @up: true to set the link status to be up
1732 #
1733 # Returns: Nothing on success
1734 # If @name is not a valid network device, DeviceNotFound
1735 #
1736 # Since: 0.14.0
1737 #
1738 # Notes: Not all network adapters support setting link status. This command
1739 # will succeed even if the network adapter does not support link status
1740 # notification.
1741 ##
1742 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1743
1744 ##
1745 # @block_passwd:
1746 #
1747 # This command sets the password of a block device that has not been open
1748 # with a password and requires one.
1749 #
1750 # The two cases where this can happen are a block device is created through
1751 # QEMU's initial command line or a block device is changed through the legacy
1752 # @change interface.
1753 #
1754 # In the event that the block device is created through the initial command
1755 # line, the VM will start in the stopped state regardless of whether '-S' is
1756 # used. The intention is for a management tool to query the block devices to
1757 # determine which ones are encrypted, set the passwords with this command, and
1758 # then start the guest with the @cont command.
1759 #
1760 # Either @device or @node-name must be set but not both.
1761 #
1762 # @device: #optional the name of the block backend device to set the password on
1763 #
1764 # @node-name: #optional graph node name to set the password on (Since 2.0)
1765 #
1766 # @password: the password to use for the device
1767 #
1768 # Returns: nothing on success
1769 # If @device is not a valid block device, DeviceNotFound
1770 # If @device is not encrypted, DeviceNotEncrypted
1771 #
1772 # Notes: Not all block formats support encryption and some that do are not
1773 # able to validate that a password is correct. Disk corruption may
1774 # occur if an invalid password is specified.
1775 #
1776 # Since: 0.14.0
1777 ##
1778 { 'command': 'block_passwd', 'data': {'*device': 'str',
1779 '*node-name': 'str', 'password': 'str'} }
1780
1781 ##
1782 # @balloon:
1783 #
1784 # Request the balloon driver to change its balloon size.
1785 #
1786 # @value: the target size of the balloon in bytes
1787 #
1788 # Returns: Nothing on success
1789 # If the balloon driver is enabled but not functional because the KVM
1790 # kernel module cannot support it, KvmMissingCap
1791 # If no balloon device is present, DeviceNotActive
1792 #
1793 # Notes: This command just issues a request to the guest. When it returns,
1794 # the balloon size may not have changed. A guest can change the balloon
1795 # size independent of this command.
1796 #
1797 # Since: 0.14.0
1798 ##
1799 { 'command': 'balloon', 'data': {'value': 'int'} }
1800
1801 ##
1802 # @block_resize
1803 #
1804 # Resize a block image while a guest is running.
1805 #
1806 # Either @device or @node-name must be set but not both.
1807 #
1808 # @device: #optional the name of the device to get the image resized
1809 #
1810 # @node-name: #optional graph node name to get the image resized (Since 2.0)
1811 #
1812 # @size: new image size in bytes
1813 #
1814 # Returns: nothing on success
1815 # If @device is not a valid block device, DeviceNotFound
1816 #
1817 # Since: 0.14.0
1818 ##
1819 { 'command': 'block_resize', 'data': { '*device': 'str',
1820 '*node-name': 'str',
1821 'size': 'int' }}
1822
1823 ##
1824 # @NewImageMode
1825 #
1826 # An enumeration that tells QEMU how to set the backing file path in
1827 # a new image file.
1828 #
1829 # @existing: QEMU should look for an existing image file.
1830 #
1831 # @absolute-paths: QEMU should create a new image with absolute paths
1832 # for the backing file. If there is no backing file available, the new
1833 # image will not be backed either.
1834 #
1835 # Since: 1.1
1836 ##
1837 { 'enum': 'NewImageMode',
1838 'data': [ 'existing', 'absolute-paths' ] }
1839
1840 ##
1841 # @BlockdevSnapshot
1842 #
1843 # Either @device or @node-name must be set but not both.
1844 #
1845 # @device: #optional the name of the device to generate the snapshot from.
1846 #
1847 # @node-name: #optional graph node name to generate the snapshot from (Since 2.0)
1848 #
1849 # @snapshot-file: the target of the new image. A new file will be created.
1850 #
1851 # @snapshot-node-name: #optional the graph node name of the new image (Since 2.0)
1852 #
1853 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1854 #
1855 # @mode: #optional whether and how QEMU should create a new image, default is
1856 # 'absolute-paths'.
1857 ##
1858 { 'type': 'BlockdevSnapshot',
1859 'data': { '*device': 'str', '*node-name': 'str',
1860 'snapshot-file': 'str', '*snapshot-node-name': 'str',
1861 '*format': 'str', '*mode': 'NewImageMode' } }
1862
1863 ##
1864 # @BlockdevSnapshotInternal
1865 #
1866 # @device: the name of the device to generate the snapshot from
1867 #
1868 # @name: the name of the internal snapshot to be created
1869 #
1870 # Notes: In transaction, if @name is empty, or any snapshot matching @name
1871 # exists, the operation will fail. Only some image formats support it,
1872 # for example, qcow2, rbd, and sheepdog.
1873 #
1874 # Since: 1.7
1875 ##
1876 { 'type': 'BlockdevSnapshotInternal',
1877 'data': { 'device': 'str', 'name': 'str' } }
1878
1879 ##
1880 # @DriveBackup
1881 #
1882 # @device: the name of the device which should be copied.
1883 #
1884 # @target: the target of the new image. If the file exists, or if it
1885 # is a device, the existing file/device will be used as the new
1886 # destination. If it does not exist, a new file will be created.
1887 #
1888 # @format: #optional the format of the new destination, default is to
1889 # probe if @mode is 'existing', else the format of the source
1890 #
1891 # @sync: what parts of the disk image should be copied to the destination
1892 # (all the disk, only the sectors allocated in the topmost image, or
1893 # only new I/O).
1894 #
1895 # @mode: #optional whether and how QEMU should create a new image, default is
1896 # 'absolute-paths'.
1897 #
1898 # @speed: #optional the maximum speed, in bytes per second
1899 #
1900 # @on-source-error: #optional the action to take on an error on the source,
1901 # default 'report'. 'stop' and 'enospc' can only be used
1902 # if the block device supports io-status (see BlockInfo).
1903 #
1904 # @on-target-error: #optional the action to take on an error on the target,
1905 # default 'report' (no limitations, since this applies to
1906 # a different block device than @device).
1907 #
1908 # Note that @on-source-error and @on-target-error only affect background I/O.
1909 # If an error occurs during a guest write request, the device's rerror/werror
1910 # actions will be used.
1911 #
1912 # Since: 1.6
1913 ##
1914 { 'type': 'DriveBackup',
1915 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1916 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1917 '*speed': 'int',
1918 '*on-source-error': 'BlockdevOnError',
1919 '*on-target-error': 'BlockdevOnError' } }
1920
1921 ##
1922 # @Abort
1923 #
1924 # This action can be used to test transaction failure.
1925 #
1926 # Since: 1.6
1927 ###
1928 { 'type': 'Abort',
1929 'data': { } }
1930
1931 ##
1932 # @TransactionAction
1933 #
1934 # A discriminated record of operations that can be performed with
1935 # @transaction.
1936 ##
1937 { 'union': 'TransactionAction',
1938 'data': {
1939 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1940 'drive-backup': 'DriveBackup',
1941 'abort': 'Abort',
1942 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
1943 } }
1944
1945 ##
1946 # @transaction
1947 #
1948 # Executes a number of transactionable QMP commands atomically. If any
1949 # operation fails, then the entire set of actions will be abandoned and the
1950 # appropriate error returned.
1951 #
1952 # List of:
1953 # @TransactionAction: information needed for the respective operation
1954 #
1955 # Returns: nothing on success
1956 # Errors depend on the operations of the transaction
1957 #
1958 # Note: The transaction aborts on the first failure. Therefore, there will be
1959 # information on only one failed operation returned in an error condition, and
1960 # subsequent actions will not have been attempted.
1961 #
1962 # Since 1.1
1963 ##
1964 { 'command': 'transaction',
1965 'data': { 'actions': [ 'TransactionAction' ] } }
1966
1967 ##
1968 # @blockdev-snapshot-sync
1969 #
1970 # Generates a synchronous snapshot of a block device.
1971 #
1972 # For the arguments, see the documentation of BlockdevSnapshot.
1973 #
1974 # Returns: nothing on success
1975 # If @device is not a valid block device, DeviceNotFound
1976 #
1977 # Since 0.14.0
1978 ##
1979 { 'command': 'blockdev-snapshot-sync',
1980 'data': 'BlockdevSnapshot' }
1981
1982 ##
1983 # @blockdev-snapshot-internal-sync
1984 #
1985 # Synchronously take an internal snapshot of a block device, when the format
1986 # of the image used supports it.
1987 #
1988 # For the arguments, see the documentation of BlockdevSnapshotInternal.
1989 #
1990 # Returns: nothing on success
1991 # If @device is not a valid block device, DeviceNotFound
1992 # If any snapshot matching @name exists, or @name is empty,
1993 # GenericError
1994 # If the format of the image used does not support it,
1995 # BlockFormatFeatureNotSupported
1996 #
1997 # Since 1.7
1998 ##
1999 { 'command': 'blockdev-snapshot-internal-sync',
2000 'data': 'BlockdevSnapshotInternal' }
2001
2002 ##
2003 # @blockdev-snapshot-delete-internal-sync
2004 #
2005 # Synchronously delete an internal snapshot of a block device, when the format
2006 # of the image used support it. The snapshot is identified by name or id or
2007 # both. One of the name or id is required. Return SnapshotInfo for the
2008 # successfully deleted snapshot.
2009 #
2010 # @device: the name of the device to delete the snapshot from
2011 #
2012 # @id: optional the snapshot's ID to be deleted
2013 #
2014 # @name: optional the snapshot's name to be deleted
2015 #
2016 # Returns: SnapshotInfo on success
2017 # If @device is not a valid block device, DeviceNotFound
2018 # If snapshot not found, GenericError
2019 # If the format of the image used does not support it,
2020 # BlockFormatFeatureNotSupported
2021 # If @id and @name are both not specified, GenericError
2022 #
2023 # Since 1.7
2024 ##
2025 { 'command': 'blockdev-snapshot-delete-internal-sync',
2026 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
2027 'returns': 'SnapshotInfo' }
2028
2029 ##
2030 # @human-monitor-command:
2031 #
2032 # Execute a command on the human monitor and return the output.
2033 #
2034 # @command-line: the command to execute in the human monitor
2035 #
2036 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
2037 #
2038 # Returns: the output of the command as a string
2039 #
2040 # Since: 0.14.0
2041 #
2042 # Notes: This command only exists as a stop-gap. Its use is highly
2043 # discouraged. The semantics of this command are not guaranteed.
2044 #
2045 # Known limitations:
2046 #
2047 # o This command is stateless, this means that commands that depend
2048 # on state information (such as getfd) might not work
2049 #
2050 # o Commands that prompt the user for data (eg. 'cont' when the block
2051 # device is encrypted) don't currently work
2052 ##
2053 { 'command': 'human-monitor-command',
2054 'data': {'command-line': 'str', '*cpu-index': 'int'},
2055 'returns': 'str' }
2056
2057 ##
2058 # @block-commit
2059 #
2060 # Live commit of data from overlay image nodes into backing nodes - i.e.,
2061 # writes data between 'top' and 'base' into 'base'.
2062 #
2063 # @device: the name of the device
2064 #
2065 # @base: #optional The file name of the backing image to write data into.
2066 # If not specified, this is the deepest backing image
2067 #
2068 # @top: The file name of the backing image within the image chain,
2069 # which contains the topmost data to be committed down.
2070 #
2071 # If top == base, that is an error.
2072 # If top == active, the job will not be completed by itself,
2073 # user needs to complete the job with the block-job-complete
2074 # command after getting the ready event. (Since 2.0)
2075 #
2076 # If the base image is smaller than top, then the base image
2077 # will be resized to be the same size as top. If top is
2078 # smaller than the base image, the base will not be
2079 # truncated. If you want the base image size to match the
2080 # size of the smaller top, you can safely truncate it
2081 # yourself once the commit operation successfully completes.
2082 #
2083 #
2084 # @speed: #optional the maximum speed, in bytes per second
2085 #
2086 # Returns: Nothing on success
2087 # If commit or stream is already active on this device, DeviceInUse
2088 # If @device does not exist, DeviceNotFound
2089 # If image commit is not supported by this device, NotSupported
2090 # If @base or @top is invalid, a generic error is returned
2091 # If @speed is invalid, InvalidParameter
2092 #
2093 # Since: 1.3
2094 #
2095 ##
2096 { 'command': 'block-commit',
2097 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
2098 '*speed': 'int' } }
2099
2100 ##
2101 # @drive-backup
2102 #
2103 # Start a point-in-time copy of a block device to a new destination. The
2104 # status of ongoing drive-backup operations can be checked with
2105 # query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
2106 # The operation can be stopped before it has completed using the
2107 # block-job-cancel command.
2108 #
2109 # For the arguments, see the documentation of DriveBackup.
2110 #
2111 # Returns: nothing on success
2112 # If @device is not a valid block device, DeviceNotFound
2113 #
2114 # Since 1.6
2115 ##
2116 { 'command': 'drive-backup', 'data': 'DriveBackup' }
2117
2118 ##
2119 # @query-named-block-nodes
2120 #
2121 # Get the named block driver list
2122 #
2123 # Returns: the list of BlockDeviceInfo
2124 #
2125 # Since 2.0
2126 ##
2127 { 'command': 'query-named-block-nodes', 'returns': [ 'BlockDeviceInfo' ] }
2128
2129 ##
2130 # @drive-mirror
2131 #
2132 # Start mirroring a block device's writes to a new destination.
2133 #
2134 # @device: the name of the device whose writes should be mirrored.
2135 #
2136 # @target: the target of the new image. If the file exists, or if it
2137 # is a device, the existing file/device will be used as the new
2138 # destination. If it does not exist, a new file will be created.
2139 #
2140 # @format: #optional the format of the new destination, default is to
2141 # probe if @mode is 'existing', else the format of the source
2142 #
2143 # @mode: #optional whether and how QEMU should create a new image, default is
2144 # 'absolute-paths'.
2145 #
2146 # @speed: #optional the maximum speed, in bytes per second
2147 #
2148 # @sync: what parts of the disk image should be copied to the destination
2149 # (all the disk, only the sectors allocated in the topmost image, or
2150 # only new I/O).
2151 #
2152 # @granularity: #optional granularity of the dirty bitmap, default is 64K
2153 # if the image format doesn't have clusters, 4K if the clusters
2154 # are smaller than that, else the cluster size. Must be a
2155 # power of 2 between 512 and 64M (since 1.4).
2156 #
2157 # @buf-size: #optional maximum amount of data in flight from source to
2158 # target (since 1.4).
2159 #
2160 # @on-source-error: #optional the action to take on an error on the source,
2161 # default 'report'. 'stop' and 'enospc' can only be used
2162 # if the block device supports io-status (see BlockInfo).
2163 #
2164 # @on-target-error: #optional the action to take on an error on the target,
2165 # default 'report' (no limitations, since this applies to
2166 # a different block device than @device).
2167 #
2168 # Returns: nothing on success
2169 # If @device is not a valid block device, DeviceNotFound
2170 #
2171 # Since 1.3
2172 ##
2173 { 'command': 'drive-mirror',
2174 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
2175 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
2176 '*speed': 'int', '*granularity': 'uint32',
2177 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
2178 '*on-target-error': 'BlockdevOnError' } }
2179
2180 ##
2181 # @migrate_cancel
2182 #
2183 # Cancel the current executing migration process.
2184 #
2185 # Returns: nothing on success
2186 #
2187 # Notes: This command succeeds even if there is no migration process running.
2188 #
2189 # Since: 0.14.0
2190 ##
2191 { 'command': 'migrate_cancel' }
2192
2193 ##
2194 # @migrate_set_downtime
2195 #
2196 # Set maximum tolerated downtime for migration.
2197 #
2198 # @value: maximum downtime in seconds
2199 #
2200 # Returns: nothing on success
2201 #
2202 # Since: 0.14.0
2203 ##
2204 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
2205
2206 ##
2207 # @migrate_set_speed
2208 #
2209 # Set maximum speed for migration.
2210 #
2211 # @value: maximum speed in bytes.
2212 #
2213 # Returns: nothing on success
2214 #
2215 # Notes: A value lesser than zero will be automatically round up to zero.
2216 #
2217 # Since: 0.14.0
2218 ##
2219 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
2220
2221 ##
2222 # @migrate-set-cache-size
2223 #
2224 # Set XBZRLE cache size
2225 #
2226 # @value: cache size in bytes
2227 #
2228 # The size will be rounded down to the nearest power of 2.
2229 # The cache size can be modified before and during ongoing migration
2230 #
2231 # Returns: nothing on success
2232 #
2233 # Since: 1.2
2234 ##
2235 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2236
2237 ##
2238 # @query-migrate-cache-size
2239 #
2240 # query XBZRLE cache size
2241 #
2242 # Returns: XBZRLE cache size in bytes
2243 #
2244 # Since: 1.2
2245 ##
2246 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
2247
2248 ##
2249 # @ObjectPropertyInfo:
2250 #
2251 # @name: the name of the property
2252 #
2253 # @type: the type of the property. This will typically come in one of four
2254 # forms:
2255 #
2256 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2257 # These types are mapped to the appropriate JSON type.
2258 #
2259 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
2260 # legacy qdev typename. These types are always treated as strings.
2261 #
2262 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
2263 # device type name. Child properties create the composition tree.
2264 #
2265 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
2266 # device type name. Link properties form the device model graph.
2267 #
2268 # Since: 1.2
2269 ##
2270 { 'type': 'ObjectPropertyInfo',
2271 'data': { 'name': 'str', 'type': 'str' } }
2272
2273 ##
2274 # @qom-list:
2275 #
2276 # This command will list any properties of a object given a path in the object
2277 # model.
2278 #
2279 # @path: the path within the object model. See @qom-get for a description of
2280 # this parameter.
2281 #
2282 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
2283 # object.
2284 #
2285 # Since: 1.2
2286 ##
2287 { 'command': 'qom-list',
2288 'data': { 'path': 'str' },
2289 'returns': [ 'ObjectPropertyInfo' ] }
2290
2291 ##
2292 # @qom-get:
2293 #
2294 # This command will get a property from a object model path and return the
2295 # value.
2296 #
2297 # @path: The path within the object model. There are two forms of supported
2298 # paths--absolute and partial paths.
2299 #
2300 # Absolute paths are derived from the root object and can follow child<>
2301 # or link<> properties. Since they can follow link<> properties, they
2302 # can be arbitrarily long. Absolute paths look like absolute filenames
2303 # and are prefixed with a leading slash.
2304 #
2305 # Partial paths look like relative filenames. They do not begin
2306 # with a prefix. The matching rules for partial paths are subtle but
2307 # designed to make specifying objects easy. At each level of the
2308 # composition tree, the partial path is matched as an absolute path.
2309 # The first match is not returned. At least two matches are searched
2310 # for. A successful result is only returned if only one match is
2311 # found. If more than one match is found, a flag is return to
2312 # indicate that the match was ambiguous.
2313 #
2314 # @property: The property name to read
2315 #
2316 # Returns: The property value. The type depends on the property type. legacy<>
2317 # properties are returned as #str. child<> and link<> properties are
2318 # returns as #str pathnames. All integer property types (u8, u16, etc)
2319 # are returned as #int.
2320 #
2321 # Since: 1.2
2322 ##
2323 { 'command': 'qom-get',
2324 'data': { 'path': 'str', 'property': 'str' },
2325 'returns': 'visitor',
2326 'gen': 'no' }
2327
2328 ##
2329 # @qom-set:
2330 #
2331 # This command will set a property from a object model path.
2332 #
2333 # @path: see @qom-get for a description of this parameter
2334 #
2335 # @property: the property name to set
2336 #
2337 # @value: a value who's type is appropriate for the property type. See @qom-get
2338 # for a description of type mapping.
2339 #
2340 # Since: 1.2
2341 ##
2342 { 'command': 'qom-set',
2343 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2344 'gen': 'no' }
2345
2346 ##
2347 # @set_password:
2348 #
2349 # Sets the password of a remote display session.
2350 #
2351 # @protocol: `vnc' to modify the VNC server password
2352 # `spice' to modify the Spice server password
2353 #
2354 # @password: the new password
2355 #
2356 # @connected: #optional how to handle existing clients when changing the
2357 # password. If nothing is specified, defaults to `keep'
2358 # `fail' to fail the command if clients are connected
2359 # `disconnect' to disconnect existing clients
2360 # `keep' to maintain existing clients
2361 #
2362 # Returns: Nothing on success
2363 # If Spice is not enabled, DeviceNotFound
2364 #
2365 # Since: 0.14.0
2366 ##
2367 { 'command': 'set_password',
2368 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
2369
2370 ##
2371 # @expire_password:
2372 #
2373 # Expire the password of a remote display server.
2374 #
2375 # @protocol: the name of the remote display protocol `vnc' or `spice'
2376 #
2377 # @time: when to expire the password.
2378 # `now' to expire the password immediately
2379 # `never' to cancel password expiration
2380 # `+INT' where INT is the number of seconds from now (integer)
2381 # `INT' where INT is the absolute time in seconds
2382 #
2383 # Returns: Nothing on success
2384 # If @protocol is `spice' and Spice is not active, DeviceNotFound
2385 #
2386 # Since: 0.14.0
2387 #
2388 # Notes: Time is relative to the server and currently there is no way to
2389 # coordinate server time with client time. It is not recommended to
2390 # use the absolute time version of the @time parameter unless you're
2391 # sure you are on the same machine as the QEMU instance.
2392 ##
2393 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2394
2395 ##
2396 # @eject:
2397 #
2398 # Ejects a device from a removable drive.
2399 #
2400 # @device: The name of the device
2401 #
2402 # @force: @optional If true, eject regardless of whether the drive is locked.
2403 # If not specified, the default value is false.
2404 #
2405 # Returns: Nothing on success
2406 # If @device is not a valid block device, DeviceNotFound
2407 #
2408 # Notes: Ejecting a device will no media results in success
2409 #
2410 # Since: 0.14.0
2411 ##
2412 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2413
2414 ##
2415 # @change-vnc-password:
2416 #
2417 # Change the VNC server password.
2418 #
2419 # @target: the new password to use with VNC authentication
2420 #
2421 # Since: 1.1
2422 #
2423 # Notes: An empty password in this command will set the password to the empty
2424 # string. Existing clients are unaffected by executing this command.
2425 ##
2426 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2427
2428 ##
2429 # @change:
2430 #
2431 # This command is multiple commands multiplexed together.
2432 #
2433 # @device: This is normally the name of a block device but it may also be 'vnc'.
2434 # when it's 'vnc', then sub command depends on @target
2435 #
2436 # @target: If @device is a block device, then this is the new filename.
2437 # If @device is 'vnc', then if the value 'password' selects the vnc
2438 # change password command. Otherwise, this specifies a new server URI
2439 # address to listen to for VNC connections.
2440 #
2441 # @arg: If @device is a block device, then this is an optional format to open
2442 # the device with.
2443 # If @device is 'vnc' and @target is 'password', this is the new VNC
2444 # password to set. If this argument is an empty string, then no future
2445 # logins will be allowed.
2446 #
2447 # Returns: Nothing on success.
2448 # If @device is not a valid block device, DeviceNotFound
2449 # If the new block device is encrypted, DeviceEncrypted. Note that
2450 # if this error is returned, the device has been opened successfully
2451 # and an additional call to @block_passwd is required to set the
2452 # device's password. The behavior of reads and writes to the block
2453 # device between when these calls are executed is undefined.
2454 #
2455 # Notes: It is strongly recommended that this interface is not used especially
2456 # for changing block devices.
2457 #
2458 # Since: 0.14.0
2459 ##
2460 { 'command': 'change',
2461 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2462
2463 ##
2464 # @block_set_io_throttle:
2465 #
2466 # Change I/O throttle limits for a block drive.
2467 #
2468 # @device: The name of the device
2469 #
2470 # @bps: total throughput limit in bytes per second
2471 #
2472 # @bps_rd: read throughput limit in bytes per second
2473 #
2474 # @bps_wr: write throughput limit in bytes per second
2475 #
2476 # @iops: total I/O operations per second
2477 #
2478 # @ops_rd: read I/O operations per second
2479 #
2480 # @iops_wr: write I/O operations per second
2481 #
2482 # @bps_max: #optional total max in bytes (Since 1.7)
2483 #
2484 # @bps_rd_max: #optional read max in bytes (Since 1.7)
2485 #
2486 # @bps_wr_max: #optional write max in bytes (Since 1.7)
2487 #
2488 # @iops_max: #optional total I/O operations max (Since 1.7)
2489 #
2490 # @iops_rd_max: #optional read I/O operations max (Since 1.7)
2491 #
2492 # @iops_wr_max: #optional write I/O operations max (Since 1.7)
2493 #
2494 # @iops_size: #optional an I/O size in bytes (Since 1.7)
2495 #
2496 # Returns: Nothing on success
2497 # If @device is not a valid block device, DeviceNotFound
2498 #
2499 # Since: 1.1
2500 ##
2501 { 'command': 'block_set_io_throttle',
2502 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2503 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
2504 '*bps_max': 'int', '*bps_rd_max': 'int',
2505 '*bps_wr_max': 'int', '*iops_max': 'int',
2506 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
2507 '*iops_size': 'int' } }
2508
2509 ##
2510 # @block-stream:
2511 #
2512 # Copy data from a backing file into a block device.
2513 #
2514 # The block streaming operation is performed in the background until the entire
2515 # backing file has been copied. This command returns immediately once streaming
2516 # has started. The status of ongoing block streaming operations can be checked
2517 # with query-block-jobs. The operation can be stopped before it has completed
2518 # using the block-job-cancel command.
2519 #
2520 # If a base file is specified then sectors are not copied from that base file and
2521 # its backing chain. When streaming completes the image file will have the base
2522 # file as its backing file. This can be used to stream a subset of the backing
2523 # file chain instead of flattening the entire image.
2524 #
2525 # On successful completion the image file is updated to drop the backing file
2526 # and the BLOCK_JOB_COMPLETED event is emitted.
2527 #
2528 # @device: the device name
2529 #
2530 # @base: #optional the common backing file name
2531 #
2532 # @speed: #optional the maximum speed, in bytes per second
2533 #
2534 # @on-error: #optional the action to take on an error (default report).
2535 # 'stop' and 'enospc' can only be used if the block device
2536 # supports io-status (see BlockInfo). Since 1.3.
2537 #
2538 # Returns: Nothing on success
2539 # If @device does not exist, DeviceNotFound
2540 #
2541 # Since: 1.1
2542 ##
2543 { 'command': 'block-stream',
2544 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2545 '*on-error': 'BlockdevOnError' } }
2546
2547 ##
2548 # @block-job-set-speed:
2549 #
2550 # Set maximum speed for a background block operation.
2551 #
2552 # This command can only be issued when there is an active block job.
2553 #
2554 # Throttling can be disabled by setting the speed to 0.
2555 #
2556 # @device: the device name
2557 #
2558 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2559 # Defaults to 0.
2560 #
2561 # Returns: Nothing on success
2562 # If no background operation is active on this device, DeviceNotActive
2563 #
2564 # Since: 1.1
2565 ##
2566 { 'command': 'block-job-set-speed',
2567 'data': { 'device': 'str', 'speed': 'int' } }
2568
2569 ##
2570 # @block-job-cancel:
2571 #
2572 # Stop an active background block operation.
2573 #
2574 # This command returns immediately after marking the active background block
2575 # operation for cancellation. It is an error to call this command if no
2576 # operation is in progress.
2577 #
2578 # The operation will cancel as soon as possible and then emit the
2579 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2580 # enumerated using query-block-jobs.
2581 #
2582 # For streaming, the image file retains its backing file unless the streaming
2583 # operation happens to complete just as it is being cancelled. A new streaming
2584 # operation can be started at a later time to finish copying all data from the
2585 # backing file.
2586 #
2587 # @device: the device name
2588 #
2589 # @force: #optional whether to allow cancellation of a paused job (default
2590 # false). Since 1.3.
2591 #
2592 # Returns: Nothing on success
2593 # If no background operation is active on this device, DeviceNotActive
2594 #
2595 # Since: 1.1
2596 ##
2597 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2598
2599 ##
2600 # @block-job-pause:
2601 #
2602 # Pause an active background block operation.
2603 #
2604 # This command returns immediately after marking the active background block
2605 # operation for pausing. It is an error to call this command if no
2606 # operation is in progress. Pausing an already paused job has no cumulative
2607 # effect; a single block-job-resume command will resume the job.
2608 #
2609 # The operation will pause as soon as possible. No event is emitted when
2610 # the operation is actually paused. Cancelling a paused job automatically
2611 # resumes it.
2612 #
2613 # @device: the device name
2614 #
2615 # Returns: Nothing on success
2616 # If no background operation is active on this device, DeviceNotActive
2617 #
2618 # Since: 1.3
2619 ##
2620 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2621
2622 ##
2623 # @block-job-resume:
2624 #
2625 # Resume an active background block operation.
2626 #
2627 # This command returns immediately after resuming a paused background block
2628 # operation. It is an error to call this command if no operation is in
2629 # progress. Resuming an already running job is not an error.
2630 #
2631 # This command also clears the error status of the job.
2632 #
2633 # @device: the device name
2634 #
2635 # Returns: Nothing on success
2636 # If no background operation is active on this device, DeviceNotActive
2637 #
2638 # Since: 1.3
2639 ##
2640 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2641
2642 ##
2643 # @block-job-complete:
2644 #
2645 # Manually trigger completion of an active background block operation. This
2646 # is supported for drive mirroring, where it also switches the device to
2647 # write to the target path only. The ability to complete is signaled with
2648 # a BLOCK_JOB_READY event.
2649 #
2650 # This command completes an active background block operation synchronously.
2651 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2652 # is not defined. Note that if an I/O error occurs during the processing of
2653 # this command: 1) the command itself will fail; 2) the error will be processed
2654 # according to the rerror/werror arguments that were specified when starting
2655 # the operation.
2656 #
2657 # A cancelled or paused job cannot be completed.
2658 #
2659 # @device: the device name
2660 #
2661 # Returns: Nothing on success
2662 # If no background operation is active on this device, DeviceNotActive
2663 #
2664 # Since: 1.3
2665 ##
2666 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2667
2668 ##
2669 # @ObjectTypeInfo:
2670 #
2671 # This structure describes a search result from @qom-list-types
2672 #
2673 # @name: the type name found in the search
2674 #
2675 # Since: 1.1
2676 #
2677 # Notes: This command is experimental and may change syntax in future releases.
2678 ##
2679 { 'type': 'ObjectTypeInfo',
2680 'data': { 'name': 'str' } }
2681
2682 ##
2683 # @qom-list-types:
2684 #
2685 # This command will return a list of types given search parameters
2686 #
2687 # @implements: if specified, only return types that implement this type name
2688 #
2689 # @abstract: if true, include abstract types in the results
2690 #
2691 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2692 #
2693 # Since: 1.1
2694 ##
2695 { 'command': 'qom-list-types',
2696 'data': { '*implements': 'str', '*abstract': 'bool' },
2697 'returns': [ 'ObjectTypeInfo' ] }
2698
2699 ##
2700 # @DevicePropertyInfo:
2701 #
2702 # Information about device properties.
2703 #
2704 # @name: the name of the property
2705 # @type: the typename of the property
2706 #
2707 # Since: 1.2
2708 ##
2709 { 'type': 'DevicePropertyInfo',
2710 'data': { 'name': 'str', 'type': 'str' } }
2711
2712 ##
2713 # @device-list-properties:
2714 #
2715 # List properties associated with a device.
2716 #
2717 # @typename: the type name of a device
2718 #
2719 # Returns: a list of DevicePropertyInfo describing a devices properties
2720 #
2721 # Since: 1.2
2722 ##
2723 { 'command': 'device-list-properties',
2724 'data': { 'typename': 'str'},
2725 'returns': [ 'DevicePropertyInfo' ] }
2726
2727 ##
2728 # @migrate
2729 #
2730 # Migrates the current running guest to another Virtual Machine.
2731 #
2732 # @uri: the Uniform Resource Identifier of the destination VM
2733 #
2734 # @blk: #optional do block migration (full disk copy)
2735 #
2736 # @inc: #optional incremental disk copy migration
2737 #
2738 # @detach: this argument exists only for compatibility reasons and
2739 # is ignored by QEMU
2740 #
2741 # Returns: nothing on success
2742 #
2743 # Since: 0.14.0
2744 ##
2745 { 'command': 'migrate',
2746 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2747
2748 # @xen-save-devices-state:
2749 #
2750 # Save the state of all devices to file. The RAM and the block devices
2751 # of the VM are not saved by this command.
2752 #
2753 # @filename: the file to save the state of the devices to as binary
2754 # data. See xen-save-devices-state.txt for a description of the binary
2755 # format.
2756 #
2757 # Returns: Nothing on success
2758 #
2759 # Since: 1.1
2760 ##
2761 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2762
2763 ##
2764 # @xen-set-global-dirty-log
2765 #
2766 # Enable or disable the global dirty log mode.
2767 #
2768 # @enable: true to enable, false to disable.
2769 #
2770 # Returns: nothing
2771 #
2772 # Since: 1.3
2773 ##
2774 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2775
2776 ##
2777 # @device_del:
2778 #
2779 # Remove a device from a guest
2780 #
2781 # @id: the name of the device
2782 #
2783 # Returns: Nothing on success
2784 # If @id is not a valid device, DeviceNotFound
2785 #
2786 # Notes: When this command completes, the device may not be removed from the
2787 # guest. Hot removal is an operation that requires guest cooperation.
2788 # This command merely requests that the guest begin the hot removal
2789 # process. Completion of the device removal process is signaled with a
2790 # DEVICE_DELETED event. Guest reset will automatically complete removal
2791 # for all devices.
2792 #
2793 # Since: 0.14.0
2794 ##
2795 { 'command': 'device_del', 'data': {'id': 'str'} }
2796
2797 ##
2798 # @DumpGuestMemoryFormat:
2799 #
2800 # An enumeration of guest-memory-dump's format.
2801 #
2802 # @elf: elf format
2803 #
2804 # @kdump-zlib: kdump-compressed format with zlib-compressed
2805 #
2806 # @kdump-lzo: kdump-compressed format with lzo-compressed
2807 #
2808 # @kdump-snappy: kdump-compressed format with snappy-compressed
2809 #
2810 # Since: 2.0
2811 ##
2812 { 'enum': 'DumpGuestMemoryFormat',
2813 'data': [ 'elf', 'kdump-zlib', 'kdump-lzo', 'kdump-snappy' ] }
2814
2815 ##
2816 # @dump-guest-memory
2817 #
2818 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2819 # very long depending on the amount of guest memory. This command is only
2820 # supported on i386 and x86_64.
2821 #
2822 # @paging: if true, do paging to get guest's memory mapping. This allows
2823 # using gdb to process the core file.
2824 #
2825 # IMPORTANT: this option can make QEMU allocate several gigabytes
2826 # of RAM. This can happen for a large guest, or a
2827 # malicious guest pretending to be large.
2828 #
2829 # Also, paging=true has the following limitations:
2830 #
2831 # 1. The guest may be in a catastrophic state or can have corrupted
2832 # memory, which cannot be trusted
2833 # 2. The guest can be in real-mode even if paging is enabled. For
2834 # example, the guest uses ACPI to sleep, and ACPI sleep state
2835 # goes in real-mode
2836 #
2837 # @protocol: the filename or file descriptor of the vmcore. The supported
2838 # protocols are:
2839 #
2840 # 1. file: the protocol starts with "file:", and the following
2841 # string is the file's path.
2842 # 2. fd: the protocol starts with "fd:", and the following string
2843 # is the fd's name.
2844 #
2845 # @begin: #optional if specified, the starting physical address.
2846 #
2847 # @length: #optional if specified, the memory size, in bytes. If you don't
2848 # want to dump all guest's memory, please specify the start @begin
2849 # and @length
2850 #
2851 # @format: #optional if specified, the format of guest memory dump. But non-elf
2852 # format is conflict with paging and filter, ie. @paging, @begin and
2853 # @length is not allowed to be specified with non-elf @format at the
2854 # same time (since 2.0)
2855 #
2856 # Returns: nothing on success
2857 #
2858 # Since: 1.2
2859 ##
2860 { 'command': 'dump-guest-memory',
2861 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2862 '*length': 'int', '*format': 'DumpGuestMemoryFormat' } }
2863
2864 ##
2865 # @DumpGuestMemoryCapability:
2866 #
2867 # A list of the available formats for dump-guest-memory
2868 #
2869 # Since: 2.0
2870 ##
2871 { 'type': 'DumpGuestMemoryCapability',
2872 'data': {
2873 'formats': ['DumpGuestMemoryFormat'] } }
2874
2875 ##
2876 # @query-dump-guest-memory-capability:
2877 #
2878 # Returns the available formats for dump-guest-memory
2879 #
2880 # Returns: A @DumpGuestMemoryCapability object listing available formats for
2881 # dump-guest-memory
2882 #
2883 # Since: 2.0
2884 ##
2885 { 'command': 'query-dump-guest-memory-capability',
2886 'returns': 'DumpGuestMemoryCapability' }
2887
2888 ##
2889 # @netdev_add:
2890 #
2891 # Add a network backend.
2892 #
2893 # @type: the type of network backend. Current valid values are 'user', 'tap',
2894 # 'vde', 'socket', 'dump' and 'bridge'
2895 #
2896 # @id: the name of the new network backend
2897 #
2898 # @props: #optional a list of properties to be passed to the backend in
2899 # the format 'name=value', like 'ifname=tap0,script=no'
2900 #
2901 # Notes: The semantics of @props is not well defined. Future commands will be
2902 # introduced that provide stronger typing for backend creation.
2903 #
2904 # Since: 0.14.0
2905 #
2906 # Returns: Nothing on success
2907 # If @type is not a valid network backend, DeviceNotFound
2908 ##
2909 { 'command': 'netdev_add',
2910 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2911 'gen': 'no' }
2912
2913 ##
2914 # @netdev_del:
2915 #
2916 # Remove a network backend.
2917 #
2918 # @id: the name of the network backend to remove
2919 #
2920 # Returns: Nothing on success
2921 # If @id is not a valid network backend, DeviceNotFound
2922 #
2923 # Since: 0.14.0
2924 ##
2925 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2926
2927 ##
2928 # @object-add:
2929 #
2930 # Create a QOM object.
2931 #
2932 # @qom-type: the class name for the object to be created
2933 #
2934 # @id: the name of the new object
2935 #
2936 # @props: #optional a dictionary of properties to be passed to the backend
2937 #
2938 # Returns: Nothing on success
2939 # Error if @qom-type is not a valid class name
2940 #
2941 # Since: 2.0
2942 ##
2943 { 'command': 'object-add',
2944 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
2945 'gen': 'no' }
2946
2947 ##
2948 # @object-del:
2949 #
2950 # Remove a QOM object.
2951 #
2952 # @id: the name of the QOM object to remove
2953 #
2954 # Returns: Nothing on success
2955 # Error if @id is not a valid id for a QOM object
2956 #
2957 # Since: 2.0
2958 ##
2959 { 'command': 'object-del', 'data': {'id': 'str'} }
2960
2961 ##
2962 # @NetdevNoneOptions
2963 #
2964 # Use it alone to have zero network devices.
2965 #
2966 # Since 1.2
2967 ##
2968 { 'type': 'NetdevNoneOptions',
2969 'data': { } }
2970
2971 ##
2972 # @NetLegacyNicOptions
2973 #
2974 # Create a new Network Interface Card.
2975 #
2976 # @netdev: #optional id of -netdev to connect to
2977 #
2978 # @macaddr: #optional MAC address
2979 #
2980 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2981 #
2982 # @addr: #optional PCI device address
2983 #
2984 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2985 #
2986 # Since 1.2
2987 ##
2988 { 'type': 'NetLegacyNicOptions',
2989 'data': {
2990 '*netdev': 'str',
2991 '*macaddr': 'str',
2992 '*model': 'str',
2993 '*addr': 'str',
2994 '*vectors': 'uint32' } }
2995
2996 ##
2997 # @String
2998 #
2999 # A fat type wrapping 'str', to be embedded in lists.
3000 #
3001 # Since 1.2
3002 ##
3003 { 'type': 'String',
3004 'data': {
3005 'str': 'str' } }
3006
3007 ##
3008 # @NetdevUserOptions
3009 #
3010 # Use the user mode network stack which requires no administrator privilege to
3011 # run.
3012 #
3013 # @hostname: #optional client hostname reported by the builtin DHCP server
3014 #
3015 # @restrict: #optional isolate the guest from the host
3016 #
3017 # @ip: #optional legacy parameter, use net= instead
3018 #
3019 # @net: #optional IP address and optional netmask
3020 #
3021 # @host: #optional guest-visible address of the host
3022 #
3023 # @tftp: #optional root directory of the built-in TFTP server
3024 #
3025 # @bootfile: #optional BOOTP filename, for use with tftp=
3026 #
3027 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
3028 # assign
3029 #
3030 # @dns: #optional guest-visible address of the virtual nameserver
3031 #
3032 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
3033 # to the guest
3034 #
3035 # @smb: #optional root directory of the built-in SMB server
3036 #
3037 # @smbserver: #optional IP address of the built-in SMB server
3038 #
3039 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
3040 # endpoints
3041 #
3042 # @guestfwd: #optional forward guest TCP connections
3043 #
3044 # Since 1.2
3045 ##
3046 { 'type': 'NetdevUserOptions',
3047 'data': {
3048 '*hostname': 'str',
3049 '*restrict': 'bool',
3050 '*ip': 'str',
3051 '*net': 'str',
3052 '*host': 'str',
3053 '*tftp': 'str',
3054 '*bootfile': 'str',
3055 '*dhcpstart': 'str',
3056 '*dns': 'str',
3057 '*dnssearch': ['String'],
3058 '*smb': 'str',
3059 '*smbserver': 'str',
3060 '*hostfwd': ['String'],
3061 '*guestfwd': ['String'] } }
3062
3063 ##
3064 # @NetdevTapOptions
3065 #
3066 # Connect the host TAP network interface name to the VLAN.
3067 #
3068 # @ifname: #optional interface name
3069 #
3070 # @fd: #optional file descriptor of an already opened tap
3071 #
3072 # @fds: #optional multiple file descriptors of already opened multiqueue capable
3073 # tap
3074 #
3075 # @script: #optional script to initialize the interface
3076 #
3077 # @downscript: #optional script to shut down the interface
3078 #
3079 # @helper: #optional command to execute to configure bridge
3080 #
3081 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
3082 #
3083 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
3084 #
3085 # @vhost: #optional enable vhost-net network accelerator
3086 #
3087 # @vhostfd: #optional file descriptor of an already opened vhost net device
3088 #
3089 # @vhostfds: #optional file descriptors of multiple already opened vhost net
3090 # devices
3091 #
3092 # @vhostforce: #optional vhost on for non-MSIX virtio guests
3093 #
3094 # @queues: #optional number of queues to be created for multiqueue capable tap
3095 #
3096 # Since 1.2
3097 ##
3098 { 'type': 'NetdevTapOptions',
3099 'data': {
3100 '*ifname': 'str',
3101 '*fd': 'str',
3102 '*fds': 'str',
3103 '*script': 'str',
3104 '*downscript': 'str',
3105 '*helper': 'str',
3106 '*sndbuf': 'size',
3107 '*vnet_hdr': 'bool',
3108 '*vhost': 'bool',
3109 '*vhostfd': 'str',
3110 '*vhostfds': 'str',
3111 '*vhostforce': 'bool',
3112 '*queues': 'uint32'} }
3113
3114 ##
3115 # @NetdevSocketOptions
3116 #
3117 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
3118 # socket connection.
3119 #
3120 # @fd: #optional file descriptor of an already opened socket
3121 #
3122 # @listen: #optional port number, and optional hostname, to listen on
3123 #
3124 # @connect: #optional port number, and optional hostname, to connect to
3125 #
3126 # @mcast: #optional UDP multicast address and port number
3127 #
3128 # @localaddr: #optional source address and port for multicast and udp packets
3129 #
3130 # @udp: #optional UDP unicast address and port number
3131 #
3132 # Since 1.2
3133 ##
3134 { 'type': 'NetdevSocketOptions',
3135 'data': {
3136 '*fd': 'str',
3137 '*listen': 'str',
3138 '*connect': 'str',
3139 '*mcast': 'str',
3140 '*localaddr': 'str',
3141 '*udp': 'str' } }
3142
3143 ##
3144 # @NetdevVdeOptions
3145 #
3146 # Connect the VLAN to a vde switch running on the host.
3147 #
3148 # @sock: #optional socket path
3149 #
3150 # @port: #optional port number
3151 #
3152 # @group: #optional group owner of socket
3153 #
3154 # @mode: #optional permissions for socket
3155 #
3156 # Since 1.2
3157 ##
3158 { 'type': 'NetdevVdeOptions',
3159 'data': {
3160 '*sock': 'str',
3161 '*port': 'uint16',
3162 '*group': 'str',
3163 '*mode': 'uint16' } }
3164
3165 ##
3166 # @NetdevDumpOptions
3167 #
3168 # Dump VLAN network traffic to a file.
3169 #
3170 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3171 # suffixes.
3172 #
3173 # @file: #optional dump file path (default is qemu-vlan0.pcap)
3174 #
3175 # Since 1.2
3176 ##
3177 { 'type': 'NetdevDumpOptions',
3178 'data': {
3179 '*len': 'size',
3180 '*file': 'str' } }
3181
3182 ##
3183 # @NetdevBridgeOptions
3184 #
3185 # Connect a host TAP network interface to a host bridge device.
3186 #
3187 # @br: #optional bridge name
3188 #
3189 # @helper: #optional command to execute to configure bridge
3190 #
3191 # Since 1.2
3192 ##
3193 { 'type': 'NetdevBridgeOptions',
3194 'data': {
3195 '*br': 'str',
3196 '*helper': 'str' } }
3197
3198 ##
3199 # @NetdevHubPortOptions
3200 #
3201 # Connect two or more net clients through a software hub.
3202 #
3203 # @hubid: hub identifier number
3204 #
3205 # Since 1.2
3206 ##
3207 { 'type': 'NetdevHubPortOptions',
3208 'data': {
3209 'hubid': 'int32' } }
3210
3211 ##
3212 # @NetdevNetmapOptions
3213 #
3214 # Connect a client to a netmap-enabled NIC or to a VALE switch port
3215 #
3216 # @ifname: Either the name of an existing network interface supported by
3217 # netmap, or the name of a VALE port (created on the fly).
3218 # A VALE port name is in the form 'valeXXX:YYY', where XXX and
3219 # YYY are non-negative integers. XXX identifies a switch and
3220 # YYY identifies a port of the switch. VALE ports having the
3221 # same XXX are therefore connected to the same switch.
3222 #
3223 # @devname: #optional path of the netmap device (default: '/dev/netmap').
3224 #
3225 # Since 2.0
3226 ##
3227 { 'type': 'NetdevNetmapOptions',
3228 'data': {
3229 'ifname': 'str',
3230 '*devname': 'str' } }
3231
3232 ##
3233 # @NetClientOptions
3234 #
3235 # A discriminated record of network device traits.
3236 #
3237 # Since 1.2
3238 ##
3239 { 'union': 'NetClientOptions',
3240 'data': {
3241 'none': 'NetdevNoneOptions',
3242 'nic': 'NetLegacyNicOptions',
3243 'user': 'NetdevUserOptions',
3244 'tap': 'NetdevTapOptions',
3245 'socket': 'NetdevSocketOptions',
3246 'vde': 'NetdevVdeOptions',
3247 'dump': 'NetdevDumpOptions',
3248 'bridge': 'NetdevBridgeOptions',
3249 'hubport': 'NetdevHubPortOptions',
3250 'netmap': 'NetdevNetmapOptions' } }
3251
3252 ##
3253 # @NetLegacy
3254 #
3255 # Captures the configuration of a network device; legacy.
3256 #
3257 # @vlan: #optional vlan number
3258 #
3259 # @id: #optional identifier for monitor commands
3260 #
3261 # @name: #optional identifier for monitor commands, ignored if @id is present
3262 #
3263 # @opts: device type specific properties (legacy)
3264 #
3265 # Since 1.2
3266 ##
3267 { 'type': 'NetLegacy',
3268 'data': {
3269 '*vlan': 'int32',
3270 '*id': 'str',
3271 '*name': 'str',
3272 'opts': 'NetClientOptions' } }
3273
3274 ##
3275 # @Netdev
3276 #
3277 # Captures the configuration of a network device.
3278 #
3279 # @id: identifier for monitor commands.
3280 #
3281 # @opts: device type specific properties
3282 #
3283 # Since 1.2
3284 ##
3285 { 'type': 'Netdev',
3286 'data': {
3287 'id': 'str',
3288 'opts': 'NetClientOptions' } }
3289
3290 ##
3291 # @InetSocketAddress
3292 #
3293 # Captures a socket address or address range in the Internet namespace.
3294 #
3295 # @host: host part of the address
3296 #
3297 # @port: port part of the address, or lowest port if @to is present
3298 #
3299 # @to: highest port to try
3300 #
3301 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3302 # #optional
3303 #
3304 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3305 # #optional
3306 #
3307 # Since 1.3
3308 ##
3309 { 'type': 'InetSocketAddress',
3310 'data': {
3311 'host': 'str',
3312 'port': 'str',
3313 '*to': 'uint16',
3314 '*ipv4': 'bool',
3315 '*ipv6': 'bool' } }
3316
3317 ##
3318 # @UnixSocketAddress
3319 #
3320 # Captures a socket address in the local ("Unix socket") namespace.
3321 #
3322 # @path: filesystem path to use
3323 #
3324 # Since 1.3
3325 ##
3326 { 'type': 'UnixSocketAddress',
3327 'data': {
3328 'path': 'str' } }
3329
3330 ##
3331 # @SocketAddress
3332 #
3333 # Captures the address of a socket, which could also be a named file descriptor
3334 #
3335 # Since 1.3
3336 ##
3337 { 'union': 'SocketAddress',
3338 'data': {
3339 'inet': 'InetSocketAddress',
3340 'unix': 'UnixSocketAddress',
3341 'fd': 'String' } }
3342
3343 ##
3344 # @getfd:
3345 #
3346 # Receive a file descriptor via SCM rights and assign it a name
3347 #
3348 # @fdname: file descriptor name
3349 #
3350 # Returns: Nothing on success
3351 #
3352 # Since: 0.14.0
3353 #
3354 # Notes: If @fdname already exists, the file descriptor assigned to
3355 # it will be closed and replaced by the received file
3356 # descriptor.
3357 # The 'closefd' command can be used to explicitly close the
3358 # file descriptor when it is no longer needed.
3359 ##
3360 { 'command': 'getfd', 'data': {'fdname': 'str'} }
3361
3362 ##
3363 # @closefd:
3364 #
3365 # Close a file descriptor previously passed via SCM rights
3366 #
3367 # @fdname: file descriptor name
3368 #
3369 # Returns: Nothing on success
3370 #
3371 # Since: 0.14.0
3372 ##
3373 { 'command': 'closefd', 'data': {'fdname': 'str'} }
3374
3375 ##
3376 # @MachineInfo:
3377 #
3378 # Information describing a machine.
3379 #
3380 # @name: the name of the machine
3381 #
3382 # @alias: #optional an alias for the machine name
3383 #
3384 # @default: #optional whether the machine is default
3385 #
3386 # @cpu-max: maximum number of CPUs supported by the machine type
3387 # (since 1.5.0)
3388 #
3389 # Since: 1.2.0
3390 ##
3391 { 'type': 'MachineInfo',
3392 'data': { 'name': 'str', '*alias': 'str',
3393 '*is-default': 'bool', 'cpu-max': 'int' } }
3394
3395 ##
3396 # @query-machines:
3397 #
3398 # Return a list of supported machines
3399 #
3400 # Returns: a list of MachineInfo
3401 #
3402 # Since: 1.2.0
3403 ##
3404 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
3405
3406 ##
3407 # @CpuDefinitionInfo:
3408 #
3409 # Virtual CPU definition.
3410 #
3411 # @name: the name of the CPU definition
3412 #
3413 # Since: 1.2.0
3414 ##
3415 { 'type': 'CpuDefinitionInfo',
3416 'data': { 'name': 'str' } }
3417
3418 ##
3419 # @query-cpu-definitions:
3420 #
3421 # Return a list of supported virtual CPU definitions
3422 #
3423 # Returns: a list of CpuDefInfo
3424 #
3425 # Since: 1.2.0
3426 ##
3427 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
3428
3429 # @AddfdInfo:
3430 #
3431 # Information about a file descriptor that was added to an fd set.
3432 #
3433 # @fdset-id: The ID of the fd set that @fd was added to.
3434 #
3435 # @fd: The file descriptor that was received via SCM rights and
3436 # added to the fd set.
3437 #
3438 # Since: 1.2.0
3439 ##
3440 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3441
3442 ##
3443 # @add-fd:
3444 #
3445 # Add a file descriptor, that was passed via SCM rights, to an fd set.
3446 #
3447 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3448 #
3449 # @opaque: #optional A free-form string that can be used to describe the fd.
3450 #
3451 # Returns: @AddfdInfo on success
3452 # If file descriptor was not received, FdNotSupplied
3453 # If @fdset-id is a negative value, InvalidParameterValue
3454 #
3455 # Notes: The list of fd sets is shared by all monitor connections.
3456 #
3457 # If @fdset-id is not specified, a new fd set will be created.
3458 #
3459 # Since: 1.2.0
3460 ##
3461 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3462 'returns': 'AddfdInfo' }
3463
3464 ##
3465 # @remove-fd:
3466 #
3467 # Remove a file descriptor from an fd set.
3468 #
3469 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
3470 #
3471 # @fd: #optional The file descriptor that is to be removed.
3472 #
3473 # Returns: Nothing on success
3474 # If @fdset-id or @fd is not found, FdNotFound
3475 #
3476 # Since: 1.2.0
3477 #
3478 # Notes: The list of fd sets is shared by all monitor connections.
3479 #
3480 # If @fd is not specified, all file descriptors in @fdset-id
3481 # will be removed.
3482 ##
3483 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3484
3485 ##
3486 # @FdsetFdInfo:
3487 #
3488 # Information about a file descriptor that belongs to an fd set.
3489 #
3490 # @fd: The file descriptor value.
3491 #
3492 # @opaque: #optional A free-form string that can be used to describe the fd.
3493 #
3494 # Since: 1.2.0
3495 ##
3496 { 'type': 'FdsetFdInfo',
3497 'data': {'fd': 'int', '*opaque': 'str'} }
3498
3499 ##
3500 # @FdsetInfo:
3501 #
3502 # Information about an fd set.
3503 #
3504 # @fdset-id: The ID of the fd set.
3505 #
3506 # @fds: A list of file descriptors that belong to this fd set.
3507 #
3508 # Since: 1.2.0
3509 ##
3510 { 'type': 'FdsetInfo',
3511 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3512
3513 ##
3514 # @query-fdsets:
3515 #
3516 # Return information describing all fd sets.
3517 #
3518 # Returns: A list of @FdsetInfo
3519 #
3520 # Since: 1.2.0
3521 #
3522 # Note: The list of fd sets is shared by all monitor connections.
3523 #
3524 ##
3525 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3526
3527 ##
3528 # @TargetInfo:
3529 #
3530 # Information describing the QEMU target.
3531 #
3532 # @arch: the target architecture (eg "x86_64", "i386", etc)
3533 #
3534 # Since: 1.2.0
3535 ##
3536 { 'type': 'TargetInfo',
3537 'data': { 'arch': 'str' } }
3538
3539 ##
3540 # @query-target:
3541 #
3542 # Return information about the target for this QEMU
3543 #
3544 # Returns: TargetInfo
3545 #
3546 # Since: 1.2.0
3547 ##
3548 { 'command': 'query-target', 'returns': 'TargetInfo' }
3549
3550 ##
3551 # @QKeyCode:
3552 #
3553 # An enumeration of key name.
3554 #
3555 # This is used by the send-key command.
3556 #
3557 # Since: 1.3.0
3558 #
3559 # 'unmapped' and 'pause' since 2.0
3560 ##
3561 { 'enum': 'QKeyCode',
3562 'data': [ 'unmapped',
3563 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3564 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3565 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3566 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3567 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3568 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3569 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3570 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3571 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3572 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3573 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3574 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3575 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3576 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3577 'lf', 'help', 'meta_l', 'meta_r', 'compose', 'pause' ] }
3578
3579 ##
3580 # @KeyValue
3581 #
3582 # Represents a keyboard key.
3583 #
3584 # Since: 1.3.0
3585 ##
3586 { 'union': 'KeyValue',
3587 'data': {
3588 'number': 'int',
3589 'qcode': 'QKeyCode' } }
3590
3591 ##
3592 # @send-key:
3593 #
3594 # Send keys to guest.
3595 #
3596 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3597 # simultaneously sent to the guest. A @KeyValue.number value is sent
3598 # directly to the guest, while @KeyValue.qcode must be a valid
3599 # @QKeyCode value
3600 #
3601 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3602 # to 100
3603 #
3604 # Returns: Nothing on success
3605 # If key is unknown or redundant, InvalidParameter
3606 #
3607 # Since: 1.3.0
3608 #
3609 ##
3610 { 'command': 'send-key',
3611 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3612
3613 ##
3614 # @screendump:
3615 #
3616 # Write a PPM of the VGA screen to a file.
3617 #
3618 # @filename: the path of a new PPM file to store the image
3619 #
3620 # Returns: Nothing on success
3621 #
3622 # Since: 0.14.0
3623 ##
3624 { 'command': 'screendump', 'data': {'filename': 'str'} }
3625
3626 ##
3627 # @nbd-server-start:
3628 #
3629 # Start an NBD server listening on the given host and port. Block
3630 # devices can then be exported using @nbd-server-add. The NBD
3631 # server will present them as named exports; for example, another
3632 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3633 #
3634 # @addr: Address on which to listen.
3635 #
3636 # Returns: error if the server is already running.
3637 #
3638 # Since: 1.3.0
3639 ##
3640 { 'command': 'nbd-server-start',
3641 'data': { 'addr': 'SocketAddress' } }
3642
3643 ##
3644 # @nbd-server-add:
3645 #
3646 # Export a device to QEMU's embedded NBD server.
3647 #
3648 # @device: Block device to be exported
3649 #
3650 # @writable: Whether clients should be able to write to the device via the
3651 # NBD connection (default false). #optional
3652 #
3653 # Returns: error if the device is already marked for export.
3654 #
3655 # Since: 1.3.0
3656 ##
3657 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3658
3659 ##
3660 # @nbd-server-stop:
3661 #
3662 # Stop QEMU's embedded NBD server, and unregister all devices previously
3663 # added via @nbd-server-add.
3664 #
3665 # Since: 1.3.0
3666 ##
3667 { 'command': 'nbd-server-stop' }
3668
3669 ##
3670 # @ChardevFile:
3671 #
3672 # Configuration info for file chardevs.
3673 #
3674 # @in: #optional The name of the input file
3675 # @out: The name of the output file
3676 #
3677 # Since: 1.4
3678 ##
3679 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3680 'out' : 'str' } }
3681
3682 ##
3683 # @ChardevHostdev:
3684 #
3685 # Configuration info for device and pipe chardevs.
3686 #
3687 # @device: The name of the special file for the device,
3688 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3689 # @type: What kind of device this is.
3690 #
3691 # Since: 1.4
3692 ##
3693 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3694
3695 ##
3696 # @ChardevSocket:
3697 #
3698 # Configuration info for (stream) socket chardevs.
3699 #
3700 # @addr: socket address to listen on (server=true)
3701 # or connect to (server=false)
3702 # @server: #optional create server socket (default: true)
3703 # @wait: #optional wait for incoming connection on server
3704 # sockets (default: false).
3705 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3706 # @telnet: #optional enable telnet protocol on server
3707 # sockets (default: false)
3708 #
3709 # Since: 1.4
3710 ##
3711 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3712 '*server' : 'bool',
3713 '*wait' : 'bool',
3714 '*nodelay' : 'bool',
3715 '*telnet' : 'bool' } }
3716
3717 ##
3718 # @ChardevUdp:
3719 #
3720 # Configuration info for datagram socket chardevs.
3721 #
3722 # @remote: remote address
3723 # @local: #optional local address
3724 #
3725 # Since: 1.5
3726 ##
3727 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3728 '*local' : 'SocketAddress' } }
3729
3730 ##
3731 # @ChardevMux:
3732 #
3733 # Configuration info for mux chardevs.
3734 #
3735 # @chardev: name of the base chardev.
3736 #
3737 # Since: 1.5
3738 ##
3739 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3740
3741 ##
3742 # @ChardevStdio:
3743 #
3744 # Configuration info for stdio chardevs.
3745 #
3746 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3747 # be delivered to qemu. Default: true in -nographic mode,
3748 # false otherwise.
3749 #
3750 # Since: 1.5
3751 ##
3752 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3753
3754 ##
3755 # @ChardevSpiceChannel:
3756 #
3757 # Configuration info for spice vm channel chardevs.
3758 #
3759 # @type: kind of channel (for example vdagent).
3760 #
3761 # Since: 1.5
3762 ##
3763 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3764
3765 ##
3766 # @ChardevSpicePort:
3767 #
3768 # Configuration info for spice port chardevs.
3769 #
3770 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3771 #
3772 # Since: 1.5
3773 ##
3774 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3775
3776 ##
3777 # @ChardevVC:
3778 #
3779 # Configuration info for virtual console chardevs.
3780 #
3781 # @width: console width, in pixels
3782 # @height: console height, in pixels
3783 # @cols: console width, in chars
3784 # @rows: console height, in chars
3785 #
3786 # Since: 1.5
3787 ##
3788 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3789 '*height' : 'int',
3790 '*cols' : 'int',
3791 '*rows' : 'int' } }
3792
3793 ##
3794 # @ChardevRingbuf:
3795 #
3796 # Configuration info for ring buffer chardevs.
3797 #
3798 # @size: #optional ring buffer size, must be power of two, default is 65536
3799 #
3800 # Since: 1.5
3801 ##
3802 { 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3803
3804 ##
3805 # @ChardevBackend:
3806 #
3807 # Configuration info for the new chardev backend.
3808 #
3809 # Since: 1.4
3810 ##
3811 { 'type': 'ChardevDummy', 'data': { } }
3812
3813 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3814 'serial' : 'ChardevHostdev',
3815 'parallel': 'ChardevHostdev',
3816 'pipe' : 'ChardevHostdev',
3817 'socket' : 'ChardevSocket',
3818 'udp' : 'ChardevUdp',
3819 'pty' : 'ChardevDummy',
3820 'null' : 'ChardevDummy',
3821 'mux' : 'ChardevMux',
3822 'msmouse': 'ChardevDummy',
3823 'braille': 'ChardevDummy',
3824 'stdio' : 'ChardevStdio',
3825 'console': 'ChardevDummy',
3826 'spicevmc' : 'ChardevSpiceChannel',
3827 'spiceport' : 'ChardevSpicePort',
3828 'vc' : 'ChardevVC',
3829 'ringbuf': 'ChardevRingbuf',
3830 # next one is just for compatibility
3831 'memory' : 'ChardevRingbuf' } }
3832
3833 ##
3834 # @ChardevReturn:
3835 #
3836 # Return info about the chardev backend just created.
3837 #
3838 # @pty: #optional name of the slave pseudoterminal device, present if
3839 # and only if a chardev of type 'pty' was created
3840 #
3841 # Since: 1.4
3842 ##
3843 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3844
3845 ##
3846 # @chardev-add:
3847 #
3848 # Add a character device backend
3849 #
3850 # @id: the chardev's ID, must be unique
3851 # @backend: backend type and parameters
3852 #
3853 # Returns: ChardevReturn.
3854 #
3855 # Since: 1.4
3856 ##
3857 { 'command': 'chardev-add', 'data': {'id' : 'str',
3858 'backend' : 'ChardevBackend' },
3859 'returns': 'ChardevReturn' }
3860
3861 ##
3862 # @chardev-remove:
3863 #
3864 # Remove a character device backend
3865 #
3866 # @id: the chardev's ID, must exist and not be in use
3867 #
3868 # Returns: Nothing on success
3869 #
3870 # Since: 1.4
3871 ##
3872 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3873
3874 ##
3875 # @TpmModel:
3876 #
3877 # An enumeration of TPM models
3878 #
3879 # @tpm-tis: TPM TIS model
3880 #
3881 # Since: 1.5
3882 ##
3883 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3884
3885 ##
3886 # @query-tpm-models:
3887 #
3888 # Return a list of supported TPM models
3889 #
3890 # Returns: a list of TpmModel
3891 #
3892 # Since: 1.5
3893 ##
3894 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3895
3896 ##
3897 # @TpmType:
3898 #
3899 # An enumeration of TPM types
3900 #
3901 # @passthrough: TPM passthrough type
3902 #
3903 # Since: 1.5
3904 ##
3905 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3906
3907 ##
3908 # @query-tpm-types:
3909 #
3910 # Return a list of supported TPM types
3911 #
3912 # Returns: a list of TpmType
3913 #
3914 # Since: 1.5
3915 ##
3916 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3917
3918 ##
3919 # @TPMPassthroughOptions:
3920 #
3921 # Information about the TPM passthrough type
3922 #
3923 # @path: #optional string describing the path used for accessing the TPM device
3924 #
3925 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3926 # for cancellation of TPM commands while they are executing
3927 #
3928 # Since: 1.5
3929 ##
3930 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3931 '*cancel-path' : 'str'} }
3932
3933 ##
3934 # @TpmTypeOptions:
3935 #
3936 # A union referencing different TPM backend types' configuration options
3937 #
3938 # @passthrough: The configuration options for the TPM passthrough type
3939 #
3940 # Since: 1.5
3941 ##
3942 { 'union': 'TpmTypeOptions',
3943 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3944
3945 ##
3946 # @TpmInfo:
3947 #
3948 # Information about the TPM
3949 #
3950 # @id: The Id of the TPM
3951 #
3952 # @model: The TPM frontend model
3953 #
3954 # @options: The TPM (backend) type configuration options
3955 #
3956 # Since: 1.5
3957 ##
3958 { 'type': 'TPMInfo',
3959 'data': {'id': 'str',
3960 'model': 'TpmModel',
3961 'options': 'TpmTypeOptions' } }
3962
3963 ##
3964 # @query-tpm:
3965 #
3966 # Return information about the TPM device
3967 #
3968 # Returns: @TPMInfo on success
3969 #
3970 # Since: 1.5
3971 ##
3972 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3973
3974 ##
3975 # @AcpiTableOptions
3976 #
3977 # Specify an ACPI table on the command line to load.
3978 #
3979 # At most one of @file and @data can be specified. The list of files specified
3980 # by any one of them is loaded and concatenated in order. If both are omitted,
3981 # @data is implied.
3982 #
3983 # Other fields / optargs can be used to override fields of the generic ACPI
3984 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3985 # Description Table Header. If a header field is not overridden, then the
3986 # corresponding value from the concatenated blob is used (in case of @file), or
3987 # it is filled in with a hard-coded value (in case of @data).
3988 #
3989 # String fields are copied into the matching ACPI member from lowest address
3990 # upwards, and silently truncated / NUL-padded to length.
3991 #
3992 # @sig: #optional table signature / identifier (4 bytes)
3993 #
3994 # @rev: #optional table revision number (dependent on signature, 1 byte)
3995 #
3996 # @oem_id: #optional OEM identifier (6 bytes)
3997 #
3998 # @oem_table_id: #optional OEM table identifier (8 bytes)
3999 #
4000 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
4001 #
4002 # @asl_compiler_id: #optional identifier of the utility that created the table
4003 # (4 bytes)
4004 #
4005 # @asl_compiler_rev: #optional revision number of the utility that created the
4006 # table (4 bytes)
4007 #
4008 # @file: #optional colon (:) separated list of pathnames to load and
4009 # concatenate as table data. The resultant binary blob is expected to
4010 # have an ACPI table header. At least one file is required. This field
4011 # excludes @data.
4012 #
4013 # @data: #optional colon (:) separated list of pathnames to load and
4014 # concatenate as table data. The resultant binary blob must not have an
4015 # ACPI table header. At least one file is required. This field excludes
4016 # @file.
4017 #
4018 # Since 1.5
4019 ##
4020 { 'type': 'AcpiTableOptions',
4021 'data': {
4022 '*sig': 'str',
4023 '*rev': 'uint8',
4024 '*oem_id': 'str',
4025 '*oem_table_id': 'str',
4026 '*oem_rev': 'uint32',
4027 '*asl_compiler_id': 'str',
4028 '*asl_compiler_rev': 'uint32',
4029 '*file': 'str',
4030 '*data': 'str' }}
4031
4032 ##
4033 # @CommandLineParameterType:
4034 #
4035 # Possible types for an option parameter.
4036 #
4037 # @string: accepts a character string
4038 #
4039 # @boolean: accepts "on" or "off"
4040 #
4041 # @number: accepts a number
4042 #
4043 # @size: accepts a number followed by an optional suffix (K)ilo,
4044 # (M)ega, (G)iga, (T)era
4045 #
4046 # Since 1.5
4047 ##
4048 { 'enum': 'CommandLineParameterType',
4049 'data': ['string', 'boolean', 'number', 'size'] }
4050
4051 ##
4052 # @CommandLineParameterInfo:
4053 #
4054 # Details about a single parameter of a command line option.
4055 #
4056 # @name: parameter name
4057 #
4058 # @type: parameter @CommandLineParameterType
4059 #
4060 # @help: #optional human readable text string, not suitable for parsing.
4061 #
4062 # Since 1.5
4063 ##
4064 { 'type': 'CommandLineParameterInfo',
4065 'data': { 'name': 'str',
4066 'type': 'CommandLineParameterType',
4067 '*help': 'str' } }
4068
4069 ##
4070 # @CommandLineOptionInfo:
4071 #
4072 # Details about a command line option, including its list of parameter details
4073 #
4074 # @option: option name
4075 #
4076 # @parameters: an array of @CommandLineParameterInfo
4077 #
4078 # Since 1.5
4079 ##
4080 { 'type': 'CommandLineOptionInfo',
4081 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
4082
4083 ##
4084 # @query-command-line-options:
4085 #
4086 # Query command line option schema.
4087 #
4088 # @option: #optional option name
4089 #
4090 # Returns: list of @CommandLineOptionInfo for all options (or for the given
4091 # @option). Returns an error if the given @option doesn't exist.
4092 #
4093 # Since 1.5
4094 ##
4095 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
4096 'returns': ['CommandLineOptionInfo'] }
4097
4098 ##
4099 # @X86CPURegister32
4100 #
4101 # A X86 32-bit register
4102 #
4103 # Since: 1.5
4104 ##
4105 { 'enum': 'X86CPURegister32',
4106 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
4107
4108 ##
4109 # @X86CPUFeatureWordInfo
4110 #
4111 # Information about a X86 CPU feature word
4112 #
4113 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
4114 #
4115 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
4116 # feature word
4117 #
4118 # @cpuid-register: Output register containing the feature bits
4119 #
4120 # @features: value of output register, containing the feature bits
4121 #
4122 # Since: 1.5
4123 ##
4124 { 'type': 'X86CPUFeatureWordInfo',
4125 'data': { 'cpuid-input-eax': 'int',
4126 '*cpuid-input-ecx': 'int',
4127 'cpuid-register': 'X86CPURegister32',
4128 'features': 'int' } }
4129
4130 ##
4131 # @RxState:
4132 #
4133 # Packets receiving state
4134 #
4135 # @normal: filter assigned packets according to the mac-table
4136 #
4137 # @none: don't receive any assigned packet
4138 #
4139 # @all: receive all assigned packets
4140 #
4141 # Since: 1.6
4142 ##
4143 { 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
4144
4145 ##
4146 # @RxFilterInfo:
4147 #
4148 # Rx-filter information for a NIC.
4149 #
4150 # @name: net client name
4151 #
4152 # @promiscuous: whether promiscuous mode is enabled
4153 #
4154 # @multicast: multicast receive state
4155 #
4156 # @unicast: unicast receive state
4157 #
4158 # @broadcast-allowed: whether to receive broadcast
4159 #
4160 # @multicast-overflow: multicast table is overflowed or not
4161 #
4162 # @unicast-overflow: unicast table is overflowed or not
4163 #
4164 # @main-mac: the main macaddr string
4165 #
4166 # @vlan-table: a list of active vlan id
4167 #
4168 # @unicast-table: a list of unicast macaddr string
4169 #
4170 # @multicast-table: a list of multicast macaddr string
4171 #
4172 # Since 1.6
4173 ##
4174
4175 { 'type': 'RxFilterInfo',
4176 'data': {
4177 'name': 'str',
4178 'promiscuous': 'bool',
4179 'multicast': 'RxState',
4180 'unicast': 'RxState',
4181 'broadcast-allowed': 'bool',
4182 'multicast-overflow': 'bool',
4183 'unicast-overflow': 'bool',
4184 'main-mac': 'str',
4185 'vlan-table': ['int'],
4186 'unicast-table': ['str'],
4187 'multicast-table': ['str'] }}
4188
4189 ##
4190 # @query-rx-filter:
4191 #
4192 # Return rx-filter information for all NICs (or for the given NIC).
4193 #
4194 # @name: #optional net client name
4195 #
4196 # Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4197 # Returns an error if the given @name doesn't exist, or given
4198 # NIC doesn't support rx-filter querying, or given net client
4199 # isn't a NIC.
4200 #
4201 # Since: 1.6
4202 ##
4203 { 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4204 'returns': ['RxFilterInfo'] }
4205
4206
4207 ##
4208 # @BlockdevDiscardOptions
4209 #
4210 # Determines how to handle discard requests.
4211 #
4212 # @ignore: Ignore the request
4213 # @unmap: Forward as an unmap request
4214 #
4215 # Since: 1.7
4216 ##
4217 { 'enum': 'BlockdevDiscardOptions',
4218 'data': [ 'ignore', 'unmap' ] }
4219
4220 ##
4221 # @BlockdevAioOptions
4222 #
4223 # Selects the AIO backend to handle I/O requests
4224 #
4225 # @threads: Use qemu's thread pool
4226 # @native: Use native AIO backend (only Linux and Windows)
4227 #
4228 # Since: 1.7
4229 ##
4230 { 'enum': 'BlockdevAioOptions',
4231 'data': [ 'threads', 'native' ] }
4232
4233 ##
4234 # @BlockdevCacheOptions
4235 #
4236 # Includes cache-related options for block devices
4237 #
4238 # @writeback: #optional enables writeback mode for any caches (default: true)
4239 # @direct: #optional enables use of O_DIRECT (bypass the host page cache;
4240 # default: false)
4241 # @no-flush: #optional ignore any flush requests for the device (default:
4242 # false)
4243 #
4244 # Since: 1.7
4245 ##
4246 { 'type': 'BlockdevCacheOptions',
4247 'data': { '*writeback': 'bool',
4248 '*direct': 'bool',
4249 '*no-flush': 'bool' } }
4250
4251 ##
4252 # @BlockdevDriver
4253 #
4254 # Drivers that are supported in block device operations.
4255 #
4256 # Since: 2.0
4257 ##
4258 { 'enum': 'BlockdevDriver',
4259 'data': [ 'file', 'http', 'https', 'ftp', 'ftps', 'tftp', 'vvfat', 'blkdebug',
4260 'blkverify', 'bochs', 'cloop', 'cow', 'dmg', 'parallels', 'qcow',
4261 'qcow2', 'qed', 'raw', 'vdi', 'vhdx', 'vmdk', 'vpc', 'quorum' ] }
4262
4263 ##
4264 # @BlockdevOptionsBase
4265 #
4266 # Options that are available for all block devices, independent of the block
4267 # driver.
4268 #
4269 # @driver: block driver name
4270 # @id: #optional id by which the new block device can be referred to.
4271 # This is a required option on the top level of blockdev-add, and
4272 # currently not allowed on any other level.
4273 # @node-name: #optional the name of a block driver state node (Since 2.0)
4274 # @discard: #optional discard-related options (default: ignore)
4275 # @cache: #optional cache-related options
4276 # @aio: #optional AIO backend (default: threads)
4277 # @rerror: #optional how to handle read errors on the device
4278 # (default: report)
4279 # @werror: #optional how to handle write errors on the device
4280 # (default: enospc)
4281 # @read-only: #optional whether the block device should be read-only
4282 # (default: false)
4283 #
4284 # Since: 1.7
4285 ##
4286 { 'type': 'BlockdevOptionsBase',
4287 'data': { 'driver': 'BlockdevDriver',
4288 '*id': 'str',
4289 '*node-name': 'str',
4290 '*discard': 'BlockdevDiscardOptions',
4291 '*cache': 'BlockdevCacheOptions',
4292 '*aio': 'BlockdevAioOptions',
4293 '*rerror': 'BlockdevOnError',
4294 '*werror': 'BlockdevOnError',
4295 '*read-only': 'bool' } }
4296
4297 ##
4298 # @BlockdevOptionsFile
4299 #
4300 # Driver specific block device options for the file backend and similar
4301 # protocols.
4302 #
4303 # @filename: path to the image file
4304 #
4305 # Since: 1.7
4306 ##
4307 { 'type': 'BlockdevOptionsFile',
4308 'data': { 'filename': 'str' } }
4309
4310 ##
4311 # @BlockdevOptionsVVFAT
4312 #
4313 # Driver specific block device options for the vvfat protocol.
4314 #
4315 # @dir: directory to be exported as FAT image
4316 # @fat-type: #optional FAT type: 12, 16 or 32
4317 # @floppy: #optional whether to export a floppy image (true) or
4318 # partitioned hard disk (false; default)
4319 # @rw: #optional whether to allow write operations (default: false)
4320 #
4321 # Since: 1.7
4322 ##
4323 { 'type': 'BlockdevOptionsVVFAT',
4324 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
4325 '*rw': 'bool' } }
4326
4327 ##
4328 # @BlockdevOptionsGenericFormat
4329 #
4330 # Driver specific block device options for image format that have no option
4331 # besides their data source.
4332 #
4333 # @file: reference to or definition of the data source block device
4334 #
4335 # Since: 1.7
4336 ##
4337 { 'type': 'BlockdevOptionsGenericFormat',
4338 'data': { 'file': 'BlockdevRef' } }
4339
4340 ##
4341 # @BlockdevOptionsGenericCOWFormat
4342 #
4343 # Driver specific block device options for image format that have no option
4344 # besides their data source and an optional backing file.
4345 #
4346 # @backing: #optional reference to or definition of the backing file block
4347 # device (if missing, taken from the image file content). It is
4348 # allowed to pass an empty string here in order to disable the
4349 # default backing file.
4350 #
4351 # Since: 1.7
4352 ##
4353 { 'type': 'BlockdevOptionsGenericCOWFormat',
4354 'base': 'BlockdevOptionsGenericFormat',
4355 'data': { '*backing': 'BlockdevRef' } }
4356
4357 ##
4358 # @BlockdevOptionsQcow2
4359 #
4360 # Driver specific block device options for qcow2.
4361 #
4362 # @lazy-refcounts: #optional whether to enable the lazy refcounts
4363 # feature (default is taken from the image file)
4364 #
4365 # @pass-discard-request: #optional whether discard requests to the qcow2
4366 # device should be forwarded to the data source
4367 #
4368 # @pass-discard-snapshot: #optional whether discard requests for the data source
4369 # should be issued when a snapshot operation (e.g.
4370 # deleting a snapshot) frees clusters in the qcow2 file
4371 #
4372 # @pass-discard-other: #optional whether discard requests for the data source
4373 # should be issued on other occasions where a cluster
4374 # gets freed
4375 #
4376 # Since: 1.7
4377 ##
4378 { 'type': 'BlockdevOptionsQcow2',
4379 'base': 'BlockdevOptionsGenericCOWFormat',
4380 'data': { '*lazy-refcounts': 'bool',
4381 '*pass-discard-request': 'bool',
4382 '*pass-discard-snapshot': 'bool',
4383 '*pass-discard-other': 'bool' } }
4384
4385 ##
4386 # @BlkdebugEvent
4387 #
4388 # Trigger events supported by blkdebug.
4389 ##
4390 { 'enum': 'BlkdebugEvent',
4391 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
4392 'l1_grow.activate_table', 'l2_load', 'l2_update',
4393 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
4394 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
4395 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
4396 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
4397 'refblock_load', 'refblock_update', 'refblock_update_part',
4398 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
4399 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
4400 'refblock_alloc.switch_table', 'cluster_alloc',
4401 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
4402 'flush_to_disk' ] }
4403
4404 ##
4405 # @BlkdebugInjectErrorOptions
4406 #
4407 # Describes a single error injection for blkdebug.
4408 #
4409 # @event: trigger event
4410 #
4411 # @state: #optional the state identifier blkdebug needs to be in to
4412 # actually trigger the event; defaults to "any"
4413 #
4414 # @errno: #optional error identifier (errno) to be returned; defaults to
4415 # EIO
4416 #
4417 # @sector: #optional specifies the sector index which has to be affected
4418 # in order to actually trigger the event; defaults to "any
4419 # sector"
4420 #
4421 # @once: #optional disables further events after this one has been
4422 # triggered; defaults to false
4423 #
4424 # @immediately: #optional fail immediately; defaults to false
4425 #
4426 # Since: 2.0
4427 ##
4428 { 'type': 'BlkdebugInjectErrorOptions',
4429 'data': { 'event': 'BlkdebugEvent',
4430 '*state': 'int',
4431 '*errno': 'int',
4432 '*sector': 'int',
4433 '*once': 'bool',
4434 '*immediately': 'bool' } }
4435
4436 ##
4437 # @BlkdebugSetStateOptions
4438 #
4439 # Describes a single state-change event for blkdebug.
4440 #
4441 # @event: trigger event
4442 #
4443 # @state: #optional the current state identifier blkdebug needs to be in;
4444 # defaults to "any"
4445 #
4446 # @new_state: the state identifier blkdebug is supposed to assume if
4447 # this event is triggered
4448 #
4449 # Since: 2.0
4450 ##
4451 { 'type': 'BlkdebugSetStateOptions',
4452 'data': { 'event': 'BlkdebugEvent',
4453 '*state': 'int',
4454 'new_state': 'int' } }
4455
4456 ##
4457 # @BlockdevOptionsBlkdebug
4458 #
4459 # Driver specific block device options for blkdebug.
4460 #
4461 # @image: underlying raw block device (or image file)
4462 #
4463 # @config: #optional filename of the configuration file
4464 #
4465 # @align: #optional required alignment for requests in bytes
4466 #
4467 # @inject-error: #optional array of error injection descriptions
4468 #
4469 # @set-state: #optional array of state-change descriptions
4470 #
4471 # Since: 2.0
4472 ##
4473 { 'type': 'BlockdevOptionsBlkdebug',
4474 'data': { 'image': 'BlockdevRef',
4475 '*config': 'str',
4476 '*align': 'int',
4477 '*inject-error': ['BlkdebugInjectErrorOptions'],
4478 '*set-state': ['BlkdebugSetStateOptions'] } }
4479
4480 ##
4481 # @BlockdevOptionsBlkverify
4482 #
4483 # Driver specific block device options for blkverify.
4484 #
4485 # @test: block device to be tested
4486 #
4487 # @raw: raw image used for verification
4488 #
4489 # Since: 2.0
4490 ##
4491 { 'type': 'BlockdevOptionsBlkverify',
4492 'data': { 'test': 'BlockdevRef',
4493 'raw': 'BlockdevRef' } }
4494
4495 ##
4496 # @BlockdevOptionsQuorum
4497 #
4498 # Driver specific block device options for Quorum
4499 #
4500 # @blkverify: #optional true if the driver must print content mismatch
4501 # set to false by default
4502 #
4503 # @children: the children block devices to use
4504 #
4505 # @vote-threshold: the vote limit under which a read will fail
4506 #
4507 # Since: 2.0
4508 ##
4509 { 'type': 'BlockdevOptionsQuorum',
4510 'data': { '*blkverify': 'bool',
4511 'children': [ 'BlockdevRef' ],
4512 'vote-threshold': 'int' } }
4513
4514 ##
4515 # @BlockdevOptions
4516 #
4517 # Options for creating a block device.
4518 #
4519 # Since: 1.7
4520 ##
4521 { 'union': 'BlockdevOptions',
4522 'base': 'BlockdevOptionsBase',
4523 'discriminator': 'driver',
4524 'data': {
4525 'file': 'BlockdevOptionsFile',
4526 'http': 'BlockdevOptionsFile',
4527 'https': 'BlockdevOptionsFile',
4528 'ftp': 'BlockdevOptionsFile',
4529 'ftps': 'BlockdevOptionsFile',
4530 'tftp': 'BlockdevOptionsFile',
4531 # TODO gluster: Wait for structured options
4532 # TODO iscsi: Wait for structured options
4533 # TODO nbd: Should take InetSocketAddress for 'host'?
4534 # TODO nfs: Wait for structured options
4535 # TODO rbd: Wait for structured options
4536 # TODO sheepdog: Wait for structured options
4537 # TODO ssh: Should take InetSocketAddress for 'host'?
4538 'vvfat': 'BlockdevOptionsVVFAT',
4539 'blkdebug': 'BlockdevOptionsBlkdebug',
4540 'blkverify': 'BlockdevOptionsBlkverify',
4541 'bochs': 'BlockdevOptionsGenericFormat',
4542 'cloop': 'BlockdevOptionsGenericFormat',
4543 'cow': 'BlockdevOptionsGenericCOWFormat',
4544 'dmg': 'BlockdevOptionsGenericFormat',
4545 'parallels': 'BlockdevOptionsGenericFormat',
4546 'qcow': 'BlockdevOptionsGenericCOWFormat',
4547 'qcow2': 'BlockdevOptionsQcow2',
4548 'qed': 'BlockdevOptionsGenericCOWFormat',
4549 'raw': 'BlockdevOptionsGenericFormat',
4550 'vdi': 'BlockdevOptionsGenericFormat',
4551 'vhdx': 'BlockdevOptionsGenericFormat',
4552 'vmdk': 'BlockdevOptionsGenericCOWFormat',
4553 'vpc': 'BlockdevOptionsGenericFormat',
4554 'quorum': 'BlockdevOptionsQuorum'
4555 } }
4556
4557 ##
4558 # @BlockdevRef
4559 #
4560 # Reference to a block device.
4561 #
4562 # @definition: defines a new block device inline
4563 # @reference: references the ID of an existing block device. An
4564 # empty string means that no block device should be
4565 # referenced.
4566 #
4567 # Since: 1.7
4568 ##
4569 { 'union': 'BlockdevRef',
4570 'discriminator': {},
4571 'data': { 'definition': 'BlockdevOptions',
4572 'reference': 'str' } }
4573
4574 ##
4575 # @blockdev-add:
4576 #
4577 # Creates a new block device.
4578 #
4579 # @options: block device options for the new device
4580 #
4581 # Since: 1.7
4582 ##
4583 { 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }
4584
4585 ##
4586 # @InputButton
4587 #
4588 # Button of a pointer input device (mouse, tablet).
4589 #
4590 # Since: 2.0
4591 ##
4592 { 'enum' : 'InputButton',
4593 'data' : [ 'Left', 'Middle', 'Right', 'WheelUp', 'WheelDown' ] }
4594
4595 ##
4596 # @InputButton
4597 #
4598 # Position axis of a pointer input device (mouse, tablet).
4599 #
4600 # Since: 2.0
4601 ##
4602 { 'enum' : 'InputAxis',
4603 'data' : [ 'X', 'Y' ] }
4604
4605 ##
4606 # @InputKeyEvent
4607 #
4608 # Keyboard input event.
4609 #
4610 # @key: Which key this event is for.
4611 # @down: True for key-down and false for key-up events.
4612 #
4613 # Since: 2.0
4614 ##
4615 { 'type' : 'InputKeyEvent',
4616 'data' : { 'key' : 'KeyValue',
4617 'down' : 'bool' } }
4618
4619 ##
4620 # @InputBtnEvent
4621 #
4622 # Pointer button input event.
4623 #
4624 # @button: Which button this event is for.
4625 # @down: True for key-down and false for key-up events.
4626 #
4627 # Since: 2.0
4628 ##
4629 { 'type' : 'InputBtnEvent',
4630 'data' : { 'button' : 'InputButton',
4631 'down' : 'bool' } }
4632
4633 ##
4634 # @InputMoveEvent
4635 #
4636 # Pointer motion input event.
4637 #
4638 # @axis: Which axis is referenced by @value.
4639 # @value: Pointer position. For absolute coordinates the
4640 # valid range is 0 -> 0x7ffff
4641 #
4642 # Since: 2.0
4643 ##
4644 { 'type' : 'InputMoveEvent',
4645 'data' : { 'axis' : 'InputAxis',
4646 'value' : 'int' } }
4647
4648 ##
4649 # @InputEvent
4650 #
4651 # Input event union.
4652 #
4653 # Since: 2.0
4654 ##
4655 { 'union' : 'InputEvent',
4656 'data' : { 'key' : 'InputKeyEvent',
4657 'btn' : 'InputBtnEvent',
4658 'rel' : 'InputMoveEvent',
4659 'abs' : 'InputMoveEvent' } }