Received: from [140.186.70.92] (port=39742 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1PxV2o-0000Gy-LN for qemu-devel@nongnu.org; Wed, 09 Mar 2011 20:52:03 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1PxV2n-0006Rm-65 for qemu-devel@nongnu.org; Wed, 09 Mar 2011 20:52:02 -0500 Received: from web161620.mail.bf1.yahoo.com ([98.139.211.142]:37334) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1PxV2m-0006Rg-Ug for qemu-devel@nongnu.org; Wed, 09 Mar 2011 20:52:01 -0500 Message-ID: <9678.79494.qm@web161620.mail.bf1.yahoo.com> Date: Wed, 9 Mar 2011 17:51:59 -0800 (PST) From: SAURAV LAHIRI Subject: Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0 In-Reply-To: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="0-1958729861-1299721919=:79494" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Stefan Hajnoczi Cc: qemu-devel@nongnu.org --0-1958729861-1299721919=:79494 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Thank you very much Stefan, Based on your suggestion I tried out the follow= ing two scenarios. Scenario 1: 1) I executed following with the vm in shutdown state. "#qemu-img snapshot -c snap1 /home/user1/lucid-vm2"=20 2) Brought the VM Up. 3) Inside the vm create a file. #touch samplefile 4) Shutdown the vm and copy the snapshot outside the original qcow2 #qemu-img convert -f qcow2 -O qcow2 -s snap1 /home/user1/lucid-vm2 /home/lu= cid-vm2-snap1 Result : When I bring up the vm do not see the samplefile which is the expe= cted behaviour. Scenario 2: =0A1) I executed following with the vm in shutdown state. =0A"#qemu-img snapshot -c snap1 /home/user1/lucid-vm2"=20 =0A 2) Bring up the VM. 3) Inside the vm create a file. =0A#touch samplefile =0A 4) VM is NOT Shutdown and copy the snapshot outside the original qcow2 =0A =0A#qemu-img convert -f qcow2 -O qcow2 -s snap1 /home/user1/lucid-vm2 /home= /lucid-vm2-snap1 =0A =0AResult : When I bring up the vm do not see the samplefile which is the e= xpected behaviour. =0A Is Scenario 2 safe where in the copying the snapshot outside the original q= cow2 is being executed with the VM running. This is because if this is safe= then this could be an approach as it would not require a long downtime for= the VM.=20 Regards sl --- On Wed, 9/3/11, Stefan Hajnoczi wrote: From: Stefan Hajnoczi Subject: Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.1= 4.0 To: "SAURAV LAHIRI" Cc: qemu-devel@nongnu.org Date: Wednesday, 9 March, 2011, 15:53 On Wed, Mar 9, 2011 at 6:06 PM, SAURAV LAHIRI wro= te: > Following steps were executed to copy a snapshot outside the original qco= w2 but looks like there is an issue. > > 1. VM(vm1) brought up with a qcow2 image(/home/user1/lucid-vm2). This is = a lucid 10.04 VM. > > 2. Next snapshot created for the qcow2 > =A0=A0 #qemu-img snapshot -c snap1 /home/user1/lucid-vm2 It is not safe to run qemu-img while the VM is using the image file. Stefan =0A=0A=0A --0-1958729861-1299721919=:79494 Content-Type: text/html; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable
Thank you very much Stefan, Based on your sug= gestion I tried out the following two scenarios.

Scenario 1:
1) I= executed following with the vm in shutdown state.
"#qemu-img snapshot -= c snap1 /home/user1/lucid-vm2"

2) Brought the VM Up.

3) Insi= de the vm create a file.
#touch samplefile

4) Shutdown the vm and= copy the snapshot outside the original qcow2

#qemu-img convert -f q= cow2 -O qcow2 -s snap1 /home/user1/lucid-vm2 /home/lucid-vm2-snap1

R= esult : When I bring up the vm do not see the samplefile which is the expec= ted behaviour.

Scenario 2:
=0A1) I executed following with the vm= in shutdown state.
=0A"#qemu-img snapshot -c snap1 /home/user1/lucid-vm= 2"
=0A
2) Bring up the VM.

3) Inside the vm create a file.=0A#touch samplefile
=0A
4) VM is NOT Shutdown and copy the snapshot= outside the original qcow2
=0A
=0A#qemu-img convert -f qcow2 -O qcow= 2 -s snap1 /home/user1/lucid-vm2 /home/lucid-vm2-snap1
=0A
=0AResult = : When I bring up the vm do not see the samplefile which is the expected be= haviour.
=0A

Is Scenario 2 safe where in the copying the snapshot= outside the original qcow2 is being executed with the VM running. This is = because if this is safe then this could be an approach as it would not requ= ire a long downtime for the VM.

Regards
sl

--- On Wed,= 9/3/11, Stefan Hajnoczi <stefanha@gmail.com> wrote:

From: Stefan Hajnoczi <stefanha@gmail.com>=
Subject: Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu= 0.14.0
To: "SAURAV LAHIRI" <saurav_lahiri@yahoo.com>
Cc: qemu-= devel@nongnu.org
Date: Wednesday, 9 March, 2011, 15:53

On Wed, Mar 9, 2011 at 6:06 PM, SAURAV LAHIRI <saurav_lahiri@yahoo.com> wrote:
> Following steps w= ere executed to copy a snapshot outside the original qcow2 but looks like there is an issu= e.
>
> 1. VM(vm1) brought up with a qcow2 image(/home/user1/luc= id-vm2). This is a lucid 10.04 VM.
>
> 2. Next snapshot created= for the qcow2
>    #qemu-img snapshot -c snap1 /home/user1= /lucid-vm2

It is not safe to run qemu-img while the VM is using the = image file.

Stefan

=0A= =0A=0A=0A --0-1958729861-1299721919=:79494--