You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
CP-312874 Reproduce a VM's snapshot chains one VDI at a time
A SMAPIv1 destination gets a VM's snapshot chains for free: each copy
is based on whichever VDI already in the destination SR has the most
similar content, which is the copy of the snapshot before it. SMAPIv3
backends report no similar content, so every VDI arrives as a full,
unrelated copy and the snapshot structure is lost.
Migration already copies a VM's VDIs one at a time, in a with_many
fold, and DATA.copy_into now takes the destination VDI a copy should be
based on. with_many hands each element the results of the elements
before it, so naming the destination copy of the VDI a VDI follows in
its disk's snapshot chain is enough to reproduce the chain. That parent
comes from the VM snapshot tree: the disk of the nearest ancestor of
the VM that has one, so snapshots on a branch the VM has reverted away
from start chains of their own.
It only works if a VDI is copied after the VDI it is based on, so
same-sized VDIs are now ordered by a depth-first walk of the snapshot
trees rather than by snapshot time. A disk's tree stays in one piece
whatever else is attached to the VM, siblings go oldest first so that
the branches a revert abandoned are copied before the branch the VM is
still on, and the disk itself, the only child that is not a snapshot,
comes last.
Signed-off-by: Lunfan Zhang[Lunfan.Zhang] <Lunfan.Zhang@cloud.com>
0 commit comments