On 05/21/2012 07:59 AM, Richard W.M. Jones wrote:

>>
>> 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

So 'qemu-img rebase' is able to rebase to any other image, even if
base.img is nowhere in the backing chain of modified.img?  That means it
is more powerful than runtime 'block-stream' monitor command under qemu,
which can only do a block pull from an earlier point in the backing chain.

> 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?

Seems reasonable to me.  A two-command sequence of qemu-img to
manipulate offline images isn't all that bad; it's different from the
case of a disk image in active use by qemu.

-- 
Eric Blake   ebl...@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to