Azure Site Recover - Powershell Create Recovery Plan from Vmware to Azure

srv-asr 20 Reputation points

I have set up an ASR appliance in in VMware and I am replicating VMs to Azure.

I want to create Recovery Plans with powershell instead of through the Portal.

When I get the fabric, there is only one fabric:

`$asrFabric = Get-AzRecoveryServicesAsrFabric`

Name : my-rsv-vmwarefabric

FriendlyName : my-rsv-vmwarefabric

ID : /Subscriptions/59fe8180-18f2-4d05-aa68-d2836a9c9157/resourceGroups/MyResourcesGrp/providers/Microsoft.RecoveryServices/vaults/my-rsv/replicationFabrics/my-rsv-vmwarefabric

Type : Microsoft.RecoveryServices/vaults/replicationFabrics

FabricType : InMageRcm

SiteIdentifier : f2ed57c5-397b-58ad-9863-9e8cc0d16e57

FabricSpecificDetails : Microsoft.Azure.Commands.RecoveryServices.SiteRecovery.ASRInMageRcmFabricSpecificDetails

However the command to create a new Recovery plan is looking for 2 fabrics, PrimaryFabric and RecoveryFabric

`New-AzRecoveryServicesAsrRecoveryPlan -Name $RecoveryPlanName -ReplicationProtectedItem $rpi -PrimaryFabric $PrimaryFabric -RecoveryFabric $RecoveryFabric` 

I assume the -RecoveryFabric is the target and so my $asrfabric above.

It seems to me the -PrimaryFabric has to refer to VMware, but I don't know how to get it, in order to supply it to the command.

Anyone with any experience or ideas on how to run this command properly to create a VMware to Azure RecoveryPlan?

Azure Site Recovery
Azure Site Recovery
An Azure native disaster recovery service. Previously known as Microsoft Azure Hyper-V Recovery Manager.
625 questions
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,008 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Konstantinos Passadis 17,126 Reputation points

    Hello @srv-asr !

    Based on the Docs :


    Specifies the ASR fabric object for the primary ASR fabric of the replication protected items that will be part of this recovery plan.

    Expand table

    Type:ASRFabricType:ASRFabricPosition:NamedDefault value:NoneRequired:TrueAccept pipeline input:FalseAccept wildcard characters:FalseAlso :

    Can you check the Get-AzRecoveryServicesAsrFabric | Select-Object Name, FabricType

    Is it producing the Site of VMWare ?


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!


  2. Konstantinos Passadis 17,126 Reputation points

    Hello @srv-asr !

    I have all you need here :

    There is a step where you set the context and then validate and then Identify the process servers that can be used to replicate machines.

    So you will find everything here !

    In case you need additional help kindly post your feedback !


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!


    0 comments No comments

  3. srv-asr 20 Reputation points

    Thanks again for you replies. I have already looked at all that.

    My $asrFabric.FabricSpecificDetails shows NO process server.


    VmwareSiteId : /subscriptions/49fe8180-18f2-4d05-aa68-d2836a9c9157/resourceGroups/myResourceGrp/providers/Microsoft.OffAzure/VMwareSites/my-rsve45vmwaresite

    PhysicalSiteId : /subscriptions/49fe8180-18f2-4d05-aa68-d2836a9c9157/resourceGroups/myResourceGrp/providers/Microsoft.OffAzure/ServerSites/my-rsve45physicalsite

    ServiceEndpoint :

    ServiceResourceId : 953086837428622374

    ServiceContainerId : 22905551125843

    DataPlaneUri :

    ControlPlaneUri :

    ProcessServers : {}

    RcmProxies : {}

    PushInstallers : {}

    ReplicationAgents : {}

    ReprotectAgents : {}

    MarsAgents : {}

    Dras : {}

    AgentDetails : {}

  4. Konstantinos Passadis 17,126 Reputation points

    Hello @srv-asr !

    I am sorry for delaying

    Just out of context

    have you verified each prerequisite here :

    I know that it works fine via Portal but you know sometimes a small detail can make the difference!

    Also have you installed the latest Az Module ?

    I have Migrated tons of VMWare without any issues . Sometimes the KeyVault may need a new key but that's all

    Please go through the Prerequisites , and verify Az Latest Module

    Also verify that the Local Env allows WinRM and Remote Powershell between local Servers/Endpoints

    Finally can you provided more logs ? If possible please do that !


    I hope this helps!

    Kindly mark the answer as Accepted and Upvote in case it helped!


    0 comments No comments