All of lore.kernel.org
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: vt <vt@sangfor.com.cn>, qemu-devel <qemu-devel@nongnu.org>,
	kwolf <kwolf@redhat.com>, stefanha <stefanha@redhat.com>
Subject: Re: [Qemu-devel] Can the backing file of qcow2 points to a snapshot of base file?
Date: Mon, 6 Jul 2015 14:09:03 +0200	[thread overview]
Message-ID: <559A6FDF.9050101@redhat.com> (raw)
In-Reply-To: <201507061620581832887@sangfor.com.cn>

On 06.07.2015 10:20, vt wrote:
> Hi.
> If a base qcow2 image snapshot chain like this:
> base.qcow2: [A] -> [B] -> [C]
> [C] is the current image where guest read/write to,usually we create a
> new image base on the base.qcow2 like this
> qemu-img create -f qcow2 -o backing_file=/path/base.qcow2 new.qcow2
> so the data of new.qcow2 is from [C] of base.qcow2, assuming the
> new.qcow2 has not been write to since created.
> What I want is that the data of new.qcow2 is from [B] of base.qcow2,
> like this:
> qemu-img create -f qcow2 -o
> backing_file=/path/base.qcow2,backing_snapshot=B  new.qcow2
> Can the qemu support it now?
> Thanks
> ------------------------------------------------------------------------
> vt

Hi vt,

I don't think this is possible. For this to work, the snapshot would 
have to be loaded temporarily, but the only place I can see in the qemu 
code base where this is done is inside qemu-img and qemu-nbd, so qemu 
itself appearently does not support this.

What you can do is export the snapshot via qemu-nbd (-l) and then use 
that NBD server as a backing file with qemu. This is not very nice, but 
I don't suppose there are many people eager to implement the 
functionality you'd like to have (although I don't think it would be too 
difficult, frankly…).

Max

  reply	other threads:[~2015-07-06 12:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-06  8:20 [Qemu-devel] Can the backing file of qcow2 points to a snapshot of base file? vt
2015-07-06 12:09 ` Max Reitz [this message]
2015-07-07  2:00   ` [Qemu-devel] 回复: " vt

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=559A6FDF.9050101@redhat.com \
    --to=mreitz@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    --cc=vt@sangfor.com.cn \
    /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.