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