none
Hyper-V 2019 - replica issues RRS feed

  • Question

  • We just moved from 2012R2 to 2019 for Hyper-V hosts.

    Trying to enable Hyper-V replica for the guests, but it is failing when I deselect the paging drive (didn't replicate them on 2012R2 to ease burden on network/WAN, etc).

    If I include the paging drive, Hyper-V replica is established just fine.  But I can't go back and deselect it since that is defined at the time of replication being enabled.

    Errors seen on source host & destination host are below.

    I'm assuming this is a bug, just wasn't sure if known and on a roadmap to be fixed or if some other workaround exists.

    Source Host:
    Error 6/11/2019 11:14:40 PM Hyper-V-VMMS 32000 None
    Hyper-V failed to enable replication for virtual machine 'GuestVM': Not found (0x80041002). (Virtual machine ID xxxx)

    Destination Host:
    Error 6/11/2019 11:14:40 PM Hyper-V-VMMS 33490 None
    Hyper-V failed to remove virtual hard disk 'E:\Hyper-V\GuestVM\GuestVM-P.vhdx' from the virtual machine 'GuestVM': Not found (0x80041002). (Virtual machine ID xxxx)
    Error 6/11/2019 11:14:40 PM Hyper-V-VMMS 33684 None
    Hyper-V failed to enable replication for Replica virtual machine 'GuestVM': Not found (0x80041002). (Virtual machine ID xxxx)

    Thanks

    Wednesday, June 12, 2019 4:34 AM

All replies

  • Hi,

    Thanks for your question.

    For now, may I ask more information so that we can deep for it?

    1)Is this a new or existing VM?

    2)Are there other VMs with this issue?

    3)Can you recreate the VM and enable replication?

    4)Any error message in the event viewer regarding Hyper-V?

    https://blogs.msdn.microsoft.com/virtual_pc_guy/2009/02/03/looking-at-the-hyper-v-event-log/

    Furthermore, we suggest that we could delete the virtual machine on the Replica server and its associated files, then reset the replication for the VM. Please try to see if it works with this.

    Moreover, please also check if the path for storing replica VMs’ files is correct.

    Reference link:

    Understand and Troubleshoot Hyper-V Replica

    http://www.microsoft.com/en-us/download/details.aspx?id=29016

    https://www.serverwatch.com/server-tutorials/troubleshooting-generic-and-known-error-messages-in-hyper-v-replica.html

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Hope above information can help you. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, June 12, 2019 8:02 AM
    Moderator
  • Hi,

    How are things going on? Was your issue resolved?

    Please feel free to let me know if you need further assistance.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com


    Thursday, June 13, 2019 11:35 AM
    Moderator
  • Sorry didn't see you replied initially.

    1 - new.  multiple VMs.  multiple hosts.

    2 - yes.

    3 - they all have the same issue if I try to exclude a drive from the replica.

    4 - no, just related to the replication trying to be enabled (see original post).

    Everything works fine if I include the "P" drive we have designated for paging.  All the paths are the same.  Deleted and retried a few times.

    Thanks

    Thursday, June 13, 2019 12:17 PM
  • Did some validation....so, new VM works when setting up replication with excluded drive....imported VMs don't work.  Those are the "new" ones that fail when I exclude a drive.
    Friday, June 14, 2019 3:08 PM
  • And some more testing / notes / oddities.

    So - brand new VMs - deselecting drive was fine.

    Those that imported would fail.

    I had previously decided to have it sync all drives for now until issue could be resolved.

    I tested one - stopped replication.  Killed copy off the target.  Re-enabled replication with the drive deselected.....now it works fine.

    Not sure if something had to happen to the source with the selecting of all of the resources the first time for imported versions that it "fixed" some attribute that wasn't quite right from an import vs a new build.

    Import was from a 2012R2 host, just for reference.

    Thanks.

    Friday, June 14, 2019 6:15 PM
  • Hi,

    Thanks for your detailed update. 

    May I ask the drive excluded is from a shared disk or in a same location with the destination server?

    Please try the following thread which discussed a similar situation as yours to see if it helps. 

    https://social.technet.microsoft.com/Forums/windows/en-US/c5a7568b-a71b-4cf8-b15a-fd02164b7ae1/add-a-new-vhdx-to-hyperv-replica?forum=winserverhyperv

    Hyper-V Replica gives you the option of using external media. You can copy your selected VHDs to external media and deliver the external media to the Replica site. This is especially useful if your business operates in areas of expensive connectivity, or if you have to manage remote or regional server locations.

    We can remove Hyper-V replication on the VM, reconfigure replication and specify Initial Replication method, you just need to initial copy the new vhdx disk to replica server, then you can start regular replication.

    Reference link;

    https://www.altaro.com/hyper-v/configuring-hyper-v-replica/

    Please Note: Since the web site is not hosted by Microsoft, the link may change without notice. Microsoft does not guarantee the accuracy of this information.

    Hope this helps. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Tuesday, June 18, 2019 11:27 AM
    Moderator
  • All disk is local to the host, no shared storage involved.

    The destination wasn't pre-seeded or anything, no copies existed there.

    The guest had 3 drives, 2 of which I wanted to replicate, 1 I didn't.  All 3 drives would be going to the same directory.

    It failed if I had initially tried to do the replica setup and chosen only 2 of the 3 drives.  It isn't a path issue, as if I did the same thing with all 3 drives, it would work.

    And considering that after I killed the replica (and removed all files off the target server) and re-did it again with just the 2 drives selected (same process, etc), I think the issue is some remnant from the import process boogered it up and prevented it from working as desired.

    Would be curious if I had done the option to schedule the initial replication, then killed it, if that was sufficient.

    I'll try to make a small VM with 3 small drives as test to try to duplicate the issue and see if my guess is accurate.

    Tuesday, June 18, 2019 2:19 PM
  • Did the additional testing, hopefully this helps.  And these were actually different hosts involved, so it isn't something squirrelly with a particular host it would seem.  None of them are part of any cluster.  Most aren't part of a domain (using certificate for replication trust).

    2012R2 host:
    Created new guest
    generation 1
    3 1GB fixed drives
    exported to a directory on the local host
    copied the directory to 2019 server

    2019 host
    Imported guest
     - specified to do a copy / new virtual ID
     - specified new path for all of it (D:\TestCopy)
    Upgrade configuration version (from 5.0 to 9.0)
    enable replication
     - select target 2019 server
     - deselected the middle drive
     - delayed replication start time

    Error 6/18/2019 1:48:56 PM Hyper-V-VMMS 32000 None
    Hyper-V failed to enable replication for virtual machine 'TestServer': Not found (0x80041002). (Virtual machine ID 8BB5DBB4-3516-4533-8FBE-3F1BD356ED61)

    hit previous back to the target replica host and clicked next/finish, same error (essentially retrying without changing anything or re-entering anything).
    hit previous back to the guest drive selection and selected all of the drives this time, then hit next/finish
    Succeeded.
    Removed the replication (was still in scheduled start).
    Cleaned up copy on the target (guest definition and folder).

    Tried doing the replication again without the drive selected again.
    Still failed.
    Did it with the drive and did the full replication.
    After replication, removed the replication, cleaned up the target again.

    Then tried doing the replication once more without the drive selected.

    So, going through the process of setting up the replica doesn't seem to fix it, but actually doing the replication does.

    And my other concern was that something lingering from the export of a deselected drive from the previous replica might have been lingering oddly somehow, but that isn't the case as this new machine was never part of a replica before - built strictly for the purpose of exporting something small.

    Not sure anything else you'd like me to try out, but don't think it is something I'm choosing poorly or misconfigured or anything like that.

    Thanks.

    Tuesday, June 18, 2019 7:08 PM
  • Hi,

    Thanks for your detailed update.


    As researched (https://blogs.technet.microsoft.com/askcore/2013/11/13/windows-server-20122012r2-when-physical-disks-are-attached-to-a-virtual-machine-hyper-v-replica-will-have-to-be-disabled/), 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.

    Please check if the drive attached to the VM you want to replicate is a physical disk. 

    As the work Around:

    Replication can be done before any physical disks are connected to the Virtual Machine. After replication is completed, add the physical disks back.

    Highly appreciate your effort and time. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Thursday, June 20, 2019 6:39 AM
    Moderator
  • Not relevant, all disks are virtual.  And replication works if disk is selected.  The issue is only when a disk is not selected and if it is an imported guest.  But resolved if I do select all the disks, then kill replication, then re-establish replication without the disk.
    Thursday, June 20, 2019 10:48 AM
  • Hi,

    Sorry for my delay.

    That's strange. For now, we suggest you can use Process Monitor to trace the entire Hyper-V Replication progress. To see if there's any abnormal event in this process.

    Process Monitor v3.52

    Highly appreciate your effort and time. If you have any question or concern, please feel free to let me know.

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, June 26, 2019 7:45 AM
    Moderator
  • I'm not going to be troubleshooting this any further.  I think I have sufficiently documented the shortcoming and provided a band-aid to remediate it, but something is not quite right with the product in that scenario that someone should investigate/patch.  Guessing low on the list of things to pursue due to the rarity of that combination of factors, but investing more of my time has no benefit.

    Thanks.

    Wednesday, June 26, 2019 12:55 PM
  • Hi,

    Sorry for that I couldn't help more. If you have any update or question for it, please feel free to let me know.

    If this issues is a state of emergency for you ,I suggest you open a case with Microsoft, more in-depth investigation can be done so that you would get a more satisfying explanation and solution to this issue.

    Here is the link:

    https://support.microsoft.com/en-us/gp/support-options-for-business 

    Thanks for your support and understanding.

    Have a nice day!

    Best regards,

    Michael


    Please remember to mark the replies as an answers if they help.
    If you have feedback for TechNet Subscriber Support, contact tnmff@microsoft.com

    Wednesday, July 3, 2019 8:57 AM
    Moderator