2

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 !

ascobol
  • 278
  • 2
  • 13

1 Answers1

4

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!

pehrs
  • 8,749
  • 29
  • 46
  • 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 08 '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 09 '10 at 09:50
  • then can you distribute VMs to others ? Can you do live migrations of VMs if your dom0/host is crowded ? – ascobol Nov 09 '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 09 '10 at 20:02