Skip to main content

Resizing a KVM virtual machine image

This blog post might be outdated!
This blog post was published more than one year ago and might be outdated!
· One min read
Stephan Hochdörfer
Head of IT Business Operations

Recently I was in need to resize one of our KVM images. A quick search on Google showed that the task is simpler than I thought:

  • Shut down the virtual machine
  • Create a backup of the virtual machine (e.g. sudo cp my_vm.img my_vm.img.bak)
  • Run sudo qemu-img resize my_vm.img +10GB to increase the size by 10GB
  • Fire up the virtual machine and use your favourite tool to re-partition the harddisk of your virtual machine.