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