Commit eff442662d953da980891bc028b944f118c511f2
Committed by
Blue Swirl
1 parent
db08adf5
Document changes in qemu-img interface
Update the documentation to reflect the introduction of format specific options with -o. Don't advertise -e or -6 any more, they exist only for compatibility reasons and can be replaced by the corresponding -o options. Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Showing
2 changed files
with
23 additions
and
18 deletions
qemu-img.c
| ... | ... | @@ -59,9 +59,9 @@ static void help(void) |
| 59 | 59 | "\n" |
| 60 | 60 | "Command syntax:\n" |
| 61 | 61 | " check [-f fmt] filename\n" |
| 62 | - " create [-e] [-6] [-F fmt] [-b base_image] [-f fmt] filename [size]\n" | |
| 62 | + " create [-F fmt] [-b base_image] [-f fmt] [-o options] filename [size]\n" | |
| 63 | 63 | " commit [-f fmt] filename\n" |
| 64 | - " convert [-c] [-e] [-6] [-f fmt] [-O output_fmt] [-B output_base_image] filename [filename2 [...]] output_filename\n" | |
| 64 | + " convert [-c] [-f fmt] [-O output_fmt] [-o options] [-B output_base_image] filename [filename2 [...]] output_filename\n" | |
| 65 | 65 | " info [-f fmt] filename\n" |
| 66 | 66 | " snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename\n" |
| 67 | 67 | "\n" |
| ... | ... | @@ -79,9 +79,10 @@ static void help(void) |
| 79 | 79 | " supported any 'k' or 'K' is ignored\n" |
| 80 | 80 | " 'output_filename' is the destination disk image filename\n" |
| 81 | 81 | " 'output_fmt' is the destination format\n" |
| 82 | + " 'options' is a comma separated list of format specific options in a\n" | |
| 83 | + " name=value format. Use -o ? for an overview of the options supported by the\n" | |
| 84 | + " used format\n" | |
| 82 | 85 | " '-c' indicates that target image must be compressed (qcow format only)\n" |
| 83 | - " '-e' indicates that the target image must be encrypted (qcow format only)\n" | |
| 84 | - " '-6' indicates that the target image must use compatibility level 6 (vmdk format only)\n" | |
| 85 | 86 | " '-h' with or without a command shows this help and lists the supported formats\n" |
| 86 | 87 | "\n" |
| 87 | 88 | "Parameters to snapshot subcommand:\n" | ... | ... |
qemu-img.texi
| ... | ... | @@ -8,9 +8,9 @@ usage: qemu-img command [command options] |
| 8 | 8 | |
| 9 | 9 | The following commands are supported: |
| 10 | 10 | @table @option |
| 11 | -@item create [-e] [-6] [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}] | |
| 11 | +@item create [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}] | |
| 12 | 12 | @item commit [-f @var{fmt}] @var{filename} |
| 13 | -@item convert [-c] [-e] [-6] [-f @var{fmt}] [-O @var{output_fmt}] [-B @var{output_base_image}] @var{filename} [@var{filename2} [...]] @var{output_filename} | |
| 13 | +@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} | |
| 14 | 14 | @item info [-f @var{fmt}] @var{filename} |
| 15 | 15 | @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot}] @var{filename} |
| 16 | 16 | @end table |
| ... | ... | @@ -61,22 +61,23 @@ CD-ROM images present for example in the Knoppix CD-ROMs. |
| 61 | 61 | @end table |
| 62 | 62 | |
| 63 | 63 | @item size |
| 64 | -is the disk image size in kilobytes. Optional suffixes @code{M} | |
| 65 | -(megabyte, 1024 * 1024) and @code{G} (gigabyte, 1024 * 1024 * 1024) | |
| 66 | -are supported and any @code{k} or @code{K} is ignored. | |
| 64 | +is the disk image size in bytes. Optional suffixes @code{k} or @code{K} | |
| 65 | +(kilobyte, 1024) @code{M} (megabyte, 1024k) and @code{G} (gigabyte, 1024M) | |
| 66 | +and T (terabyte, 1024G) are supported. @code{b} is ignored. | |
| 67 | 67 | |
| 68 | 68 | @item output_filename |
| 69 | 69 | is the destination disk image filename |
| 70 | 70 | |
| 71 | 71 | @item output_fmt |
| 72 | 72 | is the destination format |
| 73 | +@item options | |
| 74 | +is a comma separated list of format specific options in a | |
| 75 | +name=value format. Use @code{-o ?} for an overview of the options supported | |
| 76 | +by the used format | |
| 77 | + | |
| 73 | 78 | |
| 74 | 79 | @item -c |
| 75 | 80 | indicates that target image must be compressed (qcow format only) |
| 76 | -@item -e | |
| 77 | -indicates that the target image must be encrypted (qcow format only) | |
| 78 | -@item -6 | |
| 79 | -indicates that the target image must use compatibility level 6 (vmdk format only) | |
| 80 | 81 | @item -h |
| 81 | 82 | with or without a command shows help and lists the supported formats |
| 82 | 83 | @end table |
| ... | ... | @@ -100,7 +101,7 @@ lists all snapshots in the given image |
| 100 | 101 | Command description: |
| 101 | 102 | |
| 102 | 103 | @table @option |
| 103 | -@item create [-6] [-e] [-b @var{base_image}] [-f @var{fmt}] @var{filename} [@var{size}] | |
| 104 | +@item create [-F @var{base_fmt}] [-b @var{base_image}] [-f @var{fmt}] [-o @var{options}] @var{filename} [@var{size}] | |
| 104 | 105 | |
| 105 | 106 | Create the new disk image @var{filename} of size @var{size} and format |
| 106 | 107 | @var{fmt}. |
| ... | ... | @@ -110,17 +111,20 @@ differences from @var{base_image}. No size needs to be specified in |
| 110 | 111 | this case. @var{base_image} will never be modified unless you use the |
| 111 | 112 | @code{commit} monitor command. |
| 112 | 113 | |
| 114 | +The size can also be specified using the @var{size} option with @code{-o}, | |
| 115 | +it doesn't need to be specified separately in this case. | |
| 116 | + | |
| 113 | 117 | @item commit [-f @var{fmt}] @var{filename} |
| 114 | 118 | |
| 115 | 119 | Commit the changes recorded in @var{filename} in its base image. |
| 116 | 120 | |
| 117 | -@item convert [-c] [-e] [-f @var{fmt}] @var{filename} [-O @var{output_fmt}] @var{output_filename} | |
| 121 | +@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} | |
| 118 | 122 | |
| 119 | 123 | Convert the disk image @var{filename} to disk image @var{output_filename} |
| 120 | -using format @var{output_fmt}. It can be optionally encrypted | |
| 121 | -(@code{-e} option) or compressed (@code{-c} option). | |
| 124 | +using format @var{output_fmt}. It can be optionally compressed (@code{-c} | |
| 125 | +option) or use any format specific options like encryption (@code{-o} option). | |
| 122 | 126 | |
| 123 | -Only the format @code{qcow} supports encryption or compression. The | |
| 127 | +Only the formats @code{qcow} and @code{qcow2} support encryption or compression. The | |
| 124 | 128 | compression is read-only. It means that if a compressed sector is |
| 125 | 129 | rewritten, then it is rewritten as uncompressed data. |
| 126 | 130 | ... | ... |