In this post we will take a look into what can be the cause of not being able to deploy an On-Demand Load balancer from a VMware vRealize Automation Blueprint. In more particular when the NSX Edge deployment fails with error similar to “Couldn’t find Host networks Expected [1], Got [0]”
Lab Environment
The logical design of this lab can be seen HERE.
Issue
Consider the following use case.
You have an vRelize Automation (Mulitimachine) Blueprint . Let’s say that multimachine blueprint (MB) builds up an 3-Tier application. You have also added an On-Deman Load Balancer component to the blueprint. That component will deploy a NSX edge load balancer to be used by the application.
The following screenshot shows an example MP layout with a LB component
Cause
Your MB deployment fails with error similar to the following during the deployment of the NSX Edge load balancer
Couldn’t find Host networks Expected [1], Got [0]
One of the reasons this can happen is, if in your Network Reservation you have mapped a network to a logical switch, and that logical switch has a special character in it’s name. For example it has a backslash “/” (&2F) in the name.
The following screenshot shows an example of such switch:
Solution
There are multiple reasons why it is not recommended to use special characters when naming things. One example can be found by reading Keystrokes typed into the vSphere Web Client console of a virtual machine do not translate correctly (2071245) This being a bad practice doesn’t relate to VMware , but in general for any software vendor/product.
Now to resolve this issue, you have to edit you vRA Network Reservation mappings and remove any network/logical switch that has special characters in it’s name. Even if you fix all, but one network mappings deployment will still fail as vRA will try to enumerate all networks and fail during the deployment of the NSX Edge. So, make sure to change all mappings.
I was able to create a VM via vCenter and attach it to the logical switch and I was able to create an NSX Edge Load balancer and attach it to the same port group , even if the switch had special characters in it’s name.
It seems this limitation/problem comes from vRA during deployment time. It looks like vRA cannot enumerate those networks when there is a special characters in the logical switch name.
Final Step
If all went well, go grab a beer.
include TEMPLATEPATH."/../../../itBlogDisclaimer.php"; ?>