I was attempting one way to solve:
https://bugzilla.redhat.com/show_bug.cgi?id=1400332
"RFE: virt-builder should support templates with encrypted filesystems"
However this approach doesn't really work because templates containing
encrypted partitions cannot be compressed, and therefore the guest
template would be a multi-gigabyte download.
I better approach will likely be to use the new qcow2 encryption
(LUKS-based) recently written by Dan Berrange.
I am posting this patch just to record the code changes.
Rich.