From patchwork Mon Mar 6 21:58:52 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Cole Robinson X-Patchwork-Id: 94934 Delivered-To: patch@linaro.org Received: by 10.140.82.71 with SMTP id g65csp1602914qgd; Mon, 6 Mar 2017 14:02:03 -0800 (PST) X-Received: by 10.28.207.7 with SMTP id f7mr15885285wmg.112.1488837723441; Mon, 06 Mar 2017 14:02:03 -0800 (PST) Return-Path: Received: from mx3-phx2.redhat.com (mx3-phx2.redhat.com. [209.132.183.24]) by mx.google.com with ESMTPS id b83si11387646wmb.29.2017.03.06.14.02.02 (version=TLS1 cipher=AES128-SHA bits=128/128); Mon, 06 Mar 2017 14:02:03 -0800 (PST) Received-SPF: pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) client-ip=209.132.183.24; Authentication-Results: mx.google.com; spf=pass (google.com: domain of libvir-list-bounces@redhat.com designates 209.132.183.24 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com 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 Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com $ 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 open '/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=972784 https://bugzilla.redhat.com/show_bug.cgi?id=1419395 --- src/storage/storage_util.c | 5 +++++ 1 file changed, 5 insertions(+) -- 2.9.3 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list 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(virStorageVolDefPtr inputvol, info->inputFormat = inputvol->target.format; if (inputvol->type == VIR_STORAGE_VOL_BLOCK) info->inputFormat = VIR_STORAGE_FILE_RAW; + if (info->inputFormat == VIR_STORAGE_FILE_ISO) + info->inputFormat = VIR_STORAGE_FILE_RAW; if (!(info->inputFormatStr = virStorageFileFormatTypeToString(info->inputFormat))) { virReportError(VIR_ERR_INTERNAL_ERROR, @@ -1175,6 +1177,9 @@ virStorageBackendCreateQemuImgCmdFromVol(virConnectPtr conn, if (vol->type == VIR_STORAGE_VOL_BLOCK) info.format = VIR_STORAGE_FILE_RAW; + if (info.format == VIR_STORAGE_FILE_ISO) + info.format = VIR_STORAGE_FILE_RAW; + if (!(type = virStorageFileFormatTypeToString(info.format))) { virReportError(VIR_ERR_INTERNAL_ERROR, _("unknown storage vol type %d"),