目前,我正在AWS EC2服务器上运行Openstack,以测试/学习为目的,特别是m3风格,其特点是高频英特尔XeonE5-2670 (Sandy )处理器。
每当我启动一个实例时,我都会在/var/log/nova/nova-compute.log中得到这个错误。
libvirtError: unsupported configuration: CPU specification not supported by hypervisor
这个错误是相当不言自明的,我发现这些链接指向了一个可能的解决方案:
https://wiki.openstack.org/wiki/LibvirtXMLCPUModel 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
发布于 2014-04-30 14:59:26
看来我第一次误解了这个关于已知问题的资源。它说:
libvirt_cpu_mode选项的默认值是“主机模型”,但显然这会导致一个错误,如“不支持的配置:虚拟机管理程序不支持的CPU规范”,如果您在VM内运行Nova;应该将libvirt_cpu_mode=“not”用于此类部署http://wiki.openstack.org/LibvirtXMLCPUModel。
因此,如果您正面临这个问题,请务必指定
libvirt_cpu_mode="none"
in /etc/nova/nova.conf
发布于 2014-04-28 15:58:59
正如Jack建议的那样,我认为您正在尝试托管一个KVM盒,而不是qemu。AWS不支持KVM,因此需要切换到qemu。请在http://docs.openstack.org/trunk/install-guide/install/apt/content/nova-compute.html检查#7点
参考指南:如果您为测试目的在虚拟机上安装Compute,则必须使用以下命令确定您的管理程序和/或CPU是否支持嵌套硬件加速:
egrep -c '(vmx|svm)' /proc/cpuinfo
如果此命令返回一个或多个值,则您的管理程序和/或CPU支持嵌套硬件加速,不需要额外的配置。
如果此命令返回的值为零,则管理程序和/或CPU不支持嵌套硬件加速,libvirt必须使用QEMU而不是KVM。编辑/etc/nova/nova-compute.conf文件中的利布维特部分以修改此键:
[libvirt]
...
virt_type = qemu
https://serverfault.com/questions/590550
复制相似问题