[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH v3] qemu-img: Implement 'diff' operation.
From: |
Richard W.M. Jones |
Subject: |
Re: [Qemu-devel] [PATCH v3] qemu-img: Implement 'diff' operation. |
Date: |
Mon, 21 May 2012 14:59:26 +0100 |
User-agent: |
Mutt/1.5.21 (2010-09-15) |
On Mon, May 21, 2012 at 03:29:22PM +0200, Kevin Wolf wrote:
> Am 17.05.2012 17:34, schrieb Richard W.M. Jones:
> > From: "Richard W.M. Jones" <address@hidden>
> >
> > This produces a qcow2 file which is the difference between
> > two disk images. ie, if:
> >
> > base.img - is a disk image (in any format)
> > modified.img - is base.img, copied and modified
> >
> > then:
> >
> > qemu-img diff -b base.img modified.img diff.qcow2
> >
> > creates 'diff.qcow2' which contains the differences between 'base.img'
> > and 'modified.img'. Note that 'diff.qcow2' has 'base.img' as its
> > backing file.
> >
> > Signed-off-by: Richard W.M. Jones <address@hidden>
> > Cc: Matthew Booth <address@hidden>
> > Cc: Pablo Iranzo Gómez <address@hidden>
> > Cc: Tomas Von Veschler <address@hidden>
>
> Hm, I'm wondering... If I have a command line like this:
>
> qemu-img diff -b base.img modified.img diff.qcow2
>
> Would this be equivalent to this sequence?
>
> qemu-img create -f qcow2 -b modified.img diff.qcow2
> qemu-img rebase -b base.img diff.qcow2
>
> Or is there some detail that I'm missing? If it is equivalent, this
> would suggest that either the new command isn't necessary at all or at
> least that it should reuse the qemu-img rebase code.
Yes. I tried for a while to work out the sequence of commands that
could make a diff using 'qemu-img rebase', but it wasn't obvious and I
gave up. It should at least be documented. How about the attached
patch?
Rich.
--
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
Read my programming blog: http://rwmj.wordpress.com
Fedora now supports 80 OCaml packages (the OPEN alternative to F#)
http://cocan.org/getting_started_with_ocaml_on_red_hat_and_fedora
0001-qemu-img-Explain-how-rebase-operation-can-be-used-to.patch
Description: Text document