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