From: Kevin Wolf <kwolf@redhat.com>
To: anthony@codemonkey.ws
Cc: kwolf@redhat.com, qemu-devel@nongnu.org
Subject: [Qemu-devel] [PATCH 02/10] qemu-img: Explain how rebase operation can be used to perform a 'diff' operation.
Date: Fri, 25 May 2012 19:38:46 +0200 [thread overview]
Message-ID: <1337967534-12166-3-git-send-email-kwolf@redhat.com> (raw)
In-Reply-To: <1337967534-12166-1-git-send-email-kwolf@redhat.com>
From: "Richard W.M. Jones" <rjones@redhat.com>
Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
---
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}.
--
1.7.6.5
next prev parent reply other threads:[~2012-05-25 17:39 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-25 17:38 [Qemu-devel] [PULL 00/10] Block patches for 1.1 Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 01/10] qcow2: don't leak buffer for unexpected qcow_version in header Kevin Wolf
2012-05-25 17:38 ` Kevin Wolf [this message]
2012-05-25 17:38 ` [Qemu-devel] [PATCH 03/10] sheepdog: mark image as snapshot when tag is specified Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 04/10] sheepdog: return -errno on error Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 05/10] sheepdog: use heap instead of stack for BDRVSheepdogState Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 06/10] qcow2: Check qcow2_alloc_clusters_at() return value Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 07/10] qemu-iotests: mark 035 qcow2-only Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 08/10] fdc: floppy drive should be visible after start without media Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 09/10] fdc: fix media detection Kevin Wolf
2012-05-25 17:38 ` [Qemu-devel] [PATCH 10/10] fdc-test: introduced qtest no_media_on_start and cmos qtest for floppy Kevin Wolf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1337967534-12166-3-git-send-email-kwolf@redhat.com \
--to=kwolf@redhat.com \
--cc=anthony@codemonkey.ws \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).