Posts

Showing posts from May, 2020

Powershell: Clearing a bad route advertisement rule from NSX-T logical router/gateway created via policy API.

Image
Summary:
Basically ran into a weird issue where a T1 was not advertising a very specific subnet when configured on segment.  Come to find out when looking at the advanced networking section of that T1, there was a route advertisement rule that denied that subnet from being advertised up.  Since the T1 was created via the policy API, you cannot simply delete it via UI.

Have no idea how that route advertisement rule even got there, but something tells me a bug exists.  Unfortunately have no idea how to reproduce it.

Workaround:
Long story short, you have to call the API to do so.  Here is a powershell snippet to be able to do so.

PowerCLI: New-HCXMobilityGroup - A parameter cannot be found that matches parameter name 'source'

Summary:
Running the above cmdlet and passing what is apparently the only required parameter of name, results in the above obscure error. It refers to a parameter that doesn't appear to exist for the cmdlet.  There is also the -migration parameter that looks for a <HCXMobilityGroupMigration[]> object array that no other HCX cmdlet provides.

Long story short, informed VMware, they are going to fix the cmdlets and their documentation.  In the meantime, here are some examples that VMware's GSS shared to be able to use the New-HCXMobilityGroup cmdlet.

Here is the code: