Expand a KVM disk image

To expand the size of your KVM images you'll need to create an empty disk image with qemu-img

qemu-img create -f raw 10gig.img 10G

Then take your existing image and cat this new empty space on to the end.

cat existing.img 10gig.img > existing-new.img

After you start your VM with the new image, you should see additional space (in fdisk) available to play with.

2019 Update: Expanding a QCOW disk image

Leave A Reply
All content licensed under the Creative Commons License