Hi, I have a problem with qemu-img convert tool in the master branch. The command 'qemu-img convert' failed to produce a valid image if the source image referenced a backing file. To reproduce, suppose we have an image base.qcow2 1. qemu-img create -b base.qcow2 -f qcow2 temp.qcow2 2. do something with temp.qcow2 (run a vm, write a file, etc.) 3. qemu-img convert -O qcow2 temp.qcow2 rebase.qcow2 The content of rebase.qcow2 is exactly the same as temp.qcow2, but without any backing file reference. This makes the file unusable. In earlier version, qemu-img convert produced a rebased version (it also removed reference to the backing files but the final image contains merged contents from both base.qcow2 and temp.qcow2) It seems that qemu-img convert assume '-B' option so it skips the unallocated part of the source file. The attached patch seems to fix the problem. (it modifies the patch found here http://git.savannah.gnu.org/cgit/qemu.git/commit/?id=93c65b47a6fb9ba0e2b89269a751ba3433a33427) --Akkarit