Openstack 2--虚拟机冷迁移

虚拟机迁移分为冷迁移与热迁移。

冷迁移

关机之后再进行迁移。

1、需求说明

将源主机IP:192.168.1.119 , HostName=h119上的ID=6463f9b8-7a29-423a-9d3a-ed4a7028df2e的实例

迁到目标主机IP:192.168.1.117,HostName=h117上。

2、在源主机查找实例ID


3、在openstack界面上关闭该实例

4、在源主机上进行迁移

     

 5、在目标主机上修改权限

      chown -R nova:nova 6463f9b8-7a29-423a-9d3a-ed4a7028df2e 

6、登录数据库MariaDB

     mysql -uroot -p

     MariaDB [(none)]> use nova;

    MariaDB [nova]> update instances set host='h117', node='h117' where uuid='6463f9b8-7a29-423a-9d3a-ed4a7028df2e';

7、重启目标主机上的nova-compute

     service nova-compute restart

8、重启实例即可。


   也可参看:https://www.cnblogs.com/kevingrace/p/6018676.html 


猜你喜欢

转载自blog.csdn.net/c123m/article/details/80244377