[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Live Block Migration using Mirroring
From: |
Stefan Hajnoczi |
Subject: |
Re: [Qemu-devel] Live Block Migration using Mirroring |
Date: |
Thu, 23 Feb 2012 15:47:38 +0000 |
On Wed, Feb 22, 2012 at 5:13 PM, Federico Simoncelli
<address@hidden> wrote:
> Preparation
> ===========
>
> $ mkdir /tmp/{src/dst}
> $ qemu-img create -f qcow2 /tmp/src/hd0base.qcow2 20G
> Formatting '/tmp/src/hd0base.qcow2', fmt=qcow2 size=21474836480
> encryption=off cluster_size=65536
>
> Step 1 - Initital Scenario
> ==========================
> VM1 is running on the src/hd0base. (Where "<=" stands for "uses")
>
> [src/hd0base] <= VM1(read-write)
>
> $ qemu-system-x86_64 -hda /tmp/src/hd0base.qcow2 -monitor stdio
> QEMU 1.0.50 monitor - type 'help' for more information
> (qemu)
>
> 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?
> (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?
> Step 5 - Final Switch to Destination
> ====================================
> VM1 is now able to switch to the destination for both read and write
> operations.
>
> [src/hd0base] <- [src/hd0snap1] <= VM1(read-write)
>
> (qemu) snapshot_blkdev -n ide0-hd0 /tmp/dst/hd0snap1.qcow2
>
> --
> Federico
>
>
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, (continued)
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Federico Simoncelli, 2012/02/23
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Stefan Hajnoczi, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Paolo Bonzini, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Stefan Hajnoczi, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Paolo Bonzini, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Stefan Hajnoczi, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Paolo Bonzini, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Stefan Hajnoczi, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Stefan Hajnoczi, 2012/02/27
- Re: [Qemu-devel] [PATCH 1/3] Add blkmirror block driver, Paolo Bonzini, 2012/02/27
Re: [Qemu-devel] Live Block Migration using Mirroring,
Stefan Hajnoczi <=
Re: [Qemu-devel] Live Block Migration using Mirroring, Stefan Hajnoczi, 2012/02/23
[Qemu-devel] [PATCH 1/2] Add blkmirror block driver, Federico Simoncelli, 2012/02/24
[Qemu-devel] [PATCH 2/2] Add the blockdev-reopen and blockdev-migrate commands, Federico Simoncelli, 2012/02/24