qemu-img: document 'info --backing-chain'

Signed-off-by: Kashyap Chamarthy <kashyap.cv@gmail.com>
Reviewed-by: Stefan Hajnoczi <stefanha@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Kashyap Chamarthy 2012-10-18 11:25:34 +05:30 committed by Kevin Wolf
parent 514d9da5a9
commit e53575606a
2 changed files with 22 additions and 3 deletions

View File

@ -34,9 +34,9 @@ STEXI
ETEXI ETEXI
DEF("info", img_info, DEF("info", img_info,
"info [-f fmt] [--output=ofmt] filename") "info [-f fmt] [--output=ofmt] [--backing-chain] filename")
STEXI STEXI
@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename} @item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain] @var{filename}
ETEXI ETEXI
DEF("snapshot", img_snapshot, DEF("snapshot", img_snapshot,

View File

@ -28,6 +28,10 @@ Command parameters:
is the disk image format. It is guessed automatically in most cases. See below is the disk image format. It is guessed automatically in most cases. See below
for a description of the supported disk formats. for a description of the supported disk formats.
@item --backing-chain
will enumerate information about backing files in a disk image chain. Refer
below for further description.
@item size @item size
is the disk image size in bytes. Optional suffixes @code{k} or @code{K} is the disk image size in bytes. Optional suffixes @code{k} or @code{K}
(kilobyte, 1024) @code{M} (megabyte, 1024k) and @code{G} (gigabyte, 1024M) (kilobyte, 1024) @code{M} (megabyte, 1024k) and @code{G} (gigabyte, 1024M)
@ -129,7 +133,7 @@ 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, @var{backing_file} should have the same content as the input's base image,
however the path, image format, etc may differ. however the path, image format, etc may differ.
@item info [-f @var{fmt}] [--output=@var{ofmt}] @var{filename} @item info [-f @var{fmt}] [--output=@var{ofmt}] [--backing-chain] @var{filename}
Give information about the disk image @var{filename}. Use it in Give information about the disk image @var{filename}. Use it in
particular to know the size reserved on disk which can be different particular to know the size reserved on disk which can be different
@ -137,6 +141,21 @@ from the displayed size. If VM snapshots are stored in the disk image,
they are displayed too. The command can output in the format @var{ofmt} they are displayed too. The command can output in the format @var{ofmt}
which is either @code{human} or @code{json}. which is either @code{human} or @code{json}.
If a disk image has a backing file chain, information about each disk image in
the chain can be recursively enumerated by using the option @code{--backing-chain}.
For instance, if you have an image chain like:
@example
base.qcow2 <- snap1.qcow2 <- snap2.qcow2
@end example
To enumerate information about each disk image in the above chain, starting from top to base, do:
@example
qemu-img info --backing-chain snap2.qcow2
@end example
@item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename} @item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot} ] @var{filename}
List, apply, create or delete snapshots in image @var{filename}. List, apply, create or delete snapshots in image @var{filename}.