]> git.proxmox.com Git - qemu.git/blob - qapi-schema.json
rdma: export throughput w/ MigrationStats QMP
[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 # @add_client
33 #
34 # Allow client connections for VNC, Spice and socket based
35 # character devices to be passed in to QEMU via SCM_RIGHTS.
36 #
37 # @protocol: protocol name. Valid names are "vnc", "spice" or the
38 # name of a character device (eg. from -chardev id=XXXX)
39 #
40 # @fdname: file descriptor name previously passed via 'getfd' command
41 #
42 # @skipauth: #optional whether to skip authentication. Only applies
43 # to "vnc" and "spice" protocols
44 #
45 # @tls: #optional whether to perform TLS. Only applies to the "spice"
46 # protocol
47 #
48 # Returns: nothing on success.
49 #
50 # Since: 0.14.0
51 ##
52 { 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54 '*tls': 'bool' } }
55
56 ##
57 # @NameInfo:
58 #
59 # Guest name information.
60 #
61 # @name: #optional The name of the guest
62 #
63 # Since 0.14.0
64 ##
65 { 'type': 'NameInfo', 'data': {'*name': 'str'} }
66
67 ##
68 # @query-name:
69 #
70 # Return the name information of a guest.
71 #
72 # Returns: @NameInfo of the guest
73 #
74 # Since 0.14.0
75 ##
76 { 'command': 'query-name', 'returns': 'NameInfo' }
77
78 ##
79 # @VersionInfo:
80 #
81 # A description of QEMU's version.
82 #
83 # @qemu.major: The major version of QEMU
84 #
85 # @qemu.minor: The minor version of QEMU
86 #
87 # @qemu.micro: The micro version of QEMU. By current convention, a micro
88 # version of 50 signifies a development branch. A micro version
89 # greater than or equal to 90 signifies a release candidate for
90 # the next minor version. A micro version of less than 50
91 # signifies a stable release.
92 #
93 # @package: QEMU will always set this field to an empty string. Downstream
94 # versions of QEMU should set this to a non-empty string. The
95 # exact format depends on the downstream however it highly
96 # recommended that a unique name is used.
97 #
98 # Since: 0.14.0
99 ##
100 { 'type': 'VersionInfo',
101 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102 'package': 'str'} }
103
104 ##
105 # @query-version:
106 #
107 # Returns the current version of QEMU.
108 #
109 # Returns: A @VersionInfo object describing the current version of QEMU.
110 #
111 # Since: 0.14.0
112 ##
113 { 'command': 'query-version', 'returns': 'VersionInfo' }
114
115 ##
116 # @KvmInfo:
117 #
118 # Information about support for KVM acceleration
119 #
120 # @enabled: true if KVM acceleration is active
121 #
122 # @present: true if KVM acceleration is built into this executable
123 #
124 # Since: 0.14.0
125 ##
126 { 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
127
128 ##
129 # @query-kvm:
130 #
131 # Returns information about KVM acceleration
132 #
133 # Returns: @KvmInfo
134 #
135 # Since: 0.14.0
136 ##
137 { 'command': 'query-kvm', 'returns': 'KvmInfo' }
138
139 ##
140 # @RunState
141 #
142 # An enumeration of VM run states.
143 #
144 # @debug: QEMU is running on a debugger
145 #
146 # @finish-migrate: guest is paused to finish the migration process
147 #
148 # @inmigrate: guest is paused waiting for an incoming migration. Note
149 # that this state does not tell whether the machine will start at the
150 # end of the migration. This depends on the command-line -S option and
151 # any invocation of 'stop' or 'cont' that has happened since QEMU was
152 # started.
153 #
154 # @internal-error: An internal error that prevents further guest execution
155 # has occurred
156 #
157 # @io-error: the last IOP has failed and the device is configured to pause
158 # on I/O errors
159 #
160 # @paused: guest has been paused via the 'stop' command
161 #
162 # @postmigrate: guest is paused following a successful 'migrate'
163 #
164 # @prelaunch: QEMU was started with -S and guest has not started
165 #
166 # @restore-vm: guest is paused to restore VM state
167 #
168 # @running: guest is actively running
169 #
170 # @save-vm: guest is paused to save the VM state
171 #
172 # @shutdown: guest is shut down (and -no-shutdown is in use)
173 #
174 # @suspended: guest is suspended (ACPI S3)
175 #
176 # @watchdog: the watchdog action is configured to pause and has been triggered
177 #
178 # @guest-panicked: guest has been panicked as a result of guest OS panic
179 ##
180 { 'enum': 'RunState',
181 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
183 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184 'guest-panicked' ] }
185
186 ##
187 # @SnapshotInfo
188 #
189 # @id: unique snapshot id
190 #
191 # @name: user chosen name
192 #
193 # @vm-state-size: size of the VM state
194 #
195 # @date-sec: UTC date of the snapshot in seconds
196 #
197 # @date-nsec: fractional part in nano seconds to be used with date-sec
198 #
199 # @vm-clock-sec: VM clock relative to boot in seconds
200 #
201 # @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
202 #
203 # Since: 1.3
204 #
205 ##
206
207 { 'type': 'SnapshotInfo',
208 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209 'date-sec': 'int', 'date-nsec': 'int',
210 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
211
212 ##
213 # @ImageInfo:
214 #
215 # Information about a QEMU image file
216 #
217 # @filename: name of the image file
218 #
219 # @format: format of the image file
220 #
221 # @virtual-size: maximum capacity in bytes of the image
222 #
223 # @actual-size: #optional actual size on disk in bytes of the image
224 #
225 # @dirty-flag: #optional true if image is not cleanly closed
226 #
227 # @cluster-size: #optional size of a cluster in bytes
228 #
229 # @encrypted: #optional true if the image is encrypted
230 #
231 # @backing-filename: #optional name of the backing file
232 #
233 # @full-backing-filename: #optional full path of the backing file
234 #
235 # @backing-filename-format: #optional the format of the backing file
236 #
237 # @snapshots: #optional list of VM snapshots
238 #
239 # @backing-image: #optional info of the backing image (since 1.6)
240 #
241 # Since: 1.3
242 #
243 ##
244
245 { 'type': 'ImageInfo',
246 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
247 '*actual-size': 'int', 'virtual-size': 'int',
248 '*cluster-size': 'int', '*encrypted': 'bool',
249 '*backing-filename': 'str', '*full-backing-filename': 'str',
250 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
251 '*backing-image': 'ImageInfo' } }
252
253 ##
254 # @ImageCheck:
255 #
256 # Information about a QEMU image file check
257 #
258 # @filename: name of the image file checked
259 #
260 # @format: format of the image file checked
261 #
262 # @check-errors: number of unexpected errors occurred during check
263 #
264 # @image-end-offset: #optional offset (in bytes) where the image ends, this
265 # field is present if the driver for the image format
266 # supports it
267 #
268 # @corruptions: #optional number of corruptions found during the check if any
269 #
270 # @leaks: #optional number of leaks found during the check if any
271 #
272 # @corruptions-fixed: #optional number of corruptions fixed during the check
273 # if any
274 #
275 # @leaks-fixed: #optional number of leaks fixed during the check if any
276 #
277 # @total-clusters: #optional total number of clusters, this field is present
278 # if the driver for the image format supports it
279 #
280 # @allocated-clusters: #optional total number of allocated clusters, this
281 # field is present if the driver for the image format
282 # supports it
283 #
284 # @fragmented-clusters: #optional total number of fragmented clusters, this
285 # field is present if the driver for the image format
286 # supports it
287 #
288 # @compressed-clusters: #optional total number of compressed clusters, this
289 # field is present if the driver for the image format
290 # supports it
291 #
292 # Since: 1.4
293 #
294 ##
295
296 { 'type': 'ImageCheck',
297 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
298 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
299 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
300 '*total-clusters': 'int', '*allocated-clusters': 'int',
301 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
302
303 ##
304 # @StatusInfo:
305 #
306 # Information about VCPU run state
307 #
308 # @running: true if all VCPUs are runnable, false if not runnable
309 #
310 # @singlestep: true if VCPUs are in single-step mode
311 #
312 # @status: the virtual machine @RunState
313 #
314 # Since: 0.14.0
315 #
316 # Notes: @singlestep is enabled through the GDB stub
317 ##
318 { 'type': 'StatusInfo',
319 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
320
321 ##
322 # @query-status:
323 #
324 # Query the run status of all VCPUs
325 #
326 # Returns: @StatusInfo reflecting all VCPUs
327 #
328 # Since: 0.14.0
329 ##
330 { 'command': 'query-status', 'returns': 'StatusInfo' }
331
332 ##
333 # @UuidInfo:
334 #
335 # Guest UUID information.
336 #
337 # @UUID: the UUID of the guest
338 #
339 # Since: 0.14.0
340 #
341 # Notes: If no UUID was specified for the guest, a null UUID is returned.
342 ##
343 { 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
344
345 ##
346 # @query-uuid:
347 #
348 # Query the guest UUID information.
349 #
350 # Returns: The @UuidInfo for the guest
351 #
352 # Since 0.14.0
353 ##
354 { 'command': 'query-uuid', 'returns': 'UuidInfo' }
355
356 ##
357 # @ChardevInfo:
358 #
359 # Information about a character device.
360 #
361 # @label: the label of the character device
362 #
363 # @filename: the filename of the character device
364 #
365 # Notes: @filename is encoded using the QEMU command line character device
366 # encoding. See the QEMU man page for details.
367 #
368 # Since: 0.14.0
369 ##
370 { 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
371
372 ##
373 # @query-chardev:
374 #
375 # Returns information about current character devices.
376 #
377 # Returns: a list of @ChardevInfo
378 #
379 # Since: 0.14.0
380 ##
381 { 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
382
383 ##
384 # @DataFormat:
385 #
386 # An enumeration of data format.
387 #
388 # @utf8: Data is a UTF-8 string (RFC 3629)
389 #
390 # @base64: Data is Base64 encoded binary (RFC 3548)
391 #
392 # Since: 1.4
393 ##
394 { 'enum': 'DataFormat',
395 'data': [ 'utf8', 'base64' ] }
396
397 ##
398 # @ringbuf-write:
399 #
400 # Write to a ring buffer character device.
401 #
402 # @device: the ring buffer character device name
403 #
404 # @data: data to write
405 #
406 # @format: #optional data encoding (default 'utf8').
407 # - base64: data must be base64 encoded text. Its binary
408 # decoding gets written.
409 # Bug: invalid base64 is currently not rejected.
410 # Whitespace *is* invalid.
411 # - utf8: data's UTF-8 encoding is written
412 # - data itself is always Unicode regardless of format, like
413 # any other string.
414 #
415 # Returns: Nothing on success
416 #
417 # Since: 1.4
418 ##
419 { 'command': 'ringbuf-write',
420 'data': {'device': 'str', 'data': 'str',
421 '*format': 'DataFormat'} }
422
423 ##
424 # @ringbuf-read:
425 #
426 # Read from a ring buffer character device.
427 #
428 # @device: the ring buffer character device name
429 #
430 # @size: how many bytes to read at most
431 #
432 # @format: #optional data encoding (default 'utf8').
433 # - base64: the data read is returned in base64 encoding.
434 # - utf8: the data read is interpreted as UTF-8.
435 # Bug: can screw up when the buffer contains invalid UTF-8
436 # sequences, NUL characters, after the ring buffer lost
437 # data, and when reading stops because the size limit is
438 # reached.
439 # - The return value is always Unicode regardless of format,
440 # like any other string.
441 #
442 # Returns: data read from the device
443 #
444 # Since: 1.4
445 ##
446 { 'command': 'ringbuf-read',
447 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
448 'returns': 'str' }
449
450 ##
451 # @CommandInfo:
452 #
453 # Information about a QMP command
454 #
455 # @name: The command name
456 #
457 # Since: 0.14.0
458 ##
459 { 'type': 'CommandInfo', 'data': {'name': 'str'} }
460
461 ##
462 # @query-commands:
463 #
464 # Return a list of supported QMP commands by this server
465 #
466 # Returns: A list of @CommandInfo for all supported commands
467 #
468 # Since: 0.14.0
469 ##
470 { 'command': 'query-commands', 'returns': ['CommandInfo'] }
471
472 ##
473 # @EventInfo:
474 #
475 # Information about a QMP event
476 #
477 # @name: The event name
478 #
479 # Since: 1.2.0
480 ##
481 { 'type': 'EventInfo', 'data': {'name': 'str'} }
482
483 ##
484 # @query-events:
485 #
486 # Return a list of supported QMP events by this server
487 #
488 # Returns: A list of @EventInfo for all supported events
489 #
490 # Since: 1.2.0
491 ##
492 { 'command': 'query-events', 'returns': ['EventInfo'] }
493
494 ##
495 # @MigrationStats
496 #
497 # Detailed migration status.
498 #
499 # @transferred: amount of bytes already transferred to the target VM
500 #
501 # @remaining: amount of bytes remaining to be transferred to the target VM
502 #
503 # @total: total amount of bytes involved in the migration process
504 #
505 # @duplicate: number of duplicate (zero) pages (since 1.2)
506 #
507 # @skipped: number of skipped zero pages (since 1.5)
508 #
509 # @normal : number of normal pages (since 1.2)
510 #
511 # @normal-bytes: number of normal bytes sent (since 1.2)
512 #
513 # @dirty-pages-rate: number of pages dirtied by second by the
514 # guest (since 1.3)
515 #
516 # @mbps: throughput in megabits/sec. (since 1.6)
517 #
518 # Since: 0.14.0
519 ##
520 { 'type': 'MigrationStats',
521 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
522 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
523 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
524 'mbps' : 'number' } }
525
526 ##
527 # @XBZRLECacheStats
528 #
529 # Detailed XBZRLE migration cache statistics
530 #
531 # @cache-size: XBZRLE cache size
532 #
533 # @bytes: amount of bytes already transferred to the target VM
534 #
535 # @pages: amount of pages transferred to the target VM
536 #
537 # @cache-miss: number of cache miss
538 #
539 # @overflow: number of overflows
540 #
541 # Since: 1.2
542 ##
543 { 'type': 'XBZRLECacheStats',
544 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
545 'cache-miss': 'int', 'overflow': 'int' } }
546
547 ##
548 # @MigrationInfo
549 #
550 # Information about current migration process.
551 #
552 # @status: #optional string describing the current migration status.
553 # As of 0.14.0 this can be 'active', 'completed', 'failed' or
554 # 'cancelled'. If this field is not returned, no migration process
555 # has been initiated
556 #
557 # @ram: #optional @MigrationStats containing detailed migration
558 # status, only returned if status is 'active' or
559 # 'completed'. 'comppleted' (since 1.2)
560 #
561 # @disk: #optional @MigrationStats containing detailed disk migration
562 # status, only returned if status is 'active' and it is a block
563 # migration
564 #
565 # @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
566 # migration statistics, only returned if XBZRLE feature is on and
567 # status is 'active' or 'completed' (since 1.2)
568 #
569 # @total-time: #optional total amount of milliseconds since migration started.
570 # If migration has ended, it returns the total migration
571 # time. (since 1.2)
572 #
573 # @downtime: #optional only present when migration finishes correctly
574 # total downtime in milliseconds for the guest.
575 # (since 1.3)
576 #
577 # @expected-downtime: #optional only present while migration is active
578 # expected downtime in milliseconds for the guest in last walk
579 # of the dirty bitmap. (since 1.3)
580 #
581 # Since: 0.14.0
582 ##
583 { 'type': 'MigrationInfo',
584 'data': {'*status': 'str', '*ram': 'MigrationStats',
585 '*disk': 'MigrationStats',
586 '*xbzrle-cache': 'XBZRLECacheStats',
587 '*total-time': 'int',
588 '*expected-downtime': 'int',
589 '*downtime': 'int'} }
590
591 ##
592 # @query-migrate
593 #
594 # Returns information about current migration process.
595 #
596 # Returns: @MigrationInfo
597 #
598 # Since: 0.14.0
599 ##
600 { 'command': 'query-migrate', 'returns': 'MigrationInfo' }
601
602 ##
603 # @MigrationCapability
604 #
605 # Migration capabilities enumeration
606 #
607 # @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
608 # This feature allows us to minimize migration traffic for certain work
609 # loads, by sending compressed difference of the pages
610 #
611 # Since: 1.2
612 ##
613 { 'enum': 'MigrationCapability',
614 'data': ['xbzrle'] }
615
616 ##
617 # @MigrationCapabilityStatus
618 #
619 # Migration capability information
620 #
621 # @capability: capability enum
622 #
623 # @state: capability state bool
624 #
625 # Since: 1.2
626 ##
627 { 'type': 'MigrationCapabilityStatus',
628 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
629
630 ##
631 # @migrate-set-capabilities
632 #
633 # Enable/Disable the following migration capabilities (like xbzrle)
634 #
635 # @capabilities: json array of capability modifications to make
636 #
637 # Since: 1.2
638 ##
639 { 'command': 'migrate-set-capabilities',
640 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
641
642 ##
643 # @query-migrate-capabilities
644 #
645 # Returns information about the current migration capabilities status
646 #
647 # Returns: @MigrationCapabilitiesStatus
648 #
649 # Since: 1.2
650 ##
651 { 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
652
653 ##
654 # @MouseInfo:
655 #
656 # Information about a mouse device.
657 #
658 # @name: the name of the mouse device
659 #
660 # @index: the index of the mouse device
661 #
662 # @current: true if this device is currently receiving mouse events
663 #
664 # @absolute: true if this device supports absolute coordinates as input
665 #
666 # Since: 0.14.0
667 ##
668 { 'type': 'MouseInfo',
669 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
670 'absolute': 'bool'} }
671
672 ##
673 # @query-mice:
674 #
675 # Returns information about each active mouse device
676 #
677 # Returns: a list of @MouseInfo for each device
678 #
679 # Since: 0.14.0
680 ##
681 { 'command': 'query-mice', 'returns': ['MouseInfo'] }
682
683 ##
684 # @CpuInfo:
685 #
686 # Information about a virtual CPU
687 #
688 # @CPU: the index of the virtual CPU
689 #
690 # @current: this only exists for backwards compatible and should be ignored
691 #
692 # @halted: true if the virtual CPU is in the halt state. Halt usually refers
693 # to a processor specific low power mode.
694 #
695 # @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
696 # pointer.
697 # If the target is Sparc, this is the PC component of the
698 # instruction pointer.
699 #
700 # @nip: #optional If the target is PPC, the instruction pointer
701 #
702 # @npc: #optional If the target is Sparc, the NPC component of the instruction
703 # pointer
704 #
705 # @PC: #optional If the target is MIPS, the instruction pointer
706 #
707 # @thread_id: ID of the underlying host thread
708 #
709 # Since: 0.14.0
710 #
711 # Notes: @halted is a transient state that changes frequently. By the time the
712 # data is sent to the client, the guest may no longer be halted.
713 ##
714 { 'type': 'CpuInfo',
715 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
716 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
717
718 ##
719 # @query-cpus:
720 #
721 # Returns a list of information about each virtual CPU.
722 #
723 # Returns: a list of @CpuInfo for each virtual CPU
724 #
725 # Since: 0.14.0
726 ##
727 { 'command': 'query-cpus', 'returns': ['CpuInfo'] }
728
729 ##
730 # @BlockDeviceInfo:
731 #
732 # Information about the backing device for a block device.
733 #
734 # @file: the filename of the backing device
735 #
736 # @ro: true if the backing device was open read-only
737 #
738 # @drv: the name of the block format used to open the backing device. As of
739 # 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
740 # 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
741 # 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
742 # 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
743 #
744 # @backing_file: #optional the name of the backing file (for copy-on-write)
745 #
746 # @backing_file_depth: number of files in the backing file chain (since: 1.2)
747 #
748 # @encrypted: true if the backing device is encrypted
749 #
750 # @encryption_key_missing: true if the backing device is encrypted but an
751 # valid encryption key is missing
752 #
753 # @bps: total throughput limit in bytes per second is specified
754 #
755 # @bps_rd: read throughput limit in bytes per second is specified
756 #
757 # @bps_wr: write throughput limit in bytes per second is specified
758 #
759 # @iops: total I/O operations per second is specified
760 #
761 # @iops_rd: read I/O operations per second is specified
762 #
763 # @iops_wr: write I/O operations per second is specified
764 #
765 # @image: the info of image used (since: 1.6)
766 #
767 # Since: 0.14.0
768 #
769 # Notes: This interface is only found in @BlockInfo.
770 ##
771 { 'type': 'BlockDeviceInfo',
772 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
773 '*backing_file': 'str', 'backing_file_depth': 'int',
774 'encrypted': 'bool', 'encryption_key_missing': 'bool',
775 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
776 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
777 'image': 'ImageInfo' } }
778
779 ##
780 # @BlockDeviceIoStatus:
781 #
782 # An enumeration of block device I/O status.
783 #
784 # @ok: The last I/O operation has succeeded
785 #
786 # @failed: The last I/O operation has failed
787 #
788 # @nospace: The last I/O operation has failed due to a no-space condition
789 #
790 # Since: 1.0
791 ##
792 { 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
793
794 ##
795 # @BlockDirtyInfo:
796 #
797 # Block dirty bitmap information.
798 #
799 # @count: number of dirty bytes according to the dirty bitmap
800 #
801 # @granularity: granularity of the dirty bitmap in bytes (since 1.4)
802 #
803 # Since: 1.3
804 ##
805 { 'type': 'BlockDirtyInfo',
806 'data': {'count': 'int', 'granularity': 'int'} }
807
808 ##
809 # @BlockInfo:
810 #
811 # Block device information. This structure describes a virtual device and
812 # the backing device associated with it.
813 #
814 # @device: The device name associated with the virtual device.
815 #
816 # @type: This field is returned only for compatibility reasons, it should
817 # not be used (always returns 'unknown')
818 #
819 # @removable: True if the device supports removable media.
820 #
821 # @locked: True if the guest has locked this device from having its media
822 # removed
823 #
824 # @tray_open: #optional True if the device has a tray and it is open
825 # (only present if removable is true)
826 #
827 # @dirty: #optional dirty bitmap information (only present if the dirty
828 # bitmap is enabled)
829 #
830 # @io-status: #optional @BlockDeviceIoStatus. Only present if the device
831 # supports it and the VM is configured to stop on errors
832 #
833 # @inserted: #optional @BlockDeviceInfo describing the device if media is
834 # present
835 #
836 # Since: 0.14.0
837 ##
838 { 'type': 'BlockInfo',
839 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
840 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
841 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
842 '*dirty': 'BlockDirtyInfo' } }
843
844 ##
845 # @query-block:
846 #
847 # Get a list of BlockInfo for all virtual block devices.
848 #
849 # Returns: a list of @BlockInfo describing each virtual block device
850 #
851 # Since: 0.14.0
852 ##
853 { 'command': 'query-block', 'returns': ['BlockInfo'] }
854
855 ##
856 # @BlockDeviceStats:
857 #
858 # Statistics of a virtual block device or a block backing device.
859 #
860 # @rd_bytes: The number of bytes read by the device.
861 #
862 # @wr_bytes: The number of bytes written by the device.
863 #
864 # @rd_operations: The number of read operations performed by the device.
865 #
866 # @wr_operations: The number of write operations performed by the device.
867 #
868 # @flush_operations: The number of cache flush operations performed by the
869 # device (since 0.15.0)
870 #
871 # @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
872 # (since 0.15.0).
873 #
874 # @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
875 #
876 # @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
877 #
878 # @wr_highest_offset: The offset after the greatest byte written to the
879 # device. The intended use of this information is for
880 # growable sparse files (like qcow2) that are used on top
881 # of a physical device.
882 #
883 # Since: 0.14.0
884 ##
885 { 'type': 'BlockDeviceStats',
886 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
887 'wr_operations': 'int', 'flush_operations': 'int',
888 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
889 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
890
891 ##
892 # @BlockStats:
893 #
894 # Statistics of a virtual block device or a block backing device.
895 #
896 # @device: #optional If the stats are for a virtual block device, the name
897 # corresponding to the virtual block device.
898 #
899 # @stats: A @BlockDeviceStats for the device.
900 #
901 # @parent: #optional This may point to the backing block device if this is a
902 # a virtual block device. If it's a backing block, this will point
903 # to the backing file is one is present.
904 #
905 # Since: 0.14.0
906 ##
907 { 'type': 'BlockStats',
908 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
909 '*parent': 'BlockStats'} }
910
911 ##
912 # @query-blockstats:
913 #
914 # Query the @BlockStats for all virtual block devices.
915 #
916 # Returns: A list of @BlockStats for each virtual block devices.
917 #
918 # Since: 0.14.0
919 ##
920 { 'command': 'query-blockstats', 'returns': ['BlockStats'] }
921
922 ##
923 # @VncClientInfo:
924 #
925 # Information about a connected VNC client.
926 #
927 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
928 # when possible.
929 #
930 # @family: 'ipv6' if the client is connected via IPv6 and TCP
931 # 'ipv4' if the client is connected via IPv4 and TCP
932 # 'unix' if the client is connected via a unix domain socket
933 # 'unknown' otherwise
934 #
935 # @service: The service name of the client's port. This may depends on the
936 # host system's service database so symbolic names should not be
937 # relied on.
938 #
939 # @x509_dname: #optional If x509 authentication is in use, the Distinguished
940 # Name of the client.
941 #
942 # @sasl_username: #optional If SASL authentication is in use, the SASL username
943 # used for authentication.
944 #
945 # Since: 0.14.0
946 ##
947 { 'type': 'VncClientInfo',
948 'data': {'host': 'str', 'family': 'str', 'service': 'str',
949 '*x509_dname': 'str', '*sasl_username': 'str'} }
950
951 ##
952 # @VncInfo:
953 #
954 # Information about the VNC session.
955 #
956 # @enabled: true if the VNC server is enabled, false otherwise
957 #
958 # @host: #optional The hostname the VNC server is bound to. This depends on
959 # the name resolution on the host and may be an IP address.
960 #
961 # @family: #optional 'ipv6' if the host is listening for IPv6 connections
962 # 'ipv4' if the host is listening for IPv4 connections
963 # 'unix' if the host is listening on a unix domain socket
964 # 'unknown' otherwise
965 #
966 # @service: #optional The service name of the server's port. This may depends
967 # on the host system's service database so symbolic names should not
968 # be relied on.
969 #
970 # @auth: #optional the current authentication type used by the server
971 # 'none' if no authentication is being used
972 # 'vnc' if VNC authentication is being used
973 # 'vencrypt+plain' if VEncrypt is used with plain text authentication
974 # 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
975 # 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
976 # 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
977 # 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
978 # 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
979 # 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
980 # 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
981 # 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
982 #
983 # @clients: a list of @VncClientInfo of all currently connected clients
984 #
985 # Since: 0.14.0
986 ##
987 { 'type': 'VncInfo',
988 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
989 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
990
991 ##
992 # @query-vnc:
993 #
994 # Returns information about the current VNC server
995 #
996 # Returns: @VncInfo
997 #
998 # Since: 0.14.0
999 ##
1000 { 'command': 'query-vnc', 'returns': 'VncInfo' }
1001
1002 ##
1003 # @SpiceChannel
1004 #
1005 # Information about a SPICE client channel.
1006 #
1007 # @host: The host name of the client. QEMU tries to resolve this to a DNS name
1008 # when possible.
1009 #
1010 # @family: 'ipv6' if the client is connected via IPv6 and TCP
1011 # 'ipv4' if the client is connected via IPv4 and TCP
1012 # 'unix' if the client is connected via a unix domain socket
1013 # 'unknown' otherwise
1014 #
1015 # @port: The client's port number.
1016 #
1017 # @connection-id: SPICE connection id number. All channels with the same id
1018 # belong to the same SPICE session.
1019 #
1020 # @connection-type: SPICE channel type number. "1" is the main control
1021 # channel, filter for this one if you want to track spice
1022 # sessions only
1023 #
1024 # @channel-id: SPICE channel ID number. Usually "0", might be different when
1025 # multiple channels of the same type exist, such as multiple
1026 # display channels in a multihead setup
1027 #
1028 # @tls: true if the channel is encrypted, false otherwise.
1029 #
1030 # Since: 0.14.0
1031 ##
1032 { 'type': 'SpiceChannel',
1033 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1034 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1035 'tls': 'bool'} }
1036
1037 ##
1038 # @SpiceQueryMouseMode
1039 #
1040 # An enumeration of Spice mouse states.
1041 #
1042 # @client: Mouse cursor position is determined by the client.
1043 #
1044 # @server: Mouse cursor position is determined by the server.
1045 #
1046 # @unknown: No information is available about mouse mode used by
1047 # the spice server.
1048 #
1049 # Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1050 #
1051 # Since: 1.1
1052 ##
1053 { 'enum': 'SpiceQueryMouseMode',
1054 'data': [ 'client', 'server', 'unknown' ] }
1055
1056 ##
1057 # @SpiceInfo
1058 #
1059 # Information about the SPICE session.
1060 #
1061 # @enabled: true if the SPICE server is enabled, false otherwise
1062 #
1063 # @migrated: true if the last guest migration completed and spice
1064 # migration had completed as well. false otherwise.
1065 #
1066 # @host: #optional The hostname the SPICE server is bound to. This depends on
1067 # the name resolution on the host and may be an IP address.
1068 #
1069 # @port: #optional The SPICE server's port number.
1070 #
1071 # @compiled-version: #optional SPICE server version.
1072 #
1073 # @tls-port: #optional The SPICE server's TLS port number.
1074 #
1075 # @auth: #optional the current authentication type used by the server
1076 # 'none' if no authentication is being used
1077 # 'spice' uses SASL or direct TLS authentication, depending on command
1078 # line options
1079 #
1080 # @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1081 # be determined by the client or the server, or unknown if spice
1082 # server doesn't provide this information.
1083 #
1084 # Since: 1.1
1085 #
1086 # @channels: a list of @SpiceChannel for each active spice channel
1087 #
1088 # Since: 0.14.0
1089 ##
1090 { 'type': 'SpiceInfo',
1091 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
1092 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
1093 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
1094
1095 ##
1096 # @query-spice
1097 #
1098 # Returns information about the current SPICE server
1099 #
1100 # Returns: @SpiceInfo
1101 #
1102 # Since: 0.14.0
1103 ##
1104 { 'command': 'query-spice', 'returns': 'SpiceInfo' }
1105
1106 ##
1107 # @BalloonInfo:
1108 #
1109 # Information about the guest balloon device.
1110 #
1111 # @actual: the number of bytes the balloon currently contains
1112 #
1113 # Since: 0.14.0
1114 #
1115 ##
1116 { 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
1117
1118 ##
1119 # @query-balloon:
1120 #
1121 # Return information about the balloon device.
1122 #
1123 # Returns: @BalloonInfo on success
1124 # If the balloon driver is enabled but not functional because the KVM
1125 # kernel module cannot support it, KvmMissingCap
1126 # If no balloon device is present, DeviceNotActive
1127 #
1128 # Since: 0.14.0
1129 ##
1130 { 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1131
1132 ##
1133 # @PciMemoryRange:
1134 #
1135 # A PCI device memory region
1136 #
1137 # @base: the starting address (guest physical)
1138 #
1139 # @limit: the ending address (guest physical)
1140 #
1141 # Since: 0.14.0
1142 ##
1143 { 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1144
1145 ##
1146 # @PciMemoryRegion
1147 #
1148 # Information about a PCI device I/O region.
1149 #
1150 # @bar: the index of the Base Address Register for this region
1151 #
1152 # @type: 'io' if the region is a PIO region
1153 # 'memory' if the region is a MMIO region
1154 #
1155 # @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1156 #
1157 # @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1158 #
1159 # Since: 0.14.0
1160 ##
1161 { 'type': 'PciMemoryRegion',
1162 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1163 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1164
1165 ##
1166 # @PciBridgeInfo:
1167 #
1168 # Information about a PCI Bridge device
1169 #
1170 # @bus.number: primary bus interface number. This should be the number of the
1171 # bus the device resides on.
1172 #
1173 # @bus.secondary: secondary bus interface number. This is the number of the
1174 # main bus for the bridge
1175 #
1176 # @bus.subordinate: This is the highest number bus that resides below the
1177 # bridge.
1178 #
1179 # @bus.io_range: The PIO range for all devices on this bridge
1180 #
1181 # @bus.memory_range: The MMIO range for all devices on this bridge
1182 #
1183 # @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1184 # this bridge
1185 #
1186 # @devices: a list of @PciDeviceInfo for each device on this bridge
1187 #
1188 # Since: 0.14.0
1189 ##
1190 { 'type': 'PciBridgeInfo',
1191 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1192 'io_range': 'PciMemoryRange',
1193 'memory_range': 'PciMemoryRange',
1194 'prefetchable_range': 'PciMemoryRange' },
1195 '*devices': ['PciDeviceInfo']} }
1196
1197 ##
1198 # @PciDeviceInfo:
1199 #
1200 # Information about a PCI device
1201 #
1202 # @bus: the bus number of the device
1203 #
1204 # @slot: the slot the device is located in
1205 #
1206 # @function: the function of the slot used by the device
1207 #
1208 # @class_info.desc: #optional a string description of the device's class
1209 #
1210 # @class_info.class: the class code of the device
1211 #
1212 # @id.device: the PCI device id
1213 #
1214 # @id.vendor: the PCI vendor id
1215 #
1216 # @irq: #optional if an IRQ is assigned to the device, the IRQ number
1217 #
1218 # @qdev_id: the device name of the PCI device
1219 #
1220 # @pci_bridge: if the device is a PCI bridge, the bridge information
1221 #
1222 # @regions: a list of the PCI I/O regions associated with the device
1223 #
1224 # Notes: the contents of @class_info.desc are not stable and should only be
1225 # treated as informational.
1226 #
1227 # Since: 0.14.0
1228 ##
1229 { 'type': 'PciDeviceInfo',
1230 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1231 'class_info': {'*desc': 'str', 'class': 'int'},
1232 'id': {'device': 'int', 'vendor': 'int'},
1233 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1234 'regions': ['PciMemoryRegion']} }
1235
1236 ##
1237 # @PciInfo:
1238 #
1239 # Information about a PCI bus
1240 #
1241 # @bus: the bus index
1242 #
1243 # @devices: a list of devices on this bus
1244 #
1245 # Since: 0.14.0
1246 ##
1247 { 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1248
1249 ##
1250 # @query-pci:
1251 #
1252 # Return information about the PCI bus topology of the guest.
1253 #
1254 # Returns: a list of @PciInfo for each PCI bus
1255 #
1256 # Since: 0.14.0
1257 ##
1258 { 'command': 'query-pci', 'returns': ['PciInfo'] }
1259
1260 ##
1261 # @BlockdevOnError:
1262 #
1263 # An enumeration of possible behaviors for errors on I/O operations.
1264 # The exact meaning depends on whether the I/O was initiated by a guest
1265 # or by a block job
1266 #
1267 # @report: for guest operations, report the error to the guest;
1268 # for jobs, cancel the job
1269 #
1270 # @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1271 # or BLOCK_JOB_ERROR)
1272 #
1273 # @enospc: same as @stop on ENOSPC, same as @report otherwise.
1274 #
1275 # @stop: for guest operations, stop the virtual machine;
1276 # for jobs, pause the job
1277 #
1278 # Since: 1.3
1279 ##
1280 { 'enum': 'BlockdevOnError',
1281 'data': ['report', 'ignore', 'enospc', 'stop'] }
1282
1283 ##
1284 # @MirrorSyncMode:
1285 #
1286 # An enumeration of possible behaviors for the initial synchronization
1287 # phase of storage mirroring.
1288 #
1289 # @top: copies data in the topmost image to the destination
1290 #
1291 # @full: copies data from all images to the destination
1292 #
1293 # @none: only copy data written from now on
1294 #
1295 # Since: 1.3
1296 ##
1297 { 'enum': 'MirrorSyncMode',
1298 'data': ['top', 'full', 'none'] }
1299
1300 ##
1301 # @BlockJobInfo:
1302 #
1303 # Information about a long-running block device operation.
1304 #
1305 # @type: the job type ('stream' for image streaming)
1306 #
1307 # @device: the block device name
1308 #
1309 # @len: the maximum progress value
1310 #
1311 # @busy: false if the job is known to be in a quiescent state, with
1312 # no pending I/O. Since 1.3.
1313 #
1314 # @paused: whether the job is paused or, if @busy is true, will
1315 # pause itself as soon as possible. Since 1.3.
1316 #
1317 # @offset: the current progress value
1318 #
1319 # @speed: the rate limit, bytes per second
1320 #
1321 # @io-status: the status of the job (since 1.3)
1322 #
1323 # Since: 1.1
1324 ##
1325 { 'type': 'BlockJobInfo',
1326 'data': {'type': 'str', 'device': 'str', 'len': 'int',
1327 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1328 'io-status': 'BlockDeviceIoStatus'} }
1329
1330 ##
1331 # @query-block-jobs:
1332 #
1333 # Return information about long-running block device operations.
1334 #
1335 # Returns: a list of @BlockJobInfo for each active block job
1336 #
1337 # Since: 1.1
1338 ##
1339 { 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1340
1341 ##
1342 # @quit:
1343 #
1344 # This command will cause the QEMU process to exit gracefully. While every
1345 # attempt is made to send the QMP response before terminating, this is not
1346 # guaranteed. When using this interface, a premature EOF would not be
1347 # unexpected.
1348 #
1349 # Since: 0.14.0
1350 ##
1351 { 'command': 'quit' }
1352
1353 ##
1354 # @stop:
1355 #
1356 # Stop all guest VCPU execution.
1357 #
1358 # Since: 0.14.0
1359 #
1360 # Notes: This function will succeed even if the guest is already in the stopped
1361 # state. In "inmigrate" state, it will ensure that the guest
1362 # remains paused once migration finishes, as if the -S option was
1363 # passed on the command line.
1364 ##
1365 { 'command': 'stop' }
1366
1367 ##
1368 # @system_reset:
1369 #
1370 # Performs a hard reset of a guest.
1371 #
1372 # Since: 0.14.0
1373 ##
1374 { 'command': 'system_reset' }
1375
1376 ##
1377 # @system_powerdown:
1378 #
1379 # Requests that a guest perform a powerdown operation.
1380 #
1381 # Since: 0.14.0
1382 #
1383 # Notes: A guest may or may not respond to this command. This command
1384 # returning does not indicate that a guest has accepted the request or
1385 # that it has shut down. Many guests will respond to this command by
1386 # prompting the user in some way.
1387 ##
1388 { 'command': 'system_powerdown' }
1389
1390 ##
1391 # @cpu:
1392 #
1393 # This command is a nop that is only provided for the purposes of compatibility.
1394 #
1395 # Since: 0.14.0
1396 #
1397 # Notes: Do not use this command.
1398 ##
1399 { 'command': 'cpu', 'data': {'index': 'int'} }
1400
1401 ##
1402 # @cpu-add
1403 #
1404 # Adds CPU with specified ID
1405 #
1406 # @id: ID of CPU to be created, valid values [0..max_cpus)
1407 #
1408 # Returns: Nothing on success
1409 #
1410 # Since 1.5
1411 ##
1412 { 'command': 'cpu-add', 'data': {'id': 'int'} }
1413
1414 ##
1415 # @memsave:
1416 #
1417 # Save a portion of guest memory to a file.
1418 #
1419 # @val: the virtual address of the guest to start from
1420 #
1421 # @size: the size of memory region to save
1422 #
1423 # @filename: the file to save the memory to as binary data
1424 #
1425 # @cpu-index: #optional the index of the virtual CPU to use for translating the
1426 # virtual address (defaults to CPU 0)
1427 #
1428 # Returns: Nothing on success
1429 #
1430 # Since: 0.14.0
1431 #
1432 # Notes: Errors were not reliably returned until 1.1
1433 ##
1434 { 'command': 'memsave',
1435 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
1436
1437 ##
1438 # @pmemsave:
1439 #
1440 # Save a portion of guest physical memory to a file.
1441 #
1442 # @val: the physical address of the guest to start from
1443 #
1444 # @size: the size of memory region to save
1445 #
1446 # @filename: the file to save the memory to as binary data
1447 #
1448 # Returns: Nothing on success
1449 #
1450 # Since: 0.14.0
1451 #
1452 # Notes: Errors were not reliably returned until 1.1
1453 ##
1454 { 'command': 'pmemsave',
1455 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
1456
1457 ##
1458 # @cont:
1459 #
1460 # Resume guest VCPU execution.
1461 #
1462 # Since: 0.14.0
1463 #
1464 # Returns: If successful, nothing
1465 # If QEMU was started with an encrypted block device and a key has
1466 # not yet been set, DeviceEncrypted.
1467 #
1468 # Notes: This command will succeed if the guest is currently running. It
1469 # will also succeed if the guest is in the "inmigrate" state; in
1470 # this case, the effect of the command is to make sure the guest
1471 # starts once migration finishes, removing the effect of the -S
1472 # command line option if it was passed.
1473 ##
1474 { 'command': 'cont' }
1475
1476 ##
1477 # @system_wakeup:
1478 #
1479 # Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1480 #
1481 # Since: 1.1
1482 #
1483 # Returns: nothing.
1484 ##
1485 { 'command': 'system_wakeup' }
1486
1487 ##
1488 # @inject-nmi:
1489 #
1490 # Injects an Non-Maskable Interrupt into all guest's VCPUs.
1491 #
1492 # Returns: If successful, nothing
1493 #
1494 # Since: 0.14.0
1495 #
1496 # Notes: Only x86 Virtual Machines support this command.
1497 ##
1498 { 'command': 'inject-nmi' }
1499
1500 ##
1501 # @set_link:
1502 #
1503 # Sets the link status of a virtual network adapter.
1504 #
1505 # @name: the device name of the virtual network adapter
1506 #
1507 # @up: true to set the link status to be up
1508 #
1509 # Returns: Nothing on success
1510 # If @name is not a valid network device, DeviceNotFound
1511 #
1512 # Since: 0.14.0
1513 #
1514 # Notes: Not all network adapters support setting link status. This command
1515 # will succeed even if the network adapter does not support link status
1516 # notification.
1517 ##
1518 { 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
1519
1520 ##
1521 # @block_passwd:
1522 #
1523 # This command sets the password of a block device that has not been open
1524 # with a password and requires one.
1525 #
1526 # The two cases where this can happen are a block device is created through
1527 # QEMU's initial command line or a block device is changed through the legacy
1528 # @change interface.
1529 #
1530 # In the event that the block device is created through the initial command
1531 # line, the VM will start in the stopped state regardless of whether '-S' is
1532 # used. The intention is for a management tool to query the block devices to
1533 # determine which ones are encrypted, set the passwords with this command, and
1534 # then start the guest with the @cont command.
1535 #
1536 # @device: the name of the device to set the password on
1537 #
1538 # @password: the password to use for the device
1539 #
1540 # Returns: nothing on success
1541 # If @device is not a valid block device, DeviceNotFound
1542 # If @device is not encrypted, DeviceNotEncrypted
1543 #
1544 # Notes: Not all block formats support encryption and some that do are not
1545 # able to validate that a password is correct. Disk corruption may
1546 # occur if an invalid password is specified.
1547 #
1548 # Since: 0.14.0
1549 ##
1550 { 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
1551
1552 ##
1553 # @balloon:
1554 #
1555 # Request the balloon driver to change its balloon size.
1556 #
1557 # @value: the target size of the balloon in bytes
1558 #
1559 # Returns: Nothing on success
1560 # If the balloon driver is enabled but not functional because the KVM
1561 # kernel module cannot support it, KvmMissingCap
1562 # If no balloon device is present, DeviceNotActive
1563 #
1564 # Notes: This command just issues a request to the guest. When it returns,
1565 # the balloon size may not have changed. A guest can change the balloon
1566 # size independent of this command.
1567 #
1568 # Since: 0.14.0
1569 ##
1570 { 'command': 'balloon', 'data': {'value': 'int'} }
1571
1572 ##
1573 # @block_resize
1574 #
1575 # Resize a block image while a guest is running.
1576 #
1577 # @device: the name of the device to get the image resized
1578 #
1579 # @size: new image size in bytes
1580 #
1581 # Returns: nothing on success
1582 # If @device is not a valid block device, DeviceNotFound
1583 #
1584 # Since: 0.14.0
1585 ##
1586 { 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
1587
1588 ##
1589 # @NewImageMode
1590 #
1591 # An enumeration that tells QEMU how to set the backing file path in
1592 # a new image file.
1593 #
1594 # @existing: QEMU should look for an existing image file.
1595 #
1596 # @absolute-paths: QEMU should create a new image with absolute paths
1597 # for the backing file.
1598 #
1599 # Since: 1.1
1600 ##
1601 { 'enum': 'NewImageMode',
1602 'data': [ 'existing', 'absolute-paths' ] }
1603
1604 ##
1605 # @BlockdevSnapshot
1606 #
1607 # @device: the name of the device to generate the snapshot from.
1608 #
1609 # @snapshot-file: the target of the new image. A new file will be created.
1610 #
1611 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1612 #
1613 # @mode: #optional whether and how QEMU should create a new image, default is
1614 # 'absolute-paths'.
1615 ##
1616 { 'type': 'BlockdevSnapshot',
1617 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1618 '*mode': 'NewImageMode' } }
1619
1620 ##
1621 # @TransactionAction
1622 #
1623 # A discriminated record of operations that can be performed with
1624 # @transaction.
1625 ##
1626 { 'union': 'TransactionAction',
1627 'data': {
1628 'blockdev-snapshot-sync': 'BlockdevSnapshot'
1629 } }
1630
1631 ##
1632 # @transaction
1633 #
1634 # Executes a number of transactionable QMP commands atomically. If any
1635 # operation fails, then the entire set of actions will be abandoned and the
1636 # appropriate error returned.
1637 #
1638 # List of:
1639 # @TransactionAction: information needed for the respective operation
1640 #
1641 # Returns: nothing on success
1642 # Errors depend on the operations of the transaction
1643 #
1644 # Note: The transaction aborts on the first failure. Therefore, there will be
1645 # information on only one failed operation returned in an error condition, and
1646 # subsequent actions will not have been attempted.
1647 #
1648 # Since 1.1
1649 ##
1650 { 'command': 'transaction',
1651 'data': { 'actions': [ 'TransactionAction' ] } }
1652
1653 ##
1654 # @blockdev-snapshot-sync
1655 #
1656 # Generates a synchronous snapshot of a block device.
1657 #
1658 # @device: the name of the device to generate the snapshot from.
1659 #
1660 # @snapshot-file: the target of the new image. If the file exists, or if it
1661 # is a device, the snapshot will be created in the existing
1662 # file/device. If does not exist, a new file will be created.
1663 #
1664 # @format: #optional the format of the snapshot image, default is 'qcow2'.
1665 #
1666 # @mode: #optional whether and how QEMU should create a new image, default is
1667 # 'absolute-paths'.
1668 #
1669 # Returns: nothing on success
1670 # If @device is not a valid block device, DeviceNotFound
1671 #
1672 # Since 0.14.0
1673 ##
1674 { 'command': 'blockdev-snapshot-sync',
1675 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1676 '*mode': 'NewImageMode'} }
1677
1678 ##
1679 # @human-monitor-command:
1680 #
1681 # Execute a command on the human monitor and return the output.
1682 #
1683 # @command-line: the command to execute in the human monitor
1684 #
1685 # @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1686 #
1687 # Returns: the output of the command as a string
1688 #
1689 # Since: 0.14.0
1690 #
1691 # Notes: This command only exists as a stop-gap. It's use is highly
1692 # discouraged. The semantics of this command are not guaranteed.
1693 #
1694 # Known limitations:
1695 #
1696 # o This command is stateless, this means that commands that depend
1697 # on state information (such as getfd) might not work
1698 #
1699 # o Commands that prompt the user for data (eg. 'cont' when the block
1700 # device is encrypted) don't currently work
1701 ##
1702 { 'command': 'human-monitor-command',
1703 'data': {'command-line': 'str', '*cpu-index': 'int'},
1704 'returns': 'str' }
1705
1706 ##
1707 # @block-commit
1708 #
1709 # Live commit of data from overlay image nodes into backing nodes - i.e.,
1710 # writes data between 'top' and 'base' into 'base'.
1711 #
1712 # @device: the name of the device
1713 #
1714 # @base: #optional The file name of the backing image to write data into.
1715 # If not specified, this is the deepest backing image
1716 #
1717 # @top: The file name of the backing image within the image chain,
1718 # which contains the topmost data to be committed down.
1719 # Note, the active layer as 'top' is currently unsupported.
1720 #
1721 # If top == base, that is an error.
1722 #
1723 #
1724 # @speed: #optional the maximum speed, in bytes per second
1725 #
1726 # Returns: Nothing on success
1727 # If commit or stream is already active on this device, DeviceInUse
1728 # If @device does not exist, DeviceNotFound
1729 # If image commit is not supported by this device, NotSupported
1730 # If @base or @top is invalid, a generic error is returned
1731 # If @top is the active layer, or omitted, a generic error is returned
1732 # If @speed is invalid, InvalidParameter
1733 #
1734 # Since: 1.3
1735 #
1736 ##
1737 { 'command': 'block-commit',
1738 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1739 '*speed': 'int' } }
1740
1741 ##
1742 # @drive-mirror
1743 #
1744 # Start mirroring a block device's writes to a new destination.
1745 #
1746 # @device: the name of the device whose writes should be mirrored.
1747 #
1748 # @target: the target of the new image. If the file exists, or if it
1749 # is a device, the existing file/device will be used as the new
1750 # destination. If it does not exist, a new file will be created.
1751 #
1752 # @format: #optional the format of the new destination, default is to
1753 # probe if @mode is 'existing', else the format of the source
1754 #
1755 # @mode: #optional whether and how QEMU should create a new image, default is
1756 # 'absolute-paths'.
1757 #
1758 # @speed: #optional the maximum speed, in bytes per second
1759 #
1760 # @sync: what parts of the disk image should be copied to the destination
1761 # (all the disk, only the sectors allocated in the topmost image, or
1762 # only new I/O).
1763 #
1764 # @granularity: #optional granularity of the dirty bitmap, default is 64K
1765 # if the image format doesn't have clusters, 4K if the clusters
1766 # are smaller than that, else the cluster size. Must be a
1767 # power of 2 between 512 and 64M (since 1.4).
1768 #
1769 # @buf-size: #optional maximum amount of data in flight from source to
1770 # target (since 1.4).
1771 #
1772 # @on-source-error: #optional the action to take on an error on the source,
1773 # default 'report'. 'stop' and 'enospc' can only be used
1774 # if the block device supports io-status (see BlockInfo).
1775 #
1776 # @on-target-error: #optional the action to take on an error on the target,
1777 # default 'report' (no limitations, since this applies to
1778 # a different block device than @device).
1779 #
1780 # Returns: nothing on success
1781 # If @device is not a valid block device, DeviceNotFound
1782 #
1783 # Since 1.3
1784 ##
1785 { 'command': 'drive-mirror',
1786 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1787 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1788 '*speed': 'int', '*granularity': 'uint32',
1789 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
1790 '*on-target-error': 'BlockdevOnError' } }
1791
1792 ##
1793 # @migrate_cancel
1794 #
1795 # Cancel the current executing migration process.
1796 #
1797 # Returns: nothing on success
1798 #
1799 # Notes: This command succeeds even if there is no migration process running.
1800 #
1801 # Since: 0.14.0
1802 ##
1803 { 'command': 'migrate_cancel' }
1804
1805 ##
1806 # @migrate_set_downtime
1807 #
1808 # Set maximum tolerated downtime for migration.
1809 #
1810 # @value: maximum downtime in seconds
1811 #
1812 # Returns: nothing on success
1813 #
1814 # Since: 0.14.0
1815 ##
1816 { 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
1817
1818 ##
1819 # @migrate_set_speed
1820 #
1821 # Set maximum speed for migration.
1822 #
1823 # @value: maximum speed in bytes.
1824 #
1825 # Returns: nothing on success
1826 #
1827 # Notes: A value lesser than zero will be automatically round up to zero.
1828 #
1829 # Since: 0.14.0
1830 ##
1831 { 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
1832
1833 ##
1834 # @migrate-set-cache-size
1835 #
1836 # Set XBZRLE cache size
1837 #
1838 # @value: cache size in bytes
1839 #
1840 # The size will be rounded down to the nearest power of 2.
1841 # The cache size can be modified before and during ongoing migration
1842 #
1843 # Returns: nothing on success
1844 #
1845 # Since: 1.2
1846 ##
1847 { 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1848
1849 ##
1850 # @query-migrate-cache-size
1851 #
1852 # query XBZRLE cache size
1853 #
1854 # Returns: XBZRLE cache size in bytes
1855 #
1856 # Since: 1.2
1857 ##
1858 { 'command': 'query-migrate-cache-size', 'returns': 'int' }
1859
1860 ##
1861 # @ObjectPropertyInfo:
1862 #
1863 # @name: the name of the property
1864 #
1865 # @type: the type of the property. This will typically come in one of four
1866 # forms:
1867 #
1868 # 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1869 # These types are mapped to the appropriate JSON type.
1870 #
1871 # 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1872 # legacy qdev typename. These types are always treated as strings.
1873 #
1874 # 3) A child type in the form 'child<subtype>' where subtype is a qdev
1875 # device type name. Child properties create the composition tree.
1876 #
1877 # 4) A link type in the form 'link<subtype>' where subtype is a qdev
1878 # device type name. Link properties form the device model graph.
1879 #
1880 # Since: 1.2
1881 ##
1882 { 'type': 'ObjectPropertyInfo',
1883 'data': { 'name': 'str', 'type': 'str' } }
1884
1885 ##
1886 # @qom-list:
1887 #
1888 # This command will list any properties of a object given a path in the object
1889 # model.
1890 #
1891 # @path: the path within the object model. See @qom-get for a description of
1892 # this parameter.
1893 #
1894 # Returns: a list of @ObjectPropertyInfo that describe the properties of the
1895 # object.
1896 #
1897 # Since: 1.2
1898 ##
1899 { 'command': 'qom-list',
1900 'data': { 'path': 'str' },
1901 'returns': [ 'ObjectPropertyInfo' ] }
1902
1903 ##
1904 # @qom-get:
1905 #
1906 # This command will get a property from a object model path and return the
1907 # value.
1908 #
1909 # @path: The path within the object model. There are two forms of supported
1910 # paths--absolute and partial paths.
1911 #
1912 # Absolute paths are derived from the root object and can follow child<>
1913 # or link<> properties. Since they can follow link<> properties, they
1914 # can be arbitrarily long. Absolute paths look like absolute filenames
1915 # and are prefixed with a leading slash.
1916 #
1917 # Partial paths look like relative filenames. They do not begin
1918 # with a prefix. The matching rules for partial paths are subtle but
1919 # designed to make specifying objects easy. At each level of the
1920 # composition tree, the partial path is matched as an absolute path.
1921 # The first match is not returned. At least two matches are searched
1922 # for. A successful result is only returned if only one match is
1923 # found. If more than one match is found, a flag is return to
1924 # indicate that the match was ambiguous.
1925 #
1926 # @property: The property name to read
1927 #
1928 # Returns: The property value. The type depends on the property type. legacy<>
1929 # properties are returned as #str. child<> and link<> properties are
1930 # returns as #str pathnames. All integer property types (u8, u16, etc)
1931 # are returned as #int.
1932 #
1933 # Since: 1.2
1934 ##
1935 { 'command': 'qom-get',
1936 'data': { 'path': 'str', 'property': 'str' },
1937 'returns': 'visitor',
1938 'gen': 'no' }
1939
1940 ##
1941 # @qom-set:
1942 #
1943 # This command will set a property from a object model path.
1944 #
1945 # @path: see @qom-get for a description of this parameter
1946 #
1947 # @property: the property name to set
1948 #
1949 # @value: a value who's type is appropriate for the property type. See @qom-get
1950 # for a description of type mapping.
1951 #
1952 # Since: 1.2
1953 ##
1954 { 'command': 'qom-set',
1955 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1956 'gen': 'no' }
1957
1958 ##
1959 # @set_password:
1960 #
1961 # Sets the password of a remote display session.
1962 #
1963 # @protocol: `vnc' to modify the VNC server password
1964 # `spice' to modify the Spice server password
1965 #
1966 # @password: the new password
1967 #
1968 # @connected: #optional how to handle existing clients when changing the
1969 # password. If nothing is specified, defaults to `keep'
1970 # `fail' to fail the command if clients are connected
1971 # `disconnect' to disconnect existing clients
1972 # `keep' to maintain existing clients
1973 #
1974 # Returns: Nothing on success
1975 # If Spice is not enabled, DeviceNotFound
1976 #
1977 # Since: 0.14.0
1978 ##
1979 { 'command': 'set_password',
1980 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
1981
1982 ##
1983 # @expire_password:
1984 #
1985 # Expire the password of a remote display server.
1986 #
1987 # @protocol: the name of the remote display protocol `vnc' or `spice'
1988 #
1989 # @time: when to expire the password.
1990 # `now' to expire the password immediately
1991 # `never' to cancel password expiration
1992 # `+INT' where INT is the number of seconds from now (integer)
1993 # `INT' where INT is the absolute time in seconds
1994 #
1995 # Returns: Nothing on success
1996 # If @protocol is `spice' and Spice is not active, DeviceNotFound
1997 #
1998 # Since: 0.14.0
1999 #
2000 # Notes: Time is relative to the server and currently there is no way to
2001 # coordinate server time with client time. It is not recommended to
2002 # use the absolute time version of the @time parameter unless you're
2003 # sure you are on the same machine as the QEMU instance.
2004 ##
2005 { 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
2006
2007 ##
2008 # @eject:
2009 #
2010 # Ejects a device from a removable drive.
2011 #
2012 # @device: The name of the device
2013 #
2014 # @force: @optional If true, eject regardless of whether the drive is locked.
2015 # If not specified, the default value is false.
2016 #
2017 # Returns: Nothing on success
2018 # If @device is not a valid block device, DeviceNotFound
2019 #
2020 # Notes: Ejecting a device will no media results in success
2021 #
2022 # Since: 0.14.0
2023 ##
2024 { 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
2025
2026 ##
2027 # @change-vnc-password:
2028 #
2029 # Change the VNC server password.
2030 #
2031 # @target: the new password to use with VNC authentication
2032 #
2033 # Since: 1.1
2034 #
2035 # Notes: An empty password in this command will set the password to the empty
2036 # string. Existing clients are unaffected by executing this command.
2037 ##
2038 { 'command': 'change-vnc-password', 'data': {'password': 'str'} }
2039
2040 ##
2041 # @change:
2042 #
2043 # This command is multiple commands multiplexed together.
2044 #
2045 # @device: This is normally the name of a block device but it may also be 'vnc'.
2046 # when it's 'vnc', then sub command depends on @target
2047 #
2048 # @target: If @device is a block device, then this is the new filename.
2049 # If @device is 'vnc', then if the value 'password' selects the vnc
2050 # change password command. Otherwise, this specifies a new server URI
2051 # address to listen to for VNC connections.
2052 #
2053 # @arg: If @device is a block device, then this is an optional format to open
2054 # the device with.
2055 # If @device is 'vnc' and @target is 'password', this is the new VNC
2056 # password to set. If this argument is an empty string, then no future
2057 # logins will be allowed.
2058 #
2059 # Returns: Nothing on success.
2060 # If @device is not a valid block device, DeviceNotFound
2061 # If the new block device is encrypted, DeviceEncrypted. Note that
2062 # if this error is returned, the device has been opened successfully
2063 # and an additional call to @block_passwd is required to set the
2064 # device's password. The behavior of reads and writes to the block
2065 # device between when these calls are executed is undefined.
2066 #
2067 # Notes: It is strongly recommended that this interface is not used especially
2068 # for changing block devices.
2069 #
2070 # Since: 0.14.0
2071 ##
2072 { 'command': 'change',
2073 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
2074
2075 ##
2076 # @block_set_io_throttle:
2077 #
2078 # Change I/O throttle limits for a block drive.
2079 #
2080 # @device: The name of the device
2081 #
2082 # @bps: total throughput limit in bytes per second
2083 #
2084 # @bps_rd: read throughput limit in bytes per second
2085 #
2086 # @bps_wr: write throughput limit in bytes per second
2087 #
2088 # @iops: total I/O operations per second
2089 #
2090 # @ops_rd: read I/O operations per second
2091 #
2092 # @iops_wr: write I/O operations per second
2093 #
2094 # Returns: Nothing on success
2095 # If @device is not a valid block device, DeviceNotFound
2096 #
2097 # Since: 1.1
2098 ##
2099 { 'command': 'block_set_io_throttle',
2100 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2101 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
2102
2103 ##
2104 # @block-stream:
2105 #
2106 # Copy data from a backing file into a block device.
2107 #
2108 # The block streaming operation is performed in the background until the entire
2109 # backing file has been copied. This command returns immediately once streaming
2110 # has started. The status of ongoing block streaming operations can be checked
2111 # with query-block-jobs. The operation can be stopped before it has completed
2112 # using the block-job-cancel command.
2113 #
2114 # If a base file is specified then sectors are not copied from that base file and
2115 # its backing chain. When streaming completes the image file will have the base
2116 # file as its backing file. This can be used to stream a subset of the backing
2117 # file chain instead of flattening the entire image.
2118 #
2119 # On successful completion the image file is updated to drop the backing file
2120 # and the BLOCK_JOB_COMPLETED event is emitted.
2121 #
2122 # @device: the device name
2123 #
2124 # @base: #optional the common backing file name
2125 #
2126 # @speed: #optional the maximum speed, in bytes per second
2127 #
2128 # @on-error: #optional the action to take on an error (default report).
2129 # 'stop' and 'enospc' can only be used if the block device
2130 # supports io-status (see BlockInfo). Since 1.3.
2131 #
2132 # Returns: Nothing on success
2133 # If @device does not exist, DeviceNotFound
2134 #
2135 # Since: 1.1
2136 ##
2137 { 'command': 'block-stream',
2138 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2139 '*on-error': 'BlockdevOnError' } }
2140
2141 ##
2142 # @block-job-set-speed:
2143 #
2144 # Set maximum speed for a background block operation.
2145 #
2146 # This command can only be issued when there is an active block job.
2147 #
2148 # Throttling can be disabled by setting the speed to 0.
2149 #
2150 # @device: the device name
2151 #
2152 # @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2153 # Defaults to 0.
2154 #
2155 # Returns: Nothing on success
2156 # If no background operation is active on this device, DeviceNotActive
2157 #
2158 # Since: 1.1
2159 ##
2160 { 'command': 'block-job-set-speed',
2161 'data': { 'device': 'str', 'speed': 'int' } }
2162
2163 ##
2164 # @block-job-cancel:
2165 #
2166 # Stop an active background block operation.
2167 #
2168 # This command returns immediately after marking the active background block
2169 # operation for cancellation. It is an error to call this command if no
2170 # operation is in progress.
2171 #
2172 # The operation will cancel as soon as possible and then emit the
2173 # BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2174 # enumerated using query-block-jobs.
2175 #
2176 # For streaming, the image file retains its backing file unless the streaming
2177 # operation happens to complete just as it is being cancelled. A new streaming
2178 # operation can be started at a later time to finish copying all data from the
2179 # backing file.
2180 #
2181 # @device: the device name
2182 #
2183 # @force: #optional whether to allow cancellation of a paused job (default
2184 # false). Since 1.3.
2185 #
2186 # Returns: Nothing on success
2187 # If no background operation is active on this device, DeviceNotActive
2188 #
2189 # Since: 1.1
2190 ##
2191 { 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2192
2193 ##
2194 # @block-job-pause:
2195 #
2196 # Pause an active background block operation.
2197 #
2198 # This command returns immediately after marking the active background block
2199 # operation for pausing. It is an error to call this command if no
2200 # operation is in progress. Pausing an already paused job has no cumulative
2201 # effect; a single block-job-resume command will resume the job.
2202 #
2203 # The operation will pause as soon as possible. No event is emitted when
2204 # the operation is actually paused. Cancelling a paused job automatically
2205 # resumes it.
2206 #
2207 # @device: the device name
2208 #
2209 # Returns: Nothing on success
2210 # If no background operation is active on this device, DeviceNotActive
2211 #
2212 # Since: 1.3
2213 ##
2214 { 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2215
2216 ##
2217 # @block-job-resume:
2218 #
2219 # Resume an active background block operation.
2220 #
2221 # This command returns immediately after resuming a paused background block
2222 # operation. It is an error to call this command if no operation is in
2223 # progress. Resuming an already running job is not an error.
2224 #
2225 # This command also clears the error status of the job.
2226 #
2227 # @device: the device name
2228 #
2229 # Returns: Nothing on success
2230 # If no background operation is active on this device, DeviceNotActive
2231 #
2232 # Since: 1.3
2233 ##
2234 { 'command': 'block-job-resume', 'data': { 'device': 'str' } }
2235
2236 ##
2237 # @block-job-complete:
2238 #
2239 # Manually trigger completion of an active background block operation. This
2240 # is supported for drive mirroring, where it also switches the device to
2241 # write to the target path only. The ability to complete is signaled with
2242 # a BLOCK_JOB_READY event.
2243 #
2244 # This command completes an active background block operation synchronously.
2245 # The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2246 # is not defined. Note that if an I/O error occurs during the processing of
2247 # this command: 1) the command itself will fail; 2) the error will be processed
2248 # according to the rerror/werror arguments that were specified when starting
2249 # the operation.
2250 #
2251 # A cancelled or paused job cannot be completed.
2252 #
2253 # @device: the device name
2254 #
2255 # Returns: Nothing on success
2256 # If no background operation is active on this device, DeviceNotActive
2257 #
2258 # Since: 1.3
2259 ##
2260 { 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2261
2262 ##
2263 # @ObjectTypeInfo:
2264 #
2265 # This structure describes a search result from @qom-list-types
2266 #
2267 # @name: the type name found in the search
2268 #
2269 # Since: 1.1
2270 #
2271 # Notes: This command is experimental and may change syntax in future releases.
2272 ##
2273 { 'type': 'ObjectTypeInfo',
2274 'data': { 'name': 'str' } }
2275
2276 ##
2277 # @qom-list-types:
2278 #
2279 # This command will return a list of types given search parameters
2280 #
2281 # @implements: if specified, only return types that implement this type name
2282 #
2283 # @abstract: if true, include abstract types in the results
2284 #
2285 # Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2286 #
2287 # Since: 1.1
2288 ##
2289 { 'command': 'qom-list-types',
2290 'data': { '*implements': 'str', '*abstract': 'bool' },
2291 'returns': [ 'ObjectTypeInfo' ] }
2292
2293 ##
2294 # @DevicePropertyInfo:
2295 #
2296 # Information about device properties.
2297 #
2298 # @name: the name of the property
2299 # @type: the typename of the property
2300 #
2301 # Since: 1.2
2302 ##
2303 { 'type': 'DevicePropertyInfo',
2304 'data': { 'name': 'str', 'type': 'str' } }
2305
2306 ##
2307 # @device-list-properties:
2308 #
2309 # List properties associated with a device.
2310 #
2311 # @typename: the type name of a device
2312 #
2313 # Returns: a list of DevicePropertyInfo describing a devices properties
2314 #
2315 # Since: 1.2
2316 ##
2317 { 'command': 'device-list-properties',
2318 'data': { 'typename': 'str'},
2319 'returns': [ 'DevicePropertyInfo' ] }
2320
2321 ##
2322 # @migrate
2323 #
2324 # Migrates the current running guest to another Virtual Machine.
2325 #
2326 # @uri: the Uniform Resource Identifier of the destination VM
2327 #
2328 # @blk: #optional do block migration (full disk copy)
2329 #
2330 # @inc: #optional incremental disk copy migration
2331 #
2332 # @detach: this argument exists only for compatibility reasons and
2333 # is ignored by QEMU
2334 #
2335 # Returns: nothing on success
2336 #
2337 # Since: 0.14.0
2338 ##
2339 { 'command': 'migrate',
2340 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
2341
2342 # @xen-save-devices-state:
2343 #
2344 # Save the state of all devices to file. The RAM and the block devices
2345 # of the VM are not saved by this command.
2346 #
2347 # @filename: the file to save the state of the devices to as binary
2348 # data. See xen-save-devices-state.txt for a description of the binary
2349 # format.
2350 #
2351 # Returns: Nothing on success
2352 #
2353 # Since: 1.1
2354 ##
2355 { 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
2356
2357 ##
2358 # @xen-set-global-dirty-log
2359 #
2360 # Enable or disable the global dirty log mode.
2361 #
2362 # @enable: true to enable, false to disable.
2363 #
2364 # Returns: nothing
2365 #
2366 # Since: 1.3
2367 ##
2368 { 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2369
2370 ##
2371 # @device_del:
2372 #
2373 # Remove a device from a guest
2374 #
2375 # @id: the name of the device
2376 #
2377 # Returns: Nothing on success
2378 # If @id is not a valid device, DeviceNotFound
2379 #
2380 # Notes: When this command completes, the device may not be removed from the
2381 # guest. Hot removal is an operation that requires guest cooperation.
2382 # This command merely requests that the guest begin the hot removal
2383 # process. Completion of the device removal process is signaled with a
2384 # DEVICE_DELETED event. Guest reset will automatically complete removal
2385 # for all devices.
2386 #
2387 # Since: 0.14.0
2388 ##
2389 { 'command': 'device_del', 'data': {'id': 'str'} }
2390
2391 ##
2392 # @dump-guest-memory
2393 #
2394 # Dump guest's memory to vmcore. It is a synchronous operation that can take
2395 # very long depending on the amount of guest memory. This command is only
2396 # supported on i386 and x86_64.
2397 #
2398 # @paging: if true, do paging to get guest's memory mapping. This allows
2399 # using gdb to process the core file.
2400 #
2401 # IMPORTANT: this option can make QEMU allocate several gigabytes
2402 # of RAM. This can happen for a large guest, or a
2403 # malicious guest pretending to be large.
2404 #
2405 # Also, paging=true has the following limitations:
2406 #
2407 # 1. The guest may be in a catastrophic state or can have corrupted
2408 # memory, which cannot be trusted
2409 # 2. The guest can be in real-mode even if paging is enabled. For
2410 # example, the guest uses ACPI to sleep, and ACPI sleep state
2411 # goes in real-mode
2412 #
2413 # @protocol: the filename or file descriptor of the vmcore. The supported
2414 # protocols are:
2415 #
2416 # 1. file: the protocol starts with "file:", and the following
2417 # string is the file's path.
2418 # 2. fd: the protocol starts with "fd:", and the following string
2419 # is the fd's name.
2420 #
2421 # @begin: #optional if specified, the starting physical address.
2422 #
2423 # @length: #optional if specified, the memory size, in bytes. If you don't
2424 # want to dump all guest's memory, please specify the start @begin
2425 # and @length
2426 #
2427 # Returns: nothing on success
2428 #
2429 # Since: 1.2
2430 ##
2431 { 'command': 'dump-guest-memory',
2432 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2433 '*length': 'int' } }
2434
2435 ##
2436 # @netdev_add:
2437 #
2438 # Add a network backend.
2439 #
2440 # @type: the type of network backend. Current valid values are 'user', 'tap',
2441 # 'vde', 'socket', 'dump' and 'bridge'
2442 #
2443 # @id: the name of the new network backend
2444 #
2445 # @props: #optional a list of properties to be passed to the backend in
2446 # the format 'name=value', like 'ifname=tap0,script=no'
2447 #
2448 # Notes: The semantics of @props is not well defined. Future commands will be
2449 # introduced that provide stronger typing for backend creation.
2450 #
2451 # Since: 0.14.0
2452 #
2453 # Returns: Nothing on success
2454 # If @type is not a valid network backend, DeviceNotFound
2455 ##
2456 { 'command': 'netdev_add',
2457 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2458 'gen': 'no' }
2459
2460 ##
2461 # @netdev_del:
2462 #
2463 # Remove a network backend.
2464 #
2465 # @id: the name of the network backend to remove
2466 #
2467 # Returns: Nothing on success
2468 # If @id is not a valid network backend, DeviceNotFound
2469 #
2470 # Since: 0.14.0
2471 ##
2472 { 'command': 'netdev_del', 'data': {'id': 'str'} }
2473
2474 ##
2475 # @NetdevNoneOptions
2476 #
2477 # Use it alone to have zero network devices.
2478 #
2479 # Since 1.2
2480 ##
2481 { 'type': 'NetdevNoneOptions',
2482 'data': { } }
2483
2484 ##
2485 # @NetLegacyNicOptions
2486 #
2487 # Create a new Network Interface Card.
2488 #
2489 # @netdev: #optional id of -netdev to connect to
2490 #
2491 # @macaddr: #optional MAC address
2492 #
2493 # @model: #optional device model (e1000, rtl8139, virtio etc.)
2494 #
2495 # @addr: #optional PCI device address
2496 #
2497 # @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2498 #
2499 # Since 1.2
2500 ##
2501 { 'type': 'NetLegacyNicOptions',
2502 'data': {
2503 '*netdev': 'str',
2504 '*macaddr': 'str',
2505 '*model': 'str',
2506 '*addr': 'str',
2507 '*vectors': 'uint32' } }
2508
2509 ##
2510 # @String
2511 #
2512 # A fat type wrapping 'str', to be embedded in lists.
2513 #
2514 # Since 1.2
2515 ##
2516 { 'type': 'String',
2517 'data': {
2518 'str': 'str' } }
2519
2520 ##
2521 # @NetdevUserOptions
2522 #
2523 # Use the user mode network stack which requires no administrator privilege to
2524 # run.
2525 #
2526 # @hostname: #optional client hostname reported by the builtin DHCP server
2527 #
2528 # @restrict: #optional isolate the guest from the host
2529 #
2530 # @ip: #optional legacy parameter, use net= instead
2531 #
2532 # @net: #optional IP address and optional netmask
2533 #
2534 # @host: #optional guest-visible address of the host
2535 #
2536 # @tftp: #optional root directory of the built-in TFTP server
2537 #
2538 # @bootfile: #optional BOOTP filename, for use with tftp=
2539 #
2540 # @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2541 # assign
2542 #
2543 # @dns: #optional guest-visible address of the virtual nameserver
2544 #
2545 # @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2546 # to the guest
2547 #
2548 # @smb: #optional root directory of the built-in SMB server
2549 #
2550 # @smbserver: #optional IP address of the built-in SMB server
2551 #
2552 # @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2553 # endpoints
2554 #
2555 # @guestfwd: #optional forward guest TCP connections
2556 #
2557 # Since 1.2
2558 ##
2559 { 'type': 'NetdevUserOptions',
2560 'data': {
2561 '*hostname': 'str',
2562 '*restrict': 'bool',
2563 '*ip': 'str',
2564 '*net': 'str',
2565 '*host': 'str',
2566 '*tftp': 'str',
2567 '*bootfile': 'str',
2568 '*dhcpstart': 'str',
2569 '*dns': 'str',
2570 '*dnssearch': ['String'],
2571 '*smb': 'str',
2572 '*smbserver': 'str',
2573 '*hostfwd': ['String'],
2574 '*guestfwd': ['String'] } }
2575
2576 ##
2577 # @NetdevTapOptions
2578 #
2579 # Connect the host TAP network interface name to the VLAN.
2580 #
2581 # @ifname: #optional interface name
2582 #
2583 # @fd: #optional file descriptor of an already opened tap
2584 #
2585 # @fds: #optional multiple file descriptors of already opened multiqueue capable
2586 # tap
2587 #
2588 # @script: #optional script to initialize the interface
2589 #
2590 # @downscript: #optional script to shut down the interface
2591 #
2592 # @helper: #optional command to execute to configure bridge
2593 #
2594 # @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2595 #
2596 # @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2597 #
2598 # @vhost: #optional enable vhost-net network accelerator
2599 #
2600 # @vhostfd: #optional file descriptor of an already opened vhost net device
2601 #
2602 # @vhostfds: #optional file descriptors of multiple already opened vhost net
2603 # devices
2604 #
2605 # @vhostforce: #optional vhost on for non-MSIX virtio guests
2606 #
2607 # @queues: #optional number of queues to be created for multiqueue capable tap
2608 #
2609 # Since 1.2
2610 ##
2611 { 'type': 'NetdevTapOptions',
2612 'data': {
2613 '*ifname': 'str',
2614 '*fd': 'str',
2615 '*fds': 'str',
2616 '*script': 'str',
2617 '*downscript': 'str',
2618 '*helper': 'str',
2619 '*sndbuf': 'size',
2620 '*vnet_hdr': 'bool',
2621 '*vhost': 'bool',
2622 '*vhostfd': 'str',
2623 '*vhostfds': 'str',
2624 '*vhostforce': 'bool',
2625 '*queues': 'uint32'} }
2626
2627 ##
2628 # @NetdevSocketOptions
2629 #
2630 # Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2631 # socket connection.
2632 #
2633 # @fd: #optional file descriptor of an already opened socket
2634 #
2635 # @listen: #optional port number, and optional hostname, to listen on
2636 #
2637 # @connect: #optional port number, and optional hostname, to connect to
2638 #
2639 # @mcast: #optional UDP multicast address and port number
2640 #
2641 # @localaddr: #optional source address and port for multicast and udp packets
2642 #
2643 # @udp: #optional UDP unicast address and port number
2644 #
2645 # Since 1.2
2646 ##
2647 { 'type': 'NetdevSocketOptions',
2648 'data': {
2649 '*fd': 'str',
2650 '*listen': 'str',
2651 '*connect': 'str',
2652 '*mcast': 'str',
2653 '*localaddr': 'str',
2654 '*udp': 'str' } }
2655
2656 ##
2657 # @NetdevVdeOptions
2658 #
2659 # Connect the VLAN to a vde switch running on the host.
2660 #
2661 # @sock: #optional socket path
2662 #
2663 # @port: #optional port number
2664 #
2665 # @group: #optional group owner of socket
2666 #
2667 # @mode: #optional permissions for socket
2668 #
2669 # Since 1.2
2670 ##
2671 { 'type': 'NetdevVdeOptions',
2672 'data': {
2673 '*sock': 'str',
2674 '*port': 'uint16',
2675 '*group': 'str',
2676 '*mode': 'uint16' } }
2677
2678 ##
2679 # @NetdevDumpOptions
2680 #
2681 # Dump VLAN network traffic to a file.
2682 #
2683 # @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2684 # suffixes.
2685 #
2686 # @file: #optional dump file path (default is qemu-vlan0.pcap)
2687 #
2688 # Since 1.2
2689 ##
2690 { 'type': 'NetdevDumpOptions',
2691 'data': {
2692 '*len': 'size',
2693 '*file': 'str' } }
2694
2695 ##
2696 # @NetdevBridgeOptions
2697 #
2698 # Connect a host TAP network interface to a host bridge device.
2699 #
2700 # @br: #optional bridge name
2701 #
2702 # @helper: #optional command to execute to configure bridge
2703 #
2704 # Since 1.2
2705 ##
2706 { 'type': 'NetdevBridgeOptions',
2707 'data': {
2708 '*br': 'str',
2709 '*helper': 'str' } }
2710
2711 ##
2712 # @NetdevHubPortOptions
2713 #
2714 # Connect two or more net clients through a software hub.
2715 #
2716 # @hubid: hub identifier number
2717 #
2718 # Since 1.2
2719 ##
2720 { 'type': 'NetdevHubPortOptions',
2721 'data': {
2722 'hubid': 'int32' } }
2723
2724 ##
2725 # @NetClientOptions
2726 #
2727 # A discriminated record of network device traits.
2728 #
2729 # Since 1.2
2730 ##
2731 { 'union': 'NetClientOptions',
2732 'data': {
2733 'none': 'NetdevNoneOptions',
2734 'nic': 'NetLegacyNicOptions',
2735 'user': 'NetdevUserOptions',
2736 'tap': 'NetdevTapOptions',
2737 'socket': 'NetdevSocketOptions',
2738 'vde': 'NetdevVdeOptions',
2739 'dump': 'NetdevDumpOptions',
2740 'bridge': 'NetdevBridgeOptions',
2741 'hubport': 'NetdevHubPortOptions' } }
2742
2743 ##
2744 # @NetLegacy
2745 #
2746 # Captures the configuration of a network device; legacy.
2747 #
2748 # @vlan: #optional vlan number
2749 #
2750 # @id: #optional identifier for monitor commands
2751 #
2752 # @name: #optional identifier for monitor commands, ignored if @id is present
2753 #
2754 # @opts: device type specific properties (legacy)
2755 #
2756 # Since 1.2
2757 ##
2758 { 'type': 'NetLegacy',
2759 'data': {
2760 '*vlan': 'int32',
2761 '*id': 'str',
2762 '*name': 'str',
2763 'opts': 'NetClientOptions' } }
2764
2765 ##
2766 # @Netdev
2767 #
2768 # Captures the configuration of a network device.
2769 #
2770 # @id: identifier for monitor commands.
2771 #
2772 # @opts: device type specific properties
2773 #
2774 # Since 1.2
2775 ##
2776 { 'type': 'Netdev',
2777 'data': {
2778 'id': 'str',
2779 'opts': 'NetClientOptions' } }
2780
2781 ##
2782 # @InetSocketAddress
2783 #
2784 # Captures a socket address or address range in the Internet namespace.
2785 #
2786 # @host: host part of the address
2787 #
2788 # @port: port part of the address, or lowest port if @to is present
2789 #
2790 # @to: highest port to try
2791 #
2792 # @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2793 # #optional
2794 #
2795 # @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2796 # #optional
2797 #
2798 # Since 1.3
2799 ##
2800 { 'type': 'InetSocketAddress',
2801 'data': {
2802 'host': 'str',
2803 'port': 'str',
2804 '*to': 'uint16',
2805 '*ipv4': 'bool',
2806 '*ipv6': 'bool' } }
2807
2808 ##
2809 # @UnixSocketAddress
2810 #
2811 # Captures a socket address in the local ("Unix socket") namespace.
2812 #
2813 # @path: filesystem path to use
2814 #
2815 # Since 1.3
2816 ##
2817 { 'type': 'UnixSocketAddress',
2818 'data': {
2819 'path': 'str' } }
2820
2821 ##
2822 # @SocketAddress
2823 #
2824 # Captures the address of a socket, which could also be a named file descriptor
2825 #
2826 # Since 1.3
2827 ##
2828 { 'union': 'SocketAddress',
2829 'data': {
2830 'inet': 'InetSocketAddress',
2831 'unix': 'UnixSocketAddress',
2832 'fd': 'String' } }
2833
2834 ##
2835 # @getfd:
2836 #
2837 # Receive a file descriptor via SCM rights and assign it a name
2838 #
2839 # @fdname: file descriptor name
2840 #
2841 # Returns: Nothing on success
2842 #
2843 # Since: 0.14.0
2844 #
2845 # Notes: If @fdname already exists, the file descriptor assigned to
2846 # it will be closed and replaced by the received file
2847 # descriptor.
2848 # The 'closefd' command can be used to explicitly close the
2849 # file descriptor when it is no longer needed.
2850 ##
2851 { 'command': 'getfd', 'data': {'fdname': 'str'} }
2852
2853 ##
2854 # @closefd:
2855 #
2856 # Close a file descriptor previously passed via SCM rights
2857 #
2858 # @fdname: file descriptor name
2859 #
2860 # Returns: Nothing on success
2861 #
2862 # Since: 0.14.0
2863 ##
2864 { 'command': 'closefd', 'data': {'fdname': 'str'} }
2865
2866 ##
2867 # @MachineInfo:
2868 #
2869 # Information describing a machine.
2870 #
2871 # @name: the name of the machine
2872 #
2873 # @alias: #optional an alias for the machine name
2874 #
2875 # @default: #optional whether the machine is default
2876 #
2877 # @cpu-max: maximum number of CPUs supported by the machine type
2878 # (since 1.5.0)
2879 #
2880 # Since: 1.2.0
2881 ##
2882 { 'type': 'MachineInfo',
2883 'data': { 'name': 'str', '*alias': 'str',
2884 '*is-default': 'bool', 'cpu-max': 'int' } }
2885
2886 ##
2887 # @query-machines:
2888 #
2889 # Return a list of supported machines
2890 #
2891 # Returns: a list of MachineInfo
2892 #
2893 # Since: 1.2.0
2894 ##
2895 { 'command': 'query-machines', 'returns': ['MachineInfo'] }
2896
2897 ##
2898 # @CpuDefinitionInfo:
2899 #
2900 # Virtual CPU definition.
2901 #
2902 # @name: the name of the CPU definition
2903 #
2904 # Since: 1.2.0
2905 ##
2906 { 'type': 'CpuDefinitionInfo',
2907 'data': { 'name': 'str' } }
2908
2909 ##
2910 # @query-cpu-definitions:
2911 #
2912 # Return a list of supported virtual CPU definitions
2913 #
2914 # Returns: a list of CpuDefInfo
2915 #
2916 # Since: 1.2.0
2917 ##
2918 { 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
2919
2920 # @AddfdInfo:
2921 #
2922 # Information about a file descriptor that was added to an fd set.
2923 #
2924 # @fdset-id: The ID of the fd set that @fd was added to.
2925 #
2926 # @fd: The file descriptor that was received via SCM rights and
2927 # added to the fd set.
2928 #
2929 # Since: 1.2.0
2930 ##
2931 { 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2932
2933 ##
2934 # @add-fd:
2935 #
2936 # Add a file descriptor, that was passed via SCM rights, to an fd set.
2937 #
2938 # @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2939 #
2940 # @opaque: #optional A free-form string that can be used to describe the fd.
2941 #
2942 # Returns: @AddfdInfo on success
2943 # If file descriptor was not received, FdNotSupplied
2944 # If @fdset-id is a negative value, InvalidParameterValue
2945 #
2946 # Notes: The list of fd sets is shared by all monitor connections.
2947 #
2948 # If @fdset-id is not specified, a new fd set will be created.
2949 #
2950 # Since: 1.2.0
2951 ##
2952 { 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2953 'returns': 'AddfdInfo' }
2954
2955 ##
2956 # @remove-fd:
2957 #
2958 # Remove a file descriptor from an fd set.
2959 #
2960 # @fdset-id: The ID of the fd set that the file descriptor belongs to.
2961 #
2962 # @fd: #optional The file descriptor that is to be removed.
2963 #
2964 # Returns: Nothing on success
2965 # If @fdset-id or @fd is not found, FdNotFound
2966 #
2967 # Since: 1.2.0
2968 #
2969 # Notes: The list of fd sets is shared by all monitor connections.
2970 #
2971 # If @fd is not specified, all file descriptors in @fdset-id
2972 # will be removed.
2973 ##
2974 { 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2975
2976 ##
2977 # @FdsetFdInfo:
2978 #
2979 # Information about a file descriptor that belongs to an fd set.
2980 #
2981 # @fd: The file descriptor value.
2982 #
2983 # @opaque: #optional A free-form string that can be used to describe the fd.
2984 #
2985 # Since: 1.2.0
2986 ##
2987 { 'type': 'FdsetFdInfo',
2988 'data': {'fd': 'int', '*opaque': 'str'} }
2989
2990 ##
2991 # @FdsetInfo:
2992 #
2993 # Information about an fd set.
2994 #
2995 # @fdset-id: The ID of the fd set.
2996 #
2997 # @fds: A list of file descriptors that belong to this fd set.
2998 #
2999 # Since: 1.2.0
3000 ##
3001 { 'type': 'FdsetInfo',
3002 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3003
3004 ##
3005 # @query-fdsets:
3006 #
3007 # Return information describing all fd sets.
3008 #
3009 # Returns: A list of @FdsetInfo
3010 #
3011 # Since: 1.2.0
3012 #
3013 # Note: The list of fd sets is shared by all monitor connections.
3014 #
3015 ##
3016 { 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
3017
3018 ##
3019 # @TargetInfo:
3020 #
3021 # Information describing the QEMU target.
3022 #
3023 # @arch: the target architecture (eg "x86_64", "i386", etc)
3024 #
3025 # Since: 1.2.0
3026 ##
3027 { 'type': 'TargetInfo',
3028 'data': { 'arch': 'str' } }
3029
3030 ##
3031 # @query-target:
3032 #
3033 # Return information about the target for this QEMU
3034 #
3035 # Returns: TargetInfo
3036 #
3037 # Since: 1.2.0
3038 ##
3039 { 'command': 'query-target', 'returns': 'TargetInfo' }
3040
3041 ##
3042 # @QKeyCode:
3043 #
3044 # An enumeration of key name.
3045 #
3046 # This is used by the send-key command.
3047 #
3048 # Since: 1.3.0
3049 ##
3050 { 'enum': 'QKeyCode',
3051 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3052 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3053 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3054 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3055 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3056 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3057 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3058 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3059 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3060 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3061 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3062 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3063 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3064 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3065 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
3066
3067 ##
3068 # @KeyValue
3069 #
3070 # Represents a keyboard key.
3071 #
3072 # Since: 1.3.0
3073 ##
3074 { 'union': 'KeyValue',
3075 'data': {
3076 'number': 'int',
3077 'qcode': 'QKeyCode' } }
3078
3079 ##
3080 # @send-key:
3081 #
3082 # Send keys to guest.
3083 #
3084 # @keys: An array of @KeyValue elements. All @KeyValues in this array are
3085 # simultaneously sent to the guest. A @KeyValue.number value is sent
3086 # directly to the guest, while @KeyValue.qcode must be a valid
3087 # @QKeyCode value
3088 #
3089 # @hold-time: #optional time to delay key up events, milliseconds. Defaults
3090 # to 100
3091 #
3092 # Returns: Nothing on success
3093 # If key is unknown or redundant, InvalidParameter
3094 #
3095 # Since: 1.3.0
3096 #
3097 ##
3098 { 'command': 'send-key',
3099 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
3100
3101 ##
3102 # @screendump:
3103 #
3104 # Write a PPM of the VGA screen to a file.
3105 #
3106 # @filename: the path of a new PPM file to store the image
3107 #
3108 # Returns: Nothing on success
3109 #
3110 # Since: 0.14.0
3111 ##
3112 { 'command': 'screendump', 'data': {'filename': 'str'} }
3113
3114 ##
3115 # @nbd-server-start:
3116 #
3117 # Start an NBD server listening on the given host and port. Block
3118 # devices can then be exported using @nbd-server-add. The NBD
3119 # server will present them as named exports; for example, another
3120 # QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3121 #
3122 # @addr: Address on which to listen.
3123 #
3124 # Returns: error if the server is already running.
3125 #
3126 # Since: 1.3.0
3127 ##
3128 { 'command': 'nbd-server-start',
3129 'data': { 'addr': 'SocketAddress' } }
3130
3131 ##
3132 # @nbd-server-add:
3133 #
3134 # Export a device to QEMU's embedded NBD server.
3135 #
3136 # @device: Block device to be exported
3137 #
3138 # @writable: Whether clients should be able to write to the device via the
3139 # NBD connection (default false). #optional
3140 #
3141 # Returns: error if the device is already marked for export.
3142 #
3143 # Since: 1.3.0
3144 ##
3145 { 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3146
3147 ##
3148 # @nbd-server-stop:
3149 #
3150 # Stop QEMU's embedded NBD server, and unregister all devices previously
3151 # added via @nbd-server-add.
3152 #
3153 # Since: 1.3.0
3154 ##
3155 { 'command': 'nbd-server-stop' }
3156
3157 ##
3158 # @ChardevFile:
3159 #
3160 # Configuration info for file chardevs.
3161 #
3162 # @in: #optional The name of the input file
3163 # @out: The name of the output file
3164 #
3165 # Since: 1.4
3166 ##
3167 { 'type': 'ChardevFile', 'data': { '*in' : 'str',
3168 'out' : 'str' } }
3169
3170 ##
3171 # @ChardevHostdev:
3172 #
3173 # Configuration info for device and pipe chardevs.
3174 #
3175 # @device: The name of the special file for the device,
3176 # i.e. /dev/ttyS0 on Unix or COM1: on Windows
3177 # @type: What kind of device this is.
3178 #
3179 # Since: 1.4
3180 ##
3181 { 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
3182
3183 ##
3184 # @ChardevSocket:
3185 #
3186 # Configuration info for (stream) socket chardevs.
3187 #
3188 # @addr: socket address to listen on (server=true)
3189 # or connect to (server=false)
3190 # @server: #optional create server socket (default: true)
3191 # @wait: #optional wait for connect (not used for server
3192 # sockets, default: false)
3193 # @nodelay: #optional set TCP_NODELAY socket option (default: false)
3194 # @telnet: #optional enable telnet protocol (default: false)
3195 #
3196 # Since: 1.4
3197 ##
3198 { 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3199 '*server' : 'bool',
3200 '*wait' : 'bool',
3201 '*nodelay' : 'bool',
3202 '*telnet' : 'bool' } }
3203
3204 ##
3205 # @ChardevUdp:
3206 #
3207 # Configuration info for datagram socket chardevs.
3208 #
3209 # @remote: remote address
3210 # @local: #optional local address
3211 #
3212 # Since: 1.5
3213 ##
3214 { 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3215 '*local' : 'SocketAddress' } }
3216
3217 ##
3218 # @ChardevMux:
3219 #
3220 # Configuration info for mux chardevs.
3221 #
3222 # @chardev: name of the base chardev.
3223 #
3224 # Since: 1.5
3225 ##
3226 { 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3227
3228 ##
3229 # @ChardevStdio:
3230 #
3231 # Configuration info for stdio chardevs.
3232 #
3233 # @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3234 # be delivered to qemu. Default: true in -nographic mode,
3235 # false otherwise.
3236 #
3237 # Since: 1.5
3238 ##
3239 { 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3240
3241 ##
3242 # @ChardevSpiceChannel:
3243 #
3244 # Configuration info for spice vm channel chardevs.
3245 #
3246 # @type: kind of channel (for example vdagent).
3247 #
3248 # Since: 1.5
3249 ##
3250 { 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3251
3252 ##
3253 # @ChardevSpicePort:
3254 #
3255 # Configuration info for spice port chardevs.
3256 #
3257 # @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3258 #
3259 # Since: 1.5
3260 ##
3261 { 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3262
3263 ##
3264 # @ChardevVC:
3265 #
3266 # Configuration info for virtual console chardevs.
3267 #
3268 # @width: console width, in pixels
3269 # @height: console height, in pixels
3270 # @cols: console width, in chars
3271 # @rows: console height, in chars
3272 #
3273 # Since: 1.5
3274 ##
3275 { 'type': 'ChardevVC', 'data': { '*width' : 'int',
3276 '*height' : 'int',
3277 '*cols' : 'int',
3278 '*rows' : 'int' } }
3279
3280 ##
3281 # @ChardevMemory:
3282 #
3283 # Configuration info for memory chardevs
3284 #
3285 # @size: #optional Ringbuffer size, must be power of two, default is 65536
3286 #
3287 # Since: 1.5
3288 ##
3289 { 'type': 'ChardevMemory', 'data': { '*size' : 'int' } }
3290
3291 ##
3292 # @ChardevBackend:
3293 #
3294 # Configuration info for the new chardev backend.
3295 #
3296 # Since: 1.4
3297 ##
3298 { 'type': 'ChardevDummy', 'data': { } }
3299
3300 { 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
3301 'serial' : 'ChardevHostdev',
3302 'parallel': 'ChardevHostdev',
3303 'pipe' : 'ChardevHostdev',
3304 'socket' : 'ChardevSocket',
3305 'udp' : 'ChardevUdp',
3306 'pty' : 'ChardevDummy',
3307 'null' : 'ChardevDummy',
3308 'mux' : 'ChardevMux',
3309 'msmouse': 'ChardevDummy',
3310 'braille': 'ChardevDummy',
3311 'stdio' : 'ChardevStdio',
3312 'console': 'ChardevDummy',
3313 'spicevmc' : 'ChardevSpiceChannel',
3314 'spiceport' : 'ChardevSpicePort',
3315 'vc' : 'ChardevVC',
3316 'memory' : 'ChardevMemory' } }
3317
3318 ##
3319 # @ChardevReturn:
3320 #
3321 # Return info about the chardev backend just created.
3322 #
3323 # @pty: #optional name of the slave pseudoterminal device, present if
3324 # and only if a chardev of type 'pty' was created
3325 #
3326 # Since: 1.4
3327 ##
3328 { 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
3329
3330 ##
3331 # @chardev-add:
3332 #
3333 # Add a character device backend
3334 #
3335 # @id: the chardev's ID, must be unique
3336 # @backend: backend type and parameters
3337 #
3338 # Returns: ChardevReturn.
3339 #
3340 # Since: 1.4
3341 ##
3342 { 'command': 'chardev-add', 'data': {'id' : 'str',
3343 'backend' : 'ChardevBackend' },
3344 'returns': 'ChardevReturn' }
3345
3346 ##
3347 # @chardev-remove:
3348 #
3349 # Remove a character device backend
3350 #
3351 # @id: the chardev's ID, must exist and not be in use
3352 #
3353 # Returns: Nothing on success
3354 #
3355 # Since: 1.4
3356 ##
3357 { 'command': 'chardev-remove', 'data': {'id': 'str'} }
3358
3359 ##
3360 # @TpmModel:
3361 #
3362 # An enumeration of TPM models
3363 #
3364 # @tpm-tis: TPM TIS model
3365 #
3366 # Since: 1.5
3367 ##
3368 { 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3369
3370 ##
3371 # @query-tpm-models:
3372 #
3373 # Return a list of supported TPM models
3374 #
3375 # Returns: a list of TpmModel
3376 #
3377 # Since: 1.5
3378 ##
3379 { 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3380
3381 ##
3382 # @TpmType:
3383 #
3384 # An enumeration of TPM types
3385 #
3386 # @passthrough: TPM passthrough type
3387 #
3388 # Since: 1.5
3389 ##
3390 { 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3391
3392 ##
3393 # @query-tpm-types:
3394 #
3395 # Return a list of supported TPM types
3396 #
3397 # Returns: a list of TpmType
3398 #
3399 # Since: 1.5
3400 ##
3401 { 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3402
3403 ##
3404 # @TPMPassthroughOptions:
3405 #
3406 # Information about the TPM passthrough type
3407 #
3408 # @path: #optional string describing the path used for accessing the TPM device
3409 #
3410 # @cancel-path: #optional string showing the TPM's sysfs cancel file
3411 # for cancellation of TPM commands while they are executing
3412 #
3413 # Since: 1.5
3414 ##
3415 { 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3416 '*cancel-path' : 'str'} }
3417
3418 ##
3419 # @TpmTypeOptions:
3420 #
3421 # A union referencing different TPM backend types' configuration options
3422 #
3423 # @passthrough: The configuration options for the TPM passthrough type
3424 #
3425 # Since: 1.5
3426 ##
3427 { 'union': 'TpmTypeOptions',
3428 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
3429
3430 ##
3431 # @TpmInfo:
3432 #
3433 # Information about the TPM
3434 #
3435 # @id: The Id of the TPM
3436 #
3437 # @model: The TPM frontend model
3438 #
3439 # @options: The TPM (backend) type configuration options
3440 #
3441 # Since: 1.5
3442 ##
3443 { 'type': 'TPMInfo',
3444 'data': {'id': 'str',
3445 'model': 'TpmModel',
3446 'options': 'TpmTypeOptions' } }
3447
3448 ##
3449 # @query-tpm:
3450 #
3451 # Return information about the TPM device
3452 #
3453 # Returns: @TPMInfo on success
3454 #
3455 # Since: 1.5
3456 ##
3457 { 'command': 'query-tpm', 'returns': ['TPMInfo'] }
3458
3459 ##
3460 # @AcpiTableOptions
3461 #
3462 # Specify an ACPI table on the command line to load.
3463 #
3464 # At most one of @file and @data can be specified. The list of files specified
3465 # by any one of them is loaded and concatenated in order. If both are omitted,
3466 # @data is implied.
3467 #
3468 # Other fields / optargs can be used to override fields of the generic ACPI
3469 # table header; refer to the ACPI specification 5.0, section 5.2.6 System
3470 # Description Table Header. If a header field is not overridden, then the
3471 # corresponding value from the concatenated blob is used (in case of @file), or
3472 # it is filled in with a hard-coded value (in case of @data).
3473 #
3474 # String fields are copied into the matching ACPI member from lowest address
3475 # upwards, and silently truncated / NUL-padded to length.
3476 #
3477 # @sig: #optional table signature / identifier (4 bytes)
3478 #
3479 # @rev: #optional table revision number (dependent on signature, 1 byte)
3480 #
3481 # @oem_id: #optional OEM identifier (6 bytes)
3482 #
3483 # @oem_table_id: #optional OEM table identifier (8 bytes)
3484 #
3485 # @oem_rev: #optional OEM-supplied revision number (4 bytes)
3486 #
3487 # @asl_compiler_id: #optional identifier of the utility that created the table
3488 # (4 bytes)
3489 #
3490 # @asl_compiler_rev: #optional revision number of the utility that created the
3491 # table (4 bytes)
3492 #
3493 # @file: #optional colon (:) separated list of pathnames to load and
3494 # concatenate as table data. The resultant binary blob is expected to
3495 # have an ACPI table header. At least one file is required. This field
3496 # excludes @data.
3497 #
3498 # @data: #optional colon (:) separated list of pathnames to load and
3499 # concatenate as table data. The resultant binary blob must not have an
3500 # ACPI table header. At least one file is required. This field excludes
3501 # @file.
3502 #
3503 # Since 1.5
3504 ##
3505 { 'type': 'AcpiTableOptions',
3506 'data': {
3507 '*sig': 'str',
3508 '*rev': 'uint8',
3509 '*oem_id': 'str',
3510 '*oem_table_id': 'str',
3511 '*oem_rev': 'uint32',
3512 '*asl_compiler_id': 'str',
3513 '*asl_compiler_rev': 'uint32',
3514 '*file': 'str',
3515 '*data': 'str' }}
3516
3517 ##
3518 # @CommandLineParameterType:
3519 #
3520 # Possible types for an option parameter.
3521 #
3522 # @string: accepts a character string
3523 #
3524 # @boolean: accepts "on" or "off"
3525 #
3526 # @number: accepts a number
3527 #
3528 # @size: accepts a number followed by an optional suffix (K)ilo,
3529 # (M)ega, (G)iga, (T)era
3530 #
3531 # Since 1.5
3532 ##
3533 { 'enum': 'CommandLineParameterType',
3534 'data': ['string', 'boolean', 'number', 'size'] }
3535
3536 ##
3537 # @CommandLineParameterInfo:
3538 #
3539 # Details about a single parameter of a command line option.
3540 #
3541 # @name: parameter name
3542 #
3543 # @type: parameter @CommandLineParameterType
3544 #
3545 # @help: #optional human readable text string, not suitable for parsing.
3546 #
3547 # Since 1.5
3548 ##
3549 { 'type': 'CommandLineParameterInfo',
3550 'data': { 'name': 'str',
3551 'type': 'CommandLineParameterType',
3552 '*help': 'str' } }
3553
3554 ##
3555 # @CommandLineOptionInfo:
3556 #
3557 # Details about a command line option, including its list of parameter details
3558 #
3559 # @option: option name
3560 #
3561 # @parameters: an array of @CommandLineParameterInfo
3562 #
3563 # Since 1.5
3564 ##
3565 { 'type': 'CommandLineOptionInfo',
3566 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3567
3568 ##
3569 # @query-command-line-options:
3570 #
3571 # Query command line option schema.
3572 #
3573 # @option: #optional option name
3574 #
3575 # Returns: list of @CommandLineOptionInfo for all options (or for the given
3576 # @option). Returns an error if the given @option doesn't exist.
3577 #
3578 # Since 1.5
3579 ##
3580 {'command': 'query-command-line-options', 'data': { '*option': 'str' },
3581 'returns': ['CommandLineOptionInfo'] }
3582
3583 ##
3584 # @X86CPURegister32
3585 #
3586 # A X86 32-bit register
3587 #
3588 # Since: 1.5
3589 ##
3590 { 'enum': 'X86CPURegister32',
3591 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3592
3593 ##
3594 # @X86CPUFeatureWordInfo
3595 #
3596 # Information about a X86 CPU feature word
3597 #
3598 # @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3599 #
3600 # @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3601 # feature word
3602 #
3603 # @cpuid-register: Output register containing the feature bits
3604 #
3605 # @features: value of output register, containing the feature bits
3606 #
3607 # Since: 1.5
3608 ##
3609 { 'type': 'X86CPUFeatureWordInfo',
3610 'data': { 'cpuid-input-eax': 'int',
3611 '*cpuid-input-ecx': 'int',
3612 'cpuid-register': 'X86CPURegister32',
3613 'features': 'int' } }