Abra o Stack, tentando ativar a instância: libvirtError: configuração não suportada: especificação da CPU não suportada pelo hypervisor

1

Estou executando o Openstack para fins de teste / aprendizado no momento em servidores AWS EC2, especificamente o sabor m3 que apresenta processadores Intel Xeon E5-2670 (Sandy Bridge) de alta freqüência.

Sempre que eu lanço uma instância, recebo esse erro em /var/log/nova/nova-compute.log

libvirtError: unsupported configuration: CPU specification not supported by hypervisor

O erro é bastante evidente e eu encontrei esses links que apontam para uma possível solução:

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

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

Eu tenho feito isso por tentativa e erro (educado), mas não tenho tido sucesso até agora, e tenho medo de ter perdido algo óbvio.

Estou no caminho certo? Alguém que tenha aberto o Openstack na AWS poderá compartilhar algumas informações?

Editar

Encontrei isso no meu arquivo de log,

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
    
por Jack 22.04.2014 / 15:50

2 respostas

2

Parece que eu li mal este recurso sobre problemas conhecidos na primeira vez. Diz o seguinte:

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

Se você estiver enfrentando esse problema, especifique

libvirt_cpu_mode="none"

em /etc/nova/nova.conf

    
por 30.04.2014 / 16:59
1

Como Jack sugeriu, acho que você está tentando hospedar uma caixa KVM em vez de qemu. O KVM não é suportado pela AWS, então você precisará mudar para o qemu. Verifique o ponto # 7 no link

Do guia: Se você instalar o Compute em uma máquina virtual para fins de teste, deverá determinar se o hipervisor e / ou a CPU suportam a aceleração de hardware aninhada usando o seguinte comando:

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

Se este comando retornar um valor de um ou mais, seu hipervisor e / ou CPU suportará aceleração de hardware aninhada que não requer configuração adicional.

Se este comando retornar um valor zero, seu hipervisor e / ou CPU não suportarão aceleração de hardware aninhada e o libvirt deverá usar o QEMU em vez do KVM. Edite a seção [libvirt] no arquivo /etc/nova/nova-compute.conf para modificar essa chave:

[libvirt]
...
virt_type = qemu
    
por 28.04.2014 / 17:58