From: John Ferlan
+ For volume creation, it is possible to specify the encryption + algorithm used to encrypt the luks volume. The following two + optional elements may be provided for that purpose. It is hypervisor + dependent as to which algorithms are supported. The default algorithm + used by the storage driver backend when using qemu-img to create + the volume is 'aes-256-cbc' using 'essiv' for initialization vector + generation and 'sha256' hash algorithm for both the cipher and the + initialization vector generation. +
+ +ciphernamesizemodehashivgencipher. If the cipher is not provided,
+ then an error will be generated by the parser.
+ namehash
- Here is a simple example, specifying use of the luks format
- where it's assumed that a secret has been defined using a
- usage element with a id of "luks_example":
+ Assuming a
+ luks secret is already defined using a
+ usage element with an name of "luks_example",
+ a simple example specifying use of the luks format
+ for either volume creation without a specific cipher being defined or
+ as part of a domain volume definition:
<encryption format='luks'>
@@ -91,5 +148,25 @@
</encryption>
+
+ Here is an example, specifying use of the luks format for
+ a specific cipher algorihm for volume creation:
+
+ <volume> + <name>twofish.luks</name> + <capacity unit='G'>5</capacity> + <target> + <path>/var/lib/libvirt/images/demo.luks</path> + <format type='luks'/> + <encryption format='luks'> + <secret type='passphrase' usage='luks_example'/> + <cipher name='twofish' size='256' mode='cbc' hash='sha256'/> + <ivgen name='plain64' hash='sha256'/> + </encryption> + </target> + </volume> ++