]> git.proxmox.com Git - qemu.git/blame - qapi-schema.json
iscsi: add support for iSCSI NOPs [v2]
[qemu.git] / qapi-schema.json
CommitLineData
e3193601
AL
1# -*- Mode: Python -*-
2#
3# QAPI Schema
48a32bed 4
dcafd323
LC
5##
6# @ErrorClass
7#
8# QEMU error classes
9#
10# @GenericError: this is used for errors that don't require a specific error
11# class. This should be the default case for most errors
12#
13# @CommandNotFound: the requested command has not been found
14#
15# @DeviceEncrypted: the requested operation can't be fulfilled because the
16# selected device is encrypted
17#
18# @DeviceNotActive: a device has failed to be become active
19#
20# @DeviceNotFound: the requested device has not been found
21#
22# @KVMMissingCap: the requested operation can't be fulfilled because a
23# required KVM capability is missing
24#
dcafd323
LC
25# Since: 1.2
26##
27{ 'enum': 'ErrorClass',
28 'data': [ 'GenericError', 'CommandNotFound', 'DeviceEncrypted',
1e998146 29 'DeviceNotActive', 'DeviceNotFound', 'KVMMissingCap' ] }
dcafd323 30
b224e5e2
LC
31##
32# @add_client
33#
34# Allow client connections for VNC, Spice and socket based
35# character devices to be passed in to QEMU via SCM_RIGHTS.
36#
37# @protocol: protocol name. Valid names are "vnc", "spice" or the
38# name of a character device (eg. from -chardev id=XXXX)
39#
40# @fdname: file descriptor name previously passed via 'getfd' command
41#
42# @skipauth: #optional whether to skip authentication. Only applies
43# to "vnc" and "spice" protocols
44#
45# @tls: #optional whether to perform TLS. Only applies to the "spice"
46# protocol
47#
48# Returns: nothing on success.
49#
50# Since: 0.14.0
51##
52{ 'command': 'add_client',
53 'data': { 'protocol': 'str', 'fdname': 'str', '*skipauth': 'bool',
54 '*tls': 'bool' } }
55
48a32bed
AL
56##
57# @NameInfo:
58#
59# Guest name information.
60#
61# @name: #optional The name of the guest
62#
63# Since 0.14.0
64##
65{ 'type': 'NameInfo', 'data': {'*name': 'str'} }
66
67##
68# @query-name:
69#
70# Return the name information of a guest.
71#
72# Returns: @NameInfo of the guest
73#
74# Since 0.14.0
75##
76{ 'command': 'query-name', 'returns': 'NameInfo' }
b9c15f16
LC
77
78##
79# @VersionInfo:
80#
81# A description of QEMU's version.
82#
83# @qemu.major: The major version of QEMU
84#
85# @qemu.minor: The minor version of QEMU
86#
87# @qemu.micro: The micro version of QEMU. By current convention, a micro
88# version of 50 signifies a development branch. A micro version
89# greater than or equal to 90 signifies a release candidate for
90# the next minor version. A micro version of less than 50
91# signifies a stable release.
92#
93# @package: QEMU will always set this field to an empty string. Downstream
94# versions of QEMU should set this to a non-empty string. The
95# exact format depends on the downstream however it highly
96# recommended that a unique name is used.
97#
98# Since: 0.14.0
99##
100{ 'type': 'VersionInfo',
101 'data': {'qemu': {'major': 'int', 'minor': 'int', 'micro': 'int'},
102 'package': 'str'} }
103
104##
105# @query-version:
106#
107# Returns the current version of QEMU.
108#
109# Returns: A @VersionInfo object describing the current version of QEMU.
110#
111# Since: 0.14.0
112##
113{ 'command': 'query-version', 'returns': 'VersionInfo' }
292a2602
LC
114
115##
116# @KvmInfo:
117#
118# Information about support for KVM acceleration
119#
120# @enabled: true if KVM acceleration is active
121#
122# @present: true if KVM acceleration is built into this executable
123#
124# Since: 0.14.0
125##
126{ 'type': 'KvmInfo', 'data': {'enabled': 'bool', 'present': 'bool'} }
127
128##
129# @query-kvm:
130#
131# Returns information about KVM acceleration
132#
133# Returns: @KvmInfo
134#
135# Since: 0.14.0
136##
137{ 'command': 'query-kvm', 'returns': 'KvmInfo' }
138
1fa9a5e4
LC
139##
140# @RunState
141#
6932a69b 142# An enumeration of VM run states.
1fa9a5e4
LC
143#
144# @debug: QEMU is running on a debugger
145#
0a24c7b1
LC
146# @finish-migrate: guest is paused to finish the migration process
147#
1e998146
PB
148# @inmigrate: guest is paused waiting for an incoming migration. Note
149# that this state does not tell whether the machine will start at the
150# end of the migration. This depends on the command-line -S option and
151# any invocation of 'stop' or 'cont' that has happened since QEMU was
152# started.
1fa9a5e4
LC
153#
154# @internal-error: An internal error that prevents further guest execution
155# has occurred
156#
157# @io-error: the last IOP has failed and the device is configured to pause
158# on I/O errors
159#
160# @paused: guest has been paused via the 'stop' command
161#
162# @postmigrate: guest is paused following a successful 'migrate'
163#
164# @prelaunch: QEMU was started with -S and guest has not started
165#
1fa9a5e4
LC
166# @restore-vm: guest is paused to restore VM state
167#
168# @running: guest is actively running
169#
170# @save-vm: guest is paused to save the VM state
171#
172# @shutdown: guest is shut down (and -no-shutdown is in use)
173#
ad02b96a
LC
174# @suspended: guest is suspended (ACPI S3)
175#
1fa9a5e4
LC
176# @watchdog: the watchdog action is configured to pause and has been triggered
177##
178{ 'enum': 'RunState',
179 'data': [ 'debug', 'inmigrate', 'internal-error', 'io-error', 'paused',
180 'postmigrate', 'prelaunch', 'finish-migrate', 'restore-vm',
ad02b96a 181 'running', 'save-vm', 'shutdown', 'suspended', 'watchdog' ] }
1fa9a5e4 182
c249ee68
BC
183##
184# @SnapshotInfo
185#
186# @id: unique snapshot id
187#
188# @name: user chosen name
189#
190# @vm-state-size: size of the VM state
191#
192# @date-sec: UTC date of the snapshot in seconds
193#
194# @date-nsec: fractional part in nano seconds to be used with date-sec
195#
196# @vm-clock-sec: VM clock relative to boot in seconds
197#
198# @vm-clock-nsec: fractional part in nano seconds to be used with vm-clock-sec
199#
200# Since: 1.3
201#
202##
203
204{ 'type': 'SnapshotInfo',
205 'data': { 'id': 'str', 'name': 'str', 'vm-state-size': 'int',
206 'date-sec': 'int', 'date-nsec': 'int',
207 'vm-clock-sec': 'int', 'vm-clock-nsec': 'int' } }
208
209##
210# @ImageInfo:
211#
212# Information about a QEMU image file
213#
214# @filename: name of the image file
215#
216# @format: format of the image file
217#
218# @virtual-size: maximum capacity in bytes of the image
219#
220# @actual-size: #optional actual size on disk in bytes of the image
221#
222# @dirty-flag: #optional true if image is not cleanly closed
223#
224# @cluster-size: #optional size of a cluster in bytes
225#
226# @encrypted: #optional true if the image is encrypted
227#
228# @backing-filename: #optional name of the backing file
229#
230# @full-backing-filename: #optional full path of the backing file
231#
232# @backing-filename-format: #optional the format of the backing file
233#
234# @snapshots: #optional list of VM snapshots
235#
236# Since: 1.3
237#
238##
239
240{ 'type': 'ImageInfo',
241 'data': {'filename': 'str', 'format': 'str', '*dirty-flag': 'bool',
242 '*actual-size': 'int', 'virtual-size': 'int',
243 '*cluster-size': 'int', '*encrypted': 'bool',
244 '*backing-filename': 'str', '*full-backing-filename': 'str',
245 '*backing-filename-format': 'str', '*snapshots': ['SnapshotInfo'] } }
246
1fa9a5e4
LC
247##
248# @StatusInfo:
249#
250# Information about VCPU run state
251#
252# @running: true if all VCPUs are runnable, false if not runnable
253#
254# @singlestep: true if VCPUs are in single-step mode
255#
256# @status: the virtual machine @RunState
257#
258# Since: 0.14.0
259#
260# Notes: @singlestep is enabled through the GDB stub
261##
262{ 'type': 'StatusInfo',
263 'data': {'running': 'bool', 'singlestep': 'bool', 'status': 'RunState'} }
264
265##
266# @query-status:
267#
268# Query the run status of all VCPUs
269#
270# Returns: @StatusInfo reflecting all VCPUs
271#
272# Since: 0.14.0
273##
274{ 'command': 'query-status', 'returns': 'StatusInfo' }
275
efab767e
LC
276##
277# @UuidInfo:
278#
279# Guest UUID information.
280#
281# @UUID: the UUID of the guest
282#
283# Since: 0.14.0
284#
285# Notes: If no UUID was specified for the guest, a null UUID is returned.
286##
287{ 'type': 'UuidInfo', 'data': {'UUID': 'str'} }
288
289##
290# @query-uuid:
291#
292# Query the guest UUID information.
293#
294# Returns: The @UuidInfo for the guest
295#
296# Since 0.14.0
297##
298{ 'command': 'query-uuid', 'returns': 'UuidInfo' }
299
c5a415a0
LC
300##
301# @ChardevInfo:
302#
303# Information about a character device.
304#
305# @label: the label of the character device
306#
307# @filename: the filename of the character device
308#
309# Notes: @filename is encoded using the QEMU command line character device
310# encoding. See the QEMU man page for details.
311#
312# Since: 0.14.0
313##
314{ 'type': 'ChardevInfo', 'data': {'label': 'str', 'filename': 'str'} }
315
316##
317# @query-chardev:
318#
319# Returns information about current character devices.
320#
321# Returns: a list of @ChardevInfo
322#
323# Since: 0.14.0
324##
325{ 'command': 'query-chardev', 'returns': ['ChardevInfo'] }
aa9b79bc
LC
326
327##
328# @CommandInfo:
329#
330# Information about a QMP command
331#
332# @name: The command name
333#
334# Since: 0.14.0
335##
336{ 'type': 'CommandInfo', 'data': {'name': 'str'} }
337
338##
339# @query-commands:
340#
341# Return a list of supported QMP commands by this server
342#
343# Returns: A list of @CommandInfo for all supported commands
344#
345# Since: 0.14.0
346##
347{ 'command': 'query-commands', 'returns': ['CommandInfo'] }
348
4860853d
DB
349##
350# @EventInfo:
351#
352# Information about a QMP event
353#
354# @name: The event name
355#
356# Since: 1.2.0
357##
358{ 'type': 'EventInfo', 'data': {'name': 'str'} }
359
360##
361# @query-events:
362#
363# Return a list of supported QMP events by this server
364#
365# Returns: A list of @EventInfo for all supported events
366#
367# Since: 1.2.0
368##
369{ 'command': 'query-events', 'returns': ['EventInfo'] }
370
791e7c82
LC
371##
372# @MigrationStats
373#
374# Detailed migration status.
375#
376# @transferred: amount of bytes already transferred to the target VM
377#
378# @remaining: amount of bytes remaining to be transferred to the target VM
379#
380# @total: total amount of bytes involved in the migration process
381#
004d4c10
OW
382# @duplicate: number of duplicate pages (since 1.2)
383#
384# @normal : number of normal pages (since 1.2)
385#
8d017193
JQ
386# @normal-bytes: number of normal bytes sent (since 1.2)
387#
388# @dirty-pages-rate: number of pages dirtied by second by the
389# guest (since 1.3)
004d4c10
OW
390#
391# Since: 0.14.0
791e7c82
LC
392##
393{ 'type': 'MigrationStats',
d5f8a570 394 'data': {'transferred': 'int', 'remaining': 'int', 'total': 'int' ,
8d017193
JQ
395 'duplicate': 'int', 'normal': 'int', 'normal-bytes': 'int',
396 'dirty-pages-rate' : 'int' } }
791e7c82 397
f36d55af
OW
398##
399# @XBZRLECacheStats
400#
401# Detailed XBZRLE migration cache statistics
402#
403# @cache-size: XBZRLE cache size
404#
405# @bytes: amount of bytes already transferred to the target VM
406#
407# @pages: amount of pages transferred to the target VM
408#
409# @cache-miss: number of cache miss
410#
411# @overflow: number of overflows
412#
413# Since: 1.2
414##
415{ 'type': 'XBZRLECacheStats',
416 'data': {'cache-size': 'int', 'bytes': 'int', 'pages': 'int',
417 'cache-miss': 'int', 'overflow': 'int' } }
418
791e7c82
LC
419##
420# @MigrationInfo
421#
422# Information about current migration process.
423#
424# @status: #optional string describing the current migration status.
425# As of 0.14.0 this can be 'active', 'completed', 'failed' or
426# 'cancelled'. If this field is not returned, no migration process
427# has been initiated
428#
d5f8a570
JQ
429# @ram: #optional @MigrationStats containing detailed migration
430# status, only returned if status is 'active' or
431# 'completed'. 'comppleted' (since 1.2)
791e7c82
LC
432#
433# @disk: #optional @MigrationStats containing detailed disk migration
434# status, only returned if status is 'active' and it is a block
435# migration
436#
f36d55af
OW
437# @xbzrle-cache: #optional @XBZRLECacheStats containing detailed XBZRLE
438# migration statistics, only returned if XBZRLE feature is on and
439# status is 'active' or 'completed' (since 1.2)
440#
7aa939af
JQ
441# @total-time: #optional total amount of milliseconds since migration started.
442# If migration has ended, it returns the total migration
443# time. (since 1.2)
444#
9c5a9fcf
JQ
445# @downtime: #optional only present when migration finishes correctly
446# total downtime in milliseconds for the guest.
447# (since 1.3)
448#
2c52ddf1
JQ
449# @expected-downtime: #optional only present while migration is active
450# expected downtime in milliseconds for the guest in last walk
451# of the dirty bitmap. (since 1.3)
452#
791e7c82
LC
453# Since: 0.14.0
454##
455{ 'type': 'MigrationInfo',
456 'data': {'*status': 'str', '*ram': 'MigrationStats',
f36d55af 457 '*disk': 'MigrationStats',
7aa939af 458 '*xbzrle-cache': 'XBZRLECacheStats',
9c5a9fcf 459 '*total-time': 'int',
2c52ddf1 460 '*expected-downtime': 'int',
9c5a9fcf 461 '*downtime': 'int'} }
791e7c82
LC
462
463##
464# @query-migrate
465#
466# Returns information about current migration process.
467#
468# Returns: @MigrationInfo
469#
470# Since: 0.14.0
471##
472{ 'command': 'query-migrate', 'returns': 'MigrationInfo' }
473
bbf6da32
OW
474##
475# @MigrationCapability
476#
477# Migration capabilities enumeration
478#
479# @xbzrle: Migration supports xbzrle (Xor Based Zero Run Length Encoding).
480# This feature allows us to minimize migration traffic for certain work
481# loads, by sending compressed difference of the pages
482#
483# Since: 1.2
484##
485{ 'enum': 'MigrationCapability',
486 'data': ['xbzrle'] }
487
488##
489# @MigrationCapabilityStatus
490#
491# Migration capability information
492#
493# @capability: capability enum
494#
495# @state: capability state bool
496#
497# Since: 1.2
498##
499{ 'type': 'MigrationCapabilityStatus',
500 'data': { 'capability' : 'MigrationCapability', 'state' : 'bool' } }
501
502##
00458433
OW
503# @migrate-set-capabilities
504#
505# Enable/Disable the following migration capabilities (like xbzrle)
506#
507# @capabilities: json array of capability modifications to make
508#
509# Since: 1.2
510##
511{ 'command': 'migrate-set-capabilities',
512 'data': { 'capabilities': ['MigrationCapabilityStatus'] } }
513
514##
bbf6da32
OW
515# @query-migrate-capabilities
516#
517# Returns information about the current migration capabilities status
518#
519# Returns: @MigrationCapabilitiesStatus
520#
521# Since: 1.2
522##
523{ 'command': 'query-migrate-capabilities', 'returns': ['MigrationCapabilityStatus']}
524
e235cec3
LC
525##
526# @MouseInfo:
527#
528# Information about a mouse device.
529#
530# @name: the name of the mouse device
531#
532# @index: the index of the mouse device
533#
534# @current: true if this device is currently receiving mouse events
535#
536# @absolute: true if this device supports absolute coordinates as input
537#
538# Since: 0.14.0
539##
540{ 'type': 'MouseInfo',
541 'data': {'name': 'str', 'index': 'int', 'current': 'bool',
542 'absolute': 'bool'} }
543
544##
545# @query-mice:
546#
547# Returns information about each active mouse device
548#
549# Returns: a list of @MouseInfo for each device
550#
551# Since: 0.14.0
552##
553{ 'command': 'query-mice', 'returns': ['MouseInfo'] }
554
de0b36b6
LC
555##
556# @CpuInfo:
557#
558# Information about a virtual CPU
559#
560# @CPU: the index of the virtual CPU
561#
562# @current: this only exists for backwards compatible and should be ignored
b80e560b 563#
de0b36b6
LC
564# @halted: true if the virtual CPU is in the halt state. Halt usually refers
565# to a processor specific low power mode.
566#
567# @pc: #optional If the target is i386 or x86_64, this is the 64-bit instruction
568# pointer.
569# If the target is Sparc, this is the PC component of the
570# instruction pointer.
571#
572# @nip: #optional If the target is PPC, the instruction pointer
573#
574# @npc: #optional If the target is Sparc, the NPC component of the instruction
575# pointer
576#
577# @PC: #optional If the target is MIPS, the instruction pointer
578#
579# @thread_id: ID of the underlying host thread
580#
581# Since: 0.14.0
582#
583# Notes: @halted is a transient state that changes frequently. By the time the
584# data is sent to the client, the guest may no longer be halted.
585##
586{ 'type': 'CpuInfo',
587 'data': {'CPU': 'int', 'current': 'bool', 'halted': 'bool', '*pc': 'int',
588 '*nip': 'int', '*npc': 'int', '*PC': 'int', 'thread_id': 'int'} }
589
590##
591# @query-cpus:
592#
593# Returns a list of information about each virtual CPU.
594#
595# Returns: a list of @CpuInfo for each virtual CPU
596#
597# Since: 0.14.0
598##
599{ 'command': 'query-cpus', 'returns': ['CpuInfo'] }
600
b2023818
LC
601##
602# @BlockDeviceInfo:
603#
604# Information about the backing device for a block device.
605#
606# @file: the filename of the backing device
607#
608# @ro: true if the backing device was open read-only
609#
610# @drv: the name of the block format used to open the backing device. As of
611# 0.14.0 this can be: 'blkdebug', 'bochs', 'cloop', 'cow', 'dmg',
612# 'file', 'file', 'ftp', 'ftps', 'host_cdrom', 'host_device',
613# 'host_floppy', 'http', 'https', 'nbd', 'parallels', 'qcow',
614# 'qcow2', 'raw', 'tftp', 'vdi', 'vmdk', 'vpc', 'vvfat'
615#
616# @backing_file: #optional the name of the backing file (for copy-on-write)
617#
2e3e3317
BC
618# @backing_file_depth: number of files in the backing file chain (since: 1.2)
619#
b2023818
LC
620# @encrypted: true if the backing device is encrypted
621#
c75a1a8a
LC
622# @encryption_key_missing: true if the backing device is encrypted but an
623# valid encryption key is missing
624#
727f005e
ZYW
625# @bps: total throughput limit in bytes per second is specified
626#
627# @bps_rd: read throughput limit in bytes per second is specified
628#
629# @bps_wr: write throughput limit in bytes per second is specified
630#
631# @iops: total I/O operations per second is specified
632#
633# @iops_rd: read I/O operations per second is specified
634#
635# @iops_wr: write I/O operations per second is specified
636#
b2023818
LC
637# Since: 0.14.0
638#
639# Notes: This interface is only found in @BlockInfo.
640##
641{ 'type': 'BlockDeviceInfo',
642 'data': { 'file': 'str', 'ro': 'bool', 'drv': 'str',
2e3e3317 643 '*backing_file': 'str', 'backing_file_depth': 'int',
c75a1a8a
LC
644 'encrypted': 'bool', 'encryption_key_missing': 'bool',
645 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
646 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int'} }
b2023818
LC
647
648##
649# @BlockDeviceIoStatus:
650#
651# An enumeration of block device I/O status.
652#
653# @ok: The last I/O operation has succeeded
654#
655# @failed: The last I/O operation has failed
656#
657# @nospace: The last I/O operation has failed due to a no-space condition
658#
659# Since: 1.0
660##
661{ 'enum': 'BlockDeviceIoStatus', 'data': [ 'ok', 'failed', 'nospace' ] }
662
b9a9b3a4
PB
663##
664# @BlockDirtyInfo:
665#
666# Block dirty bitmap information.
667#
668# @count: number of dirty bytes according to the dirty bitmap
669#
670# Since: 1.3
671##
672{ 'type': 'BlockDirtyInfo',
673 'data': {'count': 'int'} }
674
b2023818
LC
675##
676# @BlockInfo:
677#
678# Block device information. This structure describes a virtual device and
679# the backing device associated with it.
680#
681# @device: The device name associated with the virtual device.
682#
683# @type: This field is returned only for compatibility reasons, it should
684# not be used (always returns 'unknown')
685#
686# @removable: True if the device supports removable media.
687#
688# @locked: True if the guest has locked this device from having its media
689# removed
690#
691# @tray_open: #optional True if the device has a tray and it is open
692# (only present if removable is true)
693#
b9a9b3a4
PB
694# @dirty: #optional dirty bitmap information (only present if the dirty
695# bitmap is enabled)
696#
b2023818
LC
697# @io-status: #optional @BlockDeviceIoStatus. Only present if the device
698# supports it and the VM is configured to stop on errors
699#
700# @inserted: #optional @BlockDeviceInfo describing the device if media is
701# present
702#
703# Since: 0.14.0
704##
705{ 'type': 'BlockInfo',
706 'data': {'device': 'str', 'type': 'str', 'removable': 'bool',
707 'locked': 'bool', '*inserted': 'BlockDeviceInfo',
b9a9b3a4
PB
708 '*tray_open': 'bool', '*io-status': 'BlockDeviceIoStatus',
709 '*dirty': 'BlockDirtyInfo' } }
b2023818
LC
710
711##
712# @query-block:
713#
714# Get a list of BlockInfo for all virtual block devices.
715#
716# Returns: a list of @BlockInfo describing each virtual block device
717#
718# Since: 0.14.0
719##
720{ 'command': 'query-block', 'returns': ['BlockInfo'] }
721
f11f57e4
LC
722##
723# @BlockDeviceStats:
724#
725# Statistics of a virtual block device or a block backing device.
726#
727# @rd_bytes: The number of bytes read by the device.
728#
729# @wr_bytes: The number of bytes written by the device.
730#
731# @rd_operations: The number of read operations performed by the device.
732#
733# @wr_operations: The number of write operations performed by the device.
734#
735# @flush_operations: The number of cache flush operations performed by the
736# device (since 0.15.0)
737#
738# @flush_total_time_ns: Total time spend on cache flushes in nano-seconds
739# (since 0.15.0).
740#
741# @wr_total_time_ns: Total time spend on writes in nano-seconds (since 0.15.0).
742#
743# @rd_total_time_ns: Total_time_spend on reads in nano-seconds (since 0.15.0).
744#
745# @wr_highest_offset: The offset after the greatest byte written to the
746# device. The intended use of this information is for
747# growable sparse files (like qcow2) that are used on top
748# of a physical device.
749#
750# Since: 0.14.0
751##
752{ 'type': 'BlockDeviceStats',
753 'data': {'rd_bytes': 'int', 'wr_bytes': 'int', 'rd_operations': 'int',
754 'wr_operations': 'int', 'flush_operations': 'int',
755 'flush_total_time_ns': 'int', 'wr_total_time_ns': 'int',
756 'rd_total_time_ns': 'int', 'wr_highest_offset': 'int' } }
757
758##
759# @BlockStats:
760#
761# Statistics of a virtual block device or a block backing device.
762#
763# @device: #optional If the stats are for a virtual block device, the name
764# corresponding to the virtual block device.
765#
766# @stats: A @BlockDeviceStats for the device.
767#
768# @parent: #optional This may point to the backing block device if this is a
769# a virtual block device. If it's a backing block, this will point
770# to the backing file is one is present.
771#
772# Since: 0.14.0
773##
774{ 'type': 'BlockStats',
775 'data': {'*device': 'str', 'stats': 'BlockDeviceStats',
776 '*parent': 'BlockStats'} }
777
778##
779# @query-blockstats:
780#
781# Query the @BlockStats for all virtual block devices.
782#
783# Returns: A list of @BlockStats for each virtual block devices.
784#
785# Since: 0.14.0
786##
787{ 'command': 'query-blockstats', 'returns': ['BlockStats'] }
788
2b54aa87
LC
789##
790# @VncClientInfo:
791#
792# Information about a connected VNC client.
793#
794# @host: The host name of the client. QEMU tries to resolve this to a DNS name
795# when possible.
796#
797# @family: 'ipv6' if the client is connected via IPv6 and TCP
798# 'ipv4' if the client is connected via IPv4 and TCP
799# 'unix' if the client is connected via a unix domain socket
800# 'unknown' otherwise
801#
802# @service: The service name of the client's port. This may depends on the
803# host system's service database so symbolic names should not be
804# relied on.
805#
806# @x509_dname: #optional If x509 authentication is in use, the Distinguished
807# Name of the client.
808#
809# @sasl_username: #optional If SASL authentication is in use, the SASL username
810# used for authentication.
811#
812# Since: 0.14.0
813##
814{ 'type': 'VncClientInfo',
815 'data': {'host': 'str', 'family': 'str', 'service': 'str',
816 '*x509_dname': 'str', '*sasl_username': 'str'} }
817
818##
819# @VncInfo:
820#
821# Information about the VNC session.
822#
823# @enabled: true if the VNC server is enabled, false otherwise
824#
825# @host: #optional The hostname the VNC server is bound to. This depends on
826# the name resolution on the host and may be an IP address.
827#
828# @family: #optional 'ipv6' if the host is listening for IPv6 connections
829# 'ipv4' if the host is listening for IPv4 connections
830# 'unix' if the host is listening on a unix domain socket
831# 'unknown' otherwise
832#
833# @service: #optional The service name of the server's port. This may depends
834# on the host system's service database so symbolic names should not
835# be relied on.
836#
837# @auth: #optional the current authentication type used by the server
838# 'none' if no authentication is being used
839# 'vnc' if VNC authentication is being used
840# 'vencrypt+plain' if VEncrypt is used with plain text authentication
841# 'vencrypt+tls+none' if VEncrypt is used with TLS and no authentication
842# 'vencrypt+tls+vnc' if VEncrypt is used with TLS and VNC authentication
843# 'vencrypt+tls+plain' if VEncrypt is used with TLS and plain text auth
844# 'vencrypt+x509+none' if VEncrypt is used with x509 and no auth
845# 'vencrypt+x509+vnc' if VEncrypt is used with x509 and VNC auth
846# 'vencrypt+x509+plain' if VEncrypt is used with x509 and plain text auth
847# 'vencrypt+tls+sasl' if VEncrypt is used with TLS and SASL auth
848# 'vencrypt+x509+sasl' if VEncrypt is used with x509 and SASL auth
849#
850# @clients: a list of @VncClientInfo of all currently connected clients
851#
852# Since: 0.14.0
853##
854{ 'type': 'VncInfo',
855 'data': {'enabled': 'bool', '*host': 'str', '*family': 'str',
856 '*service': 'str', '*auth': 'str', '*clients': ['VncClientInfo']} }
857
858##
859# @query-vnc:
860#
861# Returns information about the current VNC server
862#
863# Returns: @VncInfo
2b54aa87
LC
864#
865# Since: 0.14.0
866##
867{ 'command': 'query-vnc', 'returns': 'VncInfo' }
868
d1f29646
LC
869##
870# @SpiceChannel
871#
872# Information about a SPICE client channel.
873#
874# @host: The host name of the client. QEMU tries to resolve this to a DNS name
875# when possible.
876#
877# @family: 'ipv6' if the client is connected via IPv6 and TCP
878# 'ipv4' if the client is connected via IPv4 and TCP
879# 'unix' if the client is connected via a unix domain socket
880# 'unknown' otherwise
881#
882# @port: The client's port number.
883#
884# @connection-id: SPICE connection id number. All channels with the same id
885# belong to the same SPICE session.
886#
419e1bdf
AL
887# @connection-type: SPICE channel type number. "1" is the main control
888# channel, filter for this one if you want to track spice
889# sessions only
d1f29646 890#
419e1bdf
AL
891# @channel-id: SPICE channel ID number. Usually "0", might be different when
892# multiple channels of the same type exist, such as multiple
d1f29646
LC
893# display channels in a multihead setup
894#
895# @tls: true if the channel is encrypted, false otherwise.
896#
897# Since: 0.14.0
898##
899{ 'type': 'SpiceChannel',
900 'data': {'host': 'str', 'family': 'str', 'port': 'str',
901 'connection-id': 'int', 'channel-type': 'int', 'channel-id': 'int',
902 'tls': 'bool'} }
903
4efee029
AL
904##
905# @SpiceQueryMouseMode
906#
6932a69b 907# An enumeration of Spice mouse states.
4efee029
AL
908#
909# @client: Mouse cursor position is determined by the client.
910#
911# @server: Mouse cursor position is determined by the server.
912#
913# @unknown: No information is available about mouse mode used by
914# the spice server.
915#
916# Note: spice/enums.h has a SpiceMouseMode already, hence the name.
917#
918# Since: 1.1
919##
920{ 'enum': 'SpiceQueryMouseMode',
921 'data': [ 'client', 'server', 'unknown' ] }
922
d1f29646
LC
923##
924# @SpiceInfo
925#
926# Information about the SPICE session.
b80e560b 927#
d1f29646
LC
928# @enabled: true if the SPICE server is enabled, false otherwise
929#
61c4efe2
YH
930# @migrated: true if the last guest migration completed and spice
931# migration had completed as well. false otherwise.
932#
d1f29646
LC
933# @host: #optional The hostname the SPICE server is bound to. This depends on
934# the name resolution on the host and may be an IP address.
935#
936# @port: #optional The SPICE server's port number.
937#
938# @compiled-version: #optional SPICE server version.
939#
940# @tls-port: #optional The SPICE server's TLS port number.
941#
942# @auth: #optional the current authentication type used by the server
419e1bdf
AL
943# 'none' if no authentication is being used
944# 'spice' uses SASL or direct TLS authentication, depending on command
945# line options
d1f29646 946#
4efee029
AL
947# @mouse-mode: The mode in which the mouse cursor is displayed currently. Can
948# be determined by the client or the server, or unknown if spice
949# server doesn't provide this information.
950#
951# Since: 1.1
952#
d1f29646
LC
953# @channels: a list of @SpiceChannel for each active spice channel
954#
955# Since: 0.14.0
956##
957{ 'type': 'SpiceInfo',
61c4efe2 958 'data': {'enabled': 'bool', 'migrated': 'bool', '*host': 'str', '*port': 'int',
d1f29646 959 '*tls-port': 'int', '*auth': 'str', '*compiled-version': 'str',
4efee029 960 'mouse-mode': 'SpiceQueryMouseMode', '*channels': ['SpiceChannel']} }
d1f29646
LC
961
962##
963# @query-spice
964#
965# Returns information about the current SPICE server
966#
967# Returns: @SpiceInfo
968#
969# Since: 0.14.0
970##
971{ 'command': 'query-spice', 'returns': 'SpiceInfo' }
972
96637bcd
LC
973##
974# @BalloonInfo:
975#
976# Information about the guest balloon device.
977#
978# @actual: the number of bytes the balloon currently contains
979#
980# @mem_swapped_in: #optional number of pages swapped in within the guest
981#
982# @mem_swapped_out: #optional number of pages swapped out within the guest
983#
984# @major_page_faults: #optional number of major page faults within the guest
985#
986# @minor_page_faults: #optional number of minor page faults within the guest
987#
988# @free_mem: #optional amount of memory (in bytes) free in the guest
989#
990# @total_mem: #optional amount of memory (in bytes) visible to the guest
991#
992# Since: 0.14.0
993#
994# Notes: all current versions of QEMU do not fill out optional information in
995# this structure.
996##
997{ 'type': 'BalloonInfo',
998 'data': {'actual': 'int', '*mem_swapped_in': 'int',
999 '*mem_swapped_out': 'int', '*major_page_faults': 'int',
1000 '*minor_page_faults': 'int', '*free_mem': 'int',
1001 '*total_mem': 'int'} }
1002
1003##
1004# @query-balloon:
1005#
1006# Return information about the balloon device.
1007#
1008# Returns: @BalloonInfo on success
1009# If the balloon driver is enabled but not functional because the KVM
1010# kernel module cannot support it, KvmMissingCap
1011# If no balloon device is present, DeviceNotActive
1012#
1013# Since: 0.14.0
1014##
1015{ 'command': 'query-balloon', 'returns': 'BalloonInfo' }
1016
79627472
LC
1017##
1018# @PciMemoryRange:
1019#
1020# A PCI device memory region
1021#
1022# @base: the starting address (guest physical)
1023#
1024# @limit: the ending address (guest physical)
1025#
1026# Since: 0.14.0
1027##
1028{ 'type': 'PciMemoryRange', 'data': {'base': 'int', 'limit': 'int'} }
1029
1030##
1031# @PciMemoryRegion
1032#
1033# Information about a PCI device I/O region.
1034#
1035# @bar: the index of the Base Address Register for this region
1036#
1037# @type: 'io' if the region is a PIO region
1038# 'memory' if the region is a MMIO region
1039#
1040# @prefetch: #optional if @type is 'memory', true if the memory is prefetchable
1041#
1042# @mem_type_64: #optional if @type is 'memory', true if the BAR is 64-bit
1043#
1044# Since: 0.14.0
1045##
1046{ 'type': 'PciMemoryRegion',
1047 'data': {'bar': 'int', 'type': 'str', 'address': 'int', 'size': 'int',
1048 '*prefetch': 'bool', '*mem_type_64': 'bool' } }
1049
1050##
1051# @PciBridgeInfo:
1052#
1053# Information about a PCI Bridge device
1054#
1055# @bus.number: primary bus interface number. This should be the number of the
1056# bus the device resides on.
1057#
1058# @bus.secondary: secondary bus interface number. This is the number of the
1059# main bus for the bridge
1060#
1061# @bus.subordinate: This is the highest number bus that resides below the
1062# bridge.
1063#
1064# @bus.io_range: The PIO range for all devices on this bridge
1065#
1066# @bus.memory_range: The MMIO range for all devices on this bridge
1067#
1068# @bus.prefetchable_range: The range of prefetchable MMIO for all devices on
1069# this bridge
1070#
1071# @devices: a list of @PciDeviceInfo for each device on this bridge
1072#
1073# Since: 0.14.0
1074##
1075{ 'type': 'PciBridgeInfo',
1076 'data': {'bus': { 'number': 'int', 'secondary': 'int', 'subordinate': 'int',
1077 'io_range': 'PciMemoryRange',
1078 'memory_range': 'PciMemoryRange',
1079 'prefetchable_range': 'PciMemoryRange' },
1080 '*devices': ['PciDeviceInfo']} }
1081
1082##
1083# @PciDeviceInfo:
1084#
1085# Information about a PCI device
1086#
1087# @bus: the bus number of the device
1088#
1089# @slot: the slot the device is located in
1090#
1091# @function: the function of the slot used by the device
1092#
1093# @class_info.desc: #optional a string description of the device's class
1094#
1095# @class_info.class: the class code of the device
1096#
1097# @id.device: the PCI device id
1098#
1099# @id.vendor: the PCI vendor id
1100#
1101# @irq: #optional if an IRQ is assigned to the device, the IRQ number
1102#
1103# @qdev_id: the device name of the PCI device
1104#
1105# @pci_bridge: if the device is a PCI bridge, the bridge information
1106#
1107# @regions: a list of the PCI I/O regions associated with the device
1108#
1109# Notes: the contents of @class_info.desc are not stable and should only be
1110# treated as informational.
1111#
1112# Since: 0.14.0
1113##
1114{ 'type': 'PciDeviceInfo',
1115 'data': {'bus': 'int', 'slot': 'int', 'function': 'int',
1116 'class_info': {'*desc': 'str', 'class': 'int'},
1117 'id': {'device': 'int', 'vendor': 'int'},
1118 '*irq': 'int', 'qdev_id': 'str', '*pci_bridge': 'PciBridgeInfo',
1119 'regions': ['PciMemoryRegion']} }
1120
1121##
1122# @PciInfo:
1123#
1124# Information about a PCI bus
1125#
1126# @bus: the bus index
1127#
1128# @devices: a list of devices on this bus
1129#
1130# Since: 0.14.0
1131##
1132{ 'type': 'PciInfo', 'data': {'bus': 'int', 'devices': ['PciDeviceInfo']} }
1133
1134##
1135# @query-pci:
1136#
1137# Return information about the PCI bus topology of the guest.
1138#
1139# Returns: a list of @PciInfo for each PCI bus
1140#
1141# Since: 0.14.0
1142##
1143{ 'command': 'query-pci', 'returns': ['PciInfo'] }
1144
92aa5c6d
PB
1145##
1146# @BlockdevOnError:
1147#
1148# An enumeration of possible behaviors for errors on I/O operations.
1149# The exact meaning depends on whether the I/O was initiated by a guest
1150# or by a block job
1151#
1152# @report: for guest operations, report the error to the guest;
1153# for jobs, cancel the job
1154#
1155# @ignore: ignore the error, only report a QMP event (BLOCK_IO_ERROR
1156# or BLOCK_JOB_ERROR)
1157#
1158# @enospc: same as @stop on ENOSPC, same as @report otherwise.
1159#
1160# @stop: for guest operations, stop the virtual machine;
1161# for jobs, pause the job
1162#
1163# Since: 1.3
1164##
1165{ 'enum': 'BlockdevOnError',
1166 'data': ['report', 'ignore', 'enospc', 'stop'] }
1167
893f7eba
PB
1168##
1169# @MirrorSyncMode:
1170#
1171# An enumeration of possible behaviors for the initial synchronization
1172# phase of storage mirroring.
1173#
1174# @top: copies data in the topmost image to the destination
1175#
1176# @full: copies data from all images to the destination
1177#
1178# @none: only copy data written from now on
1179#
1180# Since: 1.3
1181##
1182{ 'enum': 'MirrorSyncMode',
1183 'data': ['top', 'full', 'none'] }
1184
fb5458cd
SH
1185##
1186# @BlockJobInfo:
1187#
1188# Information about a long-running block device operation.
1189#
1190# @type: the job type ('stream' for image streaming)
1191#
1192# @device: the block device name
1193#
1194# @len: the maximum progress value
1195#
8d65883f
PB
1196# @busy: false if the job is known to be in a quiescent state, with
1197# no pending I/O. Since 1.3.
1198#
8acc72a4
PB
1199# @paused: whether the job is paused or, if @busy is true, will
1200# pause itself as soon as possible. Since 1.3.
1201#
fb5458cd
SH
1202# @offset: the current progress value
1203#
1204# @speed: the rate limit, bytes per second
1205#
32c81a4a
PB
1206# @io-status: the status of the job (since 1.3)
1207#
fb5458cd
SH
1208# Since: 1.1
1209##
1210{ 'type': 'BlockJobInfo',
1211 'data': {'type': 'str', 'device': 'str', 'len': 'int',
32c81a4a
PB
1212 'offset': 'int', 'busy': 'bool', 'paused': 'bool', 'speed': 'int',
1213 'io-status': 'BlockDeviceIoStatus'} }
fb5458cd
SH
1214
1215##
1216# @query-block-jobs:
1217#
1218# Return information about long-running block device operations.
1219#
1220# Returns: a list of @BlockJobInfo for each active block job
1221#
1222# Since: 1.1
1223##
1224{ 'command': 'query-block-jobs', 'returns': ['BlockJobInfo'] }
1225
7a7f325e
LC
1226##
1227# @quit:
1228#
1229# This command will cause the QEMU process to exit gracefully. While every
1230# attempt is made to send the QMP response before terminating, this is not
1231# guaranteed. When using this interface, a premature EOF would not be
1232# unexpected.
1233#
1234# Since: 0.14.0
1235##
1236{ 'command': 'quit' }
5f158f21
LC
1237
1238##
1239# @stop:
1240#
1241# Stop all guest VCPU execution.
1242#
1243# Since: 0.14.0
1244#
1245# Notes: This function will succeed even if the guest is already in the stopped
1e998146
PB
1246# state. In "inmigrate" state, it will ensure that the guest
1247# remains paused once migration finishes, as if the -S option was
1248# passed on the command line.
5f158f21
LC
1249##
1250{ 'command': 'stop' }
38d22653
LC
1251
1252##
1253# @system_reset:
1254#
1255# Performs a hard reset of a guest.
1256#
1257# Since: 0.14.0
1258##
1259{ 'command': 'system_reset' }
5bc465e4
LC
1260
1261##
1262# @system_powerdown:
1263#
1264# Requests that a guest perform a powerdown operation.
1265#
1266# Since: 0.14.0
1267#
1268# Notes: A guest may or may not respond to this command. This command
1269# returning does not indicate that a guest has accepted the request or
1270# that it has shut down. Many guests will respond to this command by
1271# prompting the user in some way.
1272##
1273{ 'command': 'system_powerdown' }
755f1968
LC
1274
1275##
1276# @cpu:
1277#
1278# This command is a nop that is only provided for the purposes of compatibility.
1279#
1280# Since: 0.14.0
1281#
1282# Notes: Do not use this command.
1283##
1284{ 'command': 'cpu', 'data': {'index': 'int'} }
0cfd6a9a
LC
1285
1286##
1287# @memsave:
1288#
1289# Save a portion of guest memory to a file.
1290#
1291# @val: the virtual address of the guest to start from
1292#
1293# @size: the size of memory region to save
1294#
1295# @filename: the file to save the memory to as binary data
1296#
1297# @cpu-index: #optional the index of the virtual CPU to use for translating the
1298# virtual address (defaults to CPU 0)
1299#
1300# Returns: Nothing on success
0cfd6a9a
LC
1301#
1302# Since: 0.14.0
1303#
1304# Notes: Errors were not reliably returned until 1.1
1305##
1306{ 'command': 'memsave',
1307 'data': {'val': 'int', 'size': 'int', 'filename': 'str', '*cpu-index': 'int'} }
6d3962bf
LC
1308
1309##
1310# @pmemsave:
1311#
1312# Save a portion of guest physical memory to a file.
1313#
1314# @val: the physical address of the guest to start from
1315#
1316# @size: the size of memory region to save
1317#
1318# @filename: the file to save the memory to as binary data
1319#
1320# Returns: Nothing on success
6d3962bf
LC
1321#
1322# Since: 0.14.0
1323#
1324# Notes: Errors were not reliably returned until 1.1
1325##
1326{ 'command': 'pmemsave',
1327 'data': {'val': 'int', 'size': 'int', 'filename': 'str'} }
e42e818b
LC
1328
1329##
1330# @cont:
1331#
1332# Resume guest VCPU execution.
1333#
1334# Since: 0.14.0
1335#
1336# Returns: If successful, nothing
e42e818b
LC
1337# If QEMU was started with an encrypted block device and a key has
1338# not yet been set, DeviceEncrypted.
1339#
1e998146
PB
1340# Notes: This command will succeed if the guest is currently running. It
1341# will also succeed if the guest is in the "inmigrate" state; in
1342# this case, the effect of the command is to make sure the guest
1343# starts once migration finishes, removing the effect of the -S
1344# command line option if it was passed.
e42e818b
LC
1345##
1346{ 'command': 'cont' }
1347
9b9df25a
GH
1348##
1349# @system_wakeup:
1350#
1351# Wakeup guest from suspend. Does nothing in case the guest isn't suspended.
1352#
1353# Since: 1.1
1354#
1355# Returns: nothing.
1356##
1357{ 'command': 'system_wakeup' }
1358
ab49ab5c
LC
1359##
1360# @inject-nmi:
1361#
1362# Injects an Non-Maskable Interrupt into all guest's VCPUs.
1363#
1364# Returns: If successful, nothing
ab49ab5c
LC
1365#
1366# Since: 0.14.0
1367#
1368# Notes: Only x86 Virtual Machines support this command.
1369##
1370{ 'command': 'inject-nmi' }
4b37156c
LC
1371
1372##
1373# @set_link:
1374#
1375# Sets the link status of a virtual network adapter.
1376#
1377# @name: the device name of the virtual network adapter
1378#
1379# @up: true to set the link status to be up
1380#
1381# Returns: Nothing on success
1382# If @name is not a valid network device, DeviceNotFound
1383#
1384# Since: 0.14.0
1385#
1386# Notes: Not all network adapters support setting link status. This command
1387# will succeed even if the network adapter does not support link status
1388# notification.
1389##
1390{ 'command': 'set_link', 'data': {'name': 'str', 'up': 'bool'} }
a4dea8a9
LC
1391
1392##
1393# @block_passwd:
1394#
1395# This command sets the password of a block device that has not been open
1396# with a password and requires one.
1397#
1398# The two cases where this can happen are a block device is created through
1399# QEMU's initial command line or a block device is changed through the legacy
1400# @change interface.
1401#
1402# In the event that the block device is created through the initial command
1403# line, the VM will start in the stopped state regardless of whether '-S' is
1404# used. The intention is for a management tool to query the block devices to
1405# determine which ones are encrypted, set the passwords with this command, and
1406# then start the guest with the @cont command.
1407#
1408# @device: the name of the device to set the password on
1409#
1410# @password: the password to use for the device
1411#
1412# Returns: nothing on success
1413# If @device is not a valid block device, DeviceNotFound
1414# If @device is not encrypted, DeviceNotEncrypted
a4dea8a9
LC
1415#
1416# Notes: Not all block formats support encryption and some that do are not
1417# able to validate that a password is correct. Disk corruption may
1418# occur if an invalid password is specified.
1419#
1420# Since: 0.14.0
1421##
1422{ 'command': 'block_passwd', 'data': {'device': 'str', 'password': 'str'} }
d72f3264
LC
1423
1424##
1425# @balloon:
1426#
1427# Request the balloon driver to change its balloon size.
1428#
1429# @value: the target size of the balloon in bytes
1430#
1431# Returns: Nothing on success
1432# If the balloon driver is enabled but not functional because the KVM
1433# kernel module cannot support it, KvmMissingCap
1434# If no balloon device is present, DeviceNotActive
1435#
1436# Notes: This command just issues a request to the guest. When it returns,
1437# the balloon size may not have changed. A guest can change the balloon
1438# size independent of this command.
1439#
1440# Since: 0.14.0
1441##
1442{ 'command': 'balloon', 'data': {'value': 'int'} }
5e7caacb
LC
1443
1444##
1445# @block_resize
1446#
1447# Resize a block image while a guest is running.
1448#
1449# @device: the name of the device to get the image resized
1450#
1451# @size: new image size in bytes
1452#
1453# Returns: nothing on success
1454# If @device is not a valid block device, DeviceNotFound
5e7caacb
LC
1455#
1456# Since: 0.14.0
1457##
1458{ 'command': 'block_resize', 'data': { 'device': 'str', 'size': 'int' }}
6106e249 1459
8802d1fd 1460##
bc8b094f
PB
1461# @NewImageMode
1462#
1463# An enumeration that tells QEMU how to set the backing file path in
1464# a new image file.
1465#
1466# @existing: QEMU should look for an existing image file.
1467#
1468# @absolute-paths: QEMU should create a new image with absolute paths
1469# for the backing file.
1470#
1471# Since: 1.1
1472##
1473{ 'enum': 'NewImageMode'
1474 'data': [ 'existing', 'absolute-paths' ] }
1475
8802d1fd 1476##
52e7c241 1477# @BlockdevSnapshot
8802d1fd
JC
1478#
1479# @device: the name of the device to generate the snapshot from.
1480#
1481# @snapshot-file: the target of the new image. A new file will be created.
1482#
1483# @format: #optional the format of the snapshot image, default is 'qcow2'.
6cc2a415
PB
1484#
1485# @mode: #optional whether and how QEMU should create a new image, default is
8bde9b6f 1486# 'absolute-paths'.
8802d1fd 1487##
52e7c241 1488{ 'type': 'BlockdevSnapshot',
bc8b094f
PB
1489 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1490 '*mode': 'NewImageMode' } }
8802d1fd
JC
1491
1492##
52e7c241 1493# @BlockdevAction
8802d1fd 1494#
52e7c241
PB
1495# A discriminated record of operations that can be performed with
1496# @transaction.
8802d1fd 1497##
52e7c241
PB
1498{ 'union': 'BlockdevAction',
1499 'data': {
1500 'blockdev-snapshot-sync': 'BlockdevSnapshot',
1501 } }
8802d1fd
JC
1502
1503##
52e7c241 1504# @transaction
8802d1fd 1505#
52e7c241
PB
1506# Atomically operate on a group of one or more block devices. If
1507# any operation fails, then the entire set of actions will be
1508# abandoned and the appropriate error returned. The only operation
1509# supported is currently blockdev-snapshot-sync.
8802d1fd
JC
1510#
1511# List of:
52e7c241 1512# @BlockdevAction: information needed for the device snapshot
8802d1fd
JC
1513#
1514# Returns: nothing on success
1515# If @device is not a valid block device, DeviceNotFound
8802d1fd 1516#
52e7c241
PB
1517# Note: The transaction aborts on the first failure. Therefore, there will
1518# be only one device or snapshot file returned in an error condition, and
1519# subsequent actions will not have been attempted.
1520#
1521# Since 1.1
8802d1fd 1522##
52e7c241
PB
1523{ 'command': 'transaction',
1524 'data': { 'actions': [ 'BlockdevAction' ] } }
8802d1fd 1525
6106e249
LC
1526##
1527# @blockdev-snapshot-sync
1528#
1529# Generates a synchronous snapshot of a block device.
1530#
1531# @device: the name of the device to generate the snapshot from.
1532#
1533# @snapshot-file: the target of the new image. If the file exists, or if it
1534# is a device, the snapshot will be created in the existing
1535# file/device. If does not exist, a new file will be created.
1536#
1537# @format: #optional the format of the snapshot image, default is 'qcow2'.
1538#
6cc2a415 1539# @mode: #optional whether and how QEMU should create a new image, default is
8bde9b6f 1540# 'absolute-paths'.
6cc2a415 1541#
6106e249
LC
1542# Returns: nothing on success
1543# If @device is not a valid block device, DeviceNotFound
6106e249 1544#
6106e249
LC
1545# Since 0.14.0
1546##
1547{ 'command': 'blockdev-snapshot-sync',
6cc2a415
PB
1548 'data': { 'device': 'str', 'snapshot-file': 'str', '*format': 'str',
1549 '*mode': 'NewImageMode'} }
d51a67b4
LC
1550
1551##
1552# @human-monitor-command:
1553#
1554# Execute a command on the human monitor and return the output.
1555#
1556# @command-line: the command to execute in the human monitor
1557#
1558# @cpu-index: #optional The CPU to use for commands that require an implicit CPU
1559#
1560# Returns: the output of the command as a string
1561#
1562# Since: 0.14.0
1563#
1564# Notes: This command only exists as a stop-gap. It's use is highly
1565# discouraged. The semantics of this command are not guaranteed.
1566#
1567# Known limitations:
1568#
1569# o This command is stateless, this means that commands that depend
1570# on state information (such as getfd) might not work
1571#
1572# o Commands that prompt the user for data (eg. 'cont' when the block
1573# device is encrypted) don't currently work
1574##
1575{ 'command': 'human-monitor-command',
1576 'data': {'command-line': 'str', '*cpu-index': 'int'},
b80e560b 1577 'returns': 'str' }
6cdedb07
LC
1578
1579##
ed61fc10
JC
1580# @block-commit
1581#
1582# Live commit of data from overlay image nodes into backing nodes - i.e.,
1583# writes data between 'top' and 'base' into 'base'.
1584#
1585# @device: the name of the device
1586#
1587# @base: #optional The file name of the backing image to write data into.
1588# If not specified, this is the deepest backing image
1589#
1590# @top: The file name of the backing image within the image chain,
1591# which contains the topmost data to be committed down.
1592# Note, the active layer as 'top' is currently unsupported.
1593#
1594# If top == base, that is an error.
1595#
1596#
1597# @speed: #optional the maximum speed, in bytes per second
1598#
1599# Returns: Nothing on success
1600# If commit or stream is already active on this device, DeviceInUse
1601# If @device does not exist, DeviceNotFound
1602# If image commit is not supported by this device, NotSupported
1603# If @base or @top is invalid, a generic error is returned
1604# If @top is the active layer, or omitted, a generic error is returned
1605# If @speed is invalid, InvalidParameter
1606#
1607# Since: 1.3
1608#
1609##
1610{ 'command': 'block-commit',
1611 'data': { 'device': 'str', '*base': 'str', 'top': 'str',
1612 '*speed': 'int' } }
1613
d9b902db
PB
1614##
1615# @drive-mirror
1616#
1617# Start mirroring a block device's writes to a new destination.
1618#
1619# @device: the name of the device whose writes should be mirrored.
1620#
1621# @target: the target of the new image. If the file exists, or if it
1622# is a device, the existing file/device will be used as the new
1623# destination. If it does not exist, a new file will be created.
1624#
1625# @format: #optional the format of the new destination, default is to
1626# probe if @mode is 'existing', else the format of the source
1627#
1628# @mode: #optional whether and how QEMU should create a new image, default is
1629# 'absolute-paths'.
1630#
1631# @speed: #optional the maximum speed, in bytes per second
1632#
1633# @sync: what parts of the disk image should be copied to the destination
1634# (all the disk, only the sectors allocated in the topmost image, or
1635# only new I/O).
1636#
b952b558
PB
1637# @on-source-error: #optional the action to take on an error on the source,
1638# default 'report'. 'stop' and 'enospc' can only be used
1639# if the block device supports io-status (see BlockInfo).
1640#
1641# @on-target-error: #optional the action to take on an error on the target,
1642# default 'report' (no limitations, since this applies to
1643# a different block device than @device).
1644#
d9b902db
PB
1645# Returns: nothing on success
1646# If @device is not a valid block device, DeviceNotFound
1647#
1648# Since 1.3
1649##
1650{ 'command': 'drive-mirror',
1651 'data': { 'device': 'str', 'target': 'str', '*format': 'str',
1652 'sync': 'MirrorSyncMode', '*mode': 'NewImageMode',
b952b558
PB
1653 '*speed': 'int', '*on-source-error': 'BlockdevOnError',
1654 '*on-target-error': 'BlockdevOnError' } }
d9b902db
PB
1655
1656##
6cdedb07
LC
1657# @migrate_cancel
1658#
1659# Cancel the current executing migration process.
1660#
1661# Returns: nothing on success
1662#
1663# Notes: This command succeeds even if there is no migration process running.
1664#
1665# Since: 0.14.0
1666##
1667{ 'command': 'migrate_cancel' }
4f0a993b
LC
1668
1669##
1670# @migrate_set_downtime
1671#
1672# Set maximum tolerated downtime for migration.
1673#
1674# @value: maximum downtime in seconds
1675#
1676# Returns: nothing on success
1677#
1678# Since: 0.14.0
1679##
1680{ 'command': 'migrate_set_downtime', 'data': {'value': 'number'} }
3dc85383
LC
1681
1682##
1683# @migrate_set_speed
1684#
1685# Set maximum speed for migration.
1686#
1687# @value: maximum speed in bytes.
1688#
1689# Returns: nothing on success
1690#
1691# Notes: A value lesser than zero will be automatically round up to zero.
1692#
1693# Since: 0.14.0
1694##
1695{ 'command': 'migrate_set_speed', 'data': {'value': 'int'} }
b4b12c62 1696
9e1ba4cc
OW
1697##
1698# @migrate-set-cache-size
1699#
1700# Set XBZRLE cache size
1701#
1702# @value: cache size in bytes
1703#
1704# The size will be rounded down to the nearest power of 2.
1705# The cache size can be modified before and during ongoing migration
1706#
1707# Returns: nothing on success
1708#
1709# Since: 1.2
1710##
1711{ 'command': 'migrate-set-cache-size', 'data': {'value': 'int'} }
1712
1713##
1714# @query-migrate-cache-size
1715#
1716# query XBZRLE cache size
1717#
1718# Returns: XBZRLE cache size in bytes
1719#
1720# Since: 1.2
1721##
1722{ 'command': 'query-migrate-cache-size', 'returns': 'int' }
1723
b4b12c62 1724##
d03ee401 1725# @ObjectPropertyInfo:
b4b12c62
AL
1726#
1727# @name: the name of the property
1728#
1729# @type: the type of the property. This will typically come in one of four
1730# forms:
1731#
1732# 1) A primitive type such as 'u8', 'u16', 'bool', 'str', or 'double'.
1733# These types are mapped to the appropriate JSON type.
1734#
1735# 2) A legacy type in the form 'legacy<subtype>' where subtype is the
1736# legacy qdev typename. These types are always treated as strings.
1737#
1738# 3) A child type in the form 'child<subtype>' where subtype is a qdev
1739# device type name. Child properties create the composition tree.
1740#
1741# 4) A link type in the form 'link<subtype>' where subtype is a qdev
1742# device type name. Link properties form the device model graph.
1743#
51920820 1744# Since: 1.2
b4b12c62 1745##
57c9fafe 1746{ 'type': 'ObjectPropertyInfo',
b4b12c62
AL
1747 'data': { 'name': 'str', 'type': 'str' } }
1748
1749##
1750# @qom-list:
1751#
57c9fafe 1752# This command will list any properties of a object given a path in the object
b4b12c62
AL
1753# model.
1754#
57c9fafe 1755# @path: the path within the object model. See @qom-get for a description of
b4b12c62
AL
1756# this parameter.
1757#
57c9fafe
AL
1758# Returns: a list of @ObjectPropertyInfo that describe the properties of the
1759# object.
b4b12c62 1760#
51920820 1761# Since: 1.2
b4b12c62
AL
1762##
1763{ 'command': 'qom-list',
1764 'data': { 'path': 'str' },
57c9fafe 1765 'returns': [ 'ObjectPropertyInfo' ] }
eb6e8ea5
AL
1766
1767##
1768# @qom-get:
1769#
57c9fafe 1770# This command will get a property from a object model path and return the
eb6e8ea5
AL
1771# value.
1772#
57c9fafe 1773# @path: The path within the object model. There are two forms of supported
eb6e8ea5
AL
1774# paths--absolute and partial paths.
1775#
57c9fafe 1776# Absolute paths are derived from the root object and can follow child<>
eb6e8ea5
AL
1777# or link<> properties. Since they can follow link<> properties, they
1778# can be arbitrarily long. Absolute paths look like absolute filenames
1779# and are prefixed with a leading slash.
1780#
1781# Partial paths look like relative filenames. They do not begin
1782# with a prefix. The matching rules for partial paths are subtle but
57c9fafe 1783# designed to make specifying objects easy. At each level of the
eb6e8ea5
AL
1784# composition tree, the partial path is matched as an absolute path.
1785# The first match is not returned. At least two matches are searched
1786# for. A successful result is only returned if only one match is
1787# found. If more than one match is found, a flag is return to
1788# indicate that the match was ambiguous.
1789#
1790# @property: The property name to read
1791#
1792# Returns: The property value. The type depends on the property type. legacy<>
1793# properties are returned as #str. child<> and link<> properties are
1794# returns as #str pathnames. All integer property types (u8, u16, etc)
1795# are returned as #int.
1796#
51920820 1797# Since: 1.2
eb6e8ea5
AL
1798##
1799{ 'command': 'qom-get',
1800 'data': { 'path': 'str', 'property': 'str' },
1801 'returns': 'visitor',
1802 'gen': 'no' }
1803
1804##
1805# @qom-set:
1806#
57c9fafe 1807# This command will set a property from a object model path.
eb6e8ea5
AL
1808#
1809# @path: see @qom-get for a description of this parameter
1810#
1811# @property: the property name to set
1812#
1813# @value: a value who's type is appropriate for the property type. See @qom-get
1814# for a description of type mapping.
1815#
51920820 1816# Since: 1.2
eb6e8ea5
AL
1817##
1818{ 'command': 'qom-set',
1819 'data': { 'path': 'str', 'property': 'str', 'value': 'visitor' },
1820 'gen': 'no' }
fbf796fd
LC
1821
1822##
1823# @set_password:
1824#
1825# Sets the password of a remote display session.
1826#
1827# @protocol: `vnc' to modify the VNC server password
1828# `spice' to modify the Spice server password
1829#
1830# @password: the new password
1831#
1832# @connected: #optional how to handle existing clients when changing the
b80e560b 1833# password. If nothing is specified, defaults to `keep'
fbf796fd
LC
1834# `fail' to fail the command if clients are connected
1835# `disconnect' to disconnect existing clients
1836# `keep' to maintain existing clients
1837#
1838# Returns: Nothing on success
1839# If Spice is not enabled, DeviceNotFound
fbf796fd
LC
1840#
1841# Since: 0.14.0
1842##
1843{ 'command': 'set_password',
1844 'data': {'protocol': 'str', 'password': 'str', '*connected': 'str'} }
9ad5372d
LC
1845
1846##
1847# @expire_password:
1848#
1849# Expire the password of a remote display server.
1850#
1851# @protocol: the name of the remote display protocol `vnc' or `spice'
1852#
1853# @time: when to expire the password.
1854# `now' to expire the password immediately
1855# `never' to cancel password expiration
1856# `+INT' where INT is the number of seconds from now (integer)
1857# `INT' where INT is the absolute time in seconds
1858#
1859# Returns: Nothing on success
1860# If @protocol is `spice' and Spice is not active, DeviceNotFound
9ad5372d
LC
1861#
1862# Since: 0.14.0
1863#
1864# Notes: Time is relative to the server and currently there is no way to
1865# coordinate server time with client time. It is not recommended to
1866# use the absolute time version of the @time parameter unless you're
1867# sure you are on the same machine as the QEMU instance.
1868##
1869{ 'command': 'expire_password', 'data': {'protocol': 'str', 'time': 'str'} }
c245b6a3
LC
1870
1871##
1872# @eject:
1873#
1874# Ejects a device from a removable drive.
1875#
1876# @device: The name of the device
1877#
1878# @force: @optional If true, eject regardless of whether the drive is locked.
1879# If not specified, the default value is false.
1880#
1881# Returns: Nothing on success
1882# If @device is not a valid block device, DeviceNotFound
c245b6a3
LC
1883#
1884# Notes: Ejecting a device will no media results in success
1885#
1886# Since: 0.14.0
1887##
1888{ 'command': 'eject', 'data': {'device': 'str', '*force': 'bool'} }
270b243f
LC
1889
1890##
1891# @change-vnc-password:
1892#
1893# Change the VNC server password.
1894#
1895# @target: the new password to use with VNC authentication
1896#
1897# Since: 1.1
1898#
1899# Notes: An empty password in this command will set the password to the empty
1900# string. Existing clients are unaffected by executing this command.
1901##
1902{ 'command': 'change-vnc-password', 'data': {'password': 'str'} }
333a96ec
LC
1903
1904##
1905# @change:
1906#
1907# This command is multiple commands multiplexed together.
1908#
1909# @device: This is normally the name of a block device but it may also be 'vnc'.
1910# when it's 'vnc', then sub command depends on @target
1911#
1912# @target: If @device is a block device, then this is the new filename.
1913# If @device is 'vnc', then if the value 'password' selects the vnc
1914# change password command. Otherwise, this specifies a new server URI
1915# address to listen to for VNC connections.
1916#
1917# @arg: If @device is a block device, then this is an optional format to open
1918# the device with.
1919# If @device is 'vnc' and @target is 'password', this is the new VNC
1920# password to set. If this argument is an empty string, then no future
1921# logins will be allowed.
1922#
1923# Returns: Nothing on success.
1924# If @device is not a valid block device, DeviceNotFound
333a96ec
LC
1925# If the new block device is encrypted, DeviceEncrypted. Note that
1926# if this error is returned, the device has been opened successfully
1927# and an additional call to @block_passwd is required to set the
1928# device's password. The behavior of reads and writes to the block
1929# device between when these calls are executed is undefined.
1930#
1931# Notes: It is strongly recommended that this interface is not used especially
1932# for changing block devices.
1933#
1934# Since: 0.14.0
1935##
1936{ 'command': 'change',
1937 'data': {'device': 'str', 'target': 'str', '*arg': 'str'} }
80047da5
LC
1938
1939##
1940# @block_set_io_throttle:
1941#
1942# Change I/O throttle limits for a block drive.
1943#
1944# @device: The name of the device
1945#
1946# @bps: total throughput limit in bytes per second
1947#
1948# @bps_rd: read throughput limit in bytes per second
1949#
1950# @bps_wr: write throughput limit in bytes per second
1951#
1952# @iops: total I/O operations per second
1953#
1954# @ops_rd: read I/O operations per second
1955#
1956# @iops_wr: write I/O operations per second
1957#
1958# Returns: Nothing on success
1959# If @device is not a valid block device, DeviceNotFound
80047da5
LC
1960#
1961# Since: 1.1
b80e560b 1962##
80047da5
LC
1963{ 'command': 'block_set_io_throttle',
1964 'data': { 'device': 'str', 'bps': 'int', 'bps_rd': 'int', 'bps_wr': 'int',
1965 'iops': 'int', 'iops_rd': 'int', 'iops_wr': 'int' } }
12bd451f 1966
db58f9c0
SH
1967##
1968# @block-stream:
12bd451f
SH
1969#
1970# Copy data from a backing file into a block device.
1971#
1972# The block streaming operation is performed in the background until the entire
1973# backing file has been copied. This command returns immediately once streaming
1974# has started. The status of ongoing block streaming operations can be checked
1975# with query-block-jobs. The operation can be stopped before it has completed
db58f9c0 1976# using the block-job-cancel command.
12bd451f
SH
1977#
1978# If a base file is specified then sectors are not copied from that base file and
1979# its backing chain. When streaming completes the image file will have the base
1980# file as its backing file. This can be used to stream a subset of the backing
1981# file chain instead of flattening the entire image.
1982#
1983# On successful completion the image file is updated to drop the backing file
1984# and the BLOCK_JOB_COMPLETED event is emitted.
1985#
1986# @device: the device name
1987#
1988# @base: #optional the common backing file name
1989#
c83c66c3
SH
1990# @speed: #optional the maximum speed, in bytes per second
1991#
1d809098
PB
1992# @on-error: #optional the action to take on an error (default report).
1993# 'stop' and 'enospc' can only be used if the block device
1994# supports io-status (see BlockInfo). Since 1.3.
1995#
12bd451f 1996# Returns: Nothing on success
12bd451f 1997# If @device does not exist, DeviceNotFound
12bd451f
SH
1998#
1999# Since: 1.1
2000##
1d809098
PB
2001{ 'command': 'block-stream',
2002 'data': { 'device': 'str', '*base': 'str', '*speed': 'int',
2003 '*on-error': 'BlockdevOnError' } }
2d47c6e9
SH
2004
2005##
db58f9c0 2006# @block-job-set-speed:
2d47c6e9
SH
2007#
2008# Set maximum speed for a background block operation.
2009#
2010# This command can only be issued when there is an active block job.
2011#
2012# Throttling can be disabled by setting the speed to 0.
2013#
2014# @device: the device name
2015#
c83c66c3
SH
2016# @speed: the maximum speed, in bytes per second, or 0 for unlimited.
2017# Defaults to 0.
2d47c6e9
SH
2018#
2019# Returns: Nothing on success
05290d80 2020# If no background operation is active on this device, DeviceNotActive
2d47c6e9
SH
2021#
2022# Since: 1.1
2023##
db58f9c0 2024{ 'command': 'block-job-set-speed',
882ec7ce 2025 'data': { 'device': 'str', 'speed': 'int' } }
370521a1
SH
2026
2027##
db58f9c0 2028# @block-job-cancel:
370521a1 2029#
05290d80 2030# Stop an active background block operation.
370521a1 2031#
05290d80 2032# This command returns immediately after marking the active background block
370521a1
SH
2033# operation for cancellation. It is an error to call this command if no
2034# operation is in progress.
2035#
2036# The operation will cancel as soon as possible and then emit the
2037# BLOCK_JOB_CANCELLED event. Before that happens the job is still visible when
2038# enumerated using query-block-jobs.
2039#
05290d80
PB
2040# For streaming, the image file retains its backing file unless the streaming
2041# operation happens to complete just as it is being cancelled. A new streaming
2042# operation can be started at a later time to finish copying all data from the
2043# backing file.
370521a1
SH
2044#
2045# @device: the device name
2046#
6e37fb81
PB
2047# @force: #optional whether to allow cancellation of a paused job (default
2048# false). Since 1.3.
2049#
370521a1 2050# Returns: Nothing on success
05290d80 2051# If no background operation is active on this device, DeviceNotActive
370521a1
SH
2052#
2053# Since: 1.1
2054##
6e37fb81
PB
2055{ 'command': 'block-job-cancel', 'data': { 'device': 'str', '*force': 'bool' } }
2056
2057##
2058# @block-job-pause:
2059#
2060# Pause an active background block operation.
2061#
2062# This command returns immediately after marking the active background block
2063# operation for pausing. It is an error to call this command if no
2064# operation is in progress. Pausing an already paused job has no cumulative
2065# effect; a single block-job-resume command will resume the job.
2066#
2067# The operation will pause as soon as possible. No event is emitted when
2068# the operation is actually paused. Cancelling a paused job automatically
2069# resumes it.
2070#
2071# @device: the device name
2072#
2073# Returns: Nothing on success
2074# If no background operation is active on this device, DeviceNotActive
2075#
2076# Since: 1.3
2077##
2078{ 'command': 'block-job-pause', 'data': { 'device': 'str' } }
2079
2080##
2081# @block-job-resume:
2082#
2083# Resume an active background block operation.
2084#
2085# This command returns immediately after resuming a paused background block
2086# operation. It is an error to call this command if no operation is in
2087# progress. Resuming an already running job is not an error.
2088#
32c81a4a
PB
2089# This command also clears the error status of the job.
2090#
6e37fb81
PB
2091# @device: the device name
2092#
2093# Returns: Nothing on success
2094# If no background operation is active on this device, DeviceNotActive
2095#
2096# Since: 1.3
2097##
2098{ 'command': 'block-job-resume', 'data': { 'device': 'str' } }
5eeee3fa 2099
aeae883b
PB
2100##
2101# @block-job-complete:
2102#
2103# Manually trigger completion of an active background block operation. This
2104# is supported for drive mirroring, where it also switches the device to
a66a2a36
PB
2105# write to the target path only. The ability to complete is signaled with
2106# a BLOCK_JOB_READY event.
aeae883b
PB
2107#
2108# This command completes an active background block operation synchronously.
2109# The ordering of this command's return with the BLOCK_JOB_COMPLETED event
2110# is not defined. Note that if an I/O error occurs during the processing of
2111# this command: 1) the command itself will fail; 2) the error will be processed
2112# according to the rerror/werror arguments that were specified when starting
2113# the operation.
2114#
2115# A cancelled or paused job cannot be completed.
2116#
2117# @device: the device name
2118#
2119# Returns: Nothing on success
2120# If no background operation is active on this device, DeviceNotActive
2121#
2122# Since: 1.3
2123##
2124{ 'command': 'block-job-complete', 'data': { 'device': 'str' } }
2125
5eeee3fa
AL
2126##
2127# @ObjectTypeInfo:
2128#
2129# This structure describes a search result from @qom-list-types
2130#
2131# @name: the type name found in the search
2132#
2133# Since: 1.1
2134#
2135# Notes: This command is experimental and may change syntax in future releases.
2136##
2137{ 'type': 'ObjectTypeInfo',
2138 'data': { 'name': 'str' } }
2139
2140##
2141# @qom-list-types:
2142#
2143# This command will return a list of types given search parameters
2144#
2145# @implements: if specified, only return types that implement this type name
2146#
2147# @abstract: if true, include abstract types in the results
2148#
2149# Returns: a list of @ObjectTypeInfo or an empty list if no results are found
2150#
2151# Since: 1.1
5eeee3fa
AL
2152##
2153{ 'command': 'qom-list-types',
2154 'data': { '*implements': 'str', '*abstract': 'bool' },
2155 'returns': [ 'ObjectTypeInfo' ] }
e1c37d0e 2156
1daa31b9
AL
2157##
2158# @DevicePropertyInfo:
2159#
2160# Information about device properties.
2161#
2162# @name: the name of the property
2163# @type: the typename of the property
2164#
2165# Since: 1.2
2166##
2167{ 'type': 'DevicePropertyInfo',
2168 'data': { 'name': 'str', 'type': 'str' } }
2169
2170##
2171# @device-list-properties:
2172#
2173# List properties associated with a device.
2174#
2175# @typename: the type name of a device
2176#
2177# Returns: a list of DevicePropertyInfo describing a devices properties
2178#
2179# Since: 1.2
2180##
2181{ 'command': 'device-list-properties',
2182 'data': { 'typename': 'str'},
2183 'returns': [ 'DevicePropertyInfo' ] }
2184
e1c37d0e
LC
2185##
2186# @migrate
2187#
2188# Migrates the current running guest to another Virtual Machine.
2189#
2190# @uri: the Uniform Resource Identifier of the destination VM
2191#
2192# @blk: #optional do block migration (full disk copy)
2193#
2194# @inc: #optional incremental disk copy migration
2195#
2196# @detach: this argument exists only for compatibility reasons and
2197# is ignored by QEMU
2198#
2199# Returns: nothing on success
2200#
2201# Since: 0.14.0
2202##
2203{ 'command': 'migrate',
2204 'data': {'uri': 'str', '*blk': 'bool', '*inc': 'bool', '*detach': 'bool' } }
33cf629a 2205
a7ae8355
SS
2206# @xen-save-devices-state:
2207#
2208# Save the state of all devices to file. The RAM and the block devices
2209# of the VM are not saved by this command.
2210#
2211# @filename: the file to save the state of the devices to as binary
2212# data. See xen-save-devices-state.txt for a description of the binary
2213# format.
2214#
2215# Returns: Nothing on success
a7ae8355
SS
2216#
2217# Since: 1.1
2218##
2219{ 'command': 'xen-save-devices-state', 'data': {'filename': 'str'} }
a15fef21 2220
39f42439
AP
2221##
2222# @xen-set-global-dirty-log
2223#
2224# Enable or disable the global dirty log mode.
2225#
2226# @enable: true to enable, false to disable.
2227#
2228# Returns: nothing
2229#
2230# Since: 1.3
2231##
2232{ 'command': 'xen-set-global-dirty-log', 'data': { 'enable': 'bool' } }
2233
a15fef21
LC
2234##
2235# @device_del:
2236#
2237# Remove a device from a guest
2238#
2239# @id: the name of the device
2240#
2241# Returns: Nothing on success
2242# If @id is not a valid device, DeviceNotFound
a15fef21
LC
2243#
2244# Notes: When this command completes, the device may not be removed from the
2245# guest. Hot removal is an operation that requires guest cooperation.
2246# This command merely requests that the guest begin the hot removal
2247# process.
2248#
2249# Since: 0.14.0
2250##
2251{ 'command': 'device_del', 'data': {'id': 'str'} }
783e9b48
WC
2252
2253##
2254# @dump-guest-memory
2255#
2256# Dump guest's memory to vmcore. It is a synchronous operation that can take
2257# very long depending on the amount of guest memory. This command is only
f5b0d93b
LC
2258# supported on i386 and x86_64.
2259#
2260# @paging: if true, do paging to get guest's memory mapping. This allows
d691180e 2261# using gdb to process the core file.
f5b0d93b 2262#
d691180e
LC
2263# IMPORTANT: this option can make QEMU allocate several gigabytes
2264# of RAM. This can happen for a large guest, or a
2265# malicious guest pretending to be large.
2266#
2267# Also, paging=true has the following limitations:
2268#
2269# 1. The guest may be in a catastrophic state or can have corrupted
2270# memory, which cannot be trusted
2271# 2. The guest can be in real-mode even if paging is enabled. For
2272# example, the guest uses ACPI to sleep, and ACPI sleep state
2273# goes in real-mode
f5b0d93b 2274#
783e9b48 2275# @protocol: the filename or file descriptor of the vmcore. The supported
d691180e 2276# protocols are:
f5b0d93b 2277#
d691180e
LC
2278# 1. file: the protocol starts with "file:", and the following
2279# string is the file's path.
2280# 2. fd: the protocol starts with "fd:", and the following string
2281# is the fd's name.
f5b0d93b 2282#
783e9b48 2283# @begin: #optional if specified, the starting physical address.
f5b0d93b 2284#
783e9b48 2285# @length: #optional if specified, the memory size, in bytes. If you don't
d691180e
LC
2286# want to dump all guest's memory, please specify the start @begin
2287# and @length
783e9b48
WC
2288#
2289# Returns: nothing on success
783e9b48
WC
2290#
2291# Since: 1.2
2292##
2293{ 'command': 'dump-guest-memory',
2294 'data': { 'paging': 'bool', 'protocol': 'str', '*begin': 'int',
2295 '*length': 'int' } }
d691180e 2296
928059a3
LC
2297##
2298# @netdev_add:
2299#
2300# Add a network backend.
2301#
2302# @type: the type of network backend. Current valid values are 'user', 'tap',
2303# 'vde', 'socket', 'dump' and 'bridge'
2304#
2305# @id: the name of the new network backend
2306#
2307# @props: #optional a list of properties to be passed to the backend in
2308# the format 'name=value', like 'ifname=tap0,script=no'
2309#
2310# Notes: The semantics of @props is not well defined. Future commands will be
2311# introduced that provide stronger typing for backend creation.
2312#
2313# Since: 0.14.0
2314#
2315# Returns: Nothing on success
2316# If @type is not a valid network backend, DeviceNotFound
928059a3
LC
2317##
2318{ 'command': 'netdev_add',
2319 'data': {'type': 'str', 'id': 'str', '*props': '**'},
2320 'gen': 'no' }
5f964155
LC
2321
2322##
2323# @netdev_del:
2324#
2325# Remove a network backend.
2326#
2327# @id: the name of the network backend to remove
2328#
2329# Returns: Nothing on success
2330# If @id is not a valid network backend, DeviceNotFound
2331#
2332# Since: 0.14.0
2333##
2334{ 'command': 'netdev_del', 'data': {'id': 'str'} }
208c9d1b 2335
14aa0c2d
LE
2336##
2337# @NetdevNoneOptions
2338#
2339# Use it alone to have zero network devices.
2340#
2341# Since 1.2
2342##
2343{ 'type': 'NetdevNoneOptions',
2344 'data': { } }
2345
2346##
2347# @NetLegacyNicOptions
2348#
2349# Create a new Network Interface Card.
2350#
2351# @netdev: #optional id of -netdev to connect to
2352#
2353# @macaddr: #optional MAC address
2354#
2355# @model: #optional device model (e1000, rtl8139, virtio etc.)
2356#
2357# @addr: #optional PCI device address
2358#
2359# @vectors: #optional number of MSI-x vectors, 0 to disable MSI-X
2360#
2361# Since 1.2
2362##
2363{ 'type': 'NetLegacyNicOptions',
2364 'data': {
2365 '*netdev': 'str',
2366 '*macaddr': 'str',
2367 '*model': 'str',
2368 '*addr': 'str',
2369 '*vectors': 'uint32' } }
2370
2371##
2372# @String
2373#
2374# A fat type wrapping 'str', to be embedded in lists.
2375#
2376# Since 1.2
2377##
2378{ 'type': 'String',
2379 'data': {
2380 'str': 'str' } }
2381
2382##
2383# @NetdevUserOptions
2384#
2385# Use the user mode network stack which requires no administrator privilege to
2386# run.
2387#
2388# @hostname: #optional client hostname reported by the builtin DHCP server
2389#
2390# @restrict: #optional isolate the guest from the host
2391#
2392# @ip: #optional legacy parameter, use net= instead
2393#
2394# @net: #optional IP address and optional netmask
2395#
2396# @host: #optional guest-visible address of the host
2397#
2398# @tftp: #optional root directory of the built-in TFTP server
2399#
2400# @bootfile: #optional BOOTP filename, for use with tftp=
2401#
2402# @dhcpstart: #optional the first of the 16 IPs the built-in DHCP server can
2403# assign
2404#
2405# @dns: #optional guest-visible address of the virtual nameserver
2406#
63d2960b
KS
2407# @dnssearch: #optional list of DNS suffixes to search, passed as DHCP option
2408# to the guest
2409#
14aa0c2d
LE
2410# @smb: #optional root directory of the built-in SMB server
2411#
2412# @smbserver: #optional IP address of the built-in SMB server
2413#
2414# @hostfwd: #optional redirect incoming TCP or UDP host connections to guest
2415# endpoints
2416#
2417# @guestfwd: #optional forward guest TCP connections
2418#
2419# Since 1.2
2420##
2421{ 'type': 'NetdevUserOptions',
2422 'data': {
2423 '*hostname': 'str',
2424 '*restrict': 'bool',
2425 '*ip': 'str',
2426 '*net': 'str',
2427 '*host': 'str',
2428 '*tftp': 'str',
2429 '*bootfile': 'str',
2430 '*dhcpstart': 'str',
2431 '*dns': 'str',
63d2960b 2432 '*dnssearch': ['String'],
14aa0c2d
LE
2433 '*smb': 'str',
2434 '*smbserver': 'str',
2435 '*hostfwd': ['String'],
2436 '*guestfwd': ['String'] } }
2437
2438##
2439# @NetdevTapOptions
2440#
2441# Connect the host TAP network interface name to the VLAN.
2442#
2443# @ifname: #optional interface name
2444#
2445# @fd: #optional file descriptor of an already opened tap
2446#
2447# @script: #optional script to initialize the interface
2448#
2449# @downscript: #optional script to shut down the interface
2450#
2451# @helper: #optional command to execute to configure bridge
2452#
2453# @sndbuf: #optional send buffer limit. Understands [TGMKkb] suffixes.
2454#
2455# @vnet_hdr: #optional enable the IFF_VNET_HDR flag on the tap interface
2456#
2457# @vhost: #optional enable vhost-net network accelerator
2458#
2459# @vhostfd: #optional file descriptor of an already opened vhost net device
2460#
2461# @vhostforce: #optional vhost on for non-MSIX virtio guests
2462#
2463# Since 1.2
2464##
2465{ 'type': 'NetdevTapOptions',
2466 'data': {
2467 '*ifname': 'str',
2468 '*fd': 'str',
2469 '*script': 'str',
2470 '*downscript': 'str',
2471 '*helper': 'str',
2472 '*sndbuf': 'size',
2473 '*vnet_hdr': 'bool',
2474 '*vhost': 'bool',
2475 '*vhostfd': 'str',
2476 '*vhostforce': 'bool' } }
2477
2478##
2479# @NetdevSocketOptions
2480#
2481# Connect the VLAN to a remote VLAN in another QEMU virtual machine using a TCP
2482# socket connection.
2483#
2484# @fd: #optional file descriptor of an already opened socket
2485#
2486# @listen: #optional port number, and optional hostname, to listen on
2487#
2488# @connect: #optional port number, and optional hostname, to connect to
2489#
2490# @mcast: #optional UDP multicast address and port number
2491#
2492# @localaddr: #optional source address and port for multicast and udp packets
2493#
2494# @udp: #optional UDP unicast address and port number
2495#
2496# Since 1.2
2497##
2498{ 'type': 'NetdevSocketOptions',
2499 'data': {
2500 '*fd': 'str',
2501 '*listen': 'str',
2502 '*connect': 'str',
2503 '*mcast': 'str',
2504 '*localaddr': 'str',
2505 '*udp': 'str' } }
2506
2507##
2508# @NetdevVdeOptions
2509#
2510# Connect the VLAN to a vde switch running on the host.
2511#
2512# @sock: #optional socket path
2513#
2514# @port: #optional port number
2515#
2516# @group: #optional group owner of socket
2517#
2518# @mode: #optional permissions for socket
2519#
2520# Since 1.2
2521##
2522{ 'type': 'NetdevVdeOptions',
2523 'data': {
2524 '*sock': 'str',
2525 '*port': 'uint16',
2526 '*group': 'str',
2527 '*mode': 'uint16' } }
2528
2529##
2530# @NetdevDumpOptions
2531#
2532# Dump VLAN network traffic to a file.
2533#
2534# @len: #optional per-packet size limit (64k default). Understands [TGMKkb]
2535# suffixes.
2536#
2537# @file: #optional dump file path (default is qemu-vlan0.pcap)
2538#
2539# Since 1.2
2540##
2541{ 'type': 'NetdevDumpOptions',
2542 'data': {
2543 '*len': 'size',
2544 '*file': 'str' } }
2545
2546##
2547# @NetdevBridgeOptions
2548#
2549# Connect a host TAP network interface to a host bridge device.
2550#
2551# @br: #optional bridge name
2552#
2553# @helper: #optional command to execute to configure bridge
2554#
2555# Since 1.2
2556##
2557{ 'type': 'NetdevBridgeOptions',
2558 'data': {
2559 '*br': 'str',
2560 '*helper': 'str' } }
2561
f6c874e3
SH
2562##
2563# @NetdevHubPortOptions
2564#
2565# Connect two or more net clients through a software hub.
2566#
2567# @hubid: hub identifier number
2568#
2569# Since 1.2
2570##
2571{ 'type': 'NetdevHubPortOptions',
2572 'data': {
2573 'hubid': 'int32' } }
2574
14aa0c2d
LE
2575##
2576# @NetClientOptions
2577#
2578# A discriminated record of network device traits.
2579#
2580# Since 1.2
2581##
2582{ 'union': 'NetClientOptions',
2583 'data': {
f6c874e3
SH
2584 'none': 'NetdevNoneOptions',
2585 'nic': 'NetLegacyNicOptions',
2586 'user': 'NetdevUserOptions',
2587 'tap': 'NetdevTapOptions',
2588 'socket': 'NetdevSocketOptions',
2589 'vde': 'NetdevVdeOptions',
2590 'dump': 'NetdevDumpOptions',
2591 'bridge': 'NetdevBridgeOptions',
2592 'hubport': 'NetdevHubPortOptions' } }
14aa0c2d
LE
2593
2594##
2595# @NetLegacy
2596#
2597# Captures the configuration of a network device; legacy.
2598#
2599# @vlan: #optional vlan number
2600#
2601# @id: #optional identifier for monitor commands
2602#
2603# @name: #optional identifier for monitor commands, ignored if @id is present
2604#
2605# @opts: device type specific properties (legacy)
2606#
2607# Since 1.2
2608##
2609{ 'type': 'NetLegacy',
2610 'data': {
2611 '*vlan': 'int32',
2612 '*id': 'str',
2613 '*name': 'str',
2614 'opts': 'NetClientOptions' } }
2615
2616##
2617# @Netdev
2618#
2619# Captures the configuration of a network device.
2620#
2621# @id: identifier for monitor commands.
2622#
2623# @opts: device type specific properties
2624#
2625# Since 1.2
2626##
2627{ 'type': 'Netdev',
2628 'data': {
2629 'id': 'str',
2630 'opts': 'NetClientOptions' } }
2631
5be8c759
PB
2632##
2633# @InetSocketAddress
2634#
2635# Captures a socket address or address range in the Internet namespace.
2636#
2637# @host: host part of the address
2638#
2639# @port: port part of the address, or lowest port if @to is present
2640#
2641# @to: highest port to try
2642#
2643# @ipv4: whether to accept IPv4 addresses, default try both IPv4 and IPv6
2644# #optional
2645#
2646# @ipv6: whether to accept IPv6 addresses, default try both IPv4 and IPv6
2647# #optional
2648#
2649# Since 1.3
2650##
2651{ 'type': 'InetSocketAddress',
2652 'data': {
2653 'host': 'str',
2654 'port': 'str',
2655 '*to': 'uint16',
2656 '*ipv4': 'bool',
2657 '*ipv6': 'bool' } }
2658
2659##
2660# @UnixSocketAddress
2661#
2662# Captures a socket address in the local ("Unix socket") namespace.
2663#
2664# @path: filesystem path to use
2665#
2666# Since 1.3
2667##
2668{ 'type': 'UnixSocketAddress',
2669 'data': {
2670 'path': 'str' } }
2671
2672##
2673# @SocketAddress
2674#
2675# Captures the address of a socket, which could also be a named file descriptor
2676#
2677# Since 1.3
2678##
2679{ 'union': 'SocketAddress',
2680 'data': {
2681 'inet': 'InetSocketAddress',
2682 'unix': 'UnixSocketAddress',
2683 'fd': 'String' } }
2684
208c9d1b
CB
2685##
2686# @getfd:
2687#
2688# Receive a file descriptor via SCM rights and assign it a name
2689#
2690# @fdname: file descriptor name
2691#
2692# Returns: Nothing on success
208c9d1b
CB
2693#
2694# Since: 0.14.0
2695#
2696# Notes: If @fdname already exists, the file descriptor assigned to
2697# it will be closed and replaced by the received file
2698# descriptor.
2699# The 'closefd' command can be used to explicitly close the
2700# file descriptor when it is no longer needed.
2701##
2702{ 'command': 'getfd', 'data': {'fdname': 'str'} }
2703
2704##
2705# @closefd:
2706#
2707# Close a file descriptor previously passed via SCM rights
2708#
2709# @fdname: file descriptor name
2710#
2711# Returns: Nothing on success
208c9d1b
CB
2712#
2713# Since: 0.14.0
2714##
2715{ 'command': 'closefd', 'data': {'fdname': 'str'} }
01d3c80d
AL
2716
2717##
2718# @MachineInfo:
2719#
2720# Information describing a machine.
2721#
2722# @name: the name of the machine
2723#
2724# @alias: #optional an alias for the machine name
2725#
2726# @default: #optional whether the machine is default
2727#
2728# Since: 1.2.0
2729##
2730{ 'type': 'MachineInfo',
2731 'data': { 'name': 'str', '*alias': 'str',
2732 '*is-default': 'bool' } }
2733
2734##
2735# @query-machines:
2736#
2737# Return a list of supported machines
2738#
2739# Returns: a list of MachineInfo
2740#
2741# Since: 1.2.0
2742##
2743{ 'command': 'query-machines', 'returns': ['MachineInfo'] }
e4e31c63
AL
2744
2745##
2746# @CpuDefinitionInfo:
2747#
2748# Virtual CPU definition.
2749#
2750# @name: the name of the CPU definition
2751#
2752# Since: 1.2.0
2753##
2754{ 'type': 'CpuDefinitionInfo',
2755 'data': { 'name': 'str' } }
2756
2757##
2758# @query-cpu-definitions:
2759#
2760# Return a list of supported virtual CPU definitions
2761#
2762# Returns: a list of CpuDefInfo
2763#
2764# Since: 1.2.0
2765##
2766{ 'command': 'query-cpu-definitions', 'returns': ['CpuDefinitionInfo'] }
ba1c048a
CB
2767
2768# @AddfdInfo:
2769#
2770# Information about a file descriptor that was added to an fd set.
2771#
2772# @fdset-id: The ID of the fd set that @fd was added to.
2773#
2774# @fd: The file descriptor that was received via SCM rights and
2775# added to the fd set.
2776#
2777# Since: 1.2.0
2778##
2779{ 'type': 'AddfdInfo', 'data': {'fdset-id': 'int', 'fd': 'int'} }
2780
2781##
2782# @add-fd:
2783#
2784# Add a file descriptor, that was passed via SCM rights, to an fd set.
2785#
2786# @fdset-id: #optional The ID of the fd set to add the file descriptor to.
2787#
2788# @opaque: #optional A free-form string that can be used to describe the fd.
2789#
2790# Returns: @AddfdInfo on success
2791# If file descriptor was not received, FdNotSupplied
9ac54af0 2792# If @fdset-id is a negative value, InvalidParameterValue
ba1c048a
CB
2793#
2794# Notes: The list of fd sets is shared by all monitor connections.
2795#
2796# If @fdset-id is not specified, a new fd set will be created.
2797#
2798# Since: 1.2.0
2799##
2800{ 'command': 'add-fd', 'data': {'*fdset-id': 'int', '*opaque': 'str'},
2801 'returns': 'AddfdInfo' }
2802
2803##
2804# @remove-fd:
2805#
2806# Remove a file descriptor from an fd set.
2807#
2808# @fdset-id: The ID of the fd set that the file descriptor belongs to.
2809#
2810# @fd: #optional The file descriptor that is to be removed.
2811#
2812# Returns: Nothing on success
2813# If @fdset-id or @fd is not found, FdNotFound
2814#
2815# Since: 1.2.0
2816#
2817# Notes: The list of fd sets is shared by all monitor connections.
2818#
2819# If @fd is not specified, all file descriptors in @fdset-id
2820# will be removed.
2821##
2822{ 'command': 'remove-fd', 'data': {'fdset-id': 'int', '*fd': 'int'} }
2823
2824##
2825# @FdsetFdInfo:
2826#
2827# Information about a file descriptor that belongs to an fd set.
2828#
2829# @fd: The file descriptor value.
2830#
2831# @opaque: #optional A free-form string that can be used to describe the fd.
2832#
2833# Since: 1.2.0
2834##
2835{ 'type': 'FdsetFdInfo',
2836 'data': {'fd': 'int', '*opaque': 'str'} }
2837
2838##
2839# @FdsetInfo:
2840#
2841# Information about an fd set.
2842#
2843# @fdset-id: The ID of the fd set.
2844#
2845# @fds: A list of file descriptors that belong to this fd set.
2846#
2847# Since: 1.2.0
2848##
2849{ 'type': 'FdsetInfo',
2850 'data': {'fdset-id': 'int', 'fds': ['FdsetFdInfo']} }
2851
2852##
2853# @query-fdsets:
2854#
2855# Return information describing all fd sets.
2856#
2857# Returns: A list of @FdsetInfo
2858#
2859# Since: 1.2.0
2860#
2861# Note: The list of fd sets is shared by all monitor connections.
2862#
2863##
2864{ 'command': 'query-fdsets', 'returns': ['FdsetInfo'] }
99afc91d
DB
2865
2866##
2867# @TargetType
2868#
2869# Target CPU emulation type
2870#
2871# These parameters correspond to the softmmu binary CPU name that is currently
2872# running.
2873#
2874# Since: 1.2.0
2875##
2876{ 'enum': 'TargetType',
2877 'data': [ 'alpha', 'arm', 'cris', 'i386', 'lm32', 'm68k', 'microblazeel',
2878 'microblaze', 'mips64el', 'mips64', 'mipsel', 'mips', 'or32',
2879 'ppc64', 'ppcemb', 'ppc', 's390x', 'sh4eb', 'sh4', 'sparc64',
2880 'sparc', 'unicore32', 'x86_64', 'xtensaeb', 'xtensa' ] }
2881
2882##
2883# @TargetInfo:
2884#
2885# Information describing the QEMU target.
2886#
2887# @arch: the target architecture (eg "x86_64", "i386", etc)
2888#
2889# Since: 1.2.0
2890##
2891{ 'type': 'TargetInfo',
2892 'data': { 'arch': 'TargetType' } }
2893
2894##
2895# @query-target:
2896#
2897# Return information about the target for this QEMU
2898#
2899# Returns: TargetInfo
2900#
2901# Since: 1.2.0
2902##
2903{ 'command': 'query-target', 'returns': 'TargetInfo' }
411656f4
AK
2904
2905##
2906# @QKeyCode:
2907#
2908# An enumeration of key name.
2909#
2910# This is used by the send-key command.
2911#
2912# Since: 1.3.0
2913##
2914{ 'enum': 'QKeyCode',
2915 'data': [ 'shift', 'shift_r', 'alt', 'alt_r', 'altgr', 'altgr_r', 'ctrl',
2916 'ctrl_r', 'menu', 'esc', '1', '2', '3', '4', '5', '6', '7', '8',
2917 '9', '0', 'minus', 'equal', 'backspace', 'tab', 'q', 'w', 'e',
2918 'r', 't', 'y', 'u', 'i', 'o', 'p', 'bracket_left', 'bracket_right',
2919 'ret', 'a', 's', 'd', 'f', 'g', 'h', 'j', 'k', 'l', 'semicolon',
2920 'apostrophe', 'grave_accent', 'backslash', 'z', 'x', 'c', 'v', 'b',
2921 'n', 'm', 'comma', 'dot', 'slash', 'asterisk', 'spc', 'caps_lock',
2922 'f1', 'f2', 'f3', 'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10',
2923 'num_lock', 'scroll_lock', 'kp_divide', 'kp_multiply',
2924 'kp_subtract', 'kp_add', 'kp_enter', 'kp_decimal', 'sysrq', 'kp_0',
2925 'kp_1', 'kp_2', 'kp_3', 'kp_4', 'kp_5', 'kp_6', 'kp_7', 'kp_8',
2926 'kp_9', 'less', 'f11', 'f12', 'print', 'home', 'pgup', 'pgdn', 'end',
2927 'left', 'up', 'down', 'right', 'insert', 'delete', 'stop', 'again',
2928 'props', 'undo', 'front', 'copy', 'open', 'paste', 'find', 'cut',
2929 'lf', 'help', 'meta_l', 'meta_r', 'compose' ] }
e4c8f004 2930
9f328977
LC
2931##
2932# @KeyValue
2933#
2934# Represents a keyboard key.
2935#
2936# Since: 1.3.0
2937##
2938{ 'union': 'KeyValue',
2939 'data': {
2940 'number': 'int',
2941 'qcode': 'QKeyCode' } }
2942
e4c8f004
AK
2943##
2944# @send-key:
2945#
2946# Send keys to guest.
2947#
9f328977
LC
2948# @keys: An array of @KeyValue elements. All @KeyValues in this array are
2949# simultaneously sent to the guest. A @KeyValue.number value is sent
2950# directly to the guest, while @KeyValue.qcode must be a valid
2951# @QKeyCode value
e4c8f004
AK
2952#
2953# @hold-time: #optional time to delay key up events, milliseconds. Defaults
2954# to 100
2955#
2956# Returns: Nothing on success
2957# If key is unknown or redundant, InvalidParameter
2958#
2959# Since: 1.3.0
2960#
2961##
2962{ 'command': 'send-key',
9f328977 2963 'data': { 'keys': ['KeyValue'], '*hold-time': 'int' } }
ad39cf6d
LC
2964
2965##
2966# @screendump:
2967#
2968# Write a PPM of the VGA screen to a file.
2969#
2970# @filename: the path of a new PPM file to store the image
2971#
2972# Returns: Nothing on success
2973#
2974# Since: 0.14.0
2975##
2976{ 'command': 'screendump', 'data': {'filename': 'str'} }
6dd844db
PB
2977
2978##
2979# @nbd-server-start:
2980#
2981# Start an NBD server listening on the given host and port. Block
2982# devices can then be exported using @nbd-server-add. The NBD
2983# server will present them as named exports; for example, another
2984# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
2985#
2986# @addr: Address on which to listen.
2987#
2988# Returns: error if the server is already running.
2989#
2990# Since: 1.3.0
2991##
2992{ 'command': 'nbd-server-start',
2993 'data': { 'addr': 'SocketAddress' } }
2994
2995##
2996# @nbd-server-add:
2997#
2998# Export a device to QEMU's embedded NBD server.
2999#
3000# @device: Block device to be exported
3001#
3002# @writable: Whether clients should be able to write to the device via the
3003# NBD connection (default false). #optional
3004#
3005# Returns: error if the device is already marked for export.
3006#
3007# Since: 1.3.0
3008##
3009{ 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
3010
3011##
3012# @nbd-server-stop:
3013#
3014# Stop QEMU's embedded NBD server, and unregister all devices previously
3015# added via @nbd-server-add.
3016#
3017# Since: 1.3.0
3018##
3019{ 'command': 'nbd-server-stop' }