An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
Hello Brian,
Thank you for reaching out to the Microsoft Q&A forum.
It looks like you’re hitting that “Replication Provider A2A entered invalid for the current set of parameters” error because the container-mapping cmdlet needs a valid fabric mapping and matching source/target containers for an A2A (Azure-to-Azure) scenario. Here’s what you can do:
- Set your vault context
$vault = Get-AzRecoveryServicesVault –Name "MyVault" Set-AzRecoveryServicesVaultContext –Vault $vault - Retrieve your source and target fabrics
$primaryFabric = Get-AzRecoveryServicesAsrFabric –Name "PrimaryAzureFabric" $recoveryFabric = Get-AzRecoveryServicesAsrFabric –Name "RecoveryAzureFabric" - Create a fabric mapping between them
Grab the protection containers (usually your RG’s)$fabricMapping = New-AzRecoveryServicesAsrFabricMapping ` –Name "PrimaryToRecovery_FabricMap" ` –SourceRecoveryServicesAsrFabric $primaryFabric ` –TargetRecoveryServicesAsrFabric $recoveryFabric ` –AllowedOperations EnableProtection,Shutdown,PlannedFailover,UnplannedFailover,Reprotect$srcContainer = Get-AzRecoveryServicesAsrProtectionContainer ` –Fabric $primaryFabric –Name "SourceRGContainer" $targetContainer = Get-AzRecoveryServicesAsrProtectionContainer ` –Fabric $recoveryFabric –Name "TargetRGContainer" - Finally, create the container mapping
New-AzRecoveryServicesAsrProtectionContainerMapping ` –Name "RG-Primary-to-Secondary" ` –SourceProtectionContainer $srcContainer ` –TargetProtectionContainer $targetContainer ` –RecoveryReplicationFabricMapping $fabricMapping
Key things to verify if you still see the “invalid” error:
- You actually have a fabric mapping in place (Get-AzRecoveryServicesAsrFabricMapping should list your mapping).
- The source/target container names match exactly what Get-AzRecoveryServicesAsrProtectionContainer returns.
- You’re not passing extra parameters (InstanceType, A2AReplicationDetails, etc.) to the cmdlet—just the objects above.
If it still doesn’t work, could you share:
- The exact names/objects you used for -SourceRecoveryServicesAsrFabric and -TargetRecoveryServicesAsrFabric?
- The output of Get-AzRecoveryServicesAsrFabricMapping?
- A screenshot or copy of Get-AzRecoveryServicesAsrProtectionContainer for both fabrics?
Reference list:
- Troubleshoot replication failures in Azure Site Recovery https://supportabilityhub.microsoft.com/solutions/apollosolutions/3ecc4a29-acdb-d2f3-a83f-32e69b2a9145/7bb54ac1-d320-4f8e-a906-7cfd5a2f9d72
- Resolve Azure Site Recovery replication failure issues https://supportabilityhub.microsoft.com/solutions/apollosolutions/3ecc4a29-acdb-d2f3-a83f-32e69b2a9145/0ab03e7d-172a-46df-9411-8583f4c597e8
- Backup and data recovery for Azure Stack with the Infrastructure Backup Service https://docs.microsoft.com/azure-stack/operator/azure-stack-backup-infrastructure-backup
Hope that helps! Let me know the details above if it’s still acting up.