5

I'm trying to enable live migration on my Windows 2012 R2 hyper-v server, and it keeps failing. When I try through the GUI, I get an error that says "Error applying Live Migration changes. Failed to modify service settings."

If I try to enable it via the Enable-VMMigration powershel cmdlet, I get the following result:

Enable-VMMigration : Failed to modify service settings. The operation cannot be performed while the virtual machine is in its current state. At line:1 char:1 + Enable-VMMigration + ~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidOperation: (Microsoft.HyperV.PowerShell.VMTask:VMTask) [Enable-VMMigration], Virt ualizationOperationFailedException + FullyQualifiedErrorId : InvalidState,Microsoft.HyperV.PowerShell.Commands.EnableVMMigrationCommand

I've removed & reinstalled hyper-v on the server, but with no luck. Any suggestions as to how to resolve this?

Additional Details:

  • There is no cluster.
  • The server previously had 2012, but had the VMs migrated off for the upgrade to 2012 R2
  • The VMMS service is running
  • The server used to have the SCVMM Agent installed on it, has since been uninstalled
  • I am able to create and start a local VM, but not able to migrate anything to the server from another host
  • There is no antivirus software installed on the server
  • The user I'm using when trying to do this is a member of the local Administrators group
  • The machine is domain joined

2 Answers2

7

I don't remember where I ran across this, maybe in the Microsoft forums. Documenting here for anyone else that runs into this issue...

Renaming C:\Windows\System32\GroupPolicy\Machine\Registry.pol to C:\Windows\System32\GroupPolicy\Machine\Registry.polx appears to have solved my problem.

It appears the machine registry.pol file is corrupted - verify this first by attempting to open the local Group Policy editor by running gpedit.msc - it should fail saying it cannot open the local computer policy. The action above simply renames the registry.pol so that the machine can recreate it the next time it processes the domain-wide group policy.

1

I know this is an old question but I saw that nobody has posted a working solution for Server 2019 & 2022 core edition (No GUI) like mine. I faced the same error after recovering my Hyper-V servers from the infamous CrowdStrike-Microsoft saga over the weekend and this was how I fixed it with PowerShell.

I checked to confirm that Registry.pol file exist on my Hyper-v servers

dir C:\Windows\System32\GroupPolicy\Machine

Then, renamed the Registry.pol file to "Registry.polx"

Rename-Item "C:\Windows\System32\GroupPolicy\Machine\Registry.pol" "C:\Windows\System32\GroupPolicy\Machine\Registry.polx"

After renaming the file, I manually force Group Policy update on the server

gpupdate /force

After group policy update was successful, I enabled live migration

Enable-VMMigration

I checked the registry location again and found that a new Registry.pol file exist

dir C:\Windows\System32\GroupPolicy\Machine

Then, I did a cleanup by deleting the Registry.polx file

Remove-Item "C:\Windows\System32\GroupPolicy\Machine\Registry.polx"

Notes: This fix also worked on Windows 2019 server with GUI that had the same problem after the Crowdstrike Blue Friday incident of 7/2024. A server that used to support Live Migrations had this option disabled and it couldn't be reenabled until following the easy steps above.