
On Wed, 2016-06-22 at 17:56 -0500, libvirt_users@skagitattic.com wrote:
If we try it again but specify raw its MUCH faster
root@testingbox: 09:26 PM # virt-sparsify testimage.qcow2 testimage2.qcow2 --tmp /bigtmp --format raw Input disk virtual size = 53687091200 bytes (50.0G) Create overlay file in /bigtmp to protect source disk ... Examine source disk ... Copy to destination and make sparse ...
Sparsify operation completed with no errors. Before deleting the old disk, carefully check that the target disk boots and works correctly. root@testingbox: 09:27 PM #
This time it takes up more space and reports real and apparent size differently. It still reports as qcow2 with qemu-img.
# ls -slh testimage2.qcow2 1.7G -rw-r--r-- 1 root root 51G Jun 22 21:27 testimage2.qcow2 # qemu-img info testimage2.qcow2 image: testimage2.qcow2 file format: qcow2 virtual size: 50G (53687091200 bytes) disk size: 1.7G cluster_size: 65536 Format specific information: compat: 1.1 lazy refcounts: true
The '--format' option is to specify the image format for the input image. If you want the *output* image to be raw, you'll have to use '--convert raw'. -- Andrea Bolognani / Red Hat / Virtualization