[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 0/2] Update documentation for qemu-img + add new
Re: [Qemu-devel] [PATCH 0/2] Update documentation for qemu-img + add new -B option
Wed, 4 Jun 2008 03:24:35 -0700
On Wed, Jun 4, 2008 at 12:37 AM, Jamie Lokier <address@hidden> wrote:
> I wonder if a useful option would be to be able to create an image
> relative to a _different_ base image. I.e.
I see what you mean. qemu-img could compare the content of each sector
in images A and B (no matter what A is based on) and infer and image
A' (based on B) equivalent to A.
I wonder too if it would be _that_ useful in real-world scenarios.
> Another thing, which might be easier and more useful, would be
> instantiating zeros in the source image into holes in the relative
> image. To save space, after lots of changes on the virtual hard disk
> and some zeroing. (Microsoft has a tool to do this with Virtual PC).
Actually "qemu-img convert A B" already does this: zeros in A are
converted to holes in B (more precisely: real holes if B is a raw
image, or undefined clusters if the qcow/qcow2 case). B in this
example would be a flat image.
If you wanted to do the same thing with B a relative image, the
qcow/qcow2 format would need to be extended because there is currently
no defined way to efficiently represent zero'd clusters in relative
images. (Or actually now that I think about it maybe we could
represent zero'd clusters as if they were compressed even when
compression is disabled.)
I am curious, does Virtual PC support relative aka copy-on-write images ?