qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] Merging backing file with new image


From: Eric Blake
Subject: Re: [Qemu-devel] Merging backing file with new image
Date: Mon, 02 Apr 2012 07:58:05 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:11.0) Gecko/20120329 Thunderbird/11.0.1

On 04/02/2012 12:51 AM, PANKAJ RAWAT wrote:
> Hi all
> i am using qcow2 image format , I create a backing file and to the new
> image i preform some I/O
> 
> qemu-img create -f qcow2 -b snap1 guestqcow2
> 
> Now I wanted to merge snap1 with guestqcow2. Is their is any command which
> can merge both disk into one single file

Using 'qemu-img commit guestqcow2' will update snap1 to contain the
contents of both files (this form of backwards merging will break
anything else that used snap1 as a backing file, and can only be done
offline, when no qemu process has guestqcow2 open).

You can also use the block_stream monitor command under a running qemu
to merge the contents of snap1 into guestqcow2 (forward merging).  The
offline counterpart would be using 'qemu-img rebase ...' in safe mode,
or using 'qemu-img convert ...' to create a new single file with the
combined contents of the original guestqcow2 and its backing file, then
rename that new file onto guestqcow2.

You seem to be asking a lot of questions about qcow2 lately; I'd
recommend that you read the existing documentation (man qemu-img, look
at docs/specs/qcow2.txt, and so forth) first.

-- 
Eric Blake   address@hidden    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]