openstack nova fail to create vm
2019-05-13 14:43:27.017 47547 ERROR nova.compute.manager [req-3f1af0ed-c342-4cf3-8e76-6963053a5227 8b1ee1cd28ff40ef9bc830e71edced61 74288c12eb5f47aeab9c5df2c1faf57e - - -] [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] Instance failed to spawn
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] Traceback (most recent call last):
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2473, in _build_resources
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] yield resources
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] File "/usr/lib/python2.7/site-packages/nova/compute/manager.py", line 2345, in _build_and_run_instance
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] block_device_info=block_device_info)
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 2404, in spawn
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] write_to_disk=True)
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4205, in _get_guest_xml
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] context)
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/driver.py", line 4076, in _get_guest_config
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] flavor, virt_type)
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] File "/usr/lib/python2.7/site-packages/nova/virt/libvirt/vif.py", line 374, in get_config
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] _("Unexpected vif_type=%s") % vif_type)
2019-05-13 14:43:27.017 47547 TRACE nova.compute.manager [instance: 3f195d8c-c913-4e37-9935-ff4f3626ba73] NovaException: Unexpected vif_type=binding_failed
-> # neutron net-list
+--------------------------------------+--------+--------------------------------------------------+
| id | name | subnets |
+--------------------------------------+--------+--------------------------------------------------+
| 7ece3a78-60d8-42b2-b96a-daeaa640a850 | public | 336061df-3551-4e42-bee4-9ccaf436ef6e 10.0.2.0/23 |
+--------------------------------------+--------+--------------------------------------------------+
root@server245 [15时09分51秒] [~]
-> # neutron net-show 7ece3a78-60d8-42b2-b96a-daeaa640a850
+---------------------------+--------------------------------------+
| Field | Value |
+---------------------------+--------------------------------------+
| admin_state_up | True |
| id | 7ece3a78-60d8-42b2-b96a-daeaa640a850 |
| mtu | 0 |
| name | public |
| provider:network_type | flat |
| provider:physical_network | br-ex |
| provider:segmentation_id | |
| router:external | False |
| shared | True |
| status | ACTIVE |
| subnets | 336061df-3551-4e42-bee4-9ccaf436ef6e |
| tenant_id | 74288c12eb5f47aeab9c5df2c1faf57e |
+---------------------------+--------------------------------------+
原因是network_type是flat类型,删除网络,新建vxlan类型的网络可解决此问题。