On 02/23/2012 08:19 AM, Paolo Bonzini wrote:
>> > Signed-off-by: Federico Simoncelli <fsimo...@redhat.com>
> What is the usecase, and how can this be tested?

Oops, you explained it in part 0.

> 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

It seems to me that reusing the snapshot_blkdev command is a bit of a
misnomer.  It also forces you to use format autodetection for the
destination in the blkmirror phase.

I see two possibilities:

1) you can make a new command block_reopen; this fixes only the naming
problem.

2) you can hide the new format behind a new command to be used like this:

   block_migrate --mirror ide-hd0 /tmp/dst/hd0snap1.qcow2
   ...
   block_migrate --switch ide-hd0

This leave the possibility to specify the format in the future:

   block_migrate --mirror ide-hd0 /tmp/dst/hd0snap1.qcow2 qcow2

And we could have another sub-command

   block_mirror --stream ide-hd0 /tmp/dst/hd0.raw

to migrate block devices without shared storage and without an
intermediate snapshot.

Paolo

Reply via email to