To
ensure business continuity and facilitate efficient disaster recovery for your virtual
machines with array-based replication, you create protection groups and recovery
plans.
Prerequisites
-
Verify that your SRM
connection is authenticated against the protected and recovery
vCenter
Server systems.
This example uses the $srmConnection variable from
Connect to a Local and to a Remote Site Recovery Manager (SRM) Server.
-
Verify that you created a replicated array pair for the protected (local)
and recovery (remote) SRM sites. This example uses the variables from
Create Replicated Array Pair
-
You must have the required
privileges to create protection groups and recovery plans on the
recovery site.
Procedure
-
Discover the storage devices of the replicated array pair.
$task = Invoke-SrmDiscoverStorageDevices -PairingId $srmConnection.ConnectedPairing.PairingId `
-SrmId $srmConnection.ConnectedPairing.LocalSrmServer.Id `
-ArrayPairId $replicatedArrayPair.Id
-
Monitor the task progress.
$task = Invoke-SrmGetTaskInfo -TaskId $task.Id
$task.Status
eventually changes to SUCCESS
.
-
Retrieve the storage devices from the replicated array pair.
$storageDevices = Invoke-SrmGetStorageDevices -PairingId $srmConnection.ConnectedPairing.PairingId `
-SrmId $srmConnection.ConnectedPairing.LocalSrmServer.Id `
-ArrayPairId $replicatedArrayPair.Id
-
Prepare the ABR protection group
spec.
$abrProtectionGroupSpec = Initialize-SrmAbrProtectionGroupSpec `
-ReplicatedArrayPair $replicatedArrayPair.Id `
-Datastores $storageDevices.StorageDevicesData[0].Datastores[0].Id
-
Prepare the protection group create spec.
For the ReplicationType parameter, specify
ABR.
$protectionGroupSpec = Initialize-SrmProtectionGroupCreateSpec -Name "<MyAbrProtectionGroup>" `
-ReplicationType ABR `
-ProtectedVcGuid $srmConnection.ConnectedPairing.LocalVcServer.Id `
-AbrSpec $abrProtectionGroupSpec
-
Create the ABR protection
group.
$task = Invoke-SrmCreateGroup -PairingId $srmConnection.ConnectedPairing.PairingId `
-ProtectionGroupCreateSpec $protectionGroupSpec
-
Monitor the task progress.
$task = Invoke-SrmGetTaskInfo -TaskId $task.Id
$task.Status
eventually changes to SUCCESS
.
- (Optional)
Retrieve the ABR protection
group.
$protectionGroup = Invoke-SrmGetGroup -PairingId $srmConnection.ConnectedPairing.PairingId `
-GroupId $task.Result
-
Prepare the recovery plan create spec.
$recPlanSpec = Initialize-SrmRecoveryPlanCreateSpec `
-Name "<MyAbrRecoveryPlan>" `
-ProtectedVcGuid $srmConnection.ConnectedPairing.LocalVcServer.Id `
-ProtectionGroups @($protectionGroup.Id)
-
Create the recovery plan.
$task = Invoke-SrmCreatePlan -PairingId $srmConnection.ConnectedPairing.PairingId `
-RecoveryPlanCreateSpec $recPlanSpec
-
Monitor the task progress.
$task = Invoke-SrmGetTaskInfo -TaskId $task.Id
$task.Status
eventually changes to SUCCESS
.