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