LUKS support for KVM (Feature #5402)

(Laurence Gill) #1

Hi all,

Trying to begin to add support for qemu luks volumes here:

Have the attach disk working, but a bit stumped on the initial deployment file, any pointers?


(Anton Todorov) #2

Hi Laurence,

I’ve just updated your ticket with some information. In brief - the option to add interface for editing the VM’s XML is under consideration, until then in my test setups I am inserting “fixers” in vmm/kvm/deploy script that alter the deployment XML before passing it to libvirt.

Hope this helps,

Best Regards,
Anton Todorov

(Laurence Gill) #3

Hi Anton,

Thank you for the reply, I think this could work, do you have an example I could look at? I’m not entirely sure how/if the core code passes the xml to the deploy script?


(Anton Todorov) #4

Hi Laurance,

The deploy script is executed on the HV nodes (by default the script is /var/tmp/one/vmm/kvm/deploy which is a copy of /var/lib/one/remotes/vmm/kvm/deploy on the front-end)
The domain XML is passed via stdin to the script and is saved to to the domain.X file:

So you have the domain XML in the $domain file. you could add code (the easiest is to call an external script with the $domain as argument) before date=virsh --connect $LIBVIRT_URI create $domain

Here is an example of tweaking the domain XML it is sort of obsolete but could give an idea how to handle the changes.

As already said - you should add/edit files in /var/lib/one/remotes/ and then sync to the HVs (to update /var/tmp/one/…)

Best Regards,
Anton Todorov

(Laurence Gill) #5

Hi Anton,

That’s great thanks, I will take a look. I got as far as breaking the deployment with an echo and now it makes more sense.