Difference between revisions of "Resize a KVM disk"

From MyWiki
Jump to: navigation, search
Line 9: Line 9:
 
  Run the following command to convert a VMDK image file to a qcow2 image file.
 
  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
 
  $ qemu-img convert -f vmdk -O qcow2 centos7.vmdk centos7.qcow2
 +
 +
Convert a vmdk disk to vdi<br>
 +
qemu-img convert -f vmdk -O vdi image.vmdk image.vdi<br>

Revision as of 11:27, 6 February 2019

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