0

How can I increase the size of a disk allocated to a KVM machine ? It can be lvm, raw file etc.

thanks

silviud
  • 1,015
  • 1
  • 12
  • 21

2 Answers2

1

and if it isn't lvm, you can use qemu-img to resize the disk, after that you need to start os (or usb qemu-nbd) to start the virtual machine, grow the partition and filesystem too.

0

If it's LVM, then you simply use lvresize to resize the disk.

Something like this:

lzresize -L +5G /dev/pv_name/vol_name

And then, once done, run:

resize2fs /dev/pv_name/vol_name

Just substitute "pv_name" & "vol_name" with your actual LVM names

SilverNodashi
  • 352
  • 3
  • 11