2013-05-03 09:25:37 -05:00
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
2009-08-19 14:50:10 -05:00
|
|
|
<body>
|
|
|
|
<h1>Storage volume encryption XML format</h1>
|
|
|
|
|
|
|
|
<ul id="toc"></ul>
|
|
|
|
|
|
|
|
<h2><a name="StorageEncryption">Storage volume encryption XML</a></h2>
|
|
|
|
|
|
|
|
<p>
|
|
|
|
Storage volumes may be encrypted, the XML snippet described below is used
|
|
|
|
to represent the details of the encryption. It can be used as a part
|
|
|
|
of a domain or storage configuration.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
The top-level tag of volume encryption specification
|
|
|
|
is <code>encryption</code>, with a mandatory
|
|
|
|
attribute <code>format</code>. Currently defined values
|
|
|
|
of <code>format</code> are <code>default</code> and <code>qcow</code>.
|
|
|
|
Each value of <code>format</code> implies some expectations about the
|
|
|
|
content of the <code>encryption</code> tag. Other format values may be
|
|
|
|
defined in the future.
|
|
|
|
</p>
|
|
|
|
<p>
|
|
|
|
The <code>encryption</code> tag can currently contain a sequence of
|
|
|
|
<code>secret</code> tags, each with mandatory attributes <code>type</code>
|
2016-05-30 06:47:46 -05:00
|
|
|
and either <code>uuid</code> or <code>usage</code>
|
|
|
|
(<span class="since">since 2.1.0</span>). The only currently defined
|
|
|
|
value of <code>type</code> is <code>passphrase</code>. The
|
|
|
|
<code>uuid</code> is "uuid" of the <code>secret</code> while
|
|
|
|
<code>usage</code> is the value "usage" subelement field.
|
|
|
|
A secret value can be set in libvirt by the
|
|
|
|
<a href="html/libvirt-libvirt-secret.html#virSecretSetValue">
|
|
|
|
<code>virSecretSetValue</code></a> API. Alternatively, if supported
|
2009-08-19 14:50:10 -05:00
|
|
|
by the particular volume format and driver, automatically generate a
|
|
|
|
secret value at the time of volume creation, and store it using the
|
|
|
|
specified <code>uuid</code>.
|
2011-04-01 17:02:10 -05:00
|
|
|
</p>
|
2009-08-19 14:50:10 -05:00
|
|
|
<h3><a name="StorageEncryptionDefault">"default" format</a></h3>
|
|
|
|
<p>
|
2014-09-10 02:25:40 -05:00
|
|
|
<code><encryption format="default"/></code> can be specified only
|
2009-08-19 14:50:10 -05:00
|
|
|
when creating a volume. If the volume is successfully created, the
|
|
|
|
encryption formats, parameters and secrets will be auto-generated by
|
|
|
|
libvirt and the attached <code>encryption</code> tag will be updated.
|
|
|
|
The unmodified contents of the <code>encryption</code> tag can be used
|
|
|
|
in later operations with the volume, or when setting up a domain that
|
|
|
|
uses the volume.
|
|
|
|
</p>
|
|
|
|
<h3><a name="StorageEncryptionQcow">"qcow" format</a></h3>
|
|
|
|
<p>
|
|
|
|
The <code>qcow</code> format specifies that the built-in encryption
|
|
|
|
support in <code>qcow</code>- or <code>qcow2</code>-formatted volume
|
|
|
|
images should be used. A single
|
|
|
|
<code><secret type='passphrase'></code> element is expected. If
|
|
|
|
the <code>secret</code> element is not present during volume creation,
|
|
|
|
a secret is automatically generated and attached to the volume.
|
|
|
|
</p>
|
2016-06-01 14:01:31 -05:00
|
|
|
<h3><a name="StorageEncryptionLuks">"luks" format</a></h3>
|
|
|
|
<p>
|
|
|
|
The <code>luks</code> format is specific to a luks encrypted volume
|
|
|
|
and the secret used in order to either encrypt or decrypt the volume.
|
|
|
|
A single <code><secret type='passphrase'...></code> element is
|
|
|
|
expected. The secret may be referenced via either a <code>uuid</code> or
|
|
|
|
<code>usage</code> attribute. One of the two must be present. When
|
|
|
|
present for volume creation, the secret will be used in order for
|
|
|
|
volume encryption. When present for domain usage, the secret will
|
|
|
|
be used as the passphrase to decrypt the volume.
|
|
|
|
<span class="since">Since 2.1.0</span>.
|
|
|
|
</p>
|
2009-08-19 14:50:10 -05:00
|
|
|
|
2016-06-01 14:01:31 -05:00
|
|
|
<h2><a name="example">Examples</a></h2>
|
2009-08-19 14:50:10 -05:00
|
|
|
|
|
|
|
<p>
|
|
|
|
Here is a simple example, specifying use of the <code>qcow</code> format:
|
|
|
|
</p>
|
|
|
|
|
|
|
|
<pre>
|
|
|
|
<encryption format='qcow'>
|
|
|
|
<secret type='passphrase' uuid='c1f11a6d-8c5d-4a3e-ac7a-4e171c5e0d4a' />
|
|
|
|
</encryption></pre>
|
2016-06-01 14:01:31 -05:00
|
|
|
|
|
|
|
<p>
|
|
|
|
Here is a simple example, specifying use of the <code>luks</code> format
|
|
|
|
where it's assumed that a <code>secret</code> has been defined using a
|
|
|
|
<code>usage</code> element with a <code>id</code> of "luks_example":
|
|
|
|
</p>
|
|
|
|
<pre>
|
|
|
|
<encryption format='luks'>
|
|
|
|
<secret type='passphrase' usage='luks_example'/>
|
|
|
|
</encryption>
|
|
|
|
</pre>
|
|
|
|
|
2009-08-19 14:50:10 -05:00
|
|
|
</body>
|
|
|
|
</html>
|