Man Page
Manual Section... (1) - page: qemu-img
NAME
qemu-img - QEMU disk image utilitySYNOPSIS
usage: qemu-img command [command options]OPTIONS
The following commands are supported:- check [-f fmt] filename
- create [-F base_fmt] [-b base_image] [-f fmt] [-o options] filename [size]
- commit [-f fmt] filename
- convert [-c] [-f fmt] [-O output_fmt] [-o options] [-B output_base_image] filename [filename2 [...]] output_filename
- info [-f fmt] filename
- snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename
Command parameters:
- filename
-
is a disk image filename
- base_image
-
is the read-only disk image which is used as base for a copy on
write image; the copy on write image only stores the modified data - output_base_image
- forces the output image to be created as a copy on write image of the specified base image; "output_base_image" should have the same content as the input's base image, however the path, image format, etc may differ
- base_fmt
- is the disk image format of base_image. for more information look at fmt
- fmt
-
is the disk image format. It is guessed automatically in most cases. The following formats are supported:
-
- "raw"
- Raw disk image format (default). This format has the advantage of being simple and easily exportable to all other emulators. If your file system supports holes (for example in ext2 or ext3 on Linux or NTFS on Windows), then only the written sectors will reserve space. Use "qemu-img info" to know the real size used by the image or "ls -ls" on Unix/Linux.
- "qcow2"
- QEMU image format, the most versatile format. Use it to have smaller images (useful if your filesystem does not supports holes, for example on Windows), optional AES encryption, zlib based compression and support of multiple VM snapshots.
- "qcow"
- Old QEMU image format. Left for compatibility.
- "cow"
- User Mode Linux Copy On Write image format. Used to be the only growable image format in QEMU. It is supported only for compatibility with previous versions. It does not work on win32.
- "vmdk"
- VMware 3 and 4 compatible image format.
- "cloop"
- Linux Compressed Loop image, useful only to reuse directly compressed CD-ROM images present for example in the Knoppix CD-ROMs.
-
- size
- is the disk image size in bytes. Optional suffixes "k" or "K" (kilobyte, 1024) "M" (megabyte, 1024k) and "G" (gigabyte, 1024M) and T (terabyte, 1024G) are supported. "b" is ignored.
- output_filename
- is the destination disk image filename
- output_fmt
-
is the destination format
- options
- is a comma separated list of format specific options in a name=value format. Use "-o ?" for an overview of the options supported by the used format
- -c
- indicates that target image must be compressed (qcow format only)
- -h
- with or without a command shows help and lists the supported formats
Parameters to snapshot subcommand:
- snapshot
- is the name of the snapshot to create, apply or delete
- -a
- applies a snapshot (revert disk to saved state)
- -c
- creates a snapshot
- -d
- deletes a snapshot
- -l
- lists all snapshots in the given image
Command description:
- create [-F base_fmt] [-b base_image] [-f fmt] [-o options] filename [size]
-
Create the new disk image filename of size size and format
fmt.
If base_image is specified, then the image will record only the differences from base_image. No size needs to be specified in this case. base_image will never be modified unless you use the "commit" monitor command.
The size can also be specified using the size option with "-o", it doesn't need to be specified separately in this case.
- commit [-f fmt] filename
- Commit the changes recorded in filename in its base image.
- convert [-c] [-f fmt] [-O output_fmt] [-o options] [-B output_base_image] filename [filename2 [...]] output_filename
-
Convert the disk image filename to disk image output_filename
using format output_fmt. It can be optionally compressed ("-c"
option) or use any format specific options like encryption ("-o" option).
Only the formats "qcow" and "qcow2" support encryption or compression. The compression is read-only. It means that if a compressed sector is rewritten, then it is rewritten as uncompressed data.
Encryption uses the AES format which is very secure (128 bit keys). Use a long password (16 characters) to get maximum protection.
Image conversion is also useful to get smaller image when using a growable format such as "qcow" or "cow": the empty sectors are detected and suppressed from the destination image.
- info [-f fmt] filename
- Give information about the disk image filename. Use it in particular to know the size reserved on disk which can be different from the displayed size. If VM snapshots are stored in the disk image, they are displayed too.
- snapshot [-l | -a snapshot | -c snapshot | -d snapshot ] filename
- List, apply, create or delete snapshots in image filename.
SEE ALSO
The HTML documentation of QEMU for more precise information and Linux user mode emulator invocation.AUTHOR
Fabrice Bellard
Index
This document was created by man2html, using the manual pages.
Time: 15:26:19 GMT, June 11, 2010
