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