云主机迁移

云主机迁移

(一)迁移条件

​
①至少有2个计算节点  ②2个计算节点必须处于同一个可用区域(主机聚集)  ③计算节点,有足够的剩余计算资源(比如内存)

将云主机从compute节点冷迁移到controller节点上 scp -r /var/lib/nova/instances/[实例uuid]/ controller:/var/lib/nova/instances/ # compute节点 chown nova:nova /var/lib/nova/instances/[实例uuid]/ # controller节点 mysql -uroot -p000000 -e "use nova;update instances set host='controller',node='controller' where uuid='[实例uuid]'" systemctl restart openstack-nova-* virsh list --all

查看虚拟机所在的宿主机 nova show b60f958f-88cd-4666-af61-156654477a85| grep 'OS-EXT-SRV-ATTR:hos'

service openstack-nova-compute restart

systemctl restart openstack-nova-compute

(省略)配置 重启

systemctl restart openstack-nova-api.service \ 
openstack-nova-consoleauth.service openstack-nova-scheduler.service \
openstack-nova-conductor.service openstack-nova-novncproxy.service

你可能感兴趣的:(OpenStack,linux,openstack)