----- Original Message -----
> From: "Stefan Hajnoczi" <stefa...@gmail.com>
> To: "Federico Simoncelli" <fsimo...@redhat.com>
> Cc: qemu-devel@nongnu.org, kw...@redhat.com, mtosa...@redhat.com
> Sent: Thursday, February 23, 2012 4:47:38 PM
> Subject: Re: [Qemu-devel] Live Block Migration using Mirroring
>
> On Wed, Feb 22, 2012 at 5:13 PM, Federico Simoncelli
> <fsimo...@redhat.com> wrote:
> > Step 3 - Mirrored Live Snapshot
> > ===============================
> > A mirrored live snapshot is issued using src/hd0snap1 and
> > dst/hd0snap1 as
> > image files. (Where "<-" stands for "has backing file")
> >
> > [src/hd0base] <- [src/hd0snap1] <= VM1(read-write)
> >     ...      <- [dst/hd0snap1] <= VM1(write-only)
> >
> > $ qemu-img create -f qcow2 \
> >           -b /tmp/src/hd0base.qcow2 /tmp/src/hd0snap1.qcow2 20G
> > Formatting '/tmp/src/hd0snap1.qcow2', fmt=qcow2 size=21474836480
> > backing_file='/tmp/src/hd0base.qcow2' encryption=off
> > cluster_size=65536
> >
> > $ qemu-img create -f qcow2 \
> >           -b /tmp/dst/hd0base.qcow2 /tmp/dst/hd0snap1.qcow2 20G
> > Formatting '/tmp/dst/hd0snap1.qcow2', fmt=qcow2 size=21474836480
> > backing_file='/tmp/src/hd0base.qcow2' encryption=off
> > cluster_size=65536
>
> At this stage /tmp/dst/hd0base.qcow2 does not exist yet.  The
> qemu-img
> output you pasted shows /tmp/src/hd0base.qcow2 was actually used.
> Typo?

No that's part of the flag used in [PATCH 2/3] (Update the blkmirror
block driver): BDRV_O_NO_BACKING

It's also documented in the design:

http://www.ovirt.org/wiki/File:StorageLiveMigration2.png

> > (qemu) snapshot_blkdev -n ide0-hd0 \
> >         blkmirror:/tmp/src/hd0snap1.qcow2:/tmp/dst/hd0snap1.qcow2
> >         blkmirror
> >
> > Step 4 - Backing File Copy
> > ==========================
> > An external manager copies src/hd0base to the destination
> > dst/hd0base.
> >
> > [src/hd0base] <- [src/hd0snap1] <= VM1(read-write)
> > [dst/hd0base] <- [dst/hd0snap1] <= VM1(write-only)
> >
> > $ cp -a /tmp/src/hd0base.qcow2 /tmp/dst/hd0base.qcow2
>
> Are we missing a fixup step that changes backing_file in
> dst/hd0snap1.qcow2 to point at dst/hd0base.qcow2?

See above.

--
Federico

Reply via email to