File:  [Qemu by Fabrice Bellard] / qemu / qemu-img.1
Revision (vendor branch): download - view: text, annotated - select for diffs
Tue Apr 24 17:11:50 2018 UTC (2 years, 1 month ago) by root
Branches: qemu, MAIN
CVS tags: qemu0104, HEAD
qemu 0.10.4

.\" Automatically generated by Pod::Man 2.16 (Pod::Simple 3.07)
.\" Standard preamble:
.\" ========================================================================
.de Sh \" Subsection heading
.if t .Sp
.ne 5
.de Sp \" Vertical space (when we can't use .PP)
.if t .sp .5v
.if n .sp
.de Vb \" Begin verbatim text
.ft CW
.ne \\$1
.de Ve \" End verbatim text
.ft R
.\" Set up some character translations and predefined strings.  \*(-- will
.\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left
.\" double quote, and \*(R" will give a right double quote.  \*(C+ will
.\" give a nicer C++.  Capital omega is used to do unbreakable dashes and
.\" therefore won't be available.  \*(C` and \*(C' expand to `' in nroff,
.\" nothing in troff, for use with C<>.
.tr \(*W-
.ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p'
.ie n \{\
.    ds -- \(*W-
.    ds PI pi
.    if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch
.    if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\"  diablo 12 pitch
.    ds L" ""
.    ds R" ""
.    ds C` ""
.    ds C' ""
.    ds -- \|\(em\|
.    ds PI \(*p
.    ds L" ``
.    ds R" ''
.\" Escape single quotes in literal strings from groff's Unicode transform.
.ie \n(.g .ds Aq \(aq
.el       .ds Aq '
.\" If the F register is turned on, we'll generate index entries on stderr for
.\" titles (.TH), headers (.SH), subsections (.Sh), items (.Ip), and index
.\" entries marked with X<> in POD.  Of course, you'll have to process the
.\" output yourself in some meaningful fashion.
.ie \nF \{\
.    de IX
.    tm Index:\\$1\t\\n%\t"\\$2"
.    nr % 0
.    rr F
.el \{\
.    de IX
.\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2).
.\" Fear.  Run.  Save yourself.  No user-serviceable parts.
.    \" fudge factors for nroff and troff
.if n \{\
.    ds #H 0
.    ds #V .8m
.    ds #F .3m
.    ds #[ \f1
.    ds #] \fP
.if t \{\
.    ds #H ((1u-(\\\\n(.fu%2u))*.13m)
.    ds #V .6m
.    ds #F 0
.    ds #[ \&
.    ds #] \&
.    \" simple accents for nroff and troff
.if n \{\
.    ds ' \&
.    ds ` \&
.    ds ^ \&
.    ds , \&
.    ds ~ ~
.    ds /
.if t \{\
.    ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u"
.    ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u'
.    ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u'
.    ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u'
.    ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u'
.    ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u'
.    \" troff and (daisy-wheel) nroff accents
.ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V'
.ds 8 \h'\*(#H'\(*b\h'-\*(#H'
.ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#]
.ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H'
.ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u'
.ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#]
.ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#]
.ds ae a\h'-(\w'a'u*4/10)'e
.ds Ae A\h'-(\w'A'u*4/10)'E
.    \" corrections for vroff
.if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u'
.if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u'
.    \" for low resolution devices (crt and lpr)
.if \n(.H>23 .if \n(.V>19 \
.    ds : e
.    ds 8 ss
.    ds o a
.    ds d- d\h'-1'\(ga
.    ds D- D\h'-1'\(hy
.    ds th \o'bp'
.    ds Th \o'LP'
.    ds ae ae
.    ds Ae AE
.rm #[ #] #H #V #F C
.\" ========================================================================
.IX Title "QEMU-IMG 1"
.TH QEMU-IMG 1 "2009-05-01" " " " "
.\" For nroff, turn off justification.  Always turn off hyphenation; it makes
.\" way too many mistakes in technical documents.
.if n .ad l
qemu\-img \- QEMU disk image utility
usage: qemu-img command [command options]
.IX Header "OPTIONS"
The following commands are supported:
.IP "\fBcreate [\-e] [\-6] [\-F\fR \fIbase_fmt\fR\fB] [\-b\fR \fIbase_image\fR\fB] [\-f\fR \fIfmt\fR\fB]\fR \fIfilename\fR \fB[\fR\fIsize\fR\fB]\fR" 4
.IX Item "create [-e] [-6] [-F base_fmt] [-b base_image] [-f fmt] filename [size]"
.PD 0
.IP "\fBcommit [\-f\fR \fIfmt\fR\fB]\fR \fIfilename\fR" 4
.IX Item "commit [-f fmt] filename"
.IP "\fBconvert [\-c] [\-e] [\-6] [\-f\fR \fIfmt\fR\fB] [\-O\fR \fIoutput_fmt\fR\fB] [\-B\fR \fIoutput_base_image\fR\fB]\fR \fIfilename\fR \fB[\fR\fIfilename2\fR \fB[...]]\fR \fIoutput_filename\fR" 4
.IX Item "convert [-c] [-e] [-6] [-f fmt] [-O output_fmt] [-B output_base_image] filename [filename2 [...]] output_filename"
.IP "\fBinfo [\-f\fR \fIfmt\fR\fB]\fR \fIfilename\fR" 4
.IX Item "info [-f fmt] filename"
.IP "\fBsnapshot [\-l | \-a\fR \fIsnapshot\fR \fB| \-c\fR \fIsnapshot\fR \fB| \-d\fR \fIsnapshot\fR\fB]\fR \fIfilename\fR" 4
.IX Item "snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename"
Command parameters:
.IP "\fIfilename\fR" 4
.IX Item "filename"
.Vb 1
\& is a disk image filename
.IP "\fIbase_image\fR" 4
.IX Item "base_image"
is the read-only disk image which is used as base for a copy on
    write image; the copy on write image only stores the modified data
.IP "\fIoutput_base_image\fR" 4
.IX Item "output_base_image"
forces the output image to be created as a copy on write
image of the specified base image; \f(CW\*(C`output_base_image\*(C'\fR should have the same
content as the input's base image, however the path, image format, etc may
.IP "\fIbase_fmt\fR" 4
.IX Item "base_fmt"
is the disk image format of \fIbase_image\fR. for more information look at \fIfmt\fR
.IP "\fIfmt\fR" 4
.IX Item "fmt"
is the disk image format. It is guessed automatically in most cases. The following formats are supported:
.RS 4
.ie n .IP """raw""" 4
.el .IP "\f(CWraw\fR" 4
.IX Item "raw"
Raw disk image format (default). This format has the advantage of
being simple and easily exportable to all other emulators. If your
file system supports \fIholes\fR (for example in ext2 or ext3 on
Linux or \s-1NTFS\s0 on Windows), then only the written sectors will reserve
space. Use \f(CW\*(C`qemu\-img info\*(C'\fR to know the real size used by the
image or \f(CW\*(C`ls \-ls\*(C'\fR on Unix/Linux.
.ie n .IP """qcow2""" 4
.el .IP "\f(CWqcow2\fR" 4
.IX Item "qcow2"
\&\s-1QEMU\s0 image format, the most versatile format. Use it to have smaller
images (useful if your filesystem does not supports holes, for example
on Windows), optional \s-1AES\s0 encryption, zlib based compression and
support of multiple \s-1VM\s0 snapshots.
.ie n .IP """qcow""" 4
.el .IP "\f(CWqcow\fR" 4
.IX Item "qcow"
Old \s-1QEMU\s0 image format. Left for compatibility.
.ie n .IP """cow""" 4
.el .IP "\f(CWcow\fR" 4
.IX Item "cow"
User Mode Linux Copy On Write image format. Used to be the only growable
image format in \s-1QEMU\s0. It is supported only for compatibility with
previous versions. It does not work on win32.
.ie n .IP """vmdk""" 4
.el .IP "\f(CWvmdk\fR" 4
.IX Item "vmdk"
VMware 3 and 4 compatible image format.
.ie n .IP """cloop""" 4
.el .IP "\f(CWcloop\fR" 4
.IX Item "cloop"
Linux Compressed Loop image, useful only to reuse directly compressed
CD-ROM images present for example in the Knoppix CD-ROMs.
.RS 4
.IP "\fIsize\fR" 4
.IX Item "size"
is the disk image size in kilobytes. Optional suffixes \f(CW\*(C`M\*(C'\fR
(megabyte, 1024 * 1024) and \f(CW\*(C`G\*(C'\fR (gigabyte, 1024 * 1024 * 1024)
are supported and any \f(CW\*(C`k\*(C'\fR or \f(CW\*(C`K\*(C'\fR is ignored.
.IP "\fIoutput_filename\fR" 4
.IX Item "output_filename"
is the destination disk image filename
.IP "\fIoutput_fmt\fR" 4
.IX Item "output_fmt"
.Vb 1
\& is the destination format
.IP "\fI\-c\fR" 4
.IX Item "-c"
indicates that target image must be compressed (qcow format only)
.IP "\fI\-e\fR" 4
.IX Item "-e"
indicates that the target image must be encrypted (qcow format only)
.IP "\fI\-6\fR" 4
.IX Item "-6"
indicates that the target image must use compatibility level 6 (vmdk format only)
.IP "\fI\-h\fR" 4
.IX Item "-h"
with or without a command shows help and lists the supported formats
Parameters to snapshot subcommand:
.IP "\fBsnapshot\fR" 4
.IX Item "snapshot"
is the name of the snapshot to create, apply or delete
.IP "\fB\-a\fR" 4
.IX Item "-a"
applies a snapshot (revert disk to saved state)
.IP "\fB\-c\fR" 4
.IX Item "-c"
creates a snapshot
.IP "\fB\-d\fR" 4
.IX Item "-d"
deletes a snapshot
.IP "\fB\-l\fR" 4
.IX Item "-l"
lists all snapshots in the given image
Command description:
.IP "\fBcreate [\-6] [\-e] [\-b\fR \fIbase_image\fR\fB] [\-f\fR \fIfmt\fR\fB]\fR \fIfilename\fR \fB[\fR\fIsize\fR\fB]\fR" 4
.IX Item "create [-6] [-e] [-b base_image] [-f fmt] filename [size]"
Create the new disk image \fIfilename\fR of size \fIsize\fR and format
If \fIbase_image\fR is specified, then the image will record only the
differences from \fIbase_image\fR. No size needs to be specified in
this case. \fIbase_image\fR will never be modified unless you use the
\&\f(CW\*(C`commit\*(C'\fR monitor command.
.IP "\fBcommit [\-f\fR \fIfmt\fR\fB]\fR \fIfilename\fR" 4
.IX Item "commit [-f fmt] filename"
Commit the changes recorded in \fIfilename\fR in its base image.
.IP "\fBconvert [\-c] [\-e] [\-f\fR \fIfmt\fR\fB]\fR \fIfilename\fR \fB[\-O\fR \fIoutput_fmt\fR\fB]\fR \fIoutput_filename\fR" 4
.IX Item "convert [-c] [-e] [-f fmt] filename [-O output_fmt] output_filename"
Convert the disk image \fIfilename\fR to disk image \fIoutput_filename\fR
using format \fIoutput_fmt\fR. It can be optionally encrypted
(\f(CW\*(C`\-e\*(C'\fR option) or compressed (\f(CW\*(C`\-c\*(C'\fR option).
Only the format \f(CW\*(C`qcow\*(C'\fR supports encryption or compression. The
compression is read-only. It means that if a compressed sector is
rewritten, then it is rewritten as uncompressed data.
Encryption uses the \s-1AES\s0 format which is very secure (128 bit keys). Use
a long password (16 characters) to get maximum protection.
Image conversion is also useful to get smaller image when using a
growable format such as \f(CW\*(C`qcow\*(C'\fR or \f(CW\*(C`cow\*(C'\fR: the empty sectors
are detected and suppressed from the destination image.
.IP "\fBinfo [\-f\fR \fIfmt\fR\fB]\fR \fIfilename\fR" 4
.IX Item "info [-f fmt] filename"
Give information about the disk image \fIfilename\fR. Use it in
particular to know the size reserved on disk which can be different
from the displayed size. If \s-1VM\s0 snapshots are stored in the disk image,
they are displayed too.
.IP "\fBsnapshot [\-l | \-a\fR \fIsnapshot\fR \fB| \-c\fR \fIsnapshot\fR \fB| \-d\fR \fIsnapshot\fR \fB]\fR \fIfilename\fR" 4
.IX Item "snapshot [-l | -a snapshot | -c snapshot | -d snapshot ] filename"
List, apply, create or delete snapshots in image \fIfilename\fR.
.IX Header "SEE ALSO"
The \s-1HTML\s0 documentation of \s-1QEMU\s0 for more precise information and Linux
user mode emulator invocation.
.IX Header "AUTHOR"
Fabrice Bellard