summaryrefslogtreecommitdiff
path: root/qemu-img.texi
diff options
context:
space:
mode:
authorAnthony Liguori <aliguori@us.ibm.com>2012-05-29 04:30:49 -0500
committerAnthony Liguori <aliguori@us.ibm.com>2012-05-29 04:30:49 -0500
commit306761537f03d31087dabe284523e08d050bc789 (patch)
tree78c44d75bdbbdaa7ea6fd6b77f06b9a4dbf3031d /qemu-img.texi
parent7943df571ae402862a6ace3a2539bd93153317f4 (diff)
parent7cd331617a48785faaf2aafe36db5c06285bfed8 (diff)
downloadqemu-306761537f03d31087dabe284523e08d050bc789.tar.gz
Merge remote-tracking branch 'kwolf/for-anthony' into staging
* kwolf/for-anthony: fdc-test: introduced qtest no_media_on_start and cmos qtest for floppy fdc: fix media detection fdc: floppy drive should be visible after start without media qemu-iotests: mark 035 qcow2-only qcow2: Check qcow2_alloc_clusters_at() return value sheepdog: use heap instead of stack for BDRVSheepdogState sheepdog: return -errno on error sheepdog: mark image as snapshot when tag is specified qemu-img: Explain how rebase operation can be used to perform a 'diff' operation. qcow2: don't leak buffer for unexpected qcow_version in header
Diffstat (limited to 'qemu-img.texi')
-rw-r--r--qemu-img.texi18
1 files changed, 18 insertions, 0 deletions
diff --git a/qemu-img.texi b/qemu-img.texi
index b2ca3a542c..6fc3c28e0d 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}.