diff options
author | Daniel P. Berrangé <berrange@redhat.com> | 2020-09-15 16:30:37 +0100 |
---|---|---|
committer | Daniel P. Berrangé <berrange@redhat.com> | 2020-09-18 11:22:28 +0100 |
commit | ecfc4094d832a23fb56e1825d799c93488c168d7 (patch) | |
tree | b15e14e59d4ca949912d0fb12145602326c2fab4 /tests/storagevolxml2xmlout | |
parent | 093ee8b3e258cc1474cc8f89d4a35f5672c27fab (diff) | |
download | libvirt-ecfc4094d832a23fb56e1825d799c93488c168d7.tar.gz |
storage: add support for qcow2 LUKS encryption
The storage driver was wired up to support creating raw volumes in LUKS
format, but was never adapted to support LUKS-in-qcow2. This is trivial
as it merely requires the encryption properties to be prefixed with
the "encrypt." prefix, and "encrypt.format=luks" when creating the
volume.
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
Diffstat (limited to 'tests/storagevolxml2xmlout')
-rw-r--r-- | tests/storagevolxml2xmlout/vol-qcow2-luks.xml | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/tests/storagevolxml2xmlout/vol-qcow2-luks.xml b/tests/storagevolxml2xmlout/vol-qcow2-luks.xml new file mode 100644 index 0000000000..2e2b7ce125 --- /dev/null +++ b/tests/storagevolxml2xmlout/vol-qcow2-luks.xml @@ -0,0 +1,31 @@ +<volume type='file'> + <name>OtherDemoLuks.img</name> + <key>/var/lib/libvirt/images/OtherDemoLuks.img</key> + <source> + </source> + <capacity unit='bytes'>5368709120</capacity> + <allocation unit='bytes'>294912</allocation> + <target> + <path>/var/lib/libvirt/images/OtherDemoLuks.img</path> + <format type='qcow2'/> + <permissions> + <mode>0644</mode> + <owner>0</owner> + <group>0</group> + <label>unconfined_u:object_r:virt_image_t:s0</label> + </permissions> + <encryption format='luks'> + <secret type='passphrase' uuid='e78d4b51-a2af-485f-b0f5-afca709a80f4'/> + </encryption> + </target> + <backingStore> + <path>/dev/null</path> + <format type='raw'/> + <permissions> + <mode>0644</mode> + <owner>0</owner> + <group>0</group> + <label>unconfined_u:object_r:virt_image_t:s0</label> + </permissions> + </backingStore> +</volume> |