feat: change volume migration procedure
Refactor volume migration.
Split the volume migration into 2 separate steps:
-
step1
: create snapshot of source volume -
step2
: clone snapshot + flatten clone + copy clone to destination volume
Introduce a parameter which configures, whether step2
is done while
the VM is off.
Original (non-default) flow:
- shutoff source VM
- perform
step1
+step2
(originally not split) - start source VM
- ...
New default flow:
- shutoff source VM
- perform
step1
- start source VM
- perform
step2
- ...
Rationale: There is no reason to keep the source VM off once the snapshot is created. The VM is started after the migration anyway, so the source and destination volumes will diverge eventually. The new default approach aims to reduce the time the VM is off.
Edited by Josef Smrčka