Philip Prindeville via users writes:
Hi,
I have some Linux VMs that are running out of space. Is there a tool I can use to manage their .IMG or .QCOW files?
In particular, I have a build farm with some Linux machines using LVM filesystems, and I need to resize their PV’s and LV’s, grow the ext4 or xfs filesystems, etc. inside those .IMG and .QCOW files.
In some cases the partition I want to grow is sandwiched between others.
What’s available?
I saw a Redhat Access blog that mentioned virt-filesystems, but it doesn’t seem to be built for my OS.
qemu-img resizes the img and qcow files. This translates to resizing the virtual disk. The virtual disk will now be bigger. Then, fdisk/parted lets you monkey around with partitions – create news ones, resize existing ones, etc… And once that's done you move further up the stack. So, if a given partition is an ext4 partition, after resizing the physical partition resize2fs then grows the ext4 partition to fill up the extra space.