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

srv-asr 20 Reputation points
2024-03-24T01:20:58.09+00:00

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
PowerShell
PowerShell
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
    2024-03-24T01:29:39.37+00:00

    Hello @srv-asr !

    Based on the Docs :

    https://learn.microsoft.com/en-us/powershell/module/az.recoveryservices/new-azrecoveryservicesasrrecoveryplan?view=azps-11.4.0

    PrimaryFabric

    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 :https://learn.microsoft.com/en-us/dotnet/api/microsoft.azure.commands.recoveryservices.siterecovery.asrfabric?view=az-ps-latest

    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!

    Regards


  2. Konstantinos Passadis 17,126 Reputation points
    2024-03-24T13:27:56.7933333+00:00

    Hello @srv-asr !

    I have all you need here :

    https://learn.microsoft.com/en-us/azure/site-recovery/vmware-azure-disaster-recovery-powershell

    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!

    Regards

    0 comments No comments

  3. srv-asr 20 Reputation points
    2024-03-24T14:21:15.14+00:00

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

    My $asrFabric.FabricSpecificDetails shows NO process server.

    $asrFabric.FabricSpecificDetails

    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 : https://pod01-srs1.ukw.hypervrecoverymanager.windowsazure.com

    ServiceResourceId : 953086837428622374

    ServiceContainerId : 22905551125843

    DataPlaneUri : https://pod01-prot2.ukw.backup.windowsazure.com

    ControlPlaneUri : https://pod01-rcm1.ukw.hypervrecoverymanager.windowsazure.com

    ProcessServers : {}

    RcmProxies : {}

    PushInstallers : {}

    ReplicationAgents : {}

    ReprotectAgents : {}

    MarsAgents : {}

    Dras : {}

    AgentDetails : {}


  4. Konstantinos Passadis 17,126 Reputation points
    2024-03-31T22:00:57.8366667+00:00

    Hello @srv-asr !

    I am sorry for delaying

    Just out of context

    have you verified each prerequisite here :

    https://learn.microsoft.com/en-us/azure/site-recovery/vmware-physical-azure-support-matrix

    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 ?

    https://learn.microsoft.com/en-us/powershell/azure/migrate-from-azurerm-to-az?view=azps-11.4.0

    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!

    Regards

    0 comments No comments