qemu-img
Create and manage QEMU disk images
TLDR
SYNOPSIS
qemu-img command [options]
DESCRIPTION
qemu-img is the QEMU disk image utility for creating, converting, resizing, and inspecting virtual machine disk images. It supports multiple formats including qcow2, raw, vmdk, vdi, and vhd, making it essential for managing virtual machine storage and migrating between hypervisors.The create command builds new images with optional thin provisioning, while convert transforms between formats and can compress or encrypt output. The info command displays image metadata including format, virtual size, and snapshot details. Snapshots within qcow2 images can be created and managed for point-in-time recovery.
PARAMETERS
create
Create new image.convert
Convert format.info
Show image info.resize
Resize image.snapshot
Manage snapshots (-c create, -a apply, -d delete, -l list).check
Perform consistency check (qcow2, qed, vdi only).commit
Commit changes from an overlay image to its backing file.compare
Compare two disk images.rebase
Change the backing file of an image.map
Display allocation map of an image.-f FORMAT
Input image format (raw, qcow2, vmdk, vdi, vhd, etc.).-O FORMAT
Output format for convert.-p
Display progress bar.-q
Quiet mode; suppress non-error output.
CAVEATS
Part of the QEMU suite (qemu-utils package). Shrinking images with resize requires the guest filesystem to be resized first. Only qcow2, qed, and vdi formats support consistency checks.
SEE ALSO
qemu(1), virt-sparsify(1)
