1

I'm running Openstack for test/learning purposes at the moment on AWS EC2 servers, specifically the m3 flavor which features High Frequency Intel Xeon E5-2670 (Sandy Bridge) Processors.

Whenever I launch an instance I get this error in /var/log/nova/nova-compute.log

libvirtError: unsupported configuration: CPU specification not supported by hypervisor

The error is fairly self explanatory and I've found these links which point to a possible solution:

https://wiki.openstack.org/wiki/LibvirtXMLCPUModel

https://www.berrange.com/posts/2010/02/15/guest-cpu-model-configuration-in-libvirt-with-qemukvm/

I've been going at it by (educated) trial and error but haven't been successful thus far and I'm afraid I just missed something obvious.

Am I on the right path? Would anyone who has run Openstack on AWS be able to share some insight?

Edit

Found this in my log file,

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
  • I don't know anything about OpenStack, so I could be completely wrong, but just in case: are you sure that you can run OpenStack's hypervisor on AWS instances? I understand that you can create the "ecosystem" that OpenStack needs (the support servers), but creating virtual machines on the top of another virtual machine seems a bit far-fetched. Though I'd love to be corrected. – rsuarez Apr 22 '14 at 16:53
  • That's a good point. I'm fairly certain that I did manage to get Opesntack instances to run within a virtualized environment at some point though. Either within VirtualBox or on EC2 servers but quite some time ago so my memory is hazy. From what I understand qemu makes this all possible. – Jack Apr 22 '14 at 17:26
2

Looks like I misread this resource regarding known issues the first time around. It says the following:

The default value for the libvirt_cpu_mode option is "host-model" but apparently this results in an error like "unsupported configuration: CPU specification not supported by hypervisor" if you run Nova inside a VM; libvirt_cpu_mode="none" should be used for such deployments http://wiki.openstack.org/LibvirtXMLCPUModel

So if you're facing this issue be sure to specify

libvirt_cpu_mode="none"

in /etc/nova/nova.conf

1

As Jack suggested, I think you are trying to host a KVM box instead of qemu. KVM is not supported by AWS, so you'll need to switch to qemu. Please check point #7 at http://docs.openstack.org/trunk/install-guide/install/apt/content/nova-compute.html

From the guide: If you install Compute on a virtual machine for testing purposes, you must determine whether your hypervisor and/or CPU support nested hardware acceleration using the following command:

egrep -c '(vmx|svm)' /proc/cpuinfo

If this command returns a value of one or greater, your hypervisor and/or CPU support nested hardware acceleration which requires no additional configuration.

If this command returns a value of zero, your hypervisor and/or CPU do not support nested hardware acceleration and libvirt must use QEMU instead of KVM. Edit the [libvirt] section in the /etc/nova/nova-compute.conf file to modify this key:

[libvirt]
...
virt_type = qemu
  • Can you add a description of what "point 7" is in case the link goes bad? – Jacob Apr 28 '14 at 16:35
  • Thanks for the great answer, unfortunately I'm still getting the same message regarding the cpu type. In my nova-compute.conf the entry is already listed as "libvirt_type=qemu" (not "virt_type=qemu"), I've tried both just to be safe but no luck. Also, in my /etc/nova/nova.conf this can be found, "libvirt_cpu_mode=host-model libvirt_type=qemu" – Jack Apr 29 '14 at 12:31

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.