summaryrefslogtreecommitdiff
path: root/tests/storagevolxml2xmlout
diff options
context:
space:
mode:
authorDaniel P. Berrangé <berrange@redhat.com>2020-09-15 16:30:37 +0100
committerDaniel P. Berrangé <berrange@redhat.com>2020-09-18 11:22:28 +0100
commitecfc4094d832a23fb56e1825d799c93488c168d7 (patch)
treeb15e14e59d4ca949912d0fb12145602326c2fab4 /tests/storagevolxml2xmlout
parent093ee8b3e258cc1474cc8f89d4a35f5672c27fab (diff)
downloadlibvirt-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.xml31
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>