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.
DISCLAIMER; This is a personal blog. Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in professional or personal capacity, unless explicitly stated. Any views or opinions are not intended to malign any religion, ethnic group, club, organization, company, or individual.
All content provided on this blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
Photos
Unless stated, all photos are the work of the blog owner and are licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. If used with watermark, no need to credit to the blog owner. For any edit to photos, including cropping, please contact me first.
Recipes
Unless stated, all recipes are the work of the blog owner and are licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License. Please credit all recipes to the blog owner and link back to the original blog post.
Downloadable Files
Any downloadable file, including but not limited to pdfs, docs, jpegs, pngs, is provided at the user’s own risk. The owner will not be liable for any losses, injuries, or damages resulting from a corrupted or damaged file.
Comments
Comments are welcome. However, the blog owner reserves the right to edit or delete any comments submitted to this blog without notice due to
– Comments deemed to be spam or questionable spam
– Comments including profanity
– Comments containing language or concepts that could be deemed offensive
– Comments containing hate speech, credible threats, or direct attacks on an individual or group
The blog owner is not responsible for the content in comments.
This policy is subject to change at anytime.