QCOW Cheatsheet
QCOW = QEMU Copy On Write.
qcow is a file format for disk image files used by QEMU.
Why qcow? It only takes up as much disk space as the guest OS actually uses.
CLI
CLI: qemu-img
# Show image info
$ qemu-img info disk.qcow2
# Convert an existing qcow2 image to new format
$ qemu-img amend -o compat=1.1 disk.qcow2
# Create a virtual disk
$ qemu-img create -f qcow2 myDisk.qcow2 20G
QCOW1 vs QCOW2 vs QCOW3:
- QCOW1 and QCOW2 have two completely different driver implementations and the two versions actually are exposed as two different image formats ("qcow" and "qcow2") to the user.
- QCOW3 is strictly an extension of QCOW2, it keeps the fundamental structure unchanged. Internally, QEMU will have a single driver for both QCOW2 and QCOW3 images.
compat=1.1
means it is using the new QCOW3 format, though the file may still be named.qcow2
.
Off the shelf
Debian 12: https://cloud.debian.org/images/cloud/bookworm/latest/debian-12-generic-amd64.qcow2