]> git.proxmox.com Git - qemu.git/blame_incremental - qemu-img.texi
sparc32: convert IOMMU to reset + vmsd
[qemu.git] / qemu-img.texi
... / ...
CommitLineData
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
11@include qemu-img-cmds.texi
12
13Command parameters:
14@table @var
15@item filename
16 is a disk image filename
17@item base_image
18is the read-only disk image which is used as base for a copy on
19 write image; the copy on write image only stores the modified data
20@item output_base_image
21forces the output image to be created as a copy on write
22image of the specified base image; @code{output_base_image} should have the same
23content as the input's base image, however the path, image format, etc may
24differ
25@item base_fmt
26is the disk image format of @var{base_image}. for more information look at @var{fmt}
27@item fmt
28is the disk image format. It is guessed automatically in most cases. The following formats are supported:
29
30@table @code
31@item raw
32
33Raw disk image format (default). This format has the advantage of
34being simple and easily exportable to all other emulators. If your
35file system supports @emph{holes} (for example in ext2 or ext3 on
36Linux or NTFS on Windows), then only the written sectors will reserve
37space. Use @code{qemu-img info} to know the real size used by the
38image or @code{ls -ls} on Unix/Linux.
39
40@item host_device
41
42Host device format. This format should be used instead of raw when
43converting to block devices or other devices where "holes" are not
44supported.
45
46@item qcow2
47QEMU image format, the most versatile format. Use it to have smaller
48images (useful if your filesystem does not supports holes, for example
49on Windows), optional AES encryption, zlib based compression and
50support of multiple VM snapshots.
51@item qcow
52Old QEMU image format. Left for compatibility.
53@item cow
54User Mode Linux Copy On Write image format. Used to be the only growable
55image format in QEMU. It is supported only for compatibility with
56previous versions. It does not work on win32.
57@item vdi
58VirtualBox 1.1 compatible image format.
59@item vmdk
60VMware 3 and 4 compatible image format.
61@item cloop
62Linux Compressed Loop image, useful only to reuse directly compressed
63CD-ROM images present for example in the Knoppix CD-ROMs.
64@end table
65
66@item size
67is the disk image size in bytes. Optional suffixes @code{k} or @code{K}
68(kilobyte, 1024) @code{M} (megabyte, 1024k) and @code{G} (gigabyte, 1024M)
69and T (terabyte, 1024G) are supported. @code{b} is ignored.
70
71@item output_filename
72is the destination disk image filename
73
74@item output_fmt
75 is the destination format
76@item options
77is a comma separated list of format specific options in a
78name=value format. Use @code{-o ?} for an overview of the options supported
79by the used format
80
81
82@item -c
83indicates that target image must be compressed (qcow format only)
84@item -h
85with or without a command shows help and lists the supported formats
86@end table
87
88Parameters to snapshot subcommand:
89
90@table @option
91
92@item snapshot
93is the name of the snapshot to create, apply or delete
94@item -a
95applies a snapshot (revert disk to saved state)
96@item -c
97creates a snapshot
98@item -d
99deletes a snapshot
100@item -l
101lists all snapshots in the given image
102@end table
103
104Command description:
105
106@table @option
107@item create [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}]
108
109Create the new disk image @var{filename} of size @var{size} and format
110@var{fmt}.
111
112If @var{base_image} is specified, then the image will record only the
113differences from @var{base_image}. No size needs to be specified in
114this case. @var{base_image} will never be modified unless you use the
115@code{commit} monitor command.
116
117The size can also be specified using the @var{size} option with @code{-o},
118it doesn't need to be specified separately in this case.
119
120@item commit [-f @var{fmt}] @var{filename}
121
122Commit the changes recorded in @var{filename} in its base image.
123
124@item convert [-c] [-f @var{fmt}] [-O @var{output_fmt}] [-o @var{options}] [-B @var{output_base_image}] @var{filename} [@var{filename2} [...]] @var{output_filename}
125
126Convert the disk image @var{filename} to disk image @var{output_filename}
127using format @var{output_fmt}. It can be optionally compressed (@code{-c}
128option) or use any format specific options like encryption (@code{-o} option).
129
130Only the formats @code{qcow} and @code{qcow2} support encryption or compression. The
131compression is read-only. It means that if a compressed sector is
132rewritten, then it is rewritten as uncompressed data.
133
134Encryption uses the AES format which is very secure (128 bit keys). Use
135a long password (16 characters) to get maximum protection.
136
137Image conversion is also useful to get smaller image when using a
138growable format such as @code{qcow} or @code{cow}: the empty sectors
139are detected and suppressed from the destination image.
140
141@item info [-f @var{fmt}] @var{filename}
142
143Give information about the disk image @var{filename}. Use it in
144particular to know the size reserved on disk which can be different
145from the displayed size. If VM snapshots are stored in the disk image,
146they are displayed too.
147
148@item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
149
150List, apply, create or delete snapshots in image @var{filename}.
151@end table
152
153@c man end
154
155@ignore
156
157@setfilename qemu-img
158@settitle QEMU disk image utility
159
160@c man begin SEEALSO
161The HTML documentation of QEMU for more precise information and Linux
162user mode emulator invocation.
163@c man end
164
165@c man begin AUTHOR
166Fabrice Bellard
167@c man end
168
169@end ignore