Posey's Tips & Tricks

Monitoring Hyper-V with Microsoft's Best Practices Analyzer

Natively integrated into Windows Server, the Best Practices Analyzer is a key tool for assessing how much (or how little) your Hyper-V configurations align with Microsoft's recommendations.

People often ask me what I do to keep my Hyper-V servers healthy. For the most part, Hyper-V takes care of itself pretty well and I don't really have to do a lot.

My biggest Hyper-V maintenance task is probably keeping the virtual machines (VMs) and the Hyper-V hosts patched. Aside from that, I have a series of custom PowerShell scripts that I designed to look for issues such as resource depletion, disk failures and that sort of thing.

In a production environment, one of the most important things you can do to keep Hyper-V healthy is to periodically run the Best Practices Analyzer, a tool that is natively integrated into Windows Server and is designed to check if your server is configured in accordance with Microsoft's recommended best practices.

Before I show you how to use the Best Practices Analyzer, there are two things you should know about it. First, Microsoft's recommended best practices tend to evolve over time. I therefore recommend running the Best Practices Analyzer on a periodic basis. IT pros often disagree about how often best practices scans should be run, but I try to scan my own machines every two months.

The second thing you need to know is that not every recommended best practice is suitable for every organization. In all likelihood, the Best Practices Analyzer will identify some configuration items that you either cannot or should not change. It's important to strike a balance between the Best Practices Analyzer's recommendations and your organization's own unique needs rather than blindly following the tool's advice.

You can access the Best Practices Analyzer for Hyper-V by opening the Server Manager, clicking on the Hyper-V tab, then scrolling down to the Best Practices Analyzer section, which you can see in Figure 1. It is worth noting that the technique for accessing the Best Practices Analyzer may vary a bit from one Windows Server version to the next. I am basing the instructions in this column on Windows Server 2019.

[Click on image for larger view.] Figure 1: The Best Practices Analyzer is accessible through Server Manager.

As you look at the figure above, you will notice that there is a Tasks drop-down menu in the upper-right portion of the Best Practices Analyzer section. To initiate a best practices scan, click on the Task link and choose the Start BPA Scan from the resulting menu, as shown in Figure 2.

[Click on image for larger view.] Figure 2: Click on Tasks and click Start BPA Scan.

At this point, you will be prompted to choose the Hyper-V servers that you wish to scan. Make sure that the desired servers are selected, then click on the Start Scan button. The amount of time required for completing a best practices scan varies depending on the Hyper-V server's performance.

Once the best practices scan completes, you will see a results list that looks something like the one shown in Figure 3. As you can see in the figure, the Best Practices Analyzer is configured by default to display only errors and warning messages, but you can see compliant items by clicking on the icon just to the right of the Filter box and choosing the Compliant option.

[Click on image for larger view.] Figure 3: This is what the results look like.

Earlier, I mentioned that it is sometimes wise to ignore certain scan results. The figure above shows some examples of this. For example, there is an error stating that the VMs should be backed up weekly. However, this is a lab machine and there is no reason to back up the VMs. Similarly, there is a warning indicating that VHD-based virtual hard disks should not be used in production. For this particular VM, however, using a legacy virtual hard disk format was an absolute requirement.

Even though some errors and warnings can be safely ignored, it is always a good idea to look through the results list carefully. You never know what you may find.

About the Author

Brien Posey is a 19-time Microsoft MVP with decades of IT experience. As a freelance writer, Posey has written thousands of articles and contributed to several dozen books on a wide variety of IT topics. Prior to going freelance, Posey was a CIO for a national chain of hospitals and health care facilities. He has also served as a network administrator for some of the country's largest insurance companies and for the Department of Defense at Fort Knox. In addition to his continued work in IT, Posey has spent the last several years actively training as a commercial scientist-astronaut candidate in preparation to fly on a mission to study polar mesospheric clouds from space. You can follow his spaceflight training on his Web site.

Featured

  • Using Metadata To Make Non-Text Data Easier To Find

    Content indexing works well for finding files that contain text, but it's no help when searching for non-text data. Brien's workaround is to take advantage of Windows 10's file metadata feature.

  • Microsoft Previews Windows Autopilot for HoloLens 2

    Microsoft on Friday announced a public preview of Windows Autopilot for HoloLens 2, its mixed-reality headset.

  • Microsoft Flirts with Charging for API Software Connections

    Microsoft may have started something new by attempting to charge its customers for software that uses its application programming interfaces (APIs).

  • Overcoming Spacesuit Anxiety During Astronaut Training

    Spacesuits are heavy, claustrophobic and hot -- an uncomfortable combination for many would-be astronauts. Here's how Brien came around to the idea of wearing one.

comments powered by Disqus