]> git.proxmox.com Git - mirror_qemu.git/blame - qapi-schema.json
qapi: Add "backing" to BlockStats
[mirror_qemu.git] / qapi-schema.json
CommitLineData
e3193601
AL
1# -*- Mode: Python -*-
2#
3# QAPI Schema
48a32bed 4
dcafd323
LC
5##
6# @ErrorClass
7#
8# QEMU error classes
9#
10# @GenericError: this is used for errors that don't require a specific error
11# class. This should be the default case for most errors
12#
13# @CommandNotFound: the requested command has not been found
14#
15# @DeviceEncrypted: the requested operation can't be fulfilled because the
16# selected device is encrypted
17#
18# @DeviceNotActive: a device has failed to be become active
19#
20# @DeviceNotFound: the requested device has not been found
21#
22# @KVMMissingCap: the requested operation can't be fulfilled because a
23# required KVM capability is missing
24#
dcafd323
LC
25# Since: 1.2
26##
27{ 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
1e998146 29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
dcafd323 30
b224e5e2
LC
31##
32# @add_client
33#
34# Allow client connections for VNC, Spice and socket based
35# character devices to be passed in to QEMU via SCM_RIGHTS.
36#
37# @protocol: protocol name. Valid names are "vnc", "spice" or the
38# name of a character device (eg. from -chardev id=XXXX)
39#
40# @fdname: file descriptor name previously passed via 'getfd' command
41#
42# @skipauth: #optional whether to skip authentication. Only applies
43# to "vnc" and "spice" protocols
44#
45# @tls: #optional whether to perform TLS. Only applies to the "spice"
46# protocol
47#
48# Returns: nothing on success.
49#
50# Since: 0.14.0
51##
52{ 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54 '*tls': 'bool' } }
55
48a32bed
AL
56##
57# @NameInfo:
58#
59# Guest name information.
60#
61# @name: #optional The name of the guest
62#
63# Since 0.14.0
64##
65{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
66
67##
68# @query-name:
69#
70# Return the name information of a guest.
71#
72# Returns: @NameInfo of the guest
73#
74# Since 0.14.0
75##
76{ 'command': 'query-name', 'returns': 'NameInfo' }
b9c15f16
LC
77
78##
79# @VersionInfo:
80#
81# A description of QEMU's version.
82#
83# @qemu.major: The major version of QEMU
84#
85# @qemu.minor: The minor version of QEMU
86#
87# @qemu.micro: The micro version of QEMU. By current convention, a micro
88# version of 50 signifies a development branch. A micro version
89# greater than or equal to 90 signifies a release candidate for
90# the next minor version. A micro version of less than 50
91# signifies a stable release.
92#
93# @package: QEMU will always set this field to an empty string. Downstream
94# versions of QEMU should set this to a non-empty string. The
95# exact format depends on the downstream however it highly
96# recommended that a unique name is used.
97#
98# Since: 0.14.0
99##
100{ 'type': 'VersionInfo',
101 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102 'package': 'str'} }
103
104##
105# @query-version:
106#
107# Returns the current version of QEMU.
108#
109# Returns: A @VersionInfo object describing the current version of QEMU.
110#
111# Since: 0.14.0
112##
113{ 'command': 'query-version', 'returns': 'VersionInfo' }
292a2602
LC
114
115##
116# @KvmInfo:
117#
118# Information about support for KVM acceleration
119#
120# @enabled: true if KVM acceleration is active
121#
122# @present: true if KVM acceleration is built into this executable
123#
124# Since: 0.14.0
125##
126{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
127
128##
129# @query-kvm:
130#
131# Returns information about KVM acceleration
132#
133# Returns: @KvmInfo
134#
135# Since: 0.14.0
136##
137{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
138
1fa9a5e4
LC
139##
140# @RunState
141#
6932a69b 142# An enumeration of VM run states.
1fa9a5e4
LC
143#
144# @debug: QEMU is running on a debugger
145#
0a24c7b1
LC
146# @finish-migrate: guest is paused to finish the migration process
147#
1e998146
PB
148# @inmigrate: guest is paused waiting for an incoming migration. Note
149# that this state does not tell whether the machine will start at the
150# end of the migration. This depends on the command-line -S option and
151# any invocation of 'stop' or 'cont' that has happened since QEMU was
152# started.
1fa9a5e4
LC
153#
154# @internal-error: An internal error that prevents further guest execution
155# has occurred
156#
157# @io-error: the last IOP has failed and the device is configured to pause
158# on I/O errors
159#
160# @paused: guest has been paused via the 'stop' command
161#
162# @postmigrate: guest is paused following a successful 'migrate'
163#
164# @prelaunch: QEMU was started with -S and guest has not started
165#
1fa9a5e4
LC
166# @restore-vm: guest is paused to restore VM state
167#
168# @running: guest is actively running
169#
170# @save-vm: guest is paused to save the VM state
171#
172# @shutdown: guest is shut down (and -no-shutdown is in use)
173#
ad02b96a
LC
174# @suspended: guest is suspended (ACPI S3)
175#
1fa9a5e4 176# @watchdog: the watchdog action is configured to pause and has been triggered
ede085b3
HT
177#
178# @guest-panicked: guest has been panicked as a result of guest OS panic
1fa9a5e4
LC
179##
180{ 'enum': 'RunState',
181 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
ede085b3
HT
183 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184 'guest-panicked' ] }
1fa9a5e4 185
c249ee68
BC
186##
187# @SnapshotInfo
188#
189# @id: unique snapshot id
190#
191# @name: user chosen name
192#
193# @vm-state-size: size of the VM state
194#
195# @date-sec: UTC date of the snapshot in seconds
196#
197# @date-nsec: fractional part in nano seconds to be used with date-sec
198#
199# @vm-clock-sec: VM clock relative to boot in seconds
200#
201# @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
202#
203# Since: 1.3
204#
205##
206
207{ 'type': 'SnapshotInfo',
208 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
209 'date-sec': 'int', 'date-nsec': 'int',
210 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
211
37764dfb
HR
212##
213# @ImageInfoSpecificQCow2:
214#
215# @compat: compatibility level
216#
217# @lazy-refcounts: #optional on or off; only valid for compat >= 1.1
218#
219# Since: 1.7
220##
221{ 'type': 'ImageInfoSpecificQCow2',
222 'data': {
223 'compat': 'str',
224 '*lazy-refcounts': 'bool'
225 } }
226
f4c129a3
FZ
227##
228# @ImageInfoSpecificVmdk:
229#
a9a443c8 230# @create-type: The create type of VMDK image
f4c129a3
FZ
231#
232# @cid: Content id of image
233#
234# @parent-cid: Parent VMDK image's cid
235#
236# @extents: List of extent files
237#
238# Since: 1.7
239##
240{ 'type': 'ImageInfoSpecificVmdk',
241 'data': {
242 'create-type': 'str',
243 'cid': 'int',
244 'parent-cid': 'int',
245 'extents': ['ImageInfo']
246 } }
247
f2bb8a8a
HR
248##
249# @ImageInfoSpecific:
250#
251# A discriminated record of image format specific information structures.
252#
253# Since: 1.7
254##
255
256{ 'union': 'ImageInfoSpecific',
257 'data': {
f4c129a3
FZ
258 'qcow2': 'ImageInfoSpecificQCow2',
259 'vmdk': 'ImageInfoSpecificVmdk'
f2bb8a8a
HR
260 } }
261
c249ee68
BC
262##
263# @ImageInfo:
264#
265# Information about a QEMU image file
266#
267# @filename: name of the image file
268#
269# @format: format of the image file
270#
271# @virtual-size: maximum capacity in bytes of the image
272#
273# @actual-size: #optional actual size on disk in bytes of the image
274#
275# @dirty-flag: #optional true if image is not cleanly closed
276#
277# @cluster-size: #optional size of a cluster in bytes
278#
279# @encrypted: #optional true if the image is encrypted
280#
cbe82d7f
FZ
281# @compressed: #optional true if the image is compressed (Since 1.7)
282#
c249ee68
BC
283# @backing-filename: #optional name of the backing file
284#
285# @full-backing-filename: #optional full path of the backing file
286#
287# @backing-filename-format: #optional the format of the backing file
288#
289# @snapshots: #optional list of VM snapshots
290#
553a7e87
WX
291# @backing-image: #optional info of the backing image (since 1.6)
292#
f2bb8a8a
HR
293# @format-specific: #optional structure supplying additional format-specific
294# information (since 1.7)
295#
c249ee68
BC
296# Since: 1.3
297#
298##
299
300{ 'type': 'ImageInfo',
301 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
302 '*actual-size': 'int', 'virtual-size': 'int',
cbe82d7f 303 '*cluster-size': 'int', '*encrypted': 'bool', '*compressed': 'bool',
c249ee68 304 '*backing-filename': 'str', '*full-backing-filename': 'str',
553a7e87 305 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'],
f2bb8a8a
HR
306 '*backing-image': 'ImageInfo',
307 '*format-specific': 'ImageInfoSpecific' } }
c249ee68 308
8599ea4c
FS
309##
310# @ImageCheck:
311#
312# Information about a QEMU image file check
313#
314# @filename: name of the image file checked
315#
316# @format: format of the image file checked
317#
318# @check-errors: number of unexpected errors occurred during check
319#
320# @image-end-offset: #optional offset (in bytes) where the image ends, this
321# field is present if the driver for the image format
322# supports it
323#
324# @corruptions: #optional number of corruptions found during the check if any
325#
326# @leaks: #optional number of leaks found during the check if any
327#
328# @corruptions-fixed: #optional number of corruptions fixed during the check
329# if any
330#
331# @leaks-fixed: #optional number of leaks fixed during the check if any
332#
333# @total-clusters: #optional total number of clusters, this field is present
334# if the driver for the image format supports it
335#
336# @allocated-clusters: #optional total number of allocated clusters, this
337# field is present if the driver for the image format
338# supports it
339#
340# @fragmented-clusters: #optional total number of fragmented clusters, this
341# field is present if the driver for the image format
342# supports it
343#
e6439d78
SH
344# @compressed-clusters: #optional total number of compressed clusters, this
345# field is present if the driver for the image format
346# supports it
347#
8599ea4c
FS
348# Since: 1.4
349#
350##
351
352{ 'type': 'ImageCheck',
353 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
354 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
355 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
356 '*total-clusters': 'int', '*allocated-clusters': 'int',
e6439d78 357 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
8599ea4c 358
1fa9a5e4
LC
359##
360# @StatusInfo:
361#
362# Information about VCPU run state
363#
364# @running: true if all VCPUs are runnable, false if not runnable
365#
366# @singlestep: true if VCPUs are in single-step mode
367#
368# @status: the virtual machine @RunState
369#
370# Since: 0.14.0
371#
372# Notes: @singlestep is enabled through the GDB stub
373##
374{ 'type': 'StatusInfo',
375 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
376
377##
378# @query-status:
379#
380# Query the run status of all VCPUs
381#
382# Returns: @StatusInfo reflecting all VCPUs
383#
384# Since: 0.14.0
385##
386{ 'command': 'query-status', 'returns': 'StatusInfo' }
387
efab767e
LC
388##
389# @UuidInfo:
390#
391# Guest UUID information.
392#
393# @UUID: the UUID of the guest
394#
395# Since: 0.14.0
396#
397# Notes: If no UUID was specified for the guest, a null UUID is returned.
398##
399{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
400
401##
402# @query-uuid:
403#
404# Query the guest UUID information.
405#
406# Returns: The @UuidInfo for the guest
407#
408# Since 0.14.0
409##
410{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
411
c5a415a0
LC
412##
413# @ChardevInfo:
414#
415# Information about a character device.
416#
417# @label: the label of the character device
418#
419# @filename: the filename of the character device
420#
421# Notes: @filename is encoded using the QEMU command line character device
422# encoding. See the QEMU man page for details.
423#
424# Since: 0.14.0
425##
426{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
427
428##
429# @query-chardev:
430#
431# Returns information about current character devices.
432#
433# Returns: a list of @ChardevInfo
434#
435# Since: 0.14.0
436##
437{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
aa9b79bc 438
1f590cf9
LL
439##
440# @DataFormat:
441#
442# An enumeration of data format.
443#
3949e594 444# @utf8: Data is a UTF-8 string (RFC 3629)
1f590cf9 445#
3949e594 446# @base64: Data is Base64 encoded binary (RFC 3548)
1f590cf9
LL
447#
448# Since: 1.4
449##
ad0f171e 450{ 'enum': 'DataFormat',
1f590cf9
LL
451 'data': [ 'utf8', 'base64' ] }
452
453##
3949e594 454# @ringbuf-write:
1f590cf9 455#
3949e594 456# Write to a ring buffer character device.
1f590cf9 457#
3949e594 458# @device: the ring buffer character device name
1f590cf9 459#
3949e594 460# @data: data to write
1f590cf9 461#
3949e594
MA
462# @format: #optional data encoding (default 'utf8').
463# - base64: data must be base64 encoded text. Its binary
464# decoding gets written.
465# Bug: invalid base64 is currently not rejected.
466# Whitespace *is* invalid.
467# - utf8: data's UTF-8 encoding is written
468# - data itself is always Unicode regardless of format, like
469# any other string.
1f590cf9
LL
470#
471# Returns: Nothing on success
1f590cf9
LL
472#
473# Since: 1.4
474##
3949e594 475{ 'command': 'ringbuf-write',
82e59a67 476 'data': {'device': 'str', 'data': 'str',
1f590cf9
LL
477 '*format': 'DataFormat'} }
478
49b6d722 479##
3949e594 480# @ringbuf-read:
49b6d722 481#
3949e594 482# Read from a ring buffer character device.
49b6d722 483#
3949e594 484# @device: the ring buffer character device name
49b6d722 485#
3949e594 486# @size: how many bytes to read at most
49b6d722 487#
3949e594
MA
488# @format: #optional data encoding (default 'utf8').
489# - base64: the data read is returned in base64 encoding.
490# - utf8: the data read is interpreted as UTF-8.
491# Bug: can screw up when the buffer contains invalid UTF-8
492# sequences, NUL characters, after the ring buffer lost
493# data, and when reading stops because the size limit is
494# reached.
495# - The return value is always Unicode regardless of format,
496# like any other string.
49b6d722 497#
3ab651fc 498# Returns: data read from the device
49b6d722
LL
499#
500# Since: 1.4
501##
3949e594 502{ 'command': 'ringbuf-read',
49b6d722 503 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
3ab651fc 504 'returns': 'str' }
49b6d722 505
aa9b79bc
LC
506##
507# @CommandInfo:
508#
509# Information about a QMP command
510#
511# @name: The command name
512#
513# Since: 0.14.0
514##
515{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
516
517##
518# @query-commands:
519#
520# Return a list of supported QMP commands by this server
521#
522# Returns: A list of @CommandInfo for all supported commands
523#
524# Since: 0.14.0
525##
526{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
527
4860853d
DB
528##
529# @EventInfo:
530#
531# Information about a QMP event
532#
533# @name: The event name
534#
535# Since: 1.2.0
536##
537{ 'type': 'EventInfo', 'data': {'name': 'str'} }
538
539##
540# @query-events:
541#
542# Return a list of supported QMP events by this server
543#
544# Returns: A list of @EventInfo for all supported events
545#
546# Since: 1.2.0
547##
548{ 'command': 'query-events', 'returns': ['EventInfo'] }
549
791e7c82
LC
550##
551# @MigrationStats
552#
553# Detailed migration status.
554#
555# @transferred: amount of bytes already transferred to the target VM
556#
557# @remaining: amount of bytes remaining to be transferred to the target VM
558#
559# @total: total amount of bytes involved in the migration process
560#
f1c72795
PL
561# @duplicate: number of duplicate (zero) pages (since 1.2)
562#
563# @skipped: number of skipped zero pages (since 1.5)
004d4c10
OW
564#
565# @normal : number of normal pages (since 1.2)
566#
8d017193
JQ
567# @normal-bytes: number of normal bytes sent (since 1.2)
568#
569# @dirty-pages-rate: number of pages dirtied by second by the
570# guest (since 1.3)
004d4c10 571#
7e114f8c
MH
572# @mbps: throughput in megabits/sec. (since 1.6)
573#
004d4c10 574# Since: 0.14.0
791e7c82
LC
575##
576{ 'type': 'MigrationStats',
d5f8a570 577 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
f1c72795 578 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
7e114f8c
MH
579 'normal-bytes': 'int', 'dirty-pages-rate' : 'int',
580 'mbps' : 'number' } }
791e7c82 581
f36d55af
OW
582##
583# @XBZRLECacheStats
584#
585# Detailed XBZRLE migration cache statistics
586#
587# @cache-size: XBZRLE cache size
588#
589# @bytes: amount of bytes already transferred to the target VM
590#
591# @pages: amount of pages transferred to the target VM
592#
593# @cache-miss: number of cache miss
594#
595# @overflow: number of overflows
596#
597# Since: 1.2
598##
599{ 'type': 'XBZRLECacheStats',
600 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
601 'cache-miss': 'int', 'overflow': 'int' } }
602
791e7c82
LC
603##
604# @MigrationInfo
605#
606# Information about current migration process.
607#
608# @status: #optional string describing the current migration status.
609# As of 0.14.0 this can be 'active', 'completed', 'failed' or
610# 'cancelled'. If this field is not returned, no migration process
611# has been initiated
612#
d5f8a570
JQ
613# @ram: #optional @MigrationStats containing detailed migration
614# status, only returned if status is 'active' or
615# 'completed'. 'comppleted' (since 1.2)
791e7c82
LC
616#
617# @disk: #optional @MigrationStats containing detailed disk migration
618# status, only returned if status is 'active' and it is a block
619# migration
620#
f36d55af
OW
621# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
622# migration statistics, only returned if XBZRLE feature is on and
623# status is 'active' or 'completed' (since 1.2)
624#
7aa939af
JQ
625# @total-time: #optional total amount of milliseconds since migration started.
626# If migration has ended, it returns the total migration
627# time. (since 1.2)
628#
9c5a9fcf
JQ
629# @downtime: #optional only present when migration finishes correctly
630# total downtime in milliseconds for the guest.
631# (since 1.3)
632#
2c52ddf1
JQ
633# @expected-downtime: #optional only present while migration is active
634# expected downtime in milliseconds for the guest in last walk
635# of the dirty bitmap. (since 1.3)
636#
ed4fbd10
MH
637# @setup-time: #optional amount of setup time in milliseconds _before_ the
638# iterations begin but _after_ the QMP command is issued. This is designed
639# to provide an accounting of any activities (such as RDMA pinning) which
640# may be expensive, but do not actually occur during the iterative
641# migration rounds themselves. (since 1.6)
642#
791e7c82
LC
643# Since: 0.14.0
644##
645{ 'type': 'MigrationInfo',
646 'data': {'*status': 'str', '*ram': 'MigrationStats',
f36d55af 647 '*disk': 'MigrationStats',
7aa939af 648 '*xbzrle-cache': 'XBZRLECacheStats',
9c5a9fcf 649 '*total-time': 'int',
2c52ddf1 650 '*expected-downtime': 'int',
ed4fbd10
MH
651 '*downtime': 'int',
652 '*setup-time': 'int'} }
791e7c82
LC
653
654##
655# @query-migrate
656#
657# Returns information about current migration process.
658#
659# Returns: @MigrationInfo
660#
661# Since: 0.14.0
662##
663{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
664
bbf6da32
OW
665##
666# @MigrationCapability
667#
668# Migration capabilities enumeration
669#
670# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
671# This feature allows us to minimize migration traffic for certain work
672# loads, by sending compressed difference of the pages
673#
60d9222c
MH
674# @x-rdma-pin-all: Controls whether or not the entire VM memory footprint is
675# mlock()'d on demand or all at once. Refer to docs/rdma.txt for usage.
676# Disabled by default. Experimental: may (or may not) be renamed after
677# further testing is complete. (since 1.6)
678#
323004a3
PL
679# @zero-blocks: During storage migration encode blocks of zeroes efficiently. This
680# essentially saves 1MB of zeroes per block on the wire. Enabling requires
681# source and target VM to support this feature. To enable it is sufficient
682# to enable the capability on the source VM. The feature is disabled by
683# default. (since 1.6)
684#
9781c371
JQ
685# @auto-converge: If enabled, QEMU will automatically throttle down the guest
686# to speed up convergence of RAM migration. (since 1.6)
687#
bbf6da32
OW
688# Since: 1.2
689##
690{ 'enum': 'MigrationCapability',
323004a3 691 'data': ['xbzrle', 'x-rdma-pin-all', 'auto-converge', 'zero-blocks'] }
bbf6da32
OW
692
693##
694# @MigrationCapabilityStatus
695#
696# Migration capability information
697#
698# @capability: capability enum
699#
700# @state: capability state bool
701#
702# Since: 1.2
703##
704{ 'type': 'MigrationCapabilityStatus',
705 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
706
707##
00458433
OW
708# @migrate-set-capabilities
709#
710# Enable/Disable the following migration capabilities (like xbzrle)
711#
712# @capabilities: json array of capability modifications to make
713#
714# Since: 1.2
715##
716{ 'command': 'migrate-set-capabilities',
717 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
718
719##
bbf6da32
OW
720# @query-migrate-capabilities
721#
722# Returns information about the current migration capabilities status
723#
724# Returns: @MigrationCapabilitiesStatus
725#
726# Since: 1.2
727##
728{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
729
e235cec3
LC
730##
731# @MouseInfo:
732#
733# Information about a mouse device.
734#
735# @name: the name of the mouse device
736#
737# @index: the index of the mouse device
738#
739# @current: true if this device is currently receiving mouse events
740#
741# @absolute: true if this device supports absolute coordinates as input
742#
743# Since: 0.14.0
744##
745{ 'type': 'MouseInfo',
746 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
747 'absolute': 'bool'} }
748
749##
750# @query-mice:
751#
752# Returns information about each active mouse device
753#
754# Returns: a list of @MouseInfo for each device
755#
756# Since: 0.14.0
757##
758{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
759
de0b36b6
LC
760##
761# @CpuInfo:
762#
763# Information about a virtual CPU
764#
765# @CPU: the index of the virtual CPU
766#
767# @current: this only exists for backwards compatible and should be ignored
b80e560b 768#
de0b36b6
LC
769# @halted: true if the virtual CPU is in the halt state. Halt usually refers
770# to a processor specific low power mode.
771#
772# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
773# pointer.
774# If the target is Sparc, this is the PC component of the
775# instruction pointer.
776#
777# @nip: #optional If the target is PPC, the instruction pointer
778#
779# @npc: #optional If the target is Sparc, the NPC component of the instruction
780# pointer
781#
782# @PC: #optional If the target is MIPS, the instruction pointer
783#
784# @thread_id: ID of the underlying host thread
785#
786# Since: 0.14.0
787#
788# Notes: @halted is a transient state that changes frequently. By the time the
789# data is sent to the client, the guest may no longer be halted.
790##
791{ 'type': 'CpuInfo',
792 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
793 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
794
795##
796# @query-cpus:
797#
798# Returns a list of information about each virtual CPU.
799#
800# Returns: a list of @CpuInfo for each virtual CPU
801#
802# Since: 0.14.0
803##
804{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
805
b2023818
LC
806##
807# @BlockDeviceInfo:
808#
809# Information about the backing device for a block device.
810#
811# @file: the filename of the backing device
812#
813# @ro: true if the backing device was open read-only
814#
815# @drv: the name of the block format used to open the backing device. As of
816# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
817# 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
818# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
819# 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
820#
821# @backing_file: #optional the name of the backing file (for copy-on-write)
822#
2e3e3317
BC
823# @backing_file_depth: number of files in the backing file chain (since: 1.2)
824#
b2023818
LC
825# @encrypted: true if the backing device is encrypted
826#
c75a1a8a
LC
827# @encryption_key_missing: true if the backing device is encrypted but an
828# valid encryption key is missing
829#
727f005e
ZYW
830# @bps: total throughput limit in bytes per second is specified
831#
832# @bps_rd: read throughput limit in bytes per second is specified
833#
834# @bps_wr: write throughput limit in bytes per second is specified
835#
836# @iops: total I/O operations per second is specified
837#
838# @iops_rd: read I/O operations per second is specified
839#
840# @iops_wr: write I/O operations per second is specified
841#
553a7e87
WX
842# @image: the info of image used (since: 1.6)
843#
3e9fab69
BC
844# @bps_max: #optional total max in bytes (Since 1.7)
845#
846# @bps_rd_max: #optional read max in bytes (Since 1.7)
847#
848# @bps_wr_max: #optional write max in bytes (Since 1.7)
849#
850# @iops_max: #optional total I/O operations max (Since 1.7)
851#
852# @iops_rd_max: #optional read I/O operations max (Since 1.7)
853#
854# @iops_wr_max: #optional write I/O operations max (Since 1.7)
855#
2024c1df
BC
856# @iops_size: #optional an I/O size in bytes (Since 1.7)
857#
b2023818
LC
858# Since: 0.14.0
859#
860# Notes: This interface is only found in @BlockInfo.
861##
862{ 'type': 'BlockDeviceInfo',
863 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
2e3e3317 864 '*backing_file': 'str', 'backing_file_depth': 'int',
c75a1a8a
LC
865 'encrypted': 'bool', 'encryption_key_missing': 'bool',
866 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
553a7e87 867 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
3e9fab69
BC
868 'image': 'ImageInfo',
869 '*bps_max': 'int', '*bps_rd_max': 'int',
870 '*bps_wr_max': 'int', '*iops_max': 'int',
2024c1df
BC
871 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
872 '*iops_size': 'int' } }
b2023818
LC
873
874##
875# @BlockDeviceIoStatus:
876#
877# An enumeration of block device I/O status.
878#
879# @ok: The last I/O operation has succeeded
880#
881# @failed: The last I/O operation has failed
882#
883# @nospace: The last I/O operation has failed due to a no-space condition
884#
885# Since: 1.0
886##
887{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
888
facd6e2b
PB
889##
890# @BlockDeviceMapEntry:
891#
892# Entry in the metadata map of the device (returned by "qemu-img map")
893#
894# @start: Offset in the image of the first byte described by this entry
895# (in bytes)
896#
897# @length: Length of the range described by this entry (in bytes)
898#
899# @depth: Number of layers (0 = top image, 1 = top image's backing file, etc.)
900# before reaching one for which the range is allocated. The value is
901# in the range 0 to the depth of the image chain - 1.
902#
903# @zero: the sectors in this range read as zeros
904#
905# @data: reading the image will actually read data from a file (in particular,
906# if @offset is present this means that the sectors are not simply
907# preallocated, but contain actual data in raw format)
908#
909# @offset: if present, the image file stores the data for this range in
910# raw format at the given offset.
911#
912# Since 1.7
913##
914{ 'type': 'BlockDeviceMapEntry',
915 'data': { 'start': 'int', 'length': 'int', 'depth': 'int', 'zero': 'bool',
916 'data': 'bool', '*offset': 'int' } }
917
b9a9b3a4
PB
918##
919# @BlockDirtyInfo:
920#
921# Block dirty bitmap information.
922#
923# @count: number of dirty bytes according to the dirty bitmap
924#
50717e94
PB
925# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
926#
b9a9b3a4
PB
927# Since: 1.3
928##
929{ 'type': 'BlockDirtyInfo',
50717e94 930 'data': {'count': 'int', 'granularity': 'int'} }
b9a9b3a4 931
b2023818
LC
932##
933# @BlockInfo:
934#
935# Block device information. This structure describes a virtual device and
936# the backing device associated with it.
937#
938# @device: The device name associated with the virtual device.
939#
940# @type: This field is returned only for compatibility reasons, it should
941# not be used (always returns 'unknown')
942#
943# @removable: True if the device supports removable media.
944#
945# @locked: True if the guest has locked this device from having its media
946# removed
947#
948# @tray_open: #optional True if the device has a tray and it is open
949# (only present if removable is true)
950#
21b56835 951# @dirty-bitmaps: #optional dirty bitmaps information (only present if the
01443e13 952# driver has one or more dirty bitmaps) (Since 2.0)
b9a9b3a4 953#
b2023818
LC
954# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
955# supports it and the VM is configured to stop on errors
956#
957# @inserted: #optional @BlockDeviceInfo describing the device if media is
958# present
959#
960# Since: 0.14.0
961##
962{ 'type': 'BlockInfo',
963 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
964 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
b9a9b3a4 965 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
21b56835 966 '*dirty-bitmaps': ['BlockDirtyInfo'] } }
b2023818
LC
967
968##
969# @query-block:
970#
971# Get a list of BlockInfo for all virtual block devices.
972#
973# Returns: a list of @BlockInfo describing each virtual block device
974#
975# Since: 0.14.0
976##
977{ 'command': 'query-block', 'returns': ['BlockInfo'] }
978
f11f57e4
LC
979##
980# @BlockDeviceStats:
981#
982# Statistics of a virtual block device or a block backing device.
983#
984# @rd_bytes: The number of bytes read by the device.
985#
986# @wr_bytes: The number of bytes written by the device.
987#
988# @rd_operations: The number of read operations performed by the device.
989#
990# @wr_operations: The number of write operations performed by the device.
991#
992# @flush_operations: The number of cache flush operations performed by the
993# device (since 0.15.0)
994#
995# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
996# (since 0.15.0).
997#
998# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
999#
1000# @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
1001#
1002# @wr_highest_offset: The offset after the greatest byte written to the
1003# device. The intended use of this information is for
1004# growable sparse files (like qcow2) that are used on top
1005# of a physical device.
1006#
1007# Since: 0.14.0
1008##
1009{ 'type': 'BlockDeviceStats',
1010 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
1011 'wr_operations': 'int', 'flush_operations': 'int',
1012 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
1013 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
1014
1015##
1016# @BlockStats:
1017#
1018# Statistics of a virtual block device or a block backing device.
1019#
1020# @device: #optional If the stats are for a virtual block device, the name
1021# corresponding to the virtual block device.
1022#
1023# @stats: A @BlockDeviceStats for the device.
1024#
c8059b97
FZ
1025# @parent: #optional This describes the file block device if it has one.
1026#
1027# @backing: #optional This describes the backing block device if it has one.
1028# (Since 2.0)
f11f57e4
LC
1029#
1030# Since: 0.14.0
1031##
1032{ 'type': 'BlockStats',
1033 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
c8059b97
FZ
1034 '*parent': 'BlockStats',
1035 '*backing': 'BlockStats'} }
f11f57e4
LC
1036
1037##
1038# @query-blockstats:
1039#
1040# Query the @BlockStats for all virtual block devices.
1041#
1042# Returns: A list of @BlockStats for each virtual block devices.
1043#
1044# Since: 0.14.0
1045##
1046{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
1047
2b54aa87
LC
1048##
1049# @VncClientInfo:
1050#
1051# Information about a connected VNC client.
1052#
1053# @host: The host name of the client. QEMU tries to resolve this to a DNS name
1054# when possible.
1055#
1056# @family: 'ipv6' if the client is connected via IPv6 and TCP
1057# 'ipv4' if the client is connected via IPv4 and TCP
1058# 'unix' if the client is connected via a unix domain socket
1059# 'unknown' otherwise
1060#
1061# @service: The service name of the client's port. This may depends on the
1062# host system's service database so symbolic names should not be
1063# relied on.
1064#
1065# @x509_dname: #optional If x509 authentication is in use, the Distinguished
1066# Name of the client.
1067#
1068# @sasl_username: #optional If SASL authentication is in use, the SASL username
1069# used for authentication.
1070#
1071# Since: 0.14.0
1072##
1073{ 'type': 'VncClientInfo',
1074 'data': {'host': 'str', 'family': 'str', 'service': 'str',
1075 '*x509_dname': 'str', '*sasl_username': 'str'} }
1076
1077##
1078# @VncInfo:
1079#
1080# Information about the VNC session.
1081#
1082# @enabled: true if the VNC server is enabled, false otherwise
1083#
1084# @host: #optional The hostname the VNC server is bound to. This depends on
1085# the name resolution on the host and may be an IP address.
1086#
1087# @family: #optional 'ipv6' if the host is listening for IPv6 connections
1088# 'ipv4' if the host is listening for IPv4 connections
1089# 'unix' if the host is listening on a unix domain socket
1090# 'unknown' otherwise
1091#
1092# @service: #optional The service name of the server's port. This may depends
1093# on the host system's service database so symbolic names should not
1094# be relied on.
1095#
1096# @auth: #optional the current authentication type used by the server
1097# 'none' if no authentication is being used
1098# 'vnc' if VNC authentication is being used
1099# 'vencrypt+plain' if VEncrypt is used with plain text authentication
1100# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
1101# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
1102# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
1103# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
1104# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
1105# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
1106# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
1107# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
1108#
1109# @clients: a list of @VncClientInfo of all currently connected clients
1110#
1111# Since: 0.14.0
1112##
1113{ 'type': 'VncInfo',
1114 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
1115 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
1116
1117##
1118# @query-vnc:
1119#
1120# Returns information about the current VNC server
1121#
1122# Returns: @VncInfo
2b54aa87
LC
1123#
1124# Since: 0.14.0
1125##
1126{ 'command': 'query-vnc', 'returns': 'VncInfo' }
1127
d1f29646
LC
1128##
1129# @SpiceChannel
1130#
1131# Information about a SPICE client channel.
1132#
1133# @host: The host name of the client. QEMU tries to resolve this to a DNS name
1134# when possible.
1135#
1136# @family: 'ipv6' if the client is connected via IPv6 and TCP
1137# 'ipv4' if the client is connected via IPv4 and TCP
1138# 'unix' if the client is connected via a unix domain socket
1139# 'unknown' otherwise
1140#
1141# @port: The client's port number.
1142#
1143# @connection-id: SPICE connection id number. All channels with the same id
1144# belong to the same SPICE session.
1145#
419e1bdf
AL
1146# @connection-type: SPICE channel type number. "1" is the main control
1147# channel, filter for this one if you want to track spice
1148# sessions only
d1f29646 1149#
419e1bdf
AL
1150# @channel-id: SPICE channel ID number. Usually "0", might be different when
1151# multiple channels of the same type exist, such as multiple
d1f29646
LC
1152# display channels in a multihead setup
1153#
1154# @tls: true if the channel is encrypted, false otherwise.
1155#
1156# Since: 0.14.0
1157##
1158{ 'type': 'SpiceChannel',
1159 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1160 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1161 'tls': 'bool'} }
1162
4efee029
AL
1163##
1164# @SpiceQueryMouseMode
1165#
6932a69b 1166# An enumeration of Spice mouse states.
4efee029
AL
1167#
1168# @client: Mouse cursor position is determined by the client.
1169#
1170# @server: Mouse cursor position is determined by the server.
1171#
1172# @unknown: No information is available about mouse mode used by
1173# the spice server.
1174#
1175# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1176#
1177# Since: 1.1
1178##
1179{ 'enum': 'SpiceQueryMouseMode',
1180 'data': [ 'client', 'server', 'unknown' ] }
1181
d1f29646
LC
1182##
1183# @SpiceInfo
1184#
1185# Information about the SPICE session.
b80e560b 1186#
d1f29646
LC
1187# @enabled: true if the SPICE server is enabled, false otherwise
1188#
61c4efe2
YH
1189# @migrated: true if the last guest migration completed and spice
1190# migration had completed as well. false otherwise.
1191#
d1f29646
LC
1192# @host: #optional The hostname the SPICE server is bound to. This depends on
1193# the name resolution on the host and may be an IP address.
1194#
1195# @port: #optional The SPICE server's port number.
1196#
1197# @compiled-version: #optional SPICE server version.
1198#
1199# @tls-port: #optional The SPICE server's TLS port number.
1200#
1201# @auth: #optional the current authentication type used by the server
419e1bdf
AL
1202# 'none' if no authentication is being used
1203# 'spice' uses SASL or direct TLS authentication, depending on command
1204# line options
d1f29646 1205#
4efee029
AL
1206# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1207# be determined by the client or the server, or unknown if spice
1208# server doesn't provide this information.
1209#
1210# Since: 1.1
1211#
d1f29646
LC
1212# @channels: a list of @SpiceChannel for each active spice channel
1213#
1214# Since: 0.14.0
1215##
1216{ 'type': 'SpiceInfo',
61c4efe2 1217 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
d1f29646 1218 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
4efee029 1219 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
d1f29646
LC
1220
1221##
1222# @query-spice
1223#
1224# Returns information about the current SPICE server
1225#
1226# Returns: @SpiceInfo
1227#
1228# Since: 0.14.0
1229##
1230{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
1231
96637bcd
LC
1232##
1233# @BalloonInfo:
1234#
1235# Information about the guest balloon device.
1236#
1237# @actual: the number of bytes the balloon currently contains
1238#
96637bcd
LC
1239# Since: 0.14.0
1240#
96637bcd 1241##
01ceb97e 1242{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
96637bcd
LC
1243
1244##
1245# @query-balloon:
1246#
1247# Return information about the balloon device.
1248#
1249# Returns: @BalloonInfo on success
1250# If the balloon driver is enabled but not functional because the KVM
1251# kernel module cannot support it, KvmMissingCap
1252# If no balloon device is present, DeviceNotActive
1253#
1254# Since: 0.14.0
1255##
1256{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1257
79627472
LC
1258##
1259# @PciMemoryRange:
1260#
1261# A PCI device memory region
1262#
1263# @base: the starting address (guest physical)
1264#
1265# @limit: the ending address (guest physical)
1266#
1267# Since: 0.14.0
1268##
1269{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1270
1271##
1272# @PciMemoryRegion
1273#
1274# Information about a PCI device I/O region.
1275#
1276# @bar: the index of the Base Address Register for this region
1277#
1278# @type: 'io' if the region is a PIO region
1279# 'memory' if the region is a MMIO region
1280#
1281# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1282#
1283# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1284#
1285# Since: 0.14.0
1286##
1287{ 'type': 'PciMemoryRegion',
1288 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1289 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1290
1291##
1292# @PciBridgeInfo:
1293#
1294# Information about a PCI Bridge device
1295#
1296# @bus.number: primary bus interface number. This should be the number of the
1297# bus the device resides on.
1298#
1299# @bus.secondary: secondary bus interface number. This is the number of the
1300# main bus for the bridge
1301#
1302# @bus.subordinate: This is the highest number bus that resides below the
1303# bridge.
1304#
1305# @bus.io_range: The PIO range for all devices on this bridge
1306#
1307# @bus.memory_range: The MMIO range for all devices on this bridge
1308#
1309# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1310# this bridge
1311#
1312# @devices: a list of @PciDeviceInfo for each device on this bridge
1313#
1314# Since: 0.14.0
1315##
1316{ 'type': 'PciBridgeInfo',
1317 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1318 'io_range': 'PciMemoryRange',
1319 'memory_range': 'PciMemoryRange',
1320 'prefetchable_range': 'PciMemoryRange' },
1321 '*devices': ['PciDeviceInfo']} }
1322
1323##
1324# @PciDeviceInfo:
1325#
1326# Information about a PCI device
1327#
1328# @bus: the bus number of the device
1329#
1330# @slot: the slot the device is located in
1331#
1332# @function: the function of the slot used by the device
1333#
1334# @class_info.desc: #optional a string description of the device's class
1335#
1336# @class_info.class: the class code of the device
1337#
1338# @id.device: the PCI device id
1339#
1340# @id.vendor: the PCI vendor id
1341#
1342# @irq: #optional if an IRQ is assigned to the device, the IRQ number
1343#
1344# @qdev_id: the device name of the PCI device
1345#
1346# @pci_bridge: if the device is a PCI bridge, the bridge information
1347#
1348# @regions: a list of the PCI I/O regions associated with the device
1349#
1350# Notes: the contents of @class_info.desc are not stable and should only be
1351# treated as informational.
1352#
1353# Since: 0.14.0
1354##
1355{ 'type': 'PciDeviceInfo',
1356 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1357 'class_info': {'*desc': 'str', 'class': 'int'},
1358 'id': {'device': 'int', 'vendor': 'int'},
1359 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1360 'regions': ['PciMemoryRegion']} }
1361
1362##
1363# @PciInfo:
1364#
1365# Information about a PCI bus
1366#
1367# @bus: the bus index
1368#
1369# @devices: a list of devices on this bus
1370#
1371# Since: 0.14.0
1372##
1373{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1374
1375##
1376# @query-pci:
1377#
1378# Return information about the PCI bus topology of the guest.
1379#
1380# Returns: a list of @PciInfo for each PCI bus
1381#
1382# Since: 0.14.0
1383##
1384{ 'command': 'query-pci', 'returns': ['PciInfo'] }
1385
92aa5c6d
PB
1386##
1387# @BlockdevOnError:
1388#
1389# An enumeration of possible behaviors for errors on I/O operations.
1390# The exact meaning depends on whether the I/O was initiated by a guest
1391# or by a block job
1392#
1393# @report: for guest operations, report the error to the guest;
1394# for jobs, cancel the job
1395#
1396# @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1397# or BLOCK_JOB_ERROR)
1398#
1399# @enospc: same as @stop on ENOSPC, same as @report otherwise.
1400#
1401# @stop: for guest operations, stop the virtual machine;
1402# for jobs, pause the job
1403#
1404# Since: 1.3
1405##
1406{ 'enum': 'BlockdevOnError',
1407 'data': ['report', 'ignore', 'enospc', 'stop'] }
1408
893f7eba
PB
1409##
1410# @MirrorSyncMode:
1411#
1412# An enumeration of possible behaviors for the initial synchronization
1413# phase of storage mirroring.
1414#
1415# @top: copies data in the topmost image to the destination
1416#
1417# @full: copies data from all images to the destination
1418#
1419# @none: only copy data written from now on
1420#
1421# Since: 1.3
1422##
1423{ 'enum': 'MirrorSyncMode',
1424 'data': ['top', 'full', 'none'] }
1425
2cb5b222
FZ
1426##
1427# @BlockJobType:
1428#
1429# Type of a block job.
1430#
1431# @commit: block commit job type, see "block-commit"
1432#
1433# @stream: block stream job type, see "block-stream"
1434#
1435# @mirror: drive mirror job type, see "drive-mirror"
1436#
1437# @backup: drive backup job type, see "drive-backup"
1438#
1439# Since: 1.7
1440##
1441{ 'enum': 'BlockJobType',
1442 'data': ['commit', 'stream', 'mirror', 'backup'] }
1443
fb5458cd
SH
1444##
1445# @BlockJobInfo:
1446#
1447# Information about a long-running block device operation.
1448#
1449# @type: the job type ('stream' for image streaming)
1450#
1451# @device: the block device name
1452#
1453# @len: the maximum progress value
1454#
8d65883f
PB
1455# @busy: false if the job is known to be in a quiescent state, with
1456# no pending I/O. Since 1.3.
1457#
8acc72a4
PB
1458# @paused: whether the job is paused or, if @busy is true, will
1459# pause itself as soon as possible. Since 1.3.
1460#
fb5458cd
SH
1461# @offset: the current progress value
1462#
1463# @speed: the rate limit, bytes per second
1464#
32c81a4a
PB
1465# @io-status: the status of the job (since 1.3)
1466#
fb5458cd
SH
1467# Since: 1.1
1468##
1469{ 'type': 'BlockJobInfo',
1470 'data': {'type': 'str', 'device': 'str', 'len': 'int',
32c81a4a
PB
1471 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1472 'io-status': 'BlockDeviceIoStatus'} }
fb5458cd
SH
1473
1474##
1475# @query-block-jobs:
1476#
1477# Return information about long-running block device operations.
1478#
1479# Returns: a list of @BlockJobInfo for each active block job
1480#
1481# Since: 1.1
1482##
1483{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1484
7a7f325e
LC
1485##
1486# @quit:
1487#
1488# This command will cause the QEMU process to exit gracefully. While every
1489# attempt is made to send the QMP response before terminating, this is not
1490# guaranteed. When using this interface, a premature EOF would not be
1491# unexpected.
1492#
1493# Since: 0.14.0
1494##
1495{ 'command': 'quit' }
5f158f21
LC
1496
1497##
1498# @stop:
1499#
1500# Stop all guest VCPU execution.
1501#
1502# Since: 0.14.0
1503#
1504# Notes: This function will succeed even if the guest is already in the stopped
1e998146
PB
1505# state. In "inmigrate" state, it will ensure that the guest
1506# remains paused once migration finishes, as if the -S option was
1507# passed on the command line.
5f158f21
LC
1508##
1509{ 'command': 'stop' }
38d22653
LC
1510
1511##
1512# @system_reset:
1513#
1514# Performs a hard reset of a guest.
1515#
1516# Since: 0.14.0
1517##
1518{ 'command': 'system_reset' }
5bc465e4
LC
1519
1520##
1521# @system_powerdown:
1522#
1523# Requests that a guest perform a powerdown operation.
1524#
1525# Since: 0.14.0
1526#
1527# Notes: A guest may or may not respond to this command. This command
1528# returning does not indicate that a guest has accepted the request or
1529# that it has shut down. Many guests will respond to this command by
1530# prompting the user in some way.
1531##
1532{ 'command': 'system_powerdown' }
755f1968
LC
1533
1534##
1535# @cpu:
1536#
1537# This command is a nop that is only provided for the purposes of compatibility.
1538#
1539# Since: 0.14.0
1540#
1541# Notes: Do not use this command.
1542##
1543{ 'command': 'cpu', 'data': {'index': 'int'} }
0cfd6a9a 1544
69ca3ea5
IM
1545##
1546# @cpu-add
1547#
1548# Adds CPU with specified ID
1549#
1550# @id: ID of CPU to be created, valid values [0..max_cpus)
1551#
1552# Returns: Nothing on success
1553#
1554# Since 1.5
1555##
1556{ 'command': 'cpu-add', 'data': {'id': 'int'} }
1557
0cfd6a9a
LC
1558##
1559# @memsave:
1560#
1561# Save a portion of guest memory to a file.
1562#
1563# @val: the virtual address of the guest to start from
1564#
1565# @size: the size of memory region to save
1566#
1567# @filename: the file to save the memory to as binary data
1568#
1569# @cpu-index: #optional the index of the virtual CPU to use for translating the
1570# virtual address (defaults to CPU 0)
1571#
1572# Returns: Nothing on success
0cfd6a9a
LC
1573#
1574# Since: 0.14.0
1575#
1576# Notes: Errors were not reliably returned until 1.1
1577##
1578{ 'command': 'memsave',
1579 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
6d3962bf
LC
1580
1581##
1582# @pmemsave:
1583#
1584# Save a portion of guest physical memory to a file.
1585#
1586# @val: the physical address of the guest to start from
1587#
1588# @size: the size of memory region to save
1589#
1590# @filename: the file to save the memory to as binary data
1591#
1592# Returns: Nothing on success
6d3962bf
LC
1593#
1594# Since: 0.14.0
1595#
1596# Notes: Errors were not reliably returned until 1.1
1597##
1598{ 'command': 'pmemsave',
1599 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
e42e818b
LC
1600
1601##
1602# @cont:
1603#
1604# Resume guest VCPU execution.
1605#
1606# Since: 0.14.0
1607#
1608# Returns: If successful, nothing
e42e818b
LC
1609# If QEMU was started with an encrypted block device and a key has
1610# not yet been set, DeviceEncrypted.
1611#
1e998146
PB
1612# Notes: This command will succeed if the guest is currently running. It
1613# will also succeed if the guest is in the "inmigrate" state; in
1614# this case, the effect of the command is to make sure the guest
1615# starts once migration finishes, removing the effect of the -S
1616# command line option if it was passed.
e42e818b
LC
1617##
1618{ 'command': 'cont' }
1619
9b9df25a
GH
1620##
1621# @system_wakeup:
1622#
1623# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1624#
1625# Since: 1.1
1626#
1627# Returns: nothing.
1628##
1629{ 'command': 'system_wakeup' }
1630
ab49ab5c
LC
1631##
1632# @inject-nmi:
1633#
1634# Injects an Non-Maskable Interrupt into all guest's VCPUs.
1635#
1636# Returns: If successful, nothing
ab49ab5c
LC
1637#
1638# Since: 0.14.0
1639#
1640# Notes: Only x86 Virtual Machines support this command.
1641##
1642{ 'command': 'inject-nmi' }
4b37156c
LC
1643
1644##
1645# @set_link:
1646#
1647# Sets the link status of a virtual network adapter.
1648#
1649# @name: the device name of the virtual network adapter
1650#
1651# @up: true to set the link status to be up
1652#
1653# Returns: Nothing on success
1654# If @name is not a valid network device, DeviceNotFound
1655#
1656# Since: 0.14.0
1657#
1658# Notes: Not all network adapters support setting link status. This command
1659# will succeed even if the network adapter does not support link status
1660# notification.
1661##
1662{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
a4dea8a9
LC
1663
1664##
1665# @block_passwd:
1666#
1667# This command sets the password of a block device that has not been open
1668# with a password and requires one.
1669#
1670# The two cases where this can happen are a block device is created through
1671# QEMU's initial command line or a block device is changed through the legacy
1672# @change interface.
1673#
1674# In the event that the block device is created through the initial command
1675# line, the VM will start in the stopped state regardless of whether '-S' is
1676# used. The intention is for a management tool to query the block devices to
1677# determine which ones are encrypted, set the passwords with this command, and
1678# then start the guest with the @cont command.
1679#
1680# @device: the name of the device to set the password on
1681#
1682# @password: the password to use for the device
1683#
1684# Returns: nothing on success
1685# If @device is not a valid block device, DeviceNotFound
1686# If @device is not encrypted, DeviceNotEncrypted
a4dea8a9
LC
1687#
1688# Notes: Not all block formats support encryption and some that do are not
1689# able to validate that a password is correct. Disk corruption may
1690# occur if an invalid password is specified.
1691#
1692# Since: 0.14.0
1693##
1694{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
d72f3264
LC
1695
1696##
1697# @balloon:
1698#
1699# Request the balloon driver to change its balloon size.
1700#
1701# @value: the target size of the balloon in bytes
1702#
1703# Returns: Nothing on success
1704# If the balloon driver is enabled but not functional because the KVM
1705# kernel module cannot support it, KvmMissingCap
1706# If no balloon device is present, DeviceNotActive
1707#
1708# Notes: This command just issues a request to the guest. When it returns,
1709# the balloon size may not have changed. A guest can change the balloon
1710# size independent of this command.
1711#
1712# Since: 0.14.0
1713##
1714{ 'command': 'balloon', 'data': {'value': 'int'} }
5e7caacb
LC
1715
1716##
1717# @block_resize
1718#
1719# Resize a block image while a guest is running.
1720#
1721# @device: the name of the device to get the image resized
1722#
1723# @size: new image size in bytes
1724#
1725# Returns: nothing on success
1726# If @device is not a valid block device, DeviceNotFound
5e7caacb
LC
1727#
1728# Since: 0.14.0
1729##
1730{ 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
6106e249 1731
8802d1fd 1732##
bc8b094f
PB
1733# @NewImageMode
1734#
1735# An enumeration that tells QEMU how to set the backing file path in
1736# a new image file.
1737#
1738# @existing: QEMU should look for an existing image file.
1739#
1740# @absolute-paths: QEMU should create a new image with absolute paths
1296c2f0
HR
1741# for the backing file. If there is no backing file available, the new
1742# image will not be backed either.
bc8b094f
PB
1743#
1744# Since: 1.1
1745##
ad0f171e 1746{ 'enum': 'NewImageMode',
bc8b094f
PB
1747 'data': [ 'existing', 'absolute-paths' ] }
1748
8802d1fd 1749##
52e7c241 1750# @BlockdevSnapshot
8802d1fd
JC
1751#
1752# @device: the name of the device to generate the snapshot from.
1753#
1754# @snapshot-file: the target of the new image. A new file will be created.
1755#
1756# @format: #optional the format of the snapshot image, default is 'qcow2'.
6cc2a415
PB
1757#
1758# @mode: #optional whether and how QEMU should create a new image, default is
8bde9b6f 1759# 'absolute-paths'.
8802d1fd 1760##
52e7c241 1761{ 'type': 'BlockdevSnapshot',
bc8b094f
PB
1762 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1763 '*mode': 'NewImageMode' } }
8802d1fd 1764
bbe86010
WX
1765##
1766# @BlockdevSnapshotInternal
1767#
1768# @device: the name of the device to generate the snapshot from
1769#
1770# @name: the name of the internal snapshot to be created
1771#
1772# Notes: In transaction, if @name is empty, or any snapshot matching @name
1773# exists, the operation will fail. Only some image formats support it,
1774# for example, qcow2, rbd, and sheepdog.
1775#
1776# Since: 1.7
1777##
1778{ 'type': 'BlockdevSnapshotInternal',
1779 'data': { 'device': 'str', 'name': 'str' } }
1780
3037f364
SH
1781##
1782# @DriveBackup
1783#
1784# @device: the name of the device which should be copied.
1785#
1786# @target: the target of the new image. If the file exists, or if it
1787# is a device, the existing file/device will be used as the new
1788# destination. If it does not exist, a new file will be created.
1789#
1790# @format: #optional the format of the new destination, default is to
1791# probe if @mode is 'existing', else the format of the source
1792#
b53169ea
SH
1793# @sync: what parts of the disk image should be copied to the destination
1794# (all the disk, only the sectors allocated in the topmost image, or
1795# only new I/O).
1796#
3037f364
SH
1797# @mode: #optional whether and how QEMU should create a new image, default is
1798# 'absolute-paths'.
1799#
1800# @speed: #optional the maximum speed, in bytes per second
1801#
1802# @on-source-error: #optional the action to take on an error on the source,
1803# default 'report'. 'stop' and 'enospc' can only be used
1804# if the block device supports io-status (see BlockInfo).
1805#
1806# @on-target-error: #optional the action to take on an error on the target,
1807# default 'report' (no limitations, since this applies to
1808# a different block device than @device).
1809#
1810# Note that @on-source-error and @on-target-error only affect background I/O.
1811# If an error occurs during a guest write request, the device's rerror/werror
1812# actions will be used.
1813#
1814# Since: 1.6
1815##
1816{ 'type': 'DriveBackup',
1817 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
b53169ea
SH
1818 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
1819 '*speed': 'int',
3037f364
SH
1820 '*on-source-error': 'BlockdevOnError',
1821 '*on-target-error': 'BlockdevOnError' } }
1822
78b18b78
SH
1823##
1824# @Abort
1825#
1826# This action can be used to test transaction failure.
1827#
1828# Since: 1.6
1829###
1830{ 'type': 'Abort',
1831 'data': { } }
1832
8802d1fd 1833##
c8a83e85 1834# @TransactionAction
8802d1fd 1835#
52e7c241
PB
1836# A discriminated record of operations that can be performed with
1837# @transaction.
8802d1fd 1838##
c8a83e85 1839{ 'union': 'TransactionAction',
52e7c241 1840 'data': {
3037f364 1841 'blockdev-snapshot-sync': 'BlockdevSnapshot',
78b18b78 1842 'drive-backup': 'DriveBackup',
bbe86010
WX
1843 'abort': 'Abort',
1844 'blockdev-snapshot-internal-sync': 'BlockdevSnapshotInternal'
52e7c241 1845 } }
8802d1fd
JC
1846
1847##
52e7c241 1848# @transaction
8802d1fd 1849#
c8a83e85
KW
1850# Executes a number of transactionable QMP commands atomically. If any
1851# operation fails, then the entire set of actions will be abandoned and the
1852# appropriate error returned.
8802d1fd
JC
1853#
1854# List of:
c8a83e85 1855# @TransactionAction: information needed for the respective operation
8802d1fd
JC
1856#
1857# Returns: nothing on success
c8a83e85 1858# Errors depend on the operations of the transaction
8802d1fd 1859#
c8a83e85
KW
1860# Note: The transaction aborts on the first failure. Therefore, there will be
1861# information on only one failed operation returned in an error condition, and
52e7c241
PB
1862# subsequent actions will not have been attempted.
1863#
1864# Since 1.1
8802d1fd 1865##
52e7c241 1866{ 'command': 'transaction',
c8a83e85 1867 'data': { 'actions': [ 'TransactionAction' ] } }
8802d1fd 1868
6106e249
LC
1869##
1870# @blockdev-snapshot-sync
1871#
1872# Generates a synchronous snapshot of a block device.
1873#
852ad1a9 1874# For the arguments, see the documentation of BlockdevSnapshot.
6cc2a415 1875#
6106e249
LC
1876# Returns: nothing on success
1877# If @device is not a valid block device, DeviceNotFound
6106e249 1878#
6106e249
LC
1879# Since 0.14.0
1880##
1881{ 'command': 'blockdev-snapshot-sync',
852ad1a9 1882 'data': 'BlockdevSnapshot' }
d51a67b4 1883
f323bc9e
WX
1884##
1885# @blockdev-snapshot-internal-sync
1886#
1887# Synchronously take an internal snapshot of a block device, when the format
1888# of the image used supports it.
1889#
1890# For the arguments, see the documentation of BlockdevSnapshotInternal.
1891#
1892# Returns: nothing on success
1893# If @device is not a valid block device, DeviceNotFound
1894# If any snapshot matching @name exists, or @name is empty,
1895# GenericError
1896# If the format of the image used does not support it,
1897# BlockFormatFeatureNotSupported
1898#
1899# Since 1.7
1900##
1901{ 'command': 'blockdev-snapshot-internal-sync',
1902 'data': 'BlockdevSnapshotInternal' }
1903
44e3e053
WX
1904##
1905# @blockdev-snapshot-delete-internal-sync
1906#
1907# Synchronously delete an internal snapshot of a block device, when the format
1908# of the image used support it. The snapshot is identified by name or id or
1909# both. One of the name or id is required. Return SnapshotInfo for the
1910# successfully deleted snapshot.
1911#
1912# @device: the name of the device to delete the snapshot from
1913#
1914# @id: optional the snapshot's ID to be deleted
1915#
1916# @name: optional the snapshot's name to be deleted
1917#
1918# Returns: SnapshotInfo on success
1919# If @device is not a valid block device, DeviceNotFound
1920# If snapshot not found, GenericError
1921# If the format of the image used does not support it,
1922# BlockFormatFeatureNotSupported
1923# If @id and @name are both not specified, GenericError
1924#
1925# Since 1.7
1926##
1927{ 'command': 'blockdev-snapshot-delete-internal-sync',
1928 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
1929 'returns': 'SnapshotInfo' }
1930
d51a67b4
LC
1931##
1932# @human-monitor-command:
1933#
1934# Execute a command on the human monitor and return the output.
1935#
1936# @command-line: the command to execute in the human monitor
1937#
1938# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1939#
1940# Returns: the output of the command as a string
1941#
1942# Since: 0.14.0
1943#
59b00962 1944# Notes: This command only exists as a stop-gap. Its use is highly
d51a67b4
LC
1945# discouraged. The semantics of this command are not guaranteed.
1946#
1947# Known limitations:
1948#
1949# o This command is stateless, this means that commands that depend
1950# on state information (such as getfd) might not work
1951#
1952# o Commands that prompt the user for data (eg. 'cont' when the block
1953# device is encrypted) don't currently work
1954##
1955{ 'command': 'human-monitor-command',
1956 'data': {'command-line': 'str', '*cpu-index': 'int'},
b80e560b 1957 'returns': 'str' }
6cdedb07
LC
1958
1959##
ed61fc10
JC
1960# @block-commit
1961#
1962# Live commit of data from overlay image nodes into backing nodes - i.e.,
1963# writes data between 'top' and 'base' into 'base'.
1964#
1965# @device: the name of the device
1966#
1967# @base: #optional The file name of the backing image to write data into.
1968# If not specified, this is the deepest backing image
1969#
1970# @top: The file name of the backing image within the image chain,
1971# which contains the topmost data to be committed down.
ed61fc10
JC
1972#
1973# If top == base, that is an error.
20a63d2c
FZ
1974# If top == active, the job will not be completed by itself,
1975# user needs to complete the job with the block-job-complete
1976# command after getting the ready event. (Since 2.0)
ed61fc10
JC
1977#
1978#
1979# @speed: #optional the maximum speed, in bytes per second
1980#
1981# Returns: Nothing on success
1982# If commit or stream is already active on this device, DeviceInUse
1983# If @device does not exist, DeviceNotFound
1984# If image commit is not supported by this device, NotSupported
1985# If @base or @top is invalid, a generic error is returned
ed61fc10
JC
1986# If @speed is invalid, InvalidParameter
1987#
1988# Since: 1.3
1989#
1990##
1991{ 'command': 'block-commit',
1992 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1993 '*speed': 'int' } }
1994
99a9addf
SH
1995##
1996# @drive-backup
1997#
1998# Start a point-in-time copy of a block device to a new destination. The
1999# status of ongoing drive-backup operations can be checked with
2000# query-block-jobs where the BlockJobInfo.type field has the value 'backup'.
2001# The operation can be stopped before it has completed using the
2002# block-job-cancel command.
2003#
f53cae50 2004# For the arguments, see the documentation of DriveBackup.
99a9addf
SH
2005#
2006# Returns: nothing on success
2007# If @device is not a valid block device, DeviceNotFound
2008#
2009# Since 1.6
2010##
f53cae50 2011{ 'command': 'drive-backup', 'data': 'DriveBackup' }
99a9addf 2012
d9b902db
PB
2013##
2014# @drive-mirror
2015#
2016# Start mirroring a block device's writes to a new destination.
2017#
2018# @device: the name of the device whose writes should be mirrored.
2019#
2020# @target: the target of the new image. If the file exists, or if it
2021# is a device, the existing file/device will be used as the new
2022# destination. If it does not exist, a new file will be created.
2023#
2024# @format: #optional the format of the new destination, default is to
2025# probe if @mode is 'existing', else the format of the source
2026#
2027# @mode: #optional whether and how QEMU should create a new image, default is
2028# 'absolute-paths'.
2029#
2030# @speed: #optional the maximum speed, in bytes per second
2031#
2032# @sync: what parts of the disk image should be copied to the destination
2033# (all the disk, only the sectors allocated in the topmost image, or
2034# only new I/O).
2035#
eee13dfe
PB
2036# @granularity: #optional granularity of the dirty bitmap, default is 64K
2037# if the image format doesn't have clusters, 4K if the clusters
2038# are smaller than that, else the cluster size. Must be a
2039# power of 2 between 512 and 64M (since 1.4).
2040#
08e4ed6c
PB
2041# @buf-size: #optional maximum amount of data in flight from source to
2042# target (since 1.4).
2043#
b952b558
PB
2044# @on-source-error: #optional the action to take on an error on the source,
2045# default 'report'. 'stop' and 'enospc' can only be used
2046# if the block device supports io-status (see BlockInfo).
2047#
2048# @on-target-error: #optional the action to take on an error on the target,
2049# default 'report' (no limitations, since this applies to
2050# a different block device than @device).
2051#
d9b902db
PB
2052# Returns: nothing on success
2053# If @device is not a valid block device, DeviceNotFound
2054#
2055# Since 1.3
2056##
2057{ 'command': 'drive-mirror',
2058 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
2059 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
eee13dfe 2060 '*speed': 'int', '*granularity': 'uint32',
08e4ed6c 2061 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
b952b558 2062 '*on-target-error': 'BlockdevOnError' } }
d9b902db
PB
2063
2064##
6cdedb07
LC
2065# @migrate_cancel
2066#
2067# Cancel the current executing migration process.
2068#
2069# Returns: nothing on success
2070#
2071# Notes: This command succeeds even if there is no migration process running.
2072#
2073# Since: 0.14.0
2074##
2075{ 'command': 'migrate_cancel' }
4f0a993b
LC
2076
2077##
2078# @migrate_set_downtime
2079#
2080# Set maximum tolerated downtime for migration.
2081#
2082# @value: maximum downtime in seconds
2083#
2084# Returns: nothing on success
2085#
2086# Since: 0.14.0
2087##
2088{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
3dc85383
LC
2089
2090##
2091# @migrate_set_speed
2092#
2093# Set maximum speed for migration.
2094#
2095# @value: maximum speed in bytes.
2096#
2097# Returns: nothing on success
2098#
2099# Notes: A value lesser than zero will be automatically round up to zero.
2100#
2101# Since: 0.14.0
2102##
2103{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
b4b12c62 2104
9e1ba4cc
OW
2105##
2106# @migrate-set-cache-size
2107#
2108# Set XBZRLE cache size
2109#
2110# @value: cache size in bytes
2111#
2112# The size will be rounded down to the nearest power of 2.
2113# The cache size can be modified before and during ongoing migration
2114#
2115# Returns: nothing on success
2116#
2117# Since: 1.2
2118##
2119{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
2120
2121##
2122# @query-migrate-cache-size
2123#
2124# query XBZRLE cache size
2125#
2126# Returns: XBZRLE cache size in bytes
2127#
2128# Since: 1.2
2129##
2130{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
2131
b4b12c62 2132##
d03ee401 2133# @ObjectPropertyInfo:
b4b12c62
AL
2134#
2135# @name: the name of the property
2136#
2137# @type: the type of the property. This will typically come in one of four
2138# forms:
2139#
2140# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
2141# These types are mapped to the appropriate JSON type.
2142#
2143# 2) A legacy type in the form 'legacy<subtype>' where subtype is the
2144# legacy qdev typename. These types are always treated as strings.
2145#
2146# 3) A child type in the form 'child<subtype>' where subtype is a qdev
2147# device type name. Child properties create the composition tree.
2148#
2149# 4) A link type in the form 'link<subtype>' where subtype is a qdev
2150# device type name. Link properties form the device model graph.
2151#
51920820 2152# Since: 1.2
b4b12c62 2153##
57c9fafe 2154{ 'type': 'ObjectPropertyInfo',
b4b12c62
AL
2155 'data': { 'name': 'str', 'type': 'str' } }
2156
2157##
2158# @qom-list:
2159#
57c9fafe 2160# This command will list any properties of a object given a path in the object
b4b12c62
AL
2161# model.
2162#
57c9fafe 2163# @path: the path within the object model. See @qom-get for a description of
b4b12c62
AL
2164# this parameter.
2165#
57c9fafe
AL
2166# Returns: a list of @ObjectPropertyInfo that describe the properties of the
2167# object.
b4b12c62 2168#
51920820 2169# Since: 1.2
b4b12c62
AL
2170##
2171{ 'command': 'qom-list',
2172 'data': { 'path': 'str' },
57c9fafe 2173 'returns': [ 'ObjectPropertyInfo' ] }
eb6e8ea5
AL
2174
2175##
2176# @qom-get:
2177#
57c9fafe 2178# This command will get a property from a object model path and return the
eb6e8ea5
AL
2179# value.
2180#
57c9fafe 2181# @path: The path within the object model. There are two forms of supported
eb6e8ea5
AL
2182# paths--absolute and partial paths.
2183#
57c9fafe 2184# Absolute paths are derived from the root object and can follow child<>
eb6e8ea5
AL
2185# or link<> properties. Since they can follow link<> properties, they
2186# can be arbitrarily long. Absolute paths look like absolute filenames
2187# and are prefixed with a leading slash.
2188#
2189# Partial paths look like relative filenames. They do not begin
2190# with a prefix. The matching rules for partial paths are subtle but
57c9fafe 2191# designed to make specifying objects easy. At each level of the
eb6e8ea5
AL
2192# composition tree, the partial path is matched as an absolute path.
2193# The first match is not returned. At least two matches are searched
2194# for. A successful result is only returned if only one match is
2195# found. If more than one match is found, a flag is return to
2196# indicate that the match was ambiguous.
2197#
2198# @property: The property name to read
2199#
2200# Returns: The property value. The type depends on the property type. legacy<>
2201# properties are returned as #str. child<> and link<> properties are
2202# returns as #str pathnames. All integer property types (u8, u16, etc)
2203# are returned as #int.
2204#
51920820 2205# Since: 1.2
eb6e8ea5
AL
2206##
2207{ 'command': 'qom-get',
2208 'data': { 'path': 'str', 'property': 'str' },
2209 'returns': 'visitor',
2210 'gen': 'no' }
2211
2212##
2213# @qom-set:
2214#
57c9fafe 2215# This command will set a property from a object model path.
eb6e8ea5
AL
2216#
2217# @path: see @qom-get for a description of this parameter
2218#
2219# @property: the property name to set
2220#
2221# @value: a value who's type is appropriate for the property type. See @qom-get
2222# for a description of type mapping.
2223#
51920820 2224# Since: 1.2
eb6e8ea5
AL
2225##
2226{ 'command': 'qom-set',
2227 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
2228 'gen': 'no' }
fbf796fd
LC
2229
2230##
2231# @set_password:
2232#
2233# Sets the password of a remote display session.
2234#
2235# @protocol: `vnc' to modify the VNC server password
2236# `spice' to modify the Spice server password
2237#
2238# @password: the new password
2239#
2240# @connected: #optional how to handle existing clients when changing the
b80e560b 2241# password. If nothing is specified, defaults to `keep'
fbf796fd
LC
2242# `fail' to fail the command if clients are connected
2243# `disconnect' to disconnect existing clients
2244# `keep' to maintain existing clients
2245#
2246# Returns: Nothing on success
2247# If Spice is not enabled, DeviceNotFound
fbf796fd
LC
2248#
2249# Since: 0.14.0
2250##
2251{ 'command': 'set_password',
2252 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
9ad5372d
LC
2253
2254##
2255# @expire_password:
2256#
2257# Expire the password of a remote display server.
2258#
2259# @protocol: the name of the remote display protocol `vnc' or `spice'
2260#
2261# @time: when to expire the password.
2262# `now' to expire the password immediately
2263# `never' to cancel password expiration
2264# `+INT' where INT is the number of seconds from now (integer)
2265# `INT' where INT is the absolute time in seconds
2266#
2267# Returns: Nothing on success
2268# If @protocol is `spice' and Spice is not active, DeviceNotFound
9ad5372d
LC
2269#
2270# Since: 0.14.0
2271#
2272# Notes: Time is relative to the server and currently there is no way to
2273# coordinate server time with client time. It is not recommended to
2274# use the absolute time version of the @time parameter unless you're
2275# sure you are on the same machine as the QEMU instance.
2276##
2277{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
c245b6a3
LC
2278
2279##
2280# @eject:
2281#
2282# Ejects a device from a removable drive.
2283#
2284# @device: The name of the device
2285#
2286# @force: @optional If true, eject regardless of whether the drive is locked.
2287# If not specified, the default value is false.
2288#
2289# Returns: Nothing on success
2290# If @device is not a valid block device, DeviceNotFound
c245b6a3
LC
2291#
2292# Notes: Ejecting a device will no media results in success
2293#
2294# Since: 0.14.0
2295##
2296{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
270b243f
LC
2297
2298##
2299# @change-vnc-password:
2300#
2301# Change the VNC server password.
2302#
2303# @target: the new password to use with VNC authentication
2304#
2305# Since: 1.1
2306#
2307# Notes: An empty password in this command will set the password to the empty
2308# string. Existing clients are unaffected by executing this command.
2309##
2310{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
333a96ec
LC
2311
2312##
2313# @change:
2314#
2315# This command is multiple commands multiplexed together.
2316#
2317# @device: This is normally the name of a block device but it may also be 'vnc'.
2318# when it's 'vnc', then sub command depends on @target
2319#
2320# @target: If @device is a block device, then this is the new filename.
2321# If @device is 'vnc', then if the value 'password' selects the vnc
2322# change password command. Otherwise, this specifies a new server URI
2323# address to listen to for VNC connections.
2324#
2325# @arg: If @device is a block device, then this is an optional format to open
2326# the device with.
2327# If @device is 'vnc' and @target is 'password', this is the new VNC
2328# password to set. If this argument is an empty string, then no future
2329# logins will be allowed.
2330#
2331# Returns: Nothing on success.
2332# If @device is not a valid block device, DeviceNotFound
333a96ec
LC
2333# If the new block device is encrypted, DeviceEncrypted. Note that
2334# if this error is returned, the device has been opened successfully
2335# and an additional call to @block_passwd is required to set the
2336# device's password. The behavior of reads and writes to the block
2337# device between when these calls are executed is undefined.
2338#
2339# Notes: It is strongly recommended that this interface is not used especially
2340# for changing block devices.
2341#
2342# Since: 0.14.0
2343##
2344{ 'command': 'change',
2345 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
80047da5
LC
2346
2347##
2348# @block_set_io_throttle:
2349#
2350# Change I/O throttle limits for a block drive.
2351#
2352# @device: The name of the device
2353#
2354# @bps: total throughput limit in bytes per second
2355#
2356# @bps_rd: read throughput limit in bytes per second
2357#
2358# @bps_wr: write throughput limit in bytes per second
2359#
2360# @iops: total I/O operations per second
2361#
2362# @ops_rd: read I/O operations per second
2363#
2364# @iops_wr: write I/O operations per second
2365#
3e9fab69
BC
2366# @bps_max: #optional total max in bytes (Since 1.7)
2367#
2368# @bps_rd_max: #optional read max in bytes (Since 1.7)
2369#
2370# @bps_wr_max: #optional write max in bytes (Since 1.7)
2371#
2372# @iops_max: #optional total I/O operations max (Since 1.7)
2373#
2374# @iops_rd_max: #optional read I/O operations max (Since 1.7)
2375#
2376# @iops_wr_max: #optional write I/O operations max (Since 1.7)
2377#
2024c1df
BC
2378# @iops_size: #optional an I/O size in bytes (Since 1.7)
2379#
80047da5
LC
2380# Returns: Nothing on success
2381# If @device is not a valid block device, DeviceNotFound
80047da5
LC
2382#
2383# Since: 1.1
b80e560b 2384##
80047da5
LC
2385{ 'command': 'block_set_io_throttle',
2386 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
3e9fab69
BC
2387 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int',
2388 '*bps_max': 'int', '*bps_rd_max': 'int',
2389 '*bps_wr_max': 'int', '*iops_max': 'int',
2024c1df
BC
2390 '*iops_rd_max': 'int', '*iops_wr_max': 'int',
2391 '*iops_size': 'int' } }
12bd451f 2392
db58f9c0
SH
2393##
2394# @block-stream:
12bd451f
SH
2395#
2396# Copy data from a backing file into a block device.
2397#
2398# The block streaming operation is performed in the background until the entire
2399# backing file has been copied. This command returns immediately once streaming
2400# has started. The status of ongoing block streaming operations can be checked
2401# with query-block-jobs. The operation can be stopped before it has completed
db58f9c0 2402# using the block-job-cancel command.
12bd451f
SH
2403#
2404# If a base file is specified then sectors are not copied from that base file and
2405# its backing chain. When streaming completes the image file will have the base
2406# file as its backing file. This can be used to stream a subset of the backing
2407# file chain instead of flattening the entire image.
2408#
2409# On successful completion the image file is updated to drop the backing file
2410# and the BLOCK_JOB_COMPLETED event is emitted.
2411#
2412# @device: the device name
2413#
2414# @base: #optional the common backing file name
2415#
c83c66c3
SH
2416# @speed: #optional the maximum speed, in bytes per second
2417#
1d809098
PB
2418# @on-error: #optional the action to take on an error (default report).
2419# 'stop' and 'enospc' can only be used if the block device
2420# supports io-status (see BlockInfo). Since 1.3.
2421#
12bd451f 2422# Returns: Nothing on success
12bd451f 2423# If @device does not exist, DeviceNotFound
12bd451f
SH
2424#
2425# Since: 1.1
2426##
1d809098
PB
2427{ 'command': 'block-stream',
2428 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2429 '*on-error': 'BlockdevOnError' } }
2d47c6e9
SH
2430
2431##
db58f9c0 2432# @block-job-set-speed:
2d47c6e9
SH
2433#
2434# Set maximum speed for a background block operation.
2435#
2436# This command can only be issued when there is an active block job.
2437#
2438# Throttling can be disabled by setting the speed to 0.
2439#
2440# @device: the device name
2441#
c83c66c3
SH
2442# @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2443# Defaults to 0.
2d47c6e9
SH
2444#
2445# Returns: Nothing on success
05290d80 2446# If no background operation is active on this device, DeviceNotActive
2d47c6e9
SH
2447#
2448# Since: 1.1
2449##
db58f9c0 2450{ 'command': 'block-job-set-speed',
882ec7ce 2451 'data': { 'device': 'str', 'speed': 'int' } }
370521a1
SH
2452
2453##
db58f9c0 2454# @block-job-cancel:
370521a1 2455#
05290d80 2456# Stop an active background block operation.
370521a1 2457#
05290d80 2458# This command returns immediately after marking the active background block
370521a1
SH
2459# operation for cancellation. It is an error to call this command if no
2460# operation is in progress.
2461#
2462# The operation will cancel as soon as possible and then emit the
2463# BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2464# enumerated using query-block-jobs.
2465#
05290d80
PB
2466# For streaming, the image file retains its backing file unless the streaming
2467# operation happens to complete just as it is being cancelled. A new streaming
2468# operation can be started at a later time to finish copying all data from the
2469# backing file.
370521a1
SH
2470#
2471# @device: the device name
2472#
6e37fb81
PB
2473# @force: #optional whether to allow cancellation of a paused job (default
2474# false). Since 1.3.
2475#
370521a1 2476# Returns: Nothing on success
05290d80 2477# If no background operation is active on this device, DeviceNotActive
370521a1
SH
2478#
2479# Since: 1.1
2480##
6e37fb81
PB
2481{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2482
2483##
2484# @block-job-pause:
2485#
2486# Pause an active background block operation.
2487#
2488# This command returns immediately after marking the active background block
2489# operation for pausing. It is an error to call this command if no
2490# operation is in progress. Pausing an already paused job has no cumulative
2491# effect; a single block-job-resume command will resume the job.
2492#
2493# The operation will pause as soon as possible. No event is emitted when
2494# the operation is actually paused. Cancelling a paused job automatically
2495# resumes it.
2496#
2497# @device: the device name
2498#
2499# Returns: Nothing on success
2500# If no background operation is active on this device, DeviceNotActive
2501#
2502# Since: 1.3
2503##
2504{ 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2505
2506##
2507# @block-job-resume:
2508#
2509# Resume an active background block operation.
2510#
2511# This command returns immediately after resuming a paused background block
2512# operation. It is an error to call this command if no operation is in
2513# progress. Resuming an already running job is not an error.
2514#
32c81a4a
PB
2515# This command also clears the error status of the job.
2516#
6e37fb81
PB
2517# @device: the device name
2518#
2519# Returns: Nothing on success
2520# If no background operation is active on this device, DeviceNotActive
2521#
2522# Since: 1.3
2523##
2524{ 'command': 'block-job-resume', 'data': { 'device': 'str' } }
5eeee3fa 2525
aeae883b
PB
2526##
2527# @block-job-complete:
2528#
2529# Manually trigger completion of an active background block operation. This
2530# is supported for drive mirroring, where it also switches the device to
a66a2a36
PB
2531# write to the target path only. The ability to complete is signaled with
2532# a BLOCK_JOB_READY event.
aeae883b
PB
2533#
2534# This command completes an active background block operation synchronously.
2535# The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2536# is not defined. Note that if an I/O error occurs during the processing of
2537# this command: 1) the command itself will fail; 2) the error will be processed
2538# according to the rerror/werror arguments that were specified when starting
2539# the operation.
2540#
2541# A cancelled or paused job cannot be completed.
2542#
2543# @device: the device name
2544#
2545# Returns: Nothing on success
2546# If no background operation is active on this device, DeviceNotActive
2547#
2548# Since: 1.3
2549##
2550{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2551
5eeee3fa
AL
2552##
2553# @ObjectTypeInfo:
2554#
2555# This structure describes a search result from @qom-list-types
2556#
2557# @name: the type name found in the search
2558#
2559# Since: 1.1
2560#
2561# Notes: This command is experimental and may change syntax in future releases.
2562##
2563{ 'type': 'ObjectTypeInfo',
2564 'data': { 'name': 'str' } }
2565
2566##
2567# @qom-list-types:
2568#
2569# This command will return a list of types given search parameters
2570#
2571# @implements: if specified, only return types that implement this type name
2572#
2573# @abstract: if true, include abstract types in the results
2574#
2575# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2576#
2577# Since: 1.1
5eeee3fa
AL
2578##
2579{ 'command': 'qom-list-types',
2580 'data': { '*implements': 'str', '*abstract': 'bool' },
2581 'returns': [ 'ObjectTypeInfo' ] }
e1c37d0e 2582
1daa31b9
AL
2583##
2584# @DevicePropertyInfo:
2585#
2586# Information about device properties.
2587#
2588# @name: the name of the property
2589# @type: the typename of the property
2590#
2591# Since: 1.2
2592##
2593{ 'type': 'DevicePropertyInfo',
2594 'data': { 'name': 'str', 'type': 'str' } }
2595
2596##
2597# @device-list-properties:
2598#
2599# List properties associated with a device.
2600#
2601# @typename: the type name of a device
2602#
2603# Returns: a list of DevicePropertyInfo describing a devices properties
2604#
2605# Since: 1.2
2606##
2607{ 'command': 'device-list-properties',
2608 'data': { 'typename': 'str'},
2609 'returns': [ 'DevicePropertyInfo' ] }
2610
e1c37d0e
LC
2611##
2612# @migrate
2613#
2614# Migrates the current running guest to another Virtual Machine.
2615#
2616# @uri: the Uniform Resource Identifier of the destination VM
2617#
2618# @blk: #optional do block migration (full disk copy)
2619#
2620# @inc: #optional incremental disk copy migration
2621#
2622# @detach: this argument exists only for compatibility reasons and
2623# is ignored by QEMU
2624#
2625# Returns: nothing on success
2626#
2627# Since: 0.14.0
2628##
2629{ 'command': 'migrate',
2630 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
33cf629a 2631
a7ae8355
SS
2632# @xen-save-devices-state:
2633#
2634# Save the state of all devices to file. The RAM and the block devices
2635# of the VM are not saved by this command.
2636#
2637# @filename: the file to save the state of the devices to as binary
2638# data. See xen-save-devices-state.txt for a description of the binary
2639# format.
2640#
2641# Returns: Nothing on success
a7ae8355
SS
2642#
2643# Since: 1.1
2644##
2645{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
a15fef21 2646
39f42439
AP
2647##
2648# @xen-set-global-dirty-log
2649#
2650# Enable or disable the global dirty log mode.
2651#
2652# @enable: true to enable, false to disable.
2653#
2654# Returns: nothing
2655#
2656# Since: 1.3
2657##
2658{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2659
a15fef21
LC
2660##
2661# @device_del:
2662#
2663# Remove a device from a guest
2664#
2665# @id: the name of the device
2666#
2667# Returns: Nothing on success
2668# If @id is not a valid device, DeviceNotFound
a15fef21
LC
2669#
2670# Notes: When this command completes, the device may not be removed from the
2671# guest. Hot removal is an operation that requires guest cooperation.
2672# This command merely requests that the guest begin the hot removal
0402a5d6
MT
2673# process. Completion of the device removal process is signaled with a
2674# DEVICE_DELETED event. Guest reset will automatically complete removal
2675# for all devices.
a15fef21
LC
2676#
2677# Since: 0.14.0
2678##
2679{ 'command': 'device_del', 'data': {'id': 'str'} }
783e9b48
WC
2680
2681##
2682# @dump-guest-memory
2683#
2684# Dump guest's memory to vmcore. It is a synchronous operation that can take
2685# very long depending on the amount of guest memory. This command is only
f5b0d93b
LC
2686# supported on i386 and x86_64.
2687#
2688# @paging: if true, do paging to get guest's memory mapping. This allows
d691180e 2689# using gdb to process the core file.
f5b0d93b 2690#
d691180e
LC
2691# IMPORTANT: this option can make QEMU allocate several gigabytes
2692# of RAM. This can happen for a large guest, or a
2693# malicious guest pretending to be large.
2694#
2695# Also, paging=true has the following limitations:
2696#
2697# 1. The guest may be in a catastrophic state or can have corrupted
2698# memory, which cannot be trusted
2699# 2. The guest can be in real-mode even if paging is enabled. For
2700# example, the guest uses ACPI to sleep, and ACPI sleep state
2701# goes in real-mode
f5b0d93b 2702#
783e9b48 2703# @protocol: the filename or file descriptor of the vmcore. The supported
d691180e 2704# protocols are:
f5b0d93b 2705#
d691180e
LC
2706# 1. file: the protocol starts with "file:", and the following
2707# string is the file's path.
2708# 2. fd: the protocol starts with "fd:", and the following string
2709# is the fd's name.
f5b0d93b 2710#
783e9b48 2711# @begin: #optional if specified, the starting physical address.
f5b0d93b 2712#
783e9b48 2713# @length: #optional if specified, the memory size, in bytes. If you don't
d691180e
LC
2714# want to dump all guest's memory, please specify the start @begin
2715# and @length
783e9b48
WC
2716#
2717# Returns: nothing on success
783e9b48
WC
2718#
2719# Since: 1.2
2720##
2721{ 'command': 'dump-guest-memory',
2722 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2723 '*length': 'int' } }
d691180e 2724
928059a3
LC
2725##
2726# @netdev_add:
2727#
2728# Add a network backend.
2729#
2730# @type: the type of network backend. Current valid values are 'user', 'tap',
2731# 'vde', 'socket', 'dump' and 'bridge'
2732#
2733# @id: the name of the new network backend
2734#
2735# @props: #optional a list of properties to be passed to the backend in
2736# the format 'name=value', like 'ifname=tap0,script=no'
2737#
2738# Notes: The semantics of @props is not well defined. Future commands will be
2739# introduced that provide stronger typing for backend creation.
2740#
2741# Since: 0.14.0
2742#
2743# Returns: Nothing on success
2744# If @type is not a valid network backend, DeviceNotFound
928059a3
LC
2745##
2746{ 'command': 'netdev_add',
2747 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2748 'gen': 'no' }
5f964155
LC
2749
2750##
2751# @netdev_del:
2752#
2753# Remove a network backend.
2754#
2755# @id: the name of the network backend to remove
2756#
2757# Returns: Nothing on success
2758# If @id is not a valid network backend, DeviceNotFound
2759#
2760# Since: 0.14.0
2761##
2762{ 'command': 'netdev_del', 'data': {'id': 'str'} }
208c9d1b 2763
cff8b2c6
PB
2764##
2765# @object-add:
2766#
2767# Create a QOM object.
2768#
2769# @qom-type: the class name for the object to be created
2770#
2771# @id: the name of the new object
2772#
2773# @props: #optional a dictionary of properties to be passed to the backend
2774#
2775# Returns: Nothing on success
2776# Error if @qom-type is not a valid class name
2777#
2778# Since: 2.0
2779##
2780{ 'command': 'object-add',
2781 'data': {'qom-type': 'str', 'id': 'str', '*props': 'dict'},
2782 'gen': 'no' }
2783
ab2d0531
PB
2784##
2785# @object-del:
2786#
2787# Remove a QOM object.
2788#
2789# @id: the name of the QOM object to remove
2790#
2791# Returns: Nothing on success
2792# Error if @id is not a valid id for a QOM object
2793#
2794# Since: 2.0
2795##
2796{ 'command': 'object-del', 'data': {'id': 'str'} }
2797
14aa0c2d
LE
2798##
2799# @NetdevNoneOptions
2800#
2801# Use it alone to have zero network devices.
2802#
2803# Since 1.2
2804##
2805{ 'type': 'NetdevNoneOptions',
2806 'data': { } }
2807
2808##
2809# @NetLegacyNicOptions
2810#
2811# Create a new Network Interface Card.
2812#
2813# @netdev: #optional id of -netdev to connect to
2814#
2815# @macaddr: #optional MAC address
2816#
2817# @model: #optional device model (e1000, rtl8139, virtio etc.)
2818#
2819# @addr: #optional PCI device address
2820#
2821# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2822#
2823# Since 1.2
2824##
2825{ 'type': 'NetLegacyNicOptions',
2826 'data': {
2827 '*netdev': 'str',
2828 '*macaddr': 'str',
2829 '*model': 'str',
2830 '*addr': 'str',
2831 '*vectors': 'uint32' } }
2832
2833##
2834# @String
2835#
2836# A fat type wrapping 'str', to be embedded in lists.
2837#
2838# Since 1.2
2839##
2840{ 'type': 'String',
2841 'data': {
2842 'str': 'str' } }
2843
2844##
2845# @NetdevUserOptions
2846#
2847# Use the user mode network stack which requires no administrator privilege to
2848# run.
2849#
2850# @hostname: #optional client hostname reported by the builtin DHCP server
2851#
2852# @restrict: #optional isolate the guest from the host
2853#
2854# @ip: #optional legacy parameter, use net= instead
2855#
2856# @net: #optional IP address and optional netmask
2857#
2858# @host: #optional guest-visible address of the host
2859#
2860# @tftp: #optional root directory of the built-in TFTP server
2861#
2862# @bootfile: #optional BOOTP filename, for use with tftp=
2863#
2864# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2865# assign
2866#
2867# @dns: #optional guest-visible address of the virtual nameserver
2868#
63d2960b
KS
2869# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2870# to the guest
2871#
14aa0c2d
LE
2872# @smb: #optional root directory of the built-in SMB server
2873#
2874# @smbserver: #optional IP address of the built-in SMB server
2875#
2876# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2877# endpoints
2878#
2879# @guestfwd: #optional forward guest TCP connections
2880#
2881# Since 1.2
2882##
2883{ 'type': 'NetdevUserOptions',
2884 'data': {
2885 '*hostname': 'str',
2886 '*restrict': 'bool',
2887 '*ip': 'str',
2888 '*net': 'str',
2889 '*host': 'str',
2890 '*tftp': 'str',
2891 '*bootfile': 'str',
2892 '*dhcpstart': 'str',
2893 '*dns': 'str',
63d2960b 2894 '*dnssearch': ['String'],
14aa0c2d
LE
2895 '*smb': 'str',
2896 '*smbserver': 'str',
2897 '*hostfwd': ['String'],
2898 '*guestfwd': ['String'] } }
2899
2900##
2901# @NetdevTapOptions
2902#
2903# Connect the host TAP network interface name to the VLAN.
2904#
2905# @ifname: #optional interface name
2906#
2907# @fd: #optional file descriptor of an already opened tap
2908#
2ca81baa
JW
2909# @fds: #optional multiple file descriptors of already opened multiqueue capable
2910# tap
2911#
14aa0c2d
LE
2912# @script: #optional script to initialize the interface
2913#
2914# @downscript: #optional script to shut down the interface
2915#
2916# @helper: #optional command to execute to configure bridge
2917#
2918# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2919#
2920# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2921#
2922# @vhost: #optional enable vhost-net network accelerator
2923#
2924# @vhostfd: #optional file descriptor of an already opened vhost net device
2925#
2ca81baa
JW
2926# @vhostfds: #optional file descriptors of multiple already opened vhost net
2927# devices
2928#
14aa0c2d
LE
2929# @vhostforce: #optional vhost on for non-MSIX virtio guests
2930#
ec396014
JW
2931# @queues: #optional number of queues to be created for multiqueue capable tap
2932#
14aa0c2d
LE
2933# Since 1.2
2934##
2935{ 'type': 'NetdevTapOptions',
2936 'data': {
2937 '*ifname': 'str',
2938 '*fd': 'str',
264986e2 2939 '*fds': 'str',
14aa0c2d
LE
2940 '*script': 'str',
2941 '*downscript': 'str',
2942 '*helper': 'str',
2943 '*sndbuf': 'size',
2944 '*vnet_hdr': 'bool',
2945 '*vhost': 'bool',
2946 '*vhostfd': 'str',
264986e2
JW
2947 '*vhostfds': 'str',
2948 '*vhostforce': 'bool',
2949 '*queues': 'uint32'} }
14aa0c2d
LE
2950
2951##
2952# @NetdevSocketOptions
2953#
2954# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2955# socket connection.
2956#
2957# @fd: #optional file descriptor of an already opened socket
2958#
2959# @listen: #optional port number, and optional hostname, to listen on
2960#
2961# @connect: #optional port number, and optional hostname, to connect to
2962#
2963# @mcast: #optional UDP multicast address and port number
2964#
2965# @localaddr: #optional source address and port for multicast and udp packets
2966#
2967# @udp: #optional UDP unicast address and port number
2968#
2969# Since 1.2
2970##
2971{ 'type': 'NetdevSocketOptions',
2972 'data': {
2973 '*fd': 'str',
2974 '*listen': 'str',
2975 '*connect': 'str',
2976 '*mcast': 'str',
2977 '*localaddr': 'str',
2978 '*udp': 'str' } }
2979
2980##
2981# @NetdevVdeOptions
2982#
2983# Connect the VLAN to a vde switch running on the host.
2984#
2985# @sock: #optional socket path
2986#
2987# @port: #optional port number
2988#
2989# @group: #optional group owner of socket
2990#
2991# @mode: #optional permissions for socket
2992#
2993# Since 1.2
2994##
2995{ 'type': 'NetdevVdeOptions',
2996 'data': {
2997 '*sock': 'str',
2998 '*port': 'uint16',
2999 '*group': 'str',
3000 '*mode': 'uint16' } }
3001
3002##
3003# @NetdevDumpOptions
3004#
3005# Dump VLAN network traffic to a file.
3006#
3007# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
3008# suffixes.
3009#
3010# @file: #optional dump file path (default is qemu-vlan0.pcap)
3011#
3012# Since 1.2
3013##
3014{ 'type': 'NetdevDumpOptions',
3015 'data': {
3016 '*len': 'size',
3017 '*file': 'str' } }
3018
3019##
3020# @NetdevBridgeOptions
3021#
3022# Connect a host TAP network interface to a host bridge device.
3023#
3024# @br: #optional bridge name
3025#
3026# @helper: #optional command to execute to configure bridge
3027#
3028# Since 1.2
3029##
3030{ 'type': 'NetdevBridgeOptions',
3031 'data': {
3032 '*br': 'str',
3033 '*helper': 'str' } }
3034
f6c874e3
SH
3035##
3036# @NetdevHubPortOptions
3037#
3038# Connect two or more net clients through a software hub.
3039#
3040# @hubid: hub identifier number
3041#
3042# Since 1.2
3043##
3044{ 'type': 'NetdevHubPortOptions',
3045 'data': {
3046 'hubid': 'int32' } }
3047
58952137
VM
3048##
3049# @NetdevNetmapOptions
3050#
3051# Connect a client to a netmap-enabled NIC or to a VALE switch port
3052#
3053# @ifname: Either the name of an existing network interface supported by
3054# netmap, or the name of a VALE port (created on the fly).
3055# A VALE port name is in the form 'valeXXX:YYY', where XXX and
3056# YYY are non-negative integers. XXX identifies a switch and
3057# YYY identifies a port of the switch. VALE ports having the
3058# same XXX are therefore connected to the same switch.
3059#
3060# @devname: #optional path of the netmap device (default: '/dev/netmap').
3061#
c27de2a3 3062# Since 2.0
58952137
VM
3063##
3064{ 'type': 'NetdevNetmapOptions',
3065 'data': {
3066 'ifname': 'str',
3067 '*devname': 'str' } }
3068
14aa0c2d
LE
3069##
3070# @NetClientOptions
3071#
3072# A discriminated record of network device traits.
3073#
3074# Since 1.2
3075##
3076{ 'union': 'NetClientOptions',
3077 'data': {
f6c874e3
SH
3078 'none': 'NetdevNoneOptions',
3079 'nic': 'NetLegacyNicOptions',
3080 'user': 'NetdevUserOptions',
3081 'tap': 'NetdevTapOptions',
3082 'socket': 'NetdevSocketOptions',
3083 'vde': 'NetdevVdeOptions',
3084 'dump': 'NetdevDumpOptions',
3085 'bridge': 'NetdevBridgeOptions',
58952137
VM
3086 'hubport': 'NetdevHubPortOptions',
3087 'netmap': 'NetdevNetmapOptions' } }
14aa0c2d
LE
3088
3089##
3090# @NetLegacy
3091#
3092# Captures the configuration of a network device; legacy.
3093#
3094# @vlan: #optional vlan number
3095#
3096# @id: #optional identifier for monitor commands
3097#
3098# @name: #optional identifier for monitor commands, ignored if @id is present
3099#
3100# @opts: device type specific properties (legacy)
3101#
3102# Since 1.2
3103##
3104{ 'type': 'NetLegacy',
3105 'data': {
3106 '*vlan': 'int32',
3107 '*id': 'str',
3108 '*name': 'str',
3109 'opts': 'NetClientOptions' } }
3110
3111##
3112# @Netdev
3113#
3114# Captures the configuration of a network device.
3115#
3116# @id: identifier for monitor commands.
3117#
3118# @opts: device type specific properties
3119#
3120# Since 1.2
3121##
3122{ 'type': 'Netdev',
3123 'data': {
3124 'id': 'str',
3125 'opts': 'NetClientOptions' } }
3126
5be8c759
PB
3127##
3128# @InetSocketAddress
3129#
3130# Captures a socket address or address range in the Internet namespace.
3131#
3132# @host: host part of the address
3133#
3134# @port: port part of the address, or lowest port if @to is present
3135#
3136# @to: highest port to try
3137#
3138# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
3139# #optional
3140#
3141# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
3142# #optional
3143#
3144# Since 1.3
3145##
3146{ 'type': 'InetSocketAddress',
3147 'data': {
3148 'host': 'str',
3149 'port': 'str',
3150 '*to': 'uint16',
3151 '*ipv4': 'bool',
3152 '*ipv6': 'bool' } }
3153
3154##
3155# @UnixSocketAddress
3156#
3157# Captures a socket address in the local ("Unix socket") namespace.
3158#
3159# @path: filesystem path to use
3160#
3161# Since 1.3
3162##
3163{ 'type': 'UnixSocketAddress',
3164 'data': {
3165 'path': 'str' } }
3166
3167##
3168# @SocketAddress
3169#
3170# Captures the address of a socket, which could also be a named file descriptor
3171#
3172# Since 1.3
3173##
3174{ 'union': 'SocketAddress',
3175 'data': {
3176 'inet': 'InetSocketAddress',
3177 'unix': 'UnixSocketAddress',
3178 'fd': 'String' } }
3179
208c9d1b
CB
3180##
3181# @getfd:
3182#
3183# Receive a file descriptor via SCM rights and assign it a name
3184#
3185# @fdname: file descriptor name
3186#
3187# Returns: Nothing on success
208c9d1b
CB
3188#
3189# Since: 0.14.0
3190#
3191# Notes: If @fdname already exists, the file descriptor assigned to
3192# it will be closed and replaced by the received file
3193# descriptor.
3194# The 'closefd' command can be used to explicitly close the
3195# file descriptor when it is no longer needed.
3196##
3197{ 'command': 'getfd', 'data': {'fdname': 'str'} }
3198
3199##
3200# @closefd:
3201#
3202# Close a file descriptor previously passed via SCM rights
3203#
3204# @fdname: file descriptor name
3205#
3206# Returns: Nothing on success
208c9d1b
CB
3207#
3208# Since: 0.14.0
3209##
3210{ 'command': 'closefd', 'data': {'fdname': 'str'} }
01d3c80d
AL
3211
3212##
3213# @MachineInfo:
3214#
3215# Information describing a machine.
3216#
3217# @name: the name of the machine
3218#
3219# @alias: #optional an alias for the machine name
3220#
3221# @default: #optional whether the machine is default
3222#
c72e7688
MN
3223# @cpu-max: maximum number of CPUs supported by the machine type
3224# (since 1.5.0)
3225#
01d3c80d
AL
3226# Since: 1.2.0
3227##
3228{ 'type': 'MachineInfo',
3229 'data': { 'name': 'str', '*alias': 'str',
c72e7688 3230 '*is-default': 'bool', 'cpu-max': 'int' } }
01d3c80d
AL
3231
3232##
3233# @query-machines:
3234#
3235# Return a list of supported machines
3236#
3237# Returns: a list of MachineInfo
3238#
3239# Since: 1.2.0
3240##
3241{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
e4e31c63
AL
3242
3243##
3244# @CpuDefinitionInfo:
3245#
3246# Virtual CPU definition.
3247#
3248# @name: the name of the CPU definition
3249#
3250# Since: 1.2.0
3251##
3252{ 'type': 'CpuDefinitionInfo',
3253 'data': { 'name': 'str' } }
3254
3255##
3256# @query-cpu-definitions:
3257#
3258# Return a list of supported virtual CPU definitions
3259#
3260# Returns: a list of CpuDefInfo
3261#
3262# Since: 1.2.0
3263##
3264{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
ba1c048a
CB
3265
3266# @AddfdInfo:
3267#
3268# Information about a file descriptor that was added to an fd set.
3269#
3270# @fdset-id: The ID of the fd set that @fd was added to.
3271#
3272# @fd: The file descriptor that was received via SCM rights and
3273# added to the fd set.
3274#
3275# Since: 1.2.0
3276##
3277{ 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
3278
3279##
3280# @add-fd:
3281#
3282# Add a file descriptor, that was passed via SCM rights, to an fd set.
3283#
3284# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
3285#
3286# @opaque: #optional A free-form string that can be used to describe the fd.
3287#
3288# Returns: @AddfdInfo on success
3289# If file descriptor was not received, FdNotSupplied
9ac54af0 3290# If @fdset-id is a negative value, InvalidParameterValue
ba1c048a
CB
3291#
3292# Notes: The list of fd sets is shared by all monitor connections.
3293#
3294# If @fdset-id is not specified, a new fd set will be created.
3295#
3296# Since: 1.2.0
3297##
3298{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
3299 'returns': 'AddfdInfo' }
3300
3301##
3302# @remove-fd:
3303#
3304# Remove a file descriptor from an fd set.
3305#
3306# @fdset-id: The ID of the fd set that the file descriptor belongs to.
3307#
3308# @fd: #optional The file descriptor that is to be removed.
3309#
3310# Returns: Nothing on success
3311# If @fdset-id or @fd is not found, FdNotFound
3312#
3313# Since: 1.2.0
3314#
3315# Notes: The list of fd sets is shared by all monitor connections.
3316#
3317# If @fd is not specified, all file descriptors in @fdset-id
3318# will be removed.
3319##
3320{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
3321
3322##
3323# @FdsetFdInfo:
3324#
3325# Information about a file descriptor that belongs to an fd set.
3326#
3327# @fd: The file descriptor value.
3328#
3329# @opaque: #optional A free-form string that can be used to describe the fd.
3330#
3331# Since: 1.2.0
3332##
3333{ 'type': 'FdsetFdInfo',
3334 'data': {'fd': 'int', '*opaque': 'str'} }
3335
3336##
3337# @FdsetInfo:
3338#
3339# Information about an fd set.
3340#
3341# @fdset-id: The ID of the fd set.
3342#
3343# @fds: A list of file descriptors that belong to this fd set.
3344#
3345# Since: 1.2.0
3346##
3347{ 'type': 'FdsetInfo',
3348 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
3349
3350##
3351# @query-fdsets:
3352#
3353# Return information describing all fd sets.
3354#
3355# Returns: A list of @FdsetInfo
3356#
3357# Since: 1.2.0
3358#
3359# Note: The list of fd sets is shared by all monitor connections.
3360#
3361##
3362{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
99afc91d 3363
99afc91d
DB
3364##
3365# @TargetInfo:
3366#
3367# Information describing the QEMU target.
3368#
3369# @arch: the target architecture (eg "x86_64", "i386", etc)
3370#
3371# Since: 1.2.0
3372##
3373{ 'type': 'TargetInfo',
c02a9552 3374 'data': { 'arch': 'str' } }
99afc91d
DB
3375
3376##
3377# @query-target:
3378#
3379# Return information about the target for this QEMU
3380#
3381# Returns: TargetInfo
3382#
3383# Since: 1.2.0
3384##
3385{ 'command': 'query-target', 'returns': 'TargetInfo' }
411656f4
AK
3386
3387##
3388# @QKeyCode:
3389#
3390# An enumeration of key name.
3391#
3392# This is used by the send-key command.
3393#
3394# Since: 1.3.0
3395##
3396{ 'enum': 'QKeyCode',
3397 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3398 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3399 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3400 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3401 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3402 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3403 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3404 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3405 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3406 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3407 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3408 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3409 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3410 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3411 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
e4c8f004 3412
9f328977
LC
3413##
3414# @KeyValue
3415#
3416# Represents a keyboard key.
3417#
3418# Since: 1.3.0
3419##
3420{ 'union': 'KeyValue',
3421 'data': {
3422 'number': 'int',
3423 'qcode': 'QKeyCode' } }
3424
e4c8f004
AK
3425##
3426# @send-key:
3427#
3428# Send keys to guest.
3429#
9f328977
LC
3430# @keys: An array of @KeyValue elements. All @KeyValues in this array are
3431# simultaneously sent to the guest. A @KeyValue.number value is sent
3432# directly to the guest, while @KeyValue.qcode must be a valid
3433# @QKeyCode value
e4c8f004
AK
3434#
3435# @hold-time: #optional time to delay key up events, milliseconds. Defaults
3436# to 100
3437#
3438# Returns: Nothing on success
3439# If key is unknown or redundant, InvalidParameter
3440#
3441# Since: 1.3.0
3442#
3443##
3444{ 'command': 'send-key',
9f328977 3445 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
ad39cf6d
LC
3446
3447##
3448# @screendump:
3449#
3450# Write a PPM of the VGA screen to a file.
3451#
3452# @filename: the path of a new PPM file to store the image
3453#
3454# Returns: Nothing on success
3455#
3456# Since: 0.14.0
3457##
3458{ 'command': 'screendump', 'data': {'filename': 'str'} }
6dd844db
PB
3459
3460##
3461# @nbd-server-start:
3462#
3463# Start an NBD server listening on the given host and port. Block
3464# devices can then be exported using @nbd-server-add. The NBD
3465# server will present them as named exports; for example, another
3466# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3467#
3468# @addr: Address on which to listen.
3469#
3470# Returns: error if the server is already running.
3471#
3472# Since: 1.3.0
3473##
3474{ 'command': 'nbd-server-start',
3475 'data': { 'addr': 'SocketAddress' } }
3476
3477##
3478# @nbd-server-add:
3479#
3480# Export a device to QEMU's embedded NBD server.
3481#
3482# @device: Block device to be exported
3483#
3484# @writable: Whether clients should be able to write to the device via the
3485# NBD connection (default false). #optional
3486#
3487# Returns: error if the device is already marked for export.
3488#
3489# Since: 1.3.0
3490##
3491{ 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3492
3493##
3494# @nbd-server-stop:
3495#
3496# Stop QEMU's embedded NBD server, and unregister all devices previously
3497# added via @nbd-server-add.
3498#
3499# Since: 1.3.0
3500##
3501{ 'command': 'nbd-server-stop' }
f1a1a356 3502
ffbdbe59
GH
3503##
3504# @ChardevFile:
3505#
3506# Configuration info for file chardevs.
3507#
3508# @in: #optional The name of the input file
3509# @out: The name of the output file
3510#
3511# Since: 1.4
3512##
3513{ 'type': 'ChardevFile', 'data': { '*in' : 'str',
3514 'out' : 'str' } }
3515
d59044ef 3516##
d36b2b90 3517# @ChardevHostdev:
d59044ef 3518#
548cbb36 3519# Configuration info for device and pipe chardevs.
d59044ef
GH
3520#
3521# @device: The name of the special file for the device,
3522# i.e. /dev/ttyS0 on Unix or COM1: on Windows
3523# @type: What kind of device this is.
3524#
3525# Since: 1.4
3526##
d36b2b90 3527{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
d59044ef 3528
f6bd5d6e
GH
3529##
3530# @ChardevSocket:
3531#
3ecc059d 3532# Configuration info for (stream) socket chardevs.
f6bd5d6e
GH
3533#
3534# @addr: socket address to listen on (server=true)
3535# or connect to (server=false)
3536# @server: #optional create server socket (default: true)
ef993ba7
GH
3537# @wait: #optional wait for incoming connection on server
3538# sockets (default: false).
f6bd5d6e 3539# @nodelay: #optional set TCP_NODELAY socket option (default: false)
ef993ba7
GH
3540# @telnet: #optional enable telnet protocol on server
3541# sockets (default: false)
f6bd5d6e
GH
3542#
3543# Since: 1.4
3544##
3545{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3546 '*server' : 'bool',
3547 '*wait' : 'bool',
3548 '*nodelay' : 'bool',
3549 '*telnet' : 'bool' } }
3550
3ecc059d 3551##
08d0ab3f 3552# @ChardevUdp:
3ecc059d
GH
3553#
3554# Configuration info for datagram socket chardevs.
3555#
3556# @remote: remote address
3557# @local: #optional local address
3558#
3559# Since: 1.5
3560##
08d0ab3f
LL
3561{ 'type': 'ChardevUdp', 'data': { 'remote' : 'SocketAddress',
3562 '*local' : 'SocketAddress' } }
3ecc059d 3563
edb2fb3c
GH
3564##
3565# @ChardevMux:
3566#
3567# Configuration info for mux chardevs.
3568#
3569# @chardev: name of the base chardev.
3570#
3571# Since: 1.5
3572##
3573{ 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3574
7c358031
GH
3575##
3576# @ChardevStdio:
3577#
3578# Configuration info for stdio chardevs.
3579#
3580# @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3581# be delivered to qemu. Default: true in -nographic mode,
3582# false otherwise.
3583#
3584# Since: 1.5
3585##
3586{ 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3587
cd153e2a
GH
3588##
3589# @ChardevSpiceChannel:
3590#
3591# Configuration info for spice vm channel chardevs.
3592#
3593# @type: kind of channel (for example vdagent).
3594#
3595# Since: 1.5
3596##
3597{ 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3598
3599##
3600# @ChardevSpicePort:
3601#
3602# Configuration info for spice port chardevs.
3603#
3604# @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3605#
3606# Since: 1.5
3607##
3608{ 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3609
702ec69c
GH
3610##
3611# @ChardevVC:
3612#
3613# Configuration info for virtual console chardevs.
3614#
3615# @width: console width, in pixels
3616# @height: console height, in pixels
3617# @cols: console width, in chars
3618# @rows: console height, in chars
3619#
3620# Since: 1.5
3621##
3622{ 'type': 'ChardevVC', 'data': { '*width' : 'int',
3623 '*height' : 'int',
3624 '*cols' : 'int',
3625 '*rows' : 'int' } }
3626
1da48c65 3627##
4f57378f 3628# @ChardevRingbuf:
1da48c65 3629#
3a1da42e 3630# Configuration info for ring buffer chardevs.
1da48c65 3631#
3a1da42e 3632# @size: #optional ring buffer size, must be power of two, default is 65536
1da48c65
GH
3633#
3634# Since: 1.5
3635##
4f57378f 3636{ 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
1da48c65 3637
f1a1a356
GH
3638##
3639# @ChardevBackend:
3640#
3641# Configuration info for the new chardev backend.
3642#
3643# Since: 1.4
3644##
3645{ 'type': 'ChardevDummy', 'data': { } }
3646
f6bd5d6e 3647{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
d36b2b90
MA
3648 'serial' : 'ChardevHostdev',
3649 'parallel': 'ChardevHostdev',
548cbb36 3650 'pipe' : 'ChardevHostdev',
f6bd5d6e 3651 'socket' : 'ChardevSocket',
08d0ab3f 3652 'udp' : 'ChardevUdp',
0a1a7fab 3653 'pty' : 'ChardevDummy',
edb2fb3c 3654 'null' : 'ChardevDummy',
f5a51cab 3655 'mux' : 'ChardevMux',
2d57286d 3656 'msmouse': 'ChardevDummy',
7c358031 3657 'braille': 'ChardevDummy',
d9ac374f 3658 'stdio' : 'ChardevStdio',
cd153e2a
GH
3659 'console': 'ChardevDummy',
3660 'spicevmc' : 'ChardevSpiceChannel',
702ec69c 3661 'spiceport' : 'ChardevSpicePort',
1da48c65 3662 'vc' : 'ChardevVC',
3a1da42e
MA
3663 'ringbuf': 'ChardevRingbuf',
3664 # next one is just for compatibility
4f57378f 3665 'memory' : 'ChardevRingbuf' } }
f1a1a356
GH
3666
3667##
3668# @ChardevReturn:
3669#
3670# Return info about the chardev backend just created.
3671#
58fa4325
MA
3672# @pty: #optional name of the slave pseudoterminal device, present if
3673# and only if a chardev of type 'pty' was created
3674#
f1a1a356
GH
3675# Since: 1.4
3676##
0a1a7fab 3677{ 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
f1a1a356
GH
3678
3679##
3680# @chardev-add:
3681#
58fa4325 3682# Add a character device backend
f1a1a356
GH
3683#
3684# @id: the chardev's ID, must be unique
3685# @backend: backend type and parameters
3686#
58fa4325 3687# Returns: ChardevReturn.
f1a1a356
GH
3688#
3689# Since: 1.4
3690##
3691{ 'command': 'chardev-add', 'data': {'id' : 'str',
3692 'backend' : 'ChardevBackend' },
3693 'returns': 'ChardevReturn' }
3694
3695##
3696# @chardev-remove:
3697#
58fa4325 3698# Remove a character device backend
f1a1a356
GH
3699#
3700# @id: the chardev's ID, must exist and not be in use
3701#
3702# Returns: Nothing on success
3703#
3704# Since: 1.4
3705##
3706{ 'command': 'chardev-remove', 'data': {'id': 'str'} }
d1a0cf73
SB
3707
3708##
3709# @TpmModel:
3710#
3711# An enumeration of TPM models
3712#
3713# @tpm-tis: TPM TIS model
3714#
3715# Since: 1.5
3716##
3717{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3718
3719##
3720# @query-tpm-models:
3721#
3722# Return a list of supported TPM models
3723#
3724# Returns: a list of TpmModel
3725#
3726# Since: 1.5
3727##
3728{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3729
3730##
3731# @TpmType:
3732#
3733# An enumeration of TPM types
3734#
3735# @passthrough: TPM passthrough type
3736#
3737# Since: 1.5
3738##
3739{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3740
3741##
3742# @query-tpm-types:
3743#
3744# Return a list of supported TPM types
3745#
3746# Returns: a list of TpmType
3747#
3748# Since: 1.5
3749##
3750{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3751
3752##
3753# @TPMPassthroughOptions:
3754#
3755# Information about the TPM passthrough type
3756#
3757# @path: #optional string describing the path used for accessing the TPM device
3758#
3759# @cancel-path: #optional string showing the TPM's sysfs cancel file
3760# for cancellation of TPM commands while they are executing
3761#
3762# Since: 1.5
3763##
3764{ 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3765 '*cancel-path' : 'str'} }
3766
3767##
3768# @TpmTypeOptions:
3769#
3770# A union referencing different TPM backend types' configuration options
3771#
88ca7bcf 3772# @passthrough: The configuration options for the TPM passthrough type
d1a0cf73
SB
3773#
3774# Since: 1.5
3775##
3776{ 'union': 'TpmTypeOptions',
88ca7bcf 3777 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
d1a0cf73
SB
3778
3779##
3780# @TpmInfo:
3781#
3782# Information about the TPM
3783#
3784# @id: The Id of the TPM
3785#
3786# @model: The TPM frontend model
3787#
88ca7bcf 3788# @options: The TPM (backend) type configuration options
d1a0cf73
SB
3789#
3790# Since: 1.5
3791##
3792{ 'type': 'TPMInfo',
3793 'data': {'id': 'str',
3794 'model': 'TpmModel',
88ca7bcf 3795 'options': 'TpmTypeOptions' } }
d1a0cf73
SB
3796
3797##
3798# @query-tpm:
3799#
3800# Return information about the TPM device
3801#
3802# Returns: @TPMInfo on success
3803#
3804# Since: 1.5
3805##
3806{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }
8ccbad5c
LE
3807
3808##
3809# @AcpiTableOptions
3810#
3811# Specify an ACPI table on the command line to load.
3812#
3813# At most one of @file and @data can be specified. The list of files specified
3814# by any one of them is loaded and concatenated in order. If both are omitted,
3815# @data is implied.
3816#
3817# Other fields / optargs can be used to override fields of the generic ACPI
3818# table header; refer to the ACPI specification 5.0, section 5.2.6 System
3819# Description Table Header. If a header field is not overridden, then the
3820# corresponding value from the concatenated blob is used (in case of @file), or
3821# it is filled in with a hard-coded value (in case of @data).
3822#
3823# String fields are copied into the matching ACPI member from lowest address
3824# upwards, and silently truncated / NUL-padded to length.
3825#
3826# @sig: #optional table signature / identifier (4 bytes)
3827#
3828# @rev: #optional table revision number (dependent on signature, 1 byte)
3829#
3830# @oem_id: #optional OEM identifier (6 bytes)
3831#
3832# @oem_table_id: #optional OEM table identifier (8 bytes)
3833#
3834# @oem_rev: #optional OEM-supplied revision number (4 bytes)
3835#
3836# @asl_compiler_id: #optional identifier of the utility that created the table
3837# (4 bytes)
3838#
3839# @asl_compiler_rev: #optional revision number of the utility that created the
3840# table (4 bytes)
3841#
3842# @file: #optional colon (:) separated list of pathnames to load and
3843# concatenate as table data. The resultant binary blob is expected to
3844# have an ACPI table header. At least one file is required. This field
3845# excludes @data.
3846#
3847# @data: #optional colon (:) separated list of pathnames to load and
3848# concatenate as table data. The resultant binary blob must not have an
3849# ACPI table header. At least one file is required. This field excludes
3850# @file.
3851#
3852# Since 1.5
3853##
3854{ 'type': 'AcpiTableOptions',
3855 'data': {
3856 '*sig': 'str',
3857 '*rev': 'uint8',
3858 '*oem_id': 'str',
3859 '*oem_table_id': 'str',
3860 '*oem_rev': 'uint32',
3861 '*asl_compiler_id': 'str',
3862 '*asl_compiler_rev': 'uint32',
3863 '*file': 'str',
3864 '*data': 'str' }}
1f8f987d
AK
3865
3866##
3867# @CommandLineParameterType:
3868#
3869# Possible types for an option parameter.
3870#
3871# @string: accepts a character string
3872#
3873# @boolean: accepts "on" or "off"
3874#
3875# @number: accepts a number
3876#
3877# @size: accepts a number followed by an optional suffix (K)ilo,
3878# (M)ega, (G)iga, (T)era
3879#
3880# Since 1.5
3881##
3882{ 'enum': 'CommandLineParameterType',
3883 'data': ['string', 'boolean', 'number', 'size'] }
3884
3885##
3886# @CommandLineParameterInfo:
3887#
3888# Details about a single parameter of a command line option.
3889#
3890# @name: parameter name
3891#
3892# @type: parameter @CommandLineParameterType
3893#
3894# @help: #optional human readable text string, not suitable for parsing.
3895#
3896# Since 1.5
3897##
3898{ 'type': 'CommandLineParameterInfo',
3899 'data': { 'name': 'str',
3900 'type': 'CommandLineParameterType',
3901 '*help': 'str' } }
3902
3903##
3904# @CommandLineOptionInfo:
3905#
3906# Details about a command line option, including its list of parameter details
3907#
3908# @option: option name
3909#
3910# @parameters: an array of @CommandLineParameterInfo
3911#
3912# Since 1.5
3913##
3914{ 'type': 'CommandLineOptionInfo',
3915 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3916
3917##
3918# @query-command-line-options:
3919#
3920# Query command line option schema.
3921#
3922# @option: #optional option name
3923#
3924# Returns: list of @CommandLineOptionInfo for all options (or for the given
3925# @option). Returns an error if the given @option doesn't exist.
3926#
3927# Since 1.5
3928##
3929{'command': 'query-command-line-options', 'data': { '*option': 'str' },
3930 'returns': ['CommandLineOptionInfo'] }
8e8aba50
EH
3931
3932##
3933# @X86CPURegister32
3934#
3935# A X86 32-bit register
3936#
3937# Since: 1.5
3938##
3939{ 'enum': 'X86CPURegister32',
3940 'data': [ 'EAX', 'EBX', 'ECX', 'EDX', 'ESP', 'EBP', 'ESI', 'EDI' ] }
3941
3942##
3943# @X86CPUFeatureWordInfo
3944#
3945# Information about a X86 CPU feature word
3946#
3947# @cpuid-input-eax: Input EAX value for CPUID instruction for that feature word
3948#
3949# @cpuid-input-ecx: #optional Input ECX value for CPUID instruction for that
3950# feature word
3951#
3952# @cpuid-register: Output register containing the feature bits
3953#
3954# @features: value of output register, containing the feature bits
3955#
3956# Since: 1.5
3957##
3958{ 'type': 'X86CPUFeatureWordInfo',
3959 'data': { 'cpuid-input-eax': 'int',
3960 '*cpuid-input-ecx': 'int',
3961 'cpuid-register': 'X86CPURegister32',
3962 'features': 'int' } }
b1be4280
AK
3963
3964##
3965# @RxState:
3966#
3967# Packets receiving state
3968#
3969# @normal: filter assigned packets according to the mac-table
3970#
3971# @none: don't receive any assigned packet
3972#
3973# @all: receive all assigned packets
3974#
3975# Since: 1.6
3976##
3977{ 'enum': 'RxState', 'data': [ 'normal', 'none', 'all' ] }
3978
3979##
3980# @RxFilterInfo:
3981#
3982# Rx-filter information for a NIC.
3983#
3984# @name: net client name
3985#
3986# @promiscuous: whether promiscuous mode is enabled
3987#
3988# @multicast: multicast receive state
3989#
3990# @unicast: unicast receive state
3991#
3992# @broadcast-allowed: whether to receive broadcast
3993#
3994# @multicast-overflow: multicast table is overflowed or not
3995#
3996# @unicast-overflow: unicast table is overflowed or not
3997#
3998# @main-mac: the main macaddr string
3999#
4000# @vlan-table: a list of active vlan id
4001#
4002# @unicast-table: a list of unicast macaddr string
4003#
4004# @multicast-table: a list of multicast macaddr string
4005#
4006# Since 1.6
4007##
4008
4009{ 'type': 'RxFilterInfo',
4010 'data': {
4011 'name': 'str',
4012 'promiscuous': 'bool',
4013 'multicast': 'RxState',
4014 'unicast': 'RxState',
4015 'broadcast-allowed': 'bool',
4016 'multicast-overflow': 'bool',
4017 'unicast-overflow': 'bool',
4018 'main-mac': 'str',
4019 'vlan-table': ['int'],
4020 'unicast-table': ['str'],
4021 'multicast-table': ['str'] }}
4022
4023##
4024# @query-rx-filter:
4025#
4026# Return rx-filter information for all NICs (or for the given NIC).
4027#
4028# @name: #optional net client name
4029#
4030# Returns: list of @RxFilterInfo for all NICs (or for the given NIC).
4031# Returns an error if the given @name doesn't exist, or given
4032# NIC doesn't support rx-filter querying, or given net client
4033# isn't a NIC.
4034#
4035# Since: 1.6
4036##
4037{ 'command': 'query-rx-filter', 'data': { '*name': 'str' },
4038 'returns': ['RxFilterInfo'] }
d26c9a15
KW
4039
4040
4041##
4042# @BlockdevDiscardOptions
4043#
4044# Determines how to handle discard requests.
4045#
4046# @ignore: Ignore the request
4047# @unmap: Forward as an unmap request
4048#
4049# Since: 1.7
4050##
4051{ 'enum': 'BlockdevDiscardOptions',
4052 'data': [ 'ignore', 'unmap' ] }
4053
4054##
4055# @BlockdevAioOptions
4056#
4057# Selects the AIO backend to handle I/O requests
4058#
4059# @threads: Use qemu's thread pool
4060# @native: Use native AIO backend (only Linux and Windows)
4061#
4062# Since: 1.7
4063##
4064{ 'enum': 'BlockdevAioOptions',
4065 'data': [ 'threads', 'native' ] }
4066
4067##
4068# @BlockdevCacheOptions
4069#
4070# Includes cache-related options for block devices
4071#
4072# @writeback: #optional enables writeback mode for any caches (default: true)
4073# @direct: #optional enables use of O_DIRECT (bypass the host page cache;
4074# default: false)
4075# @no-flush: #optional ignore any flush requests for the device (default:
4076# false)
4077#
4078# Since: 1.7
4079##
4080{ 'type': 'BlockdevCacheOptions',
4081 'data': { '*writeback': 'bool',
4082 '*direct': 'bool',
4083 '*no-flush': 'bool' } }
4084
4085##
4086# @BlockdevOptionsBase
4087#
4088# Options that are available for all block devices, independent of the block
4089# driver.
4090#
4091# @driver: block driver name
4092# @id: #optional id by which the new block device can be referred to.
4093# This is a required option on the top level of blockdev-add, and
4094# currently not allowed on any other level.
4095# @discard: #optional discard-related options (default: ignore)
4096# @cache: #optional cache-related options
4097# @aio: #optional AIO backend (default: threads)
4098# @rerror: #optional how to handle read errors on the device
4099# (default: report)
4100# @werror: #optional how to handle write errors on the device
4101# (default: enospc)
4102# @read-only: #optional whether the block device should be read-only
4103# (default: false)
4104#
4105# Since: 1.7
4106##
4107{ 'type': 'BlockdevOptionsBase',
4108 'data': { 'driver': 'str',
4109 '*id': 'str',
4110 '*discard': 'BlockdevDiscardOptions',
4111 '*cache': 'BlockdevCacheOptions',
4112 '*aio': 'BlockdevAioOptions',
4113 '*rerror': 'BlockdevOnError',
4114 '*werror': 'BlockdevOnError',
4115 '*read-only': 'bool' } }
4116
4117##
4118# @BlockdevOptionsFile
4119#
4120# Driver specific block device options for the file backend and similar
4121# protocols.
4122#
4123# @filename: path to the image file
4124#
4125# Since: 1.7
4126##
4127{ 'type': 'BlockdevOptionsFile',
4128 'data': { 'filename': 'str' } }
4129
4130##
4131# @BlockdevOptionsVVFAT
4132#
4133# Driver specific block device options for the vvfat protocol.
4134#
4135# @dir: directory to be exported as FAT image
4136# @fat-type: #optional FAT type: 12, 16 or 32
4137# @floppy: #optional whether to export a floppy image (true) or
4138# partitioned hard disk (false; default)
4139# @rw: #optional whether to allow write operations (default: false)
4140#
4141# Since: 1.7
4142##
4143{ 'type': 'BlockdevOptionsVVFAT',
4144 'data': { 'dir': 'str', '*fat-type': 'int', '*floppy': 'bool',
4145 '*rw': 'bool' } }
4146
4147##
4148# @BlockdevOptionsGenericFormat
4149#
4150# Driver specific block device options for image format that have no option
4151# besides their data source.
4152#
4153# @file: reference to or definition of the data source block device
4154#
4155# Since: 1.7
4156##
4157{ 'type': 'BlockdevOptionsGenericFormat',
4158 'data': { 'file': 'BlockdevRef' } }
4159
4160##
4161# @BlockdevOptionsGenericCOWFormat
4162#
4163# Driver specific block device options for image format that have no option
4164# besides their data source and an optional backing file.
4165#
4166# @backing: #optional reference to or definition of the backing file block
4167# device (if missing, taken from the image file content). It is
4168# allowed to pass an empty string here in order to disable the
4169# default backing file.
4170#
4171# Since: 1.7
4172##
4173{ 'type': 'BlockdevOptionsGenericCOWFormat',
4174 'base': 'BlockdevOptionsGenericFormat',
4175 'data': { '*backing': 'BlockdevRef' } }
4176
4177##
4178# @BlockdevOptionsQcow2
4179#
4180# Driver specific block device options for qcow2.
4181#
4182# @lazy-refcounts: #optional whether to enable the lazy refcounts
4183# feature (default is taken from the image file)
4184#
4185# @pass-discard-request: #optional whether discard requests to the qcow2
4186# device should be forwarded to the data source
4187#
4188# @pass-discard-snapshot: #optional whether discard requests for the data source
4189# should be issued when a snapshot operation (e.g.
4190# deleting a snapshot) frees clusters in the qcow2 file
4191#
4192# @pass-discard-other: #optional whether discard requests for the data source
4193# should be issued on other occasions where a cluster
4194# gets freed
4195#
4196# Since: 1.7
4197##
4198{ 'type': 'BlockdevOptionsQcow2',
4199 'base': 'BlockdevOptionsGenericCOWFormat',
4200 'data': { '*lazy-refcounts': 'bool',
4201 '*pass-discard-request': 'bool',
4202 '*pass-discard-snapshot': 'bool',
4203 '*pass-discard-other': 'bool' } }
4204
1bf20b82
HR
4205##
4206# @BlkdebugEvent
4207#
4208# Trigger events supported by blkdebug.
4209##
4210{ 'enum': 'BlkdebugEvent',
4211 'data': [ 'l1_update', 'l1_grow.alloc_table', 'l1_grow.write_table',
4212 'l1_grow.activate_table', 'l2_load', 'l2_update',
4213 'l2_update_compressed', 'l2_alloc.cow_read', 'l2_alloc.write',
4214 'read_aio', 'read_backing_aio', 'read_compressed', 'write_aio',
4215 'write_compressed', 'vmstate_load', 'vmstate_save', 'cow_read',
4216 'cow_write', 'reftable_load', 'reftable_grow', 'reftable_update',
4217 'refblock_load', 'refblock_update', 'refblock_update_part',
4218 'refblock_alloc', 'refblock_alloc.hookup', 'refblock_alloc.write',
4219 'refblock_alloc.write_blocks', 'refblock_alloc.write_table',
4220 'refblock_alloc.switch_table', 'cluster_alloc',
4221 'cluster_alloc_bytes', 'cluster_free', 'flush_to_os',
4222 'flush_to_disk' ] }
4223
4224##
4225# @BlkdebugInjectErrorOptions
4226#
4227# Describes a single error injection for blkdebug.
4228#
4229# @event: trigger event
4230#
4231# @state: #optional the state identifier blkdebug needs to be in to
4232# actually trigger the event; defaults to "any"
4233#
4234# @errno: #optional error identifier (errno) to be returned; defaults to
4235# EIO
4236#
4237# @sector: #optional specifies the sector index which has to be affected
4238# in order to actually trigger the event; defaults to "any
4239# sector"
4240#
4241# @once: #optional disables further events after this one has been
4242# triggered; defaults to false
4243#
4244# @immediately: #optional fail immediately; defaults to false
4245#
4246# Since: 2.0
4247##
4248{ 'type': 'BlkdebugInjectErrorOptions',
4249 'data': { 'event': 'BlkdebugEvent',
4250 '*state': 'int',
4251 '*errno': 'int',
4252 '*sector': 'int',
4253 '*once': 'bool',
4254 '*immediately': 'bool' } }
4255
4256##
4257# @BlkdebugSetStateOptions
4258#
4259# Describes a single state-change event for blkdebug.
4260#
4261# @event: trigger event
4262#
4263# @state: #optional the current state identifier blkdebug needs to be in;
4264# defaults to "any"
4265#
4266# @new_state: the state identifier blkdebug is supposed to assume if
4267# this event is triggered
4268#
4269# Since: 2.0
4270##
4271{ 'type': 'BlkdebugSetStateOptions',
4272 'data': { 'event': 'BlkdebugEvent',
4273 '*state': 'int',
4274 'new_state': 'int' } }
4275
4276##
4277# @BlockdevOptionsBlkdebug
4278#
4279# Driver specific block device options for blkdebug.
4280#
4281# @image: underlying raw block device (or image file)
4282#
4283# @config: #optional filename of the configuration file
4284#
4285# @inject-error: #optional array of error injection descriptions
4286#
4287# @set-state: #optional array of state-change descriptions
4288#
4289# Since: 2.0
4290##
4291{ 'type': 'BlockdevOptionsBlkdebug',
4292 'data': { 'image': 'BlockdevRef',
4293 '*config': 'str',
4294 '*inject-error': ['BlkdebugInjectErrorOptions'],
4295 '*set-state': ['BlkdebugSetStateOptions'] } }
4296
4297##
4298# @BlockdevOptionsBlkverify
4299#
4300# Driver specific block device options for blkverify.
4301#
4302# @test: block device to be tested
4303#
4304# @raw: raw image used for verification
4305#
4306# Since: 2.0
4307##
4308{ 'type': 'BlockdevOptionsBlkverify',
4309 'data': { 'test': 'BlockdevRef',
4310 'raw': 'BlockdevRef' } }
4311
d26c9a15
KW
4312##
4313# @BlockdevOptions
4314#
4315# Options for creating a block device.
4316#
4317# Since: 1.7
4318##
4319{ 'union': 'BlockdevOptions',
4320 'base': 'BlockdevOptionsBase',
4321 'discriminator': 'driver',
4322 'data': {
4323 'file': 'BlockdevOptionsFile',
4324 'http': 'BlockdevOptionsFile',
4325 'https': 'BlockdevOptionsFile',
4326 'ftp': 'BlockdevOptionsFile',
4327 'ftps': 'BlockdevOptionsFile',
4328 'tftp': 'BlockdevOptionsFile',
4329# TODO gluster: Wait for structured options
4330# TODO iscsi: Wait for structured options
4331# TODO nbd: Should take InetSocketAddress for 'host'?
4332# TODO rbd: Wait for structured options
4333# TODO sheepdog: Wait for structured options
4334# TODO ssh: Should take InetSocketAddress for 'host'?
4335 'vvfat': 'BlockdevOptionsVVFAT',
1bf20b82
HR
4336 'blkdebug': 'BlockdevOptionsBlkdebug',
4337 'blkverify': 'BlockdevOptionsBlkverify',
d26c9a15
KW
4338 'bochs': 'BlockdevOptionsGenericFormat',
4339 'cloop': 'BlockdevOptionsGenericFormat',
4340 'cow': 'BlockdevOptionsGenericCOWFormat',
4341 'dmg': 'BlockdevOptionsGenericFormat',
4342 'parallels': 'BlockdevOptionsGenericFormat',
4343 'qcow': 'BlockdevOptionsGenericCOWFormat',
4344 'qcow2': 'BlockdevOptionsQcow2',
4345 'qed': 'BlockdevOptionsGenericCOWFormat',
4346 'raw': 'BlockdevOptionsGenericFormat',
4347 'vdi': 'BlockdevOptionsGenericFormat',
4348 'vhdx': 'BlockdevOptionsGenericFormat',
4349 'vmdk': 'BlockdevOptionsGenericCOWFormat',
4350 'vpc': 'BlockdevOptionsGenericFormat'
4351 } }
4352
4353##
4354# @BlockdevRef
4355#
4356# Reference to a block device.
4357#
4358# @definition: defines a new block device inline
4359# @reference: references the ID of an existing block device. An
4360# empty string means that no block device should be
4361# referenced.
4362#
4363# Since: 1.7
4364##
4365{ 'union': 'BlockdevRef',
4366 'discriminator': {},
4367 'data': { 'definition': 'BlockdevOptions',
4368 'reference': 'str' } }
4369
4370##
4371# @blockdev-add:
4372#
4373# Creates a new block device.
4374#
4375# @options: block device options for the new device
4376#
4377# Since: 1.7
4378##
4379{ 'command': 'blockdev-add', 'data': { 'options': 'BlockdevOptions' } }