Our previous article covered the basic concepts of Virtualization and Windows Server 2012 Hyper-V. This article takes a closer look at Microsoft’s Hyper-V Virtualization platform and continues with the installation of the Hyper-V role via the Windows Server Manager interface and Windows PowerShell command prompt.
Hyper-V is a server role used to create virtualized environment by deploying different types of virtualization technologies such as server virtualization, network virtualization and desktop virtualization. The Hyper-V Server role can be installed in Server 2012 R2 Standard,Datacenter or Essentials edition. Hyper-V version 3.0 is the latest version of Hyper V server available in Windows Server 2012 R2 versions.
To learn more about the licensing restrictions on each Windows Server 2012 edition, read our article Windows 2012 Server Foundation, Essential, Standard & Datacenter Edition Differences, Licensing & Supported Features.
Hyper-V Hardware Requirements
The Hyper-V server role requires specific system-hardware requirements to be met. The minimum hardware requirements are listed in the table below:
At least one Gigabit Ethernet adapter
Keep in mind that the above table specifies the minimum requirements. If you wanted to install Hyper-V in a production environment along with a number of virtual machines, you will definitely need more than 512MB memory and 32GB disk space.
Installing The Hyper-V Server Role in Server 2012 Using Server Manager
In Windows Server 2012, you can install Hyper-V server role by using the Server Manager (GUI) or windows PowerShell. In both cases, the installation requires the user to be an Administrator or member of Administrators or Hyper-V administrators group.
At first, open Server Manager. Click Manage and select the Add Roles and Features option:
Add Role and Features
Click Next on the Before you begin page.
Choose Role-based or feature-based Installation option and click Next button:
Choose Role-based or feature-based Installation
In the next window, click on Select a server from the server pool option and select the server where you would like to install theHyper-V server role. Click on Next after selecting the server:
Select the Destination Server to Install Hyper-V
The next screen lists the available roles for installation, check Hyper-V and click Next:
Selecting the Hyper-V Role for Installation
Read the Hyper-V role information and click the Next button:
Hyper -V Installation
The next step involves the creation of Virtual Switches. Choose your server’s physical network adapters that will take part in the virtualization:
Creating Your Virtual Switches
The selected physical network adapters (in case you have more than one available) will be used and shared by virtual machines to communicate with the physical network. After selecting the appropriate network adaptors, click Next to proceed to the Migration screen.
Under Migration, leave the default settings as is and click Next:
Leave Default Migration Settings
These settings can also be modified later on. Live Migration is similar to VMware’s vMotion, allowing the real-time migration of virtual machines to another physical host (server).
Under Default Stores, you can configure the location of hard disk files and configuration files of all virtual machines. This is a location where all the virtual machine data will reside. You can also configure a SMB shared folder (Windows network folder), local drive or even a shared storage device.
We will leave the settings to their default location and click the Next button.
Selecting a Location to Store the Virtual Machines
The final screen allows us to review our configuration and proceed with the installation by clicking on the Install button:
Hyper-V Installation Confirmation
Windows will now immediately begin the installation of the Hyper-V role and continuously update the installation window as shown below.
Hyper-V Installation Progress
Once the installation of Hyper-V is complete, the Windows server will restart.
Installing Hyper-V role using Windows PowerShell
The second way to install the Hyper-V role is via Windows PowerShell. Surprisingly enough, the installation is initiated with a single command.
Type the following cmdlet in PowerShell to install the Hyper-V server role your Windows Server 2012:
C:\Users\Administrator> Install-WindowsFeature –Name Hyper-V –IncludeManagementTools –Restart
Hyper-V Installation with PowerShell
To install Hyper-V server role on remote computer, include the -ComputerName switch. In our example, the remote computer was named Voyager:
C:\Users\Administrator> Install-WindowsFeature –Name Hyper-V –ComputerName Voyager –IncludeManagementTools –Restart
Once the installation is complete, the server will restart. Once the server has booted, you can open Hyper-V Server Manager and begin creating the virtual machines:
Monitoring of Hyper-V Virtual Machines
When working in a virtualization environment, it is extremely important to keep an eye on virtualization service and ensure everything is running smoothly.
Thankfully, Microsoft provides an easy way to monitor Hyper-V elements and take action before things get to a critical stage.
The Hyper-V Manager console allows you to monitor processor, memory, networking, storage and overall health of the Hyper-V server and its virtual machines, while other Hyper-V monitoring metrics are accessible through Task Manager, Resource Monitor, Performance Monitor and Event Viewer to monitor different parameters of Hyper-V server.
The screenshot below shows the Hyper-V Manager with one virtual machine installed. At a first glance, we can view the VM’s state,CPU Usage, Assigned Memory and Uptime:
View Virtual Machine Status
Under Window’s Event Viewer we’ll find a number of advanced logs that provide a deeper view of the various Hyper-V components, as shown below:
Hyper-V Events (click to enlarge)
Addition information on Hyper-V can be obtained through the usage of Window’s Performance Monitor, which provides a number ofHyper-V useful counters as shown below:
Hyper-V Performance Monitor
Most experienced virtualization administrators will agree that managing and monitoring a virtualization environment can be a full-time job. It is very important to ensure your virtualization strategy is well planned and VMs are hosted on servers with plenty of resources such as Physical CPUs, RAM and Disk storage space, to ensure they are not starved of these resources during periods of high-utilization.
Keeping an eye on Hyper-V’s Manager, Performance Monitor counters and Event Viewer will help make sure no critical errors or problems go without notice.