I just had to resize a virtual disk and it was harder than I thought; writing down what I did so it’s easy to find …
- shutdown VM
qm shutdown 108
- resize disk image
qemu-img resize vm-108-disk-1.qcow2 +20G
- attach pmagic CD; boot to pmagic (using proxmox management web interface)
- extend physical partition
pvdisplay; lvdisplay; fdisk -u=sectors /dev/sda delete partition 2 (remember starting sector) (‘d’, 2) create new partition (n) starting at same sector as before; end is defaulted
- extend pv
pvresize –v /dev/sda2
- extend lv
lvresize –L +20G VolGroup/lv_root
- resize filesystem
e2fsck –f /dev/sda2 resize2fs /dev/sda2
- detach pmagic cdrom
- start VM
qm start 108
Good instructions for working with Windows (NTFS) disk images is here: http://cauldrondevelopment.com/blog/2009/02/26/resize-qemu-ntfs-image/