linux—image format conversion (qcow2, vmdk, raw, iso) qemu-img command—take it directly

The qemu-img image format conversion tool supports mutual conversion of images in vhd, vmdk, qcow2, raw, vhdx, qcow, vdi or qed community formats.

View the file qemu-img info -U (file name) vmtools.iso
insert image description here
format conversion
Execute the following command to convert the image file format.

Convert vmdk format to qcow2 format

$ qemu-img convert -p -f vmdk -O qcow2 centos8.vmdk centos8.qcow2

Convert vma(raw) to qcow2

$ qemu-img convert -p -f raw -O qcow2 test.vma test.qcow2

Convert the disk in the default raw format to qcow2 format with simple compression

qemu-img convert -c -f raw -O qcow2 test1.raw test1.qcow2

Export the disk in the default qcow2 format to a simple compressed qcow2 format

qemu-img convert -c -O qcow2 test1.qcow2 new.test1.qcow2

Guess you like

Origin blog.csdn.net/qq_41196999/article/details/131223292
Recommended