Ask Your Question
0

No valid host was found when creating new VM

asked 2015-10-05 13:35:56 -0500

pl33g0r gravatar image

Hi I spent 3 days trying to figure out "No valid host was found. There are not enough hosts available. " error and I am still not able to determine the root cause. I am running OpenStack Kilo on 3 Xen based VMs [controller, network, and compute node]. When I am trying to create a VM I get the following output in dashboard:

 enter code here
    Message No valid host was found. There are not enough hosts available.
   Code       500
   Details  File "/usr/lib/python2.7/site-packages/nova/conductor/manager.py", line 671, in build_instances        request_spec, filter_properties) File "/usr/lib/python2.7/site-packages/nova/scheduler/utils.py", line 337, in wrapped return func(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 52, in select_destinations context, request_spec, filter_properties) File "/usr/lib/python2.7/site-packages/nova/scheduler/client/__init__.py", line 37, in __run_method return getattr(self.instance, __name)(*args, **kwargs) File "/usr/lib/python2.7/site-packages/nova/scheduler/client/query.py", line 34, in select_destinations context, request_spec, filter_properties) File "/usr/lib/python2.7/site-packages/nova/scheduler/rpcapi.py", line 120, in select_destinations request_spec=request_spec, filter_properties=filter_properties) File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/client.py", line 156, in call retry=self.retry) File "/usr/lib/python2.7/site-packages/oslo_messaging/transport.py", line 90, in _send timeout=timeout, retry=retry) File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 350, in send retry=retry) File "/usr/lib/python2.7/site-packages/oslo_messaging/_drivers/amqpdriver.py", line 341, in _send raise result

Created Oct. 5, 2015, 6:02 p.m.

My controller is able to see resources:

nova hypervisor-stats
+----------------------+-------+
| Property             | Value |
+----------------------+-------+
| count                | 1     |
| current_workload     | 0     |
| disk_available_least | 48    |
| free_disk_gb         | 48    |
| free_ram_mb          | 15739 |
| local_gb             | 49    |
| local_gb_used        | 1     |
| memory_mb            | 16763 |
| memory_mb_used       | 1024  |
| running_vms          | 1     |
| vcpus                | 6     |
| vcpus_used           | 1     |
+----------------------+-------+

This is what I am seeing in nova-scheduler:

2015-10-05 14:02:05.616 895 WARNING nova.scheduler.host_manager [req-c5339ab5-5f10-412f-9344-749d598b8286 aac6aad372f24298a4705fa3bff60bb2 3ef932af6f884db48dabfc82ba87b3d3 - - -] No compute service record found for host computenode01
2015-10-05 14:02:28.473 895 WARNING nova.scheduler.host_manager [req-c5339ab5-5f10-412f-9344-749d598b8286 aac6aad372f24298a4705fa3bff60bb2 3ef932af6f884db48dabfc82ba87b3d3 - - -] No compute service record found for host computenode01
2015-10-05 14:02:28.474 895 INFO nova.filters [req-c5339ab5-5f10-412f-9344-749d598b8286 aac6aad372f24298a4705fa3bff60bb2 3ef932af6f884db48dabfc82ba87b3d3 - - -] Filter RetryFilter returned 0 hosts
2015-10-05 14:03:33.316 895 INFO nova.scheduler.host_manager [req-1c916049-26b0-4add-8516-1c97173a9b05 - - - - -] The instance sync for host 'computenode02' did not match. Re-created its InstanceList.
2015-10-05 14:03:58.439 895 INFO nova.scheduler.host_manager [req-360ea999-d9a9-4869-b1b8-0452c016fb78 - - - - -] Successfully synced instances from host 'computenode01'.
2015-10-05 14:05:33.289 895 INFO nova.scheduler.host_manager [req-f3f749c7-30f7-4faf-b36c-0a31ce75694c - - - - -] Successfully synced instances from host 'computenode02'.
2015-10-05 14:05:58.809 895 INFO nova.scheduler.host_manager [req-928b7924-8c3c-4e53-a2d1-029070213a7a - - - - -] Successfully synced instances from host 'computenode01'.
2015-10-05 14:07:36.287 895 INFO nova.scheduler.host_manager [req-64e834ae-64a7-4eec-a2c8-d795d4d06b1b - - - - -] Successfully synced instances from host 'computenode02'.
2015-10-05 14:07:59.269 895 INFO nova.scheduler.host_manager [req-b566fb81-84e3-4c5c-8cb2-b61efd51d018 - - - - -] Successfully synced instances from host 'computenode01'.
2015-10-05 14:09:37.290 895 INFO nova.scheduler.host_manager [req-9c23b7d9-c5eb-4775-a2aa-b4fce76b62de - - - - -] Successfully synced instances from host 'computenode02'.
2015-10-05 14:09:59.645 895 INFO nova.scheduler ...
(more)
edit retag flag offensive close merge delete

Comments

  1. About the guest host configuration Nested virtualization allows you to run a virtual machine (VM) inside another VM while still using hardware acceleration from the host. search devstack-with-nested-kvm
  2. About the KVM virtual machine configuration CPU needs to configure Copy host CPU configurat
pentest gravatar imagepentest ( 2017-01-12 07:05:01 -0500 )edit

8 answers

Sort by ยป oldest newest most voted
0

answered 2015-10-19 09:32:27 -0500

Bob Ball gravatar image

"No valid host was found. There are not enough hosts available." is an increadibly unhelpful error message from OpenStack. It probably means that we tried to run the instance, but got errors from all of the compute nodes. Check for errors (prefixed with TRACE) in the nova-compute log file on the compute nodes your're running.

This will show exactly what failed and hopefully explain what the fix is.

edit flag offensive delete link more
0

answered 2015-10-20 03:08:09 -0500

Jens gravatar image

Please check the status of your messaging service on the controller-node and maybe try to restart it. Also check all your nova config files from the compute nodes, especially the messaging part.

edit flag offensive delete link more
0

answered 2015-10-05 13:59:32 -0500

nubber gravatar image

I am getting similar error after adding the second compute node. I cant see the second compute node from agent-list? I am trying to figure out why.

[root@compute2 nova]# neutron agent-list
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| id                                   | agent_type         | host     | alive | admin_state_up | binary                    |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
| 0cb8d0d4-140a-4446-add8-7881f0a07dda | DHCP agent         | network  | :-)   | True           | neutron-dhcp-agent        |
| 2a164cb6-0c6d-418a-ab7d-f68a0f3a3032 | L3 agent           | network  | :-)   | True           | neutron-l3-agent          |
| abbe20eb-8f49-43e6-a0d7-d2625ef07084 | Open vSwitch agent | network  | :-)   | True           | neutron-openvswitch-agent |
| d4e1b8a7-f826-4213-9f5f-9ab936d4f004 | Open vSwitch agent | compute1 | :-)   | True           | neutron-openvswitch-agent |
| ec116376-6d3f-4623-b5b5-78736ac41a5a | Metadata agent     | network  | :-)   | True           | neutron-metadata-agent    |
+--------------------------------------+--------------------+----------+-------+----------------+---------------------------+
edit flag offensive delete link more
0

answered 2015-10-08 11:10:11 -0500

anurag gravatar image

could you check if you are able to create an instance using another project..say using demo project ?

edit flag offensive delete link more
0

answered 2016-05-18 03:27:17 -0500

Fanta gravatar image

Hello How do you solved this problem I have the same and I dont found no solution yet

edit flag offensive delete link more
0

answered 2016-05-18 09:25:38 -0500

todotani gravatar image

updated 2016-05-18 10:04:42 -0500

It's also better to check neutron server.log.
When I encountered this error I sow the following neutron and nova error.

2016-03-27 19:35:52.455 1188 ERROR nova.compute.manager [-] Instance failed network setup after 1 attempt(s)
2016-03-27 19:35:52.455 1188 ERROR nova.compute.manager PortBindingFailed: Binding failed for port 

2016-03-27 19:35:52.186 2987 ERROR neutron.plugins.ml2.managers [req-d12d4244-d6b0-4c77-94ea-5b452d7b4313 40c1d949600c4da7bcda470a637643d3 12174726a6194022a36aeb2857b8b1b1 - - -] Failed to bind port 1a64b9cd-2127-4cb2-b84e-875fb7eeb2bb on host nuc1

In this case, cause of the error seems that tunnel interface between compute and network node was not created. In case you are using OVS and VXLAN for tenant network, the following tunnel interface (br-tun) and integration-bridge (br-int) must be exist.

# ovs-vsctl show
7ba02f61-9693-46fc-9a21-4768e7a3fb7f
    Bridge br-ex
        Port phy-br-ex
            Interface phy-br-ex
                type: patch
                options: {peer=int-br-ex}
        Port "eno1"
            Interface "eno1"
        Port br-ex
            Interface br-ex
                type: internal
    Bridge br-tun
        fail_mode: secure
        Port "vxlan-c0a8006f"
            Interface "vxlan-c0a8006f"
                type: vxlan
                options: {df_default="true", in_key=flow, local_ip="192.168.0.110", out_key=flow, remote_ip="192.168.0.111"}
        Port "vxlan-c0a80070"
            Interface "vxlan-c0a80070"
                type: vxlan
                options: {df_default="true", in_key=flow, local_ip="192.168.0.110", out_key=flow, remote_ip="192.168.0.112"}
        Port patch-int
            Interface patch-int
                type: patch
                options: {peer=patch-tun}
        Port br-tun
            Interface br-tun
                type: internal
    Bridge br-int
        fail_mode: secure
        Port "qr-60d2d82f-99"
            tag: 2
            Interface "qr-60d2d82f-99"
                type: internal
        Port int-br-ex
            Interface int-br-ex
                type: patch
                options: {peer=phy-br-ex}
        Port "sg-c2b3bbd4-3c"
            tag: 2
            Interface "sg-c2b3bbd4-3c"
                type: internal
        Port "sg-7ed4c1d9-8e"
            tag: 1
            Interface "sg-7ed4c1d9-8e"
                type: internal
        Port "qg-4d3615b4-85"
            tag: 3
            Interface "qg-4d3615b4-85"
                type: internal
        Port "tapc45d5edb-c9"
            tag: 2
            Interface "tapc45d5edb-c9"
                type: internal
        Port "qr-d3b7898e-5f"
            tag: 1
            Interface "qr-d3b7898e-5f"
                type: internal
        Port br-int
            Interface br-int
                type: internal
        Port "tape591e2ea-7f"
            tag: 1
            Interface "tape591e2ea-7f"
                type: internal
        Port patch-tun
            Interface patch-tun
                type: patch
                options: {peer=patch-int}
    ovs_version: "2.4.0"

If you are using Linux bridge instead of OVS, similar tunnel interface is necessary for VXLAN tenant network.

edit flag offensive delete link more
0

answered 2015-12-29 15:22:49 -0500

fultonj gravatar image

2015-10-05 14:02:28.474 895 INFO nova.filters [req-c5339ab5-5f10-412f-9344-749d598b8286 aac6aad372f24298a4705fa3bff60bb2 3ef932af6f884db48dabfc82ba87b3d3 - - -] Filter RetryFilter returned 0 hosts

edit flag offensive delete link more
0

answered 2017-01-11 22:30:57 -0500

I encountered the same problem, I follow the tutorial (search kairen openstack-ubuntu-newton kolla ), but the difference is that I use the kvm virtual machine as a controller , compute, network nodes.

I think the following tutorial may help you 1. About the guest host configuration Nested virtualization allows you to run a virtual machine (VM) inside another VM while still using hardware acceleration from the host. search devstack-with-nested-kvm 2. About the KVM virtual machine configuration CPU needs to configure Copy host CPU configuration search How_to_enable_nested_virtualization_in_KVM

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Get to know Ask OpenStack

Resources for moderators

Question Tools

1 follower

Stats

Asked: 2015-10-05 13:35:56 -0500

Seen: 7,300 times

Last updated: Jan 11 '17