Hey Checkyourlogs fans,
In this post, we are going to look at my setup of some lab machines with Azure Site Recovery using only Windows Admin Center 1808. Now, the issue I ran into was with the Hyper-V Server I was trying to use in my lab. This was an older Hyper-V Server that I recently upgraded in the previous blog post to Windows Server 2019. This Server at some point had Azure Site Recovery Agents deploy and was connected to a deprecated recovery vault.
Here is the view that I could see from Windows Admin Center:
On the Inventory pane, I could see what looked like already protected Virtual Machines.
I had just installed and configured Windows Admin Center, so I knew it wasn’t me that had set this up. It must have been an older install. So now, the question at hand is how does one get rid of the old Azure Site Recovery agent so that we can proceed with this setup properly??
I logged onto the Hyper-V Host Server, and I could see that there was indeed a very old installation of the Azure Site Recovery Services Agent and Azure Site Recovery Provider.
The first thing I figured I would try was uninstalling these agents to see if it fixed up my issue.
Let’s check the replica status of each of the VM’s.
As you can see there was a variety of Hyper-V Repilca and Azure Site Recovery replica jobs setup.
Let’s remove all of them so we can start fresh.
The Hyper-V Replica Jobs were easy.
Get-VMReplciation | Remove-VMReplication -verbose
Let’s go back to Windows Admin Center and see what it looks like now.
As you can see we only have one VM left that is still showing a Disaster Recovery Status of Protected.
I tried running the Azure Site Recovery Orphaned Object Cleanup Script from here:
$vmName = "TC-HQ-DC10" $vm = Get-WmiObject -Namespace "root\virtualization\v2" -Query "Select * From Msvm_ComputerSystem Where ElementName = '$vmName'" $replicationService = Get-WmiObject -Namespace "root\virtualization\v2" -Query "Select * From Msvm_ReplicationService" $replicationService.RemoveReplicationRelationship($vm.__PATH) Get-VMReplication
This worked like a charm as you can see here from Windows Admin Center
I hope this helps you as you get started with Windows Admin Center.