tests: qemuxml2argv: Add disk image with encrypted backing file

Add another disk to luks-disks-source-qcow2 case to cover a backing
chain with encrypted members.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
This commit is contained in:
Peter Krempa 2020-01-10 17:32:33 +01:00
parent 37d51dda5d
commit d06391d611
2 changed files with 26 additions and 0 deletions

View File

@ -69,4 +69,12 @@ encrypt.key-secret=virtio-disk4-luks-secret0,format=qcow2,if=none,\
id=drive-virtio-disk4' \
-device virtio-blk-pci,bus=pci.0,addr=0x8,drive=drive-virtio-disk4,\
id=virtio-disk4 \
-object secret,id=virtio-disk5-luks-secret0,\
data=9eao5F8qtkGt+seB1HYivWIxbtwUu6MQtg1zpj/oDtUsPr1q8wBYM91uEHCn6j/1,\
keyid=masterKey0,iv=AAECAwQFBgcICQoLDA0ODw==,format=base64 \
-drive file=/storage/guest_disks/encryptdisk5,encrypt.format=luks,\
encrypt.key-secret=virtio-disk5-luks-secret0,format=qcow2,if=none,\
id=drive-virtio-disk5 \
-device virtio-blk-pci,bus=pci.0,addr=0x9,drive=drive-virtio-disk5,\
id=virtio-disk5 \
-device virtio-balloon-pci,id=balloon0,bus=pci.0,addr=0x3

View File

@ -68,6 +68,24 @@
</source>
<target dev='vde' bus='virtio'/>
</disk>
<disk type='file' device='disk'>
<driver name='qemu' type='qcow2'/>
<source file='/storage/guest_disks/encryptdisk5'>
<encryption format='luks'>
<secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
</encryption>
</source>
<backingStore type='file'>
<format type='qcow2'/>
<source file='/storage/guest_disks/base.qcow2'>
<encryption format='luks'>
<secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
</encryption>
</source>
<backingStore/>
</backingStore>
<target dev='vdf' bus='virtio'/>
</disk>
<controller type='usb' index='0'>
<address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/>
</controller>