Repair a corrupted qemu disk image
modprobe nbd qemu-nbd --connect=/dev/nbd0 bad_file.qcow2 ddrescue /dev/nbd0 new_file.raw qemu-nbd --disconnect /dev/nbd0 qemu-img convert -O qcow2 new_file.raw new_file.qcow2