diff options
author | Richard W.M. Jones <rjones@redhat.com> | 2012-05-21 14:58:05 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2012-05-25 18:12:54 +0200 |
commit | 9fda6ab1d9f33c04f35438bce101427dd557fef6 (patch) | |
tree | a926c774e3beb7f42911d18d91818f429c0fc079 | |
parent | b6c147622d31272f9728da9ec16d146bf8c45a74 (diff) | |
download | qemu-9fda6ab1d9f33c04f35438bce101427dd557fef6.zip qemu-9fda6ab1d9f33c04f35438bce101427dd557fef6.tar.gz qemu-9fda6ab1d9f33c04f35438bce101427dd557fef6.tar.bz2 |
qemu-img: Explain how rebase operation can be used to perform a 'diff' operation.
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
-rw-r--r-- | qemu-img.texi | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/qemu-img.texi b/qemu-img.texi index b2ca3a5..6fc3c28 100644 --- a/qemu-img.texi +++ b/qemu-img.texi @@ -159,6 +159,24 @@ It can be used without an accessible old backing file, i.e. you can use it to fix an image whose backing file has already been moved/renamed. @end table +You can use @code{rebase} to perform a ``diff'' operation on two +disk images. This can be useful when you have copied or cloned +a guest, and you want to get back to a thin image on top of a +template or base image. + +Say that @code{base.img} has been cloned as @code{modified.img} by +copying it, and that the @code{modified.img} guest has run so there +are now some changes compared to @code{base.img}. To construct a thin +image called @code{diff.qcow2} that contains just the differences, do: + +@example +qemu-img create -f qcow2 -b modified.img diff.qcow2 +qemu-img rebase -b base.img diff.qcow2 +@end example + +At this point, @code{modified.img} can be discarded, since +@code{base.img + diff.qcow2} contains the same information. + @item resize @var{filename} [+ | -]@var{size} Change the disk image as if it had been created with @var{size}. |