Fedora Account System
Red Hat Associate
Red Hat Customer
Description of problem: If you try to compress/convert an qcow2 image file, whos content is larger than 2 GB, it fails. Version-Release number of selected component (if applicable): qemu-img-2.3.0-5.fc22.x86_64 How reproducible: Always Steps to Reproduce: 1. Create an qcow2 image and install something inside (e. g. Windows), so that the content inside is larger than 2 GB. 2. Try to compress/convert the image. Actual results: # qemu-img convert -c -O qcow2 Windows10.qcow2 Windows10.qcow2.shrunk qemu-img: error while compressing sector 8620672: Input/output error qemu-img stops with this error, when the destination file (Windows10.qcow2.shrunk) reaches 2 GB: # ls -la Windows10* -rw-r----- 1 root root 38588776448 9. Jul 23:15 Windows10.qcow2 -rw-r--r-- 1 root root 2147614720 9. Jul 23:46 Windows10.qcow2.shrunk This is reproducable with all my image files, with content inside larger than 2 GB. The filesystem, where the images resists is ext4 and has enough free space. Expected results: Image file should be compressed/converted without problems. Additional info: Fedora 21 had qemu-img 2.1.3, which doesn't had this bug/problem. An internet search showed, that others also are having this problem. E. g. https://bugs.launchpad.net/qemu/+bug/1452062
Thanks for the report. Can you provide the info that Kevin asked for in the launchpad bug? "Can you please run qemu-img under strace -f and either provide the output as an attachment or paste the relevant failing call(s) if you can recognise them?"
Created attachment 1051991 [details] strace output (In reply to Cole Robinson from comment #1) > "Can you please run qemu-img under strace -f and either provide the output > as an attachment or paste the relevant failing call(s) if you can recognise > them?" Find attached the last 5000 line of the strace output. If you need a longer output, just let me know.
kevin, see comment #2 for strace output for qemu-img conversion failure. You requested it in the launchpad bug
Danke, Marc. This report is more helpful than the Launchpad one. As it turns out, this is already fixed in upstream qemu. The bug was introduced with commit 8c44dfbc (first in 2.3.0) and fixed with commit 3e5feb62 (first in v2.4.0-rc0). Cole, the fix is easy to backport. git cherry-pick will complain about a conflict, but what the patch really does there is just changing indentation, so it's trivial to resolve.
Thanks, I'll pull in the fix for the next f22 build
Actually that fix was already pushed in qemu-2.3.0-6.fc22 for bug 1214855, so duping to that *** This bug has been marked as a duplicate of bug 1214855 ***