Don't think of this as related to live migration. This is really just storage backing file replacement. It can be done with the virsh blockcopy
command. This can copy contents of an image to an arbitrary new location and live update QEMU to point to the new location at the right point in time. You're not limited to qcow2 -> qcow2
, you can do fancy things qcow2 -> rbd
, or qcow2 -> lvm
, etc. This command can do other things too, such as flattening a chain of qcow2 files, or taking snapshots for backup purposes.
The main problem is that docs for this are pretty sparse, so its hard for people to understand its power. This old blog post might get you going in the right direction though https://kashyapc.wordpress.com/2014/07/06/live-disk-migration-with-libvirt-blockcopy/ Experiment with a non-important VM first :-)