Thank you very much Stefan, Based on your suggestion 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) 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/lucid-vm2-snap1

Result : When I bring up the vm do not see the samplefile which is the expected 
behaviour.

Scenario 2:

1) I executed following with the vm in shutdown state.

"#qemu-img snapshot -c snap1 /home/user1/lucid-vm2" 


2) Bring up the VM.

3) Inside the vm create a file.

#touch samplefile


4) VM is NOT Shutdown and copy the snapshot outside the original qcow2



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



Result : When I bring up the vm do not see the samplefile which is the expected 
behaviour.



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 require a long downtime for the VM. 

Regards
sl

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

From: Stefan Hajnoczi <stefa...@gmail.com>
Subject: Re: [Qemu-devel] Issue with snapshot outside qcow2 disk - qemu 0.14.0
To: "SAURAV LAHIRI" <saurav_lah...@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_lah...@yahoo.com> wrote:
> Following steps were executed to copy a snapshot outside the original qcow2 
> 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
>    #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



      

Reply via email to