Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have KVM qcow2 and raw images. Virtual machines are partitioned with LVM. Now I want to resize the root partition of a few machines so I guess I have to do this from the host. My question is: how can I do this with raw images or qcow2 images ?

I'm a little bit confused by KVM+LVM complexity.

Thanks !

share|improve this question
up vote 4 down vote accepted

Well, LVM images inside qcow2 files is a mess. I personally try to avoid them, as multiple layers of LVM can cause shocking headaches.

But you will find the answer here:

Mount LVM within a disk image.

Good luck!

share|improve this answer
Well I read that qcow2 was one good option to backup VM without stopping them, and LVM may be usefull for resizing partitions. – ascobol Nov 8 '10 at 22:10
What I do is that I create an LVM volume in the Dom0, then use it as a block device HDD for the domU. This way I can take an LVM snapshot and do backup on it. I can still resize the last partition, if needed. And as I typically only have two partitions for the virtual host (swap and /) that is no problem. – pehrs Nov 9 '10 at 9:50
then can you distribute VMs to others ? Can you do live migrations of VMs if your dom0/host is crowded ? – ascobol Nov 9 '10 at 14:00
I have not used live migrations other than for a few POC. I don't have need for them in my environment. – pehrs Nov 9 '10 at 20:02

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.