Microsoft published a KB article to help you when the Hyper-V Best Practice Analyzer (BPA) does not exit or appears to hang/crash.
Hyper-V Best Practice Analyzer (BPA) does not exit under the following conditions:
- A virtual machine already exists.
- The virtual machine is connected to a vhd or vhdx as the hard disk drive. However, the vhd or vhdx file itself is renamed or deleted, and does not exist in reality.
The PowerShell script as seen here runs internally when running the Hyper-V BPA:
However, due to a defect in the script, the information retrieval process goes into a loop, and the BPA does not exit until timeout.
You need to delete the non-existing vhd or vhdx from the virtual machine settings, and then rerun BPA for Hyper-V by following these steps:
- Start Hyper-V Manager.
- Select the virtual machine that is connected to a non-existing vhd or vhdx, then right-click and open Settings.
- From the virtual machine settings window, click on the non-existing hard drive, and then click Delete.
- Click OK to close the virtual machine setting window.
- Rerun BPA for Hyper-V from Server Manager.
The article claims to apply to Windows Server 2012 (WS2012).