From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([140.186.70.92]:48738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0TGV-0005zs-4y for qemu-devel@nongnu.org; Thu, 23 Feb 2012 02:39:04 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1S0TGU-0003sL-68 for qemu-devel@nongnu.org; Thu, 23 Feb 2012 02:38:59 -0500 Received: from mail-ee0-f45.google.com ([74.125.83.45]:45109) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1S0TGU-0003oG-0E for qemu-devel@nongnu.org; Thu, 23 Feb 2012 02:38:58 -0500 Received: by eekd17 with SMTP id d17so361857eek.4 for ; Wed, 22 Feb 2012 23:38:57 -0800 (PST) Sender: Paolo Bonzini Message-ID: <4F45ED0F.4060807@redhat.com> Date: Thu, 23 Feb 2012 08:38:55 +0100 From: Paolo Bonzini MIME-Version: 1.0 References: <1329930815-7995-1-git-send-email-fsimonce@redhat.com> <1329930815-7995-4-git-send-email-fsimonce@redhat.com> <4F45E88D.8030301@redhat.com> In-Reply-To: <4F45E88D.8030301@redhat.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH 3/3] Add nocreate option to snapshot_blkdev List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: kwolf@redhat.com, Federico Simoncelli , mtosatti@redhat.com, qemu-devel@nongnu.org On 02/23/2012 08:19 AM, Paolo Bonzini wrote: >> > Signed-off-by: Federico Simoncelli > 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