Azure Site recovery – Please provide targetAzureVmName that is supported by Azure

 

Sometimes when we deploy replication in Azure Site Recovery we see this kind of error. The error message seems to be clear – but How to resolve it?

Error ID
70169

Error Message
Enable protection failed as the virtual machine has special characters in its name.

Possible causes
The name ‘KNG-WINDOWS’ contains characters that are not allowed or regarded as reserved words/trademarks by Azure.

Recommendation
Please provide targetAzureVmName that is supported by Azure. If using Powershell, re-run the Enable protection command and use the -TargetName parameter to provide a name for the virtual machine that is supported by Azure. Read more about naming conventions in Azure at https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions.

Related links
https://docs.microsoft.com/en-us/azure/architecture/best-practices/naming-conventions

How to resolve this error:

  • Go to resource group where your Vault exists and choose Deployments TAB, copy Template JSON – all lines.

  • Go to your vault and go to replicated item that should be in error state and please disable replication.

  • After it please create New Deployment from the template. Just click new and type Template and choose Template deployment.

  • After it please choose to Build your own template in the editor and paste copied template from the point 1 and at almost last line change targetAzureVmName to the supported one.

  • After that click Save and choose the same Resource Group and click Purchase.