How to enable ASR for Azure VMs using scripts such as ARM or Bicep
Tony Acchar
5
Reputation points
Hello,
I need to setup Azure Site Recovery for VMs using Bicep or ARM template. I setup the Recovery Service Vaults through the portal and I added a VM to the replicated items. The replication works fine on the portal and it is healthy. I exported the Resource Group which held all the resources needed for ASR to an ARM template and decompiled to bicep script. When running the script it stopped on a step:
resource vaults_Site_recovery_vault_canadaeast_name_default 'Microsoft.RecoveryServices/vaults/replicationVaultSettings@2024-01-01' = {
parent: vaults_Site_recovery_vault_canadaeast_name_resource
name: 'default'
properties: {
}
}
Asking for two parameters:
Status Message: Operation failed as replication provider settings were not specified. (Code: BadRequest)
- Operation failed as replication provider settings were not specified. (Code:ReplicationProviderSettingsNotSpecified)
Status Message: An invalid parameter MigrationSolutionId and VMwareToAzureProviderType was passed. (Code: BadRequest)
- An invalid parameter MigrationSolutionId and VMwareToAzureProviderType was passed. (Code:InvalidParameter)
Looking on Microsoft documentation, these two properties are not required and my ASR does not suppose to replicate any VMware machines.
Thanks,
Sign in to answer