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