]> Git Repo - qemu.git/blame - qapi/block.json
qmp-commands: move 'block-set-write-threshold' doc to schema
[qemu.git] / qapi / block.json
CommitLineData
5db15096 1# -*- Mode: Python -*-
d3a48372
MAL
2
3##
4# = QAPI block definitions
5##
5db15096
BC
6
7# QAPI block core definitions
8{ 'include': 'block-core.json' }
9
d3a48372
MAL
10##
11# == QAPI block definitions (vm unrelated)
12##
13
2e95fa17 14##
f169f8fb 15# @BiosAtaTranslation:
2e95fa17
BC
16#
17# Policy that BIOS should use to interpret cylinder/head/sector
18# addresses. Note that Bochs BIOS and SeaBIOS will not actually
19# translate logical CHS to physical; instead, they will use logical
20# block addressing.
21#
22# @auto: If cylinder/heads/sizes are passed, choose between none and LBA
23# depending on the size of the disk. If they are not passed,
24# choose none if QEMU can guess that the disk had 16 or fewer
25# heads, large if QEMU can guess that the disk had 131072 or
26# fewer tracks across all heads (i.e. cylinders*heads<131072),
27# otherwise LBA.
28#
29# @none: The physical disk geometry is equal to the logical geometry.
30#
31# @lba: Assume 63 sectors per track and one of 16, 32, 64, 128 or 255
32# heads (if fewer than 255 are enough to cover the whole disk
33# with 1024 cylinders/head). The number of cylinders/head is
34# then computed based on the number of sectors and heads.
35#
36# @large: The number of cylinders per head is scaled down to 1024
37# by correspondingly scaling up the number of heads.
38#
39# @rechs: Same as @large, but first convert a 16-head geometry to
40# 15-head, by proportionally scaling up the number of
41# cylinders/head.
42#
43# Since: 2.0
44##
45{ 'enum': 'BiosAtaTranslation',
46 'data': ['auto', 'none', 'lba', 'large', 'rechs']}
47
2da44dd0 48##
5072f7b3 49# @FloppyDriveType:
2da44dd0
JS
50#
51# Type of Floppy drive to be emulated by the Floppy Disk Controller.
52#
53# @144: 1.44MB 3.5" drive
54# @288: 2.88MB 3.5" drive
55# @120: 1.2MB 5.25" drive
56# @none: No drive connected
57# @auto: Automatically determined by inserted media at boot
58#
59# Since: 2.6
60##
61{ 'enum': 'FloppyDriveType',
62 'data': ['144', '288', '120', 'none', 'auto']}
63
2e95fa17 64##
5072f7b3 65# @BlockdevSnapshotInternal:
2e95fa17 66#
75dfd402
KW
67# @device: the device name or node-name of a root node to generate the snapshot
68# from
2e95fa17
BC
69#
70# @name: the name of the internal snapshot to be created
71#
72# Notes: In transaction, if @name is empty, or any snapshot matching @name
73# exists, the operation will fail. Only some image formats support it,
74# for example, qcow2, rbd, and sheepdog.
75#
76# Since: 1.7
77##
895a2a80 78{ 'struct': 'BlockdevSnapshotInternal',
2e95fa17
BC
79 'data': { 'device': 'str', 'name': 'str' } }
80
81##
5072f7b3 82# @blockdev-snapshot-internal-sync:
2e95fa17
BC
83#
84# Synchronously take an internal snapshot of a block device, when the format
85# of the image used supports it.
86#
87# For the arguments, see the documentation of BlockdevSnapshotInternal.
88#
89# Returns: nothing on success
75dfd402 90# If @device is not a valid block device, GenericError
2e95fa17
BC
91# If any snapshot matching @name exists, or @name is empty,
92# GenericError
93# If the format of the image used does not support it,
94# BlockFormatFeatureNotSupported
95#
5072f7b3 96# Since: 1.7
2e95fa17
BC
97##
98{ 'command': 'blockdev-snapshot-internal-sync',
99 'data': 'BlockdevSnapshotInternal' }
100
101##
5072f7b3 102# @blockdev-snapshot-delete-internal-sync:
2e95fa17
BC
103#
104# Synchronously delete an internal snapshot of a block device, when the format
105# of the image used support it. The snapshot is identified by name or id or
106# both. One of the name or id is required. Return SnapshotInfo for the
107# successfully deleted snapshot.
108#
2dfb4c03
KW
109# @device: the device name or node-name of a root node to delete the snapshot
110# from
2e95fa17
BC
111#
112# @id: optional the snapshot's ID to be deleted
113#
114# @name: optional the snapshot's name to be deleted
115#
116# Returns: SnapshotInfo on success
2dfb4c03 117# If @device is not a valid block device, GenericError
2e95fa17
BC
118# If snapshot not found, GenericError
119# If the format of the image used does not support it,
120# BlockFormatFeatureNotSupported
121# If @id and @name are both not specified, GenericError
122#
5072f7b3 123# Since: 1.7
2e95fa17
BC
124##
125{ 'command': 'blockdev-snapshot-delete-internal-sync',
126 'data': { 'device': 'str', '*id': 'str', '*name': 'str'},
127 'returns': 'SnapshotInfo' }
128
129##
130# @eject:
131#
132# Ejects a device from a removable drive.
133#
fbe2d816
KW
134# @device: #optional Block device name (deprecated, use @id instead)
135#
136# @id: #optional The name or QOM path of the guest device (since: 2.8)
2e95fa17
BC
137#
138# @force: @optional If true, eject regardless of whether the drive is locked.
139# If not specified, the default value is false.
140#
141# Returns: Nothing on success
142# If @device is not a valid block device, DeviceNotFound
143#
144# Notes: Ejecting a device will no media results in success
145#
146# Since: 0.14.0
147##
fbe2d816
KW
148{ 'command': 'eject',
149 'data': { '*device': 'str',
150 '*id': 'str',
151 '*force': 'bool' } }
2e95fa17
BC
152
153##
154# @nbd-server-start:
155#
156# Start an NBD server listening on the given host and port. Block
157# devices can then be exported using @nbd-server-add. The NBD
158# server will present them as named exports; for example, another
159# QEMU instance could refer to them as "nbd:HOST:PORT:exportname=NAME".
160#
161# @addr: Address on which to listen.
ddffee39 162# @tls-creds: (optional) ID of the TLS credentials object. Since 2.6
2e95fa17
BC
163#
164# Returns: error if the server is already running.
165#
166# Since: 1.3.0
167##
168{ 'command': 'nbd-server-start',
ddffee39
DB
169 'data': { 'addr': 'SocketAddress',
170 '*tls-creds': 'str'} }
2e95fa17
BC
171
172##
173# @nbd-server-add:
174#
094138d0 175# Export a block node to QEMU's embedded NBD server.
2e95fa17 176#
094138d0 177# @device: The device name or node name of the node to be exported
2e95fa17
BC
178#
179# @writable: Whether clients should be able to write to the device via the
180# NBD connection (default false). #optional
181#
182# Returns: error if the device is already marked for export.
183#
184# Since: 1.3.0
185##
186{ 'command': 'nbd-server-add', 'data': {'device': 'str', '*writable': 'bool'} }
187
188##
189# @nbd-server-stop:
190#
191# Stop QEMU's embedded NBD server, and unregister all devices previously
192# added via @nbd-server-add.
193#
194# Since: 1.3.0
195##
196{ 'command': 'nbd-server-stop' }
197
a5ee7bd4 198##
5072f7b3 199# @DEVICE_TRAY_MOVED:
a5ee7bd4
WX
200#
201# Emitted whenever the tray of a removable device is moved by the guest or by
202# HMP/QMP commands
203#
2d76e724
KW
204# @device: Block device name. This is always present for compatibility
205# reasons, but it can be empty ("") if the image does not
206# have a device name associated.
207#
d750c3a9 208# @id: The name or QOM path of the guest device (since 2.8)
a5ee7bd4
WX
209#
210# @tray-open: true if the tray has been opened or false if it has been closed
211#
212# Since: 1.1
213##
214{ 'event': 'DEVICE_TRAY_MOVED',
2d76e724 215 'data': { 'device': 'str', 'id': 'str', 'tray-open': 'bool' } }
0ae053b7
CX
216
217##
5072f7b3 218# @QuorumOpType:
0ae053b7
CX
219#
220# An enumeration of the quorum operation types
221#
222# @read: read operation
223#
224# @write: write operation
225#
226# @flush: flush operation
227#
228# Since: 2.6
229##
230{ 'enum': 'QuorumOpType',
231 'data': [ 'read', 'write', 'flush' ] }
This page took 0.158606 seconds and 4 git commands to generate.