qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PATCH 8/8] docs: add mirroring to live block operations


From: Paolo Bonzini
Subject: [Qemu-devel] [PATCH 8/8] docs: add mirroring to live block operations
Date: Fri, 13 Apr 2012 18:23:18 +0200

Signed-off-by: Paolo Bonzini <address@hidden>
---
 docs/live-block-ops.txt |   38 +++++++++++++++++++++++++++++++-------
 1 file changed, 31 insertions(+), 7 deletions(-)

diff --git a/docs/live-block-ops.txt b/docs/live-block-ops.txt
index a257087..caf3466 100644
--- a/docs/live-block-ops.txt
+++ b/docs/live-block-ops.txt
@@ -1,8 +1,7 @@
 LIVE BLOCK OPERATIONS
 =====================
 
-High level description of live block operations. Note these are not
-supported for use with the raw format at the moment.
+High level description of live block operations.
 
 Snapshot live merge
 ===================
@@ -44,15 +43,40 @@ In the example above, the command would be:
 (qemu) block_stream virtio0 A
 
 
+Live block migration
+====================
+
+Migrating an in use image to another destination in the filesystem
+is done through image mirroring.  The idea is to execute
+'drive_mirror virtio0 /new-path/disk.img qcow2' while the guest
+is running.  The topmost image ([D] in the example above) will
+be copied to the given path, and the two can be kept in sync.
+
+Progress can be monitored using 'info block-jobs'.  Once this command
+reports something like
+
+  Type mirror, device virtio0: Completed 1048576000 of 1048576000 bytes
+
+it is possible to switch to the destination using
+
+(qemu) drive_reopen virtio0 /new-path/disk.img
+
+This assumes that all images A/B/C are also present under /new-path
+or.  An image can be omitted from the destination if one of the images
+refers to its backing file using an absolute path.
+
+
 Live block copy
 ===============
 
 To copy an in use image to another destination in the filesystem, one
-should create a live snapshot in the desired destination, then stream
-into that image. Example:
-
-(qemu) snapshot_blkdev ide0-hd0 /new-path/disk.img qcow2
+can also use mirroring with the -f option.
 
-(qemu) block_stream ide0-hd0
+(qemu) drive_mirror -f virtio0 /new-path/disk.img qcow2
 
+Note that if one image in the chain is in raw format, the
+resulting copy might not be thin-provisioned anymore, depending on
+the underlying file system.
 
+It is also possible to use raw as the format of the destination image.
+Converting an image to raw will properly support thin provisioning.
-- 
1.7.9.3




reply via email to

[Prev in Thread] Current Thread [Next in Thread]