infra-generale/migrate_to_mother_p2p.sh

10 lines
263 B
Bash
Executable File

#!/bin/bash
vm=$1
echo MIGRATING $vm ...
virsh migrate --p2p $vm --live --verbose --undefinesource --persistent --copy-storage-all --abort-on-error qemu+ssh://mother.onlink/system
if [ $? == 0]; then
sudo mv /var/backups/vm/aunt/* /var/backups/vm/mother
fi