User Tools

Site Tools


bash:one_liners:migrate_all_libvirt_machines_to_other_host

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”.

bash/one_liners/migrate_all_libvirt_machines_to_other_host.txt · Last modified: 2015/08/15 22:56 by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki