I am attempting to create various instances and Compute is failing to spawn some of them.
My instance has the following characteristics:
Name: ThirdInstance Created from image: CentOS-7-x86_64 Flavor: m1.medium (2 VCPU, 4GB RAM, 40GB Disk)
I have two other instances running. I was unable to spawn these instances unless I used the flavor m1.small (1VCPU, 2GB RAM, 20GB Disk). Any deviation from that flavor and the instance spawning failed.
Unfortunately, my ThirdInstance fails to spawn regardless of the flavor used. I have tried creating it with m1.small and it fails consistently.
I looked at the Nova logs, and am noting that when I attempt to create this instance I am consistently getting the following message in the nova-conductor.log file:
2020-08-29 13:21:09.637 98391 ERROR nova.conductor.manager
2020-08-29 13:21:09.637 98391 ERROR nova.conductor.manager
2020-08-29 13:21:09.890 98391 WARNING nova.scheduler.utils [req-30539015-22f1-4d46-b8b7-63f9c679eed1 4c4c7de6dd134250972958ce260530f2 166dc91ccec24f21963c71a437380ee9 - default default] Failed to compute_task_build_instances: No valid host was found.
Traceback (most recent call last):
File "/usr/lib/python3.6/site-packages/oslo_messaging/rpc/server.py", line 241, in inner
return func(*args, **kwargs)
File "/usr/lib/python3.6/site-packages/nova/scheduler/manager.py", line 200, in select_destinations
raise exception.NoValidHost(reason="")
nova.exception.NoValidHost: No valid host was found.
: nova.exception_Remote.NoValidHost_Remote: No valid host was found.
2020-08-29 13:21:09.891 98391 WARNING nova.scheduler.utils [req-30539015-22f1-4d46-b8b7-63f9c679eed1 4c4c7de6dd134250972958ce260530f2 166dc91ccec24f21963c71a437380ee9 - default default] [instance: fe54feaf-ecb6-4725-97e9-7d208066ddb0] Setting instance to ERROR state.: nova.exception_Remote.NoValidHost_Remote: No valid host was found.
What am I missing here? What causes these No Host Found failures when I attempt to use flavors other than m1.small, and why does a third instance fail to spawn regardless of the flavor used??? How (if possible) can I get these instances to run properly?
NOTE: I am using an installation created from Packstack on CentOS 8. My machine is a 2- core with 32G of RAM and 3 Terabytes of disk space. The Openstack version is Ussuri.
Seems to me like you have not enough resources, especially CPU-cores. You have written, that your node has only two cores and you had already spawned 2 VMs with small flavor, which requires 1 core each. This No valid host was found
-error comes also, when no compute-host was found with enough resources for the selected flavor.
You can check this by yourself:
Run openstack hypervisor list
to list your hypervisor and then openstack hypervisor show <ID>
with the id of your hypervisor. In the output you find vcpus
and vcpus_used
. vcpus
is the maximum available number of cpu-cores on the selected compute-host. Based on the information of your question, I think both of these values are 2
in your case and that would show you, that you have not enough resources for your third VM.