From nobody Thu May 15 08:46:28 2025 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; dmarc=pass(p=none dis=none) header.from=redhat.com Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1526473817560504.3804642340024; Wed, 16 May 2018 05:30:17 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx09.intmail.prod.int.phx2.redhat.com [10.5.11.24]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 1CA1630D2932; Wed, 16 May 2018 12:30:15 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.21]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DA08630025FA; Wed, 16 May 2018 12:30:14 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 914514CAA0; Wed, 16 May 2018 12:30:14 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.25]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id w4GCTaHP001392 for ; Wed, 16 May 2018 08:29:36 -0400 Received: by smtp.corp.redhat.com (Postfix) id C29A22010CBB; Wed, 16 May 2018 12:29:36 +0000 (UTC) Received: from localhost.localdomain.com (ovpn-116-88.phx2.redhat.com [10.3.116.88]) by smtp.corp.redhat.com (Postfix) with ESMTP id 67A632010CB2 for ; Wed, 16 May 2018 12:29:36 +0000 (UTC) From: John Ferlan To: libvir-list@redhat.com Date: Wed, 16 May 2018 08:29:29 -0400 Message-Id: <20180516122931.30854-3-jferlan@redhat.com> In-Reply-To: <20180516122931.30854-1-jferlan@redhat.com> References: <20180516122931.30854-1-jferlan@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.25 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH v2 2/4] storage_util: Fix qemu qcow[2] encryption convert processing X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.84 on 10.5.11.24 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.44]); Wed, 16 May 2018 12:30:16 +0000 (UTC) X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" As with qcow[2] encryption create processing, the convert processing requires usage of the "encrypt.key-secret" option and secret objects for converting an input volume to use qcow[2] encryption. Assuming an input file sparse.img exists (e.g. qemu-img create -f raw sparse 500K): $ qemu-img convert -f raw -O qcow2 -o encryption=3Don sparse.img demo.img qemu-img: demo.img: error while converting qcow2: Parameter 'encrypt.key-secret' is required for cipher $ Unlike create processing, the convert processing cannot be done in one command option, such as: $ qemu-img convert -f raw -O qcow2 \ --object secret,id=3Ddemo.img_encrypt0,file=3D/path/to/secretFile \ -o encrypt.format=3Daes,encrypt.key-secret=3Ddemo.img_encrypt0 \ sparse.img demo.img qemu-img: Could not open 'demo.img': Parameter 'encrypt.key-secret' is required for cipher $ What convert processing requires is a two step process which first creates the object using the sizing parameters from the input source and then uses the --image-opts, -n, and --target-image-opts options along with inline driver options to describe the input and output files, thus resulting in: $ qemu-img create -f qcow2 \ --object secret,id=3Ddemo.img_encrypt0,file=3D/path/to/secretFile \ -o encrypt.format=3Daes,encrypt.key-secret=3Ddemo.img_encrypt0 \ demo.img 500K Formatting 'demo.img', fmt=3Dqcow2 size=3D512000 encrypt.format=3Daes encrypt.key-secret=3Dsec0 cluster_size=3D65536 lazy_refcounts=3Doff refcoun= t_bits=3D16 $ qemu-img convert --image-opts -n --target-image-opts \ --object secret,id=3Ddemo.img_encrypt0,file=3D/path/to/secretFile \ driver=3Draw,file.filename=3Dsparse.img \ driver=3Dqcow2,file.filename=3Ddemo.img,encrypt.key-secret=3Ddemo.img_e= ncrypt0 $ Similar processing would be used for LUKS encryption, except the "encrypt.format=3Daes" is not provided and the "encrypt.key-secret" is only "key-secret", e.g.: $ qemu-img create -f luks \ --object secret,id=3Ddemo.img_encrypt0,file=3D/path/to/secretFile \ -o key-secret=3Ddemo.img_encrypt0 \ demo.img 500K Formatting 'demo.img', fmt=3Dluks size=3D512000 key-secret=3Ddemo.img_encry= pt0 $ qemu-img convert --image-opts -n --target-image-opts \ --object secret,id=3Ddemo.img_encrypt0,file=3D/path/to/secretFile \ driver=3Draw,file.filename=3Dsparse.img \ driver=3Dluks,file.filename=3Ddemo.img,key-secret=3Ddemo.img_encrypt0 $ This patch handles the convert processing by running the processing in a do..while loop essentially reusing the existing create logic and arguments to create the target vol from the inputvol and then converting the inputvol using new arguments. Signed-off-by: John Ferlan --- docs/formatstorageencryption.html.in | 10 ++ src/storage/storage_util.c | 113 ++++++++++++++++-= ---- src/storage/storage_util.h | 10 +- .../qcow2-from-logical-compat.argv | 9 +- .../qcow2-nobacking-convert-prealloc-compat.argv | 9 +- .../qcow2-nocapacity-convert-prealloc.argv | 9 +- tests/storagevolxml2argvtest.c | 61 ++++++++--- 7 files changed, 178 insertions(+), 43 deletions(-) diff --git a/docs/formatstorageencryption.html.in b/docs/formatstorageencry= ption.html.in index 23efbf932e..984c7d8b8b 100644 --- a/docs/formatstorageencryption.html.in +++ b/docs/formatstorageencryption.html.in @@ -38,6 +38,16 @@ secret value at the time of volume creation, and store it using the specified uuid.

+

+ Since 4.4.0, the command line generated + by libvirt to create a default or qcow + encrypted volume has changed. This is a result of changes made + to qemu-img in QEMU 2.9 which requires different arguments to be + provided in order to create a qcow encrypted volume. This change + is not compatible with older qemu-img images and there is no plan + to provide backwards compatibility. It is strongly recommended + to use the "luks" encryption format. +

"default" format

<encryption format=3D"default"/> can be specified= only diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index a8a6a3e401..29adf0cdbe 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -943,12 +943,15 @@ storageBackendCreateQemuImgCheckEncryption(int format, =20 static int storageBackendCreateQemuImgSetInput(virStorageVolDefPtr inputvol, + virStorageVolEncryptConvertStep conver= tStep, struct _virStorageBackendQemuImgInfo *= info) { - if (!(info->inputPath =3D inputvol->target.path)) { - virReportError(VIR_ERR_INVALID_ARG, "%s", - _("missing input volume target path")); - return -1; + if (convertStep !=3D VIR_STORAGE_VOL_ENCRYPT_CREATE) { + if (!(info->inputPath =3D inputvol->target.path)) { + virReportError(VIR_ERR_INVALID_ARG, "%s", + _("missing input volume target path")); + return -1; + } } =20 info->inputFormat =3D inputvol->target.format; @@ -1119,6 +1122,7 @@ static int virStorageBackendCreateQemuImgSetInfo(virStoragePoolObjPtr pool, virStorageVolDefPtr vol, virStorageVolDefPtr inputvol, + virStorageVolEncryptConvertStep conv= ertStep, struct _virStorageBackendQemuImgInfo= *info) { /* Treat output block devices as 'raw' format */ @@ -1166,7 +1170,7 @@ virStorageBackendCreateQemuImgSetInfo(virStoragePoolO= bjPtr pool, } =20 if (inputvol && - storageBackendCreateQemuImgSetInput(inputvol, info) < 0) + storageBackendCreateQemuImgSetInput(inputvol, convertStep, info) <= 0) return -1; =20 if (virStorageSourceHasBacking(&vol->target) && @@ -1185,6 +1189,27 @@ virStorageBackendCreateQemuImgSetInfo(virStoragePool= ObjPtr pool, } =20 =20 +static void +virStorageBackendCreateQemuImgCmdEncryptConvert(virCommandPtr cmd, + virStorageEncryptionPtr en= c, + struct _virStorageBackendQ= emuImgInfo info) +{ + /* source */ + virCommandAddArgFormat(cmd, "driver=3Draw,file.filename=3D%s", info.in= putPath); + + /* dest */ + if (enc->format =3D=3D VIR_STORAGE_ENCRYPTION_FORMAT_LUKS) { + virCommandAddArgFormat(cmd, + "driver=3Dluks,file.filename=3D%s,key-secre= t=3D%s", + info.path, info.secretAlias); + } else { + virCommandAddArgFormat(cmd, + "driver=3Dqcow2,file.filename=3D%s,encrypt.= key-secret=3D%s", + info.path, info.secretAlias); + } +} + + /* Create a qemu-img virCommand from the supplied arguments */ virCommandPtr virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool, @@ -1192,7 +1217,8 @@ virStorageBackendCreateQemuImgCmdFromVol(virStoragePo= olObjPtr pool, virStorageVolDefPtr inputvol, unsigned int flags, const char *create_tool, - const char *secretPath) + const char *secretPath, + virStorageVolEncryptConvertStep c= onvertStep) { virCommandPtr cmd =3D NULL; struct _virStorageBackendQemuImgInfo info =3D { @@ -1208,22 +1234,30 @@ virStorageBackendCreateQemuImgCmdFromVol(virStorage= PoolObjPtr pool, .secretPath =3D secretPath, .secretAlias =3D NULL, }; - virStorageEncryptionInfoDefPtr enc =3D NULL; + virStorageEncryptionPtr enc =3D NULL; + virStorageEncryptionInfoDefPtr encinfo =3D NULL; =20 virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, NULL); =20 - if (virStorageBackendCreateQemuImgSetInfo(pool, vol, inputvol, &info) = < 0) + if (virStorageBackendCreateQemuImgSetInfo(pool, vol, inputvol, + convertStep, &info) < 0) goto error; =20 cmd =3D virCommandNew(create_tool); =20 - /* ignore the backing volume when we're converting a volume */ - if (info.inputPath) + /* ignore the backing volume when we're converting a volume + * including when we're doing a two step convert during create */ + if (info.inputPath || convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_CREAT= E) info.backingPath =3D NULL; =20 - if (info.inputPath) + /* Converting to use encryption is a two step process - step 1 is to + * create the image and step 2 is to convert it using special argument= s */ + if (info.inputPath && convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_NONE) virCommandAddArgList(cmd, "convert", "-f", info.inputFormatStr, "-O", info.type, NULL); + else if (info.inputPath && convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_= CONVERT) + virCommandAddArgList(cmd, "convert", "--image-opts", "-n", + "--target-image-opts", NULL); else virCommandAddArgList(cmd, "create", "-f", info.type, NULL); =20 @@ -1241,19 +1275,23 @@ virStorageBackendCreateQemuImgCmdFromVol(virStorage= PoolObjPtr pool, if (storageBackendCreateQemuImgSecretObject(cmd, info.secretPath, info.secretAlias) < 0) goto error; - enc =3D &vol->target.encryption->encinfo; + enc =3D vol->target.encryption; + encinfo =3D &enc->encinfo; } =20 - if (storageBackendCreateQemuImgSetOptions(cmd, enc, info) < 0) - goto error; + if (convertStep !=3D VIR_STORAGE_VOL_ENCRYPT_CONVERT) { + if (storageBackendCreateQemuImgSetOptions(cmd, encinfo, info) < 0) + goto error; + if (info.inputPath) + virCommandAddArg(cmd, info.inputPath); + virCommandAddArg(cmd, info.path); + if (!info.inputPath && (info.size_arg || !info.backingPath)) + virCommandAddArgFormat(cmd, "%lluK", info.size_arg); + } else { + virStorageBackendCreateQemuImgCmdEncryptConvert(cmd, enc, info); + } VIR_FREE(info.secretAlias); =20 - if (info.inputPath) - virCommandAddArg(cmd, info.inputPath); - virCommandAddArg(cmd, info.path); - if (!info.inputPath && (info.size_arg || !info.backingPath)) - virCommandAddArgFormat(cmd, "%lluK", info.size_arg); - return cmd; =20 error: @@ -1360,14 +1398,15 @@ storageBackendDoCreateQemuImg(virStoragePoolObjPtr = pool, virStorageVolDefPtr inputvol, unsigned int flags, const char *create_tool, - const char *secretPath) + const char *secretPath, + virStorageVolEncryptConvertStep convertStep) { int ret; virCommandPtr cmd; =20 cmd =3D virStorageBackendCreateQemuImgCmdFromVol(pool, vol, inputvol, flags, create_tool, - secretPath); + secretPath, convertStep= ); if (!cmd) return -1; =20 @@ -1388,6 +1427,7 @@ storageBackendCreateQemuImg(virStoragePoolObjPtr pool, int ret =3D -1; char *create_tool; char *secretPath =3D NULL; + virStorageVolEncryptConvertStep convertStep =3D VIR_STORAGE_VOL_ENCRYP= T_NONE; =20 virCheckFlags(VIR_STORAGE_VOL_CREATE_PREALLOC_METADATA, -1); =20 @@ -1402,8 +1442,33 @@ storageBackendCreateQemuImg(virStoragePoolObjPtr poo= l, if (storageBackendGenerateSecretData(pool, vol, &secretPath) < 0) goto cleanup; =20 - ret =3D storageBackendDoCreateQemuImg(pool, vol, inputvol, flags, - create_tool, secretPath); + /* Using an input file for encryption requires a multi-step process + * to create an image of the same size as the inputvol and then to + * convert the inputvol afterwards. */ + if (secretPath && inputvol) + convertStep =3D VIR_STORAGE_VOL_ENCRYPT_CREATE; + + do { + ret =3D storageBackendDoCreateQemuImg(pool, vol, inputvol, flags, + create_tool, secretPath, + convertStep); + + /* Failure to convert, attempt to delete what we created */ + if (ret < 0 && convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_CONVERT) + ignore_value(virFileRemove(vol->target.path, + vol->target.perms->uid, + vol->target.perms->gid)); + + if (ret < 0 || convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_NONE) + goto cleanup; + + if (convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_CREATE) + convertStep =3D VIR_STORAGE_VOL_ENCRYPT_CONVERT; + else if (convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_CONVERT) + convertStep =3D VIR_STORAGE_VOL_ENCRYPT_DONE; + } while (convertStep !=3D VIR_STORAGE_VOL_ENCRYPT_DONE); + + cleanup: if (secretPath) { unlink(secretPath); diff --git a/src/storage/storage_util.h b/src/storage/storage_util.h index 9307702754..6fc8e8972c 100644 --- a/src/storage/storage_util.h +++ b/src/storage/storage_util.h @@ -153,13 +153,21 @@ char *virStorageBackendStablePath(virStoragePoolObjPt= r pool, const char *devpath, bool loop); =20 +typedef enum { + VIR_STORAGE_VOL_ENCRYPT_NONE =3D 0, + VIR_STORAGE_VOL_ENCRYPT_CREATE, + VIR_STORAGE_VOL_ENCRYPT_CONVERT, + VIR_STORAGE_VOL_ENCRYPT_DONE, +} virStorageVolEncryptConvertStep; + virCommandPtr virStorageBackendCreateQemuImgCmdFromVol(virStoragePoolObjPtr pool, virStorageVolDefPtr vol, virStorageVolDefPtr inputvol, unsigned int flags, const char *create_tool, - const char *secretPath); + const char *secretPath, + virStorageVolEncryptConvertStep c= onvertStep); =20 int virStorageBackendSCSIFindLUs(virStoragePoolObjPtr pool, uint32_t scanhost); diff --git a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv b/= tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv index 849c5f0218..46d54d01c6 100644 --- a/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv +++ b/tests/storagevolxml2argvdata/qcow2-from-logical-compat.argv @@ -1,4 +1,9 @@ -qemu-img convert -f raw -O qcow2 \ +qemu-img create -f qcow2 \ --object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ -o encrypt.format=3Daes,encrypt.key-secret=3DOtherDemo.img_encrypt0,compat= =3D0.10 \ -/dev/HostVG/Swap /var/lib/libvirt/images/OtherDemo.img +/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img convert --image-opts -n --target-image-opts \ +--object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ +driver=3Draw,file.filename=3D/dev/HostVG/Swap \ +driver=3Dqcow2,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +encrypt.key-secret=3DOtherDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-= compat.argv b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc= -compat.argv index a95749eafa..b755c1e9c4 100644 --- a/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.= argv +++ b/tests/storagevolxml2argvdata/qcow2-nobacking-convert-prealloc-compat.= argv @@ -1,5 +1,10 @@ -qemu-img convert -f raw -O qcow2 \ +qemu-img create -f qcow2 \ --object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ -o encrypt.format=3Daes,encrypt.key-secret=3DOtherDemo.img_encrypt0,\ preallocation=3Dmetadata,compat=3D0.10 \ -/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img +/var/lib/libvirt/images/OtherDemo.img 5242880K +qemu-img convert --image-opts -n --target-image-opts \ +--object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ +driver=3Draw,file.filename=3D/var/lib/libvirt/images/sparse.img \ +driver=3Dqcow2,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +encrypt.key-secret=3DOtherDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc= .argv b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv index 51bdaaf684..fca8cba49b 100644 --- a/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv +++ b/tests/storagevolxml2argvdata/qcow2-nocapacity-convert-prealloc.argv @@ -1,5 +1,10 @@ -qemu-img convert -f raw -O qcow2 \ +qemu-img create -f qcow2 \ --object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ -o encrypt.format=3Daes,encrypt.key-secret=3DOtherDemo.img_encrypt0,\ preallocation=3Dfalloc,compat=3D0.10 \ -/var/lib/libvirt/images/sparse.img /var/lib/libvirt/images/OtherDemo.img +/var/lib/libvirt/images/OtherDemo.img 0K +qemu-img convert --image-opts -n --target-image-opts \ +--object secret,id=3DOtherDemo.img_encrypt0,file=3D/path/to/secretFile \ +driver=3Draw,file.filename=3D/var/lib/libvirt/images/sparse.img \ +driver=3Dqcow2,file.filename=3D/var/lib/libvirt/images/OtherDemo.img,\ +encrypt.key-secret=3DOtherDemo.img_encrypt0 diff --git a/tests/storagevolxml2argvtest.c b/tests/storagevolxml2argvtest.c index 4286c50c6e..e72e08a7d2 100644 --- a/tests/storagevolxml2argvtest.c +++ b/tests/storagevolxml2argvtest.c @@ -43,6 +43,7 @@ testCompareXMLToArgvFiles(bool shouldFail, unsigned long parse_flags) { char *actualCmdline =3D NULL; + virStorageVolEncryptConvertStep convertStep =3D VIR_STORAGE_VOL_ENCRYP= T_NONE; int ret =3D -1; =20 virCommandPtr cmd =3D NULL; @@ -79,20 +80,56 @@ testCompareXMLToArgvFiles(bool shouldFail, testSetVolumeType(vol, def); testSetVolumeType(inputvol, inputpool); =20 - cmd =3D virStorageBackendCreateQemuImgCmdFromVol(obj, vol, - inputvol, flags, - create_tool, - "/path/to/secretFile"); - if (!cmd) { - if (shouldFail) { - virResetLastError(); - ret =3D 0; + /* Using an input file for encryption requires a multi-step process + * to create an image of the same size as the inputvol and then to + * convert the inputvol afterwards. Since we only care about the + * command line we have to copy code from storageBackendCreateQemuImg + * and adjust it for the test needs. */ + if (inputvol && vol->target.encryption) + convertStep =3D VIR_STORAGE_VOL_ENCRYPT_CREATE; + + do { + cmd =3D virStorageBackendCreateQemuImgCmdFromVol(obj, vol, + inputvol, flags, + create_tool, + "/path/to/secretFil= e", + convertStep); + if (!cmd) { + if (shouldFail) { + virResetLastError(); + ret =3D 0; + } + goto cleanup; } - goto cleanup; - } =20 - if (!(actualCmdline =3D virCommandToString(cmd))) - goto cleanup; + if (convertStep !=3D VIR_STORAGE_VOL_ENCRYPT_CONVERT) { + if (!(actualCmdline =3D virCommandToString(cmd))) + goto cleanup; + } else { + char *createCmdline =3D actualCmdline; + char *cvtCmdline; + int rc; + + if (!(cvtCmdline =3D virCommandToString(cmd))) + goto cleanup; + + rc =3D virAsprintf(&actualCmdline, "%s\n%s", + createCmdline, cvtCmdline); + + VIR_FREE(createCmdline); + VIR_FREE(cvtCmdline); + if (rc < 0) + goto cleanup; + } + + if (convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_NONE) + convertStep =3D VIR_STORAGE_VOL_ENCRYPT_DONE; + else if (convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_CREATE) + convertStep =3D VIR_STORAGE_VOL_ENCRYPT_CONVERT; + else if (convertStep =3D=3D VIR_STORAGE_VOL_ENCRYPT_CONVERT) + convertStep =3D VIR_STORAGE_VOL_ENCRYPT_DONE; + + } while (convertStep !=3D VIR_STORAGE_VOL_ENCRYPT_DONE); =20 if (virTestCompareToFile(actualCmdline, cmdline) < 0) goto cleanup; --=20 2.14.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list