I apologize in advanced for the upcoming wall of text. I have been working on this issue for almost a week now so I have collected a fair bit of information.
The Situation: I have two Hyper-V servers, both in the same Active Directory domain. There is no clustering or SCVMM, it’s a fairly simple straightforward setup. One of the servers runs all of our VM’s, the other is just a replica destination. Currently
there are 9 Virtual Machines on the primary host, of which 7 are currently replicating over to the replica host without an issue.
The Problem: While the existing 7 Virtual Machines are currently replicating without any problem at all, I cannot initiate replication on the other two, or on any newly created virtual machine.
The Errors: Attempting to initiate replication on any VM comes up with the following errors (Only one error per attempt, the last error repeats indefinitely for further attempts):
First Attempt: Hyper-V failed to enable replication for virtual machine ‘Main’: An unexpected error occurred. (0x800300FD). (Virtual Machine ID F12E84F3-A789-4AEA-AAA8-81D64109CD66).
Second Attempt: Hyper-V failed to enable replication for virtual machine ‘Main’: Cannot create a file when that file already exists. (0x800700B7). (Virtual Machine ID F12E84F3-A789-4AEA-AAA8-81D64109CD66).
Subsequent Attempts: Hyper-V failed to enable replication for virtual machine ‘Main’: Operation aborted (0x80004004). (Virtual Machine ID F12E84F3-A789-4AEA-AAA8-81D64109CD66). ‘Main’ failed to perform the operation. The virtual machine is not in a valid
state to perform this operation.
If you look on the replica server, you will find that the XML was successfully copied over and directories were made for the Virtual Disks, but no virtual disk files are present. Deleting all the directories and XML files from the failed replication, restarting
the hyper-v management service on the replica server and trying again will bring you back to the original Unexpected Error message and the sequence begins again. I suspect it is the Unexpected Error (the first message) that is the root of this problem. The
other two messages are ones I have seen before when a piece of a VM already exists on the replica (which it does after the first failed attempt) so those are more or less expected.
I get this sequence of errors attempting to replicate either of the two currently un-replicated VM’s or on any newly created virgin VM. Other than the failure to initiate replication I have had no other problems. I can create new VM’s on either host with
no problem, I can Live Migrate VM’s both storage and configuration from one host to the other and back. I have tried both Kerberos and Certificate authentication. And all the currently replicating VM’s are still replicating without an issue.
I have scoured the event logs, however the events listed don’t tell me even so much as a single word more than the error messages themselves, on either the primary or the replica. Any help or direction would be greatly appreciated, thanks in advance.