VMware Networking Community
jedijeff
Enthusiast
Enthusiast

Can you use REST for cross-vCenter fail scenarios?

Hi. We are in a cross-vCenter deployment. It is a pretty small deployment though.

During failover test of course, you have to unassign Primary NSX from Secondary, demote to Transit, assign as Primary. And of course deploy a new controller cluster at the Secondary site. Failover has quite a few steps too.

We have documentation, and can do it all through vCenter, but I was looking at REST and wondering if you could do all the above steps ( I obviously didnt get into detail) to do this? I have pretty much ZERO rest so I would need to test. But it intrigues me to be able to automate our failover and failback process.

Do I bother investigating more? And how should I get started? Thanks,,,

0 Kudos
2 Replies
Sreec
VMware Employee
VMware Employee

Yes you can leverage API calls during Failover Activity. Ideally below mentioned points are mainly considered 

  1. Promote NSX manager
  2. Redeploy Universal Controller Cluster
  3. Update the controller state
  4. Redeploy DLR

Based on the design you might need firewall/route changes which can also be pushed via API  calls  .Please refer to below Cross -VC guide to understand overall design approach  . Once you are clear with design scenarios , please refer to API guide and understand how to fetch NSX manager/Controller status etc to start of with . Those are pretty much GET calls and later you can move on to PUT/PUSH operations for each activity .  For eg    GET /api/2.0/universalsync/configuration/nsxmanagers on a primary NSX Manager  will list secondary NSX Managers configured on the primary NSX Manager and same operation on a secondary NSX Manager, it will list information about the secondary NSX Manager and the primary NSX Manager it is associated with.

https://www.vmware.com/content/dam/digitalmarketing/vmware/en/pdf/products/nsx/vmware-multi-site-sol...

Automating Security Group and Policy Creation with NSX REST API - The Network Virtualization Blog

https://docs.vmware.com/en/VMware-NSX-Data-Center-for-vSphere/6.4/nsx_64_api.pdf

NSX Dual Active/Active Datacenters BCDR – Route to Cloud

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 7x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
0 Kudos
jedijeff
Enthusiast
Enthusiast

Thank you  We are actually are in an active-active local egress setup. So for a failover we only need to.

Unlink secondary from primary

promote the now transit to primary

deploy new controller cluster

Goimg to both sites a bit more work.

I need to research more. It sounds doable!

0 Kudos