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