converting lvm based Virtual Machine to qcow image.

Nikolai K. Bochev n.bochev at
Wed Jan 5 09:54:13 UTC 2011

I would suggest the following : 

1. Pause the virtual machine ( with virsh for example ) 
2. Take a snapshot of the logical volume. 
3. Unpause the virtual machine 
4. Convert the snaposhot ot qcow2. 

I'm doing something similar with a python script. 

From: "Tapas Mishra" <mightydreams at> 
To: "Ubuntu Server Team" <ubuntu-server at> 
Sent: Monday, January 3, 2011 12:03:31 PM 
Subject: converting lvm based Virtual Machine to qcow image. 

A long time back I had asked as how to back up OS running on KVM in an 
LVM setup. 
Here are the excerpts from the message 

"One way to take a backup is to convert the LVM volumes to compressed qcow2 
images, like this: 
# qemu-img convert -c -f raw -O qcow2 /dev/nintendo/lvm1 /backup/lvm1.img" 

I would like to know do I need to shut down the VM to be able to use 
the above command. 


ubuntu-server mailing list 
ubuntu-server at 
More info: 


Nikolai K. Bochev 
System Administrator 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the ubuntu-server mailing list