Once you have installed the Hyper-V role and restarted the computer, you can begin to create VMs and deploy OSs on them by using the Hyper-V Manager console, which you can access from the Tools menu in Server Manager.
Like most of the Windows Server 2012 R2 management tools, including Server Manager itself, you can use the Hyper-V Manager console to create and manage VMs on multiple servers, enabling administrators to exercise full control over their servers from a central location.

To run Hyper-V Manager on a server that does not have the Hyper-V role, you must install the Hyper-V Management Tools feature. These tools are also found in the Remote Server Administration Tools feature.

Once you install and launch the Hyper-V Manager console, you can add servers to the display by right-clicking the Hyper-V Manager node in the left pane and selecting Connect To Server from the shortcut menu. The Select Computer dialog box appears, in which you can type or browse to the name of a Hyper-V server.
The Hyper-V Manager console lists all the VMs on the selected server, as shown in Figure 3-7, along with status information about each one.

Using Hyper-V Manager

FIGURE 3-7 The Hyper-V Manager console

Creating virtual machine
After installing Hyper-V and configuring it using Hyper-V Manager, you are ready to create VMs and install the OS on each one. By using Hyper-V Manager, you can create new VMs and define the hardware resources that the system should allocate to them. In the settings for a particular VM, depending on the physical hardware available in the computer and the limitations of the guest OS, administrators can specify the number of processors and the amount of memory allotted to a VM, install virtual network adapters, and create virtual disks by using a variety of technologies, including storage area networks (SANs).

By default, Hyper-V stores the files that make up VMs in the folders you specified on the Default Stores page during the role installation. Each VM uses the following files:
– A virtual machine configuration file in XML format with an .xml extension that contains the VM configuration information, including all settings for the VM.
– One or more VHD (.vhd or .vhdx) files to store the guest OS, applications, and data for the VM.

In addition, a VM can use a saved-state (.vsv) file if the machine has been placed into a saved state.

To create a new VM, use the following procedure.
1. In Server Manager, on the Tools menu, select Hyper-V Manager to open the Hyper-V Manager console.
2. In the left pane, select a Hyper-V server.
3. From the Action menu, select New, Virtual Machine. The New Virtual Machine Wizard starts, displaying the Before You Begin page.
4. Click Next to open the Specify Name And Location page.
5. In the Name text box, type a name for the VM, keeping in mind that the system will also use this name to create the VM files and folders. To create the VM files in a location other than the default, select the Store The Virtual Machine In A Different Location check box and type an alternate path in the Location text box. Then click Next.
The Specify Generation page appears.

6. Specify whether you want to create a Generation 1 or Generation 2 virtual machine
and click Next. The Assign Memory page opens.

7. In the Startup Memory text box, type the amount of memory you want the VM to use and click Next. The Configure Networking page opens, as shown in Figure 3-8.

Using Hyper-V Manager

FIGURE 3-8 The Configure Networking page of the New Virtual Machine Wizard

8. From the Connection drop-down list, select a virtual switch and click Next. The Connect Virtual Hard Disk page opens, as shown in Figure 3-9.

Using Hyper-V Manager

FIGURE 3-9 The Connect Virtual Hard Disk page of the New Virtual Machine Wizard

9. Leave the Create A Virtual Hard Disk option selected and type values for the following fields:
– Name Specifies the file name for the VHD, using the .vhdx format new to Windows Server 2012 R2
– Location Specifies a location for the VHD other than the default you specified on the Default Stores page
– Size Specifies the maximum size of the VHD

—————

Note : Storage

By default, the wizard creates a VHD file that starts small and dynamically expands up to the maximum size you specify.

—————

10. Click Next. The Installation Options page opens.
11. Leave the Install An Operating System Later Option selected and click Next. The Completing The New Virtual Machine Wizard page opens.
12. Click Finish. The wizard creates the new VM and adds it to the list of VMs in Hyper-V Manager.

The VM that this procedure creates is the equivalent of a bare-metal computer. It has all the (virtual) hardware it needs to run, but it has no software.

——————–

NOTE: USING WINDOWS POWERSHELL
To create a new VM by using Windows PowerShell, use the New-VM cmdlet with the following basic syntax:
New-VM –Name “VM name” –MemoryStartupBytes <memory>
–NewVHDSizeBytes <disk size>
For example, the following command creates a new VM called ServerA with 1 GB of memory and a new 60-GB VHD drive:
New-VM –Name “ServerA” –MemoryStartupBytes 1GB
–NewVHDSizeBytes 60GB

——————–

There are, of course, many more parameters for the New-VM cmdlet, which you can explore through the Get-Help cmdlet.

Each VM on a Hyper-V server consists of a collection of settings that specify the hardware resources in the machine and the configuration settings that control those resources. You can manage and modify those settings by using the Settings page for the particular VM.

Selecting a VM from the list in Hyper-V Manager displays a series of icons in the Actions pane. Clicking the Settings icon opens the Settings dialog box, shown in Figure 3-10, which is the primary configuration interface for that VM. Here, you can modify any of the settings that the New Virtual Machine Wizard configured for you.

Using Hyper-V Manager

FIGURE 3-10 The Settings dialog box for a VM

Creating Generation 1 and Generation 2 VMs
In Windows Server 2012 R2, Hyper-V includes a new type of virtual machine, which it refers to as Generation 2. The VM type created by all previous versions is called Generation 1. When you create a new virtual machine in the Hyper-V manager, the New Virtual Machine Wizard includes a new page (shown in Figure 3-11) on which you specify whether you want to create a Generation 1 or Generation 2 VM. The New-VM cmdlet in Windows PowerShell also includes a new –Generation parameter.

Using Hyper-V Manager

FIGURE 3-11 The Specify Generation page in the New Virtual Machine Wizard

Generation 1 VMs are designed to emulate the hardware found in a typical computer. To do this, they use drivers for specific devices, such as an AMI BIOS, an S3 graphics adapter, and an Intel chipset and network adapter. Generation 1 VMs that you create with Windows Server 2012 R2 Hyper-V are completely compatible with all previous Hyper-V versions.

Generation 2 VMs use synthetic drivers and software-based devices instead; they provide advantages that include the following:

UEFI boot Instead of using the traditional BIOS, Generation 2 VMs support Secure Boot using the Universal Extensible Firmware Interface (UEFI), which requires a system to boot from digitally signed drivers and enables them to boot from drives larger than 2 TB with GUID partition tables.
SCSI disks Generation 2 VMs omit the IDE disk controller used by Generation 1 VMs to boot the system and use a high-performance virtual SCSI controller for all disks, enabling the VMs to boot from VHDX files and support hot-disk adds and removes.

The end result is a Generation 2 virtual machine that deploys much faster than its Generation 1 counterparts and performs better as well. The limitations, however, are that Generation 2 VMs can only run the following guest operating systems:

– Windows Server 2012
– Windows Server 2012 R2
– Windows 8 64-bit
– Windows 8.1 64-bit

Installing an operating system
Once you have created a VM, you can install an OS on it. Hyper-V in Windows Server 2012 R2 supports all the following as OSs you can install in Generation 1 VMs:

– Windows Server 2012 R2
– Windows Server 2012
– Windows Server 2008 R2
– Windows Server 2008
– Windows Home Server 2011
– Windows Small Business Server 2011
– Windows Server 2003 R2
– Windows Server 2003 SP2
– Windows 8.1
– Windows 8
– Windows 7 Enterprise and Ultimate
– Windows Vista Business, Enterprise, and Ultimate SP2
– Windows XP Professional SP3
– Windows XP x64 Professional SP2
– CentOS 6.0–6.2
– Red Hat Enterprise Linux 6.0–6.2
– SUSE Linux Enterprise Server 11 SP2

—————–

NOTE: GUEST OSS
This is the official list of supported guest OSs at RTM. Other OSs might also function but have not been fully tested.

——————

One of the advantages of installing software on VMs is that there are several ways to access the installation files. A VM, by default, has a DVD drive, which can itself be physical or virtual.
When you open the Settings dialog box for a Generation 1 VM and select the DVD drive in the Hardware list, you see the interface shown in Figure 3-12. In the Media section, you can select one of the following options for the drive:
– None The equivalent of a drive with no disk inserted.
– Image File Points to a disk image file with a .iso extension stored on one of the host computer’s drives or on a shared network drive.
– Physical CD/DVD Drive Links the virtual DVD drive to one of the physical DVD drives in the host computer.

In a Generation 2 VM, the DVD drive supports only the None option and the Image File option, as shown in Figure 3-12. The ability to mount an image file to a virtual DVD drive is particularly useful for administrators who download OS files as disk images. Once you have mounted an installation disk, either physically or virtually, you can click Start in the Actions pane of Hyper-V Manager, which is the equivalent of turning on the VM.

Starting a VM causes the thumbnail in the Hyper-V Manager to go live, displaying the contents of the computer’s screen. To display the VM’s activity at full size, click Connect in the Actions pane to open a new window for the VM. You can then interact with the VM through that window, just as if you were sitting at a physical computer’s console.

Using Hyper-V Manager

FIGURE 3-12 DVD drive settings for a VMFIGURE 3-12 DVD drive settings for a VM

When the VM boots from the disk you mounted, the OS installation proceeds just as if you were using a physical computer. During the installation process, you can work with the VHD drive just as you would a physical one, creating partitions of various sizes and selecting one for the OS. When the installation is complete, the VM restarts, and you can then log on and use it in the normal manner.

Configuring Guest Integration Services
In some cases, certain Hyper-V guest OS features do not function properly using the OS’s own device drivers. Hyper-V, therefore, includes a software package called Guest Integration Services, which you can install on your VMs for compatibility purposes.
Some of the functions provided by the Guest Integration Services package are as follows:
Operating System Shutdown Enables the Hyper-V Manager console to remotely shut down a guest OS in a controlled manner, eliminating the need for an administrator to log on and manually shut the system down.
Time Synchronization Enables Hyper-V to synchronize the OS clocks in parent and child partitions.
Data Exchange Enables the Windows OSs on the parent and child partitions to exchange information, such as OS version information and fully qualified domain names.
Heartbeat Implements a service in which the parent partition sends regular heartbeat signals to the child partitions, which are expected to respond in kind. A failure of a child partition to respond indicates that the guest OS has frozen or malfunctioned.
Backup Enables backup of Windows VMs by using Volume Shadow Copy Services.
Guest Services Enables administrators to copy files to a virtual machine without using a network connection.
The Windows Server 2012, Windows Server R2, Windows 8, and Windows 8.1 operating systems have the latest Guest Integration Services software built in, so there is no need to install the package on VMs running those OSs as guests. Earlier versions of Windows have earlier versions of the Guest Integration Services  package that need to be upgraded, however, and some Windows versions do not include the package at all.

To upgrade Guest Integration Services on a Windows guest OS, use the following procedure:
1. In Server Manager, on the Tools menu, select Hyper-V Manager. The Hyper-V Manager console starts.
2. In the left pane, select a Hyper-V server.
3. In the Actions pane, start the VM on which you want to install Guest Integration Services and click Connect. A Virtual Machine Connection window opens.
4. In the Virtual Machine Connection window, from the Action menu, select Insert Integration Services Setup Disk. Hyper-V mounts an image of the Guest Integration Services disk to a virtual disk drive and an Autoplay window appears.

5. Click Install Hyper-V Integration Services. A message box appears, asking you to upgrade the existing installation.
6. Click OK. The system installs the package and prompts you to restart the computer.
7. Click Yes to restart the computer.
Once you have installed or upgraded Guest Integration Services, you can enable or disable each of the individual functions by opening the Settings dialog box for the VM and selecting the Integration Services page, as shown in Figure 3-13.

Using Hyper-V Manager

FIGURE 3-13 Integration Services settings for a VM

At this point, you are ready to configure and manage the VM just as if you were working on a physical server. This can include modifying the network configuration, enabling remote desktop, loading the appropriate roles and features, and installing applications.

Using Enhanced Session mode
In previous versions of Hyper-V, when you open a Virtual Machine Connection window in the Hyper-V Manager console, you receive mouse and keyboard connectivity plus a limited cut and paste functionality. To obtain any further access, such as audio or print functionality, you could establish a Remote Desktop Services connection to the VM, but this requires the computers to be connected to the same network, which is not always possible.

Starting in Windows Server 2012 R2, Hyper-V supports an enhanced session mode that enables the Virtual Machine Connection window to redirect any of the following local resources to VMs running Windows Server 2012 R2 or Windows 8.1:

– Display configuration
– Audio
– Printers
– Clipboard
– Smart cards
– USB devices
– Drives
– Supported Plug and Play devices

The enhanced session mode works by establishing a Remote Desktop Protocol connection between the host computer and the VM, but it does not require a standard network path because it uses VMBus instead. VMBus is a high-speed conduit between the various partitions running on a Hyper-V server.

Enhanced session mode is enabled by default in Windows 8.1, but in Windows Server 2012 R2, you must enable it on the Enhanced Session Mode Policy page of the Hyper-V Settings dialog box, as shown in Figure 3-14.

Using Hyper-V Manager

FIGURE 3-14 Enhanced Session Mode Policy settings

Allocating memory
Dynamic memory enables Hyper-V to adjust the amount of RAM allocated to VMs, depending on their ongoing requirements. Some computer components can be virtualized. You can take some disk space and create a virtual hard drive, and you can take an image file and create a virtual DVD drive. You can also create virtual network interface adapters and other components, which appear like the real thing in a VM. System memory is different, however.
There is no substitute for memory, so all Hyper-V can do is take the physical memory installed in the computer and allocate it among the various VMs.

When you create a VM, you specify how much memory to allocate to the VM. Obviously, the amount of memory available for use is based on the physical memory installed in the computer.

After you have created the VM, you can modify the amount of memory allocated to it by shutting down the VM, opening its Settings dialog box, and changing the Startup RAM setting on the Memory page, as shown in Figure 3-15. This enables you to experiment with various amounts of memory, and set the optimum performance level for the system.

Using Hyper-V Manager

FIGURE 3-15 Memory settings for a VM

USING DYNAMIC MEMORY
In the first versions of Hyper-V, shutting down the VM was the only way to modify its memory allocation. In the Windows Server 2012 R2 version, however, you can use a feature called Dynamic Memory to automatically reallocate memory to the VM from a shared memory pool as its demands change. If a virtualized server starts to experience larger amounts of client traffic, for example, Hyper-V can increase the memory allocated to the system, and reduce it again when the traffic subsides.
To use Dynamic Memory, you must enable it by selecting the Enable Dynamic Memory check box on the VM’s Memory settings page and then configure the following settings:

Startup RAM Specifies the amount of memory that you want to allocate to the VM when it starts. When you are using Dynamic Memory, this value can be the minimum amount of memory needed to boot the system.
Minimum RAM Specifies the smallest amount of memory the VM can use at any time. OSs can require more memory to start up than to run, so this value can be smaller than the Startup RAM value.

Maximum RAM Specifies the largest amount of memory that the VM can use at any time. The value can range from a low equal to the Startup RAM value to a high of 64 GB.
Memory Buffer Specifies a percentage that Hyper-V uses to calculate how much memory to allocate to the VM, compared to its actual utilization, as measured by performance counters. For example, with the Memory Buffer value set to 20 percent, a VM with applications and OS that consume 1 GB of memory will receive a dynamic allocation of 1.2 GB.

Memory Weight Specifies a relative value that specifies the priority of this VM compared to the other VMs on the same computer. When the physical memory in the computer is insufficient to allocate the full-buffered amount specified for each VM, the VMs with the highest Memory Weight settings receive priority.

——————

NOTE: RAM
You can reduce the Minimum RAM, increase the Maximum RAM, or change the Memory Buffer value or the Memory Weight value at any time, but to enable or disable Dynamic Memory, you must shut down the VM.

——————

In addition to configuring the VM settings, the guest VM must be running Windows Vista or later or Windows Server 2003 SP2 or later and have Windows Server 2012 R2 Guest Integration Services installed to use Dynamic Memory.

————————-

NOTE USING WINDOWS POWERSHELL
To configure the memory settings for a VM, use the Set-VMMemory cmdlet by using the following basic syntax:
Set-VMMemory <VM name> -DynamicMemoryEnabled $true
-MinimumBytes <memory> -StartupBytes <memory>
-MaximumBytes <memory> -Priority <value> -Buffer <percentage>

For example, to configure the memory settings for the VM ServerA, enabling Dynamic Memory and configuring values for all of its settings, use the following command:
Set-VMMemory ServerA -DynamicMemoryEnabled $true
-MinimumBytes 64MB

————————–

CONFIGURING SMART PAGING
Dynamic Memory was introduced in Windows Server 2008 R2 Hyper-V, but Windows Server 2012 R2 improves on the concept by adding the Minimum RAM setting. This makes it possible for Hyper-V to reduce the memory used by a VM to a level lower than that needed to start the system, reclaiming that memory for other uses.
The problem with having minimum RAM values that are lower than the startup RAM values is that it becomes possible to deplete the supply of physical memory with too many VMs running simultaneously at their minimum RAM values. If this occurs, a VM that has to restart might be unable to do so because there is not enough free memory to increase its memory allocation from its minimum RAM value to its startup RAM value.
To address this possibility, Hyper-V includes a feature called smart paging. If a VM has to restart and there is not enough memory available to allocate its startup RAM value, the system uses hard disk space to make up the difference and begins paging memory contents to disk.
Disk access rates are far slower than memory access rates, of course, so smart paging incurs a severe  performance penalty, but the paging occurs only for as long as it takes to restart the VM and return it to its minimum RAM allocation.
Hyper-V only uses smart paging in specific conditions: when a VM must be restarted, there is no free memory available, and there are no other means available to free up the necessary memory.
You can select the Smart Paging File Location page in a VM’s Setting dialog box to specify a location for the paging file. Selecting the fastest possible hard drive is recommended.

This article is a part of 70-410 Installing and Configuring Windows Server 2012 Prep course, more articles in this course are :

article

Understanding Active Directory

Active Directory and its Features: Active Directory is the name given to a collection of services created by Microsoft that ...
Read More
article

Active Directory GUI Installation

Before we get to the installation, there are a few things to check to make sure the server is ready ...
Read More
article

Understanding DNS Server

DNS Server is being used too maintain and configure the DNS which is a name resolution service. Public DNS services ...
Read More
article

Maintaining and configuring DNS Forwarding

The act of DNS forwarding refers to the relaying of a DNS request from one server to another one when ...
Read More
article

Planning for a server installation

In versions of Windows Server prior to Windows Server 2008 R2, installation planning could be a complex task. You had ...
Read More
article

Choosing installation options

Many enterprise networks today use servers that are dedicated to a particular role. When a server is performing a single ...
Read More
article

Upgrading servers

An in-place upgrade is the most complicated form of Windows Server 2012 R2 installation. It is also the lengthiest and ...
Read More
article

Migrating roles

Migration is the preferred method of replacing an existing server with one running Windows Server 2012 R2. Unlike an in-place ...
Read More
article

Completing postinstallation tasks

As part of the new emphasis on cloud-based services in Windows networking, Windows Server 2012 R2 contains a variety of ...
Read More
article

Using Server Manager

The Server Manager tool in Windows Server 2012 R2 is an application that is the most obvious evidence of a ...
Read More

70-410 Installing and Configuring Windows Server 2012 Prep course includes following practice tests:

Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 1

Instructions for Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 1 This page shows the instructions for Exam ...
Read More

Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 2

Instructions for Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 2 This page shows the instructions for Exam ...
Read More

Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 3

Instructions for Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 3 This page shows the instructions for Exam ...
Read More

Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 4

Instructions for Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 4 This page shows the instructions for Exam ...
Read More

Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 5

Instructions for Exam 70-410 Installing and Configuring Windows Server 2012 Practice Test 5 This page shows the instructions for Exam ...
Read More