Can't create instance, error shown "No valid host"
I found problem about unable to create new instance. I have tried create new instance from cirros image, it worked fine. But when tried to create instance from RedHat 7.3 image (3.49GB), there is error "Error: No valid host was found. There are not enough hosts available."
I test cinder service by manually added new volume in Volume tab on dashboard, it can be added completed successfully.
In nova-conductor.log, shown error:
2017-04-10 02:08:05.712 5165 WARNING nova.scheduler.utils [req-f36cdaeb-872f-492c-92dd-1e526b42fb09 6201f2f0414141dba1af51ddec938282 1a9d98abf5754e0090f923def9750291 - - -] Failed to compute_task_build_instances: No valid host was found. There are not enough hosts available.
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/oslo_messaging/rpc/server.py", line 199, in inner
return func(*args, **kwargs)
File "/usr/lib/python2.7/site-packages/nova/scheduler/manager.py", line 104, in select_destinations
dests = self.driver.select_destinations(ctxt, spec_obj)
File "/usr/lib/python2.7/site-packages/nova/scheduler/filter_scheduler.py", line 74, in select_destinations
raise exception.NoValidHost(reason=reason)
NoValidHost: No valid host was found. There are not enough hosts available.
More information, these are services status from my server:
[root@os10 ~(keystone_admin)]# nova service-list
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| Id | Binary | Host | Zone | Status | State | Updated_at | Disabled Reason |
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
| 1 | nova-cert | localhost.localdomain | internal | enabled | down | 2017-03-21T03:40:48.000000 | - |
| 2 | nova-consoleauth | localhost.localdomain | internal | enabled | down | 2017-03-21T03:40:55.000000 | - |
| 18 | nova-scheduler | localhost.localdomain | internal | enabled | down | 2017-03-21T03:40:53.000000 | - |
| 19 | nova-conductor | localhost.localdomain | internal | enabled | down | 2017-03-21T03:40:56.000000 | - |
| 27 | nova-compute | localhost.localdomain | nova | enabled | down | 2017-04-04T09:58:18.000000 | - |
| 28 | nova-conductor | os10 | internal | enabled | up | 2017-04-10T06:14:57.000000 | - |
| 29 | nova-consoleauth | os10 | internal | enabled | up | 2017-04-10T06:15:00.000000 | - |
| 30 | nova-cert | os10 | internal | enabled | up | 2017-04-10T06:15:00.000000 | - |
| 31 | nova-scheduler | os10 | internal | enabled | up | 2017-04-10T06:14:59.000000 | - |
| 32 | nova-compute | os10 | nova | enabled | up | 2017-04-10T06:14:59.000000 | - |
+----+------------------+-----------------------+----------+---------+-------+----------------------------+-----------------+
I moved the text in your "answer" to the question. First, you should get rid of the stale localhost entries in the service list.
nova service-delete
should accomplish this. Next, check if the scheduler log tells you which filter refuses your compute host. You may have to enable debug logging.There are many possible reasons why you can't run your instance; my first guess is lack of memory or disk space on the compute host.
nova hypervisor-show os10
should tell you how much memory and storage is available.Normally it is a lack of space on your hypersvisor I think you should first of all try to restart the nova-compute service. Why the host is sometimes os10 and other times localhost.localdomain? Weird How did you install OpenStack?
I agree with @Bernd Bausch. First delete the duplicate entries from the service list. Also please check if your hardware on which openstack is installed supports hardware acceleration that allows you build VMs (supports virtualization)
I have 256 GB ram & 56 Core cpu still Im facing the same error. i have 4 sriov ports..if i attach all to vm1 and launch vm1 it works... however if if separate 2ports for vm1 and 2ports for vm2... and launch both vms...vm1 works vm2 fails...ERROR no valid host found. Also without sriov every vm runs