Recently I had some issues with Dynamic Optimizer which was failing with following error:
Unable to acquire a NoDelete lock on object 02c93aa3-499d-41d2-a362-515d04e3e1c2 of type VM because it is locked by task b07ec47c-dd75-4d52-a27f-a76ab9574deb (Run the dynamic optimizer) with a Delete lock.
Cancel the task holding the lock or wait for it to complete and try the operation again.
Since there were not to many details about this error in VMM, I went to check the Failover Clustering logs where we I found out that live migration was stuck for some VMs. Tried to stop the VMM Dynamic Optimizer job through Powershell but it did not worked.
While checking the Hyper-V host to see what’s the issue I found this error: “The virtual machine ‘Test-VM’ is using processor-specific features not supported on physical computer ‘HyperV’. To allow for migration of this virtual machine to physical computers with different processors, modify the virtual machine settings to limit the processor features used by the virtual machine. (Virtual machine ID 332AECEA-2474-49F5-B4A5-1CAF83DB86C2”.
The error it’s quite clear and the first thing to think about it’s to enable the Processor Compatibility, which we did and test it, but that’s something that reduces the virtual machine performance. In my case, the hosts have the processor from the same family, but the version was different E5-2670 v3 vs E5-2680 v4. What I discovered is that you can live migrate the machines that were created on the host with an older CPU version to the ones with the newer one, but obviously you cannot migrate a virtual machine created on the host with newer CPU to the ones with the older version.
So we decided to create another HyperV cluster with the host that have a newer CPU version and now all it’s working well.