Virtualization technology is complex, so is the learning curve for Microsoft Hyper-V management which can be challenging for many administrators.
This article will review 15 common mistakes that many admins encounter when managing their Microsoft Hyper-V environments. It will also suggest optimization techniques to help you significantly improve your Hyper-V management.
Mistake #1 — Imbalance of Memory and CPUs
Since your virtual machine’s demand is most likely greater than its resource capacity, you can be certain that you will run out of memory resources long before you run out of CPU. Don’t buy a 24-core CPU box with only 64GB of RAM simply because you can’t transfer memory from one VM to another. CPU resources, on the other hand, are shareable and you can rely on multiple cores to manage loading from various VMs. To better understand the capabilities of the systems that you are planning to execute in your new virtual environment, use Performance Monitor traces, talk to experts, and read benchmarking literature. Keep in mind that Microsoft recommends no more than 12 virtual CPUs per physical core.
Mistake #2 — Imbalance of Network Throughput with Storage Capacity
This common mistake overestimates storage speed requirements vs. the actual storage system performance. Popular tech wisdom suggests that RAID-10 is the fastest RAID available. That’s why it is common to include 8 disks in a RAID-10 array and then grossly overspend to connect with dual 10GbE adapters. While this solution is still workable, it is also prone to misconfiguration - all because the 10GbE pair is terribly underutilized.
Instead, focus on proper disk sizing over CPU because storage costs tend to escalate fast. Take time to estimate your actual I/O requirements and, if you’re unsure, keep in mind that a database executing several hundred transactions per minute needs high I/O throughput while most other applications don’t. Your total disk requirements might be substantial, but 14 VMs with an average load of 30 IOPS each won’t come close to stressing four disks that spin at 15K RPM.
Mistake #3 — Imbalance of SSD and Spinning Disks
Choosing a solid-state drive (SSD) for managing environments with disparate access to multiple virtual machines is the right thing to do if you are concerned with the performance of your infrastructure. If used inappropriately, SSD can churn the spinning disk in virtualized environments where the Hyper-V Server is installed directly on SSDs. It’s your virtual machines that need most of the disk I/O, so leverage your SSD’s fast speed and low latency to work on holding the VM data instead.
Mistake #4 — Imbalance of Networking Resources
In the past, building a standalone Hyper-V host with two network cards and dedicating one NiC to the management OS while allocating all the VMs to the other, used to be a standard practice. For 2008 R2 and prior releases, you had to implement this configuration to avoid the risk of going off-support. Today, with the availability of native teaming— better options do exist.
Another common configuration is where you dedicate one or two physical adapters to the VMs and use a separate physical adapter for handling only CSV traffic. This is no longer necessary, either. Beginning with 2012 R2, there’s no need for a dedicated CSV network—if you ensure adequate bandwidth for all cluster communications.
Mistake #5 — Resource Misallocation
Using fixed Hyper-V virtual hard disks (VHDXs) for everything is another common mistake. While VHDXs work fast and prevent accidental storage over-provisioning, they may be wasteful. This simple math will keep you from over-provisioning while helping you reclaim plenty of disk space:
If you provision each VM with a C: drive for the guest OS and other VHDX files for data, then the C: drive will be optimal. If you set it to 60 GB, it will most likely stay well under 40 GB indefinitely. If you’ve got 20 virtual machines, that’s a minimum of 400 GB of savings. If you insist on using fixed VHDX instead, you can estimate that you’ll waste a minimum of 400 GB of your disk space.
This is only an example, but you can apply similar logic to other aspects of your virtualization deployment. Think carefully, determine where the bottlenecks are most likely to be, and focus on eliminating them first.
Mistake #6 — Creating Excessive Networks and Virtual Adapters
Most of the standalone Hyper-V systems put management OS on a single network with a single IP. Your IP should have an entry in your DNS so it is reachable by name. It’s important to realize that this IP can be on a different subnet or VLAN. Also, don’t create an IP for the management OS in each VLAN/subnet that your guests are using. And don’t create a virtual adapter for any virtual machine traffic, since your guests won’t be routing traffic through the management OS.
Mistake #7 — Attempting to Optimize Page Files
A page file provides applications with an access to more physical memory than what’s normally available within your OS. When your system runs low on RAM because an application is taking too much memory, Windows automatically moves the least used parts of the memory to a hidden page file in order to free up more memory for the applications that you are actually using.
Read 'What Is Hyper-V' guide to learn how Hyper-V can be used to monitor uptime, bandwidth utilization, CPU and RAM consumption.
Moving memory from minimized applications to page files can often cause a hard drive to grind, leading to other issues. Instead of optimizing your page files, simply disable them since RAM is a lot faster than your hard drive. By disabling page files, you are forcing Windows to keep everything in much faster RAM all the time. Also keep in mind that a hypervisor page file will have near-zero usage, so you only need to ensure adequate space for it.
Mistake #8 — Not Leveraging Dynamic Memory
Some experts advise against using Dynamic Memory on SQL and Exchange servers. Don’t shy away from it! Since you can adjust Dynamic Memory at any time, we recommend setting conservative limits for minimum and maximum sizes. Remember: while you can reduce the minimum and increase the maximum dynamic memory at any given time, you can’t modify fixed memory while the guest is running.
Mistake #9 — Blindly Accepting VM Configuration Defaults
Remember, you only get a single vCPU when you use the wizard to create a VM. However, if your guest OS is newer than XP/Server 2003—then you really want at least 2 vCPUs. When you enable Dynamic Memory, its maximum is set to 1TB. You probably don’t need this much memory, just because you don’t have 1TB in physical memory to support it. As mentioned earlier, you can increase the maximum memory usage at any time, but you’ll need to turn off the guest when you need to reduce memory. If you accept the insanely high default value, there's a risk to disturb the way in which the host adjusts its allocation to the other guests.
Mistake #10 — Overloading Your Management Operating System
The management OS should only run VMs, backup software and anti-malware tools. That should be all that resides inside the management box. Anything that is not a VM, doesn’t backup VMs, or doesn't protect VMs should run within one of the VMs. Organizing your virtual assets this way not only improves performance and efficiency, but it also helps you troubleshoot faster.
Mistake #11 — Not Joining a Domain
Unless you have some very special reason, a Hyper-V host should not reside on a perimeter network. If you have a domain available, then allow your host to join it. Don’t leave your hosts in a workgroup mode. Think about it: if you leave your host in a workgroup, it can get compromised, and a compromised workgroup can be just as disastrous as a breach in a domain. Any attacker that penetrates the host can gain access to all VHDX guest files.
Mistake #12 — Lack of Testing
Lack of adequate testing is a highly lamentable, widespread pitfall of many organizations. It is often a bad assumption that known hardware and a familiar configuration will always work well together. We can’t address it enough: plan well, deploy carefully, test extensively - before and after go live. Omitting any of these steps can cause multiple problems in the way your environment operates.
Mistake #13 — Avoiding PowerShell
We get it: PowerShell is yet another time-consuming tool to learn as it uses its own command-line with a unique programming language. Today, PowerShell offers extensive functionality where admins can execute and automate multiple management tasks simultaneously. PowerShell adds value by allowing users to access:
- Command Prompt
- PowerShell Commands
- .NET Framework API
- Windows Management Instrumentation
- Windows Component Object Model
As an open source application, PowerShell now allows Linux and Unix-based users to simplify tedious administrative jobs by automating scripts and issue commands they create.
Mistake #14 — Not Understanding Licensing
Understanding how Microsoft licensing works is a tall order and is essential to controlling financial and legal risks that are imposed by non-compliance. Misunderstanding these rules often causes various compliance issues and leads to miscommunication between the departments that are responsible for purchasing and deploying software.
While you can conduct your own research and build licensing knowledge completely on your own, we strongly recommend enrolling in a licensing management program that can be tailored to the specific demands of your company.
Mistake #15 — Not Following Anti-Virus Best Practices
Some admins think that running Windows Server in Core mode with careful access control on the management OS is sufficient to keep the host safe. While this is an adequate disposition for some companies, many organizations are bound by industry constraints and regulations that make implementing anti-virus protection on all endpoints, including virtualization hosts, a rigid requirement.
Of course, you can run AV on any Hyper-V host, but if misconfigured, it can negatively impact performance and possibly bring down your VM services. Ensure that you take special care to properly configure anti-virus if you enable it on your Hyper-V hosts.
The above mistakes can be easily avoided with a proper management solution, such as 5nine Cloud Manager. Download your free 14-day trial and see how 5nine Cloud Manager solves challenges associated with running your virtual infrastructure.
I am an author, speaker and technical evangelist focussed on Microsoft Cloud management and security. I’ve held product management and product marketing roles at early stage startups and enterprise software vendors, all with an emphasis on Microsoft technologies. As the Senior Evangelist for 5nine, I get to share the 5nine story with audiences all over the world. I talk, I blog, I record videos, and I spread the word via social media.