On 9/17/20 1:59 PM, Daniel P. Berrangé wrote:
We added support for LUKS with raw volumes, but never extended it to
cover qcow2 volumes.
In v2:
- Fixed confusion of src/dst volume types
- Fixed syntax check
- Now with unit tests
Daniel P. Berrang=C3=A9 (4):
scripts: fix logic error in argv wrapping code
util: detect LUKS encryption scheme in qcow2 files
tests: remove redundant LUKS volume data files
storage: add support for qcow2 LUKS encryption
scripts/test-wrap-argv.py | 2 +-
src/storage/storage_util.c | 70 ++++++++++++++-----
src/util/virqemu.c | 23 ++++--
src/util/virqemu.h | 1 +
src/util/virstoragefile.c | 16 +++++
.../luks-convert-encrypt.argv | 18 ++---
.../luks-convert-encrypt2fileqcow2.argv | 6 +-
.../luks-convert-encrypt2fileraw.argv | 6 +-
.../qcow2-luks-convert-encrypt.argv | 18 +++++
.../qcow2-luks-convert-encrypt2fileqcow2.argv | 14 ++++
.../qcow2-luks-convert-encrypt2fileraw.argv | 13 ++++
tests/storagevolxml2argvdata/qcow2-luks.argv | 8 +++
tests/storagevolxml2argvtest.c | 23 ++++--
...ncrypt2.xml =3D> vol-qcow2-luks-convert.xml} | 20 ++++--
.../{vol-encrypt1.xml =3D> vol-qcow2-luks.xml} | 18 +++--
tests/storagevolxml2xmlout/vol-qcow2-luks.xml | 31 ++++++++
tests/storagevolxml2xmltest.c | 1 +
17 files changed, 237 insertions(+), 51 deletions(-)
create mode 100644 tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt.a=
rgv
create mode 100644 tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2f=
ileqcow2.argv
create mode 100644 tests/storagevolxml2argvdata/qcow2-luks-convert-encrypt2f=
ileraw.argv
create mode 100644 tests/storagevolxml2argvdata/qcow2-luks.argv
rename tests/storagevolxml2xmlin/{vol-encrypt2.xml =3D> vol-qcow2-luks-conve=
rt.xml} (50%)
rename tests/storagevolxml2xmlin/{vol-encrypt1.xml =3D> vol-qcow2-luks.xml} =
(52%)
create mode 100644 tests/storagevolxml2xmlout/vol-qcow2-luks.xml
Reviewed-by: Michal Privoznik <mprivozn(a)redhat.com>
Michal