On Fri, Apr 12, 2013 at 05:25:23PM +0800, me,apporc wrote:
After snapshot-delete, the qcow2 image file size doesn't
decrease, isn't
that a waste of disk space?
Yes, but that's life. When deleting an internal qcow2 snapshot,
QEMU will just mark the clusters as unused, it won't return them
to the underlying filesystem. These unused clusters will, however,
be re-used if the qcow2 file needs to grow later.
Would someone please tell me how to decrease the file size when
snapshot-delete, if that's possible?
You can't do it in place. The only option would be to use qemu-img
to clone the qcow2 file to a new qcow2 file & delete the original.
Daniel
--
|:
http://berrange.com -o-
http://www.flickr.com/photos/dberrange/ :|
|:
http://libvirt.org -o-
http://virt-manager.org :|
|:
http://autobuild.org -o-
http://search.cpan.org/~danberr/ :|
|:
http://entangle-photo.org -o-
http://live.gnome.org/gtk-vnc :|