1. Requirements
Hyper-V is included in two of the four editions of Server 2012: Datacenter and
Standard. And, as mentioned earlier, Hyper-V is also
available as a free, downloadable standalone version.
A Hyper-V host (the system on which you are installing the Hyper-V
role or standalone version) requires an x64, virtualization-capable
processor (Intel VT or AMD-V). The processor also needs to support
DEP (data execution prevention). You may need to enable DEP
in the host machine’s BIOS.
Microsoft claims that the host machine requires a minimum of 2 GB of
memory. Realistically, since VMs also use physical memory, the more VMs
you plan to run, the more physical memory the host machine will need for
optimal performance. So let’s forget about minimum memory requirements and
focus on the real world.
Insufficient memory can decimate Hyper-V performance. It is of utmost
importance that, before deploying Hyper-V, you have a strong grasp on how
much physical memory the host machine needs and how you will allocate
memory to VMs.
Note
There is a rule of thumb for calculating memory allocation in
Hyper-V: the total memory of the physical host server should at least
equal the sum of memory allocated to each VM. Additionally, Hyper-V
optimally needs 300 MB of memory for the hypervisor alone, 32 MB for the
first GB of RAM allocated to each VM, 8 MB for every additional GB of
RAM allocated to each VM, and another 512 MB for the host operating
system.
In Windows Server 2012, VMs now support NUMA (non-uniform memory architecture). A technology
originally reserved for high-processing computers, such as machines used
in science and academic environments, NUMA helps boost performance. With
NUMA, processors access directly attached memory faster than memory
attached to another processor in the system. Hyper-V R3 uses existing NUMA
topology in a system (typically enterprise-level servers) to maximize
performance and scalability without intervention from a user.
There are some other best practices to consider before deploying Hyper-V. To maximize performance, use multiple
network adapters on a Hyper-V host. With multiple NICs (network interface cards), one physical adapter is
dedicated to Hyper-V management, and another can be used by VMs. System
administrators will also often use dedicated NICs for iSCSI storage and
clustering.
It’s also a good idea to keep VM files off the system partition.
Either create another partition for storage, or better yet, put them on a
separate disk.
2. Installing the Hyper-V Role
Deploying Hyper-V in Server 2012 requires adding the Hyper-V role. As
with other roles and features, this is done in Server Manager.
From the Server Manager dashboard:
-
Click “Add roles and features,” then click Next and select “Role-based or feature-based
installation.” Click Next until you get to “Select server
roles.”
-
Scroll and select the Hyper-V server role. By default, the
Hyper-V Module for Windows PowerShell and Hyper-V GUI Management tools
are also installed. Opt to include management tools by leaving the
checkbox selected and then click Add Features.
-
Click OK to select the destination computer. The Next button
will enable. Click Next until you see the window Create Virtual
Switches. This is where you select the network adapter installed on
the physical host that will be used to create a virtual switch. The
virtual switch provides network connectivity to virtual machines. By
default, all the network adapters installed on the Server 2012 box are
listed. Select the network adapter you want to use (see Figure 1).
Finish this step by clicking Next.
-
Now you’ll see the window for Virtual Machine Migration (see
Figure 2). In this
screen, you can enable the server for live migration. If you plan to
use live migration on the server in the network for which you are
installing Hyper-V, check “Allow this server to send and receive live
migrations of virtual machines.” Do not select this option if, for
example, you plan to set up clustering or a heartbeat
network—a private network between clustered machines within
a cluster. You can select a specific network after installing Hyper-V
from network settings instead.
-
If you are performing a relatively simple deployment of Hyper-V
without clustering, you can opt to allow the server to do live
migrations. You also have to select the protocol to use to
authenticate live migrations—either CredSSP (credential security
support provider) or Kerberos.
Note
CredSSP and Kerberos are both SSPIs (security support provider
interfaces) used for authentication in Windows environments. Most
Windows, Active Directory–based infrastructures use Kerberos.
CredSSP is used in environments where Kerberos can’t be used. For
example, CredSSP is used when system admins have to remotely execute
PowerShell commands related to clustering—a scenario that would
cause various issues in environments where Kerberos is
deployed.
-
The Hyper-V Role Wizard then lets you select the default location for the
virtual hard disk files and virtual machine configuration files. You
can also modify these filepaths after install. Click Next, and then
you can choose to automatically restart the server if required (as is
the case with the Hyper-V role). Click Install.
When the server comes back from reboot, some final installation
tasks are automatically performed.