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:///
     
  • 相关阅读:
    利用python进行数据分析之数据聚合和分组运算
    利用python进行数据分析之绘图和可视化
    利用python进行数据分析之数据规整化
    利用python进行数据分析之pandas库的应用(二)
    利用python进行数据分析之pandas库的应用(一)
    利用python进行数据分析之数据加载存储与文件格式
    git 本地无版本仓库推送到远程新仓库命令
    Docker 部署Dotnet Core MVC项目
    css 单行图片文字水平垂直居中汇总
    IL命令初学者要知道的事
  • 原文地址:https://www.cnblogs.com/feisky/p/2569506.html
Copyright © 2011-2022 走看看