All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: PANKAJ RAWAT <pankajr141@gmail.com>
Cc: qemu-devel <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] Merging backing file with new image
Date: Mon, 02 Apr 2012 07:58:05 -0600	[thread overview]
Message-ID: <4F79B06D.2060204@redhat.com> (raw)
In-Reply-To: <CABZruFCvXkXK8cY=joS4oe3S3GL0kVG2bO+BhnYBryLsvA9WSw@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1295 bytes --]

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   eblake@redhat.com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 620 bytes --]

      reply	other threads:[~2012-04-02 13:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-04-02  6:48 [Qemu-devel] Merging backing file with new image PANKAJ RAWAT
2012-04-02  6:51 ` PANKAJ RAWAT
2012-04-02 13:58   ` Eric Blake [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4F79B06D.2060204@redhat.com \
    --to=eblake@redhat.com \
    --cc=pankajr141@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.