]> git.proxmox.com Git - qemu.git/blame - qemu-img.texi
vmdk endianness fix (Benoit Poulot-Cazajous)
[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
11@item create [-e] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}]
12@item commit [-f @var{fmt}] @var{filename}
13@item convert [-c] [-e] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}] @var{output_filename}
14@item info [-f @var{fmt}] @var{filename}
15@end table
16
17Command parameters:
18@table @var
19@item filename
20 is a disk image filename
21@item base_image
22is the read-only disk image which is used as base for a copy on
23 write image; the copy on write image only stores the modified data
24
25@item fmt
26is the disk image format. It is guessed automatically in most cases. The following formats are supported:
27
28@table @code
29@item raw
30
31Raw disk image format (default). This format has the advantage of
32being simple and easily exportable to all other emulators. If your file
33system supports @emph{holes} (for example in ext2 or ext3 on Linux),
34then only the written sectors will reserve space. Use @code{qemu-img
35info} to know the real size used by the image or @code{ls -ls} on
36Unix/Linux.
37
38@item qcow
39QEMU image format, the most versatile format. Use it to have smaller
40images (useful if your filesystem does not supports holes, for example
41on Windows), optional AES encryption and zlib based compression.
42@item cow
43User Mode Linux Copy On Write image format. Used to be the only growable
44image format in QEMU. It is supported only for compatibility with
45previous versions. It does not work on win32.
46@item vmdk
e5d80f94 47VMware 3 and 4 compatible image format.
acd935ef
FB
48@item cloop
49Linux Compressed Loop image, useful only to reuse directly compressed
50CD-ROM images present for example in the Knoppix CD-ROMs.
51@end table
52
53@item size
54is the disk image size in kilobytes. Optional suffixes @code{M}
55(megabyte) and @code{G} (gigabyte) are supported
56
57@item output_filename
58is the destination disk image filename
59
60@item output_fmt
61 is the destination format
62
63@item -c
64indicates that target image must be compressed (qcow format only)
65@item -e
66indicates that the target image must be encrypted (qcow format only)
67@end table
68
69Command description:
70
71@table @option
72@item create [-e] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}]
73
74Create the new disk image @var{filename} of size @var{size} and format
75@var{fmt}.
76
77If @var{base_image} is specified, then the image will record only the
78differences from @var{base_image}. No size needs to be specified in
79this case. @var{base_image} will never be modified unless you use the
80@code{commit} monitor command.
81
82@item commit [-f @var{fmt}] @var{filename}
83
84Commit the changes recorded in @var{filename} in its base image.
85
86@item convert [-c] [-e] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}] @var{output_filename}
87
88Convert the disk image @var{filename} to disk image @var{output_filename}
89using format @var{output_fmt}. It can be optionnaly encrypted
90(@code{-e} option) or compressed (@code{-c} option).
91
92Only the format @code{qcow} supports encryption or compression. The
93compression is read-only. It means that if a compressed sector is
94rewritten, then it is rewritten as uncompressed data.
95
96Encryption uses the AES format which is very secure (128 bit keys). Use
97a long password (16 characters) to get maximum protection.
98
99Image conversion is also useful to get smaller image when using a
100growable format such as @code{qcow} or @code{cow}: the empty sectors
101are detected and suppressed from the destination image.
102
103@item info [-f @var{fmt}] @var{filename}
104
105Give information about the disk image @var{filename}. Use it in
106particular to know the size reserved on disk which can be different
107from the displayed size.
108@end table
109
110@c man end
111
112@ignore
113
114@setfilename qemu-img
115@settitle QEMU disk image utility
116
117@c man begin SEEALSO
118The HTML documentation of QEMU for more precise information and Linux
119user mode emulator invocation.
120@c man end
121
122@c man begin AUTHOR
123Fabrice Bellard
124@c man end
125
126@end ignore