-
Notifications
You must be signed in to change notification settings - Fork 482
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
F 1345: Allow using LUKS volumes for KVM (#808)
* F #1345: KVM support for persistent luks volmes Support for attaching a persistent qemu luks encrypted disk, created as per the libvirt/qemu documentation. Private secret must be defined on the hypervisor for decryption and the image should contain "LUKS_SECRET" attribute. 1) Create the image and import into datastore: # qemu-img create --object secret,id=sec0,data=secretphrase -o key-secret=sec0 -f luks volume 1G 2) Create the secret on the hypervisor: # virsh secret-define volume-secret.xml # MYSECRET=`printf %s "secretphrase" | base64` # virsh secret-set-value $MYUUID $MYSECRET # virsh secret-dumpxml $MYUUID <secret ephemeral='no' private='yes'> <uuid>$MYUUID</uuid> <description>luks key</description> <usage type='volume'> <volume>rbd:one/one-123</volume> </usage> </secret> 3) Set the UUID in the image attributes, ie: # oneimage show 123 |grep LUKS LUKS_SECRET="$MYUUID" This should allow the disk attach to decryt the luks image and use as a normal disk within the VM. Co-authored-by: Laurence <laurencegill@users.noreply.github.com>
- Loading branch information
1 parent
f6e3c4e
commit 73c27a9
Showing
6 changed files
with
33 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters