qemu-devel
[Top][All Lists]
Advanced

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

Re: [Qemu-devel] Can the backing file of qcow2 points to a snapshot of b


From: Max Reitz
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
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.0.1

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 via email to

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