|
From: | Mike Lovell |
Subject: | Re: [Qemu-discuss] QCOW2 real hard drive image |
Date: | Mon, 27 Aug 2012 10:52:34 -0600 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:14.0) Gecko/20120714 Thunderbird/14.0 |
On 08/18/2012 02:03 AM, Jerzy Grzegorek wrote:
I'd like to create the smallest possible qcow2 (or other format) real hard drive image. It is possible to create it without "dirty" no used sectors in the way like this (with additional options)qemu-img convert -f raw /dev/sda -O qcow2 disk.qcow2.img
unfortunately, i don't think qemu-img can determine whether or not a sector is 'dirty.' i'm guessing by 'dirty' you mean a sector that has had data written to it but the file system on top no longer needs the data because the file was removed or truncated or similar. determining which sector is 'dirty' in this case would depend on knowing what filesystem is used and what parts of the disk the filesystem currently has allocated and what is free space. i don't think qemu-img can do this.
you could try just adding -c to the command you listed and qemu-img will create a compressed qcow2. that could reduce the size of the resulting image significantly. other than that, compressing it further would take additional steps.
mike
[Prev in Thread] | Current Thread | [Next in Thread] |