LinuxCommandLibrary

qemu-img

TLDR

Create disk image

$ qemu-img create -f [qcow2] [disk.qcow2] [20G]
copy
Convert image format
$ qemu-img convert -f [raw] -O [qcow2] [input.img] [output.qcow2]
copy
Show image info
$ qemu-img info [disk.qcow2]
copy
Resize image
$ qemu-img resize [disk.qcow2] +[10G]
copy
Create snapshot
$ qemu-img snapshot -c [snapshot1] [disk.qcow2]
copy

SYNOPSIS

qemu-img command [options]

DESCRIPTION

qemu-img manages QEMU disk images. Image creation and manipulation.
The tool creates and converts images. Supports various formats.
qemu-img handles disk images.

PARAMETERS

create

Create new image.
convert
Convert format.
info
Show image info.
resize
Resize image.
snapshot
Manage snapshots.
-f FORMAT
Image format.
-O FORMAT
Output format.

CAVEATS

Part of QEMU suite. Various format options.

HISTORY

qemu-img is part of QEMU for disk image management.

SEE ALSO

Copied to clipboard