Unable to create the Protection Group in Azure Site Recovery Portal

Symptom:

In Hyper v to Azure scenario, we get below error while creating the protection group in azure site recovery portal

 

"AN ERROR OCCURRED WHILE RETRIEVING THE LIST OF SERVERS"

 

 

We can see an event logged in Hyper v as well

To enable the logging  login to Hyper V server ->Open the event viewer-> Application and Services Logs ->

Microsoft->Azure Site Recovery->Provider->Operational, right click and enable logging. Once troubleshooting is done disable it.

Log Name: Microsoft-Azure Site Recovery-Provider/Operational
Source: Microsoft-Azure Site Recovery-Provider
Date: 8/11/2015 9:18:58 PM
Event ID: 1001
Task Category: None
Level: Error
Keywords:    
User: SYSTEM
Computer: somlab2.hoster.cool
Description:
[s:\1654\1524\Sources\Online\RecSrv\SRS\Service\DRA\DRA\EnvironmentChange\EnvChangeManager.cs:498 RefreshFabricLayout] DRA EnvChangeManager session aborted. Will start again later automatically.Exception details:
System.Collections.Generic.KeyNotFoundException: The given key was not present in the dictionary.
   at System.Collections.Generic.Dictionary`2.get_Item(TKey key)
   at FabricAdapter.ExtensionMethods.GetNicDetails(ManagementObject vmSettings, Dictionary`2 switches)
   at FabricAdapter.ExtensionMethods.GetAllVirtualMachineDetails()
   at FabricAdapter.FabricManagement.GetFabricLayout()
   at Dra.EnvChangeManager.GetFabricLayoutUpdate(DraFabricLayoutUpdate& update)
   at Dra.EnvChangeManager.RefreshFabricLayout(Object state)

 Cause:

While troubleshooting, found that the VM's Network Adapter showing configuration error as show below. This can happen if VM is connected to virtual switch that has been deleted.

Resolution:

1 Ensure that all VM's doesn't shows Configuration Error in hyper v server.

2 To fix the Configuration Error, either the NIC has to be connected to proper virtual switch or  Not connected.

3 Once the VM NIC status is corrected

4 Open an elevated Command Prompt window. To do this, click Start, type cmd, right-click cmd.exe in the results list, and then click Run as administrator.

3 At the command prompt, run the following command:

   net stop DRA

   net start DRA

4 On the Servers page in the Azure portal, Refresh the hyper v server.

 

After you complete these steps, you should be able to create a protection group successfully.