This is the QEMU standard non-encrypted image format disk. It is commonly used across various QEMU virtual machine systems.
To create such image, the command is:
$ qemu-img create -f qcow2 <filename>.qcow2 <size>
Here is some examples of creating a qcow2
in different sizes:
$ qemu-img create -f qcow2 10_megabytes_image.qcow2 10M
$ qemu-img create -f qcow2 12_gigabytes_image.qcow2 12G
$ qemu-img create -f qcow2 120_gigabytes_image.qcow2 120G
All of them yield the following output, depending on the filename and size, here is the 120 Gigabytes example:
Formatting '120_gigabytes_image.qcow2', fmt=qcow2 size=128849018880 encryption=off cluster_size=65536 lazy_refcounts=off refcount_bits=16
You'll get a rather small file in your current directory with the designated filename. QEMU follows dynamic allocation storage scheme, where it consumes space only when it needs to store the data, upto the limit set by the image file (example: 10M, 12G, 120G).
That's all about creating QCOW2 Disk.