Received: from [140.186.70.92] (port=44401 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxyoY-00057O-O1 for qemu-devel@nongnu.org; Fri, 11 Mar 2011 04:39:20 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxyoW-0004wE-VL for qemu-devel@nongnu.org; Fri, 11 Mar 2011 04:39:18 -0500 Received: from web161605.mail.bf1.yahoo.com ([98.139.210.174]:38429) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PxyoW-0004vr-P8 for qemu-devel@nongnu.org; Fri, 11 Mar 2011 04:39:16 -0500 Message-ID: <920767.76291.qm@web161605.mail.bf1.yahoo.com> Date: Fri, 11 Mar 2011 01:39:15 -0800 (PST) From: SAURAV LAHIRI Subject: Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0 In-Reply-To: <4D79C1D7.1030105@redhat.com> MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1235860719-1299836355=:76291" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi , Jes Sorensen Cc: qemu-devel@nongnu.org --0-1235860719-1299836355=:76291 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thank you Stefan, Jes. So it appears that snapshot_blkdev is the way to go = for vm disk backup with running vms. In regard to merging changes, assuming that we go snapshot_blkdev rightaway= . Stefan's suggestion: "qemu-img commit" Jes's suggestion: "qemu-img convert" Does qemu-img convert apply to running VM's. In that case it would appear t= o be the more practical approach(since vm shutdown would not be required). Also incase If i have interpreted "qemu-img convert" incorrectly and does r= equire a VM shutdown. Then when is expected time when the "live merge" will= be available. Thanks and Regards Saurav Lahiri --- On Fri, 11/3/11, Jes Sorensen wrote: From: Jes Sorensen Subject: Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.1= 4.0 To: "Stefan Hajnoczi" Cc: "SAURAV LAHIRI" , qemu-devel@nongnu.org Date: Friday, 11 March, 2011, 2:31 On 03/10/11 22:04, Stefan Hajnoczi wrote: > On Thu, Mar 10, 2011 at 7:57 PM, SAURAV LAHIRI = wrote: >> The high level use case is that of being able to backup user specified d= isks of a VM without having to bring down the VM. >=20 > Excellent, that sounds exactly like Jes is addressing so future > QEMU/KVM releases will hopefully have the live snapshot/merge > capability. >=20 >> snapshot_blkdev: Regarding this=A0 I do have a couple of questions. >> >> 1. If the snapshot cannot be merged then it could mean that there are se= veral snapshot files. One readonly=A0 for each of the previous snapshots an= d the last one being the active one, which handles all the current writes. = Post backup If do have to restore to a particular snapshot then i would pro= bably have to copy all the files in the chain and maintain the entire chain= . But would it not affect read performance if several snapshot files are ma= intained, particularly if the VM is hosting a database like mysql ? Could y= ou please clarify. >=20 > If the VM is not running you can use the qemu-img commit command to > merge the snapshot back down into the base image.=A0 After that you only > have one image file again and can restart the VM.=A0 Hopefully the > deltas are small enough that this process is quick. >=20 > In the future a live merge command will take care of this and avoid > the downtime. Yep, qemu-img convert should be able to copy it into a single image so you can delete the chain. Cheers, Jes =0A=0A=0A --0-1235860719-1299836355=:76291 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you Stefan, Jes. So it appears that sna= pshot_blkdev is the way to go for vm disk backup with running vms.

I= n regard to merging changes, assuming that we go snapshot_blkdev rightaway.=
Stefan's suggestion: "qemu-img commit"
Jes's suggestion: "qemu-img c= onvert"

Does qemu-img convert apply to running VM's. In that case it= would appear to be the more practical approach(since vm shutdown would not= be required).


Also incase If i have interpreted "qemu-img conve= rt" incorrectly and does require a VM shutdown. Then when is expected time = when the "live merge" will be available.


Thanks and Regards
S= aurav Lahiri

--- On Fri, 11/3/11, Jes Sorensen <Jes.Sorense= n@redhat.com> wrote:

From: Jes Sorensen <Jes.Sorensen@redhat.com>
Subject: Re: [Qemu-devel] Issu= e with snapshot outside qcow2 disk - qemu 0.14.0
To: "Stefan Hajnoczi" &= lt;stefanha@gmail.com>
Cc: "SAURAV LAHIRI" <saurav_lahiri@yahoo.co= m>, qemu-devel@nongnu.org
Date: Friday, 11 March, 2011, 2:31

<= div class=3D"plainMail">On 03/10/11 22:04, Stefan Hajnoczi wrote:
> O= n Thu, Mar 10, 2011 at 7:57 PM, SAURAV LAHIRI <saur= av_lahiri@yahoo.com> wrote:
>> The high level use case is t= hat of being able to backup user specified disks of a VM without having to = bring down the VM.
>
> Excellent, that sounds exactly like Jes= is addressing so future
> QEMU/KVM releases will hopefully have the = live snapshot/merge
> capability.
>
>> snapshot_blkde= v: Regarding this  I do have a couple of questions.
>>
>> 1. If the snapshot cannot be merged the= n it could mean that there are several snapshot files. One readonly  f= or each of the previous snapshots and the last one being the active one, wh= ich handles all the current writes. Post backup If do have to restore to a = particular snapshot then i would probably have to copy all the files in the= chain and maintain the entire chain. But would it not affect read performa= nce if several snapshot files are maintained, particularly if the VM is hos= ting a database like mysql ? Could you please clarify.
>
> If = the VM is not running you can use the qemu-img commit command to
> me= rge the snapshot back down into the base image.  After that you only> have one image file again and can restart the VM.  Hopefully th= e
> deltas are small enough that this process is quick.
>
&= gt; In the future a live merge command will take care of this and avoid
> the downtime.

Yep, qemu-img convert should be able to= copy it into a single image so
you can delete the chain.

Cheers,=
Jes


=0A=0A=0A=0A --0-1235860719-1299836355=:76291--