This blog post will explain how to use the qemu-img command to create hard disk images. The hard disk images created with qemu-img will be qcow2 images. The example below will create a qcow2 image with a maximum size of 20 gigabytes.
qemu-img create -f qcow2 disk.img 20G
Sometimes, a hard disk image has to be resized to fit more data on it. The example below will increase the size of the qcow2 hard disk image to 30 gigabytes.
qemu-img resize disk.img 30G
Sometimes, a server administrator has to get information on how a hard disk image is organized. The example below will display information about a hard disk image.
qemu-img info disk.img
The Windows version of QEMU was used to write this blog post.
