]> xenbits.xensource.com Git - libvirt.git/commit
storage: Add support to create a luks volume
authorJohn Ferlan <jferlan@redhat.com>
Thu, 2 Jun 2016 15:33:47 +0000 (11:33 -0400)
committerJohn Ferlan <jferlan@redhat.com>
Tue, 19 Jul 2016 13:40:01 +0000 (09:40 -0400)
commit5e46d7d6b693c1e3c9197c182302ac7125a856d9
treea9ec586b81d9f1808e26adec0064228eb7bbcf27
parentbd93ba64fdb899c2d581ab7506542f9663d21ffb
storage: Add support to create a luks volume

Partially resolves:
https://bugzilla.redhat.com/show_bug.cgi?id=1301021

If the volume xml was looking to create a luks volume take the necessary
steps in order to make that happen.

The processing will be:
 1. create a temporary file (virStorageBackendCreateQemuImgSecretPath)
   1a. use the storage driver state dir path that uses the pool and
       volume name as a base.

 2. create a secret object (virStorageBackendCreateQemuImgSecretObject)
   2a. use an alias combinding the volume name and "_luks0"
   2b. add the file to the object

 3. create/add luks options to the commandline (virQEMUBuildLuksOpts)
   3a. at the very least a "key-secret=%s" using the secret object alias
   3b. if found in the XML the various "cipher" and "ivgen" options

Signed-off-by: John Ferlan <jferlan@redhat.com>
src/libvirt_private.syms
src/storage/storage_backend.c
src/storage/storage_backend.h
src/util/virqemu.c
src/util/virqemu.h
tests/storagevolxml2argvtest.c