X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=qemu-img.texi;h=f84590ebf0df88e74ec0c716d3a5604c4630228c;hb=443422fde7cb8410849074181de7b91bfd13b19d;hp=768054e9008d93bf0e8420bfbf02516dd8eab0f7;hpb=6f176b48f9f98820ed192a1355cc1c7c08ddf46b;p=mirror_qemu.git diff --git a/qemu-img.texi b/qemu-img.texi index 768054e900..f84590ebf0 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -46,14 +46,20 @@ is the destination disk image filename is a comma separated list of format specific options in a name=value format. Use @code{-o ?} for an overview of the options supported by the used format or see the format descriptions below for details. - +@item snapshot_param +is param used for internal snapshot, format is +'snapshot.id=[ID],snapshot.name=[NAME]' or '[ID_OR_NAME]' +@item snapshot_id_or_name +is deprecated, use snapshot_param instead @item -c indicates that target image must be compressed (qcow format only) @item -h with or without a command shows help and lists the supported formats @item -p -display progress bar (convert and rebase commands only) +display progress bar (compare, convert and rebase commands only). +If the @var{-p} option is not used for a command that supports it, the +progress is reported when the process receives a @code{SIGUSR1} signal. @item -q Quiet mode - do not print any output (except errors). There's no progress bar in case both @var{-q} and @var{-p} options are used. @@ -136,7 +142,12 @@ it doesn't need to be specified separately in this case. @item commit [-f @var{fmt}] [-t @var{cache}] @var{filename} -Commit the changes recorded in @var{filename} in its base image. +Commit the changes recorded in @var{filename} in its base image or backing file. +If the backing file is smaller than the snapshot, then the backing file will be +resized to be the same size as the snapshot. If the snapshot is smaller than +the backing file, the backing file will not be truncated. If you want the +backing file to match the size of the smaller snapshot, you can safely truncate +it yourself once the commit operation successfully completes. @item compare [-f @var{fmt}] [-F @var{fmt}] [-p] [-s] [-q] @var{filename1} @var{filename2} @@ -179,10 +190,10 @@ Error on reading data @end table -@item convert [-c] [-p] [-n] [-f @var{fmt}] [-t @var{cache}] [-O @var{output_fmt}] [-o @var{options}] [-s @var{snapshot_name}] [-S @var{sparse_size}] @var{filename} [@var{filename2} [...]] @var{output_filename} +@item convert [-c] [-p] [-n] [-f @var{fmt}] [-t @var{cache}] [-O @var{output_fmt}] [-o @var{options}] [-s @var{snapshot_id_or_name}] [-l @var{snapshot_param}] [-S @var{sparse_size}] @var{filename} [@var{filename2} [...]] @var{output_filename} -Convert the disk image @var{filename} or a snapshot @var{snapshot_name} to disk image @var{output_filename} -using format @var{output_fmt}. It can be optionally compressed (@code{-c} +Convert the disk image @var{filename} or a snapshot @var{snapshot_param}(@var{snapshot_id_or_name} is deprecated) +to disk image @var{output_filename} using format @var{output_fmt}. It can be optionally compressed (@code{-c} option) or use any format specific options like encryption (@code{-o} option). Only the formats @code{qcow} and @code{qcow2} support compression. The @@ -193,6 +204,12 @@ Image conversion is also useful to get smaller image when using a growable format such as @code{qcow} or @code{cow}: the empty sectors are detected and suppressed from the destination image. +@var{sparse_size} indicates the consecutive number of bytes (defaults to 4k) +that must contain only zeros for qemu-img to create a sparse image during +conversion. If @var{sparse_size} is 0, the source will not be scanned for +unallocated or zero sectors, and the destination image will always be +fully allocated. + You can use the @var{backing_file} option to force the output image to be created as a copy on write image of the specified base image; the @var{backing_file} should have the same content as the input's base image, @@ -381,21 +398,38 @@ support of multiple VM snapshots. Supported options: @table @code @item compat -Determines the qcow2 version to use. @code{compat=0.10} uses the traditional -image format that can be read by any QEMU since 0.10 (this is the default). +Determines the qcow2 version to use. @code{compat=0.10} uses the +traditional image format that can be read by any QEMU since 0.10. @code{compat=1.1} enables image format extensions that only QEMU 1.1 and -newer understand. Amongst others, this includes zero clusters, which allow -efficient copy-on-read for sparse images. +newer understand (this is the default). Amongst others, this includes zero +clusters, which allow efficient copy-on-read for sparse images. @item backing_file File name of a base image (see @option{create} subcommand) @item backing_fmt Image format of the base image @item encryption -If this option is set to @code{on}, the image is encrypted. +If this option is set to @code{on}, the image is encrypted with 128-bit AES-CBC. + +The use of encryption in qcow and qcow2 images is considered to be flawed by +modern cryptography standards, suffering from a number of design problems: + +@itemize @minus +@item The AES-CBC cipher is used with predictable initialization vectors based +on the sector number. This makes it vulnerable to chosen plaintext attacks +which can reveal the existence of encrypted data. +@item The user passphrase is directly used as the encryption key. A poorly +chosen or short passphrase will compromise the security of the encryption. +@item In the event of the passphrase being compromised there is no way to +change the passphrase to protect data in any qcow images. The files must +be cloned, using a different encryption passphrase in the new file. The +original file must then be securely erased using a program like shred, +though even this is ineffective with many modern storage technologies. +@end itemize -Encryption uses the AES format which is very secure (128 bit keys). Use -a long password (16 characters) to get maximum protection. +Use of qcow / qcow2 encryption is thus strongly discouraged. Users are +recommended to use an alternative encryption technology such as the +Linux dm-crypt / LUKS system. @item cluster_size Changes the qcow2 cluster size (must be between 512 and 2M). Smaller cluster @@ -421,8 +455,8 @@ This option can only be enabled if @code{compat=1.1} is specified. @item Other QEMU also supports various other image file formats for compatibility with -older QEMU versions or other hypervisors, including VMDK, VDI, VHD (vpc), qcow1 -and QED. For a full list of supported formats see @code{qemu-img --help}. +older QEMU versions or other hypervisors, including VMDK, VDI, VHD (vpc), VHDX, +qcow1 and QED. For a full list of supported formats see @code{qemu-img --help}. For a more detailed description of these formats, see the QEMU Emulation User Documentation.