Skip to content

October 2018: automating asynchronous protection domains failover (planned unplanned) and failback on Nutanix clusters.

Stephane Bourdeaud edited this page Feb 8, 2021 · 2 revisions

Nutanix PoSH coding wiki

New this week (Oct 8th 2018):

  • Published Invoke-AsyncDr.ps1: this script can be used to trigger one or more protection domain migration (for planned failovers) or activation (for unplanned failovers). I re-used a lot of the code already in Invoke-VdiDr.ps1 (which is meant for Horizon View on Nutanix DR). Invoke-AsyncDr.ps1 has three main workflows:

    -migrate: for planned failovers (both sites are up and you just want to move VMs). This will trigger a migration on the protection domains you specify, or all active protection domains if none are specified. Once the migration has been triggered, this will: (1)shutdown all VMs in the protection domain(s), (2)sync up the data with the remote site (the script gets the remote site from the schedule on the protection domain), (3)unregister the VMs at the source and (4)register the VMs no the remote site. You can choose to power on the VMs at the remote site with the -powerOnVms parameter (the workflow assumes the Prism credentials are the same at the source and remote site).

-activate: for unplanned failovers (you lost one of your sites). This will activate the protection domains you specify or all which are inactive if none are specified. Activating a protection domain means VMs are registered on that cluster hosts. You can choose to power on the VMs if you want.

-deactivate: this is for recovering from an unplanned failover.  When your primary site is recovered and hosts are started, the protection domain there will be active and the VMs will be powered on, leaving you with VMs on on both ends.  Deactivate deletes the VMs and puts the protection domain in inactive status so that then you can migrate the VMs from DR back to your primary site with -migrate.