How to use Encrypted Disk images for KVM based guests?
Issue
- I'm currently using
libvirt-0.10.2-18
on my RHEL machine and I'd like to:
- Convert the disk-image of the guests from RAW to QCOW2
- Encrypt these disk images after conversion.
- I used the following command to create the encrypted image (based on documentation I found online):
# qemu-img create -o encryption -f qcow2 CryptoTest.img 4G
- But, when I try to run it via virt-manager I get:
"Unable to execute QEMU command 'cont': Device 'drive-virtio-disk0' is encrypted"
- So, the created image seems to be encrypted, but I am not able to start the guest using this disk-image.
- I did not find anything on - how to set a password or key file for the encrypted image file and how to get it running.
Environment
- Red Hat Enterprise Linux 6.4 KVM host
- libvirt-0.10.2-18
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.