目前,我在AWS EC2服务器上运行Openstack以进行testing/学习,尤其是使用高频Intel Xeon E5-2670(Sandy Bridge)处理器的m3版本。
每当我启动一个实例,我在/var/log/nova/nova-compute.log中得到这个错误
libvirtError: unsupported configuration: CPU specification not supported by hypervisor
错误是相当自我解释,我发现这些链接指向一个可能的解决scheme:
https://wiki.openstack.org/wiki/LibvirtXMLCPUModel
- SSD升级后EC2性能变差
- EC2实例初始化只有1/2检查,因此无法login到我的Linux服务器
- 任何方式来阻止IP地址主机头欺骗?
- 将新用户添加到AWS EC2 – 权限被拒绝(publickey)
- docker.io包报告仅在EC2上丢失
https://www.berrange.com/posts/2010/02/15/guest-cpu-model-configuration-in-libvirt-with-qemukvm/
我一直在尝试(受过教育的)反复试验,但到目前为止还没有取得成功,恐怕我错过了一些明显的东西。
我在正确的道路上? 任何在AWS上运行Openstack的人都可以分享一些见解吗?
编辑
在我的日志文件中发现这个,
2014-04-30 01:56:05.986 1145 ERROR nova.virt.libvirt.driver [req-be5f0c96-cdd7-4ac3-a526-24c77b76a121 4e1ab5ced4394c309396f4487f58c187 b51412721c1045bd93d6dd5e513a4bca] An error occurred while trying to launch a defined domain with xml: <domain type='qemu'> <name>instance-00000001</name> <uuid>4b5edb76-7e09-425f-a71f-5c7b48fe2ac7</uuid> <memory unit='KiB'>524288</memory> <currentMemory unit='KiB'>524288</currentMemory> <vcpu placement='static'>1</vcpu> <sysinfo type='smbios'> <system> <entry name='manufacturer'>OpenStack Foundation</entry> <entry name='product'>OpenStack Nova</entry> <entry name='version'>2013.2.2</entry> <entry name='serial'>4aeceff8-3582-48be-8712-ac2febc819c3</entry> <entry name='uuid'>4b5edb76-7e09-425f-a71f-5c7b48fe2ac7</entry> </system> </sysinfo> <os> <type arch='x86_64' machine='pc-i440fx-1.5'>hvm</type> <boot dev='hd'/> <smbios mode='sysinfo'/> </os> <features> <acpi/> <apic/> </features> <cpu mode='host-model'> <model fallback='allow'/> </cpu> <clock offset='utc'/> <on_poweroff>destroy</on_poweroff> <on_reboot>restart</on_reboot> <on_crash>destroy</on_crash> <devices> <emulator>/usr/bin/qemu-system-x86_64</emulator> <disk type='file' device='disk'> <driver name='qemu' type='qcow2' cache='none'/> <source file='/var/lib/nova/instances/4b5edb76-7e09-425f-a71f-5c7b48fe2ac7/disk'/> <target dev='vda' bus='virtio'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/> </disk> <controller type='usb' index='0'> <address type='pci' domain='0x0000' bus='0x00' slot='0x01' function='0x2'/> </controller> <controller type='pci' index='0' model='pci-root'/> <interface type='bridge'> <mac address='fa:16:3e:0b:9b:b8'/> <source bridge='br100'/> <model type='virtio'/> <driver name='qemu'/> <filterref filter='nova-instance-instance-00000001-fa163e0b9bb8'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0'/> </interface> <serial type='file'> <source path='/var/lib/nova/instances/4b5edb76-7e09-425f-a71f-5c7b48fe2ac7/console.log'/> <target port='0'/> </serial> <serial type='pty'> <target port='1'/> </serial> <console type='file'> <source path='/var/lib/nova/instances/4b5edb76-7e09-425f-a71f-5c7b48fe2ac7/console.log'/> <target type='serial' port='0'/> </console> <input type='tablet' bus='usb'/> <input type='mouse' bus='ps2'/> <graphics type='vnc' port='-1' autoport='yes' listen='localhost' keymap='en-us'> <listen type='address' address='localhost'/> </graphics> <video> <model type='cirrus' vram='9216' heads='1'/> <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/> </video> <memballoon model='virtio'> <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/> </memballoon> </devices> </domain> 2014-04-30 01:56:05.987 1145 ERROR nova.compute.manager [req-be5f0c96-cdd7-4ac3-a526-24c77b76a121 4e1ab5ced4394c309396f4487f58c187 b51412721c1045bd93d6dd5e513a4bca] [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] Instance failed to spawn 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] Traceback (most recent call last): 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line 1423, in _spawn 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] block_device_info) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 2091, in spawn 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] block_device_info, context=context) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3249, in _create_domain_and_network 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] domain = self._create_domain(xml, instance=instance, power_on=power_on) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3192, in _create_domain 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] domain.XMLDesc(0)) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/nova/virt/libvirt/driver.py", line 3187, in _create_domain 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] domain.createWithFlags(launch_flags) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 179, in doit 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] result = proxy_call(self._autowrap, f, *args, **kwargs) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 139, in proxy_call 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] rv = execute(f,*args,**kwargs) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/eventlet/tpool.py", line 77, in tworker 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] rv = meth(*args,**kwargs) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] File "/usr/lib/python2.7/dist-packages/libvirt.py", line 728, in createWithFlags 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] if ret == -1: raise libvirtError ('virDomainCreateWithFlags() failed', dom=self) 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] libvirtError: unsupported configuration: CPU specification not supported by hypervisor 2014-04-30 01:56:05.987 1145 TRACE nova.compute.manager [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] 2014-04-30 01:56:06.950 1145 ERROR nova.compute.manager [req-be5f0c96-cdd7-4ac3-a526-24c77b76a121 4e1ab5ced4394c309396f4487f58c187 b51412721c1045bd93d6dd5e513a4bca] [instance: 4b5edb76-7e09-425f-a71f-5c7b48fe2ac7] Error: unsupported configuration: CPU specification not supported by hypervisor
看起来像我第一次误解这个资源关于已知的问题。 它说以下几点:
libvirt_cpu_mode选项的默认值是“host-model”,但是显然如果你在虚拟机中运行Nova,会导致一个像“不支持的configuration:虚拟机pipe理程序不支持CPU规范”的错误。 libvirt_cpu_mode =“none”应该用于这样的部署http://wiki.openstack.org/LibvirtXMLCPUModel
所以如果你面对这个问题一定要指定
libvirt_cpu_mode="none"
在/etc/nova/nova.conf中
正如杰克所说,我认为你正试图托pipe一个KVM盒子而不是qemu。 AWS不支持KVM,因此您需要切换到qemu。 请在http://docs.openstack.org/trunk/install-guide/install/apt/content/nova-compute.html查看第7点。
从指南:如果您在虚拟机上安装Compute以进行testing,则必须使用以下命令确定您的虚拟机pipe理程序和/或CPU是否支持嵌套硬件加速:
egrep -c '(vmx|svm)' /proc/cpuinfo
如果此命令返回值为1或更大,则pipe理程序和/或CPU支持嵌套硬件加速,无需其他configuration。
如果此命令返回零值,则pipe理程序和/或CPU不支持嵌套硬件加速,libvirt必须使用QEMU而不是KVM。 编辑/etc/nova/nova-compute.conf文件中的[libvirt]部分以修改此项:
[libvirt] ... virt_type = qemu