zoukankan      html  css  js  c++  java
  • openstack配置xen

    openstack配置xen
     
    首先安装nova-compute-xen:apt-get install nova-compute-xen
     
    配置nova:
     
    /etc/nova/nova-compute.conf:
     
         --libvirt_type=xen
     
    /etc/nova/nova.conf:
     
         --connection_type=libvirt
         --libvirt_type=xen 
     
    这样还是无法启动nova-compute,报错:
    2012-06-28 15:12:26 TRACE nova Traceback (most recent call last):
    2012-06-28 15:12:26 TRACE nova   File "/usr/bin/nova-compute", line 49, in <module>
    2012-06-28 15:12:26 TRACE nova     service.wait()
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 166, in wait
    2012-06-28 15:12:26 TRACE nova     return self._exit_event.wait()
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/event.py", line 116, in wait
    2012-06-28 15:12:26 TRACE nova     return hubs.get_hub().switch()
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/hubs/hub.py", line 177, in switch
    2012-06-28 15:12:26 TRACE nova     return self.greenlet.switch()
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/eventlet/greenthread.py", line 192, in main
    2012-06-28 15:12:26 TRACE nova     result = function(*args, **kwargs)
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 101, in run_server
    2012-06-28 15:12:26 TRACE nova     server.start()
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/service.py", line 174, in start
    2012-06-28 15:12:26 TRACE nova     self.manager.update_available_resource(ctxt)
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 2409, in update_ava
    ilable_resource
    2012-06-28 15:12:26 TRACE nova     self.driver.update_available_resource(context, self.host)
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 1934, in up
    date_available_resource
    2012-06-28 15:12:26 TRACE nova     'memory_mb': self.get_memory_mb_total(),
    2012-06-28 15:12:26 TRACE nova   File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py", line 1711, in ge
    t_memory_mb_total
    2012-06-28 15:12:26 TRACE nova     meminfo = self._conn.getInfo()[1]
    2012-06-28 15:12:26 TRACE nova NameError: global name 'self' is not defined
     
    看起来是Ubuntu12.04上的nova有点bug,作如下修改:
     
    /usr/lib/python2.7/dist-packages/nova/virt/libvirt/connection.py:1699行开始的两行改为:
     
         #@staticmethod
         def get_memory_mb_total(self):
     
    这样就可以启动nova-compute了。
     
    另外,如果要用virsh来看虚机,要注意virsh默认为qemu,需要加上xen的参数:virsh -c xen:///
     
  • 相关阅读:
    java基础部分的一些有意思的东西。
    antdvue按需加载插件babelpluginimport报错
    阿超的烦恼 javaScript篇
    .NET E F(Entity Framework)框架 DataBase First 和 Code First 简单用法。
    JQuery获得input ID相同但是type不同的方法
    gridview的删除,修改,数据绑定处理
    jgGrid数据格式
    Cannot read configuration file due to insufficient permissions
    Invoke action which type of result is JsonResult on controller from view using Ajax or geJSon
    Entity model数据库连接
  • 原文地址:https://www.cnblogs.com/feisky/p/2569506.html
Copyright © 2011-2022 走看看