From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([208.118.235.92]:51974) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEhlu-00011i-Qj for qemu-devel@nongnu.org; Mon, 02 Apr 2012 09:58:20 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SEhlp-0000aT-MI for qemu-devel@nongnu.org; Mon, 02 Apr 2012 09:58:14 -0400 Received: from mx1.redhat.com ([209.132.183.28]:12946) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SEhlp-0000aF-EL for qemu-devel@nongnu.org; Mon, 02 Apr 2012 09:58:09 -0400 Message-ID: <4F79B06D.2060204@redhat.com> Date: Mon, 02 Apr 2012 07:58:05 -0600 From: Eric Blake MIME-Version: 1.0 References: In-Reply-To: Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enigECEA4BFA0E70BA015DCEF640" Subject: Re: [Qemu-devel] Merging backing file with new image List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: PANKAJ RAWAT Cc: qemu-devel This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigECEA4BFA0E70BA015DCEF640 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable 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 >=20 > qemu-img create -f qcow2 -b snap1 guestqcow2 >=20 > Now I wanted to merge snap1 with guestqcow2. Is their is any command wh= ich > 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. --=20 Eric Blake eblake@redhat.com +1-919-301-3266 Libvirt virtualization library http://libvirt.org --------------enigECEA4BFA0E70BA015DCEF640 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Public key at http://people.redhat.com/eblake/eblake.gpg Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iQEcBAEBCAAGBQJPebBtAAoJEKeha0olJ0NqHFkH/1WAy9iv/TLcvKjoBQNo8p2q unASe5VTQ0vun5IN7HF7CEVtbszUUhaAabunBnTMm5bKgLztQ2nGNgpAF9rabTJ4 tw8sP00E8AczrxhRNE+QQG8xJqFspgkNePPdCVu3uWD34CIYaaBF1oS378MGqKnR oJ1YWcLGy0ELePHGFPlqtJDLEr2Nhhv92kJFpxs5WEr4YSLXOWV76KBDGQj0d8dv 6Jp4dhugECcEJnYLx7Uc5AcfDsRrzM3DK9Fwn7CnrI7nra2XrT2WRc+u+f7g7Mru EDh2US99PqpxrL6erg2lRjhMZe0SKycP2iJsyXuDtPRCp0/SLNumy1zVwNGNK1M= =U2+v -----END PGP SIGNATURE----- --------------enigECEA4BFA0E70BA015DCEF640--