From nobody Fri Apr 19 07:37:56 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; envelope-from=libvir-list-bounces@redhat.com; helo=mx3-phx2.redhat.com; Authentication-Results: mx.zoho.com; spf=pass (zoho.com: domain of redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com [209.132.183.24]) by mx.zohomail.com with SMTPS id 1488837768911905.4048266598284; Mon, 6 Mar 2017 14:02:48 -0800 (PST) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by mx3-phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v26Lx6nM021909; Mon, 6 Mar 2017 16:59:07 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v26Lx5OA031553 for ; Mon, 6 Mar 2017 16:59:05 -0500 Received: from colepc.redhat.com (ovpn-116-187.phx2.redhat.com [10.3.116.187]) by int-mx10.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id v26Lx42i014878; Mon, 6 Mar 2017 16:59:05 -0500 From: Cole Robinson To: libvirt-list@redhat.com Date: Mon, 6 Mar 2017 16:58:52 -0500 Message-Id: <147e79bed9f55fff77bc029bf6ad60b7d03961a6.1488837532.git.crobinso@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.23 X-loop: libvir-list@redhat.com Subject: [libvirt] [PATCH] storage: Don't pass 'iso' format to qemu-img 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-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" $ virsh vol-clone /tmp/test.iso new.iso error: Failed to clone vol from test.iso error: internal error: Child process (/bin/qemu-img convert -f iso -O iso /= tmp/test.iso /tmp/new.iso) unexpected exit status 1: qemu-img: Could not op= en '/tmp/test.iso': Unknown driver 'iso' Map iso->raw before sending the format value to qemu-img https://bugzilla.redhat.com/show_bug.cgi?id=3D972784 https://bugzilla.redhat.com/show_bug.cgi?id=3D1419395 --- src/storage/storage_util.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/storage/storage_util.c b/src/storage/storage_util.c index 41253b9..bf6f0b3 100644 --- a/src/storage/storage_util.c +++ b/src/storage/storage_util.c @@ -1009,6 +1009,8 @@ storageBackendCreateQemuImgSetInput(virStorageVolDefP= tr inputvol, info->inputFormat =3D inputvol->target.format; if (inputvol->type =3D=3D VIR_STORAGE_VOL_BLOCK) info->inputFormat =3D VIR_STORAGE_FILE_RAW; + if (info->inputFormat =3D=3D VIR_STORAGE_FILE_ISO) + info->inputFormat =3D VIR_STORAGE_FILE_RAW; if (!(info->inputFormatStr =3D virStorageFileFormatTypeToString(info->inputFormat))) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -1175,6 +1177,9 @@ virStorageBackendCreateQemuImgCmdFromVol(virConnectPt= r conn, if (vol->type =3D=3D VIR_STORAGE_VOL_BLOCK) info.format =3D VIR_STORAGE_FILE_RAW; =20 + if (info.format =3D=3D VIR_STORAGE_FILE_ISO) + info.format =3D VIR_STORAGE_FILE_RAW; + if (!(type =3D virStorageFileFormatTypeToString(info.format))) { virReportError(VIR_ERR_INTERNAL_ERROR, _("unknown storage vol type %d"), --=20 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list