Hyper-V Best Practice Analyzer (BPA) does not exit

Symptoms

Hyper-V Best Practice Analyzer (BPA) does not exit and memory is consumed gradually 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.

Cause

The PowerShell script as seen here runs internally when running the Hyper-V BPA:

C:\Windows\System32\BestPractices\v1.0\Models\Microsoft\Windows\Hyper-V\Hyper-V.ps1

However, due to a defect in the script, the information retrieval process goes into a loop, and the BPA does not exit until timeout.

Workaround

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:
  1. Start Hyper-V Manager.
  2. Select the virtual machine that is connected to a non-existing vhd or vhdx, then right-click and open Settings.
  3. From the virtual machine settings window, click on the non-existing hard drive, and then click Delete.
  4. Click OK to close the virtual machine setting window.
  5. Rerun BPA for Hyper-V from Server Manager.



Properties

Article ID: 2989384 - Last Review: 13 Aug 2014 - Revision: 1

Feedback