Monitoring Hyper-V Replica

Hyper-V Replica is one of the best features of Hyper-V. It is easy to set up, reliable, and comes with everything that you need to have a great disaster recovery plan for your hybrid cloud deployments.

In case of a disaster, your servers or even the entire data center will be protected if Hyper-VReplica is in place. However, you need to ensure that all your replica servers, virtual machines, logs, performance, and replication are working properly to certify that your servers will be up and running with the latest replication data in case of a failure.

This recipe will show you all the components on Window Server 2016 to provide the information, status, and reports you need to monitor Hyper-V Replica health.

Getting ready

These steps are based on an existing Hyper-V Replica environment. Perform the following steps on the primary Hyper-V server.

How to do it…

This recipe will show five options to monitor Hyper-V Replica: the Replication Health column, the Replication tab, the Replication Health window, Event Viewer, and Hyper-V Replica counters for Perfmon.

  1. To enable the Replication Health column, open Hyper-V Manager, click on View, and select Add/Remove Columns.
  2. In the Add/Remove Columns window, under Available Columns, select Replication Health, click on Add, and then click on OK. The column will be listed as shown in the following screenshot:
    How to do it…

    Hyper-V Replica – Replication Health Status

  3. To visualize the Replication tab, select a virtual machine in Hyper-V Manager and click on Replication at the bottom, as shown in the following screenshot:
    How to do it…

    Hyper-V Replica – Monitoring Health

  4. To view the replication health details, right-click on a virtual machine, select Replication, and click on View Replication Health. The VM's replication health will be shown as in the following screenshot:
    How to do it…

    Hyper-V Replica – Replication Health

  5. To verify the Event Viewer entries for Hyper-V Replica, open Event Viewer, navigate to Application and Services Logs | Microsoft | Windows | Hyper-V-VMMS, and click on Admin, as shown in the following screenshot:
    How to do it…

    Hyper-V Replica – Event Viewer

  6. To monitor Hyper-V Replica counters, open Perfmon, click on Monitoring Tools and then Performance Monitor.
  7. In the Performance Monitor view, press the Ctrl + N keys.
  8. In the Add Counters window, scroll down and select Hyper-V Replica VM.
  9. To monitor all virtual machines, click on Add >>, as shown in the following screenshot:
    How to do it…

    Hyper-V Replica – Event Viewer Adding Counters

How it works…

Windows Server 2016 comes with different methods to monitor Hyper-V Replica, giving you all the necessary information you need to check its health.

The first and simplest one is the column Replication Health in Hyper-V Manager. This is the quickest and easiest view you can use to check if there is any problem with VM replication. Though it does not provide advanced details, it helps to quickly identify whether something is wrong.

Another easy way to check the replica status, but with more details, is the Replication tab, accessed from Hyper-V Manager as well. It shows the following information:

  • Replication Type
  • Replication State
  • Replication Health
  • Current Primary Server
  • Current Replica server
  • Last synchronized at

To get a better replication health overview for Hyper-V, you can use the Replication Health window. It works like a small report that can be exported into a CSV file, showing replication details, statistics, and pending replication.

For advanced logs and data, an Event Viewer log named Admin under Hyper-V-VMMS shows all event entries for Hyper-V Replica. It is very helpful for advanced Hyper-VReplica troubleshooting.

The last one, for real-time and logged monitoring, is the group of counters in Perfmon to monitor everything about Hyper-V Replica and help you to identify performance errors, create baselines, and get advanced replication details when replication occurs.

From simple views to advanced logs and counters, Windows helps you to achieve all required info to make sure Hyper-V Replica is up and running.

There's more…

Using PowerShell to monitor Hyper-V Replica. You can also use simple PowerShell commandlets to get replication details. The two available commands to check this data are Get-VMReplication and Measure-VMReplication. The following screenshot shows the output for both commands:

There's more…

Hyper-V Replica – Using PowerShell to Monitor Health

See also

  • The Configuring Hyper-V Replica between three Hyper-V hosts using HTTP authentication recipe in Chapter 8, Disaster Recovery for Hyper-V
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.118.30.253