Microsoft Hyper-V Cluster Design
上QQ阅读APP看书,第一时间看更新

Host computer components

The next concern is designing and sizing the host computers that will run Hyper-V Server. You now have some idea of the load your virtual machines will need, so you need to understand what the requirements are to fit those needs.

Hyper-V Server requirements

The hypervisor itself doesn't require much in terms of hardware. It shares an official requirements list with the full Windows Server 2012 product, which is as follows:

  • 64-bit CPU (x64, not Intel Itanium) running at a minimum of 1.4 GHz
  • 512 megabytes of main system RAM
  • 32 gigabytes of available hard drive space

Hyper-V's requirements extend beyond these to the following:

  • The CPU's options for hardware-assisted virtualization support must be enabled in the BIOS
  • CPU support for Data Execution Prevention must be enabled in the BIOS (NX on AMD chips, XD on Intel chips)

While not required for the Server edition of Hyper-V unless you intend to use RemoteFX, second-level address translation (SLAT) can greatly enhance the performance of memory-intensive virtualized workloads. The various features of RemoteFX have required and recommended features of their own (one of which is SLAT), so if VDI is part of your plan, ensure that the hardware you purchase supports those.

These are the minimum requirements to install Hyper-V Server. If you use only these minimum requirements, you will not have enough resources to be able to virtualize any load. The following sections will discuss how you can appropriately size your hardware.

CPU

There is no one-to-one matching of the virtual CPUs (vCPUs) inside virtual machines to the physical CPUs of the hosts. When a processing thread is created inside a virtual machine, Hyper-V Server sends it to the next open CPU core, usually without any concern over which actual CPU it is sent to. The number of vCPUs assigned to a virtual machine limit how many active processing threads it can have at any given time, not which physical CPUs it has access to. This means that there's no simple way to map existing CPU requirements in a physical system to what it will need when moved to a virtual environment. A concept diagram follows:

In the previous diagram, threads are numbered in the order in which they were started. Note that the image shows a simplified view of what actually occurs in order to help you to understand the concept. Actual thread scheduling is somewhat more complicated than the indicated round-robin style.

Microsoft indicates that a single physical core can support eight vCPUs for legacy operating systems and twelve for Windows Server 2008 R2 and later server operating systems or Windows 7 and later desktop operating systems. However, the actual supportable load is primarily determined by how much CPU processing time a virtual machine calls upon multiplied by the number of threads it activates. Make sure that the CPUs you select for your hosts can support the load you will be placing upon them. If you're uncertain on how to proceed, core count is usually more important than core speed in a virtualization environment. Since you're building a cluster, adding hosts may be preferable to choosing more expensive systems with more CPU sockets or cores. If you will be using virtual machines with many vCPUs, it is recommended that you read Chapter 7, Memory Planning and Management, so you understand NUMA before sizing your host.

Memory

Memory is not a scheduled, shared resource like CPUs. Whatever memory Hyper-V Server assigns to a virtual machine at any given time is completely dedicated to that machine until Hyper-V Server takes it away. Dynamic Memory can be employed in some cases to allow virtual machines to request and release memory to the hypervisor as their needs change. This does not change the non-shared nature of memory. The following image is a visualization of memory allocation:

As with CPU, you may reach a point where it makes more sense to scale out than to attempt to increase the amount of physical memory in a single host computer. Another option is to plan to reduce the amount of memory allocated to virtual machines. In many cases, the amount of memory installed in single-use physical computers is more, sometimes dramatically more, than is actually necessary. Because it's rather simple to allocate more physical memory to a virtual machine, you can plan to start small and add additional RAM if virtual machines appear to need it.

As you size your physical RAM to the anticipated load, remember that Windows, like other modern operating systems, can work with less physical RAM than is actually needed. If a virtual machine doesn't have enough RAM, it will begin the process of paging—using the hard drive as a stand-in for memory. Some paging is expected and is almost unavoidable, but enough of it will cause a noticeable drag on system performance. Also, even if a guest has sufficient RAM for all services, its operating system will try to maintain a comfortable amount of free RAM and may initiate paging when it is not strictly necessary. Since access to disk is, like CPU, a resource that must be scheduled among virtual machines, heavy disk access is something to be avoided when possible. Take care in the way that you allocate memory.

One thing about Hyper-V Server that distinguishes it from other hypervisors is that, with the exception of guest startup, it never pages the memory assigned to a virtual machine. Any paging involving a guest is initiated and controlled by that guest and utilizes a page file created and managed by that guest. The management operating system will provide paging for its own processes as any other operating system would. The following image shows how page files are placed for the hypervisor and its guests:

Note

Hyper-V Server does not control or provide paging for virtual machines.

The management operating system will function well down to about 512 megabytes of available RAM if it provides no other service than Hyper-V Server. It is recommended to leave one gigabyte or more for the management operating system. This number increases as the number of virtual machines increases. Refer to Chapter 7, Memory Planning and Management, for a more thorough discussion on precise memory allocation.

Host networking

Networking will be more fully examined in the next section. Please review that before completing your hardware specifications for host computers. Members of Hyper-V Server clusters typically have substantially greater networking requirements than other Windows Server deployment types.

Host storage

In a cluster environment, the storage that you'll spend the most time on will be the shared storage, not the host storage. However, host storage must still be planned for because that is the location that Hyper-V Server will run from. You have two options. One is to use internal hard drives. The other is to use a USB flash drive. Either option is perfectly viable for a basic installation. The farther you intend to deviate from a basic installation, the more sense it makes to utilize traditional internal drives.

The two primary reasons to use USB flash drives are expense and ease of system replacement. A flash drive needs to have at least thirty-two gigabytes of capacity in order to satisfy the minimum requirement for Hyper-V Server 2012. The cost for a drive of that size is practically negligible in comparison to the rest of the hardware required for a project of this type. They can be kept in quantities and rapidly duplicated for easy replacement in the event of a failure. However, the most current systems commonly available both in terms of the host bus and in flash drives are still USB 2.0. They have adequate performance for a Hyper-V Server system that will store its virtual machines elsewhere, but if you will require anything else to be installed on the system, then they may prove to be insufficient.

If you choose to use internal disks, you have a choice between traditional spinning disks and solid-state storage. For the most part, the management operating system and hypervisor will not benefit substantially from the speed offered by a solid-state system, so spinning disks is the most common option. It is recommended that you configure these drives in a mirror (RAID 1).

Even though Hyper-V Server requires little in the way of configuration and can be replaced fairly quickly, this is a very simple way to implement basic redundancy and fault tolerance with a minimal investment. Also, you may choose to run some software inside the management operating system and you may even find cause to place some virtual machines on internal storage. Each additional burden you place on the management operating system beyond hypervisor installation increases the benefits you can gain from using spinning disks and building in a failsafe.

Management operating system

Even though you've already decided on Hyper-V Server for your hypervisor, there is more than one way to gain access to its technologies. The two major options you have are to use Hyper-V Server 2012 or Windows Server 2012 with Hyper-V as a role. In all cases, Hyper-V is the hypervisor. You are deciding what to use as the management operating system. That term will be explored in more detail in the next chapter.

Hyper-V Server

Microsoft makes Hyper-V Server freely available as a standalone product in the form of Hyper-V Server 2012 or Hyper-V Server 2012 R2.

Pros of using Hyper-V Server are as follows:

  • No licensing costs for the hypervisor or management operating system
  • Security from reduced surface area
  • Stability from reduced surface area
  • Reduced contention for resources
  • Fewer patches

Cons of using Hyper-V Server are as follows:

  • No official GUI is available; no local Windows desktop
  • Greater difficulty due to lack of familiarity
  • Less support from third-party vendors
  • Some software cannot be installed
  • Minimal set of Windows roles and features available

One of the biggest draws to using a standalone deployment of Hyper-V Server is the lack of a licensing cost. Anyone is free to download, install, and use Hyper-V Server on any hardware that supports it. The application is irrelevant; it can be used in home networks and in Fortune 500 datacenters.

Hyper-V Server does include Windows Server as its management operating system. A potential drawback is that it is a severely pared-down image. Any role or feature not necessary for successful operation of Hyper-V Server has been removed. The upside is that the overall surface area for malicious attacks or unintended software failures is significantly reduced. The downside is that the Windows desktop interface that most Windows administrators are accustomed to is unavailable, and some excluded roles or features may be desirable.

Windows Server

Microsoft's full-featured, general-purpose server product includes Hyper-V Server as an installable role.

Pros of using Windows Server are as follows:

  • Familiar Windows graphical interface is available; can be added or removed as desired (requires a reboot)
  • Greater support from third-party vendors
  • Easier to install and manipulate applications (no role beyond Hyper-V or application not necessary to support Hyper-V is recommended)

Cons of using Windows Server are as follows:

  • The management operating system requires a full Windows Server license
  • Greater security risk from larger surface area
  • Greater stability risk from larger surface area
  • More contention for resources from installed roles, features, and applications
  • Familiarity lures novice administrators into a false sense of security
  • More patches

Running Hyper-V as a role inside Windows Server is a popular option. The ease of use and familiarity of the Windows desktop interface can ease administrators into the new territory of Hyper-V and Failover Clustering. Application and third-party vendor support for Windows with a desktop interface is much broader. However, comfort comes at a cost. New administrators might be more inclined to take risks in a GUI environment; since a single Hyper-V system might be hosting any number of critical guests, casual tinkering could have drastic effects. The complete Windows installation is also larger, resulting in a greater attack surface for malicious users, more components that could break, and a higher likelihood that systems will need to be rebooted for patching.

Deciding on a management operating system

There is no universal factor to help you decide between installing Hyper-V Server or Windows Server. Examine the pros and cons list of each method and determine what fits your situation best. Take some time to really think them through; reasons that seem obvious at first sometimes collapse under closer inspection. For instance:

  • An organization with a very high security environment doesn't necessarily need to strip all the way down to Hyper-V Server. Such an organization probably goes to great lengths to isolate critical systems such that there is no meaningful difference between a GUI and non-GUI installation from a security perspective.
  • The Windows Server GUI may seem easier at first glance, but many common operations will require command-line and PowerShell interactions to complete.
  • Administrators are commonly surprised by the number of familiar tools that are available within the standalone Hyper-V Server. Most applications that run on the Windows desktop will run just as well without it.
  • A functioning cluster node doesn't need direct interaction. It is easier to manage all nodes simultaneously from a central system. This makes the presence or absence of a GUI somewhat trivial in the long run.
  • If you are leaning toward Windows Server but see the appeal of a GUI-less system, it is possible to convert between Core, Minimal Interface, and full GUI modes with only a reboot. This is not possible with Hyper-V Server.
  • If you will be running Windows Server as a guest operating system, you will be required to purchase a license that will automatically be applicable to the management operating system. If you will not be running any Windows Server 2012 guests, then Hyper-V Server 2012 may be the better choice for a management operating system. The reasons will be discussed in the next section.
  • It's true that Hyper-V Server requires fewer patches, but it only takes one that requires a reboot to cause an interruption. With the introduction of Cluster-Aware Updating in the 2012 products, the visible-service impact of rebooting for patches is virtually eliminated.

Along with these important considerations, there is one that should not factor meaningfully into the decision: do not be concerned with using Windows Server Standard Edition versus Datacenter Edition as the management operating system. The two are technologically identical. The sole difference is related to licensing rights for guest machines. This will be explored in the Licensing section later in this chapter.

Deciding between Hyper-V Server 2012 and 2012 R2

The additional features and capabilities of R2 are certainly impressive. Alone, they would make the decision almost trivial—R2 is the superior product. However, such a choice should not be made on capability alone. New operating systems tend to require several months to shake out their most egregious bugs, and Windows Server 2012 was no exception. If you are starting your journey to virtualization soon after the release of R2, it may be wise to start with 2012 and wait. If you have chosen to install Windows Server and run Hyper-V as a role, licensing is another consideration. While the licensing model is effectively the same for both versions, R2 is a new operating system, not a free upgrade or Service Pack. If you own licenses for 2012 without Software Assurance, the switch to R2 is a new purchase.

The TechNet library contains quick lists of the new features of Hyper-V and failover clustering in the R2 series. They are viewable at http://technet.microsoft.com/en-us/library/dn282278.aspx and http://technet.microsoft.com/en-us/library/dn265972.aspx, respectively. This book will cover most of the new features, specifically excepting those that have no relation to a cluster, such as enhanced session mode, online export and resizing of virtual hard disks, and automatic virtual machine activation. The referenced pages include information on all of these features.

If you start with 2012 with the intent to move to R2, be aware that there is no direct upgrade path for a cluster. You can build a completely new cluster and use the Cluster Migration Wizard or you can split one or more nodes from the existing cluster, upgrade them to R2, and place them in a new cluster. Due to a new feature in R2, you'll be able to use Live Migration to relocate virtual machines from your old cluster to the new one. Once all the virtual machines have been removed from the old cluster, it can be destroyed. Its nodes can then be upgraded to R2 and joined to the new cluster. To ease the transition, it is recommended that you place all guests on SMB 3.0 shares, even if it is only temporarily. Multiple clusters can access the same share location, but not the same CSV or cluster disk. While this book will not provide direct steps on this scenario, it will teach you enough that you'll be able to perform this task.