[PATCH] storage: Don't pass 'iso' format to qemu-img

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



$ 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(+)

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"),
-- 
2.9.3

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]
  Powered by Linux