代码改变世界

Openstack 连接 VMware ESXi 5.1

2013-05-09 10:16  梁小白  阅读(1125)  评论(0编辑  收藏
 
对于Vmware ,Openstack 的资料比较少,官方只是了了数语:
 
按其配置,nova-compute倒是可以顺利启动,日志中也可见看到不断更新的compute信息,也正确
 
2013-05-09 09:52:36.862 4551 AUDIT nova.compute.resource_tracker [-] Auditing locally available compute resources
2013-05-09 09:52:37.367 4551 AUDIT nova.compute.resource_tracker [-] Free ram (MB): 1535
2013-05-09 09:52:37.368 4551 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 35840
2013-05-09 09:52:37.368 4551 AUDIT nova.compute.resource_tracker [-] Free VCPUS: 2
2013-05-09 09:52:37.412 4551 INFO nova.compute.resource_tracker [-] Compute_service record updated for VmSDKServer:100.10.10.50
2013-05-09 09:52:37.413 4551 INFO nova.compute.manager [-] Updating host status
2013-05-09 09:53:38.355 4551 AUDIT nova.compute.resource_tracker [-] Auditing locally available compute resources
2013-05-09 09:53:38.863 4551 AUDIT nova.compute.resource_tracker [-] Free ram (MB): 1535
2013-05-09 09:53:38.863 4551 AUDIT nova.compute.resource_tracker [-] Free disk (GB): 35840
2013-05-09 09:53:38.864 4551 AUDIT nova.compute.resource_tracker [-] Free VCPUS: 2
2013-05-09 09:53:38.910 4551 INFO nova.compute.resource_tracker [-] Compute_service record updated for VmSDKServer:100.10.10.50
 
 
但当创建主机时确总是出错:
2013-05-09 09:55:15.232 ERROR nova.openstack.common.rpc.amqp [req-e32bcfae-4c62-4a77-8d37-34bfe34a4982 a70b71191dec4d8984843f33518255e2 30387eb46b624012bce5172ac77ab407] Exception during message handling
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp Traceback (most recent call last):
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/amqp.py", line 430, in _process_data
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     rval = self.proxy.dispatch(ctxt, version, method, **args)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/rpc/dispatcher.py", line 133, in dispatch
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     return getattr(proxyobj, method)(ctxt, **kwargs)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 117, in wrapped
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     temp_level, payload)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/exception.py", line 94, in wrapped
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     return f(self, context, *args, **kw)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 209, in decorated_function
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     pass
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 195, in decorated_function
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     return function(self, context, *args, **kwargs)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 260, in decorated_function
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     function(self, context, *args, **kwargs)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 237, in decorated_function
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     e, sys.exc_info())
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 224, in decorated_function
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     return function(self, context, *args, **kwargs)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1210, in run_instance
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     do_run_instance()
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/openstack/common/lockutils.py", line 242, in inner
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     retval = f(*args, **kwargs)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1209, in do_run_instance
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     admin_password, is_first_time, node, instance)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 865, in _run_instance
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     self._set_instance_error_state(context, instance['uuid'])
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/contextlib.py", line 24, in __exit__
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     self.gen.next()
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 810, in _run_instance
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     rt = self._get_resource_tracker(node)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 361, in _get_resource_tracker
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp     raise exception.NovaException(msg)
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp NovaException: VmSDKServer is not a valid node managed by this compute host.
2013-05-09 09:55:15.232 4551 TRACE nova.openstack.common.rpc.amqp 
 
解决中:
1.认证问题
 
ESXI 5.1.0配置:
启用http:
(按照官方文档并未找到/etc/vmware/hostd/proxy.xml)
在下面文件中有相关配置,
/etc/vmware/vpxa/vpxa.cfg
<httpNfc>                                                                                                       
    <accessMode>proxyAuto</accessMode>                                                                         
    <enabled>true</enabled>                                                                                       
  </httpNfc>
将proxyAuto 改为httpAndHttps
配置好并重启:
service.sh restart mgmt-vmware
 
此步骤做好后,貌似Ip能顺利分配,而且能检测到esxi上面的vm信息
 
现在grizlly 版本已经解决连接esxi的问题,上述问题可能缺少网卡对应配置
vmwareapi_vlan_interface=vmnic4 (change to actually use)
详情见: http://www.cnblogs.com/biangbiang/p/3273427.html