This article provides a guide demonstrating how to convert .img file to .qcow2 file.
What is .img File?
An IMG file, a.k.a. raw image, contains a complete and uncompressed image of a storage device's data content. The image includes the value of each memory location of the storage device, ordered sequentially such that the data can be written to a similar device to completely overwrite its content.
What is .qcow2 File?
qcow2 is an updated version of the qcow format. qcow2 supports AES encryption. The difference from the original version is that qcow2 supports multiple snapshots using a newer, more flexible model for storing them. The official documentation for the format is part of the QEMU Git tree.
How to Convert .img File to .qcow2 File
To convert .img file to .qcow2 file, follow the steps below:
- SSH the server as root.
- Install qemu-utils package:
- Debian/Ubuntu:
sudo apt-get install qemu-utils -y - RHEL/AlmaLinux/Rocky Linux:
sudo dnf install qemu-utils -y
- Debian/Ubuntu:
- Run the following command, replacing input.img with the .img file name and output.qcow2 with the desired .qcow2 file name:
qemu-img convert -f raw -O qcow2 input.img output.qcow2
Conclusion
You now know how to convert .img file to .qcow2 file.

👀 Choose SSD-powered VPS servers for increased speed, power, and security! Now 50% off- starting from only $3.19/mo.