User Tools

Site Tools



This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
bash:one_liners:migrate_all_libvirt_machines_to_other_host [2015/03/07 19:22]
bash:one_liners:migrate_all_libvirt_machines_to_other_host [2015/08/15 22:56] (current)
Line 1: Line 1:
 +To migrate all running VPSes to another host, do the following:
 +for x in `virsh list | grep running | awk {'​print $2'}`; do echo "​Migrating $x"; virsh migrate-setspeed $x --bandwidth 1000 && virsh migrate $x qemu+ssh://​USERNAME@HOSTNAME/​system;​ sleep 10; done
 +Remember to change "​USERNAME"​ and "​HOSTNAME"​.