On Sun, Feb 10, 2019 at 12:11:42 +0100, Paul van der Vlis wrote:
Hello,
I use libvirt on machines without shared storage. My VM's have all one
qcow2-disk, with the same name as the VM.
When I want to migrate a VM, I check if there is an qcow2 image on the
other host with that name. When that's not the case, I copy the image
using rsync first. If the image excist, I don't do that, and I think
that "--copy-storage-inc" will do it.
Note that using the 'inc' or incremental mode will copy only the data in
the top level image rather than a full copy. This means that you need to
pre-create empty qcow2 files which point to the correct backing store.
But I don't know how intelligent "--copy-storage-inc"
is. I use LVM
inside the VM's, and it's possible that I have changed the size of a
volume for example.
Non shared storage migration preserves the guest visible state.
My questions:
Is "--copy-storage-inc" intelligent enough for such tasks?
If used with --tunelled you can only use it if you wish to migrate ALL
disks in such a VM and need to pre-create the correct files.
If you wish to migrate only certain disks you need to stop using
--tunelled.
Is there documentation what is done during migration? Is it using
rsync?
Normally (if --tunneled is not used) it's using blockdev-mirror or
drive-mirror in qemu over an NBD connection to destination.
In your case it's using the old storage migration protocol.
Is it possible to make the migration process more verbose?
What do you mean by this? In case if --tunelled there's nothing we can
do though. Everything is done inside qemu.
Is what I do a good way?
With regards,
Paul van der Vlis
BTW: this is what I do, sometimes the lines are broken wrong:
-----------
# Rsync image when not on the other host:
if test `ssh $other "if test -e /data/$vm.qcow2; then echo ja; else echo
nee; fi"` = "nee"; then
echo "rsync..."
rsync /data/$vm.qcow2 $other://data/$vm.qcow2
if test $? = 0; then echo "gelukt"; else echo "niet gelukt"; exit;
fi
fi
# migrate
echo "migrate..."
virsh migrate --live --p2p --tunnelled --copy-storage-inc --persistent
As said above this implies the old storage migration protocol which
transports the data in the migration stream. This stream is then
tunelled over the libvirt connection. This is very inefficient and also
uses the old storage migration protocol which is obsolete and qemu will
attempt to remove it in the future.
--undefinesource --verbose $vm qemu+ssh://$other/system
if test $? = 0; then echo "gelukt"; else echo "niet gelukt"; exit;
fi
-----------
--
Paul van der Vlis Linux systeembeheer Groningen
https://www.vandervlis.nl/
_______________________________________________
libvirt-users mailing list
libvirt-users(a)redhat.com
https://www.redhat.com/mailman/listinfo/libvirt-users