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