2009/3/21 John Wong <johnw@xxxxxxxxxxxx>: > I create the 30G qcow2 image file, installed winxp, winxp show me the > harddisk used 5G, but the image file size is 12G now. > can i shrink the image file size? how? It's not possible to directly reclaim the unused space (qemu is not aware of what is used and what is not); a workaround is first filling the unused space with zeros (using sdelete -c) and then compressing the image with qemu-img convert -c; the side effect of sdelete is that the image will grow to the limit of 30G, but then the empty space will be highly compressible. The alternative is dumping the FS and restoring it on a new image as suggested by Piavlo. Luca -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html