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 !

link|improve this question

75% accept rate
feedback

1 Answer

up vote 2 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!

link|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
feedback

Your Answer

 
or
required, but never shown

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