迁移 kvm

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”

发表评论

电子邮件地址不会被公开。 必填项已用*标注