Windows Server 2012/2012R2 – When Physical disks are attached to a virtual machine, Hyper-V Replica will have to be disabled
Many of you have come across issues with respect to Hyper-V replication in Windows Server 2012 and 2012R2.
In this blog, we are going to address an occurrence that you might run into when enabling Hyper-V Replica. In Replica, you cannot enable a Virtual Machine with a physical disk attached to it (iSCSI, physical disk, and Synthetic Fibre Channel) This is by design. Below is a screenshot of the error message you will receive.
Hyper-V Replica works by tracking all writes that go to the virtual hard disks attached to the VM. The write commands are then saved to a log file and shipped to the Replica server. From there, it is applied on the replica virtual machine.
The logic used for tracking these writes is implemented in a driver called VHDMP.SYS that runs on the host machine.
This driver only tracks writes that go to VHD files; it does not track the writes that go to any physical disk that are attached to the virtual machine.
Similarly – any physical disks that are connected within a VM are invisible to the host machine and hence VHDMP.SYS does not see these disks.
As a result, the physical disks that are connected cannot be replicated to the destination.
Replication can be done before any physical disks are connected to the Virtual Machine. After replication is completed, add the physical disks back.
In the case of iSCSI attached physical disk:
- Remove the targets and stop the iSCSI service.
- Replicate the Virtual Machines and then after replication is done, start the service and then add the targets. This has to be done anytime you wish to replicate the VM over as we will again detect any physical disk upon the next replica cycle (5 minutes in Server 2012 and configurable in Server 2012 R2).
Hope this is of help to all of you.
For more information about Hyper-V Replica, see:
Deploy Hyper-V Replica
Configuring Hyper-V Replica in Windows Server 2012
More to come soon.
Windows Core Team