At first glance, assisting customers with a Hyper-V R2 deployment appears to be an exceptionally trivial task for solution providers. On the surface it looks like all that's required is to simply add its role to an available Windows Server 2008 R2 server and start creating virtual machines (VMs). While those two steps are indeed critical among those required to correctly deploy Hyper-V R2, they represent only a small sampling of the...
ever-growing best practices list.
The best practices list's expansion isn't necessarily related to Hyper-V's complex nature, but rather in all the extraneous hardware and software components that tie into a Hyper-V operating environment: Networking, storage, device drivers, and so on. All of these are important parts of a fully-functional Hyper-V solution. Your value proposition is in assisting clients in getting Hyper-V deployed correctly to ensure continued performance and availability.
Consider this an important starting position for an engagement: While simply installing Hyper-V's role will indeed enable you to start creating VMs, it might not necessarily do so with good performance. I discussed in a recent video on SearchWindowsServer.com some of the important configurations you can set that will help assure best performance out of your Hyper-V R2 virtual machines.
If you are still confused after watching the video, Microsoft has attempted to codify what they consider best practices through their Best Practices Analyzer (BPA). BPA, available natively in Windows Server 2008 R2, validates a server against a set of known good and bad practices, offers surprisingly sound advice with the goal of telling you when you've made errors in your configuration.
You can run a BPA scan from inside Server Manager on a Hyper-V system. Click on "Roles | Hyper-V" and look for the link marked "Scan this Role." Make sure you've installed knowledgebase article 977238 to get the latest version, which includes updates for Windows Server 2008 R2.
The BPA is also PowerShell enabled. So, if you're PowerShell friendly, you can hack it a bit if all you're looking for are the best practices themselves (and not necessarily your answers).
Get-BPAResult Microsoft/Windows/Hyper-V | Format-Table title
Running these commands will import the Best Practices module, acquire and invoke the Hyper-V module (which runs the series of tests against your system, a requirement for the fourth command), and output the results. You will notice that the fourth command pipes the entire result into a simplified table that shows only the titles of each test. You may want to remove everything after the pipe if you wish to see your server's actual results.
Executing this fourth command will present a list of 27 tests which are run by the BPA. These tests printed below serve as an excellent starting point for solution providers to create their own list of Hyper-V R2 best practices:
- The Hyper-V Virtual Machine Management Service should be configured to start automatically.
- The Hyper-V Networking Management Service should be configured to start automatically.
- The Hyper-V Image Management Service should be configured to start automatically.
- Hyper-V should be the only enabled role.
- The Server Core installation option is recommended for servers running Hyper-V.
- Domain membership is recommended for servers running Hyper-V.
- The number of logical processors in use must not exceed the supported maximum.
- The number of virtual processors in use must not exceed the supported maximum.
- More than one network adapter should be available.
- Reserve one or more external virtual networks for exclusive use by VMs.
- All virtual network adapters should be enabled.
- The number of VMs must be within supported limits
- Use RAM that provides error correction.
- Configure the server with a sufficient amount of dynamic MAC addresses.
- Avoid pausing a VM.
- Offer all available integration services to VMs.
- Enable all virtual network adapters configured for a VM.
- Storage controllers should be enabled in VMs to provide access to attached storage.
- Display adapters should be enabled in VMs to provide video capabilities.
- Enable all integration services in VMs.
- Avoid using legacy network adapters when the guest operating system (OS) supports network adapters.
- Avoid using snapshots on a VM that runs a server workload in a production environment.
- Dynamic virtual hard disks are not recommended for VMs that run server workloads in a production environment.
- Avoid using differencing disks on VMs that run server workloads in a production environment.
- Configure a VM with a SCSI controller to be able to hot plug and hot unplug storage.
- Configure SCSI controllers only when supported by the guest OS.
- Avoid configuring VMs to allow unfiltered SCSI commands.
About the author
Greg Shields, MVP, vExpert, is a partner with Concentrated Technology. Get more of Greg's tips and tricks at www.concentratedtech.com.