$ sudo virsh vol-dumpxml /mnt/data/devel/media/Fedora-16-x86_64-Live-KDE.iso <volume> <name>Fedora-16-x86_64-Live-KDE.iso</name> <key>/mnt/data/devel/media/Fedora-16-x86_64-Live-KDE.iso</key> <source> </source> <capacity unit='bytes'>729808896</capacity> <allocation unit='bytes'>729812992</allocation> <target> <path>/mnt/data/devel/media/Fedora-16-x86_64-Live-KDE.iso</path> <format type='iso'/> <permissions> <mode>0664</mode> <owner>107</owner> <group>107</group> <label>system_u:object_r:virt_content_t:s0</label> </permissions> <timestamps> <atime>1370873447.730808726</atime> <mtime>1327456833.533731606</mtime> <ctime>1369755636.470550602</ctime> </timestamps> </target> </volume> $ sudo virsh vol-clone /mnt/data/devel/media/Fedora-16-x86_64-Live-KDE.iso test.iso error: Failed to clone vol from Fedora-16-x86_64-Live-KDE.iso error: internal error Child process (/usr/bin/qemu-img convert -f iso -O iso /mnt/data/devel/media/Fedora-16-x86_64-Live-KDE.iso /mnt/data/devel/media/test.iso) unexpected exit status 1: qemu-img: Unknown file format 'iso' qemu-img: Could not open '/mnt/data/devel/media/Fedora-16-x86_64-Live-KDE.iso' Not a big issue in practice since virt-manager doesn't try to clone readonly disks by default, and ISO media is almost always attached to a readonly disk. The storage cloning bits need some tweaking: - We should drop the illusion that BuildVolFrom is for anything but cloning or converting a disk image. Right now for raw images we support growing the image after completing the clone operation, but we should just tell any concerned user to use VolResize if they want that. - If we drop that, we can simplify the code a bit and fix this bug by just doing a byte for byte copy if the source and destination volume have the same format. Right now we only really do that for 'raw', and for everything else call out to qemu-img convert. Which isn't going to work for a readonly image type like VDI even though we should be able to support it easily.
Still relevant. The bigger issues mentioned at the end of the comment should probably be separate bugs. The simplest fix for this is to convert format=iso to format=raw when handing it off to qemu-img, because they are effectively the same thing. In src/storage/storage_backend.c virStorageBackendCreateQemuImgCmdFromVol there's code like this alread: /* Treat output block devices as 'raw' format */ if (vol->type == VIR_STORAGE_VOL_BLOCK) info.format = VIR_STORAGE_FILE_RAW; We need to do something similar for converting iso -> raw, both on 'vol' and 'inputvol'
Patch sent upstream: http://www.redhat.com/archives/libvir-list/2017-March/msg00251.html
Upstream now