blob: 65be8f4f370fbb2db259fb651f76a9f267a23bcd [file] [log] [blame]
Anthony Liguorie3193602011-09-02 12:34:47 -05001# -*- Mode: Python -*-
2#
3# QAPI Schema
Anthony Liguori48a32be2011-09-02 12:34:48 -05004
5##
Luiz Capitulinodcafd322012-07-27 09:34:50 -03006# @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#
Luiz Capitulinodcafd322012-07-27 09:34:50 -030025# Since: 1.2
26##
27{ 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
Paolo Bonzini1e998142012-10-23 14:54:21 +020029 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
Luiz Capitulinodcafd322012-07-27 09:34:50 -030030
31##
Luiz Capitulinob224e5e2012-09-13 16:52:20 -030032# @add_client
33#
34# Allow client connections for VNC, Spice and socket based
35# character devices to be passed in to QEMU via SCM_RIGHTS.
36#
37# @protocol: protocol name. Valid names are "vnc", "spice" or the
38# name of a character device (eg. from -chardev id=XXXX)
39#
40# @fdname: file descriptor name previously passed via 'getfd' command
41#
42# @skipauth: #optional whether to skip authentication. Only applies
43# to "vnc" and "spice" protocols
44#
45# @tls: #optional whether to perform TLS. Only applies to the "spice"
46# protocol
47#
48# Returns: nothing on success.
49#
50# Since: 0.14.0
51##
52{ 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54 '*tls': 'bool' } }
55
56##
Anthony Liguori48a32be2011-09-02 12:34:48 -050057# @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' }
Luiz Capitulinob9c15f12011-08-26 17:38:13 -030077
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' }
Luiz Capitulino292a2602011-09-12 15:10:53 -0300114
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
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300139##
140# @RunState
141#
Lei Li6932a692012-08-23 13:14:25 +0800142# An enumeration of VM run states.
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300143#
144# @debug: QEMU is running on a debugger
145#
Luiz Capitulino0a24c7b2012-04-27 13:16:41 -0300146# @finish-migrate: guest is paused to finish the migration process
147#
Paolo Bonzini1e998142012-10-23 14:54:21 +0200148# @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.
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300153#
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#
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300166# @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#
Luiz Capitulinoad02b962012-04-27 13:33:36 -0300174# @suspended: guest is suspended (ACPI S3)
175#
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300176# @watchdog: the watchdog action is configured to pause and has been triggered
Hu Taoede085b2013-04-26 11:24:40 +0800177#
178# @guest-panicked: guest has been panicked as a result of guest OS panic
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300179##
180{ 'enum': 'RunState',
181 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
182 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
Hu Taoede085b2013-04-26 11:24:40 +0800183 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog',
184 'guest-panicked' ] }
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300185
186##
Benoît Canetc249ee62012-09-05 13:09:01 +0200187# @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
212##
213# @ImageInfo:
214#
215# Information about a QEMU image file
216#
217# @filename: name of the image file
218#
219# @format: format of the image file
220#
221# @virtual-size: maximum capacity in bytes of the image
222#
223# @actual-size: #optional actual size on disk in bytes of the image
224#
225# @dirty-flag: #optional true if image is not cleanly closed
226#
227# @cluster-size: #optional size of a cluster in bytes
228#
229# @encrypted: #optional true if the image is encrypted
230#
231# @backing-filename: #optional name of the backing file
232#
233# @full-backing-filename: #optional full path of the backing file
234#
235# @backing-filename-format: #optional the format of the backing file
236#
237# @snapshots: #optional list of VM snapshots
238#
239# Since: 1.3
240#
241##
242
243{ 'type': 'ImageInfo',
244 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
245 '*actual-size': 'int', 'virtual-size': 'int',
246 '*cluster-size': 'int', '*encrypted': 'bool',
247 '*backing-filename': 'str', '*full-backing-filename': 'str',
248 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } }
249
250##
Federico Simoncelli8599ea42013-01-28 06:59:47 -0500251# @ImageCheck:
252#
253# Information about a QEMU image file check
254#
255# @filename: name of the image file checked
256#
257# @format: format of the image file checked
258#
259# @check-errors: number of unexpected errors occurred during check
260#
261# @image-end-offset: #optional offset (in bytes) where the image ends, this
262# field is present if the driver for the image format
263# supports it
264#
265# @corruptions: #optional number of corruptions found during the check if any
266#
267# @leaks: #optional number of leaks found during the check if any
268#
269# @corruptions-fixed: #optional number of corruptions fixed during the check
270# if any
271#
272# @leaks-fixed: #optional number of leaks fixed during the check if any
273#
274# @total-clusters: #optional total number of clusters, this field is present
275# if the driver for the image format supports it
276#
277# @allocated-clusters: #optional total number of allocated clusters, this
278# field is present if the driver for the image format
279# supports it
280#
281# @fragmented-clusters: #optional total number of fragmented clusters, this
282# field is present if the driver for the image format
283# supports it
284#
Stefan Hajnoczie6439d72013-02-07 17:15:04 +0100285# @compressed-clusters: #optional total number of compressed clusters, this
286# field is present if the driver for the image format
287# supports it
288#
Federico Simoncelli8599ea42013-01-28 06:59:47 -0500289# Since: 1.4
290#
291##
292
293{ 'type': 'ImageCheck',
294 'data': {'filename': 'str', 'format': 'str', 'check-errors': 'int',
295 '*image-end-offset': 'int', '*corruptions': 'int', '*leaks': 'int',
296 '*corruptions-fixed': 'int', '*leaks-fixed': 'int',
297 '*total-clusters': 'int', '*allocated-clusters': 'int',
Stefan Hajnoczie6439d72013-02-07 17:15:04 +0100298 '*fragmented-clusters': 'int', '*compressed-clusters': 'int' } }
Federico Simoncelli8599ea42013-01-28 06:59:47 -0500299
300##
Luiz Capitulino1fa9a5e2011-09-12 17:54:20 -0300301# @StatusInfo:
302#
303# Information about VCPU run state
304#
305# @running: true if all VCPUs are runnable, false if not runnable
306#
307# @singlestep: true if VCPUs are in single-step mode
308#
309# @status: the virtual machine @RunState
310#
311# Since: 0.14.0
312#
313# Notes: @singlestep is enabled through the GDB stub
314##
315{ 'type': 'StatusInfo',
316 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
317
318##
319# @query-status:
320#
321# Query the run status of all VCPUs
322#
323# Returns: @StatusInfo reflecting all VCPUs
324#
325# Since: 0.14.0
326##
327{ 'command': 'query-status', 'returns': 'StatusInfo' }
328
Luiz Capitulinoefab7672011-09-13 17:16:25 -0300329##
330# @UuidInfo:
331#
332# Guest UUID information.
333#
334# @UUID: the UUID of the guest
335#
336# Since: 0.14.0
337#
338# Notes: If no UUID was specified for the guest, a null UUID is returned.
339##
340{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
341
342##
343# @query-uuid:
344#
345# Query the guest UUID information.
346#
347# Returns: The @UuidInfo for the guest
348#
349# Since 0.14.0
350##
351{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
352
Luiz Capitulinoc5a415a2011-09-14 16:05:49 -0300353##
354# @ChardevInfo:
355#
356# Information about a character device.
357#
358# @label: the label of the character device
359#
360# @filename: the filename of the character device
361#
362# Notes: @filename is encoded using the QEMU command line character device
363# encoding. See the QEMU man page for details.
364#
365# Since: 0.14.0
366##
367{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
368
369##
370# @query-chardev:
371#
372# Returns information about current character devices.
373#
374# Returns: a list of @ChardevInfo
375#
376# Since: 0.14.0
377##
378{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -0300379
380##
Lei Li1f590cf2013-01-25 00:03:20 +0800381# @DataFormat:
382#
383# An enumeration of data format.
384#
Markus Armbruster3949e592013-02-06 21:27:24 +0100385# @utf8: Data is a UTF-8 string (RFC 3629)
Lei Li1f590cf2013-01-25 00:03:20 +0800386#
Markus Armbruster3949e592013-02-06 21:27:24 +0100387# @base64: Data is Base64 encoded binary (RFC 3548)
Lei Li1f590cf2013-01-25 00:03:20 +0800388#
389# Since: 1.4
390##
391{ 'enum': 'DataFormat'
392 'data': [ 'utf8', 'base64' ] }
393
394##
Markus Armbruster3949e592013-02-06 21:27:24 +0100395# @ringbuf-write:
Lei Li1f590cf2013-01-25 00:03:20 +0800396#
Markus Armbruster3949e592013-02-06 21:27:24 +0100397# Write to a ring buffer character device.
Lei Li1f590cf2013-01-25 00:03:20 +0800398#
Markus Armbruster3949e592013-02-06 21:27:24 +0100399# @device: the ring buffer character device name
Lei Li1f590cf2013-01-25 00:03:20 +0800400#
Markus Armbruster3949e592013-02-06 21:27:24 +0100401# @data: data to write
Lei Li1f590cf2013-01-25 00:03:20 +0800402#
Markus Armbruster3949e592013-02-06 21:27:24 +0100403# @format: #optional data encoding (default 'utf8').
404# - base64: data must be base64 encoded text. Its binary
405# decoding gets written.
406# Bug: invalid base64 is currently not rejected.
407# Whitespace *is* invalid.
408# - utf8: data's UTF-8 encoding is written
409# - data itself is always Unicode regardless of format, like
410# any other string.
Lei Li1f590cf2013-01-25 00:03:20 +0800411#
412# Returns: Nothing on success
Lei Li1f590cf2013-01-25 00:03:20 +0800413#
414# Since: 1.4
415##
Markus Armbruster3949e592013-02-06 21:27:24 +0100416{ 'command': 'ringbuf-write',
Markus Armbruster82e59a62013-02-06 21:27:14 +0100417 'data': {'device': 'str', 'data': 'str',
Lei Li1f590cf2013-01-25 00:03:20 +0800418 '*format': 'DataFormat'} }
419
420##
Markus Armbruster3949e592013-02-06 21:27:24 +0100421# @ringbuf-read:
Lei Li49b6d722013-01-25 00:03:21 +0800422#
Markus Armbruster3949e592013-02-06 21:27:24 +0100423# Read from a ring buffer character device.
Lei Li49b6d722013-01-25 00:03:21 +0800424#
Markus Armbruster3949e592013-02-06 21:27:24 +0100425# @device: the ring buffer character device name
Lei Li49b6d722013-01-25 00:03:21 +0800426#
Markus Armbruster3949e592013-02-06 21:27:24 +0100427# @size: how many bytes to read at most
Lei Li49b6d722013-01-25 00:03:21 +0800428#
Markus Armbruster3949e592013-02-06 21:27:24 +0100429# @format: #optional data encoding (default 'utf8').
430# - base64: the data read is returned in base64 encoding.
431# - utf8: the data read is interpreted as UTF-8.
432# Bug: can screw up when the buffer contains invalid UTF-8
433# sequences, NUL characters, after the ring buffer lost
434# data, and when reading stops because the size limit is
435# reached.
436# - The return value is always Unicode regardless of format,
437# like any other string.
Lei Li49b6d722013-01-25 00:03:21 +0800438#
Markus Armbruster3ab651f2013-02-06 21:27:15 +0100439# Returns: data read from the device
Lei Li49b6d722013-01-25 00:03:21 +0800440#
441# Since: 1.4
442##
Markus Armbruster3949e592013-02-06 21:27:24 +0100443{ 'command': 'ringbuf-read',
Lei Li49b6d722013-01-25 00:03:21 +0800444 'data': {'device': 'str', 'size': 'int', '*format': 'DataFormat'},
Markus Armbruster3ab651f2013-02-06 21:27:15 +0100445 'returns': 'str' }
Lei Li49b6d722013-01-25 00:03:21 +0800446
447##
Luiz Capitulinoaa9b79b2011-09-21 14:31:51 -0300448# @CommandInfo:
449#
450# Information about a QMP command
451#
452# @name: The command name
453#
454# Since: 0.14.0
455##
456{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
457
458##
459# @query-commands:
460#
461# Return a list of supported QMP commands by this server
462#
463# Returns: A list of @CommandInfo for all supported commands
464#
465# Since: 0.14.0
466##
467{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
468
Luiz Capitulino7a7f3252011-09-15 14:20:28 -0300469##
Daniel P. Berrange48608532012-05-21 17:59:51 +0100470# @EventInfo:
471#
472# Information about a QMP event
473#
474# @name: The event name
475#
476# Since: 1.2.0
477##
478{ 'type': 'EventInfo', 'data': {'name': 'str'} }
479
480##
481# @query-events:
482#
483# Return a list of supported QMP events by this server
484#
485# Returns: A list of @EventInfo for all supported events
486#
487# Since: 1.2.0
488##
489{ 'command': 'query-events', 'returns': ['EventInfo'] }
490
491##
Luiz Capitulino791e7c82011-09-13 17:37:16 -0300492# @MigrationStats
493#
494# Detailed migration status.
495#
496# @transferred: amount of bytes already transferred to the target VM
497#
498# @remaining: amount of bytes remaining to be transferred to the target VM
499#
500# @total: total amount of bytes involved in the migration process
501#
Peter Lievenf1c72792013-03-26 10:58:37 +0100502# @duplicate: number of duplicate (zero) pages (since 1.2)
503#
504# @skipped: number of skipped zero pages (since 1.5)
Orit Wasserman004d4c12012-08-06 21:42:56 +0300505#
506# @normal : number of normal pages (since 1.2)
507#
Juan Quintela8d017192012-08-13 12:31:25 +0200508# @normal-bytes: number of normal bytes sent (since 1.2)
509#
510# @dirty-pages-rate: number of pages dirtied by second by the
511# guest (since 1.3)
Orit Wasserman004d4c12012-08-06 21:42:56 +0300512#
513# Since: 0.14.0
Luiz Capitulino791e7c82011-09-13 17:37:16 -0300514##
515{ 'type': 'MigrationStats',
Juan Quintelad5f8a572012-05-21 22:01:07 +0200516 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
Peter Lievenf1c72792013-03-26 10:58:37 +0100517 'duplicate': 'int', 'skipped': 'int', 'normal': 'int',
518 'normal-bytes': 'int', 'dirty-pages-rate' : 'int' } }
Luiz Capitulino791e7c82011-09-13 17:37:16 -0300519
520##
Orit Wassermanf36d55a2012-08-06 21:42:57 +0300521# @XBZRLECacheStats
522#
523# Detailed XBZRLE migration cache statistics
524#
525# @cache-size: XBZRLE cache size
526#
527# @bytes: amount of bytes already transferred to the target VM
528#
529# @pages: amount of pages transferred to the target VM
530#
531# @cache-miss: number of cache miss
532#
533# @overflow: number of overflows
534#
535# Since: 1.2
536##
537{ 'type': 'XBZRLECacheStats',
538 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
539 'cache-miss': 'int', 'overflow': 'int' } }
540
541##
Luiz Capitulino791e7c82011-09-13 17:37:16 -0300542# @MigrationInfo
543#
544# Information about current migration process.
545#
546# @status: #optional string describing the current migration status.
547# As of 0.14.0 this can be 'active', 'completed', 'failed' or
548# 'cancelled'. If this field is not returned, no migration process
549# has been initiated
550#
Juan Quintelad5f8a572012-05-21 22:01:07 +0200551# @ram: #optional @MigrationStats containing detailed migration
552# status, only returned if status is 'active' or
553# 'completed'. 'comppleted' (since 1.2)
Luiz Capitulino791e7c82011-09-13 17:37:16 -0300554#
555# @disk: #optional @MigrationStats containing detailed disk migration
556# status, only returned if status is 'active' and it is a block
557# migration
558#
Orit Wassermanf36d55a2012-08-06 21:42:57 +0300559# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
560# migration statistics, only returned if XBZRLE feature is on and
561# status is 'active' or 'completed' (since 1.2)
562#
Juan Quintela7aa939a2012-08-18 13:17:10 +0200563# @total-time: #optional total amount of milliseconds since migration started.
564# If migration has ended, it returns the total migration
565# time. (since 1.2)
566#
Juan Quintela9c5a9fc2012-08-13 09:35:16 +0200567# @downtime: #optional only present when migration finishes correctly
568# total downtime in milliseconds for the guest.
569# (since 1.3)
570#
Juan Quintela2c52ddf2012-08-13 09:53:12 +0200571# @expected-downtime: #optional only present while migration is active
572# expected downtime in milliseconds for the guest in last walk
573# of the dirty bitmap. (since 1.3)
574#
Luiz Capitulino791e7c82011-09-13 17:37:16 -0300575# Since: 0.14.0
576##
577{ 'type': 'MigrationInfo',
578 'data': {'*status': 'str', '*ram': 'MigrationStats',
Orit Wassermanf36d55a2012-08-06 21:42:57 +0300579 '*disk': 'MigrationStats',
Juan Quintela7aa939a2012-08-18 13:17:10 +0200580 '*xbzrle-cache': 'XBZRLECacheStats',
Juan Quintela9c5a9fc2012-08-13 09:35:16 +0200581 '*total-time': 'int',
Juan Quintela2c52ddf2012-08-13 09:53:12 +0200582 '*expected-downtime': 'int',
Juan Quintela9c5a9fc2012-08-13 09:35:16 +0200583 '*downtime': 'int'} }
Luiz Capitulino791e7c82011-09-13 17:37:16 -0300584
585##
586# @query-migrate
587#
588# Returns information about current migration process.
589#
590# Returns: @MigrationInfo
591#
592# Since: 0.14.0
593##
594{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
595
596##
Orit Wassermanbbf6da32012-08-06 21:42:47 +0300597# @MigrationCapability
598#
599# Migration capabilities enumeration
600#
601# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
602# This feature allows us to minimize migration traffic for certain work
603# loads, by sending compressed difference of the pages
604#
605# Since: 1.2
606##
607{ 'enum': 'MigrationCapability',
608 'data': ['xbzrle'] }
609
610##
611# @MigrationCapabilityStatus
612#
613# Migration capability information
614#
615# @capability: capability enum
616#
617# @state: capability state bool
618#
619# Since: 1.2
620##
621{ 'type': 'MigrationCapabilityStatus',
622 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
623
624##
Orit Wasserman00458432012-08-06 21:42:48 +0300625# @migrate-set-capabilities
626#
627# Enable/Disable the following migration capabilities (like xbzrle)
628#
629# @capabilities: json array of capability modifications to make
630#
631# Since: 1.2
632##
633{ 'command': 'migrate-set-capabilities',
634 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
635
636##
Orit Wassermanbbf6da32012-08-06 21:42:47 +0300637# @query-migrate-capabilities
638#
639# Returns information about the current migration capabilities status
640#
641# Returns: @MigrationCapabilitiesStatus
642#
643# Since: 1.2
644##
645{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
646
647##
Luiz Capitulinoe235cec2011-09-21 15:29:55 -0300648# @MouseInfo:
649#
650# Information about a mouse device.
651#
652# @name: the name of the mouse device
653#
654# @index: the index of the mouse device
655#
656# @current: true if this device is currently receiving mouse events
657#
658# @absolute: true if this device supports absolute coordinates as input
659#
660# Since: 0.14.0
661##
662{ 'type': 'MouseInfo',
663 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
664 'absolute': 'bool'} }
665
666##
667# @query-mice:
668#
669# Returns information about each active mouse device
670#
671# Returns: a list of @MouseInfo for each device
672#
673# Since: 0.14.0
674##
675{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
676
677##
Luiz Capitulinode0b36b2011-09-21 16:38:35 -0300678# @CpuInfo:
679#
680# Information about a virtual CPU
681#
682# @CPU: the index of the virtual CPU
683#
684# @current: this only exists for backwards compatible and should be ignored
Laszlo Ersekb80e5602012-07-17 16:17:10 +0200685#
Luiz Capitulinode0b36b2011-09-21 16:38:35 -0300686# @halted: true if the virtual CPU is in the halt state. Halt usually refers
687# to a processor specific low power mode.
688#
689# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
690# pointer.
691# If the target is Sparc, this is the PC component of the
692# instruction pointer.
693#
694# @nip: #optional If the target is PPC, the instruction pointer
695#
696# @npc: #optional If the target is Sparc, the NPC component of the instruction
697# pointer
698#
699# @PC: #optional If the target is MIPS, the instruction pointer
700#
701# @thread_id: ID of the underlying host thread
702#
703# Since: 0.14.0
704#
705# Notes: @halted is a transient state that changes frequently. By the time the
706# data is sent to the client, the guest may no longer be halted.
707##
708{ 'type': 'CpuInfo',
709 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
710 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
711
712##
713# @query-cpus:
714#
715# Returns a list of information about each virtual CPU.
716#
717# Returns: a list of @CpuInfo for each virtual CPU
718#
719# Since: 0.14.0
720##
721{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
722
723##
Luiz Capitulinob2023812011-09-21 17:16:47 -0300724# @BlockDeviceInfo:
725#
726# Information about the backing device for a block device.
727#
728# @file: the filename of the backing device
729#
730# @ro: true if the backing device was open read-only
731#
732# @drv: the name of the block format used to open the backing device. As of
733# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
734# 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
735# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
736# 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
737#
738# @backing_file: #optional the name of the backing file (for copy-on-write)
739#
Benoît Canet2e3e3312012-08-02 10:22:48 +0200740# @backing_file_depth: number of files in the backing file chain (since: 1.2)
741#
Luiz Capitulinob2023812011-09-21 17:16:47 -0300742# @encrypted: true if the backing device is encrypted
743#
Luiz Capitulinoc75a1a82012-07-26 20:28:44 -0300744# @encryption_key_missing: true if the backing device is encrypted but an
745# valid encryption key is missing
746#
Zhi Yong Wu727f0052011-11-08 13:00:31 +0800747# @bps: total throughput limit in bytes per second is specified
748#
749# @bps_rd: read throughput limit in bytes per second is specified
750#
751# @bps_wr: write throughput limit in bytes per second is specified
752#
753# @iops: total I/O operations per second is specified
754#
755# @iops_rd: read I/O operations per second is specified
756#
757# @iops_wr: write I/O operations per second is specified
758#
Luiz Capitulinob2023812011-09-21 17:16:47 -0300759# Since: 0.14.0
760#
761# Notes: This interface is only found in @BlockInfo.
762##
763{ 'type': 'BlockDeviceInfo',
764 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
Benoît Canet2e3e3312012-08-02 10:22:48 +0200765 '*backing_file': 'str', 'backing_file_depth': 'int',
Luiz Capitulinoc75a1a82012-07-26 20:28:44 -0300766 'encrypted': 'bool', 'encryption_key_missing': 'bool',
767 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
768 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
Luiz Capitulinob2023812011-09-21 17:16:47 -0300769
770##
771# @BlockDeviceIoStatus:
772#
773# An enumeration of block device I/O status.
774#
775# @ok: The last I/O operation has succeeded
776#
777# @failed: The last I/O operation has failed
778#
779# @nospace: The last I/O operation has failed due to a no-space condition
780#
781# Since: 1.0
782##
783{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
784
785##
Paolo Bonzinib9a9b3a2012-08-01 15:23:44 +0200786# @BlockDirtyInfo:
787#
788# Block dirty bitmap information.
789#
790# @count: number of dirty bytes according to the dirty bitmap
791#
Paolo Bonzini50717e92013-01-21 17:09:45 +0100792# @granularity: granularity of the dirty bitmap in bytes (since 1.4)
793#
Paolo Bonzinib9a9b3a2012-08-01 15:23:44 +0200794# Since: 1.3
795##
796{ 'type': 'BlockDirtyInfo',
Paolo Bonzini50717e92013-01-21 17:09:45 +0100797 'data': {'count': 'int', 'granularity': 'int'} }
Paolo Bonzinib9a9b3a2012-08-01 15:23:44 +0200798
799##
Luiz Capitulinob2023812011-09-21 17:16:47 -0300800# @BlockInfo:
801#
802# Block device information. This structure describes a virtual device and
803# the backing device associated with it.
804#
805# @device: The device name associated with the virtual device.
806#
807# @type: This field is returned only for compatibility reasons, it should
808# not be used (always returns 'unknown')
809#
810# @removable: True if the device supports removable media.
811#
812# @locked: True if the guest has locked this device from having its media
813# removed
814#
815# @tray_open: #optional True if the device has a tray and it is open
816# (only present if removable is true)
817#
Paolo Bonzinib9a9b3a2012-08-01 15:23:44 +0200818# @dirty: #optional dirty bitmap information (only present if the dirty
819# bitmap is enabled)
820#
Luiz Capitulinob2023812011-09-21 17:16:47 -0300821# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
822# supports it and the VM is configured to stop on errors
823#
824# @inserted: #optional @BlockDeviceInfo describing the device if media is
825# present
826#
827# Since: 0.14.0
828##
829{ 'type': 'BlockInfo',
830 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
831 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
Paolo Bonzinib9a9b3a2012-08-01 15:23:44 +0200832 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
833 '*dirty': 'BlockDirtyInfo' } }
Luiz Capitulinob2023812011-09-21 17:16:47 -0300834
835##
836# @query-block:
837#
838# Get a list of BlockInfo for all virtual block devices.
839#
840# Returns: a list of @BlockInfo describing each virtual block device
841#
842# Since: 0.14.0
843##
844{ 'command': 'query-block', 'returns': ['BlockInfo'] }
845
846##
Luiz Capitulinof11f57e2011-09-22 15:56:36 -0300847# @BlockDeviceStats:
848#
849# Statistics of a virtual block device or a block backing device.
850#
851# @rd_bytes: The number of bytes read by the device.
852#
853# @wr_bytes: The number of bytes written by the device.
854#
855# @rd_operations: The number of read operations performed by the device.
856#
857# @wr_operations: The number of write operations performed by the device.
858#
859# @flush_operations: The number of cache flush operations performed by the
860# device (since 0.15.0)
861#
862# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
863# (since 0.15.0).
864#
865# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
866#
867# @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
868#
869# @wr_highest_offset: The offset after the greatest byte written to the
870# device. The intended use of this information is for
871# growable sparse files (like qcow2) that are used on top
872# of a physical device.
873#
874# Since: 0.14.0
875##
876{ 'type': 'BlockDeviceStats',
877 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
878 'wr_operations': 'int', 'flush_operations': 'int',
879 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
880 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
881
882##
883# @BlockStats:
884#
885# Statistics of a virtual block device or a block backing device.
886#
887# @device: #optional If the stats are for a virtual block device, the name
888# corresponding to the virtual block device.
889#
890# @stats: A @BlockDeviceStats for the device.
891#
892# @parent: #optional This may point to the backing block device if this is a
893# a virtual block device. If it's a backing block, this will point
894# to the backing file is one is present.
895#
896# Since: 0.14.0
897##
898{ 'type': 'BlockStats',
899 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
900 '*parent': 'BlockStats'} }
901
902##
903# @query-blockstats:
904#
905# Query the @BlockStats for all virtual block devices.
906#
907# Returns: A list of @BlockStats for each virtual block devices.
908#
909# Since: 0.14.0
910##
911{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
912
913##
Luiz Capitulino2b54aa82011-10-17 16:41:22 -0200914# @VncClientInfo:
915#
916# Information about a connected VNC client.
917#
918# @host: The host name of the client. QEMU tries to resolve this to a DNS name
919# when possible.
920#
921# @family: 'ipv6' if the client is connected via IPv6 and TCP
922# 'ipv4' if the client is connected via IPv4 and TCP
923# 'unix' if the client is connected via a unix domain socket
924# 'unknown' otherwise
925#
926# @service: The service name of the client's port. This may depends on the
927# host system's service database so symbolic names should not be
928# relied on.
929#
930# @x509_dname: #optional If x509 authentication is in use, the Distinguished
931# Name of the client.
932#
933# @sasl_username: #optional If SASL authentication is in use, the SASL username
934# used for authentication.
935#
936# Since: 0.14.0
937##
938{ 'type': 'VncClientInfo',
939 'data': {'host': 'str', 'family': 'str', 'service': 'str',
940 '*x509_dname': 'str', '*sasl_username': 'str'} }
941
942##
943# @VncInfo:
944#
945# Information about the VNC session.
946#
947# @enabled: true if the VNC server is enabled, false otherwise
948#
949# @host: #optional The hostname the VNC server is bound to. This depends on
950# the name resolution on the host and may be an IP address.
951#
952# @family: #optional 'ipv6' if the host is listening for IPv6 connections
953# 'ipv4' if the host is listening for IPv4 connections
954# 'unix' if the host is listening on a unix domain socket
955# 'unknown' otherwise
956#
957# @service: #optional The service name of the server's port. This may depends
958# on the host system's service database so symbolic names should not
959# be relied on.
960#
961# @auth: #optional the current authentication type used by the server
962# 'none' if no authentication is being used
963# 'vnc' if VNC authentication is being used
964# 'vencrypt+plain' if VEncrypt is used with plain text authentication
965# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
966# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
967# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
968# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
969# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
970# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
971# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
972# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
973#
974# @clients: a list of @VncClientInfo of all currently connected clients
975#
976# Since: 0.14.0
977##
978{ 'type': 'VncInfo',
979 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
980 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
981
982##
983# @query-vnc:
984#
985# Returns information about the current VNC server
986#
987# Returns: @VncInfo
Luiz Capitulino2b54aa82011-10-17 16:41:22 -0200988#
989# Since: 0.14.0
990##
991{ 'command': 'query-vnc', 'returns': 'VncInfo' }
992
993##
Luiz Capitulinod1f29642011-10-20 17:01:33 -0200994# @SpiceChannel
995#
996# Information about a SPICE client channel.
997#
998# @host: The host name of the client. QEMU tries to resolve this to a DNS name
999# when possible.
1000#
1001# @family: 'ipv6' if the client is connected via IPv6 and TCP
1002# 'ipv4' if the client is connected via IPv4 and TCP
1003# 'unix' if the client is connected via a unix domain socket
1004# 'unknown' otherwise
1005#
1006# @port: The client's port number.
1007#
1008# @connection-id: SPICE connection id number. All channels with the same id
1009# belong to the same SPICE session.
1010#
Alon Levy419e1bd2012-03-05 15:13:27 +02001011# @connection-type: SPICE channel type number. "1" is the main control
1012# channel, filter for this one if you want to track spice
1013# sessions only
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001014#
Alon Levy419e1bd2012-03-05 15:13:27 +02001015# @channel-id: SPICE channel ID number. Usually "0", might be different when
1016# multiple channels of the same type exist, such as multiple
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001017# display channels in a multihead setup
1018#
1019# @tls: true if the channel is encrypted, false otherwise.
1020#
1021# Since: 0.14.0
1022##
1023{ 'type': 'SpiceChannel',
1024 'data': {'host': 'str', 'family': 'str', 'port': 'str',
1025 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
1026 'tls': 'bool'} }
1027
1028##
Alon Levy4efee022012-03-29 23:23:14 +02001029# @SpiceQueryMouseMode
1030#
Lei Li6932a692012-08-23 13:14:25 +08001031# An enumeration of Spice mouse states.
Alon Levy4efee022012-03-29 23:23:14 +02001032#
1033# @client: Mouse cursor position is determined by the client.
1034#
1035# @server: Mouse cursor position is determined by the server.
1036#
1037# @unknown: No information is available about mouse mode used by
1038# the spice server.
1039#
1040# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
1041#
1042# Since: 1.1
1043##
1044{ 'enum': 'SpiceQueryMouseMode',
1045 'data': [ 'client', 'server', 'unknown' ] }
1046
1047##
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001048# @SpiceInfo
1049#
1050# Information about the SPICE session.
Laszlo Ersekb80e5602012-07-17 16:17:10 +02001051#
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001052# @enabled: true if the SPICE server is enabled, false otherwise
1053#
Yonit Halperin61c4efe2012-08-21 11:51:58 +03001054# @migrated: true if the last guest migration completed and spice
1055# migration had completed as well. false otherwise.
1056#
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001057# @host: #optional The hostname the SPICE server is bound to. This depends on
1058# the name resolution on the host and may be an IP address.
1059#
1060# @port: #optional The SPICE server's port number.
1061#
1062# @compiled-version: #optional SPICE server version.
1063#
1064# @tls-port: #optional The SPICE server's TLS port number.
1065#
1066# @auth: #optional the current authentication type used by the server
Alon Levy419e1bd2012-03-05 15:13:27 +02001067# 'none' if no authentication is being used
1068# 'spice' uses SASL or direct TLS authentication, depending on command
1069# line options
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001070#
Alon Levy4efee022012-03-29 23:23:14 +02001071# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
1072# be determined by the client or the server, or unknown if spice
1073# server doesn't provide this information.
1074#
1075# Since: 1.1
1076#
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001077# @channels: a list of @SpiceChannel for each active spice channel
1078#
1079# Since: 0.14.0
1080##
1081{ 'type': 'SpiceInfo',
Yonit Halperin61c4efe2012-08-21 11:51:58 +03001082 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001083 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
Alon Levy4efee022012-03-29 23:23:14 +02001084 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
Luiz Capitulinod1f29642011-10-20 17:01:33 -02001085
1086##
1087# @query-spice
1088#
1089# Returns information about the current SPICE server
1090#
1091# Returns: @SpiceInfo
1092#
1093# Since: 0.14.0
1094##
1095{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
1096
1097##
Luiz Capitulino96637bc2011-10-21 11:41:37 -02001098# @BalloonInfo:
1099#
1100# Information about the guest balloon device.
1101#
1102# @actual: the number of bytes the balloon currently contains
1103#
Luiz Capitulino96637bc2011-10-21 11:41:37 -02001104# Since: 0.14.0
1105#
Luiz Capitulino96637bc2011-10-21 11:41:37 -02001106##
Luiz Capitulino01ceb972012-12-03 15:56:41 -02001107{ 'type': 'BalloonInfo', 'data': {'actual': 'int' } }
Luiz Capitulino96637bc2011-10-21 11:41:37 -02001108
1109##
1110# @query-balloon:
1111#
1112# Return information about the balloon device.
1113#
1114# Returns: @BalloonInfo on success
1115# If the balloon driver is enabled but not functional because the KVM
1116# kernel module cannot support it, KvmMissingCap
1117# If no balloon device is present, DeviceNotActive
1118#
1119# Since: 0.14.0
1120##
1121{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1122
1123##
Luiz Capitulino79627472011-10-21 14:15:33 -02001124# @PciMemoryRange:
1125#
1126# A PCI device memory region
1127#
1128# @base: the starting address (guest physical)
1129#
1130# @limit: the ending address (guest physical)
1131#
1132# Since: 0.14.0
1133##
1134{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1135
1136##
1137# @PciMemoryRegion
1138#
1139# Information about a PCI device I/O region.
1140#
1141# @bar: the index of the Base Address Register for this region
1142#
1143# @type: 'io' if the region is a PIO region
1144# 'memory' if the region is a MMIO region
1145#
1146# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1147#
1148# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1149#
1150# Since: 0.14.0
1151##
1152{ 'type': 'PciMemoryRegion',
1153 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1154 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1155
1156##
1157# @PciBridgeInfo:
1158#
1159# Information about a PCI Bridge device
1160#
1161# @bus.number: primary bus interface number. This should be the number of the
1162# bus the device resides on.
1163#
1164# @bus.secondary: secondary bus interface number. This is the number of the
1165# main bus for the bridge
1166#
1167# @bus.subordinate: This is the highest number bus that resides below the
1168# bridge.
1169#
1170# @bus.io_range: The PIO range for all devices on this bridge
1171#
1172# @bus.memory_range: The MMIO range for all devices on this bridge
1173#
1174# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1175# this bridge
1176#
1177# @devices: a list of @PciDeviceInfo for each device on this bridge
1178#
1179# Since: 0.14.0
1180##
1181{ 'type': 'PciBridgeInfo',
1182 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1183 'io_range': 'PciMemoryRange',
1184 'memory_range': 'PciMemoryRange',
1185 'prefetchable_range': 'PciMemoryRange' },
1186 '*devices': ['PciDeviceInfo']} }
1187
1188##
1189# @PciDeviceInfo:
1190#
1191# Information about a PCI device
1192#
1193# @bus: the bus number of the device
1194#
1195# @slot: the slot the device is located in
1196#
1197# @function: the function of the slot used by the device
1198#
1199# @class_info.desc: #optional a string description of the device's class
1200#
1201# @class_info.class: the class code of the device
1202#
1203# @id.device: the PCI device id
1204#
1205# @id.vendor: the PCI vendor id
1206#
1207# @irq: #optional if an IRQ is assigned to the device, the IRQ number
1208#
1209# @qdev_id: the device name of the PCI device
1210#
1211# @pci_bridge: if the device is a PCI bridge, the bridge information
1212#
1213# @regions: a list of the PCI I/O regions associated with the device
1214#
1215# Notes: the contents of @class_info.desc are not stable and should only be
1216# treated as informational.
1217#
1218# Since: 0.14.0
1219##
1220{ 'type': 'PciDeviceInfo',
1221 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1222 'class_info': {'*desc': 'str', 'class': 'int'},
1223 'id': {'device': 'int', 'vendor': 'int'},
1224 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1225 'regions': ['PciMemoryRegion']} }
1226
1227##
1228# @PciInfo:
1229#
1230# Information about a PCI bus
1231#
1232# @bus: the bus index
1233#
1234# @devices: a list of devices on this bus
1235#
1236# Since: 0.14.0
1237##
1238{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1239
1240##
1241# @query-pci:
1242#
1243# Return information about the PCI bus topology of the guest.
1244#
1245# Returns: a list of @PciInfo for each PCI bus
1246#
1247# Since: 0.14.0
1248##
1249{ 'command': 'query-pci', 'returns': ['PciInfo'] }
1250
1251##
Paolo Bonzini92aa5c62012-09-28 17:22:55 +02001252# @BlockdevOnError:
1253#
1254# An enumeration of possible behaviors for errors on I/O operations.
1255# The exact meaning depends on whether the I/O was initiated by a guest
1256# or by a block job
1257#
1258# @report: for guest operations, report the error to the guest;
1259# for jobs, cancel the job
1260#
1261# @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1262# or BLOCK_JOB_ERROR)
1263#
1264# @enospc: same as @stop on ENOSPC, same as @report otherwise.
1265#
1266# @stop: for guest operations, stop the virtual machine;
1267# for jobs, pause the job
1268#
1269# Since: 1.3
1270##
1271{ 'enum': 'BlockdevOnError',
1272 'data': ['report', 'ignore', 'enospc', 'stop'] }
1273
1274##
Paolo Bonzini893f7eb2012-10-18 16:49:23 +02001275# @MirrorSyncMode:
1276#
1277# An enumeration of possible behaviors for the initial synchronization
1278# phase of storage mirroring.
1279#
1280# @top: copies data in the topmost image to the destination
1281#
1282# @full: copies data from all images to the destination
1283#
1284# @none: only copy data written from now on
1285#
1286# Since: 1.3
1287##
1288{ 'enum': 'MirrorSyncMode',
1289 'data': ['top', 'full', 'none'] }
1290
1291##
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00001292# @BlockJobInfo:
1293#
1294# Information about a long-running block device operation.
1295#
1296# @type: the job type ('stream' for image streaming)
1297#
1298# @device: the block device name
1299#
1300# @len: the maximum progress value
1301#
Paolo Bonzini8d658832012-09-28 17:22:49 +02001302# @busy: false if the job is known to be in a quiescent state, with
1303# no pending I/O. Since 1.3.
1304#
Paolo Bonzini8acc72a2012-09-28 17:22:50 +02001305# @paused: whether the job is paused or, if @busy is true, will
1306# pause itself as soon as possible. Since 1.3.
1307#
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00001308# @offset: the current progress value
1309#
1310# @speed: the rate limit, bytes per second
1311#
Paolo Bonzini32c81a42012-09-28 17:22:58 +02001312# @io-status: the status of the job (since 1.3)
1313#
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00001314# Since: 1.1
1315##
1316{ 'type': 'BlockJobInfo',
1317 'data': {'type': 'str', 'device': 'str', 'len': 'int',
Paolo Bonzini32c81a42012-09-28 17:22:58 +02001318 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1319 'io-status': 'BlockDeviceIoStatus'} }
Stefan Hajnoczifb5458c2012-01-18 14:40:49 +00001320
1321##
1322# @query-block-jobs:
1323#
1324# Return information about long-running block device operations.
1325#
1326# Returns: a list of @BlockJobInfo for each active block job
1327#
1328# Since: 1.1
1329##
1330{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1331
1332##
Luiz Capitulino7a7f3252011-09-15 14:20:28 -03001333# @quit:
1334#
1335# This command will cause the QEMU process to exit gracefully. While every
1336# attempt is made to send the QMP response before terminating, this is not
1337# guaranteed. When using this interface, a premature EOF would not be
1338# unexpected.
1339#
1340# Since: 0.14.0
1341##
1342{ 'command': 'quit' }
Luiz Capitulino5f158f22011-09-15 14:34:39 -03001343
1344##
1345# @stop:
1346#
1347# Stop all guest VCPU execution.
1348#
1349# Since: 0.14.0
1350#
1351# Notes: This function will succeed even if the guest is already in the stopped
Paolo Bonzini1e998142012-10-23 14:54:21 +02001352# state. In "inmigrate" state, it will ensure that the guest
1353# remains paused once migration finishes, as if the -S option was
1354# passed on the command line.
Luiz Capitulino5f158f22011-09-15 14:34:39 -03001355##
1356{ 'command': 'stop' }
Luiz Capitulino38d22652011-09-15 14:41:46 -03001357
1358##
1359# @system_reset:
1360#
1361# Performs a hard reset of a guest.
1362#
1363# Since: 0.14.0
1364##
1365{ 'command': 'system_reset' }
Luiz Capitulino5bc465e2011-09-28 11:06:15 -03001366
1367##
1368# @system_powerdown:
1369#
1370# Requests that a guest perform a powerdown operation.
1371#
1372# Since: 0.14.0
1373#
1374# Notes: A guest may or may not respond to this command. This command
1375# returning does not indicate that a guest has accepted the request or
1376# that it has shut down. Many guests will respond to this command by
1377# prompting the user in some way.
1378##
1379{ 'command': 'system_powerdown' }
Luiz Capitulino755f1962011-10-06 14:31:39 -03001380
1381##
1382# @cpu:
1383#
1384# This command is a nop that is only provided for the purposes of compatibility.
1385#
1386# Since: 0.14.0
1387#
1388# Notes: Do not use this command.
1389##
1390{ 'command': 'cpu', 'data': {'index': 'int'} }
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -02001391
1392##
1393# @memsave:
1394#
1395# Save a portion of guest memory to a file.
1396#
1397# @val: the virtual address of the guest to start from
1398#
1399# @size: the size of memory region to save
1400#
1401# @filename: the file to save the memory to as binary data
1402#
1403# @cpu-index: #optional the index of the virtual CPU to use for translating the
1404# virtual address (defaults to CPU 0)
1405#
1406# Returns: Nothing on success
Luiz Capitulino0cfd6a92011-11-22 16:32:37 -02001407#
1408# Since: 0.14.0
1409#
1410# Notes: Errors were not reliably returned until 1.1
1411##
1412{ 'command': 'memsave',
1413 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
Luiz Capitulino6d3962b2011-11-22 17:26:46 -02001414
1415##
1416# @pmemsave:
1417#
1418# Save a portion of guest physical memory to a file.
1419#
1420# @val: the physical address of the guest to start from
1421#
1422# @size: the size of memory region to save
1423#
1424# @filename: the file to save the memory to as binary data
1425#
1426# Returns: Nothing on success
Luiz Capitulino6d3962b2011-11-22 17:26:46 -02001427#
1428# Since: 0.14.0
1429#
1430# Notes: Errors were not reliably returned until 1.1
1431##
1432{ 'command': 'pmemsave',
1433 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
Luiz Capitulinoe42e8182011-11-22 17:58:31 -02001434
1435##
1436# @cont:
1437#
1438# Resume guest VCPU execution.
1439#
1440# Since: 0.14.0
1441#
1442# Returns: If successful, nothing
Luiz Capitulinoe42e8182011-11-22 17:58:31 -02001443# If QEMU was started with an encrypted block device and a key has
1444# not yet been set, DeviceEncrypted.
1445#
Paolo Bonzini1e998142012-10-23 14:54:21 +02001446# Notes: This command will succeed if the guest is currently running. It
1447# will also succeed if the guest is in the "inmigrate" state; in
1448# this case, the effect of the command is to make sure the guest
1449# starts once migration finishes, removing the effect of the -S
1450# command line option if it was passed.
Luiz Capitulinoe42e8182011-11-22 17:58:31 -02001451##
1452{ 'command': 'cont' }
1453
Luiz Capitulinoab49ab52011-11-23 12:55:53 -02001454##
Gerd Hoffmann9b9df252012-02-23 13:45:21 +01001455# @system_wakeup:
1456#
1457# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1458#
1459# Since: 1.1
1460#
1461# Returns: nothing.
1462##
1463{ 'command': 'system_wakeup' }
1464
1465##
Luiz Capitulinoab49ab52011-11-23 12:55:53 -02001466# @inject-nmi:
1467#
1468# Injects an Non-Maskable Interrupt into all guest's VCPUs.
1469#
1470# Returns: If successful, nothing
Luiz Capitulinoab49ab52011-11-23 12:55:53 -02001471#
1472# Since: 0.14.0
1473#
1474# Notes: Only x86 Virtual Machines support this command.
1475##
1476{ 'command': 'inject-nmi' }
Luiz Capitulino4b371562011-11-23 13:11:55 -02001477
1478##
1479# @set_link:
1480#
1481# Sets the link status of a virtual network adapter.
1482#
1483# @name: the device name of the virtual network adapter
1484#
1485# @up: true to set the link status to be up
1486#
1487# Returns: Nothing on success
1488# If @name is not a valid network device, DeviceNotFound
1489#
1490# Since: 0.14.0
1491#
1492# Notes: Not all network adapters support setting link status. This command
1493# will succeed even if the network adapter does not support link status
1494# notification.
1495##
1496{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
Luiz Capitulinoa4dea8a2011-11-23 13:28:21 -02001497
1498##
1499# @block_passwd:
1500#
1501# This command sets the password of a block device that has not been open
1502# with a password and requires one.
1503#
1504# The two cases where this can happen are a block device is created through
1505# QEMU's initial command line or a block device is changed through the legacy
1506# @change interface.
1507#
1508# In the event that the block device is created through the initial command
1509# line, the VM will start in the stopped state regardless of whether '-S' is
1510# used. The intention is for a management tool to query the block devices to
1511# determine which ones are encrypted, set the passwords with this command, and
1512# then start the guest with the @cont command.
1513#
1514# @device: the name of the device to set the password on
1515#
1516# @password: the password to use for the device
1517#
1518# Returns: nothing on success
1519# If @device is not a valid block device, DeviceNotFound
1520# If @device is not encrypted, DeviceNotEncrypted
Luiz Capitulinoa4dea8a2011-11-23 13:28:21 -02001521#
1522# Notes: Not all block formats support encryption and some that do are not
1523# able to validate that a password is correct. Disk corruption may
1524# occur if an invalid password is specified.
1525#
1526# Since: 0.14.0
1527##
1528{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
Luiz Capitulinod72f3262011-11-25 14:38:09 -02001529
1530##
1531# @balloon:
1532#
1533# Request the balloon driver to change its balloon size.
1534#
1535# @value: the target size of the balloon in bytes
1536#
1537# Returns: Nothing on success
1538# If the balloon driver is enabled but not functional because the KVM
1539# kernel module cannot support it, KvmMissingCap
1540# If no balloon device is present, DeviceNotActive
1541#
1542# Notes: This command just issues a request to the guest. When it returns,
1543# the balloon size may not have changed. A guest can change the balloon
1544# size independent of this command.
1545#
1546# Since: 0.14.0
1547##
1548{ 'command': 'balloon', 'data': {'value': 'int'} }
Luiz Capitulino5e7caac2011-11-25 14:57:10 -02001549
1550##
1551# @block_resize
1552#
1553# Resize a block image while a guest is running.
1554#
1555# @device: the name of the device to get the image resized
1556#
1557# @size: new image size in bytes
1558#
1559# Returns: nothing on success
1560# If @device is not a valid block device, DeviceNotFound
Luiz Capitulino5e7caac2011-11-25 14:57:10 -02001561#
1562# Since: 0.14.0
1563##
1564{ 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
Luiz Capitulino6106e242011-11-25 16:15:19 -02001565
1566##
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001567# @NewImageMode
1568#
1569# An enumeration that tells QEMU how to set the backing file path in
1570# a new image file.
1571#
1572# @existing: QEMU should look for an existing image file.
1573#
1574# @absolute-paths: QEMU should create a new image with absolute paths
1575# for the backing file.
1576#
1577# Since: 1.1
1578##
1579{ 'enum': 'NewImageMode'
1580 'data': [ 'existing', 'absolute-paths' ] }
1581
1582##
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001583# @BlockdevSnapshot
Jeff Cody8802d1f2012-02-28 15:54:06 -05001584#
1585# @device: the name of the device to generate the snapshot from.
1586#
1587# @snapshot-file: the target of the new image. A new file will be created.
1588#
1589# @format: #optional the format of the snapshot image, default is 'qcow2'.
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001590#
1591# @mode: #optional whether and how QEMU should create a new image, default is
Paolo Bonzini8bde9b62012-09-26 16:34:29 +02001592# 'absolute-paths'.
Jeff Cody8802d1f2012-02-28 15:54:06 -05001593##
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001594{ 'type': 'BlockdevSnapshot',
Paolo Bonzinibc8b0942012-03-06 18:55:58 +01001595 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1596 '*mode': 'NewImageMode' } }
Jeff Cody8802d1f2012-02-28 15:54:06 -05001597
1598##
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001599# @BlockdevAction
Jeff Cody8802d1f2012-02-28 15:54:06 -05001600#
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001601# A discriminated record of operations that can be performed with
1602# @transaction.
1603##
1604{ 'union': 'BlockdevAction',
1605 'data': {
Eric Blakec85a1282013-04-10 13:12:44 -06001606 'blockdev-snapshot-sync': 'BlockdevSnapshot'
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001607 } }
1608
1609##
1610# @transaction
1611#
1612# Atomically operate on a group of one or more block devices. If
1613# any operation fails, then the entire set of actions will be
1614# abandoned and the appropriate error returned. The only operation
1615# supported is currently blockdev-snapshot-sync.
Jeff Cody8802d1f2012-02-28 15:54:06 -05001616#
1617# List of:
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001618# @BlockdevAction: information needed for the device snapshot
Jeff Cody8802d1f2012-02-28 15:54:06 -05001619#
1620# Returns: nothing on success
1621# If @device is not a valid block device, DeviceNotFound
Jeff Cody8802d1f2012-02-28 15:54:06 -05001622#
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001623# Note: The transaction aborts on the first failure. Therefore, there will
1624# be only one device or snapshot file returned in an error condition, and
1625# subsequent actions will not have been attempted.
1626#
1627# Since 1.1
Jeff Cody8802d1f2012-02-28 15:54:06 -05001628##
Paolo Bonzini52e7c242012-03-06 18:55:57 +01001629{ 'command': 'transaction',
1630 'data': { 'actions': [ 'BlockdevAction' ] } }
Jeff Cody8802d1f2012-02-28 15:54:06 -05001631
1632##
Luiz Capitulino6106e242011-11-25 16:15:19 -02001633# @blockdev-snapshot-sync
1634#
1635# Generates a synchronous snapshot of a block device.
1636#
1637# @device: the name of the device to generate the snapshot from.
1638#
1639# @snapshot-file: the target of the new image. If the file exists, or if it
1640# is a device, the snapshot will be created in the existing
1641# file/device. If does not exist, a new file will be created.
1642#
1643# @format: #optional the format of the snapshot image, default is 'qcow2'.
1644#
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001645# @mode: #optional whether and how QEMU should create a new image, default is
Paolo Bonzini8bde9b62012-09-26 16:34:29 +02001646# 'absolute-paths'.
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001647#
Luiz Capitulino6106e242011-11-25 16:15:19 -02001648# Returns: nothing on success
1649# If @device is not a valid block device, DeviceNotFound
Luiz Capitulino6106e242011-11-25 16:15:19 -02001650#
Luiz Capitulino6106e242011-11-25 16:15:19 -02001651# Since 0.14.0
1652##
1653{ 'command': 'blockdev-snapshot-sync',
Paolo Bonzini6cc2a412012-03-06 18:55:59 +01001654 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1655 '*mode': 'NewImageMode'} }
Luiz Capitulinod51a67b2011-11-25 17:52:45 -02001656
1657##
1658# @human-monitor-command:
1659#
1660# Execute a command on the human monitor and return the output.
1661#
1662# @command-line: the command to execute in the human monitor
1663#
1664# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1665#
1666# Returns: the output of the command as a string
1667#
1668# Since: 0.14.0
1669#
1670# Notes: This command only exists as a stop-gap. It's use is highly
1671# discouraged. The semantics of this command are not guaranteed.
1672#
1673# Known limitations:
1674#
1675# o This command is stateless, this means that commands that depend
1676# on state information (such as getfd) might not work
1677#
1678# o Commands that prompt the user for data (eg. 'cont' when the block
1679# device is encrypted) don't currently work
1680##
1681{ 'command': 'human-monitor-command',
1682 'data': {'command-line': 'str', '*cpu-index': 'int'},
Laszlo Ersekb80e5602012-07-17 16:17:10 +02001683 'returns': 'str' }
Luiz Capitulino6cdedb02011-11-27 22:54:09 -02001684
1685##
Jeff Codyed61fc12012-09-27 13:29:16 -04001686# @block-commit
1687#
1688# Live commit of data from overlay image nodes into backing nodes - i.e.,
1689# writes data between 'top' and 'base' into 'base'.
1690#
1691# @device: the name of the device
1692#
1693# @base: #optional The file name of the backing image to write data into.
1694# If not specified, this is the deepest backing image
1695#
1696# @top: The file name of the backing image within the image chain,
1697# which contains the topmost data to be committed down.
1698# Note, the active layer as 'top' is currently unsupported.
1699#
1700# If top == base, that is an error.
1701#
1702#
1703# @speed: #optional the maximum speed, in bytes per second
1704#
1705# Returns: Nothing on success
1706# If commit or stream is already active on this device, DeviceInUse
1707# If @device does not exist, DeviceNotFound
1708# If image commit is not supported by this device, NotSupported
1709# If @base or @top is invalid, a generic error is returned
1710# If @top is the active layer, or omitted, a generic error is returned
1711# If @speed is invalid, InvalidParameter
1712#
1713# Since: 1.3
1714#
1715##
1716{ 'command': 'block-commit',
1717 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1718 '*speed': 'int' } }
1719
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001720##
1721# @drive-mirror
1722#
1723# Start mirroring a block device's writes to a new destination.
1724#
1725# @device: the name of the device whose writes should be mirrored.
1726#
1727# @target: the target of the new image. If the file exists, or if it
1728# is a device, the existing file/device will be used as the new
1729# destination. If it does not exist, a new file will be created.
1730#
1731# @format: #optional the format of the new destination, default is to
1732# probe if @mode is 'existing', else the format of the source
1733#
1734# @mode: #optional whether and how QEMU should create a new image, default is
1735# 'absolute-paths'.
1736#
1737# @speed: #optional the maximum speed, in bytes per second
1738#
1739# @sync: what parts of the disk image should be copied to the destination
1740# (all the disk, only the sectors allocated in the topmost image, or
1741# only new I/O).
1742#
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001743# @granularity: #optional granularity of the dirty bitmap, default is 64K
1744# if the image format doesn't have clusters, 4K if the clusters
1745# are smaller than that, else the cluster size. Must be a
1746# power of 2 between 512 and 64M (since 1.4).
1747#
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001748# @buf-size: #optional maximum amount of data in flight from source to
1749# target (since 1.4).
1750#
Paolo Bonzinib952b552012-10-18 16:49:28 +02001751# @on-source-error: #optional the action to take on an error on the source,
1752# default 'report'. 'stop' and 'enospc' can only be used
1753# if the block device supports io-status (see BlockInfo).
1754#
1755# @on-target-error: #optional the action to take on an error on the target,
1756# default 'report' (no limitations, since this applies to
1757# a different block device than @device).
1758#
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001759# Returns: nothing on success
1760# If @device is not a valid block device, DeviceNotFound
1761#
1762# Since 1.3
1763##
1764{ 'command': 'drive-mirror',
1765 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1766 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
Paolo Bonzinieee13df2013-01-21 17:09:46 +01001767 '*speed': 'int', '*granularity': 'uint32',
Paolo Bonzini08e4ed62013-01-22 09:03:13 +01001768 '*buf-size': 'int', '*on-source-error': 'BlockdevOnError',
Paolo Bonzinib952b552012-10-18 16:49:28 +02001769 '*on-target-error': 'BlockdevOnError' } }
Paolo Bonzinid9b902d2012-10-18 16:49:24 +02001770
1771##
Luiz Capitulino6cdedb02011-11-27 22:54:09 -02001772# @migrate_cancel
1773#
1774# Cancel the current executing migration process.
1775#
1776# Returns: nothing on success
1777#
1778# Notes: This command succeeds even if there is no migration process running.
1779#
1780# Since: 0.14.0
1781##
1782{ 'command': 'migrate_cancel' }
Luiz Capitulino4f0a9932011-11-27 23:18:01 -02001783
1784##
1785# @migrate_set_downtime
1786#
1787# Set maximum tolerated downtime for migration.
1788#
1789# @value: maximum downtime in seconds
1790#
1791# Returns: nothing on success
1792#
1793# Since: 0.14.0
1794##
1795{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
Luiz Capitulino3dc85382011-11-28 11:59:37 -02001796
1797##
1798# @migrate_set_speed
1799#
1800# Set maximum speed for migration.
1801#
1802# @value: maximum speed in bytes.
1803#
1804# Returns: nothing on success
1805#
1806# Notes: A value lesser than zero will be automatically round up to zero.
1807#
1808# Since: 0.14.0
1809##
1810{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001811
1812##
Orit Wasserman9e1ba4c2012-08-06 21:42:54 +03001813# @migrate-set-cache-size
1814#
1815# Set XBZRLE cache size
1816#
1817# @value: cache size in bytes
1818#
1819# The size will be rounded down to the nearest power of 2.
1820# The cache size can be modified before and during ongoing migration
1821#
1822# Returns: nothing on success
1823#
1824# Since: 1.2
1825##
1826{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1827
1828##
1829# @query-migrate-cache-size
1830#
1831# query XBZRLE cache size
1832#
1833# Returns: XBZRLE cache size in bytes
1834#
1835# Since: 1.2
1836##
1837{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
1838
1839##
Alon Levyd03ee402012-03-05 15:13:28 +02001840# @ObjectPropertyInfo:
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001841#
1842# @name: the name of the property
1843#
1844# @type: the type of the property. This will typically come in one of four
1845# forms:
1846#
1847# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1848# These types are mapped to the appropriate JSON type.
1849#
1850# 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1851# legacy qdev typename. These types are always treated as strings.
1852#
1853# 3) A child type in the form 'child<subtype>' where subtype is a qdev
1854# device type name. Child properties create the composition tree.
1855#
1856# 4) A link type in the form 'link<subtype>' where subtype is a qdev
1857# device type name. Link properties form the device model graph.
1858#
Anthony Liguori51920822012-08-10 11:04:10 -05001859# Since: 1.2
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001860##
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001861{ 'type': 'ObjectPropertyInfo',
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001862 'data': { 'name': 'str', 'type': 'str' } }
1863
1864##
1865# @qom-list:
1866#
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001867# This command will list any properties of a object given a path in the object
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001868# model.
1869#
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001870# @path: the path within the object model. See @qom-get for a description of
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001871# this parameter.
1872#
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001873# Returns: a list of @ObjectPropertyInfo that describe the properties of the
1874# object.
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001875#
Anthony Liguori51920822012-08-10 11:04:10 -05001876# Since: 1.2
Anthony Liguorib4b12c62011-12-12 14:29:34 -06001877##
1878{ 'command': 'qom-list',
1879 'data': { 'path': 'str' },
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001880 'returns': [ 'ObjectPropertyInfo' ] }
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001881
1882##
1883# @qom-get:
1884#
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001885# This command will get a property from a object model path and return the
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001886# value.
1887#
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001888# @path: The path within the object model. There are two forms of supported
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001889# paths--absolute and partial paths.
1890#
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001891# Absolute paths are derived from the root object and can follow child<>
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001892# or link<> properties. Since they can follow link<> properties, they
1893# can be arbitrarily long. Absolute paths look like absolute filenames
1894# and are prefixed with a leading slash.
1895#
1896# Partial paths look like relative filenames. They do not begin
1897# with a prefix. The matching rules for partial paths are subtle but
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001898# designed to make specifying objects easy. At each level of the
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001899# composition tree, the partial path is matched as an absolute path.
1900# The first match is not returned. At least two matches are searched
1901# for. A successful result is only returned if only one match is
1902# found. If more than one match is found, a flag is return to
1903# indicate that the match was ambiguous.
1904#
1905# @property: The property name to read
1906#
1907# Returns: The property value. The type depends on the property type. legacy<>
1908# properties are returned as #str. child<> and link<> properties are
1909# returns as #str pathnames. All integer property types (u8, u16, etc)
1910# are returned as #int.
1911#
Anthony Liguori51920822012-08-10 11:04:10 -05001912# Since: 1.2
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001913##
1914{ 'command': 'qom-get',
1915 'data': { 'path': 'str', 'property': 'str' },
1916 'returns': 'visitor',
1917 'gen': 'no' }
1918
1919##
1920# @qom-set:
1921#
Anthony Liguori57c9faf2012-01-30 08:55:55 -06001922# This command will set a property from a object model path.
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001923#
1924# @path: see @qom-get for a description of this parameter
1925#
1926# @property: the property name to set
1927#
1928# @value: a value who's type is appropriate for the property type. See @qom-get
1929# for a description of type mapping.
1930#
Anthony Liguori51920822012-08-10 11:04:10 -05001931# Since: 1.2
Anthony Liguorieb6e8ea2011-12-12 14:29:35 -06001932##
1933{ 'command': 'qom-set',
1934 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1935 'gen': 'no' }
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001936
1937##
1938# @set_password:
1939#
1940# Sets the password of a remote display session.
1941#
1942# @protocol: `vnc' to modify the VNC server password
1943# `spice' to modify the Spice server password
1944#
1945# @password: the new password
1946#
1947# @connected: #optional how to handle existing clients when changing the
Laszlo Ersekb80e5602012-07-17 16:17:10 +02001948# password. If nothing is specified, defaults to `keep'
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001949# `fail' to fail the command if clients are connected
1950# `disconnect' to disconnect existing clients
1951# `keep' to maintain existing clients
1952#
1953# Returns: Nothing on success
1954# If Spice is not enabled, DeviceNotFound
Luiz Capitulinofbf796f2011-12-07 11:17:51 -02001955#
1956# Since: 0.14.0
1957##
1958{ 'command': 'set_password',
1959 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
Luiz Capitulino9ad53722011-12-07 11:47:57 -02001960
1961##
1962# @expire_password:
1963#
1964# Expire the password of a remote display server.
1965#
1966# @protocol: the name of the remote display protocol `vnc' or `spice'
1967#
1968# @time: when to expire the password.
1969# `now' to expire the password immediately
1970# `never' to cancel password expiration
1971# `+INT' where INT is the number of seconds from now (integer)
1972# `INT' where INT is the absolute time in seconds
1973#
1974# Returns: Nothing on success
1975# If @protocol is `spice' and Spice is not active, DeviceNotFound
Luiz Capitulino9ad53722011-12-07 11:47:57 -02001976#
1977# Since: 0.14.0
1978#
1979# Notes: Time is relative to the server and currently there is no way to
1980# coordinate server time with client time. It is not recommended to
1981# use the absolute time version of the @time parameter unless you're
1982# sure you are on the same machine as the QEMU instance.
1983##
1984{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
Luiz Capitulinoc245b6a2011-12-07 16:02:36 -02001985
1986##
1987# @eject:
1988#
1989# Ejects a device from a removable drive.
1990#
1991# @device: The name of the device
1992#
1993# @force: @optional If true, eject regardless of whether the drive is locked.
1994# If not specified, the default value is false.
1995#
1996# Returns: Nothing on success
1997# If @device is not a valid block device, DeviceNotFound
Luiz Capitulinoc245b6a2011-12-07 16:02:36 -02001998#
1999# Notes: Ejecting a device will no media results in success
2000#
2001# Since: 0.14.0
2002##
2003{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
Luiz Capitulino270b2432011-12-08 11:45:55 -02002004
2005##
2006# @change-vnc-password:
2007#
2008# Change the VNC server password.
2009#
2010# @target: the new password to use with VNC authentication
2011#
2012# Since: 1.1
2013#
2014# Notes: An empty password in this command will set the password to the empty
2015# string. Existing clients are unaffected by executing this command.
2016##
2017{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
Luiz Capitulino333a96e2011-12-08 11:13:50 -02002018
2019##
2020# @change:
2021#
2022# This command is multiple commands multiplexed together.
2023#
2024# @device: This is normally the name of a block device but it may also be 'vnc'.
2025# when it's 'vnc', then sub command depends on @target
2026#
2027# @target: If @device is a block device, then this is the new filename.
2028# If @device is 'vnc', then if the value 'password' selects the vnc
2029# change password command. Otherwise, this specifies a new server URI
2030# address to listen to for VNC connections.
2031#
2032# @arg: If @device is a block device, then this is an optional format to open
2033# the device with.
2034# If @device is 'vnc' and @target is 'password', this is the new VNC
2035# password to set. If this argument is an empty string, then no future
2036# logins will be allowed.
2037#
2038# Returns: Nothing on success.
2039# If @device is not a valid block device, DeviceNotFound
Luiz Capitulino333a96e2011-12-08 11:13:50 -02002040# If the new block device is encrypted, DeviceEncrypted. Note that
2041# if this error is returned, the device has been opened successfully
2042# and an additional call to @block_passwd is required to set the
2043# device's password. The behavior of reads and writes to the block
2044# device between when these calls are executed is undefined.
2045#
2046# Notes: It is strongly recommended that this interface is not used especially
2047# for changing block devices.
2048#
2049# Since: 0.14.0
2050##
2051{ 'command': 'change',
2052 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
Luiz Capitulino80047da2011-12-14 16:49:14 -02002053
2054##
2055# @block_set_io_throttle:
2056#
2057# Change I/O throttle limits for a block drive.
2058#
2059# @device: The name of the device
2060#
2061# @bps: total throughput limit in bytes per second
2062#
2063# @bps_rd: read throughput limit in bytes per second
2064#
2065# @bps_wr: write throughput limit in bytes per second
2066#
2067# @iops: total I/O operations per second
2068#
2069# @ops_rd: read I/O operations per second
2070#
2071# @iops_wr: write I/O operations per second
2072#
2073# Returns: Nothing on success
2074# If @device is not a valid block device, DeviceNotFound
Luiz Capitulino80047da2011-12-14 16:49:14 -02002075#
2076# Since: 1.1
Laszlo Ersekb80e5602012-07-17 16:17:10 +02002077##
Luiz Capitulino80047da2011-12-14 16:49:14 -02002078{ 'command': 'block_set_io_throttle',
2079 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
2080 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00002081
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01002082##
2083# @block-stream:
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00002084#
2085# Copy data from a backing file into a block device.
2086#
2087# The block streaming operation is performed in the background until the entire
2088# backing file has been copied. This command returns immediately once streaming
2089# has started. The status of ongoing block streaming operations can be checked
2090# with query-block-jobs. The operation can be stopped before it has completed
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01002091# using the block-job-cancel command.
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00002092#
2093# If a base file is specified then sectors are not copied from that base file and
2094# its backing chain. When streaming completes the image file will have the base
2095# file as its backing file. This can be used to stream a subset of the backing
2096# file chain instead of flattening the entire image.
2097#
2098# On successful completion the image file is updated to drop the backing file
2099# and the BLOCK_JOB_COMPLETED event is emitted.
2100#
2101# @device: the device name
2102#
2103# @base: #optional the common backing file name
2104#
Stefan Hajnoczic83c66c2012-04-25 16:51:03 +01002105# @speed: #optional the maximum speed, in bytes per second
2106#
Paolo Bonzini1d809092012-09-28 17:22:59 +02002107# @on-error: #optional the action to take on an error (default report).
2108# 'stop' and 'enospc' can only be used if the block device
2109# supports io-status (see BlockInfo). Since 1.3.
2110#
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00002111# Returns: Nothing on success
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00002112# If @device does not exist, DeviceNotFound
Stefan Hajnoczi12bd4512012-01-18 14:40:46 +00002113#
2114# Since: 1.1
2115##
Paolo Bonzini1d809092012-09-28 17:22:59 +02002116{ 'command': 'block-stream',
2117 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2118 '*on-error': 'BlockdevOnError' } }
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +00002119
2120##
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01002121# @block-job-set-speed:
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +00002122#
2123# Set maximum speed for a background block operation.
2124#
2125# This command can only be issued when there is an active block job.
2126#
2127# Throttling can be disabled by setting the speed to 0.
2128#
2129# @device: the device name
2130#
Stefan Hajnoczic83c66c2012-04-25 16:51:03 +01002131# @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2132# Defaults to 0.
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +00002133#
2134# Returns: Nothing on success
Paolo Bonzini05290d82012-07-24 13:03:39 +02002135# If no background operation is active on this device, DeviceNotActive
Stefan Hajnoczi2d47c6e2012-01-18 14:40:47 +00002136#
2137# Since: 1.1
2138##
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01002139{ 'command': 'block-job-set-speed',
Stefan Hajnoczi882ec7c2012-04-25 16:51:02 +01002140 'data': { 'device': 'str', 'speed': 'int' } }
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00002141
2142##
Stefan Hajnoczidb58f9c2012-04-11 16:27:10 +01002143# @block-job-cancel:
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00002144#
Paolo Bonzini05290d82012-07-24 13:03:39 +02002145# Stop an active background block operation.
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00002146#
Paolo Bonzini05290d82012-07-24 13:03:39 +02002147# This command returns immediately after marking the active background block
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00002148# operation for cancellation. It is an error to call this command if no
2149# operation is in progress.
2150#
2151# The operation will cancel as soon as possible and then emit the
2152# BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2153# enumerated using query-block-jobs.
2154#
Paolo Bonzini05290d82012-07-24 13:03:39 +02002155# For streaming, the image file retains its backing file unless the streaming
2156# operation happens to complete just as it is being cancelled. A new streaming
2157# operation can be started at a later time to finish copying all data from the
2158# backing file.
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00002159#
2160# @device: the device name
2161#
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02002162# @force: #optional whether to allow cancellation of a paused job (default
2163# false). Since 1.3.
2164#
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00002165# Returns: Nothing on success
Paolo Bonzini05290d82012-07-24 13:03:39 +02002166# If no background operation is active on this device, DeviceNotActive
Stefan Hajnoczi370521a2012-01-18 14:40:48 +00002167#
2168# Since: 1.1
2169##
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02002170{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2171
2172##
2173# @block-job-pause:
2174#
2175# Pause an active background block operation.
2176#
2177# This command returns immediately after marking the active background block
2178# operation for pausing. It is an error to call this command if no
2179# operation is in progress. Pausing an already paused job has no cumulative
2180# effect; a single block-job-resume command will resume the job.
2181#
2182# The operation will pause as soon as possible. No event is emitted when
2183# the operation is actually paused. Cancelling a paused job automatically
2184# resumes it.
2185#
2186# @device: the device name
2187#
2188# Returns: Nothing on success
2189# If no background operation is active on this device, DeviceNotActive
2190#
2191# Since: 1.3
2192##
2193{ 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2194
2195##
2196# @block-job-resume:
2197#
2198# Resume an active background block operation.
2199#
2200# This command returns immediately after resuming a paused background block
2201# operation. It is an error to call this command if no operation is in
2202# progress. Resuming an already running job is not an error.
2203#
Paolo Bonzini32c81a42012-09-28 17:22:58 +02002204# This command also clears the error status of the job.
2205#
Paolo Bonzini6e37fb82012-09-28 17:22:51 +02002206# @device: the device name
2207#
2208# Returns: Nothing on success
2209# If no background operation is active on this device, DeviceNotActive
2210#
2211# Since: 1.3
2212##
2213{ 'command': 'block-job-resume', 'data': { 'device': 'str' } }
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06002214
2215##
Paolo Bonziniaeae8832012-10-18 16:49:21 +02002216# @block-job-complete:
2217#
2218# Manually trigger completion of an active background block operation. This
2219# is supported for drive mirroring, where it also switches the device to
Paolo Bonzinia66a2a32012-07-23 15:15:47 +02002220# write to the target path only. The ability to complete is signaled with
2221# a BLOCK_JOB_READY event.
Paolo Bonziniaeae8832012-10-18 16:49:21 +02002222#
2223# This command completes an active background block operation synchronously.
2224# The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2225# is not defined. Note that if an I/O error occurs during the processing of
2226# this command: 1) the command itself will fail; 2) the error will be processed
2227# according to the rerror/werror arguments that were specified when starting
2228# the operation.
2229#
2230# A cancelled or paused job cannot be completed.
2231#
2232# @device: the device name
2233#
2234# Returns: Nothing on success
2235# If no background operation is active on this device, DeviceNotActive
2236#
2237# Since: 1.3
2238##
2239{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2240
2241##
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06002242# @ObjectTypeInfo:
2243#
2244# This structure describes a search result from @qom-list-types
2245#
2246# @name: the type name found in the search
2247#
2248# Since: 1.1
2249#
2250# Notes: This command is experimental and may change syntax in future releases.
2251##
2252{ 'type': 'ObjectTypeInfo',
2253 'data': { 'name': 'str' } }
2254
2255##
2256# @qom-list-types:
2257#
2258# This command will return a list of types given search parameters
2259#
2260# @implements: if specified, only return types that implement this type name
2261#
2262# @abstract: if true, include abstract types in the results
2263#
2264# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2265#
2266# Since: 1.1
Anthony Liguori5eeee3f2011-12-22 14:40:54 -06002267##
2268{ 'command': 'qom-list-types',
2269 'data': { '*implements': 'str', '*abstract': 'bool' },
2270 'returns': [ 'ObjectTypeInfo' ] }
Luiz Capitulinoe1c37d02011-12-05 14:48:01 -02002271
2272##
Anthony Liguori1daa31b2012-08-10 11:04:09 -05002273# @DevicePropertyInfo:
2274#
2275# Information about device properties.
2276#
2277# @name: the name of the property
2278# @type: the typename of the property
2279#
2280# Since: 1.2
2281##
2282{ 'type': 'DevicePropertyInfo',
2283 'data': { 'name': 'str', 'type': 'str' } }
2284
2285##
2286# @device-list-properties:
2287#
2288# List properties associated with a device.
2289#
2290# @typename: the type name of a device
2291#
2292# Returns: a list of DevicePropertyInfo describing a devices properties
2293#
2294# Since: 1.2
2295##
2296{ 'command': 'device-list-properties',
2297 'data': { 'typename': 'str'},
2298 'returns': [ 'DevicePropertyInfo' ] }
2299
2300##
Luiz Capitulinoe1c37d02011-12-05 14:48:01 -02002301# @migrate
2302#
2303# Migrates the current running guest to another Virtual Machine.
2304#
2305# @uri: the Uniform Resource Identifier of the destination VM
2306#
2307# @blk: #optional do block migration (full disk copy)
2308#
2309# @inc: #optional incremental disk copy migration
2310#
2311# @detach: this argument exists only for compatibility reasons and
2312# is ignored by QEMU
2313#
2314# Returns: nothing on success
2315#
2316# Since: 0.14.0
2317##
2318{ 'command': 'migrate',
2319 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
Anthony Liguori33cf6292012-03-19 13:39:42 -05002320
Stefano Stabellinia7ae8352012-01-25 12:24:51 +00002321# @xen-save-devices-state:
2322#
2323# Save the state of all devices to file. The RAM and the block devices
2324# of the VM are not saved by this command.
2325#
2326# @filename: the file to save the state of the devices to as binary
2327# data. See xen-save-devices-state.txt for a description of the binary
2328# format.
2329#
2330# Returns: Nothing on success
Stefano Stabellinia7ae8352012-01-25 12:24:51 +00002331#
2332# Since: 1.1
2333##
2334{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
Luiz Capitulinoa15fef22012-03-29 12:38:50 -03002335
2336##
Anthony PERARD39f42432012-10-03 13:48:19 +00002337# @xen-set-global-dirty-log
2338#
2339# Enable or disable the global dirty log mode.
2340#
2341# @enable: true to enable, false to disable.
2342#
2343# Returns: nothing
2344#
2345# Since: 1.3
2346##
2347{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2348
2349##
Luiz Capitulinoa15fef22012-03-29 12:38:50 -03002350# @device_del:
2351#
2352# Remove a device from a guest
2353#
2354# @id: the name of the device
2355#
2356# Returns: Nothing on success
2357# If @id is not a valid device, DeviceNotFound
Luiz Capitulinoa15fef22012-03-29 12:38:50 -03002358#
2359# Notes: When this command completes, the device may not be removed from the
2360# guest. Hot removal is an operation that requires guest cooperation.
2361# This command merely requests that the guest begin the hot removal
Michael S. Tsirkin0402a5d2013-03-06 14:58:59 +02002362# process. Completion of the device removal process is signaled with a
2363# DEVICE_DELETED event. Guest reset will automatically complete removal
2364# for all devices.
Luiz Capitulinoa15fef22012-03-29 12:38:50 -03002365#
2366# Since: 0.14.0
2367##
2368{ 'command': 'device_del', 'data': {'id': 'str'} }
Wen Congyang783e9b42012-05-07 12:10:47 +08002369
2370##
2371# @dump-guest-memory
2372#
2373# Dump guest's memory to vmcore. It is a synchronous operation that can take
2374# very long depending on the amount of guest memory. This command is only
Luiz Capitulinof5b0d932012-06-28 11:59:15 -03002375# supported on i386 and x86_64.
Wen Congyang783e9b42012-05-07 12:10:47 +08002376#
Luiz Capitulinof5b0d932012-06-28 11:59:15 -03002377# @paging: if true, do paging to get guest's memory mapping. This allows
Luiz Capitulinod6911802012-09-21 13:10:58 -03002378# using gdb to process the core file.
Luiz Capitulinof5b0d932012-06-28 11:59:15 -03002379#
Luiz Capitulinod6911802012-09-21 13:10:58 -03002380# IMPORTANT: this option can make QEMU allocate several gigabytes
2381# of RAM. This can happen for a large guest, or a
2382# malicious guest pretending to be large.
2383#
2384# Also, paging=true has the following limitations:
2385#
2386# 1. The guest may be in a catastrophic state or can have corrupted
2387# memory, which cannot be trusted
2388# 2. The guest can be in real-mode even if paging is enabled. For
2389# example, the guest uses ACPI to sleep, and ACPI sleep state
2390# goes in real-mode
Luiz Capitulinof5b0d932012-06-28 11:59:15 -03002391#
Wen Congyang783e9b42012-05-07 12:10:47 +08002392# @protocol: the filename or file descriptor of the vmcore. The supported
Luiz Capitulinod6911802012-09-21 13:10:58 -03002393# protocols are:
Luiz Capitulinof5b0d932012-06-28 11:59:15 -03002394#
Luiz Capitulinod6911802012-09-21 13:10:58 -03002395# 1. file: the protocol starts with "file:", and the following
2396# string is the file's path.
2397# 2. fd: the protocol starts with "fd:", and the following string
2398# is the fd's name.
Luiz Capitulinof5b0d932012-06-28 11:59:15 -03002399#
Wen Congyang783e9b42012-05-07 12:10:47 +08002400# @begin: #optional if specified, the starting physical address.
Luiz Capitulinof5b0d932012-06-28 11:59:15 -03002401#
Wen Congyang783e9b42012-05-07 12:10:47 +08002402# @length: #optional if specified, the memory size, in bytes. If you don't
Luiz Capitulinod6911802012-09-21 13:10:58 -03002403# want to dump all guest's memory, please specify the start @begin
2404# and @length
Wen Congyang783e9b42012-05-07 12:10:47 +08002405#
2406# Returns: nothing on success
Wen Congyang783e9b42012-05-07 12:10:47 +08002407#
2408# Since: 1.2
2409##
2410{ 'command': 'dump-guest-memory',
2411 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2412 '*length': 'int' } }
Luiz Capitulinod6911802012-09-21 13:10:58 -03002413
Luiz Capitulino928059a2012-04-18 17:34:15 -03002414##
2415# @netdev_add:
2416#
2417# Add a network backend.
2418#
2419# @type: the type of network backend. Current valid values are 'user', 'tap',
2420# 'vde', 'socket', 'dump' and 'bridge'
2421#
2422# @id: the name of the new network backend
2423#
2424# @props: #optional a list of properties to be passed to the backend in
2425# the format 'name=value', like 'ifname=tap0,script=no'
2426#
2427# Notes: The semantics of @props is not well defined. Future commands will be
2428# introduced that provide stronger typing for backend creation.
2429#
2430# Since: 0.14.0
2431#
2432# Returns: Nothing on success
2433# If @type is not a valid network backend, DeviceNotFound
Luiz Capitulino928059a2012-04-18 17:34:15 -03002434##
2435{ 'command': 'netdev_add',
2436 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2437 'gen': 'no' }
Luiz Capitulino5f964152012-04-16 14:36:32 -03002438
2439##
2440# @netdev_del:
2441#
2442# Remove a network backend.
2443#
2444# @id: the name of the network backend to remove
2445#
2446# Returns: Nothing on success
2447# If @id is not a valid network backend, DeviceNotFound
2448#
2449# Since: 0.14.0
2450##
2451{ 'command': 'netdev_del', 'data': {'id': 'str'} }
Corey Bryant208c9d12012-06-22 14:36:09 -04002452
2453##
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002454# @NetdevNoneOptions
2455#
2456# Use it alone to have zero network devices.
2457#
2458# Since 1.2
2459##
2460{ 'type': 'NetdevNoneOptions',
2461 'data': { } }
2462
2463##
2464# @NetLegacyNicOptions
2465#
2466# Create a new Network Interface Card.
2467#
2468# @netdev: #optional id of -netdev to connect to
2469#
2470# @macaddr: #optional MAC address
2471#
2472# @model: #optional device model (e1000, rtl8139, virtio etc.)
2473#
2474# @addr: #optional PCI device address
2475#
2476# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2477#
2478# Since 1.2
2479##
2480{ 'type': 'NetLegacyNicOptions',
2481 'data': {
2482 '*netdev': 'str',
2483 '*macaddr': 'str',
2484 '*model': 'str',
2485 '*addr': 'str',
2486 '*vectors': 'uint32' } }
2487
2488##
2489# @String
2490#
2491# A fat type wrapping 'str', to be embedded in lists.
2492#
2493# Since 1.2
2494##
2495{ 'type': 'String',
2496 'data': {
2497 'str': 'str' } }
2498
2499##
2500# @NetdevUserOptions
2501#
2502# Use the user mode network stack which requires no administrator privilege to
2503# run.
2504#
2505# @hostname: #optional client hostname reported by the builtin DHCP server
2506#
2507# @restrict: #optional isolate the guest from the host
2508#
2509# @ip: #optional legacy parameter, use net= instead
2510#
2511# @net: #optional IP address and optional netmask
2512#
2513# @host: #optional guest-visible address of the host
2514#
2515# @tftp: #optional root directory of the built-in TFTP server
2516#
2517# @bootfile: #optional BOOTP filename, for use with tftp=
2518#
2519# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2520# assign
2521#
2522# @dns: #optional guest-visible address of the virtual nameserver
2523#
Klaus Stengel63d29602012-10-27 19:53:39 +02002524# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2525# to the guest
2526#
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002527# @smb: #optional root directory of the built-in SMB server
2528#
2529# @smbserver: #optional IP address of the built-in SMB server
2530#
2531# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2532# endpoints
2533#
2534# @guestfwd: #optional forward guest TCP connections
2535#
2536# Since 1.2
2537##
2538{ 'type': 'NetdevUserOptions',
2539 'data': {
2540 '*hostname': 'str',
2541 '*restrict': 'bool',
2542 '*ip': 'str',
2543 '*net': 'str',
2544 '*host': 'str',
2545 '*tftp': 'str',
2546 '*bootfile': 'str',
2547 '*dhcpstart': 'str',
2548 '*dns': 'str',
Klaus Stengel63d29602012-10-27 19:53:39 +02002549 '*dnssearch': ['String'],
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002550 '*smb': 'str',
2551 '*smbserver': 'str',
2552 '*hostfwd': ['String'],
2553 '*guestfwd': ['String'] } }
2554
2555##
2556# @NetdevTapOptions
2557#
2558# Connect the host TAP network interface name to the VLAN.
2559#
2560# @ifname: #optional interface name
2561#
2562# @fd: #optional file descriptor of an already opened tap
2563#
Jason Wang2ca81ba2013-02-20 18:04:01 +08002564# @fds: #optional multiple file descriptors of already opened multiqueue capable
2565# tap
2566#
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002567# @script: #optional script to initialize the interface
2568#
2569# @downscript: #optional script to shut down the interface
2570#
2571# @helper: #optional command to execute to configure bridge
2572#
2573# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2574#
2575# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2576#
2577# @vhost: #optional enable vhost-net network accelerator
2578#
2579# @vhostfd: #optional file descriptor of an already opened vhost net device
2580#
Jason Wang2ca81ba2013-02-20 18:04:01 +08002581# @vhostfds: #optional file descriptors of multiple already opened vhost net
2582# devices
2583#
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002584# @vhostforce: #optional vhost on for non-MSIX virtio guests
2585#
Jason Wangec396012013-02-22 22:57:52 +08002586# @queues: #optional number of queues to be created for multiqueue capable tap
2587#
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002588# Since 1.2
2589##
2590{ 'type': 'NetdevTapOptions',
2591 'data': {
2592 '*ifname': 'str',
2593 '*fd': 'str',
Jason Wang264986e2013-01-30 19:12:34 +08002594 '*fds': 'str',
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002595 '*script': 'str',
2596 '*downscript': 'str',
2597 '*helper': 'str',
2598 '*sndbuf': 'size',
2599 '*vnet_hdr': 'bool',
2600 '*vhost': 'bool',
2601 '*vhostfd': 'str',
Jason Wang264986e2013-01-30 19:12:34 +08002602 '*vhostfds': 'str',
2603 '*vhostforce': 'bool',
2604 '*queues': 'uint32'} }
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002605
2606##
2607# @NetdevSocketOptions
2608#
2609# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2610# socket connection.
2611#
2612# @fd: #optional file descriptor of an already opened socket
2613#
2614# @listen: #optional port number, and optional hostname, to listen on
2615#
2616# @connect: #optional port number, and optional hostname, to connect to
2617#
2618# @mcast: #optional UDP multicast address and port number
2619#
2620# @localaddr: #optional source address and port for multicast and udp packets
2621#
2622# @udp: #optional UDP unicast address and port number
2623#
2624# Since 1.2
2625##
2626{ 'type': 'NetdevSocketOptions',
2627 'data': {
2628 '*fd': 'str',
2629 '*listen': 'str',
2630 '*connect': 'str',
2631 '*mcast': 'str',
2632 '*localaddr': 'str',
2633 '*udp': 'str' } }
2634
2635##
2636# @NetdevVdeOptions
2637#
2638# Connect the VLAN to a vde switch running on the host.
2639#
2640# @sock: #optional socket path
2641#
2642# @port: #optional port number
2643#
2644# @group: #optional group owner of socket
2645#
2646# @mode: #optional permissions for socket
2647#
2648# Since 1.2
2649##
2650{ 'type': 'NetdevVdeOptions',
2651 'data': {
2652 '*sock': 'str',
2653 '*port': 'uint16',
2654 '*group': 'str',
2655 '*mode': 'uint16' } }
2656
2657##
2658# @NetdevDumpOptions
2659#
2660# Dump VLAN network traffic to a file.
2661#
2662# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2663# suffixes.
2664#
2665# @file: #optional dump file path (default is qemu-vlan0.pcap)
2666#
2667# Since 1.2
2668##
2669{ 'type': 'NetdevDumpOptions',
2670 'data': {
2671 '*len': 'size',
2672 '*file': 'str' } }
2673
2674##
2675# @NetdevBridgeOptions
2676#
2677# Connect a host TAP network interface to a host bridge device.
2678#
2679# @br: #optional bridge name
2680#
2681# @helper: #optional command to execute to configure bridge
2682#
2683# Since 1.2
2684##
2685{ 'type': 'NetdevBridgeOptions',
2686 'data': {
2687 '*br': 'str',
2688 '*helper': 'str' } }
2689
2690##
Stefan Hajnoczif6c874e2012-07-24 16:35:04 +01002691# @NetdevHubPortOptions
2692#
2693# Connect two or more net clients through a software hub.
2694#
2695# @hubid: hub identifier number
2696#
2697# Since 1.2
2698##
2699{ 'type': 'NetdevHubPortOptions',
2700 'data': {
2701 'hubid': 'int32' } }
2702
2703##
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002704# @NetClientOptions
2705#
2706# A discriminated record of network device traits.
2707#
2708# Since 1.2
2709##
2710{ 'union': 'NetClientOptions',
2711 'data': {
Stefan Hajnoczif6c874e2012-07-24 16:35:04 +01002712 'none': 'NetdevNoneOptions',
2713 'nic': 'NetLegacyNicOptions',
2714 'user': 'NetdevUserOptions',
2715 'tap': 'NetdevTapOptions',
2716 'socket': 'NetdevSocketOptions',
2717 'vde': 'NetdevVdeOptions',
2718 'dump': 'NetdevDumpOptions',
2719 'bridge': 'NetdevBridgeOptions',
2720 'hubport': 'NetdevHubPortOptions' } }
Laszlo Ersek14aa0c22012-07-17 16:17:11 +02002721
2722##
2723# @NetLegacy
2724#
2725# Captures the configuration of a network device; legacy.
2726#
2727# @vlan: #optional vlan number
2728#
2729# @id: #optional identifier for monitor commands
2730#
2731# @name: #optional identifier for monitor commands, ignored if @id is present
2732#
2733# @opts: device type specific properties (legacy)
2734#
2735# Since 1.2
2736##
2737{ 'type': 'NetLegacy',
2738 'data': {
2739 '*vlan': 'int32',
2740 '*id': 'str',
2741 '*name': 'str',
2742 'opts': 'NetClientOptions' } }
2743
2744##
2745# @Netdev
2746#
2747# Captures the configuration of a network device.
2748#
2749# @id: identifier for monitor commands.
2750#
2751# @opts: device type specific properties
2752#
2753# Since 1.2
2754##
2755{ 'type': 'Netdev',
2756 'data': {
2757 'id': 'str',
2758 'opts': 'NetClientOptions' } }
2759
2760##
Paolo Bonzini5be8c752012-09-19 14:03:35 +02002761# @InetSocketAddress
2762#
2763# Captures a socket address or address range in the Internet namespace.
2764#
2765# @host: host part of the address
2766#
2767# @port: port part of the address, or lowest port if @to is present
2768#
2769# @to: highest port to try
2770#
2771# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2772# #optional
2773#
2774# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2775# #optional
2776#
2777# Since 1.3
2778##
2779{ 'type': 'InetSocketAddress',
2780 'data': {
2781 'host': 'str',
2782 'port': 'str',
2783 '*to': 'uint16',
2784 '*ipv4': 'bool',
2785 '*ipv6': 'bool' } }
2786
2787##
2788# @UnixSocketAddress
2789#
2790# Captures a socket address in the local ("Unix socket") namespace.
2791#
2792# @path: filesystem path to use
2793#
2794# Since 1.3
2795##
2796{ 'type': 'UnixSocketAddress',
2797 'data': {
2798 'path': 'str' } }
2799
2800##
2801# @SocketAddress
2802#
2803# Captures the address of a socket, which could also be a named file descriptor
2804#
2805# Since 1.3
2806##
2807{ 'union': 'SocketAddress',
2808 'data': {
2809 'inet': 'InetSocketAddress',
2810 'unix': 'UnixSocketAddress',
2811 'fd': 'String' } }
2812
2813##
Corey Bryant208c9d12012-06-22 14:36:09 -04002814# @getfd:
2815#
2816# Receive a file descriptor via SCM rights and assign it a name
2817#
2818# @fdname: file descriptor name
2819#
2820# Returns: Nothing on success
Corey Bryant208c9d12012-06-22 14:36:09 -04002821#
2822# Since: 0.14.0
2823#
2824# Notes: If @fdname already exists, the file descriptor assigned to
2825# it will be closed and replaced by the received file
2826# descriptor.
2827# The 'closefd' command can be used to explicitly close the
2828# file descriptor when it is no longer needed.
2829##
2830{ 'command': 'getfd', 'data': {'fdname': 'str'} }
2831
2832##
2833# @closefd:
2834#
2835# Close a file descriptor previously passed via SCM rights
2836#
2837# @fdname: file descriptor name
2838#
2839# Returns: Nothing on success
Corey Bryant208c9d12012-06-22 14:36:09 -04002840#
2841# Since: 0.14.0
2842##
2843{ 'command': 'closefd', 'data': {'fdname': 'str'} }
Anthony Liguori01d3c802012-08-10 11:04:11 -05002844
2845##
2846# @MachineInfo:
2847#
2848# Information describing a machine.
2849#
2850# @name: the name of the machine
2851#
2852# @alias: #optional an alias for the machine name
2853#
2854# @default: #optional whether the machine is default
2855#
Michal Novotnyc72e7682013-04-08 18:21:02 +02002856# @cpu-max: maximum number of CPUs supported by the machine type
2857# (since 1.5.0)
2858#
Anthony Liguori01d3c802012-08-10 11:04:11 -05002859# Since: 1.2.0
2860##
2861{ 'type': 'MachineInfo',
2862 'data': { 'name': 'str', '*alias': 'str',
Michal Novotnyc72e7682013-04-08 18:21:02 +02002863 '*is-default': 'bool', 'cpu-max': 'int' } }
Anthony Liguori01d3c802012-08-10 11:04:11 -05002864
2865##
2866# @query-machines:
2867#
2868# Return a list of supported machines
2869#
2870# Returns: a list of MachineInfo
2871#
2872# Since: 1.2.0
2873##
2874{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
Anthony Liguorie4e31c62012-08-10 11:04:13 -05002875
2876##
2877# @CpuDefinitionInfo:
2878#
2879# Virtual CPU definition.
2880#
2881# @name: the name of the CPU definition
2882#
2883# Since: 1.2.0
2884##
2885{ 'type': 'CpuDefinitionInfo',
2886 'data': { 'name': 'str' } }
2887
2888##
2889# @query-cpu-definitions:
2890#
2891# Return a list of supported virtual CPU definitions
2892#
2893# Returns: a list of CpuDefInfo
2894#
2895# Since: 1.2.0
2896##
2897{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
Corey Bryantba1c0482012-08-14 16:43:43 -04002898
2899# @AddfdInfo:
2900#
2901# Information about a file descriptor that was added to an fd set.
2902#
2903# @fdset-id: The ID of the fd set that @fd was added to.
2904#
2905# @fd: The file descriptor that was received via SCM rights and
2906# added to the fd set.
2907#
2908# Since: 1.2.0
2909##
2910{ 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2911
2912##
2913# @add-fd:
2914#
2915# Add a file descriptor, that was passed via SCM rights, to an fd set.
2916#
2917# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2918#
2919# @opaque: #optional A free-form string that can be used to describe the fd.
2920#
2921# Returns: @AddfdInfo on success
2922# If file descriptor was not received, FdNotSupplied
Corey Bryant9ac54af2012-10-18 15:19:31 -04002923# If @fdset-id is a negative value, InvalidParameterValue
Corey Bryantba1c0482012-08-14 16:43:43 -04002924#
2925# Notes: The list of fd sets is shared by all monitor connections.
2926#
2927# If @fdset-id is not specified, a new fd set will be created.
2928#
2929# Since: 1.2.0
2930##
2931{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2932 'returns': 'AddfdInfo' }
2933
2934##
2935# @remove-fd:
2936#
2937# Remove a file descriptor from an fd set.
2938#
2939# @fdset-id: The ID of the fd set that the file descriptor belongs to.
2940#
2941# @fd: #optional The file descriptor that is to be removed.
2942#
2943# Returns: Nothing on success
2944# If @fdset-id or @fd is not found, FdNotFound
2945#
2946# Since: 1.2.0
2947#
2948# Notes: The list of fd sets is shared by all monitor connections.
2949#
2950# If @fd is not specified, all file descriptors in @fdset-id
2951# will be removed.
2952##
2953{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2954
2955##
2956# @FdsetFdInfo:
2957#
2958# Information about a file descriptor that belongs to an fd set.
2959#
2960# @fd: The file descriptor value.
2961#
2962# @opaque: #optional A free-form string that can be used to describe the fd.
2963#
2964# Since: 1.2.0
2965##
2966{ 'type': 'FdsetFdInfo',
2967 'data': {'fd': 'int', '*opaque': 'str'} }
2968
2969##
2970# @FdsetInfo:
2971#
2972# Information about an fd set.
2973#
2974# @fdset-id: The ID of the fd set.
2975#
2976# @fds: A list of file descriptors that belong to this fd set.
2977#
2978# Since: 1.2.0
2979##
2980{ 'type': 'FdsetInfo',
2981 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2982
2983##
2984# @query-fdsets:
2985#
2986# Return information describing all fd sets.
2987#
2988# Returns: A list of @FdsetInfo
2989#
2990# Since: 1.2.0
2991#
2992# Note: The list of fd sets is shared by all monitor connections.
2993#
2994##
2995{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
Daniel P. Berrange99afc912012-08-20 15:31:38 +01002996
2997##
2998# @TargetType
2999#
3000# Target CPU emulation type
3001#
3002# These parameters correspond to the softmmu binary CPU name that is currently
3003# running.
3004#
3005# Since: 1.2.0
3006##
3007{ 'enum': 'TargetType',
3008 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
Anthony Greend15a9c22013-03-18 15:49:25 -04003009 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'moxie',
3010 'or32', 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4',
3011 'sparc64', 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
Daniel P. Berrange99afc912012-08-20 15:31:38 +01003012
3013##
3014# @TargetInfo:
3015#
3016# Information describing the QEMU target.
3017#
3018# @arch: the target architecture (eg "x86_64", "i386", etc)
3019#
3020# Since: 1.2.0
3021##
3022{ 'type': 'TargetInfo',
3023 'data': { 'arch': 'TargetType' } }
3024
3025##
3026# @query-target:
3027#
3028# Return information about the target for this QEMU
3029#
3030# Returns: TargetInfo
3031#
3032# Since: 1.2.0
3033##
3034{ 'command': 'query-target', 'returns': 'TargetInfo' }
Amos Kong411656f2012-08-31 10:56:24 +08003035
3036##
3037# @QKeyCode:
3038#
3039# An enumeration of key name.
3040#
3041# This is used by the send-key command.
3042#
3043# Since: 1.3.0
3044##
3045{ 'enum': 'QKeyCode',
3046 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
3047 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
3048 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
3049 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
3050 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
3051 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
3052 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
3053 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
3054 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
3055 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
3056 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
3057 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
3058 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
3059 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
3060 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
Amos Konge4c8f002012-08-31 10:56:26 +08003061
3062##
Luiz Capitulino9f328972012-09-20 14:19:47 -03003063# @KeyValue
3064#
3065# Represents a keyboard key.
3066#
3067# Since: 1.3.0
3068##
3069{ 'union': 'KeyValue',
3070 'data': {
3071 'number': 'int',
3072 'qcode': 'QKeyCode' } }
3073
3074##
Amos Konge4c8f002012-08-31 10:56:26 +08003075# @send-key:
3076#
3077# Send keys to guest.
3078#
Luiz Capitulino9f328972012-09-20 14:19:47 -03003079# @keys: An array of @KeyValue elements. All @KeyValues in this array are
3080# simultaneously sent to the guest. A @KeyValue.number value is sent
3081# directly to the guest, while @KeyValue.qcode must be a valid
3082# @QKeyCode value
Amos Konge4c8f002012-08-31 10:56:26 +08003083#
3084# @hold-time: #optional time to delay key up events, milliseconds. Defaults
3085# to 100
3086#
3087# Returns: Nothing on success
3088# If key is unknown or redundant, InvalidParameter
3089#
3090# Since: 1.3.0
3091#
3092##
3093{ 'command': 'send-key',
Luiz Capitulino9f328972012-09-20 14:19:47 -03003094 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
Luiz Capitulinoad39cf62012-05-24 13:48:23 -03003095
3096##
3097# @screendump:
3098#
3099# Write a PPM of the VGA screen to a file.
3100#
3101# @filename: the path of a new PPM file to store the image
3102#
3103# Returns: Nothing on success
3104#
3105# Since: 0.14.0
3106##
3107{ 'command': 'screendump', 'data': {'filename': 'str'} }
Paolo Bonzini6dd844d2012-08-22 16:43:07 +02003108
3109##
3110# @nbd-server-start:
3111#
3112# Start an NBD server listening on the given host and port. Block
3113# devices can then be exported using @nbd-server-add. The NBD
3114# server will present them as named exports; for example, another
3115# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
3116#
3117# @addr: Address on which to listen.
3118#
3119# Returns: error if the server is already running.
3120#
3121# Since: 1.3.0
3122##
3123{ 'command': 'nbd-server-start',
3124 'data': { 'addr': 'SocketAddress' } }
3125
3126##
3127# @nbd-server-add:
3128#
3129# Export a device to QEMU's embedded NBD server.
3130#
3131# @device: Block device to be exported
3132#
3133# @writable: Whether clients should be able to write to the device via the
3134# NBD connection (default false). #optional
3135#
3136# Returns: error if the device is already marked for export.
3137#
3138# Since: 1.3.0
3139##
3140{ 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3141
3142##
3143# @nbd-server-stop:
3144#
3145# Stop QEMU's embedded NBD server, and unregister all devices previously
3146# added via @nbd-server-add.
3147#
3148# Since: 1.3.0
3149##
3150{ 'command': 'nbd-server-stop' }
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003151
3152##
Gerd Hoffmannffbdbe52012-12-19 13:13:57 +01003153# @ChardevFile:
3154#
3155# Configuration info for file chardevs.
3156#
3157# @in: #optional The name of the input file
3158# @out: The name of the output file
3159#
3160# Since: 1.4
3161##
3162{ 'type': 'ChardevFile', 'data': { '*in' : 'str',
3163 'out' : 'str' } }
3164
3165##
Markus Armbrusterd36b2b92013-02-13 15:54:16 +01003166# @ChardevHostdev:
Gerd Hoffmannd59044e2012-12-19 13:50:29 +01003167#
Gerd Hoffmann548cbb32013-02-25 11:50:55 +01003168# Configuration info for device and pipe chardevs.
Gerd Hoffmannd59044e2012-12-19 13:50:29 +01003169#
3170# @device: The name of the special file for the device,
3171# i.e. /dev/ttyS0 on Unix or COM1: on Windows
3172# @type: What kind of device this is.
3173#
3174# Since: 1.4
3175##
Markus Armbrusterd36b2b92013-02-13 15:54:16 +01003176{ 'type': 'ChardevHostdev', 'data': { 'device' : 'str' } }
Gerd Hoffmannd59044e2012-12-19 13:50:29 +01003177
3178##
Gerd Hoffmannf6bd5d62012-12-20 13:53:12 +01003179# @ChardevSocket:
3180#
Gerd Hoffmann3ecc0592013-02-27 14:10:47 +01003181# Configuration info for (stream) socket chardevs.
Gerd Hoffmannf6bd5d62012-12-20 13:53:12 +01003182#
3183# @addr: socket address to listen on (server=true)
3184# or connect to (server=false)
3185# @server: #optional create server socket (default: true)
3186# @wait: #optional wait for connect (not used for server
3187# sockets, default: false)
3188# @nodelay: #optional set TCP_NODELAY socket option (default: false)
3189# @telnet: #optional enable telnet protocol (default: false)
3190#
3191# Since: 1.4
3192##
3193{ 'type': 'ChardevSocket', 'data': { 'addr' : 'SocketAddress',
3194 '*server' : 'bool',
3195 '*wait' : 'bool',
3196 '*nodelay' : 'bool',
3197 '*telnet' : 'bool' } }
3198
3199##
Gerd Hoffmann3ecc0592013-02-27 14:10:47 +01003200# @ChardevDgram:
3201#
3202# Configuration info for datagram socket chardevs.
3203#
3204# @remote: remote address
3205# @local: #optional local address
3206#
3207# Since: 1.5
3208##
3209{ 'type': 'ChardevDgram', 'data': { 'remote' : 'SocketAddress',
3210 '*local' : 'SocketAddress' } }
3211
3212##
Gerd Hoffmannedb2fb32013-02-21 16:16:42 +01003213# @ChardevMux:
3214#
3215# Configuration info for mux chardevs.
3216#
3217# @chardev: name of the base chardev.
3218#
3219# Since: 1.5
3220##
3221{ 'type': 'ChardevMux', 'data': { 'chardev' : 'str' } }
3222
3223##
Gerd Hoffmann7c358032013-02-21 12:34:58 +01003224# @ChardevStdio:
3225#
3226# Configuration info for stdio chardevs.
3227#
3228# @signal: #optional Allow signals (such as SIGINT triggered by ^C)
3229# be delivered to qemu. Default: true in -nographic mode,
3230# false otherwise.
3231#
3232# Since: 1.5
3233##
3234{ 'type': 'ChardevStdio', 'data': { '*signal' : 'bool' } }
3235
3236##
Gerd Hoffmanncd153e22013-02-25 12:39:06 +01003237# @ChardevSpiceChannel:
3238#
3239# Configuration info for spice vm channel chardevs.
3240#
3241# @type: kind of channel (for example vdagent).
3242#
3243# Since: 1.5
3244##
3245{ 'type': 'ChardevSpiceChannel', 'data': { 'type' : 'str' } }
3246
3247##
3248# @ChardevSpicePort:
3249#
3250# Configuration info for spice port chardevs.
3251#
3252# @fqdn: name of the channel (see docs/spice-port-fqdn.txt)
3253#
3254# Since: 1.5
3255##
3256{ 'type': 'ChardevSpicePort', 'data': { 'fqdn' : 'str' } }
3257
3258##
Gerd Hoffmann702ec692013-02-25 15:52:32 +01003259# @ChardevVC:
3260#
3261# Configuration info for virtual console chardevs.
3262#
3263# @width: console width, in pixels
3264# @height: console height, in pixels
3265# @cols: console width, in chars
3266# @rows: console height, in chars
3267#
3268# Since: 1.5
3269##
3270{ 'type': 'ChardevVC', 'data': { '*width' : 'int',
3271 '*height' : 'int',
3272 '*cols' : 'int',
3273 '*rows' : 'int' } }
3274
3275##
Gerd Hoffmann1da48c62013-02-26 16:21:11 +01003276# @ChardevRingbuf:
3277#
3278# Configuration info for memory chardevs
3279#
3280# @size: #optional Ringbuffer size, must be power of two, default is 65536
3281#
3282# Since: 1.5
3283##
3284{ 'type': 'ChardevRingbuf', 'data': { '*size' : 'int' } }
3285
3286##
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003287# @ChardevBackend:
3288#
3289# Configuration info for the new chardev backend.
3290#
3291# Since: 1.4
3292##
3293{ 'type': 'ChardevDummy', 'data': { } }
3294
Gerd Hoffmannf6bd5d62012-12-20 13:53:12 +01003295{ 'union': 'ChardevBackend', 'data': { 'file' : 'ChardevFile',
Markus Armbrusterd36b2b92013-02-13 15:54:16 +01003296 'serial' : 'ChardevHostdev',
3297 'parallel': 'ChardevHostdev',
Gerd Hoffmann548cbb32013-02-25 11:50:55 +01003298 'pipe' : 'ChardevHostdev',
Gerd Hoffmannf6bd5d62012-12-20 13:53:12 +01003299 'socket' : 'ChardevSocket',
Gerd Hoffmann3ecc0592013-02-27 14:10:47 +01003300 'dgram' : 'ChardevDgram',
Gerd Hoffmann0a1a7fa2012-12-20 14:39:13 +01003301 'pty' : 'ChardevDummy',
Gerd Hoffmannedb2fb32013-02-21 16:16:42 +01003302 'null' : 'ChardevDummy',
Gerd Hoffmannf5a51ca2013-02-21 11:58:44 +01003303 'mux' : 'ChardevMux',
Gerd Hoffmann2d572862013-02-21 12:56:10 +01003304 'msmouse': 'ChardevDummy',
Gerd Hoffmann7c358032013-02-21 12:34:58 +01003305 'braille': 'ChardevDummy',
Gerd Hoffmannd9ac3742013-02-25 11:48:06 +01003306 'stdio' : 'ChardevStdio',
Gerd Hoffmanncd153e22013-02-25 12:39:06 +01003307 'console': 'ChardevDummy',
3308 'spicevmc' : 'ChardevSpiceChannel',
Gerd Hoffmann702ec692013-02-25 15:52:32 +01003309 'spiceport' : 'ChardevSpicePort',
Gerd Hoffmann1da48c62013-02-26 16:21:11 +01003310 'vc' : 'ChardevVC',
3311 'memory' : 'ChardevRingbuf' } }
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003312
3313##
3314# @ChardevReturn:
3315#
3316# Return info about the chardev backend just created.
3317#
Markus Armbruster58fa4322013-02-11 18:05:48 +01003318# @pty: #optional name of the slave pseudoterminal device, present if
3319# and only if a chardev of type 'pty' was created
3320#
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003321# Since: 1.4
3322##
Gerd Hoffmann0a1a7fa2012-12-20 14:39:13 +01003323{ 'type' : 'ChardevReturn', 'data': { '*pty' : 'str' } }
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003324
3325##
3326# @chardev-add:
3327#
Markus Armbruster58fa4322013-02-11 18:05:48 +01003328# Add a character device backend
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003329#
3330# @id: the chardev's ID, must be unique
3331# @backend: backend type and parameters
3332#
Markus Armbruster58fa4322013-02-11 18:05:48 +01003333# Returns: ChardevReturn.
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003334#
3335# Since: 1.4
3336##
3337{ 'command': 'chardev-add', 'data': {'id' : 'str',
3338 'backend' : 'ChardevBackend' },
3339 'returns': 'ChardevReturn' }
3340
3341##
3342# @chardev-remove:
3343#
Markus Armbruster58fa4322013-02-11 18:05:48 +01003344# Remove a character device backend
Gerd Hoffmannf1a1a352012-12-19 10:33:56 +01003345#
3346# @id: the chardev's ID, must exist and not be in use
3347#
3348# Returns: Nothing on success
3349#
3350# Since: 1.4
3351##
3352{ 'command': 'chardev-remove', 'data': {'id': 'str'} }
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003353
3354##
3355# @TpmModel:
3356#
3357# An enumeration of TPM models
3358#
3359# @tpm-tis: TPM TIS model
3360#
3361# Since: 1.5
3362##
3363{ 'enum': 'TpmModel', 'data': [ 'tpm-tis' ] }
3364
3365##
3366# @query-tpm-models:
3367#
3368# Return a list of supported TPM models
3369#
3370# Returns: a list of TpmModel
3371#
3372# Since: 1.5
3373##
3374{ 'command': 'query-tpm-models', 'returns': ['TpmModel'] }
3375
3376##
3377# @TpmType:
3378#
3379# An enumeration of TPM types
3380#
3381# @passthrough: TPM passthrough type
3382#
3383# Since: 1.5
3384##
3385{ 'enum': 'TpmType', 'data': [ 'passthrough' ] }
3386
3387##
3388# @query-tpm-types:
3389#
3390# Return a list of supported TPM types
3391#
3392# Returns: a list of TpmType
3393#
3394# Since: 1.5
3395##
3396{ 'command': 'query-tpm-types', 'returns': ['TpmType'] }
3397
3398##
3399# @TPMPassthroughOptions:
3400#
3401# Information about the TPM passthrough type
3402#
3403# @path: #optional string describing the path used for accessing the TPM device
3404#
3405# @cancel-path: #optional string showing the TPM's sysfs cancel file
3406# for cancellation of TPM commands while they are executing
3407#
3408# Since: 1.5
3409##
3410{ 'type': 'TPMPassthroughOptions', 'data': { '*path' : 'str',
3411 '*cancel-path' : 'str'} }
3412
3413##
3414# @TpmTypeOptions:
3415#
3416# A union referencing different TPM backend types' configuration options
3417#
Corey Bryant88ca7bc2013-03-20 12:34:48 -04003418# @passthrough: The configuration options for the TPM passthrough type
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003419#
3420# Since: 1.5
3421##
3422{ 'union': 'TpmTypeOptions',
Corey Bryant88ca7bc2013-03-20 12:34:48 -04003423 'data': { 'passthrough' : 'TPMPassthroughOptions' } }
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003424
3425##
3426# @TpmInfo:
3427#
3428# Information about the TPM
3429#
3430# @id: The Id of the TPM
3431#
3432# @model: The TPM frontend model
3433#
Corey Bryant88ca7bc2013-03-20 12:34:48 -04003434# @options: The TPM (backend) type configuration options
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003435#
3436# Since: 1.5
3437##
3438{ 'type': 'TPMInfo',
3439 'data': {'id': 'str',
3440 'model': 'TpmModel',
Corey Bryant88ca7bc2013-03-20 12:34:48 -04003441 'options': 'TpmTypeOptions' } }
Stefan Bergerd1a0cf72013-02-27 12:47:49 -05003442
3443##
3444# @query-tpm:
3445#
3446# Return information about the TPM device
3447#
3448# Returns: @TPMInfo on success
3449#
3450# Since: 1.5
3451##
3452{ 'command': 'query-tpm', 'returns': ['TPMInfo'] }
Laszlo Ersek8ccbad52013-03-21 00:23:16 +01003453
3454##
3455# @AcpiTableOptions
3456#
3457# Specify an ACPI table on the command line to load.
3458#
3459# At most one of @file and @data can be specified. The list of files specified
3460# by any one of them is loaded and concatenated in order. If both are omitted,
3461# @data is implied.
3462#
3463# Other fields / optargs can be used to override fields of the generic ACPI
3464# table header; refer to the ACPI specification 5.0, section 5.2.6 System
3465# Description Table Header. If a header field is not overridden, then the
3466# corresponding value from the concatenated blob is used (in case of @file), or
3467# it is filled in with a hard-coded value (in case of @data).
3468#
3469# String fields are copied into the matching ACPI member from lowest address
3470# upwards, and silently truncated / NUL-padded to length.
3471#
3472# @sig: #optional table signature / identifier (4 bytes)
3473#
3474# @rev: #optional table revision number (dependent on signature, 1 byte)
3475#
3476# @oem_id: #optional OEM identifier (6 bytes)
3477#
3478# @oem_table_id: #optional OEM table identifier (8 bytes)
3479#
3480# @oem_rev: #optional OEM-supplied revision number (4 bytes)
3481#
3482# @asl_compiler_id: #optional identifier of the utility that created the table
3483# (4 bytes)
3484#
3485# @asl_compiler_rev: #optional revision number of the utility that created the
3486# table (4 bytes)
3487#
3488# @file: #optional colon (:) separated list of pathnames to load and
3489# concatenate as table data. The resultant binary blob is expected to
3490# have an ACPI table header. At least one file is required. This field
3491# excludes @data.
3492#
3493# @data: #optional colon (:) separated list of pathnames to load and
3494# concatenate as table data. The resultant binary blob must not have an
3495# ACPI table header. At least one file is required. This field excludes
3496# @file.
3497#
3498# Since 1.5
3499##
3500{ 'type': 'AcpiTableOptions',
3501 'data': {
3502 '*sig': 'str',
3503 '*rev': 'uint8',
3504 '*oem_id': 'str',
3505 '*oem_table_id': 'str',
3506 '*oem_rev': 'uint32',
3507 '*asl_compiler_id': 'str',
3508 '*asl_compiler_rev': 'uint32',
3509 '*file': 'str',
3510 '*data': 'str' }}
Amos Kong1f8f9872013-04-25 17:50:35 +08003511
3512##
3513# @CommandLineParameterType:
3514#
3515# Possible types for an option parameter.
3516#
3517# @string: accepts a character string
3518#
3519# @boolean: accepts "on" or "off"
3520#
3521# @number: accepts a number
3522#
3523# @size: accepts a number followed by an optional suffix (K)ilo,
3524# (M)ega, (G)iga, (T)era
3525#
3526# Since 1.5
3527##
3528{ 'enum': 'CommandLineParameterType',
3529 'data': ['string', 'boolean', 'number', 'size'] }
3530
3531##
3532# @CommandLineParameterInfo:
3533#
3534# Details about a single parameter of a command line option.
3535#
3536# @name: parameter name
3537#
3538# @type: parameter @CommandLineParameterType
3539#
3540# @help: #optional human readable text string, not suitable for parsing.
3541#
3542# Since 1.5
3543##
3544{ 'type': 'CommandLineParameterInfo',
3545 'data': { 'name': 'str',
3546 'type': 'CommandLineParameterType',
3547 '*help': 'str' } }
3548
3549##
3550# @CommandLineOptionInfo:
3551#
3552# Details about a command line option, including its list of parameter details
3553#
3554# @option: option name
3555#
3556# @parameters: an array of @CommandLineParameterInfo
3557#
3558# Since 1.5
3559##
3560{ 'type': 'CommandLineOptionInfo',
3561 'data': { 'option': 'str', 'parameters': ['CommandLineParameterInfo'] } }
3562
3563##
3564# @query-command-line-options:
3565#
3566# Query command line option schema.
3567#
3568# @option: #optional option name
3569#
3570# Returns: list of @CommandLineOptionInfo for all options (or for the given
3571# @option). Returns an error if the given @option doesn't exist.
3572#
3573# Since 1.5
3574##
3575{'command': 'query-command-line-options', 'data': { '*option': 'str' },
3576 'returns': ['CommandLineOptionInfo'] }