When it comes to time and money, it's always better to be proactive than reactive. Although your environment may...
By submitting your personal information, you agree that TechTarget and its partners may contact you regarding relevant content, products and special offers.
seem to be running smoothly, an overlooked issue could waste time and cost money if you need help.
Microsoft released Best Practice Analyzer to rectify issues and bring the production environment into compliance with Microsoft best practices. Best Practice Analyzer, sometimes referred to as just BPA, has been an essential component for Microsoft customers. BPA has a set of pre-defined rules that you can use to list common configuration problems and take remediation actions rather than waiting for an issue to occur. Each role installed on Windows Server 2012 or later comes with a BPA. BPA is also available for Hyper-V and ships with more than 74 pre-defined scans. These scans are performed against the current Hyper-V configuration.
Hyper-V BPA serves two primary purposes. It checks to see if Hyper-V virtual machines and virtual networks are correctly configured, or whether they are configured at all. Hyper-V BPA is included with Windows Server 2012 and later, but you will need to download it for earlier operating systems.
There are several reasons you should consider running Hyper-V BPA on a regular basis.
You might have followed all the Hyper-V best practices to ensure your environment is healthy, however, you may not have followed best practices during the design and planning phases.
There are several scans performed by the Hyper-V BPA that can determine if there was an error. For example, if Hyper-V Virtual Machine Management Service is not set to start automatically, Hyper-V BPA will warn you. This might seem minor, but you might not have considered this item as part of your initial design. Similarly, if a virtual network is not created specifically for VM traffic, or if you are using the same virtual network for management traffic, Hyper-V BPA will report it as a potential problem.
Hyper-V BPA also helps you save money and run a supported Hyper-V configuration. It is important to note that Microsoft’s Product Support Services (PSS) team may not provide assistance if your environment does not follow supported configurations. For example, the Microsoft PSS team may not offer support if your Hyper-V host is running more VMs than recommended. Getting Microsoft to look into an unsupported Hyper-V configuration is a challenge. The easiest way to eliminate a possible delay in support would be to run the Hyper-V BPA and address any issues before contacting the Microsoft PSS team. It would also help you save money and avoid unnecessary delay in resolving a critical issue.
Hyper-V BPA can also help you avoid any operational issues. One scan performed by the BPA checks if any VM is in a paused state. It makes no sense to keep a VM in a paused state for a long duration, because it won't release the memory. If you are using Hyper-V Dynamic Memory for all of your VMs, you might run into operational issues. Since memory will be blocked by the paused VM, if one of the other VMs needs some memory, Hyper-V will have no choice but to discard the request because there is not enough memory available. Similarly, a VM might be running an old version of Integration Services or you might not have added antivirus exclusions.
How do you use Hyper-V BPA?
There are two ways to execute Hyper-V BPA on Hyper-V hosts: Using Server Manager or using the Invoke-BPAModelPowerShell cmdlet. From the Server Manager, all you need to do is to click on the Hyper-V Best Practice Analyzer, execute the Hyper-V BPA from the “Tasks” menu, and then monitor the status from the information tab as shown in the screenshot below:
Since Hyper-V BPA is available as part of the Server Manager in Windows Server 2012 and later OSes, you can use it to check configuration issues on local or remote Hyper-V hosts.
A PowerShell script offers the ability to run Hyper-V BPA against local or remote Hyper-V hosts on a pre-defined schedule, and enables you to send the configuration issues report via email. To start Hyper-V BPA scan using PowerShell, execute the following PowerShell cmdlet:
- Invoke-BpaModel –BestPracticesModel Microsoft/Windows/Hyper-V.
It's important to note that the Invoke-BpaModel PowerShell cmdlet just executes the Hyper-V BPA, it does not show you the results. To analyse and show you the results, you need to execute the Get-BpaResult PowerShell command:
- Get-BpaResult –BestPracticesModel Microsoft/Windows/Hyper-V C:\Temp\BPAOutput.txt
Open BPAOutput.txt and check the "Compliance" column for any compliance issues with the current configuration of Hyper-V.
You should scan Hyper-V Servers in the production environment using the Hyper-V BPA every month. This will ensure the Hyper-V environment can run efficiently and ensure Microsoft will provide technical support. However, there are a couple of items identified by the Hyper-V BPA that makes no sense. For example, Hyper-V BPA says that Hyper-V should be the only role enabled on a Windows Server 2012 R2 OS. Similarly, it says that you should run Hyper-V on a Server Core. Depending on your current environment, you might or might not want to follow these recommendations.
Microsoft Hyper-V Best Practices Analyzer explained