<driver name="tap" type="aio">
<source file='/var/lib/xen/images/fv0'/>
<target dev='hda' bus='ide'/>
+ <encryption type='...'>
+ ...
+ </encryption>
</disk>
...</pre>
<dl><dt><code>disk</code></dt><dd>The <code>disk</code> element is the main container for describing
<code>driver</code> element allows them to be selected. The <code>name</code>
attribute is the primary backend driver name, while the optional <code>type</code>
attribute provides the sub-type. <span class="since">Since 0.1.8</span>
+ </dd><dt><code>encryption</code></dt><dd>If present, specifies how the volume is encrypted. See
+ the <a href="formatstorageencryption.html">Storage Encryption</a> page
+ for more information.
</dd></dl>
<h4>
<a name="elementsUSB" id="elementsUSB">USB and PCI devices</a>
<driver name="tap" type="aio">
<source file='/var/lib/xen/images/fv0'/>
<target dev='hda' bus='ide'/>
+ <encryption type='...'>
+ ...
+ </encryption>
</disk>
...</pre>
attribute is the primary backend driver name, while the optional <code>type</code>
attribute provides the sub-type. <span class="since">Since 0.1.8</span>
</dd>
+ <dt><code>encryption</code></dt>
+ <dd>If present, specifies how the volume is encrypted. See
+ the <a href="formatstorageencryption.html">Storage Encryption</a> page
+ for more information.
+ </dd>
</dl>
<h4><a name="elementsUSB">USB and PCI devices</a></h4>
<start>
<ref name="domain"/>
</start>
+
+ <include href='storageencryption.rng'/>
<!--
We handle only document defining a domain
-->
<empty/>
</element>
</optional>
+ <optional>
+ <ref name="encryption"/>
+ </optional>
</define>
<!--
A disk description can be either of type file or block
VIR_FREE(def->dst);
VIR_FREE(def->driverName);
VIR_FREE(def->driverType);
+ virStorageEncryptionFree(def->encryption);
VIR_FREE(def);
}
char *bus = NULL;
char *cachetag = NULL;
char *devaddr = NULL;
+ virStorageEncryptionPtr encryption = NULL;
if (VIR_ALLOC(def) < 0) {
virReportOOMError(conn);
} else if ((flags & VIR_DOMAIN_XML_INTERNAL_STATUS) &&
xmlStrEqual(cur->name, BAD_CAST "state")) {
devaddr = virXMLPropString(cur, "devaddr");
+ } else if (encryption == NULL &&
+ xmlStrEqual(cur->name, BAD_CAST "encryption")) {
+ encryption = virStorageEncryptionParseNode(conn, node->doc,
+ cur);
+ if (encryption == NULL)
+ goto error;
}
}
cur = cur->next;
driverName = NULL;
def->driverType = driverType;
driverType = NULL;
+ def->encryption = encryption;
+ encryption = NULL;
cleanup:
VIR_FREE(bus);
VIR_FREE(driverName);
VIR_FREE(cachetag);
VIR_FREE(devaddr);
+ virStorageEncryptionFree(encryption);
return def;
virBufferAddLit(buf, " <readonly/>\n");
if (def->shared)
virBufferAddLit(buf, " <shareable/>\n");
+ if (def->encryption != NULL &&
+ virStorageEncryptionFormat(conn, buf, def->encryption) < 0)
+ return -1;
if (flags & VIR_DOMAIN_XML_INTERNAL_STATUS) {
virBufferAddLit(buf, " <state");
#include "internal.h"
#include "capabilities.h"
+#include "storage_encryption_conf.h"
#include "util.h"
#include "threads.h"
unsigned bus;
unsigned slot;
} pci_addr;
+ virStorageEncryptionPtr encryption;
};
static inline int