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