On Fri, Sep 30, 2011 at 09:21:29PM +0200, nicolas prochazka wrote: > qemu-img from qemu 0.15 > > DEV-10.98.98.1:~# qemu-img info /mnt/disks/export/images/vm_import > image: /mnt/disks/export/images/vm_import > file format: qcow2 > virtual size: 20G (21474836480 bytes) > disk size: 12G > cluster_size: 65536 > > > DEV-10.98.98.1:~# qemu-img check > /mnt/disks/export/images/vm_import_1317298935151 > No errors were found on the image. > > DEV-10.98.98.1:~# qemu-img convert -O qcow2 > /mnt/disks/export/images/vm_import /mnt/disks/export-ns/TEST.qcow2 > qemu-img: error while reading sector 5406720: Input/output error
You can check whether this error is reproducible using qemu-io(1): ~/qemu$ ./qemu-io -c "read -v $((5406720 * 512)) 65536" /mnt/disks/export/images/vm_import This command should hexdump the cluster at 5406720 sectors. If this fails in the same way it will be easier to debug this command than running a full qemu-img convert each time and waiting for it to fail. Another useful bit of information: ~/qemu$ ./qemu-io -c "map" /mnt/disks/export/images/vm_import This prints out the guest -> image file cluster mapping and can be useful in understanding if/how the file is corrupted. Also, have you tried copying the qcow2 file just using cp(1)? It's worth checking that cp(1) succeeds and there isn't a real I/O Error (typically you would also see errors in dmesg). Stefan