openstack 热迁移配置

int32位 posted @ Jun 10, 2014 03:50:35 PM in openstack , 7035 阅读
转载请注明:http://krystism.is-programmer.com/若有错误,请多多指正,谢谢!

openstack热迁移有多种方式,下面配置block-migration方式,即以拷贝的方式实现热迁移,这种方式配置简单,但需要从源计算节点拷贝文件到目标计算节点,会比较耗时。而使用共享存储的方式,把所有的/var/lib/nova/instances下的虚拟机信息放到一块,比如放到控制节点,所有的计算使用nfs节点挂载该目录。这种方式迁移时不需要拷贝虚拟机文件,但所有的计算机节点的文件集中一起,管理不方便,配置方法见官方文档。

下面是block-migration方式配置:

首先在所有的计算节点中的nova.conf中增加live_migration_flag=VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_UNSAFE

开启热迁移功能。

然后需要配置versh免密码连接,修改/etc/libvirt/libvirtd.conf

去掉注释
listen_tls = 0
listen_tcp = 1
去掉注释并修改值
auth_tcp = “none” # 注意这里必须设为none,否则需要认证。
测试下:
 virsh --connect qemu+tcp://node1/system list
 virsh --connect qemu+tcp://node2/system list
其中node1,node2为计算节点主机名,如果不需要输入用户名和密码就能够列出所有的虚拟机,则表示配置成功。
重启所有计算节点nova-compute libvirt-bin服务。
此时就可以使用novaclient命令进行迁移,比如要把vm1 从node1 迁移到node2,则
 nova live-migration --block-migrate vm1 node2
注意选项--block-migrate是必要的,否则默认以共享存储的方式迁移。
转载请注明:http://krystism.is-programmer.com/若有错误,请多多指正,谢谢!
  • 无匹配
  • 无匹配
Haryana Board 10th I 说:
2022年8月17日 21:45

The Haryana Board of School Education's HBSE 10th Model Question Paper was published in 2023. The HBSE 10th New Model Paper 2023, HBSE 10th Question Paper 2023, HBSE 10th Sample Question Paper and Guess Paper 2023, or Bhiwani Board 10th New Question Paper 2023 of the examination are to be released by this board in the month designated for the HBSE 10th class examinations. Haryana Board 10th Important Question Paper 2023 The Haryana Board has made the New Question Paper for the Exams available for download so that students may more easily get ready for the Exams in accordance with the New Model Paper.


登录 *


loading captcha image...
(输入验证码)
or Ctrl+Enter