0

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.

1 Answer 1

0

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 :-)

1
  • This is indeed what i am looking for. The reason i was unable to find any related information because i was stuck on searching for a migration instead of block copy.
    – eKKiM
    Commented Jan 12, 2023 at 13:43

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .