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:///
     
  • 相关阅读:
    JS 加载html 在IE7 IE8下 可调试
    css 实现三角形 实现过程
    JSONP 理解 和 实例 讲解
    js 闭包 理解
    常见input输入框 点击 发光白色外阴影 focus
    常用垂直居中 随窗口改变一直居中布局 实例
    修改wampserver 默认localhost 和phpmyadmin 打开链接
    validate jquery 注册页面使用实例 详解
    mysql 查询表结构 查询索引
    wampserver 绑定域名 外部可以正常访问
  • 原文地址:https://www.cnblogs.com/feisky/p/2569506.html
Copyright © 2011-2022 走看看