Think before you speak, read before you think.

迁移 kvm

by

in

domain=rskwliyu
host1=10.31.216.10
host2=10.31.216.20
echo “in $host1”
echo “ssh $host2 ok”
echo “cd /”
echo “tar c etc/libvirt/qemu/$domain.xml data/kvm/$domain.img | nc -l 3389”

echo “in $host2”
echo “cd /”
echo “nc $host1 3389 | tar x”

echo “in $host1”
echo “virsh migrate –live $domain qemu+ssh://$host2/system”

echo “in $host2”
echo “virsh edit $domain”
echo “in guest curl put”

echo “curl http://etcd.hupu.io:4001/v2/keys/hostvars/$host1/domain/$domain?recursive=true -XDELETE”


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *