Creating a backing image for the master image that is encrypted using LUKS:
qemu-img create -f qcow2 -b dev.qcow2 -F qcow2 -o encrypt.format=luks,encrypt.key-secret=dev --object secret,id=dev,data='same_as_for_dev.qcow2' dev-inc.qcow2
libvirt configuration:
<disk type="file" device="disk">
<driver name="qemu" type="qcow2" cache="unsafe"/>
<source file="/home/user/qemu/dev-inc.qcow2"/>
<target dev="vda" bus="virtio"/>
<encryption format="luks" engine="qemu">
<secret type="passphrase" uuid="0a81f5b2-8403-7b23-c8d6-21ccc2f80d6f"/>
</encryption>
<address type="pci" domain="0x0000" bus="0x08" slot="0x00" function="0x0"/>
</disk>
getting this error:
Error starting domain: internal error: Unexpected enum value 0 for virStorageEncryptionEngine
Traceback (most recent call last):
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 72, in cb_wrapper
callback(asyncjob, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/asyncjob.py", line 108, in tmpcb
callback(*args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/libvirtobject.py", line 57, in newfn
ret = fn(self, *args, **kwargs)
File "/usr/share/virt-manager/virtManager/object/domain.py", line 1384, in startup
self._backend.create()
File "/usr/lib/python3/dist-packages/libvirt.py", line 1353, in create
raise libvirtError('virDomainCreate() failed')
libvirt.libvirtError: internal error: Unexpected enum value 0 for virStorageEncryptionEngine
Is it possible to crate a backing image for the encrypted qcow2, if yes, then what am I missing?