Is libvirt capable of doing a live storage migration but keep the VM on the same host?
I have two NFS Network filesystem pools on one host. I would like to live migrate the underlying qcow2 disk files from one pool to the other.
I am unable to find any related documentation regarding live storage migration only. All examples and documentation seem to require a live VM migration at the same time.
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 toqcow2 -> qcow2
, you can do fancy thingsqcow2 -> rbd
, orqcow2 -> 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 :-)