libvirt/tests/qemublocktestdata/xml2json/file-raw-luks.xml
Peter Krempa 23a7f94893 tests: qemublock: Add test for raw luks disk format
Apart from adding test data add a function which sets up fake secrets
for the test.

The top level disk image would generate the following '-drive' cmdline:

-drive file=/path/luks.img,key-secret=test1-encalias,format=luks,if=none,id=drive-dummy
-device virtio-blk-pci,scsi=off,drive=drive-dummy,id=dummy

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
2018-05-07 15:58:51 +02:00

16 lines
427 B
XML

<disk device='disk'>
<driver name='qemu' type='raw'/>
<source file='/path/luks.img'>
<encryption format='luks'>
<secret type='passphrase' uuid='0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f'/>
</encryption>
<privateData>
<nodenames>
<nodename type='storage' name='test2'/>
<nodename type='format' name='test1'/>
</nodenames>
</privateData>
</source>
<target dev='vda'/>
</disk>