Home arrow Articles arrow Hyper-V Best Practices Analyzer Released
Hyper-V Best Practices Analyzer Released PDF Print E-mail
User Rating: / 0
PoorBest 
May 02, 2010

The Hyper-V Best Practices Analyzer (BPA) is the latest in a line of BPA tools from  Microsoft that have been released for various systems since 2007 that scans a the Windows  system and identifies protential areas of configuration or policy that don't align with  Microsoft-recommended best practices.

While it isn't a life-changing tool, it is handy to quickly identify something that you may  have overlooked, particularly once the environment expands.

The Hyper-V BPA looks over 30 different criteria, from checking for Legacy network adapters  on virtual machines, to ensuring Hyper-V is the only role enabled on the server.  The  Hyper-V BPA runs on each individual Hyper-V host, either locally or remotely and can be run  from the Server Manager GUI or via PowerShell.  Details on running the Microsoft BPA (in  general) can be found here:

http://technet.microsoft.com/en-us/library/dd759206.aspx

For the purposes of this article, I'll assume that Hyper-V is installed in Server Core mode, and that the Hyper-V BPA is being run from another system.

Installing The Hyper-V Best Practices Analyzer

To install the Hyper-V BPA, simply download it from here :

http://www.microsoft.com/downloads/details.aspx?FamilyId=89d80c15-0082-4fef-a4fc-fefa463bed08&displaylang=e

The Hyper-V BPA must be installed on each Hyper-V hosts that you want to scan, and from the  machine where you will run the BPA.  To install it, simply run the .MSU file, either from Windows Explorer or from the Server Core command line. 

Running the Hyper-V BPA Analyzer

You can run the BPA either locally on the Hyper-V host, or remotely through Server Manager  connected to the remote Hyper-V host, or a remote PowerShell session.

To run the Hyper-V BPA Analyzer, open Server Manager and connect to the Hyper-V host that you want to analyze.  I'm assuming that when you loaded server core, you enabled remote management, but if not, it's a requirement to be able to remotely manage Server Core from a remote machine.  Once you are connected to the host, select the Hyper-V role and you'll notice a new section called Best Practices Analyzer.  Click Scan This Role to scan the host.  Results of the scan will resemble the following:

The results can be helpful to find things you might not realize.  The picture above is from my lab environment, and I didn't realize I still had a legacy network adapter on a particular VM.  The tabs at the top can quickly filter for compliant and non-compliant results.  If you find something that you want to exclude from future scans, you can select it and click Exclude Result to keep it from showing up.  If you change your mind on an exlusion, you can easily reverse it from the Excluded tab.

Running the the Hyper-V BPA Analyzer from PowerShell

You can also run the BPA remotely via PowerShell.  First, connect to the server via PowerShell:

Enter-PSSession <servername> -credential  <admincredentials>

Once connected, load the modules for the BPA:

Import-Module ServerManager
Import-Module BestPractices

Then run the BPA :

Get-WindowsFeature Hyper-V | Invoke-BpaModel

Once complete, view the results:

Get-WindowsFeature Hyper-V | Get-BpaResult

This will output all of the results of the analysis. If you are interested in only seeing the non-compliant results, filter them with the following:

Get-WindowsFeature  Hyper-V | Get-BpaResult | Where { $_.Severity -eq "Warning" }

One nice thing you'll notice is that Microsoft includes helpful information for each item, including links to relevant KB articles.

Download the tool from Microsoft and check it out.
Last Updated ( May 02, 2010 )