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