<mode>0744</mode>
<label>virt_image_t</label>
</permissions>
+ <encryption type='...'>
+ ...
+ </encryption>
</target>
</pool></pre>
<dl><dt><code>path</code></dt><dd>Provides the location at which the pool will be mapped into
element contains the numeric group ID. The <code>label</code> element
contains the MAC (eg SELinux) label string.
<span class="since">Since 0.4.1</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>
<h3>
<a name="StoragePoolExtents" id="StoragePoolExtents">Device extents</a>
<mode>0744</mode>
<label>virt_image_t</label>
</permissions>
+ <encryption type='...'>
+ ...
+ </encryption>
</target>
</pool></pre>
contains the MAC (eg SELinux) label string.
<span class="since">Since 0.4.1</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>
<h3><a name="StoragePoolExtents">Device extents</a></h3>
<ref name='vol'/>
</start>
+ <include href='storageencryption.rng'/>
+
<define name='vol'>
<element name='volume'>
</optional>
<ref name='format'/>
<ref name='permissions'/>
+ <optional>
+ <ref name='encryption'/>
+ </optional>
</element>
</define>
VIR_FREE(def->target.path);
VIR_FREE(def->target.perms.label);
+ virStorageEncryptionFree(def->target.encryption);
VIR_FREE(def->backingStore.path);
VIR_FREE(def->backingStore.perms.label);
+ virStorageEncryptionFree(def->backingStore.encryption);
VIR_FREE(def);
}
char *allocation = NULL;
char *capacity = NULL;
char *unit = NULL;
+ xmlNodePtr node;
options = virStorageVolOptionsForPoolType(pool->type);
if (options == NULL)
"./target/permissions", 0600) < 0)
goto cleanup;
+ node = virXPathNode(conn, "./target/encryption", ctxt);
+ if (node != NULL) {
+ ret->target.encryption = virStorageEncryptionParseNode(conn, ctxt->doc,
+ node);
+ if (ret->target.encryption == NULL)
+ goto cleanup;
+ }
+
ret->backingStore.path = virXPathString(conn, "string(./backingStore/path)", ctxt);
virBufferAddLit(buf," </permissions>\n");
+ if (def->encryption != NULL &&
+ virStorageEncryptionFormat(conn, buf, def->encryption) < 0)
+ return -1;
+
virBufferVSprintf(buf, " </%s>\n", type);
return 0;
#include "internal.h"
#include "util.h"
+#include "storage_encryption_conf.h"
#include "threads.h"
#include <libxml/tree.h>
int format;
virStoragePerms perms;
int type; /* only used by disk backend for partition type */
+ /* Currently used only in virStorageVolDef.target, not in .backingstore. */
+ virStorageEncryptionPtr encryption;
};
<group>0</group>
<label>unconfined_u:object_r:virt_image_t:s0</label>
</permissions>
+ <encryption format='qcow'>
+ <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/>
+ </encryption>
</target>
<backingStore>
<path>/var/lib/libvirt/images/BaseDemo.img</path>