Link to home
Start Free TrialLog in
Avatar of Koker IT
Koker IT

asked on

Resume-vmReplication Hyper-V error

I have a three-nodes Windows 2016 Core Edition Hyper-V Cluster (this is a LAB environment):

H2A-HV1-CoreE
H2A-HV2-CoreE
H2A-HV3-CoreE

I have two VMs in the cluster with Azure Site Recovery enabled (Hyper-V to Azure), Hyper-V replica is currently paused, when I try to resume the replica from Powershell I get this following error (from any Hyper-V host in the cluster):

"Resume-VMReplication : Hyper-V encountered an error trying to access an object on computer 'H2A-HV1-CoreE' because the
object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify
that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the
task again by using Run as Administrator.
At line:1 char:21
+ Get-VMReplication | Resume-VMReplication
+                     ~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Resume-VMReplication], VirtualizationException
    + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.ResumeVMReplication"

I am an Enterprise Domain Admin.

The interesting is that I'm able to resume replication from the Hyper-V Manager Console

Please take a look at the pictures I attach here

Any idea of what to do here?

Thanks in advance,

RJC
Error1.jpg
Evidence-1.jpg
Evidence-2.jpg
Avatar of Philip Elder
Philip Elder
Flag of Canada image

What does
Resume-VMReplication WS2019-1 -Resynchronize

Open in new window

give you?
Avatar of Koker IT
Koker IT

ASKER

Hi Philip,

Same error:

User generated image
Regards,
RJC
Run this command and try to connect again. This will recompile MOF.
MOFCOMP %SYSTEMROOT%\System32\WindowsVirtualization.V2.mof
Hi joinaunion,

The same thing, I even restarted the Hyper-V host but this didn't fix the issue:

User generated image
Regards,
RJC
Can you confirm that the Hyper-V service is actually running. It may be good to do a reboot after each change also.
https://docs.microsoft.com/en-us/windows-server/virtualization/hyper-v/best-practices-analyzer/the-hyper-v-virtual-machine-management-service-must-be-running
Hi joinaunion,

Yes, it is:

User generated image
Regards,
RJC
Hmm.
So try the Resume-VMReplication again but use your computer names.
H2A-HV1-CoreE
H2A-HV2-CoreE
H2A-HV3-CoreE

Example,
Resume-VMReplication H2A-HV1-CoreE
Do that for each one.
Same thing :(

PS C:\windows\system32> Resume-VMReplication -VMName WS2019-1 -ComputerName H2A-HV1-CoreE
Resume-VMReplication : Hyper-V encountered an error trying to access an object on computer 'H2A-HV1-CoreE' because the
object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify
that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the
task again by using Run as Administrator.
At line:1 char:1
+ Resume-VMReplication -VMName WS2019-1 -ComputerName H2A-HV1-CoreE
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Resume-VMReplication], VirtualizationException
    + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.ResumeVMReplication

PS C:\windows\system32> hostname
H2A-HV1-CoreE

PS C:\windows\system32> hostname
H2A-HV2-CoreE
PS C:\windows\system32> Resume-VMReplication -VMName WS2019-1 -ComputerName H2A-HV1-CoreE
Resume-VMReplication : Hyper-V encountered an error trying to access an object on computer 'H2A-HV1-CoreE' because the
object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify
that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the
task again by using Run as Administrator.
At line:1 char:1
+ Resume-VMReplication -VMName WS2019-1 -ComputerName H2A-HV1-CoreE
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Resume-VMReplication], VirtualizationException
    + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.ResumeVMReplication

PS C:\windows\system32> hostname
H2A-HV3-CoreE
PS C:\windows\system32> Resume-VMReplication -VMName WS2019-1 -ComputerName H2A-HV1-CoreE
Resume-VMReplication : Hyper-V encountered an error trying to access an object on computer 'H2A-HV1-CoreE' because the
object was not found. The object might have been deleted, or you might not have permission to perform the task. Verify
that the Virtual Machine Management service on the computer is running. If the service is running, try to perform the
task again by using Run as Administrator.
At line:1 char:1
+ Resume-VMReplication -VMName WS2019-1 -ComputerName H2A-HV1-CoreE
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (:) [Resume-VMReplication], VirtualizationException
    + FullyQualifiedErrorId : ObjectNotFound,Microsoft.HyperV.PowerShell.Commands.ResumeVMReplication

Interesting thing here is that when I do it from the GUI, it works :S
I'm thinking that there is a switch and variable that are missing from the PowerShell command. Unfortunately, the error message is not very helpful.
Just curious. If you open up Task Manager. How many instances of vmwp.exe are running?
Hi joinaunion,

Hosts are all Core Edition, so:

User generated image
Regards,

RJC
Have you installed any new Anti virus software recently? In relation to when this started?
Hi joinaunion,

No, I haven't. In fact, I disabled Windows Defender but doing that didn't fix the issue

It's very odd this issue

Regards,
RJC
Ok. Do you see this in your event logs?
The Hyper-V Host Compute Service service terminated unexpectedly.
This question needs an answer!
Become an EE member today
7 DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform.
View membership options
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.