4 High level description of live block operations. Note these are not
5 supported for use with the raw format at the moment.
10 Given a snapshot chain, described in this document in the following
13 [A] -> [B] -> [C] -> [D]
15 Where the rightmost object ([D] in the example) described is the current
16 image which the guest OS has write access to. To the left of it is its base
17 image, and so on accordingly until the leftmost image, which has no
20 The snapshot live merge operation transforms such a chain into a
21 smaller one with fewer elements, such as this transformation relative
26 Currently only forward merge with target being the active image is
27 supported, that is, data copy is performed in the right direction with
28 destination being the rightmost image.
30 The operation is implemented in QEMU through image streaming facilities.
32 The basic idea is to execute 'block_stream virtio0' while the guest is
33 running. Progress can be monitored using 'info block-jobs'. When the
34 streaming operation completes it raises a QMP event. 'block_stream'
35 copies data from the backing file(s) into the active image. When finished,
36 it adjusts the backing file pointer.
38 The 'base' parameter specifies an image which data need not be streamed from.
39 This image will be used as the backing file for the active image when the
40 operation is finished.
42 In the example above, the command would be:
44 (qemu) block_stream virtio0 A
50 To copy an in use image to another destination in the filesystem, one
51 should create a live snapshot in the desired destination, then stream
52 into that image. Example:
54 (qemu) snapshot_blkdev ide0-hd0 /new-path/disk.img qcow2
56 (qemu) block_stream ide0-hd0