Openstack Nova Failed to allocate network(s),openstackallocate


错误描述:

创建虚拟机的时候会出现这样的错误
上图的错误信息为

Error: 创建实例 "cirros" 失败: 请稍后再试 [错误: Build of instance 751267aa-e9e2-41c0-945b-9bbb94096849 aborted: Failed to allocate the network(s), not rescheduling.].

计算节点中nova-compute.log的信息

2015-05-13 09:43:17.006 2451 ERROR nova.compute.manager [-] [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc] Instance failed to spawn
2015-05-13 09:43:17.006 2451 TRACE nova.compute.manager [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
 2252, in _build_resources
2015-05-13 09:43:17.006 2451 TRACE nova.compute.manager [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc]   File "/usr/lib/python2.7/dist-packages/nova/compute/manager.py", line
 2122, in _build_and_run_instance
2015-05-13 09:43:17.006 2451 TRACE nova.compute.manager [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc] VirtualInterfaceCreateException: Virtual Interface creation failed
2015-05-13 09:43:17.006 2451 TRACE nova.compute.manager [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc]
2015-05-13 09:43:17.015 2451 AUDIT nova.compute.manager [req-92856669-8c22-4f71-91ab-f38c0474fc2b None] [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc] Terminating instance
2015-05-13 09:43:17.031 2451 WARNING nova.virt.libvirt.driver [-] [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc] During wait destroy, instance disappeared.
2015-05-13 09:43:17.261 2451 INFO nova.virt.libvirt.driver [-] [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc] Deletion of /var/lib/nova/instances/7d025f29-0c6b-4b8c-81c5-8f9c
71bd35dc_del complete
2015-05-13 09:43:17.492 2451 INFO nova.scheduler.client.report [-] Compute_service record updated for ('server-01', 'server-01')
2015-05-13 09:43:17.492 2451 ERROR nova.compute.manager [-] [instance: 7d025f29-0c6b-4b8c-81c5-8f9c71bd35dc] Failed to allocate network(s)

解决方式

在计算节点的/etc/nova/nova.conf中添加下面两句

#Fail instance boot if vif plugging fails  
vif_plugging_is_fatal = False  

#Number of seconds to wait for neutron vif  
#plugging events to arrive before continuing or failing  
#(see vif_plugging_is_fatal). If this is set to zero and  
#vif_plugging_is_fatal is False, events should not be expected to arrive at all.  
vif_plugging_timeout = 0  

参考:http://blog.csdn.net/achejq/article/details/42588647

相关内容