提交 fc82f0ad 编写于 作者: J John Ferlan

docs: Reformat <disk> attribute description in formatdomain

Reformat the description to more cleanly delineate the attributes
for a <disk> element.
上级 106a2dda
...@@ -1562,56 +1562,77 @@ ...@@ -1562,56 +1562,77 @@
<dl> <dl>
<dt><code>disk</code></dt> <dt><code>disk</code></dt>
<dd>The <code>disk</code> element is the main container for describing <dd>The <code>disk</code> element is the main container for describing
disks. The <code>type</code> attribute is either "file", disks (<span class="since">since 0.0.3</span>).
"block", "dir", "network", or "volume" <dl>
and refers to the underlying source for the disk. The optional <dt><code>type</code> attribute
<code>device</code> attribute indicates how the disk is to be exposed <span class="since">since 0.0.3</span></dt>
to the guest OS. Possible values for this attribute are <dd>
"floppy", "disk", "cdrom", and "lun", defaulting to Valid values are "file", "block",
"disk". "lun" (<span class="since">since 0.9.10</span>) is only "dir" (<span class="since">since 0.7.5</span>),
valid when type is "block" and the target element's "bus" "network" (<span class="since">since 0.8.7</span>), or
attribute is "virtio", and behaves identically to "disk", "volume" (<span class="since">since 1.0.5</span>)
except that generic SCSI commands from the guest are accepted and refer to the underlying source for the disk.
and passed through to the physical device </dd>
- also note that device='lun' will only be recognized for <dt><code>device</code> attribute
actual raw devices, never for individual partitions or LVM <span class="since">since 0.1.4</span></dt>
partitions (in those cases, the kernel will reject the generic <dd>
SCSI commands, making it identical to device='disk'). Indicates how the disk is to be exposed to the guest OS. Possible
The optional <code>rawio</code> attribute values for this attribute are "floppy", "disk", "cdrom", and "lun",
(<span class="since">since 0.9.10</span>) indicates whether defaulting to "disk".
the disk is needs rawio capability; valid settings are "yes" <p>
or "no" (default is "no"). If any one disk in a domain has Using "lun" (<span class="since">since 0.9.10</span>) is only
rawio='yes', rawio capability will be enabled for all disks in valid when type is "block" and the target element's "bus"
the domain (because, in the case of QEMU, this capability can attribute is "virtio", and behaves identically to "disk",
only be set on a per-process basis). This attribute is only except that generic SCSI commands from the guest are accepted
valid when device is "lun". NB, <code>rawio</code> intends to and passed through to the physical device. Also note that
confine the capability per-device, however, current QEMU device='lun' will only be recognized for actual raw devices,
implementation gives the domain process broader capability but never for individual partitions or LVM partitions (in those
than that (per-process basis, affects all the domain disks). cases, the kernel will reject the generic SCSI commands, making
To confine the capability as much as possible for QEMU driver it identical to device='disk').
as this stage, <code>sgio</code> is recommended, it's more </p>
secure than <code>rawio</code>. </dd>
The optional <code>sgio</code> (<span class="since">since 1.0.2</span>) <dt><code>rawio</code> attribute
attribute indicates whether the kernel will filter unprivileged <span class="since">since 0.9.10</span></dt>
SG_IO commands for the disk, valid settings are "filtered" or <dd>
"unfiltered". Defaults to "filtered". Similar to <code>rawio</code>, Indicates whether the disk is needs rawio capability; valid
<code>sgio</code> is only valid for device 'lun'. settings are "yes" or "no" (default is "no"). If any one disk
The optional <code>snapshot</code> attribute indicates the default in a domain has rawio='yes', rawio capability will be enabled
behavior of the disk during disk snapshots: "internal" for all disks in the domain (because, in the case of QEMU, this
requires a file format such as qcow2 that can store both the capability can only be set on a per-process basis). This attribute
snapshot and the data changes since the snapshot; is only valid when device is "lun". NB, <code>rawio</code> intends
"external" will separate the snapshot from the live data; and to confine the capability per-device, however, current QEMU
"no" means the disk will not participate in snapshots. implementation gives the domain process broader capability
Read-only disks default to "no", while the default for other than that (per-process basis, affects all the domain disks).
disks depends on the hypervisor's capabilities. Some To confine the capability as much as possible for QEMU driver
hypervisors allow a per-snapshot choice as well, as this stage, <code>sgio</code> is recommended, it's more
during <a href="formatsnapshot.html">domain snapshot secure than <code>rawio</code>.
creation</a>. Not all snapshot modes are supported; </dd>
for example, <code>snapshot='yes'</code> with a transient disk <dt><code>sgio</code> attribute
generally does not make sense. <span class="since">Since 0.0.3; <span class="since">since 1.0.2</span></dt>
"device" attribute since 0.1.4; <dd>
"network" attribute since 0.8.7; "snapshot" since Indicates whether the kernel will filter unprivileged
0.9.5</span></dd> SG_IO commands for the disk, valid settings are "filtered" or
"unfiltered". Defaults to "filtered". Similar to <code>rawio</code>,
<code>sgio</code> is only valid for device 'lun'.
</dd>
<dt><code>snapshot</code> attribute
<span class="since">since 0.9.5</span></dt>
<dd>
Indicates the default behavior of the disk during disk snapshots:
"internal" requires a file format such as qcow2 that can store
both the snapshot and the data changes since the snapshot;
"external" will separate the snapshot from the live data; and
"no" means the disk will not participate in snapshots. Read-only
disks default to "no", while the default for other disks depends
on the hypervisor's capabilities. Some hypervisors allow a
per-snapshot choice as well, during
<a href="formatsnapshot.html">domain snapshot creation</a>.
Not all snapshot modes are supported; for example,
<code>snapshot='yes'</code> with a transient disk generally
does not make sense.
</dd>
</dl>
</dd>
<dt><code>source</code></dt> <dt><code>source</code></dt>
<dd>Representation of the disk <code>source</code> depends on the <dd>Representation of the disk <code>source</code> depends on the
disk <code>type</code> attribute value as follows: disk <code>type</code> attribute value as follows:
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册