我遇到了 Nova 计算服务无法启动的问题。我发现很多人也有这个问题,但似乎没有人找到问题所在:
systemctl status openstack-nova-compute.service
● openstack-nova-compute.service - OpenStack Nova Compute Server
Loaded: loaded (/usr/lib/systemd/system/openstack-nova-compute.service; enabled; vendor preset: disabled)
Active: active (running) since Wed 2016-04-20 11:32:56 EDT; 2s ago
Main PID: 19966 (nova-compute)
CGroup: /system.slice/openstack-nova-compute.service
└─19966 /usr/bin/python /usr/bin/nova-compute
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: result = proxy_call(self._autowrap, f, *args, **kwargs)
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 141, in proxy_call
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: rv = execute(f, *args, **kwargs)
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 122, in execute
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: six.reraise(c, e, tb)
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: File "/usr/lib/python2.7/site-packages/eventlet/tpool.py", line 80, in tworker
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: rv = meth(*args, **kwargs)
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: File "/usr/lib64/python2.7/site-packages/libvirt.py", line 3505, in baselineCPU
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: if ret is None: raise libvirtError ('virConnectBaselineCPU() failed', conn=self)
Apr 20 11:32:56 ose-osp.dc2.crunchtools.com nova-compute[19966]: libvirtError: XML error: Missing CPU model name
答案1
通过将以下内容添加到“domain type='kvm'”部分来修改客户虚拟机:
virsh edit machine.example.com
<cpu mode='host-passthrough'>
<model fallback='forbid'/>
<topology sockets='2' cores='1' threads='1'/>
</cpu>
选项:对于嵌套的 OpenStack,修改 nova.conf
vi /etc/nova/nova.conf
virt_type=kvm
cpu_mode=host-passthrough