4.6 KiB
Purpose: If you run an environment with multiple Hyper-V: Failover Clusters, for the purpose of Hyper-V: Failover Cluster Replication via a Hyper-V Replica Broker
role installed on a host within the Failover Cluster, sometimes a GuestVM will fail to replicate itself to the replica cluster, and in those cases, it may not be able to recover on its own. This guide attempts to outline the process to rebuild replication for GuestVMs on a one-by-one basis.
!!! note "Assumptions"
This guide assumes you have two Hyper-V Failover Clusters, for the sake of the guide, we will refer to the Production cluster as CLUSTER-01
and the Replication cluster as CLUSTER-02
. This guide also assumes that Replication was set up beforehand, and does not include instructions on how to deploy a Replica Broker (at this time).
Production Cluster - CLUSTER-01
Locate the GuestVM
You need to start by locating the GuestVM in the Production cluster, CLUSTER-01. You will know you found the VM if the "Replication Health" is either Unhealthy
, Warning
, or Critical
.
Remove Replication from GuestVM
- Within a node of the Hyper-V: Failover Cluster Manager
- Right-Click the GuestVM
- Navigate to "Replication > Remove Replication"
- Confirm the removal by clicking the "Yes" button. You will know if it removed replication when the "Replication State" of the GuestVM is
Not enabled
Replication Cluster - CLUSTER-02
Note the storage GUID of the GuestVM in the replication cluster
- Within a node of the replication cluster's Hyper-V: Failover Cluster Manager
- Right-Click the same GuestVM and click "Manage..."
This will open Hyper-V Manager
- Right-Click the GuestVM and click "Settings..."
- Navigate to "ISCSI Controller"
- Click on one of the Virtual Disks attached to the replica VM, and note the full folder path for later. e.g.
C:\ClusterStorage\Volume1\HYPER-V REPLICA\VIRTUAL HARD DISKS\020C9A30-EB02-41F3-8D8B-3561C4521182
- Right-Click the same GuestVM and click "Manage..."
!!! warning "Noting the GUID of the GuestVM" You need to note the folder location so you have the GUID. Without the GUID, cleaning up the old storage associated with the GuestVM replica files will be much more difficult / time-consuming. Note it down somewhere safe, and reference it later in this guide.
Delete the GuestVM from the Replication Cluster
Now that you have noted the GUID of the storage folder of the GuestVM, we can safely move onto removing the GuestVM from the replication cluster.
- Within a node of the replication cluster's Hyper-V: Failover Cluster Manager
- Right-Click the GuestVM
- Navigate to "Replication > Remove Replication"
- Confirm the removal by clicking the "Yes" button. You will know if it removed replication when the "Replication State" of the GuestVM is
Not enabled
- Right-Click the GuestVM (again)
You will see that "Enable Replication" is an option now, indicating it was successfully removed.
!!! note "Replica Checkpoint Merges"
When you removed replication, there may have been replication checkpoints that automatically try to merge together with a Merge in Progress
status. Just let it finish before moving forward.
- Within the same node of the replication cluster's Hyper-V: Failover Cluster Manager
Switch back from Hyper-V Manager
- Right-Click the GuestVM and click "Remove"
- Confirm the action by clicking the "Yes" button
Delete the GuestVM manually from Hyper-V Manager on all replication cluster hosts
At this point in time, we need to remove the GuestVM from all of the servers in the cluster. Just because we removed it from the Hyper-V: Failover Cluster did not remove it from the cluster's nodes. We can automate part of this work by opening Hyper-V Manager on the same Failover Node we have been working on thus far, and from there we can connect the rest of the replication nodes to the manager to have one place to connect to all of the nodes, avoiding hopping between servers.
- Open Hyper-V Manager
- Right-Click "Hyper-V Manager" on the left-hand navigation menu
- Click "Connect to Server..."
- Type the names of every node in the replication cluster to connect to each of them, repeating the two steps above for every node
- Remove GuestVM from Every Node
- On every replication cluster node where we can see the GuestVM listed, we are going to Right-Click the GuestVM and select "Delete"
Delete the GuestVM's replicated VHDX storage from replication ClusterStorage
PLACEHOLDER
Production Cluster - CLUSTER-01
Enable Replication on GuestVM in Cluster-01 (Production Cluster)
PLACEHOLDER