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