3 usage: qemu-img command [command options]
9 The following commands are supported:
11 @item create [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}]
12 @item commit [-f @var{fmt}] @var{filename}
13 @item convert [-c] [-f @var{fmt}] [-O @var{output_fmt}] [-o @var{options}] [-B @var{output_base_image}] @var{filename} [@var{filename2} [...]] @var{output_filename}
14 @item info [-f @var{fmt}] @var{filename}
15 @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot}] @var{filename}
21 is a disk image filename
23 is the read-only disk image which is used as base for a copy on
24 write image; the copy on write image only stores the modified data
25 @item output_base_image
26 forces the output image to be created as a copy on write
27 image of the specified base image; @code{output_base_image} should have the same
28 content as the input's base image, however the path, image format, etc may
31 is the disk image format of @var{base_image}. for more information look at @var{fmt}
33 is the disk image format. It is guessed automatically in most cases. The following formats are supported:
38 Raw disk image format (default). This format has the advantage of
39 being simple and easily exportable to all other emulators. If your
40 file system supports @emph{holes} (for example in ext2 or ext3 on
41 Linux or NTFS on Windows), then only the written sectors will reserve
42 space. Use @code{qemu-img info} to know the real size used by the
43 image or @code{ls -ls} on Unix/Linux.
46 QEMU image format, the most versatile format. Use it to have smaller
47 images (useful if your filesystem does not supports holes, for example
48 on Windows), optional AES encryption, zlib based compression and
49 support of multiple VM snapshots.
51 Old QEMU image format. Left for compatibility.
53 User Mode Linux Copy On Write image format. Used to be the only growable
54 image format in QEMU. It is supported only for compatibility with
55 previous versions. It does not work on win32.
57 VMware 3 and 4 compatible image format.
59 Linux Compressed Loop image, useful only to reuse directly compressed
60 CD-ROM images present for example in the Knoppix CD-ROMs.
64 is the disk image size in bytes. Optional suffixes @code{k} or @code{K}
65 (kilobyte, 1024) @code{M} (megabyte, 1024k) and @code{G} (gigabyte, 1024M)
66 and T (terabyte, 1024G) are supported. @code{b} is ignored.
69 is the destination disk image filename
72 is the destination format
74 is a comma separated list of format specific options in a
75 name=value format. Use @code{-o ?} for an overview of the options supported
80 indicates that target image must be compressed (qcow format only)
82 with or without a command shows help and lists the supported formats
85 Parameters to snapshot subcommand:
90 is the name of the snapshot to create, apply or delete
92 applies a snapshot (revert disk to saved state)
98 lists all snapshots in the given image
104 @item create [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}]
106 Create the new disk image @var{filename} of size @var{size} and format
109 If @var{base_image} is specified, then the image will record only the
110 differences from @var{base_image}. No size needs to be specified in
111 this case. @var{base_image} will never be modified unless you use the
112 @code{commit} monitor command.
114 The size can also be specified using the @var{size} option with @code{-o},
115 it doesn't need to be specified separately in this case.
117 @item commit [-f @var{fmt}] @var{filename}
119 Commit the changes recorded in @var{filename} in its base image.
121 @item convert [-c] [-f @var{fmt}] [-O @var{output_fmt}] [-o @var{options}] [-B @var{output_base_image}] @var{filename} [@var{filename2} [...]] @var{output_filename}
123 Convert the disk image @var{filename} to disk image @var{output_filename}
124 using format @var{output_fmt}. It can be optionally compressed (@code{-c}
125 option) or use any format specific options like encryption (@code{-o} option).
127 Only the formats @code{qcow} and @code{qcow2} support encryption or compression. The
128 compression is read-only. It means that if a compressed sector is
129 rewritten, then it is rewritten as uncompressed data.
131 Encryption uses the AES format which is very secure (128 bit keys). Use
132 a long password (16 characters) to get maximum protection.
134 Image conversion is also useful to get smaller image when using a
135 growable format such as @code{qcow} or @code{cow}: the empty sectors
136 are detected and suppressed from the destination image.
138 @item info [-f @var{fmt}] @var{filename}
140 Give information about the disk image @var{filename}. Use it in
141 particular to know the size reserved on disk which can be different
142 from the displayed size. If VM snapshots are stored in the disk image,
143 they are displayed too.
145 @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
147 List, apply, create or delete snapshots in image @var{filename}.
154 @setfilename qemu-img
155 @settitle QEMU disk image utility
158 The HTML documentation of QEMU for more precise information and Linux
159 user mode emulator invocation.