aboutsummaryrefslogtreecommitdiff
path: root/qemu-img-cmds.hx
diff options
context:
space:
mode:
authorKevin Wolf <kwolf@redhat.com>2010-01-12 12:55:18 +0100
committerAnthony Liguori <aliguori@us.ibm.com>2010-01-13 17:14:15 -0600
commit3e85c6fd714af70e6a26096a08ee02c98b12ad51 (patch)
tree3577bc6f53775f5c690313e29097396887a07ecc /qemu-img-cmds.hx
parent756e6736a12a46330d9532d5f861ba15b38886d8 (diff)
downloadqemu-arm-3e85c6fd714af70e6a26096a08ee02c98b12ad51.tar.gz
qemu-img rebase
This adds a rebase subcommand to qemu-img which allows to change the backing file of an image. In default mode, both the current and the new backing file need to exist, and after the rebase, the COW image is guaranteed to have the same guest visible content as before. To achieve this, old and new backing file are compared and, if necessary, data is copied from the old backing file into the COW image. With -u an unsafe mode is enabled that doesn't require the backing files to exist. It merely changes the backing file reference in the COW image. This is useful for renaming or moving the backing file. The user is responsible to make sure that the new backing file has no changes compared to the old one, or corruption may occur. Signed-off-by: Kevin Wolf <kwolf@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'qemu-img-cmds.hx')
-rw-r--r--qemu-img-cmds.hx6
1 files changed, 6 insertions, 0 deletions
diff --git a/qemu-img-cmds.hx b/qemu-img-cmds.hx
index 641bd8775b..f28ef36328 100644
--- a/qemu-img-cmds.hx
+++ b/qemu-img-cmds.hx
@@ -43,5 +43,11 @@ DEF("snapshot", img_snapshot,
"snapshot [-l | -a snapshot | -c snapshot | -d snapshot] filename")
STEXI
@item snapshot [-l | -a @var{snapshot} | -c @var{snapshot} | -d @var{snapshot}] @var{filename}
+ETEXI
+
+DEF("rebase", img_rebase,
+ "rebase [-u] -b backing_file [-F backing_fmt] filename")
+STEXI
+@item rebase [-u] -b @var{backing_file} [-F @var{backing_fmt}] @var{filename}
@end table
ETEXI