New Question

No hosts availble error when launching Hyper-V guest

asked 2017-10-26 20:02:12 +0200

mattfaraday gravatar image

I have installed openstack via RDO and packstack.

I have two linux compute nodes and one linux control node. I also have one Microsoft server running hyper-v.

Installed the cloudbase hyper-v drivers and I can see the windows host in the hypervisor list and I can see it in the dashboard. So I uploaded a windows server ISO file and I set it's hypervisor type in the metadata to hyperv. When launching any instance of this image, it fails with the error that no hosts are available.

If I remove the hypervisor type meta data on the image, it loads but it loads onto one of the linux hypervisors. I want windows guests to run on hyper-v.

Any suggestions please?

An error I found in the nova scheduler log says that the filter removed all of the hosts BUT it only shows that I have two hosts (the two linux ones)

Filtering removed all hosts for the request with instance ID '1e31181b-28e5-4d94-bb86-16bec7f8718b'. Filter results: ['RetryFilter: (start: 2, end: 2)', 'AvailabilityZoneFilter: (start: 2, end: 2)', 'RamFilter: (start: 2, end: 2)', 'DiskFilter: (start: 2, end: 2)', 'ComputeFilter: (start: 2, end: 2)', 'ComputeCapabilitiesFilter: (start: 2, end: 2)', 'ImagePropertiesFilter: (start: 2, end: 0)']

Why does it only see 2 ? when there are 3 hypervisors ?

edit retag flag offensive close merge delete

4 answers

Sort by » oldest newest most voted

answered 2017-10-27 11:43:05 +0200

Claudiu Belu gravatar image

updated 2017-11-21 12:57:11 +0200


What OpenStack version are you using? If it's Ocata or newer, then it is as awestin says, you will have to execute that command on your OpenStack controller:

nova-manage cell_v2 discover_hosts

Additionally, After running this, you will most likely have to restart your nova services. The newly discovered hosts are not taken into account automatically (unless nova is configured to, but they're only recommending this config option if the compute nodes are expected to join / disconnect often and randomly).

At the very least you should see in the nova-scheduler logs that it takes into account 3 hypervisors after this. If it still fails after this, please check the nova-compute logs on the Hyper-V node (typically found at: C:\OpenStack\Logs).

If you see a PortBindingFailed Exception in the logs: what are your neutron networks' network_types and what L2 agent are you using on the Hyper-V node? (neutron agent-list, or on Hyper-V in powershell: Get-Service neutron*) . Neutron Hyper-V Agent doesn't support vxlan networks, and you'll have to setup and install OVS and the neutron-ovs-agent on the host (starting with Pike, we've included the neutron-ovs-agent installation and configuration in our OpenStack Hyper-V Compute MSI).

Best regards,

Claudiu Belu


We've addressed this issue back when it was opened, but we haven't updated this thread, so I'll just write some updates here, just in case someone has a similar issue.

The Hyper-V driver was initializing properly. The nova-compute service, however, was getting stuck on this line: [1]. Basically, it was trying to reach to the nova-conductor service, but due to some Proxy configurations on the compute node, it was not able to reach it. The interesting thing was that the timeout was not taken into account, it should have timed out after about 10 seconds, and a warning should have been logged. This will probably have to be reported on nova's launchpad as a bug, and investigated further.


edit flag offensive delete link more

answered 2017-10-27 06:54:26 +0200

awestin1 gravatar image

updated 2017-10-27 07:01:47 +0200

What port is your placement endpoint listen on?

openstack endpoint list

I know there is a typo in the OpenStack RDO documentation where they have you create the endpoint on the wrong port.

Edit: Also, when a compute node is added, the cell database must be refreshed. Was this done?

su -s /bin/sh -c "nova-manage cellv2 discoverhosts --verbose" nova

edit flag offensive delete link more

answered 2017-10-27 17:38:12 +0200

mattfaraday gravatar image


Thanks to both of you for answering.

I'm running pike.

I have run the discoverhosts command but it seems I was also suffering from another problem. The windows nova installation has a typo and has admin tenant project as "service" instead of "services" so I fixed that typo and i have progressed. Now I see that it at least starts to create the VM but fails. Now I am getting the PortBindingFailed exception even after installing the OVS agent on the host.

I choose to make a new virtual switch during the installer, but I don't see it anywhere at least under network config.

There is a hyper-v vswitch on the machine already , and this is how we communicate with the host. If I enable the OVS extension on this vswitch then I loose all connectivity to the machine and cannot remote desktop to it.

If I make a new v-switch from the hyper-v manager and enable the ovs extensions it works, but I still get the port binding failure.

My network types are all "Flat"

Please forgive my ignorance here, I am rather new to openstack after only playing with devstack a few times years ago.

advice is much appreciated, thanks!



edit flag offensive delete link more


Hm, there isn't enough information to pinpoint the exact problem, but I'd say that there might be some misconfiguration between your Neutron controller and the Neutron agent present on the compute node. First of all, make sure the agent is up and running, by executing neutron agent-list

Claudiu Belu gravatar imageClaudiu Belu ( 2017-12-18 17:31:58 +0200 )edit

Secondly, could you share the neutron config files (neutron.conf and ml2_conf.ini) for both the Controller and compute node? (On the controller: /etc/neutron/neutron.conf and /etc/neutron/plugins/ml2/ml2_conf.ini). They might be configured with different tenant network types.

Claudiu Belu gravatar imageClaudiu Belu ( 2017-12-18 17:33:58 +0200 )edit

Thirdly, When a PortBindingFailed exception occurs and you see it in the logs, it will tell you to look into the Neutron Server's logs. Those logs will contain the reason why it failed to bind a Neutron port to the compute node.

Claudiu Belu gravatar imageClaudiu Belu ( 2017-12-18 17:35:37 +0200 )edit

And lastly, flat networking should be mostly used for the public networks. For tenant / private networks you should use VLAN at the very least. There's no draw back in using VLANs, or if the 4096 segmentation IDs are not enough, you can use GRE or VXLAN.

Claudiu Belu gravatar imageClaudiu Belu ( 2017-12-18 17:37:12 +0200 )edit

answered 2018-01-04 13:32:55 +0200

Did you solve this problem ?

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

Question Tools



Asked: 2017-10-26 20:02:12 +0200

Seen: 47 times

Last updated: Jan 04