What is Hyper-V 2012 R2, why should I use it and how does it work?
If you’re new to Microsoft Hyper-V it can be quite a challenge to get up to scratch with the platform, why it’s used and how it works. This is the start of a series of articles to help you get set with some foundational knowledge around Hyper-V.
Let’s start off with exploring some of the basics to give you some background info on what Hyper-V is and what you should know to get started.
What is Hyper-V?
Hyper-V 2012 R2 is Microsoft’s virtualization platform, or ‘hypervisor’, which enables administrators to make better use of their hardware by virtualizing multiple operating systems to run off the same physical server simultaneously.
With Hyper-V, you can virtualize server operating systems in the data center or Windows phone environments on your desktop and most everything in between. It is also a great tool for developers that want a safe sandbox to test software.
Before you dig in deeper – Here’s a quick overview of the other main topics within this section that will help you get to grips with the basics of Hyper-V.
All topics in this series – Hyper-V fundamentals
- Hyper-V Storage Best Practices and Configuration
- Memory Management, Requirements and Usage in Hyper-V
- How to Plan and Prepare for a Hyper-V Deployment
- How High Availability works in Hyper-V
- What is Hyper-V Replica and how does replication work?
- Hyper-V System Maintenance, Patching Best Practices and Cleanup
A little background info
When Hyper-V debuted in 2008, virtualization was just beginning to poke into the mainstream. Not many people knew what it was, and even fewer people could fathom any reason why they’d want to do it. It all seemed conceptually complicated, risky, and difficult to implement and maintain.
A lot has changed in only a little time. Now, virtualization is everywhere.
Data centers are built around it. Developers rely on it. Cloud providers depend on it.
Microsoft’s product has been advancing along with the growing interest. Hyper-V has been widely adopted and is rapidly gaining on VMware ESXi, the most popular competing product.
If you’ve been waiting for this technology to become more accessible and mature before jumping in, now is the time.
Why Should I Use Hyper-V and how does it work?
Moving away from physical hardware and onto Hyper-V’s virtualization platform provides a number of benefits. Of course, you have a choice in hypervisors. Microsoft’s primary competitor in the virtualization space is VMware, whose standalone ESXi product is most closely analogous to Hyper-V.
Each vendor offers additional products above and beyond the base product, notably System Center from Microsoft and vSphere from VMware. These two product suites differ quite radically in most metrics and are difficult to compare directly. Here are a few noteworthy items where Hyper-V is the clear winner:
All features are included in the free Hyper-V Server
- Same limitations on virtual machines as Windows Server Datacenter Edition
- Clustering support
- Storage on Fibre Channel, NFS, and/or iSCSI with MPIO and/or SMB 3 with multi-channel
- Migration of running virtual machines; even outside and across clusters
- Familiar Windows interfaces
- Seamless integration with existing Windows Server management tools
- Full support for guest clusters
- Full support for SR-IOV network adapters, including Live Migration
For purposes of this article, we will focus on the general benefits of virtualization and highlight the particular features that are found in Windows Server with Hyper-V or with Hyper-V Server.
1. Stretching Your Hardware Dollar Further
Hardware continues to accelerate in almost every performance metric. Each year, new CPUs can process more data in the same amount of time, memory chips can hold more data for the same amount of money, and hard drive densities increase. On the other side, the demands of the most common software applications have not increased at the same pace. Hyper-V allows you to make much better use of the hardware that you’ve purchased by consolidating more computing jobs on less hardware without fear of compatibility issues.
2. Reduced Energy Demands
With the increasing popularity of “green” initiatives to reduce energy consumption, consolidation of systems onto fewer physical systems translates directly into a lower energy footprint, both in direct power and in auxiliary power, such as lighting and cooling. A smaller ecological footprint also means a smaller utility bill.
3. Enhanced Portability for Server Applications
Hyper-V also provides a great deal of portability to your server-based applications. They can be easily moved to new hardware with little or no downtime. Workloads can be rebalanced if hardware becomes overloaded, or they can be quickly recovered on another system if hardware fails. The VHDX file format that Hyper-V uses to hold virtual machine data can be mounted by any current Windows operating system so you can recover data quickly and easily.
4. Rapid Deployment of Server Environments
With a physical infrastructure already in place, new operating system environments can be deployed from templates in a few minutes, drastically reducing the time necessary to provision and deploy a new Windows Server or Linux installation.
5. Built-In Lab Environments
With the rapid provisioning and isolation features that are natural to Hyper-V, you can quickly design and deploy test and sandbox environments quickly. Disposing of them once testing has completed is even quicker.
6. Reduced Management Effort
All virtual machines running on a host or cluster can be viewed from a single pane using existing tools. For larger installations, management tools are available to monitor virtual machines across the entire datacenter. PowerShell and other tools enable mass simultaneous management of these systems.
7. Licensing Savings
Of all currently available virtualization platforms, Hyper-V Server is one of the few that has no price tag, regardless of the feature set. All features of Hyper-V are available in even the free edition, including failover clustering, multi-path I/O, and no artificial limits on CPU or memory utilization.
The same Windows Server license that allows you to install on a single physical system also grants you the right to run two (per Standard Edition license) or more (with Datacenter Edition) virtualized instances on the same hardware, expanding the reach of the server licenses that you already paid for.
8. Enabling a Virtual Desktop Infrastructure
With the needs of a mobile workforce often exceeding the power of modern small devices, Hyper-V can provide a virtual desktop infrastructure (VDI) to supply high-powered desktop processing capabilities to low-powered laptops and handheld devices.
9. Uses Technology that You Already Know
Hyper-V’s interface is built upon the familiar Windows command-line interface. The free version can be managed locally through PowerShell and WMI or remotely using free graphical tools. It can even run most Windows Forms-based applications.
You can find Microsoft’s competitive product comparison here.
Why Should I Use Hyper-V on the Desktop?
Beginning with Windows 8, Hyper-V is now a built-in component of the Professional and Enterprise editions of the Windows desktop operating system. This offering is a subset of the server-based Hyper-V technology. To differentiate the two, the desktop version is called “Client Hyper-V”. It has the following limitations:
- Requires Second-Level Address Translation (SLAT); Hyper-V Server 2012 R2 only recommends it
- No clustering or replication
- No migrations (can export and import)
- No SR-IOV support
- No virtual Fibre Channel (can still use FC-attached storage)
- No RemoteFX
Client Hyper-V has one very important distinction among desktop hypervisors: it is a type 1 hypervisor whereas almost all others are type 2. A type 2 hypervisor is just an application that runs inside an operating system and is subjected to the same treatment as other applications, like Microsoft Outlook or a video game.
The root operating system decides when the type 2 hypervisor will be allowed to access resources, which it can then redistribute to guest operating systems.
This often results in very uneven performance for both the root operating system and the type 2 hypervisor’s guests. The operations of Hyper-V as a type 1 hypervisor will be explained in the next section.
For your purposes, Client Hyper-V provides a much smoother performance profile than most competing desktop hypervisors. It also comes as a free, built-in component that requires no downloads, purchases, or separate update process.
You can find out more about Client Hyper-V on TechNet.
How does Hyper-V work?
If you’re completely new to this technology, it would help you to take a few minutes to become grounded in the basic concepts of virtualization before diving into Hyper-V. Not having a basic idea of Hyper-V’s operation can lead to conceptual hurdles that prevent successful implementation and operation.
We’ll begin with the familiar computer. You start with the hardware. This is made of the motherboard and the CPU and the memory and the hard drive and the monitor. An operating system is the first layer of software that gets installed. Its primary job is to corral all that hardware, ensuring that all the bits get where they need to go. Part of its function is accepting input from devices such as the keyboard and mouse. A related job is directing output to the screen, printers, and other devices.
Whether you know it or not, virtualization is occurring in the above diagram. “Virtualization” is really just another word for “abstraction”. Abstraction is one of the basic functions of an operating system. You haven’t got the time to learn how to send binary commands and data to the CPU in order to make your printer produce a report. So, the operating system presents to you an abstraction of the printer that you can send print jobs to. The print job that you built was created inside another program that provided an abstraction of the document. The icons and the mouse cursor are abstractions.
A hypervisor takes this abstraction up one more level. This is reflected in the origin of the word. In earlier times, what we now call “operating systems” used to be called “supervisors”. In common Western vernacular, the prefix “hyper-” has come to mean “above super-“. So, the term “hypervisor” was coined to indicate a supervisor of supervisors. Conceptually, it looks like this:
We still have all the same abstractions as in a regular computer system, but now Hyper-V presents another layer between the operating system you’re used to and the hardware. This additional layer allows for multiple operating systems to run on the same hardware.
As with any major technology group, virtualization has a long list of technical terms. Many of them are easy to understand when encountered in context, but some can be rather confusing, especially when not everyone uses them the same way. This list provides some of the most common terms and uses each of them in the same fashion as Microsoft documentation. In the interest of brevity, not all terms will be thoroughly explained here. Later material will explore all of these concepts in depth.
|Hyper-V||Hyper-V is the general product name for Microsoft’s hypervisor. It is available in a number of different offerings. When this word is used by itself, it applies to the hypervisor generically.|
|Hyper-V Server||This is the free edition of Hyper-V. It has no graphical interface and cannot be switched to graphical interface mode. It contains several of the most basic features of Windows Server, but does not have access to most of its advanced roles.|
|Windows Server with Hyper-V||All complete copies of Windows Server allow you to enable Hyper-V as a role. In truth, Hyper-V will replace the Windows Server kernel at the physical boot-up layer and convert the Windows Server installation into a management operating system. Because it is a complete copy of Windows Server, it can be freely converted between graphical and non-graphical operating modes.|
|Windows Server Core (with Hyper-V)||When in Core mode, Windows Server looks much like Hyper-V Server. However, it includes all features of Windows Server and can be converted to graphical mode at any time.|
|Hyper-V Core||This is a nonsense term that should be avoided. It is not clear from this term whether or not Hyper-V Server or Windows Server in Core mode is being referenced.|
|Client Hyper-V||Client Hyper-V is a feature that you can enable inside Professional and Enterprise editions of Windows 8 and later desktop operating systems. It doesn’t have all the features of Hyper-V, such as clustering. It also includes a feature called “Fair Share” in which it does not allow virtual machines to monopolize hardware resources the way that Hyper-V does in the server offerings.|
|Type 1 and Type 2 Hypervisor||You will occasionally hear references to the hypervisor’s “type”. Hyper-V is always a type 1 hypervisor, whether talking about the server or the client version. This means that it is the physical startup operating system that runs directly on the hardware and it manages all the other operating systems. Contrast against a type 2 hypervisor such as Virtual PC, which runs as an application inside a normal operating system.|
|Host||“Host” refers to a physical computer system that is running Hyper-V.|
|Virtual machine||A virtual machine, or “VM”, is a logical container that is owned and operated by Hyper-V.|
|Partition||Partition is another, older term that means nearly the same thing as virtual machine.|
|Management operating system||When you enable Hyper-V as a role inside Windows Server, the original Windows Server installation becomes the “management operating system”. It works much like a virtual machine, but has the ability to directly control some hardware components such as network adapters and storage. Hyper-V Server includes a specialized, stripped-down copy of Windows Server as its management operating system.|
|Parent partition||This is an earlier term for “management operating system”. Sometimes also called “host partition”.|
|Child partition||This is an earlier term that means the same thing as “virtual machine”.|
|Guest operating system||This refers to the operating system that is installed inside a virtual machine.|
|Guest||This is a potentially confusing term, as it is sometimes used to refer to a virtual machine and other terms to refer to the guest operating system. Meaning can usually be inferred fairly easily from context.|
|Virtual switch||Hyper-V does not allow its virtual machines to access the network directly. Instead, it creates a virtual switch. This virtual switch is the intermediary between the physical network and the virtual network adapters used by virtual machines.|
|Virtual network||In earlier editions of Hyper-V, this was the term that was used to refer to the virtual switch. Due to confusion, it is recommended that this term not be used.|
|Network virtualization||Network virtualization is a large, advanced topic. You can create entire layer-2 networks within a Hyper-V deployment in order to isolate them from other networks. It works much like the traditional VLAN, but is far more scalable.|
|Virtual CPU||As with networking, Hyper-V does not present CPUs directly to virtual machines. Instead, it performs thread scheduling on their behalf. By assigning a specific number of virtual CPUs to a virtual machine, you are controlling the maximum number of threads it is allowed to operate concurrently.|
|Virtual hard disk||Hyper-V can be configured to allow a virtual machine to have direct and complete access to a physical hard disk, but this is not recommended. To make better use of resources and to allow virtual machine mobility, Hyper-V allows the creation of very large files to server as containers. These are presented to virtual machines as normal disks. Virtual hard disks come in two variants: the earlier VHD file and the newer VHDX format.|
|Fixed virtual hard disk||This is one mode of the virtual hard disk. All space for the drive is allocated at creation time.|
|Dynamically expanding hard disk||This is another mode of the virtual hard disk. When it is created, only a tiny amount of space is allocated but the virtual machine believes that it has up to the maximum amount of space specified for the disk. As it fills that space, the file grows accordingly, up to the specified maximum.|
|Differencing virtual hard disk||A differencing disk is attached to a parent disk, which can be fixed, dynamically expanding, or another differencing disk. Any changes made to the data occur inside the differencing disk.|
|Dynamic Memory||Host memory can be assigned to virtual machines statically, or allocation can be controlled by Hyper-V. The latter method is called “Dynamic Memory”. The virtual machine starts with a defined amount of memory which can be adjusted between a minimum and maximum amount as needed.|
|Failover Clustering||This term isn’t unique to Hyper-V; it is a Microsoft technology used to join from two to sixty-four hosts together to protect an application against physical failure. Hyper-V is eligible for failover clustering.|
|Checkpoints||The complete running state of a virtual machine can be saved without interrupting its current operations. If necessary, those changes can be reverted to very quickly. Otherwise, they can be discarded with no impact.|
|Snapshots||An older name for “checkpoints”. Its usage has been discouraged due to conflicts with the name for VSS snapshots.|
|Saved State||A virtual machine’s running state can be saved and then the virtual machine’s operations suspended. This allows its host to be powered off or for the virtual machine to be moved. The guest operating system does not know that anything has happened; it is simply notified of a large time change once it is turned back on.|
Hyper-V Highlights and Features
Hyper-V was first introduced with the 2008 series of Windows Server products. Since then, it has expanded its capabilities and added a significant number of features. In the current edition (2012 R2), it is truly ready to power everything from a small business to a major enterprise.
Here are just a few of the things you get with Hyper-V:
- High performance virtualization layer: Virtualization necessarily adds some overhead to all guest activities. Hyper-V has been highly tuned so that virtualized operating systems and their applications suffer almost no performance impact when compared to non-virtualized equivalents
- Support for up to 1,024 virtual machines running on a single host
- Even balancing of resources across guests
- Clustering of physical hosts to provide automatic high availability protections to guests
- Dynamic assignment of resources to virtual machines
- Ability to move virtual machines between Hyper-V hosts without any down time experienced by the guests operating systems, even if they aren’t in the same cluster
- Export of running virtual machines
- High performance drivers for most Windows and Linux guest operating systems
- Live backup of virtual machines (dependent upon backup software abilities)
- Near-real-time replication of virtual machines to remote hosts
- Full support for non-uniform memory architecture (NUMA) at the guest and virtual machine level
- UEFI mode for guests (Generation 2)
- Off-loaded data transfer (ODX) for rapid file operations on supported storage systems
- RemoteFX to provide a high-end graphic and audio experience
- Simplified licensing for Windows Server guests
Don’t worry if you don’t recognize all of these terms. Most will be expanded upon greatly in later articles in this series.
How Do I Get Started With Hyper-V?
The articles immediately following this one will provide thorough instructions on the installation of Hyper-V, but there are really only a few things you need to get going right now.
- Choose your deployment scenario and acquire the software
- Ensure your hardware is up to the challenge
- Install Hyper-V
Deployment Options for Hyper-V
There are a number of easy ways to get started with Hyper-V. If you’d like to use it on a regular desktop or laptop with the familiar Windows interface, you’ll need a Professional or Enterprise edition of Windows 8.1 or Windows 10. If you want to work directly with the full product and never have to worry about licensing it, you can download Hyper-V Server from the TechNet evaluation site.
Despite its placement, you’ll never need to pay or license Hyper-V Server. If you aren’t quite ready for the GUI-free experience, you can acquire an evaluation edition of Windows Server 2012 R2 instead and install Hyper-V as a role. If you want the full feature set of Windows but also want the lower resource utilization of Hyper-V Server, you can strike a compromise with Windows Server installed in Core mode.
Hyper-V’s Hardware Requirements
Of course, downloading the software is just one piece of the puzzle. You’ll also need hardware to run it on. If you’re going to be using Hyper-V Server or a new copy of Windows Server, remember that it needs to run directly on the hardware. If you’re using a computer system that already has an operating system installed, it will need to replace that.
If you’re using an existing installation of Windows Server or will be enabling Client Hyper-V inside an existing installation of Windows 8.1 or Windows 10, the replacement will be seamless and you will lose no files or settings. However, any sleep modes will be disabled for Windows Server.
Hyper-V’s listed minimum requirements on a server are mostly the same as for Windows Server. Your hardware must have the following:
- 1.4 GHz 64-bit processor
- 512 MB of RAM
- 32 GB hard disk space
- Data execution prevention (explained below)
- Hardware-assisted virtualization (explained below)
The system must support Data Execution Prevention and provide hardware-assisted virtualization features. It is very rare for current systems to not support these features, but different systems will refer to them by different names. You’ll find these settings in the computer’s BIOS or UEFI configuration. For Data Execution Prevention, most manufacturers have settled on some form of the phrase “no execute”, but you might also find “execution prevention” or NX or XD. The hardware virtualization setting is usually easily recognized as well. Check with your manufacturer if you’re not certain.
Second-level address translation is a required feature for Client Hyper-V. It is not required for any server version of Hyper-V, but it is highly desirable. Memory operations, especially video, are greatly enhanced by this technology. This technology also has different names on different platforms. Intel refers to it as Rapid Virtualization Indexing (RVI) or Extended Page Tables (EPT). AMD calls theirs Nested Page Tables (NPT). As with DEP and hardware-assisted virtualization, SLAT has become very common.
However, these seemingly light hardware requirements can hide a greater truth: running multiple operating systems on the same hardware can quickly tax low-powered systems. While you don’t need to buy the highest-end system, the published minimums probably won’t even run a single guest. A full assessment of what you need will be the subject of a focused discussion later. However, a reasonable testing system would look like the following:
- A minimum of 2 CPU cores, preferably 4 or 6
- 8 GB of RAM
- 300 GB or more of hard disk space
These resources will allow you to explore the potential of Hyper-V. For a more comprehensive discussion of hardware usage in Hyper-V, refer to the following article: https://www.altaro.com/hyper-v/hyper-vs-actual-hardware-requirements/.
Your next challenge is to install Hyper-V! How you proceed will depend upon which distribution method you chose: