所选语种没有对应资源,请选择:

本站点使用Cookies,继续浏览表示您同意我们使用Cookies。Cookies和隐私政策>

提示

尊敬的用户,您的IE浏览器版本过低,为获取更好的浏览体验,请升级您的IE浏览器。

升级
案例库

FusionSphere OpenStack6.3.1 虚拟机热迁移

发布时间:  2019-02-23  |   浏览次数:  701  |   下载次数:  0  |   作者:  hWX511191  |   文档编号: EKB1100005592

目录

问题描述

FusionSphere OpenStack6.3.1  虚拟机热迁移

虚拟机源主机IDC-JS-BO5-01-KVM08,迁移到目的主机IDC-JS-BO5-01-KVM05报错迁移失败


告警信息

处理过程

用户通过OM界面进行虚拟机热迁移时,热迁移失败。

1、登录Openstack后台节点,根据虚拟机ID查询热迁移操作的req-idnova instance-action-list vm_id 

2、找到该虚拟机所在的主机信息nova show vm_id |grep host,查询到主机的IPcps host-list |grep host_id,并登录到主机

3、登录到虚拟机原主机,使用第一步得到的req-id来查询nova-compute日志,发现没有日志打印: zgrep req-id /var/log/fusionsphere/component/nova-compute/*


4、查询到目的主机(即指定主机迁移的主机)的IP信息,登录目的主机,查询nova-compute日志,同样没有发现有日志打印

5在控制节点查询nova-apinova-conductor日志,在nova-api日志中有报错

IDC-JS-B03-05-controller01:/var/log/fusionsphere/component/nova-api # zgrep req-a9db304d-a6db-46d3-9de0-4be7a72d2076 *

nova-api_info.log:2019-02-23T10:10:31.408+08:00 localhost nova-api INFO [pid:13005] [MainThread] [tid:196769424] [wsgi.py:696 _process_stack] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] Action: 'action', calling method: <bound method MigrateServerController._migrate_live of <nova.api.openstack.compute.migrate_server.MigrateServerController object at 0xa24d9d0>>, body: {

nova-api_info.log:2019-02-23T10:10:31.411+08:00 localhost nova-api INFO [pid:13005] [MainThread] [tid:196769424] [api.py:2073 get] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] [instance: 89fcf68f-35ec-4e5a-afc3-067dba962a52] Fetching instance by UUID

nova-api_info.log:2019-02-23T10:10:31.576+08:00 localhost nova-api INFO [pid:13005] [MainThread] [tid:196769424] [instance.py:983 obj_load_attr] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] Lazy-loading 'flavor' on Instance uuid 89fcf68f-35ec-4e5a-afc3-067dba962a52

nova-api_info.log:2019-02-23T10:10:31.680+08:00 localhost nova-api INFO [pid:13005] [MainThread] [tid:196769424] [api.py:3480 live_migrate] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] [instance: 89fcf68f-35ec-4e5a-afc3-067dba962a52] Going to try to live migrate instance to IDC-JS-B04-01-KVM05

nova-api_info.log:2019-02-23T10:10:31.818+08:00 localhost nova-api INFO [pid:13005] [MainThread] [tid:196769424] [instance.py:983 obj_load_attr] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] Lazy-loading 'tags' on Instance uuid 89fcf68f-35ec-4e5a-afc3-067dba962a52

nova-api_info.log:2019-02-23T10:10:32.427+08:00 localhost nova-api INFO [pid:13005] [MainThread] [tid:196769424] [wsgi.py:439 __exit__] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] HTTP exception thrown: Compute service of IDC-JS-B04-01-KVM05 is unavailable at this time.nova compute服务不可用)

nova-api_info.log:2019-02-23T10:10:32.428+08:00 localhost nova-api INFO [pid:13005] [MainThread] [tid:196769424] [wsgi.py:1070 __call__] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] Returning 400 to user: Compute service of IDC-JS-B04-01-KVM05 is unavailable at this time.

nova-api_info.log:2019-02-23T10:10:32.455+08:00 localhost nova-api INFO [pid:13005/] [MainThread] [tid:196769424] [wsgi.py:555 handle_one_response] [req-a9db304d-a6db-46d3-9de0-4be7a72d2076] 172.28.0.2 "POST /v2.1/2090b88d686f4aae8656e12a4b0e1219/servers/89fcf68f-35ec-4e5a-afc3-067dba962a52/action HTTP/1.1" status: 400 len: 379 time: 1.0816810

IDC-JS-B03-05-controller01:/var/log/fusionsphere/component/nova-api #

6、查询节点nova-copute服务状态正常


 

7OM上查询主机id和主机名称是否一样

 

 

ServiceOM6.3.1.1版本,热迁移时候会以主机名作为标识去选择目的主机。openstack则是以主机ID标识计算节点,如果主机名被修改,则会找不到主机。且在该版本ServiceOM上虚拟机热迁移必现失败

 


根因

ServiceOM6.3.1.1版本,热迁移时候会以主机名作为标识去选择目的主机。openstack则是以主机ID标识计算节点,如果主机名被修改,则会找不到主机。且在该版本ServiceOM上虚拟机热迁移必现失败


解决方案

解决方法   

1、登陆ServiceOM主节点后台,切换到root用户下。

2、修改文件/opt/panda/app/ecs/webapps/ecs/ui/computeInstance/migrateVmCtrl.js,找到service.id = service.alias代码,对该行进行注释(在最前面添加//

参考如下:

http://image.huawei.com/tiny-lts/v1/images/6523925cf4081a2e02c8_876x343.png@900-0-90-f.png

3、登陆OM界面,打开虚拟机列表界面,通过F5按钮刷新浏览器。

4、规避完成。


建议与总结