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