We could add storage to a KVM virtual machine using the qemu-img program.
Images are created by default in the /var/lib/libvirt/images/ directory.
To be able to see the supported image format for our KVM, we use the below command:
We start by creating a raw image named raw.img. We also mention its size - 20 GB -:
-f : refers to the format of the image.
We could display information about our image using the below command:
Below is s short description of the most prevalent formats for Qemu:
raw: is the default format, it is also the fastest.
qcow2: - Qemu Copy On Write version 2 - is one of the most used formats. It has a lot of features like the below including, snapshots, compression, encryption, thin provisioning - growth-on-demand -, ...