Resize a KVM disk

From MyWiki
Jump to: navigation, search
qemu-img resize vmdisk.img +10G to increase image size by 10Gb<br?


Convert formats :

This example will convert a raw image file named centos7.img to a qcow2 image file.  
$ qemu-img convert -f raw -O qcow2 centos7.img centos7.qcow2
Run the following command to convert a VMDK image file to a raw image file.
$ qemu-img convert -f vmdk -O raw centos7.vmdk centos7.img
Run the following command to convert a VMDK image file to a qcow2 image file.
$ qemu-img convert -f vmdk -O qcow2 centos7.vmdk centos7.qcow2

Convert a vmdk disk to vdi

qemu-img convert -f vmdk -O vdi image.vmdk image.vdi (This resulted in a disk which was not bootable)