infra-generale/migrate_to_mother_p2p.sh

11 lines
301 B
Bash
Raw Normal View History

2022-05-20 22:13:38 +02:00
VMs=$(sudo virsh list --state-running --name)
for vm in $VMs
do
echo MIGRATING $vm ...
virsh migrate --p2p $vm --live --verbose --undefinesource --persistent \
--copy-storage-all --abort-on-error qemu+ssh://mother.onlink/system
done
sudo mv /var/backups/vm/aunt/* /var/backups/vm/mother