All HowTo's Virtualization

Extend a KVM Disk

A simple one liner to extend the disk of a virtual machine running in KVM.

qemu-img resize vmdisk.img +10G

The disk will be extended by 10GB, it may take a reboot of the guest machine to pickup the change and you will also need to extend your partitions inside of the guest.

As you may have guessed if we no longer need that 10GB on the guest then we can also run

qemu-img resize vmdisk.img -10G

This will remove 10GB from the guest machine