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



Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.147.71.175
To prevent spam please submit by clicking the kitten: