doc: Update information on supported network adapters.
[qemu.git] / qemu-img.texi
CommitLineData
acd935ef
FB
1@example
2@c man begin SYNOPSIS
3usage: qemu-img command [command options]
4@c man end
5@end example
6
7@c man begin OPTIONS
8
9The following commands are supported:
10@table @option
eff44266 11@item create [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}]
acd935ef 12@item commit [-f @var{fmt}] @var{filename}
eff44266 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}
acd935ef 14@item info [-f @var{fmt}] @var{filename}
d2c639d6 15@item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot}] @var{filename}
acd935ef
FB
16@end table
17
18Command parameters:
19@table @var
20@item filename
21 is a disk image filename
5fafdf24 22@item base_image
acd935ef
FB
23is 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
f58c7b35
TS
25@item output_base_image
26forces the output image to be created as a copy on write
27image of the specified base image; @code{output_base_image} should have the same
28content as the input's base image, however the path, image format, etc may
29differ
9230eaf6
AL
30@item base_fmt
31is the disk image format of @var{base_image}. for more information look at @var{fmt}
5fafdf24 32@item fmt
acd935ef
FB
33is the disk image format. It is guessed automatically in most cases. The following formats are supported:
34
35@table @code
36@item raw
37
38Raw disk image format (default). This format has the advantage of
19d36792
FB
39being simple and easily exportable to all other emulators. If your
40file system supports @emph{holes} (for example in ext2 or ext3 on
41Linux or NTFS on Windows), then only the written sectors will reserve
42space. Use @code{qemu-img info} to know the real size used by the
43image or @code{ls -ls} on Unix/Linux.
acd935ef 44
19d36792 45@item qcow2
acd935ef
FB
46QEMU image format, the most versatile format. Use it to have smaller
47images (useful if your filesystem does not supports holes, for example
19d36792
FB
48on Windows), optional AES encryption, zlib based compression and
49support of multiple VM snapshots.
50@item qcow
51Old QEMU image format. Left for compatibility.
acd935ef
FB
52@item cow
53User Mode Linux Copy On Write image format. Used to be the only growable
54image format in QEMU. It is supported only for compatibility with
55previous versions. It does not work on win32.
56@item vmdk
e5d80f94 57VMware 3 and 4 compatible image format.
acd935ef
FB
58@item cloop
59Linux Compressed Loop image, useful only to reuse directly compressed
60CD-ROM images present for example in the Knoppix CD-ROMs.
61@end table
62
5fafdf24 63@item size
eff44266
KW
64is 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)
66and T (terabyte, 1024G) are supported. @code{b} is ignored.
acd935ef
FB
67
68@item output_filename
5fafdf24 69is the destination disk image filename
acd935ef
FB
70
71@item output_fmt
72 is the destination format
eff44266
KW
73@item options
74is a comma separated list of format specific options in a
75name=value format. Use @code{-o ?} for an overview of the options supported
76by the used format
77
acd935ef
FB
78
79@item -c
80indicates that target image must be compressed (qcow format only)
d2c639d6
BS
81@item -h
82with or without a command shows help and lists the supported formats
83@end table
84
85Parameters to snapshot subcommand:
86
87@table @option
88
89@item snapshot
90is the name of the snapshot to create, apply or delete
91@item -a
92applies a snapshot (revert disk to saved state)
93@item -c
94creates a snapshot
95@item -d
96deletes a snapshot
97@item -l
98lists all snapshots in the given image
acd935ef
FB
99@end table
100
101Command description:
102
103@table @option
eff44266 104@item create [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}]
acd935ef
FB
105
106Create the new disk image @var{filename} of size @var{size} and format
5fafdf24 107@var{fmt}.
acd935ef
FB
108
109If @var{base_image} is specified, then the image will record only the
110differences from @var{base_image}. No size needs to be specified in
111this case. @var{base_image} will never be modified unless you use the
112@code{commit} monitor command.
113
eff44266
KW
114The size can also be specified using the @var{size} option with @code{-o},
115it doesn't need to be specified separately in this case.
116
acd935ef
FB
117@item commit [-f @var{fmt}] @var{filename}
118
119Commit the changes recorded in @var{filename} in its base image.
120
eff44266 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}
acd935ef
FB
122
123Convert the disk image @var{filename} to disk image @var{output_filename}
eff44266
KW
124using format @var{output_fmt}. It can be optionally compressed (@code{-c}
125option) or use any format specific options like encryption (@code{-o} option).
acd935ef 126
eff44266 127Only the formats @code{qcow} and @code{qcow2} support encryption or compression. The
acd935ef
FB
128compression is read-only. It means that if a compressed sector is
129rewritten, then it is rewritten as uncompressed data.
130
131Encryption uses the AES format which is very secure (128 bit keys). Use
132a long password (16 characters) to get maximum protection.
133
134Image conversion is also useful to get smaller image when using a
135growable format such as @code{qcow} or @code{cow}: the empty sectors
136are detected and suppressed from the destination image.
137
138@item info [-f @var{fmt}] @var{filename}
139
140Give information about the disk image @var{filename}. Use it in
141particular to know the size reserved on disk which can be different
19d36792
FB
142from the displayed size. If VM snapshots are stored in the disk image,
143they are displayed too.
d2c639d6
BS
144
145@item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
146
147List, apply, create or delete snapshots in image @var{filename}.
acd935ef
FB
148@end table
149
150@c man end
151
152@ignore
153
154@setfilename qemu-img
155@settitle QEMU disk image utility
156
157@c man begin SEEALSO
158The HTML documentation of QEMU for more precise information and Linux
159user mode emulator invocation.
160@c man end
161
162@c man begin AUTHOR
163Fabrice Bellard
164@c man end
165
166@end ignore
This page took 0.231278 seconds and 4 git commands to generate.