I’ve been using Hyper-V since 1.0 in production (and Virtual Server 2005 before it), and have my own personal list of “things to do and not do”, applicable to all three versions so far. These are highly opinionated guidelines of mine, but they’ve worked great and small and large shops.
Guidelines
- NIC’s plural: They need at least 2 NIC’s plugged into 1GB switch, preferably all 4 NIC’s. Smoke ‘em if ya got ‘em.
- Friends Don’t Let Friends Share NIC’s: The default Virtual Switch will take the first NIC and share it between the host and guests. The preferred way is to go in and set up the Virtual Switch so that no NIC’s are shared (unchecked the “shared with host” box), and the first NIC is just for the host (not used in a Virtual Switch at all). The end result is the host gets a dedicated 1GB NIC, and the guests can use the others. Now in Server 2012, we can team the other NIC’s and tell the Virtual Switch to use the team as if it was just one NIC. Here’s details on NIC teaming for Hyper-V. It’s awesome sauce.
- Friendly Names: With each host having one Virtual Switch, they should be named the same so it’s easier to move VM’s between them. The Switch name is used to match up VM’s to the network when doing import/export.
- Friendly Names, For Real: With so many physical NIC’s, it’s easier for troubleshooting later if you go into the Network Connections on the host server and rename the NIC’s to something like “Host NIC” and “Guest NIC 1″, etc.
- There is an I in Teaming: When setting up NIC Teaming in Server 2012, choose options: Switch Independent, Hyper-V Port. This is good when you don’t have a single VM that needs more then 1GB and you don’t have switches that can be configured for teaming. It basically puts each VM on one of the three physical ports, but if one fails, it will fall back to one of the others. This is a great combo of “zero config” and good performance when using a Hyper-V host. Manual physical switch config to achieve true aggregation is still the best way to go.
- SR-IOV Not So Fast: When setting up a Virtual Switch on new hardware, you may be tempted to click the SR-IOV. It’s the new hotness and allows a VM to talk directly to the physical NIC to save nano-seconds. This sounds awesome, but really is only needed if you have something like a high end SQL server that needs every ounce of the NIC, or a voice server where every nanosecond counts. SR-IOV requires the guest be Server 2012, and also manually enabled in guest with PowerShell. It requires very new hardware, and doesn’t work with Teamed NIC’s in the host… so we’re going to leave it off most of the time.
- Mo Disk Means Mo Fun: Run one big RAID6 set on a standard 2U dual processor host. This is definitely not best practice, as you’ll read a lot about doing RAID10 for improved I/O, but I find for the average small IT shop that the I/O requirements just aren’t there to justify loosing 1/2 of their storage. If you’re buying SAS drives (10k RPM and up), then I would do RAID6 *including host partition disks. Yes you read that right. If you look at the I/O of the host disks in the typical RAID1/RAID5 split server, the I/O of the host (just running Hyper-V service) is wasted, sitting near idle. Better to add that I/O to the RAID6 pool for all workloads to share. You can then make your smaller system partition, and put the rest to a Hyper-V disk storage partition. Whew.
- Integrate and Celebrate: Since Server 2008, Windows Server has come with Integration Services built-in. But, if you’re running down-level versions of Windows on a Hyper-V host, that you need to upgrade/install the Integration Services to match the host version. So if the host is 2012, then every non-2012 VM on it need their Integration Services.
VM Preferred Settings and Limits
Remember some steps and numbers when setting up new Windows virtual machines in your sexy new Hyper-V host:
- CPU: In Hyper-V 2008 and 2008 R2, you can only give a max of 4 CPU’s. Starting in Hyper-V 2012, you can give up to 64, but there’s still some supportability limits:
- Server 2003 with SP2 = 2
- Server 2008 with SP2 = 8
- Server 2008 R2 and up = 64
- CPU part deux: Don’t be afraid to give more CPU’s then you think it needs. You should not use the number of CPU’s as a way to control resource utilization. A new 2U server today will typically have 12-16 hyperthreaded cores… so limited your VM’s to 2 or 4 is silly. Give boxes 8, or give your SQL/Exchange servers 16, or 24… Then use the built-in CPU priority to control which VM’s get a priority on CPU cycles.
- RAM: Dynamic RAM in Server 2008 R2 SP1 and newer is so fantastic that you should enable it for everything except Exchange and SQL servers. Minimum RAM in most scenarios should be 256MB for Server 2003 and 512MB for Server 2008 and newer. Again, don’t use the Max RAM to control the distribution of resources, but rather use the RAM priority to do that. Make the Max what you could imagine the server using at it’s highest, then add a little more
. I just leave it at the default for most cases.
Good Luck!







Great post, first we have seen with recent “Tips” BP’s
- What are your thoughts on this setup for better IO
Background; 20 disk Chassis with 2 x E5-2620 Xeons / 64mb memory
Host: MSFT Server 2012 Data Center with Guests
Guest #1: Has 16 disks in a pass-though on a Single SCSI controller (physically they are split between 3 LSI HBA’s each port has 4 drives)
Issue: IO performance from Host to Guest is <50mb writes (maybe max 90mb on a lucky day)
Question:
Is there any known benefit of a configuration where the Guest has +2 or 3 SCSI controllers and each controller has X amount of drives assigned?
By SCSI I assume you mean SAS, and with a new server it would be 6.0Gb/s SAS. These channels are awesome and should easily handle your HBA’s and 20 disks. You would need to know a lot more information before anyone could lay judgement on a single guest having 16 dedicated disks and if that’s right for the I/O. Just saying you need 50-90MB (i assume you mean Mega-Byte, not mega-bit) is not enough information. Just a few SAS10k disks will serve that IOPS, so why the need for 16, or even any dedicated disks. For most cases, your design is way more I/O then needed by the typical workgroup VM, but again, more questions need to be answered. What type of workloads will be on this host (all guest VM’s)? Is it a more flexible design to put all 20 disks in a RAID 10 design and share IOPS of all guest VM workloads across the whole RAID? (the answer is usually yes). Can you use IOPS tools to test random read/writes of the host disks in different config’s (RAID 10 vs. RAID 6) before using it to host guests? etc.
In general though, it sounds like you’re making things more complex then they need to be. For the sake of simplicity, lets just characterize most guest VM’s into two types. The guest VM type that is used by many hundreds of concurrent users or more, with high utilization of each, and then there’s everything else. 90% of servers are in the “everything else” camp, which means you build a host with Server 2012 Hyper-V, enable NIC Teaming, put all disks in RAID 10 or RAID 6 (10 gives better IOPS, but 6 gives you much more space, if you need it). I see and build hosts all the time with RAID 6 across 12 disks of SATA or SAS and put a dozen VM’s including File Servers, Exchange, SQL, Web Servers, etc. all on the same host, and the user experience across all workloads is just fine. Not all servers are using high IOPS at the same time, and with 12 or more disks sharing the I/O of the servers, in the end it all works out.
So start simple, and only go complex (like dedicated disks to specific guests) when absolutely necessary.