The Hyper-V feature in Microsoft Windows Server 2008 Release 2 offers a reliable and scalable platform for virtualizing server workloads in the enterprise and the data center. How well your Hyper-V host machine performs depends to a large degree on the underlying physical hardware upon which the hypervisor resides and how this hardware is configured. However, like everything in life there are trade-offs, as you'll see in the three tips that follow.
1. Optimize your storage using pass-through disks and iSCSI. Pass-through disks are a feature of Hyper-V that let you map a physical disk directly for exclusive use by a virtual machine running on the host machine. One advantage of using pass-through disks is that they can deliver slightly better performance than using a fixed-sized virtual hard drive (.vhd) file. This is because disk operations that include pass-through disks bypass the New Technology File System (NTFS) of the root partition, which reduces processor overhead and maximizes I/O performance. Another advantage is that while .vhd files are limited to 2 terabytes in size, pass-through disks can be much larger, especially if they are a logical unit number (LUN) on a storage area network (SAN).
Pass-through disks do have some disadvantages. For starters, snapshots won't work with them, but that's not usually an issue in a production environment because snapshots are rarely used there. More important, with pass-through disks you lose portability — the ability to easily move virtual machines (VMs) from one host machine to another.
In general, you should only use pass-through disks for data drives and only when your workloads are I/O intensive. A good example where pass-through disks might benefit would be a high-performance file server. Another example would be a database server used for Online Transaction Processing (OLTP). For these types of workloads you should use iSCSI storage and ensure your host machine's network interface card has TCI/IP Offload Engine (TOE) capability, which lets the NIC process iSCSI traffic locally and thus relieve the host machine of this burden.
2. Design your network interface solution intelligently. When it comes to networking for Hyper-V host machines, it's a good idea to use the best that money can buy. But be aware that sometimes the best can be more than you bargained for. A good example is NIC teaming, a technology that lets you group multiple NICs on a host machine so they can connect to the same physical network segment. The benefit of doing this is that it can provide fault tolerance for your host machine's network connection — if network connectivity through one port fails, another port is automatically activated in a way that is transparent to the operating system. The downside here is that NIC teaming is an ISV solution provided by hardware manufacturers and is therefore not supported by Microsoft. This may not be a problem if you've purchased your host-machine hardware from a major manufacturer with Windows Server 2008 R2 preinstalled, assuming the manufacturer steps up to the plate to support its own NIC teaming solution if something goes wrong.
In addition to which NICs your host machine has, how these NICs are used is an important consideration in terms of performance. For example, if your host machine has four physical NICs, then you could consider allocating one to your parent partition for remote management and one to connect the parent partition to your iSCSI SAN. The other two can then be assigned to virtual switches to provide connectivity for virtual machines running on the host.
And don't use the legacy network adapter for a VM unless you absolutely need to because it has significantly worse performance than the virtual network adapter. If some of your VMs must use the legacy network adapter, run them on a separate host machine.
3. Ensure you have sufficient memory and processing power. The maximum memory and processor sockets you can use for Hyper-V depend on the Windows Server 2008 edition you purchase, so choose carefully to ensure your organization has room to expand. For large workloads, consider using Windows Server 2008 R2 Datacenter Edition, which supports 64 processor sockets and 2TB of RAM. If your needs are small and your budget is limited, try the free Microsoft Hyper-V Server 2008 R2 standalone product. For increased security and reduced maintenance, go with the Server Core installation option of Windows Server 2008 R2. Whichever platform you choose, be sure to add as much memory as possible and as many of the fastest, multicore processors you can afford. Hyper-V eats CPU cycles and memory; the more of these resources you have on your host, the more effective your guest operating systems will perform. And if your guests are running CPU-intensive applications, try mapping virtual processors to logical cores in a one-to-one fashion for optimal performance.
Mitch Tulloch is a Microsoft Most Valuable Professional and lead author of the Windows 7 Resource Kit from Microsoft Press.