raw (sparse) raw (non sparse) | (default) the raw format is a plain binary image of the disc image, and is very portable. On filesystems that support sparse files, images in this format only use the space actually used by the data recorded in them. |
qcow2 | QEMU copy-on-write format with a range of special features, including the ability to take multiple snapshots, smaller images on filesystems that don't support sparse files, optional AES encryption, and optional zlib compression |
qemu-img info FILE
dd if=/dev/zero of=raw-nonsparce.img bs=1M count=8196 #8G dd if=/dev/zero of=raw-nonsparce.img bs=1M count=40980 #40G dd if=/dev/zero of=raw-nonsparce.img bs=1M count=51225 #50G
qemu-img create -f raw raw-sparce.img 8G
qemu-img create -f qcow2 qcow2.img 8G
qemu-img convert -O raw SRC.img DST.img
qemu-img convert -O qcow2 SRC.img DST.img
cp --sparse=never SRC.img DST.img
# qemu-img resize raw.img +8GB
KVM CLI Commands Cheet Sheat and Configuration Examples