Red Hat Training

A Red Hat training course is available for Red Hat Enterprise Linux

Chapter 14. Using qemu-img

The qemu-img command-line tool is used for formatting, modifying, and verifying various file systems used by KVM. qemu-img options and usages are highlighted in the sections that follow.

Warning

Never use qemu-img to modify images in use by a running virtual machine or any other process. This may destroy the image. Also, be aware that querying an image that is being modified by another process may encounter inconsistent state.

14.1. Checking the Disk Image

To perform a consistency check on a disk image with the file name imgname.
# qemu-img check [-f format] imgname

Note

Only a selected group of formats support consistency checks. These include qcow2, vdi, vhdx, vmdk, and qed.