your home for end-user virtualization!

OpenStack Havana – Fix for Unable to launch the instance due to “No valid host was found”

When trying to launch a dual homed VM within OpenStack Havana, I would get an Error in the horizon interface.

When looking in Nova, I would see the error below when running: nova show ‘instancename’

fault | {u’message’: u’No valid host was found. ‘, u’code’: 500

Which by itself its pretty damn ambiguous, I stared digging through the instance logs and the Nova Compute logs. However, by default, debug mode was enabled in /etc/nova/nova.conf and was drowning out all useful information. So after disabling debug mode and restarting openstack-nova-compute, I was able to then see the following error messages:

2014-01-10 11:36:58.939 4732 ERROR nova.compute.manager [-] Instance failed network setup after 1 attempt(s)
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager Traceback (most recent call last):
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager File "/usr/lib/python2.6/site-packages/nova/compute/manager.py", line 1238, in _allocate_network_async
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager dhcp_options=dhcp_options)
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager File "/usr/lib/python2.6/site-packages/nova/network/api.py", line 49, in wrapper
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager res = f(self, context, *args, **kwargs)
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager File "/usr/lib/python2.6/site-packages/nova/network/neutronv2/api.py", line 315, in allocate_for_instance
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager raise exception.SecurityGroupCannotBeApplied()
2014-01-10 11:36:58.939 4732 TRACE nova.compute.manager SecurityGroupCannotBeApplied: Network requires port_security_enabled and subnet associated in order to apply security groups.

In my neutron networking I had the following created:

neutron net-list
+--------------------------------------+-----------------------+-------------------------------------------------------+
| id | name | subnets |
+--------------------------------------+-----------------------+-------------------------------------------------------+
| 7c27e143-a304-48a9-9b1b-f182e3f67ce0 | | 8a9ba1f7-f6c9-4099-a618-6fdcd466c1ef 192.168.128.0/24 |
| a3ecad11-7f15-475a-93cb-b53686da36c7 | VLAN1000 | 550a094c-d148-41f7-9508-886041d21f66 10.0.0.0/24 |
+--------------------------------------+-----------------------+-------------------------------------------------------+

As you can see, I did not have a subnet associated with the 192.168.128.0/24 network. After adding the subnet like so:

neutron subnet-list
+--------------------------------------+--------------------+------------------+------------------------------------------------------+
| id                                   | name               | cidr             | allocation_pools                                     |
+--------------------------------------+--------------------+------------------+------------------------------------------------------+
| 550a094c-d148-41f7-9508-886041d21f66 | VLAN_1000          | 10.0.0.0/24      | {"start": "10.0.0.10", "end": "10.0.0.250"}          |
| 8a9ba1f7-f6c9-4099-a618-6fdcd466c1ef | vyatta_192.168.128 | 192.168.128.0/24 | {"start": "192.168.128.1", "end": "192.168.128.254"} |
+--------------------------------------+--------------------+------------------+------------------------------------------------------+

I was able to then successfully deploy the virtual machine.

Tags: , , , ,

Search

Categories