0% found this document useful (0 votes)
9 views44 pages

Virtualization for DHCP and File Sharing

Module 13 focuses on implementing server virtualization using Hyper-V, detailing its components, deployment, and management of virtual machines and networks. It covers various virtualization technologies, including server, desktop, and application virtualization, as well as the benefits of using cloud services like Windows Azure. The module aims to equip administrators with the knowledge to efficiently utilize server resources and manage virtual environments.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
9 views44 pages

Virtualization for DHCP and File Sharing

Module 13 focuses on implementing server virtualization using Hyper-V, detailing its components, deployment, and management of virtual machines and networks. It covers various virtualization technologies, including server, desktop, and application virtualization, as well as the benefits of using cloud services like Windows Azure. The module aims to equip administrators with the knowledge to efficiently utilize server resources and manage virtual environments.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Module 13: Implementing Server Virtualization with Hyper­V

Contents:

Module Overview

Lesson 1: Overview of Virtualization Technologies

Lesson 2: Implementing Hyper­V

Lesson 3: Managing Virtual Machine Storage

Lesson 4: Managing Virtual Networks

Lab: Implementing Server Virtualization with Hyper­V

Module Review and Takeaways

Module Overview

Server virtualization has been a part of the Windows Server® operating system since the release of Windows Server 2008 and
the introduction of the Hyper­V® role. By using server virtualization, your organization can save money through server
consolidation. However, to use server virtualization more efficiently, server administrators need to be able to decide which
server workloads will run effectively in virtual machines, and which server workloads must remain deployed in a more
traditional server environment.

This module introduces you to the Hyper­V role in Windows Server 2012 and Windows Server 2012 R2, the components of
the role, how best to deploy the role, and the new features of the Hyper­V role that Windows Server 2012 and Windows
Server 2012 R2 introduce.

Objectives

After completing this module, you should be able to:

• Describe virtualization technologies.

• Implement Hyper­V.

• Manage virtual machine storage.

• Manage virtual networks.

Lesson 1 : Overview of Virtualization Technologies

You can deploy many different types of virtualization technologies on networks where Windows® operating systems are
deployed. The types of virtualization technologies that you select depend on what your organization needs to accomplish.

[Link] 1/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Although this module focuses primarily on server virtualization, in this lesson, you will learn about other types of
virtualization technologies, and the situations in which it is appropriate to deploy them.

Lesson Objectives
After completing this lesson, you should be able to:

• Describe server virtualization using Hyper­V.

• Describe Windows Azure ™.

• Explain when you would use desktop virtualization.

• Determine the components required to implement presentation virtualization.

• Explain the advantages of using Microsoft application virtualization rather than traditional methods to deploy apps.

Server Virtualization

With server virtualization, you can create separate virtual machines and run them concurrently on a single server that is
running Hyper­V. These virtual machines are guests, while the computer that is running Hyper­V is the virtualization server
or the management operating system.

Virtual machine guests function as normal computers. When users sign into a guest virtual machine remotely by using Remote
Desktop Connection (RDC) or a Windows PowerShell® remote session, you would have to examine closely the properties of
the computer on which the user is working to determine whether it is a virtual machine or a traditionally deployed physical
machine. Virtual machines that are hosted on the same virtualization server are independent of one another. You can run
multiple virtual machines that are using different operating systems on a virtualization server simultaneously, provided the
virtualization server has enough resources.

Implementing Virtual Machines to Maximize Hardware Usage

You use hardware more efficiently when you implement virtual machines. In most cases, a service or program does not
consume more than a fraction of the virtualization server’s resources. This means that you can install multiple services and
programs on the same virtualization server and then deploy them to multiple virtual machines. This ensures more effective use
of that virtualization server’s resources. For example, assume that you have four separate services and programs, each of which
consumes from 10 to 15 percent of a virtualization server’s hardware resources. You can install these services and programs in
virtual machines, and then place them on the same hardware where, on average, they consume 40 to 60 percent of the

[Link] 2/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

virtualization server’s hardware.

This is a simplified example. In real­world environments, you must make adequate preparations before co­locating virtual
machines. You have to ensure that the hardware­resource needs of all the virtual machines that the virtualization server is
hosting do not exceed the server’s hardware resources.

Isolating Services and Programs

Keeping one particular service or program functioning reliably can be challenging and it becomes even more complicated
when you deploy multiple services and programs on the same server. For example, you might need to deploy two separate
operating systems at a branch office, but these operating systems conflict when running on the same computer. If you can
afford only one server then you can solve this problem by running these programs within virtual machines on the same server.

Consolidating Servers

With server virtualization, you can consolidate servers that would otherwise need to run on separate hardware onto a single
virtualization server. Because each virtual machine on a virtualization server is isolated from the other virtual machines on the
same server, it is possible to deploy services and programs that are incompatible with one another on the same physical
computer, provided that you host them within virtual machines. Examples of such services and programs include Microsoft®
Exchange Server 2013, SQL Server® 2012, and Active Directory® Domain Services (AD DS). This means that an
organization only needs to deploy one physical server in place of the three servers that they would have needed in the past.

Best Practice: We recommend that you do not deploy a Microsoft Exchange mailbox server or a SQL Server 2012
database engine instance on a computer that hosts the domain controller role. Microsoft does support deploying
each of these workloads on separate virtual machines that are running on the same virtual machine host.

Simplifying Server Deployment

Virtualization also enables you to simplify server deployment, because:

• Virtual machine templates for common server configurations are included with products such as Microsoft System Center
2012 ­ Virtual Machine Manager (VMM). These templates include parameters that are preconfigured with common
settings, so you do not have to configure the setting of every parameter manually.

• You can create virtual machine self­service portals that enable end users to provision approved servers and programs
automatically. This lessens the workload of the systems administration team. You create these virtual machine self­service
portals with VMM and Microsoft System Center 2012 ­ Service Manager.

What Is Windows Azure?

[Link] 3/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Windows Azure is a cloud­based platform on which you can purchase capacity for virtual machines, for applications, or for
services such as SQL Server databases on SQL Azure ™. One of the advantages of using Windows Azure is that you pay only
for the capacity that you use, rather than paying a fixed rate. For example, you may pay a monthly flat rate to rent a server on a
rack at a hosting provider. However, you likely will pay less when the server is less busy and you pay more when the server
gets busier.

Cloud­based capacity is elastic, meaning it can grow or shrink quickly as required. For example, in a traditionally hosted
solution, you might choose a specific server chassis, but then if your need for capacity or performance grows you have to
switch to a bigger class of server hardware. All of this takes time and planning. Similarly, if your need for capacity or
performance decreases, you need to decide whether migrating to a lower class of hardware is worth the cost, or if your
organization should continue to pay for a class of hardware that you do not need right now, and may or may not need in the
future. By using a hosting provider, capacity is scaled automatically and you do not have to spend the time or money that it
takes to switch from one server to another.

Cloud­based virtual machines, programs, and services can be useful when you have to provide proof­of­concept solutions for
proposed projects. Rather than purchase test hardware and deploy a proof­of­concept solution to it, you can deploy a cloud­
based virtual machine quickly, and then deploy the proof­of­concept solution to that. Then, once you validate the proof­of­
concept solution, you can discard the virtual machine, or keep it, depending on operational concerns. This solution is not
only faster, it is less expensive than buying the hardware for the proof­of­concept solution, which you may opt to discard if
the project is not approved.

Hosting Websites or Production Programs

On cloud­based platforms, such as Windows Azure, you can deploy programs without having to deploy the underlying server
infrastructure. For example, say you require a database. Rather than deploying Windows Server 2012 and SQL Server 2012,
and then deploying the specific database, you can rent the cloud­based database server, and then host the database there.

For a successful cloud­based strategy, you must determine which services and programs are more economical to deploy on a
cloud­based platform, and which services and programs are more economical to host in a more traditional server environment
on your own premises. Many factors that are unique to your organization are involved in making this determination, and a
strategy that is best for one organization may not be appropriate for another.

Desktop Virtualization

[Link] 4/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Client Hyper­V

You can install the Hyper­V role on computers that are running the Windows 8 Pro, Windows 8 Enterprise Windows 8.1 Pro
and Windows 8.1 Enterprise operating systems. This allows you to run virtual machine guests on client computers.

Client Hyper­V, the Hyper­V feature in Windows 8 and Windows 8.1 operating systems, has slightly different processor
requirements than Hyper­V on Windows Server 2012 or Windows Server 2012 R2.

Specifically, with the Windows 8 and Windows 8.1 client operating systems, the computer must have an x64 platform that
supports Second Level Address Translation (SLAT), and have a minimum of 4 gigabytes (GB) of random access memory
(RAM). This differs from Hyper­V on Windows Server 2012 and Windows Server 2012 R2, which does not require SLAT.

Client Hyper­V on Windows 8 and Windows 8.1

The Client Hyper­V role on Windows 8 and Windows 8.1 supports many of the features that are available with Hyper­V on
Windows Server 2012. However, it does not support Windows Server 2012 features such as virtual machine migration.
Additionally, Client Hyper­V does not support publishing apps installed on the virtual machine guest to the management
operating system’s Start menu. This was a feature of Windows XP Mode on Windows 7, which uses Windows Virtual PC.
Windows Virtual PC is the client virtualization feature available to some computers running specific editions of Windows 7.

Client Hyper­V in Enterprise Environments

In enterprise environments, Client Hyper­V is often used for development purposes, or to allow specific users to run previous
versions of the Windows operating system, thereby allowing them to access apps that are incompatible with Windows 8 or
Windows 8.1

Virtual Desktop Infrastructure

In Virtual Desktop Infrastructure (VDI), client operating systems are hosted centrally as virtual machines, and clients connect
to these virtual machines by using client software, such as RDC. You can configure a server to support VDI by selecting a
Remote Desktop Services installation in the Add Roles and Features Wizard. When you configure a virtualization server to
function as a VDI server, you can install the Remote Desktop Virtualization Host role feature in addition to the Hyper­V role.

VDI can simplify the management of client operating systems by:

• Ensuring regular backups occur for all client computers that are hosted on a single server.

• Hosting the client virtual machines on a highly available virtualization server.

[Link] 5/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Ensuring that users can still access their virtual machine by using other RDC methods when a client computer fails.

You can use VDI to implement a Bring Your Own Device (BYOD) policy. In this scenario, workers bring their own computer
to the office and use RDC software to connect to their assigned virtual machine.

RemoteFX

RemoteFX® is a technology that benefits VDI deployments by providing a set of enhancements to remote desktop
connections. RemoteFX enables virtual machines to display rich graphics and video capabilities, including media streaming.
It also provides support for multi­touch. To use RemoteFX, the Hyper­V host must have at least one graphics processing unit
(GPU) that supports DirectX® 9.0c or newer, and a central processing unit (CPU) that supports SLAT. If you install multiple
GPUs on the Hyper­V host, they must be identical.

Presentation Virtualization

Presentation virtualization differs from desktop virtualization in the following ways:

• In desktop virtualization, each user is assigned their own virtual machine that is running a client operating system. In
presentation virtualization, users sign in and run separate sessions on a server or servers. For example, users Adam and
Gavin might be signed in simultaneously to the same remote desktop server, yet be running different sessions using RDC.

• With desktop virtualization, the apps run

within virtual machines. With presentation virtualization, the desktop and the apps run on the virtualization server.

On networks that use Windows Server 2012, the Remote Desktop Services server role provides presentation virtualization.
Clients can access presentation virtualization in the following ways:

• Full Desktop. Clients can use a remote desktop client, such as RDC, to access a full desktop session and run programs on
the Windows Server 2012 virtualization server.

• RemoteApp programs. Rather than use a full desktop client, such as RDC, the Windows Server feature RemoteApp makes
it possible for programs that run on the Windows Server 2012 server to display on the client computer.

• Remote Desktop Web Access. Using Remote Desktop Web Access (RD Web Access), clients can access a website on a
specially configured server, and then launch RemoteApp programs and Remote Desktop sessions from their browser.

[Link] 6/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Remote Desktop Gateway

Remote Desktop Gateway (RD Gateway) makes it possible for external clients to access Remote Desktop and RemoteApp
without using a virtual private network (VPN) or DirectAccess, a feature of the Windows 7 and Windows 8 operating systems.
RD Gateway is a role service that you can install on a computer that is running Windows Server 2012. You deploy RD
Gateway servers on perimeter networks, and then configure the RDC client with the address of RD Gateway servers. This
ensures that the client checks to see if the target remote desktop server is on the organizational network. If it is, the client
makes a direct connection to it. If the remote desktop server is not on the network, the client routes the connection through
the RD Gateway server.

What Is Microsoft Application Virtualization?

With application virtualization, you do not install apps permanently on client computers. Instead, when users want to use
apps, apps are deployed from a server to clients. Microsoft Application Virtualization (App­V) uses the Microsoft Application
Virtualization Desktop Client, which is installed on the client. App­V is available as part of the Microsoft Desktop
Optimization Pack, and is not a native Windows Server 2012 role or feature.

App­V Features and Benefits

There are three main benefits of App­V:

• App Isolation. App­V isolates the app from the operating system, and runs it in a separate virtual environment. This means
that you can run apps that might be incompatible when run together on the same computer. For example, you can use App­
V to deploy and run different versions of Microsoft Office Word simultaneously.

• App Streaming. When an app is streamed, only those parts of the app that are being used are transmitted to the client
computer. This speeds up app deployment, because only part of the app must be transmitted across the network to the client
computer.

• App Portability. When you deploy App­V with Microsoft System Center 2012 Configuration Manager, users can use the
same apps on multiple client computers, without requiring a traditional installation on those client computers. For
example, a user can sign in to a colleague’s computer and then have App­V stream an app to them so that they can use it on
that computer. The app is not installed locally, and when the user signs out, the app is no longer available to other users on
that computer.

User Experience Virtualization

Just as App­V allows users to access their apps from different client computers, Microsoft User Experience Virtualization (UE­

[Link] 7/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

V) allows users to have the same operating system and app settings on multiple devices that are running Windows 7 and
Windows 8. For example, say a user configures a setting for an app delivered through App­V on one computer, such as
configuring a custom tab on a ribbon in a Microsoft Office product. That setting is available automatically when that app is
delivered through App­V to another computer.

Lesson 2: Implementing Hyper­V

Understanding how Hyper­V works and how virtual machines function is critical to deploying server virtualization
effectively in a Windows Server 2012 network environment. This lesson discusses Hyper­V, and the hardware requirements
for deploying Hyper­V on a computer that is running Windows Server 2012. This lesson also discusses the components of a
virtual machine, with an emphasis on the Dynamic Memory feature, and the benefits of virtual machine integration services.
Finally, it discusses how to measure virtual machine resource use with Windows PowerShell cmdlets.

Lesson Objectives
After completing this lesson, you should be able to:

• Install the Hyper­V role onto a server.

• Describe the appropriate hardware for Hyper­V deployment.

• Describe virtual machine hardware components.

• Configure Dynamic Memory.

• Configure virtual machine integration services.

• Configure virtual machine start and stop actions.

• Perform Hyper­V resource metering tasks.

• Describe the new features of Hyper­V in Windows Server 2012 R2.

What Is Hyper­V?

Hyper­V is the hardware virtualization role that is available in Windows Server 2012. Hardware virtualization provides a
hypervisor layer that has direct access to the host server’s hardware. The host operating system and all virtual machines that
are running on the host access the hardware through the hypervisor layer. This is in contrast to software­virtualization

[Link] 8/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

products, such as Microsoft Virtual Server 2005 R2, that use the virtualization server’s operating system to provide indirect
access to the server’s hardware.

You can deploy Hyper­V to a computer that is running Windows Server 2012 by using the Add Roles and Features Wizard,
and you can configure Windows Server 2012 as a virtualization server by using the Hyper­V role. Windows Server 2012 then
can host virtual machine guests that are running supported operating systems. You can manage virtual machine
administration locally through Windows PowerShell, or you can manage it remotely through the Hyper­V Manager console.

You can install the Hyper­V role on the Server Core installation of Windows Server 2012 and in a nonserver core
configuration in Windows Server 2012. There also is a Microsoft Hyper­V Server 2012 edition, which includes only the
components necessary to host virtual machines.

Note: In some documentation, a virtualization server is called the parent partition, and a virtual machine that is
running on the server is called the child partition. An example of a virtualization server is the Windows Server
2012 computer that is running Hyper­V.

Hardware Requirements for Hyper­V

The server on which you plan to install the Hyper­V role must meet the following hardware requirements:

• The server must have an x64 platform that supports hardware­assisted virtualization and Data Execution Prevention (DEP).

• The server must have enough CPU capacity to meet the requirements of the guest virtual machines.

A virtual machine hosted on Hyper­V in Windows

Server 2012 can support up to 64 virtual

processors.

• The server must have enough memory to support all of the virtual machines that must run concurrently, plus enough
memory to run the host Windows Server 2012 operating system:

o The server must have at least 4 GB of RAM.

o A virtual machine hosted on Hyper­V in Windows Server 2012 can support a maximum of 1 terabyte (TB) of RAM.

[Link] 9/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• The storage subsystem performance must meet the input/output (I/O) needs of the guest virtual machines. Whether
deployed locally or on storage area networks (SANs), you may have to place different virtual machines on separate
physical disks, or you may have to deploy a high performance redundant array of independent disks (RAID), solid­state
drives (SSD), hybrid­SSD, or a combination of all three.

• The virtualization server’s network adapters must be able to support the network throughput needs of the guest virtual
machines. You can improve network performance by installing multiple network adapters and using multiple network
interface cards.

Virtual Machine Hardware

Virtual machines use virtual, or simulated, hardware. The management operating system, Windows Server 2012 with Hyper­
V, uses the virtual hardware to mediate access to actual hardware. For example, you can map a virtual network adapter to a
virtual network that you map to an actual network interface.

Virtual machines have the following simulated hardware, by default, including the:

• BIOS. Simulates the computer’s BIOS. On a stand­alone computer you can configure various BIOS­related parameters, and

similarly, on a virtual machine, you can configure some of the same parameters, including:

o The boot order for the virtual machine’s virtual hardware.

o From which device the virtual machine boots, such as from a DVD drive, Integrated Drive Electronics (IDE), a legacy
network adapter, or a floppy disk.

o Whether Num Lock is enabled at boot.

• Memory. You can allocate up 1 TB of memory resources to an individual virtual machine.

• Processor. You can allocate up to 64 virtual processors to a single virtual machine.

• IDE controller 0. A virtual machine can support only two IDE controllers and, by default, two are allocated to each virtual
machine. Each IDE controller can support two devices.

You can connect virtual hard drives or virtual DVD drives to an IDE controller. You can use IDE controllers to connect
virtual hard disks and DVD drives to virtual machines that use any operating system that does not support integration
services.

[Link] 10/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• IDE controller 1. Enables deployment of additional virtual hard drives and DVD drives to the virtual machine.

• SCSI controller. You can use a small computer system interface (SCSI) controller only on virtual machines that have
operating systems that support integration services.

• Synthetic network adapter. Synthetic network adapters represent computer network adapters. You can only use synthetic
network adapters with supported virtual machine guest operating systems.

• COM 1. Enables you to configure a connection through a named pipe.

• COM 2. Enables you to configure an additional connection through a named pipe.

• Disk drive. Enables you to map a virtual floppy disk image to a virtual disk drive.

You can add the following hardware to a virtual machine by editing the virtual machine’s properties, and then clicking Add
Hardware:

• SCSI controller. You can add up to four virtual SCSI devices. Each controller supports up to 64 disks.

• Network adapter. A single virtual machine can have a maximum of eight synthetic network adapters.

• Legacy network adapter. You can use legacy network adapters with any operating systems that do not support integration
services. You can also use legacy network adapters to deploy operating system images throughout the network. A single
virtual machine can have up to four legacy network adapters.

• Fibre Channel adapter. If you add a Fibre Channel adapter to a virtual machine, the virtual machine can then connect
directly to a Fibre Channel SAN. You can only add a Fibre Channel adapter to a virtual machine if the virtualization server
has a Fibre Channel host bus adapter (HBA) that also has a Windows Server 2012 driver that supports virtual Fibre
Channel.

• RemoteFX 3D video adapter. If you add a RemoteFX 3D video adapter to a virtual machine, the virtual machine can then
display high performance graphics by leveraging Microsoft DirectX® and graphics processing power on the host Windows
Server 2012 server.

Additional Reading: For more information about virtual Fibre channel adapters, refer to “Hyper­V Virtual Fibre
Channel Overview” at [Link]

Generation 2 Virtual Machines

[Link] 11/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Virtual machines work the same way that physical computers do. Most operating systems and programs that run in virtual
machines are not aware that they are virtualized. Using emulated hardware enables operating systems that are not
virtualization­aware to run in virtual machines. In machines that can run enlightened operating systems, Integration Services
allow the virtual machines to access synthetic devices, which perform better. With the broad adoption of virtualization, many
modern operating systems now include Integration Services.

Windows Server 2012 R2 changes all of this. It fully supports the existing type of virtual machines, and names them
collectively generation 1 virtual machines. It provides support for the new type of virtual machines, named generation 2
virtual machines. Generation 2 virtual machines function as if the operating systems installed on them are virtualization­
aware. Because of this, generation 2 virtual machines do not have the legacy and emulated virtual­hardware devices found on
generation 1 virtual machines, and use only synthetic devices. BIOS­based firmware is replaced by advanced Unified
Extensible Firmware Interface (UEFI) firmware, which supports Secure Boot. Generation 2 virtual machines start from a SCSI
controller or by using the Pre­boot Execution Environment (PXE) on a network adapter. All remaining virtual devices use
virtual machine bus (VMBus) to communicate with parent partitions.

Generation 1 and generation 2 virtual machines have similar performance, except during startup and when you install an
operating system. The primary advantage of generation 2 virtual machines is that startup and deployment are considerably
faster. You can run generation 1 and generation 2 virtual machines side­by­side on the same Hyper­V host.

You select the virtual machine generation at the time you create the virtual machine. You cannot change the generation later.

Generation 2 virtual machines currently support only Windows Server 2012, Windows 8 (64­bit), and newer 64­bit Windows
operating systems. Therefore, generation 1 virtual machines, which support almost any operating system, will continue to be
used for the foreseeable future. Generation 2 virtual machines do not currently support RemoteFX.

Additional Reading: For more information about generation 2 virtual machines, refer to “Generation 2 Virtual
Machine Overview” at [Link]

What Is Dynamic Memory?

In the first release of Hyper­V with Windows Server 2008, you could only assign a static amount of memory to virtual
machines. Unless you took special precautions to measure the precise amount of memory that a virtual machine required, you
were likely to either under­allocate or over­allocate memory.

The Dynamic Memory feature was introduced with Windows Server 2008 R2 SP1, and it enables you to:

[Link] 12/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Allocate a minimum amount of memory to a virtual machine.

• Allow the virtual machine to request additional memory as necessary.

• Configure a maximum amount of memory to a virtual machine.

Therefore, by using Dynamic Memory, you no longer have to guess how much memory a virtual machine requires. Instead,
you can configure Hyper­V so that the virtual machine is allocated as much memory as it needs.

With Windows Server 2012, you can modify some of the Dynamic Memory minimum and maximum memory values while the
virtual machine is running. This was not possible with Windows Server 2008 R2 SP1. You can perform this task from a virtual
machine’s Settings dialog box.

Note: Virtual machines must support Hyper­V integration services to use Dynamic Memory.

Smart Paging

Virtual machines may need more memory during startup than they need during normal operation. Smart Paging, which is a
new feature in Windows Server 2012, assigns additional temporary memory to a virtual machine when you restart it. This
means that you can allocate memory based on what the virtual machine needs when it is operating normally, rather than the
amount that it needs during startup. Smart Paging uses disk paging to assign additional temporary memory to a virtual
machine while it is restarting. However, using Smart Paging may result in lower performance, because it uses disk resources
that the host server and other virtual machines would otherwise use.

Note: You can configure virtual machine memory by using the Set­VMMemory Windows PowerShell cmdlet.

Additional Reading: For more information about Hyper­V Dynamic Memory, refer to “Hyper­V Dynamic Memory
Overview” at [Link]

Configuring Virtual Machine Integration Services

You must install Virtual Machine Integration Services if you want to use features such as operating system shutdown, time
synchronization, and if you want to install virtual hardware components, such as SCSI adapters and synthetic network

[Link] 13/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

adapters, onto the virtual machines.

Virtual machine guest operating systems that are supported by Hyper­V and that can use Integration Services include:

• Windows Server 2012

• Windows Server 2008 R2 with SP1

• Windows Server 2008 with Service Pack 2 (SP2)

• Windows Server 2003 R2 with SP2

• Windows Home Server 2011

• MultiPoint® Server 2012

• Windows Small Business Server 2011

• Windows Server 2003 with SP2

• CentOS 6.0­6.2

• CentOS 5.5­5.7

• Red Hat Enterprise Linux 6.0­6.2

• Red Hat Enterprise Linux 5.5­5.7

• SUSE Linux Enterprise Server 11 with SP1or SP2

• SUSE Linux Enterprise Server 10 with Service Pack 4 (SP4)

• Windows 7 with SP1

• Windows Vista® with SP2

• Windows XP with Service Pack 3 (SP3)

Note: Support for the Windows XP operating system expires in April 2014. Support for Windows Server 2003
and Windows Server 2003 R2 expires in July 2015.

You can install the Hyper­V integration services components on an operating system by accessing the Virtual Machine
Connection window, and then in the Action menu, clicking the Insert Integration Services Setup Disk item. You then can
install the relevant operating­system drivers, either manually or automatically, and can enable the following virtual machine
integration components:

• Operating system shutdown. Allows the server running Hyper­V to initiate a graceful shutdown of the guest virtual
machine.

• Time synchronization. Allows the virtual machine to use the virtualization server’s processor for the purpose of time
synchronization.

• Data exchange. Allows the server running Hyper­V to write data to the registry of the virtual machine.
[Link] 14/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Heartbeat. Allows Hyper­V to determine if the virtual machine has become unresponsive.

• Backup (volume checkpoint). Allows the Volume Shadow Copy Service (VSS) provider to create checkpoints of the
virtual machine for the purposes of backup operation, without interrupting the virtual machine’s normal operations.

Enhanced Session Mode service

Hyper­V uses the Virtual Machine Connection program to connect to virtual machines by using Remote Desktop Protocol
(RDP). Until Windows Server 2012 R2, Virtual Machine Connection provided only basic redirection of the virtual machine
screen, keyboard, and mouse, similar to how a Keyboard Video Mouse switch over IP does. Versions of Virtual Machine
Connection prior to Windows Server 2012 R2 provided limited copy­and­paste functionality, supporting copying and pasting
text only and no other content, such as graphics or files. You could configure and use Remote Desktop on a virtual machine,
which would allow you to have a richer experience. However, this required that the virtual machine have network
connectivity and use an available Remote Desktop connection on the virtual machine. Additionally, the Windows client
operating system supports only one Remote Desktop connection.

Windows Server 2012 R2 includes an improved version of Virtual Machine Connection, and provides support for Enhanced
Session Mode. This functionality has specific requirements. For example, the Hyper­V host policy must allow Enhanced
Session Mode, and you can use an enhanced session only with virtual machines that are running supported operating systems.
When using enhanced session mode, you get a considerably better experience and the same features as Remote Desktop
Services (RDS), but without requiring the virtual machine to have network connectivity or to use the Remote Desktop
functionality of the guest operating system. With enhanced session mode, you can redirect local drives, printers, USB, and
other devices to the virtual machine, and you can use a shared Clipboard, redirected folders, rich copy and paste for copying
files or graphics, and redirected sound from virtual machines.

Because enhanced session mode depends on the presence of RDS in the virtual machine, it is available only when the virtual
machine is running a supported operating system. Currently, the only supported operating systems are Windows 8.1 and
Windows Server 2012 R2.

Enhanced session mode establishes a special Remote Desktop session over VMBus. This special Remote Desktop session is
available to you even when the virtual machine is not connected to the virtual switch, and when you connect to virtual
machines that are running on a local or remote Hyper­V host.

When you use enhanced session mode for connecting to virtual machines, you have access to the entire Remote Desktop
experience. This includes configuring the parameters of a session that you can save for future connections to the same virtual
machine. You can also sign in to the virtual machine in enhanced session mode, while when you use simple mode, you can
connect to the virtual machine without having to sign in. If the virtual machine is running, you can use enhanced session
mode or simple mode to connect to it. However, if the virtual machine is not on, you can connect to it only by using simple
mode.

You configure enhanced session mode at three different levels:

• Hyper­V host level. On the Hyper­V host level, you configure Enhanced Session Mode Policy, which controls if the
Hyper­V host allows enhanced session mode connections to virtual machines that are running on this server. It is
configured in Hyper­V settings.

• User settings level. At the user settings level, you configure enhanced session mode, which controls whether the Virtual
[Link] 15/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Machine Connection attempts to use enhanced session mode when establishing connections with virtual machines. It is
configured in Hyper­V settings.

• Machine level. On the virtual machine level, you can control whether to enable Guest Services Integration Service. In other
words, you control whether to allow the virtual machine to offer enhanced session mode. Furthermore, the operating system
in a virtual machine must support enhanced session mode, which means that it must be either Windows 8.1 or Windows
Server 2012 R2.

In addition, all users who connect using enhanced session mode must have Remote Desktop connection permissions. You
enable this by editing virtual machine properties.

Configuring Virtual Machine Start and Stop Actions

You can use virtual machine start and stop actions to ensure that critical virtual machines always start automatically
whenever a server that is running Hyper­V restarts, and that they are shut down gracefully if the server receives a shutdown
command. When you configure the virtual machine start and stop actions, you select the steps that the server running Hyper­
V will perform on specific virtual machines when the physical server starts or shuts down. You configure startup and
shutdown settings for each virtual machine by editing the properties of the virtual machine.

Automatic Start Options

You can configure the following options in the Automatic Start Actions window:

• Nothing. The virtual machine does not start automatically when the server that is running Hyper­V starts, even if the
virtual machine was in a running state when the server shut down.

• Automatically start if it was running when the service stopped. The virtual machine restarts if it was running when the
server that is running Hyper­V received the command to shut down, or if the virtual machine was running when the server
suffered a failure that caused it to power off.

• Always start this virtual machine automatically. The virtual machine always starts when the server that is running Hyper­V
starts. You can configure a startup delay to ensure that multiple virtual machines do not attempt to start up at once.

Automatic Stop Options

You can configure the following options in the Automatic Stop Actions window:

[Link] 16/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Save the virtual machine state. This option saves the active state of the virtual machine to disk, including memory, when
the server receives a shutdown command. This makes it possible for the virtual machine to restart when the server that is
running Hyper­V restarts.

• Turn off the virtual machine. The virtual machine is turned off when the server receives a shutdown command. Data may be
lost when this happens.

• Shut down the guest operating system. The virtual machine is shut down in a graceful manner when the server receives a
shutdown command. This option is available only if integration services components are installed on the virtual machine.

Note: You can configure virtual machine automatic start and stop actions by using the Windows PowerShell
cmdlet Set­VM with the AutomaticStartAction and AutomaticStopAction parameters.

Hyper­V Resource Metering

Resource metering allows you to track the resource use of virtual machines that are hosted on Windows Server 2012 servers
that have the Hyper­V role installed.

Resource metering provides you with a way to measure the following parameters on individual Hyper­V virtual machines:

• Average CPU use.

• Average physical memory use, including:

o Minimum memory use.

o Maximum memory use.

• Maximum disk space allocation.

• Incoming network traffic for a network adapter.

• Outgoing network traffic for a network adapter.

By measuring how much of these resources each virtual machine uses, an organization can bill departments or customers
based on how much resources their virtual machines use, rather than charging a flat fee per virtual machine. An organization
with only internal customers can also use these measurements to see patterns of use and plan future expansions. You perform

[Link] 17/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

resource metering tasks from a Windows PowerShell command­line interface by using the following cmdlets:

• Enable­VMResourceMetering. Starts collecting data on a per virtual machine basis.

• Disable­VMResourceMetering. Disables resource metering on a per virtual machine basis.

• Reset­VMResourceMetering. Resets virtual machine resource metering counters.

• Measure­VM. Displays resource metering statistics for a specific virtual machine.

Note: There is no graphical user interface (GUI) tool that you can use to perform resource metering.

Additional Reading: For more information about resource metering for Hyper­V, refer to “Hyper­V Resource
Metering Overview” at [Link]

What’s New with Hyper­V in Windows Server 2012 R2

The Hyper­V role in Windows Server 2012 R2 includes a large number of improvements and new features that were not
available in Windows Server 2012.

New Features in Windows Server 2012 R2 Hyper­V

The Hyper­V role in Windows Server 2012 R2 includes a large number of improvements and new features that were not
available in Windows Server 2012. The following table lists new features in Windows Server 2012 R2 Hyper­V.

Feature Description

Shared virtual hard disk You can use this feature to cluster virtual machines by using shared virtual hard disk (.vhdx format) files.

Automatic virtual machine activation You can configure this feature to activate virtual machines automatically on computers that are running the
Datacenter edition of Windows Server 2012 R2.

Enhanced session mode You can use this feature to provide support for redirection of an increased number of local resources
including audio, printers, clipboard, display configuration, smart cards, USB devices and supported Plug and
Play devices.

Storage quality of service You can use this feature to specify maximum and minimum I/O loads in terms of I/O operations per second
on a per virtual hard disk basis.

[Link] 18/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Virtual machine generation You can use this feature to provide support for generation 1 and generation 2 virtual machines.

Improved features in Windows Server 2012 R2 Hyper­V

The following table lists improved features in Windows Server 2012 R2 Hyper­V.

Feature Improvement

Resize virtual hard disk This feature allows you to resize virtual hard disks while the virtual machine is running.

Live migration This feature provides improved performance, including compression of virtual machine RAM and cross­
version live migration between Windows Server 2012 and Windows Server 2012 R2 Hyper­V.

Failover Clustering This feature provides virtual network adapter protection and virtual machine storage protection.

Integration Services This feature provides the ability to copy files to a virtual machine without using a network connection or
having to shut down the virtual machine.

Export This feature allows you to export a virtual machine with all checkpoints or a single virtual machine
checkpoint while the virtual machine is running.

Replica This feature supports extended replication and configurable replication frequency.

Linux support This feature provides support for Linux virtual machine backup and for VMs running Linux to support
dynamic memory.

Management This feature provides support for managing Hyper­V on Windows Server 2012 R2 from computers running
Windows® 8 or Windows Server 2012.

Additional Reading: For more information, refer to “What’s New in Hyper­V in Windows Server 2012 R2” at
[Link]

Lesson 3: Managing Virtual Machine Storage

Hyper­V provides many different virtual machine storage options. By knowing which option is appropriate for a given
situation, you can help ensure that a virtual machine performs well. However, if you do not understand the different virtual
machine storage options, you may end up deploying virtual hard disks that consume unnecessary space, or that place an
unnecessary performance burden on the virtualization server.

In this lesson, you will learn about different virtual hard disk types, different virtual hard disk formats, and the benefits and
limitations of using virtual machine checkpoints.

Lesson Objectives
After completing this lesson, you should be able to:

• Describe the purpose of virtual hard disk.

• Explain how to create a virtual hard disk type.

• Explain how to manage virtual hard disks.

• Explain how to deploy differencing virtual hard disks to reduce storage needs.

[Link] 19/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Explain how to use virtual machine checkpoints.

What Is a Virtual Hard Disk?

A virtual hard disk is a file that represents a traditional hard disk drive that you can configure as a virtual hard disk with
partitions and an operating system. You can use virtual hard disks on virtual machines, and you can mount virtual hard disks
as local volumes using the Windows Server 2008 R2, Windows Server 2012, and Windows 8, and Windows 7 operating
systems.

Windows Server 2012 supports boot from virtual hard disk. This enables you to configure a computer to boot into a Windows
Server 2012 operating system that is deployed on a virtual hard disk, or into certain editions of the Windows 8 operating
system that are deployed on a virtual hard disk. You can create a virtual hard disk by using:

• The Hyper­V Manager console.

• The Disk Management console.

• The DiskPart ([Link]) command­line tool.

• The Windows PowerShell cmdlet New­VHD.

Note: Some editions of Windows 7 and Windows Server 2008 R2 also support booting from virtual hard disk.

Virtual Hard Disks in .vhd Format vs. Virtual Hard Disks in .vhdx Format

Virtual hard disks traditionally use the .vhd extension. Windows Server 2012 introduces a new type of virtual hard disk
which uses the .vhdx extension. Virtual hard disks with the .vhdx format have the following benefits over virtual hard disks
that were used in Hyper­V on Windows Server 2008 and Windows Server 2008 R2:

• Virtual hard disks with the .vhdx format can be as large as 64 TB, whereas virtual hard disks with the .vhd format are
limited to 2 TB.

• Virtual hard disks with the .vhdx format are less likely to become corrupt if the virtualization server suffers an unexpected
power outage.

[Link] 20/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• The .vhdx format supports better alignment when deployed to a large sector disk.

• Virtual hard disks with the .vhdx format can hold larger dynamic and differencing virtual hard disks. This provides for
better performance from the dynamic and differencing virtual hard disks.

You can convert a virtual hard disk with the .vhd format to the .vhdx format by using the Edit Virtual Hard Disk Wizard; you
may want to do this if you have upgraded a Windows Server 2008 or Windows Server 2008 R2 virtualization server to
Windows Server 2012 or Windows Server 2012 R2. You can also convert a virtual hard disk with the .vhdx format to the .vhd
format.

SMB Share Support

Windows Server 2012 supports storing all virtual machine files, including virtual hard disks on Server Message Block (SMB)
3.0 file shares. This is an alternative to storing these files on Internet SCSI (iSCSI) or Fibre Channel SAN devices. When
creating a virtual machine in Hyper­V on Windows Server 2012, you can specify a network share when you choose the virtual
hard disk location or when you attach an existing virtual hard disk. The file share must support SMB 3.0. This means that you
must place virtual hard disks on file shares that are hosted on file servers with Windows Server 2012. Older versions of
Windows Server do not support SMB 3.0.

Additional Reading: For more information about virtual hard disk formats, refer to “Hyper­V Virtual Hard Disk
Format Overview” at [Link]

IDE vs. SCSI Adapters

You can connect virtual hard disks to virtual machines by using two different virtual storage­controller types: IDE or SCSI.
When you connect a virtual machine to an IDE controller, the virtual disk is accessed as an Advanced Technology
Attachment (ATA) device. When you connect it to a SCSI controller, the virtual disk is accessed as a SCSI device. The
following table describes the difference between the two options.

IDE controllers SCSI controllers

• Available only in generation 1 virtual machines. • Available in both generation 1 and generation 2 virtual machines.

• A virtual machine can have two IDE controllers. • A virtual machine can have up to 4 SCSI controllers.

• Each IDE controller supports a maximum of two connected IDE • Each SCSI controller supports up to 64 attached devices.
devices (disks or virtual DVD drives).
• Can add or remove SCSI devices while a virtual machine is running.
• You cannot add or remove devices from an IDE controller when a
virtual machine is running. • Generation 2 virtual machines can boot only off a device that is
attached to a SCSI controller.
• Generation 1 virtual machines can boot locally only off a device that
is connected to an IDE controller.

Although there are differences in performance when you use an IDE or SCSI controller in a host virtual machine, these
differences are not apparent when you use virtualized IDE or SCSI controllers.

[Link] 21/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Shared Virtual Hard Disks with Windows Server 2012 R2

Windows Server 2012 R2 allows you to configure shared virtual hard disks. A shared virtual hard disk is a virtual hard disk
that connects to multiple virtual machines. You can use shared virtual hard disks only for hard disks that are in .vhdx format
and that connect to virtual SCSI controllers. Shared virtual hard disk files are stored on failover clusters, either on a Cluster
Shared Volume (CSV) on block storage or on an SMB 3.0 scale­out file server.

QoS Management

Virtual hard disks in Windows Server 2012 R2 support the configuration of quality of service (QoS) parameters. When you
configure the QoS parameters, you can specify the maximum number of input/output operations (IOPS) for the virtual disk,
which minimizes the chance that a single virtual hard disk will consume the majority of the IOPS capacity of the underlying
storage. You also can configure a virtual hard disk to trigger an alert if the number of IOPS falls below a threshold value. IOPS
are measured in 8­kilobyte (KB) increments. You cannot configure storage QoS when you are using shared virtual hard disks.

Additional Reading:
• For more information about virtual hard disk sharing, refer to [Link]

• For more information about the storage quality of service for Hyper­V, see refer to
[Link]

Creating Virtual Disk Types

When you configure a virtual hard disk, you can choose between several different disk types, including fixed, dynamic, and
direct­attached storage.

Creating Fixed Virtual Hard Disks

When you create fixed virtual hard disks, all of the hard disk space that you specify is allocated during the creation process.
This minimizes fragmentation, which improves virtual hard disk performance if the disk is on a traditional storage device,
such as a nonsolid­state device. Allocating all of the specified hard disk space during the

creation process does have a disadvantage. In many situations, you do not know precisely how much disk space a virtual
machine needs, and you might allocate space that is not required.

Note: Disk fragmentation is less of an issue when you host virtual hard disks on RAID volumes or on SSDs. Hyper­
V improvements since its introduction in Windows Server 2008 also minimize the performance differences between

[Link] 22/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

dynamic and fixed virtual hard disks.

To create a fixed virtual hard disk, perform the following procedure:

1. Open the Hyper­V Manager console.

2. On the Actions pane, click New, and then click Hard Disk.

3. On the Before You Begin page of the New Virtual Hard Disk Wizard, click Next.

4. In the New Virtual Hard Disk Wizard, on the Choose Disk Format page, click either VHD or VHDX, and then click
Next.

5. On the Choose Disk Type page, click Fixed size, and then click Next.

6. On the Specify Name and Location page, enter a name for the virtual hard disk, and then specify a folder in which to
host the virtual hard disk file.

7. On the Configure Disk page, choose one of the following options:

o Create a new blank virtual hard disk of the specified size.

o Copy the contents of a specified physical disk. Use this option to replicate an existing physical disk on the server
as a virtual hard disk. The fixed virtual hard disk will be the same size as the physical disk. Replicating an existing
physical hard disk does not change the data on that disk.

o Copy the contents of a specified virtual hard disk. With this option, you can create a new fixed hard disk based on
the contents of an existing virtual hard disk.

Note: You can create a new fixed hard disk by using the New­VHD Windows PowerShell cmdlet, with
the ­Fixed parameter.

Dynamically Expanding Virtual Hard Disks

When you create a dynamically expanding virtual hard disks, you specify a maximum size, but the disk uses only the space
that it needs and grows as necessary. You can create a dynamically expanding virtual hard disk with the .vhd format or the
.vhdx format. A new dynamically expanding virtual hard disk with the .vhd format is allocated approximately 260 KB. A
new dynamically expanding virtual hard disk with the .vhdx format is allocated approximately 4,096 KB.

As you save files to a dynamically expanding virtual hard disk, it grows. However, if you delete files from a dynamically
expanding virtual hard disk, it does not shrink. The only method you can use to shrink a dynamically expanding virtual hard
disk file is to perform a compact operation.

To create a dynamically expanding virtual hard disk, you follow the steps for creating a fixed virtual hard disk shown above,
with the exception that, on the Choose Disk Type page (in step 5), you click Dynamically Expanding instead of Fixed Size.

Note: You can create a new dynamic hard disk using the New­VHD Windows PowerShell cmdlet with the ­
Dynamic parameter.

[Link] 23/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Direct­attached Storage

Virtual machines can access a physical disk drive by using direct­attached storage, also termed pass­through disks. You can
use direct­attached storage to connect a virtual machine directly to an iSCSI logical unit number (LUN). When you use direct­
attached storage, the virtual machine must have exclusive access to the target disk. To ensure this, you must take the disk
offline.

You can attach direct­attached storage by performing the following procedure:

1. Ensure that the target hard disk is offline. If it is not, then use the Disk Management console on the virtualization server
to take it offline.

2. Use the Hyper­V Manager console to edit the existing virtual machine’s properties.

3. Click an IDE or SCSI controller, click Add, and then click Hard Drive.

4. In the Hard Drive dialog box, click Physical Hard Disk. From the drop­down menu, select the disk that you want to
use as direct­attached storage.

Note: If you connect direct­attached storage to a virtual machine’s SCSI controller, then you do not have to
shut down the virtual machine. If you want to connect to a virtual machine’s IDE controller, then you must
first shut down the virtual machine.

Question: Why might you consider using fixed virtual hard disks instead of dynamically expanding virtual hard
disks?

Question: In what situations might you encounter difficulties if you use dynamically expanding disks?

Managing Virtual Hard Disks

From time to time, you need to perform maintenance operations on virtual hard disks. For example, you might want to convert
a virtual hard disk to another format as your needs change, or you might want to compact a virtual hard disk to free up space.
You can perform the following maintenance operations on virtual hard disks:

• Convert the disk from fixed to dynamic

[Link] 24/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Convert the disk from dynamic to fixed

• Convert a virtual hard disk in .vhd format to .vhdx format

• Convert a virtual hard disk in .vhdx format to .vhd format

• Compact a dynamically expanding virtual hard disk

• Expand a dynamically expanding virtual hard disk

• Expand a fixed virtual hard disk

Converting a Disk

When you convert a virtual hard disk, the contents of the existing virtual hard disk are copied to a newly­created virtual hard
disk. For example, when you convert a fixed virtual hard disk to a dynamically expanding virtual hard disk, this creates a new
dynamic disk, the contents of the fixed disk are copied to the new dynamic disk, and then the fixed disk is deleted.

To convert a virtual hard disk from fixed to dynamic or from dynamic to fixed, perform the following procedure:

1. In the Hyper­V Manager console, from the Actions pane, click Edit Disk.

2. In the Edit Virtual Hard Disk Wizard, on the Before You Begin page, click Next.

3. On the Local Virtual Hard Disk page, click Browse, and then select the virtual hard disk that you want to convert.

4. On the Choose Action page, click Convert, and then click Next.

5. On the Convert Virtual Hard Disk page, choose between the VHD and the VHDX formats.

6. On the Convert Virtual Hard Disk page, choose between Fixed Size and Dynamically Expanding. Additionally, if
you want to convert the hard disk type, choose the appropriate type, and then click Next.

7. On the Configure Disk page, choose the destination location for the disk.

Changing the Size of a Disk

You can compact a dynamically expanding virtual hard disk that is not using all of its allocated space. However, you cannot
compact a fixed virtual hard disk without first converting it to a dynamically expanding virtual hard disk. You can expand
both dynamically expanding virtual hard disks and fixed virtual hard disks.

You can use one of two methods to change the size of a virtual hard disk. They are:

• Use the Windows PowerShell cmdlets resize­partition and resize­vhd.

• In the Edit Virtual Hard Disk Wizard, select either the Compact or the Expand option.

Windows Server 2012 R2 is the first version in which you can resize a virtual hard disk while the virtual machine is still
active.

[Link] 25/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Reducing Storage Needs with Differencing Virtual Hard Disks

Differencing virtual hard disks are separate virtual hard disks that record the changes made to a parent disk. You can use
differencing virtual hard disks to reduce the amount of hard disk space that virtual hard disks consume. This increases disk
performance by reducing the space that the virtual hard disks use. Differencing virtual hard disks work well with SSDs. They
also work well where the available space on the parent volume is limited and the disk performance compensates for the
performance drawbacks of using a differencing virtual hard disk.

You can link multiple differencing virtual hard disks to a single parent disk. However, if you modify the parent disk, the links
to all of the differencing virtual hard disks fail.

You can reconnect a differencing virtual hard disk to the parent using the Inspect Disk tool, which is available in the Actions
pane of the Hyper­V Manager console. You can also use the Inspect Disk tool to locate the parent disk of a differencing
virtual hard disk.

You can create a differencing virtual hard disk by using the Hyper­V Manager console or by using the New­VHD Windows
PowerShell cmdlet.

To create a differencing virtual hard disk using the Hyper­V Manager console, perform the following procedure:

1. Open the Hyper­V Manager console.

2. In the Actions pane, click New, and then click Hard Disk.

3. In the New Virtual Hard Disk Wizard, on the Before You Begin page, click Next.

4. On the Choose Disk Format page, click VHD, and then click Next.

5. On the Choose Disk Type page, click Differencing, and then click Next.

6. On the Specify Name and Location page, provide the location of the parent hard disk.

To create a differencing virtual hard disk by using the New­VHD Windows PowerShell cmdlet, follow the pattern of the
following example. To create a new differencing virtual hard disk named c:\diff­[Link], which uses the virtual hard disk
c:\[Link], use the following Windows PowerShell command:

New-VHD c:\[Link] -ParentPath C:\[Link]

[Link] 26/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Using Checkpoints

A checkpoint is a static image of the data on a virtual machine at a given moment. Checkpoints are stored in either .avhd or
.avhdx format, depending on the virtual hard disk format. You can create a checkpoint of a virtual machine from the Action
menu of the Virtual Machine Connection window or from the Hyper­V Manager console. Each virtual machine can have a
maximum of 50 checkpoints. Prior to Windows Server 2012 R2, checkpoints were known as snapshots.

You can create checkpoints at any time, even when a virtual machine is off. When you create a checkpoint of a running
virtual machine, the checkpoint includes the contents of the virtual machine’s memory.

When creating checkpoints of multiple virtual machines that are part of the same group, for example a virtual domain
controller and virtual member server, you should create these checkpoints simultaneously. This ensures that items such as
computer account passwords are the same on all of the checkpoints.

Remember that when you revert to a checkpoint, you are reverting to a computer’s state at that point in time. If you revert a
virtual machine back to a point before it had performed a computer password change with a domain controller, you need to
rejoin that computer to the domain or run the netdom resetpwd command.

Checkpoints vs. Backups

Checkpoints are not a replacement for backups. Checkpoints are stored on the same volume as the virtual hard disks. If that
volume fails, both the checkpoints and the virtual hard disk file are lost.

Exporting Checkpoints

You can perform a virtual machine export of a checkpoint. When you do this, Hyper­V creates full virtual hard disks that
represent the virtual machine’s state at the point in time that the checkpoint was instantiated. If you choose to export an entire
virtual machine, all checkpoints associated with the virtual machine are exported.

Differencing Virtual Hard Disk Files

When you create a checkpoint, Hyper­V writes differencing virtual hard disk (.avhd, or .avhdx) files, which store the data that
differentiates the checkpoint from the previous checkpoint, or from the parent virtual hard disk. When you delete checkpoints,
Hyper­V discards this data or merges it back into the previous checkpoint or parent virtual hard disk. For example:

• If you delete the most recent checkpoint, Hyper­V discards the data. Hyper­V in Windows Server 2012 reclaims this space

[Link] 27/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

immediately rather than when the virtual machine shuts down.

• If you delete the second­most recent checkpoint, Hyper­V merges the data so that the earlier and latter checkpoint states of
the virtual machine retain their integrity.

Managing Checkpoints

When you apply a checkpoint, the virtual machine reverts to the configuration it had when the checkpoint was created.
Reverting to a checkpoint does not delete any existing checkpoints. When you apply a checkpoint after you make a
configuration change in a different checkpoint, you are prompted to create another checkpoint. However, it is only necessary
to create a new checkpoint if you want to return to that current configuration.

It is possible to create checkpoint trees that have different branches. For example, consider this scenario: You create a
checkpoint of a virtual machine on Monday, on Tuesday, and on Wednesday. On Thursday, you apply the checkpoint you
created on Tuesday, and then you make changes to the virtual machine’s configuration.

In this scenario, the original branch is the series of checkpoints created on Monday, Tuesday, and Wednesday. You create a
new branch by applying the Tuesday checkpoint and then make changes to the virtual machine. Note that you can have
multiple branches, as long as you do not exceed the limit of 50 checkpoints per virtual machine.

Checkpoint Support

Many programs, such as Exchange Server and Microsoft SharePoint® Server, are not supported when you run them in virtual
machines used with checkpoints. These programs have interdependencies with roles and services that are outside the virtual
machine, such as AD DS. If you roll back the virtual machine that is hosting the program to an earlier point in time, and the
data in AD DS has been updated since that point, corruption can occur. You should check with the program vendor to
determine whether the vendor supports programs with virtual machine checkpoints.

Checkpoints are supported for domain controllers that are running Windows Server 2012 or Windows Server 2012 R2, as long
as the virtualization host is running Windows Server 2012, Windows Server 2012 R2, or a hypervisor that supports VM­
Generation ID.

Lesson 4: Managing Virtual Networks

Hyper­V provides several different options for network communication between virtual machines. You can configure virtual
machines that communicate with an external network in a manner that is similar to how traditionally deployed physical hosts
communicate. Additionally, you can configure virtual machines to communicate only with a limited number of other virtual
machines that are hosted on the same server. Knowing the options available for Hyper­V virtual networks ensures that you
can use those options to meet your organization’s needs.

Lesson Objectives
After completing this lesson, you should be able to:

• Describe virtual switches.

• Describe virtual local area networks (VLANs).

[Link] 28/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Describe virtual switch extensions.

• Explain how to manage a virtual machine media access control (MAC) address pool.

• Explain how to configure virtual network adapters.

• Describe advanced features of virtual network adapters.

• Describe NIC Teaming.

What Is a Virtual Switch?

A virtual switch is a virtual version of a network switch, and is new in Windows Server 2012. The term virtual switch replaces
the term virtual network, which was used in Windows Server 2008.

Virtual switches control how network traffic flows between multiple virtual machines that are hosted on the virtualization
server, and between virtual machines and the rest of the organizational network. You can manage virtual switches through the
Virtual Switch Manager, which is accessible through the Actions pane of the Hyper­V Manager console.

Hyper­V on Windows Server 2012 supports the following three different types of virtual switches:

• External. This type of switch maps a network to a specific network adapter or network adapter team. Windows Server 2012
supports mapping an external network to a wireless network adapter if you have installed the wireless local area network
(LAN) service on the virtualization server, and if the virtualization server has a compatible adapter.

• Internal. Internal virtual switches communicate between multiple virtual machines on the virtualization server, and
between the virtual machines and the virtualization server.

• Private. Private switches communicate only between multiple virtual machines on the virtualization server. You cannot use
private switches to communicate between the virtual machines and the virtualization server.

Additional Reading: For more information about virtual switches, refer to “Hyper­V Virtual Switch Overview” at
[Link]

What Are Virtual Local Area Networks?

[Link] 29/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

VLANs enable you to logically segment network traffic that is running on the same physical network. VLANs function as
separate broadcast domains. This means that hosts on another VLAN do not intercept and process a VLAN’s broadcast traffic.
This holds true even when those hosts are connected to the same hardware switch. Each VLAN has an identification (ID) that
is encapsulated within an Ethernet frame.

You can assign VLAN IDs to Hyper­V virtual switches and network adapters. To use VLANs with Hyper­V virtual switches
and network adapters, the host’s physical network adapters must support VLAN tagging. This feature must be enabled on the
network adapter. When you configure VLAN IDs for Hyper­V, you need to configure the VLAN ID on the virtual switch or
on each individual virtual machine’s network adapter. You do not need to configure the VLAN ID on the host’s physical
network adapter.

Hyper­V supports the 802.1q specification for VLAN trunking. VLAN IDs that you use with virtual switches and virtual
network adapters also can be used with networking equipment that supports these standards. This means that you can have
the same VLAN span multiple Hyper­V hosts when connected to compatible network equipment.

You might implement VLANs with Hyper­V switches and virtual network adapters to support the following scenarios:

• Isolate network storage traffic. You can isolate network storage traffic such as iSCSI traffic from other traffic. Using VLANs
means that a separate storage network might not be required.

• Isolate cluster traffic. You can isolate intra­node cluster traffic from other traffic.

• Security isolation. You can isolate hosts from each other for security reasons. For example, you can make some virtual hosts
available to Network Access Protection (NAP) clients that have been placed on an isolated VLAN. This ensures that they
can remediate their configuration to a healthy state.

Configuring VLAN IDs

When configuring a virtual network, you can configure a VLAN ID that is associated with the network. This enables you to
extend existing VLANs on the external network to VLANs within the virtualization server’s network switch. VLANs enable
you to partition network traffic, and they function as separate logical networks. Note that traffic can only pass from one
VLAN to another if it passes through a router.

You can configure the following extensions for each virtual switch type:

• Microsoft NDIS Capture. This extension allows the capture of data that is traversing across the virtual switch.

[Link] 30/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

• Microsoft Windows Filtering Platform. This extension allows the filtering of data that is traversing across the virtual
switch.

Virtual Switch Extensions

Virtual switch extensions enable third­party vendors to create virtual switches that you can add to Hyper­V that add
monitoring, filtering, and forwarding functionality. Some vendors have created virtual editions of their hardware switches.

You can manage these virtual switches by using the same management suite that you use to manage the physical switches.
This enables an organization’s networking team to extend switch management across both the virtual and the physical
infrastructure.

The following table lists the available virtual switch extensions.

Extension Purpose

Network packet inspection Examine network packets while they traverse the virtual switch.

Network packet filter Create, filter, and modify packets that traverse the virtual switch.

Network forwarding Create a forwarding extension for each virtual switch.

Intrusion detection or firewall Filter and modify TCP/IP packets, monitor or authorize connections, filter IPsec traffic, and filter
remote procedure calls.

Consult third­party vendor catalogs to determine which virtual switches are available to run on the Hyper­V platform.

Additional Reading: For more information about virtual switch extensions, refer to “Hyper­V Virtual Switch
Overview” at [Link]

Managing Virtual Machine MAC Addresses

[Link] 31/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Unless you specify a static MAC address, Hyper­V dynamically allocates an address to each virtual machine network adapter
from a pool of MAC addresses. You can configure the address range of this pool from the MAC Address Range setting of the
Virtual Switch Manager console. By default, a server that is running Hyper­V has a pool of 255 MAC addresses.

When virtual machines use private or internal networks, the MAC address that you allocate to network adapters is not likely
to be of concern, because the server that is running Hyper­V ensures that duplicate MAC addresses are not assigned to
different virtual machines. However, when you have multiple servers that are running Hyper­V and are hosting virtual
machines that use adapters connected to external networks, you should ensure that each server uses a different pool of MAC
addresses. This ensures that separate servers that connect to the same network do not assign the same MAC addresses to the
virtual machines that they host.

When virtual machines are allocated IP addresses through a Dynamic Host Configuration Protocol (DHCP) reservation, you
should consider using static MAC addresses. A DHCP reservation ensures that a particular IP address always is allocated to a
specific MAC address.

You can configure the MAC address range by performing the following procedure:

1. Open the Hyper­V Manager console.

2. Select the Hyper­V host that you wish to configure.

3. On the Actions pane, click Virtual Switch Manager.

4. Under Global Network Settings, click MAC Address Range.

5. Specify a minimum and a maximum range for the MAC address.

MAC addresses are in hexadecimal format. When configuring ranges for multiple Hyper­V hosts, you should consider
changing the values of the second from the last pair of digits. The following table displays examples of ranges for multiple
Hyper­V hosts.

Hyper­V host MAC address range

Host 1 Minimum: 00­15­5D­0F­AB­00 Maximum: 00­15­5D­0F­AB­FF

Host 2 Minimum: 00­15­5D­0F­AC­00 Maximum: 00­15­5D­0F­AC­FF

Host 3 Minimum: 00­15­5D­0F­AD­00 Maximum: 00­15­5D­0F­AD­FF

[Link] 32/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Configuring Virtual Network Adapters

Virtual network adapters allow the virtual machine to communicate using the virtual switches that you configure in the
Virtual Switch Manager console. You can edit the properties of a virtual machine to modify the properties of a network
adapter. From the Network Adapter pane on the virtual machine’s Settings dialog box, you can configure the following:

• Virtual Switch. You configure to which virtual switch the network adapter connects.

• VLAN ID. You specify a VLAN ID that the virtual machine uses for communication that

passes through this adapter.

• Bandwidth Management. You allocate a minimum and a maximum bandwidth for the adapter. Hyper­V reserves the
minimum bandwidth allocation for the network adapter, even when virtual network adapters on other virtual machines are
working at capacity.

Both synthetic network adapters and legacy network adapters support the following advanced features:

• MAC address allocation. You can configure a MAC address to be assigned from the MAC address pool, or you can
configure the network adapter to use a fixed MAC address. You can also configure MAC address spoofing. This is useful
when the virtual machine needs to provide specific network access, such as when the virtual machine is running a mobile
device emulator that requires network access.

• DHCP Guard. This feature drops DHCP messages from virtual machines that are functioning as unauthorized DHCP
servers. This may be necessary in scenarios where you are managing a server running Hyper­V that hosts virtual machines
for others, but does not have direct control over the configuration of those virtual machines.

• Router Guard. This feature drops router advertisement and redirection messages from virtual machines that are configured
as unauthorized routers. This may be necessary in scenarios where you do not have direct control over the configuration of
virtual machines.

• Port Mirroring. This feature allows you to copy incoming and outgoing packets from a network adapter to another virtual
machine that you have configured for monitoring.

• NIC Teaming. This feature allows you to add the virtual network adapter to an existing team on the server running Hyper­
V.

Legacy network adapters emulate common network adapter hardware. You use legacy network adapters in the following

[Link] 33/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

situations:

• You want to support a network boot­installation scenarios for virtual machines. For example, you want to deploy an
operating system image from a Windows Deployment Services (Windows DS) server or through Configuration Manager.

• You need to support operating systems that do not support integration services and do not have a driver for the synthetic
network adapter.

Legacy network adapters do not support the hardware acceleration features that synthetic network adapters support. You
cannot configure a virtual machine queue, IPsec task offloading, or single root I/O virtualization (SR­IOV) for legacy network
adapters. The next topic covers these advanced features.

Network Adapter Advanced Features

In addition to the features described earlier, synthetic network adapters support the following advanced features:

• Virtual Machine Queue. This feature uses hardware packet filtering to deliver network traffic directly to the guest. This
improves performance because the packet does not need to be copied from the management operating system to the virtual
machine.

Virtual Machine Queue requires that the host computer has a network adapter that supports this feature.

• IPsec task offloading. This feature enables the host’s network adapter to perform calculation­intensive security association
tasks. In the event that sufficient hardware resources are not available, the guest operating system performs these tasks. You
can configure a maximum number of offloaded security associations between 1 and 4,096. IP security (IPsec) task
offloading requires guest operating system support and network adapter support.

• SR­IOV. Single­root I/O virtualization (SR­IOV) enables multiple virtual machines to share the same Peripheral
Component Interconnect (PCI) Express physical hardware resources. If sufficient resources are not available, then network
connectivity falls back, and the virtual switch provides connectivity. SR­IOV requires that you install specific hardware
and special drivers on the guest operating system, and you may need to enable it in the computer BIOS.

• Virtual Receive Side Scaling (vRSS). vRSS enables network adapters to balance network processing load across the
processor cores assigned to a virtual machine. vRSS enables a virtual machine to process higher amounts of network traffic
than it could process if only a single CPU core was responsible for processing traffic. You can implement vRSS by
allocating a virtual machine multiple cores through the advanced network. To use vRSS, the host’s processor must support
Receive Side Scaling (RSS) and the host’s network adapters must support Virtual Machine Queue (VMQ).

[Link] 34/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

What Is NIC Teaming?

NIC Teaming allows you to combine up to 32 network adapters and then use them as a single network interface. NIC Teaming
provides redundancy, allowing network communication to occur over the combined network interface even when one or
more of the network adapters fail.

The combination of network adapters also increases the bandwidth available to the combined network interface. NIC
Teaming is a feature available in the Windows Server 2012 operating system that both the Hyper­V host and Hyper­V virtual
machines can use.

When used with virtual machines, NIC Teaming allows virtual machines to team virtual network adapters that connect to
separate virtual switches.

To get the benefit of NIC Teaming, the host must have at least two external virtual switches. When you have multiple virtual
network adapters attached to the same switch, if the physical network adapter that the virtual switch is connected to fails,
those virtual network adapters will lose connectivity. When configuring NIC Teaming for virtual machines, network adapters
connected to virtual switches can use SR­IOV.

Enable virtual machine NIC Teaming for virtual machines on the Advanced Features page of the virtual network adapter in
Hyper­V manager. You can also enable NIC Teaming for virtual machines by using the Set­VMNetworkAdapter Windows
PowerShell cmdlet. To enable NIC Teaming within the virtual machine operating system, you must enable NIC Teaming on
the virtual network adapter or configure the virtual network adapter to allow MAC address spoofing. Once you enable virtual
NIC Teaming on the virtual network adapter or enable MAC address spoofing, you can configure NIC Teaming within the
virtual machine.

A new feature of Windows Server 2012 R2 is dynamic NIC Teaming. In Windows Server 2012, new traffic is assigned to a
particular NIC, and the traffic flow remains with that NIC throughout the session. Dynamic NIC Teaming balances traffic flow
across all available NICs in a team.

Lab: Implementing Server Virtualization with Hyper­V

Scenario

Your assignment is to configure the infrastructure service for a new branch office.

To use the server hardware that is available currently at branch offices more effectively, your manager has decided that all

[Link] 35/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

branch office servers will run as virtual machines. You must now configure a virtual network and a new virtual machine for
these branch offices.

Objectives

After performing this lab, you should be able to:

• Install the Hyper­V role onto a server.

• Configure virtual networking.

• Create and configure a virtual machine.

• Use virtual machine checkpoints.

Lab Setup

Estimated Time: 70 minutes

Virtual machine 20410D­LON­HOST1

User name Administrator

Password Pa$$w0rd

Before beginning the lab, you must complete the following steps:

1. Reboot the classroom computer and from the Windows Boot Manager, select 20410D­LON­HOST1.

2. Sign in to LON­HOST1 with the Administrator account and the password Pa$$w0rd.

Exercise 1: Installing the Hyper­V Role onto a Server

Scenario

The first step in migrating to a virtualized environment for the branch office is installing the Hyper­V role on a new Windows
Server 2012 server.

The main tasks for this exercise are as follows:

1. Install the Hyper­V role onto a server.

2. Complete the Hyper­V role installation, and verify the settings.

Task 1: Install the Hyper­V role onto a server

[Link] 36/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

1. In Server Manager, click Local Server, and then configure the following network settings:

o IP Address: [Link]

o Subnet mask: [Link]

o Default gateway: [Link]

o Preferred DNS server: [Link]

2. Use the Add Roles and Features Wizard to add the Hyper­V role to LON­HOST1 with the following options:

o Do not create a virtual switch.

o Use the Default stores locations.

o Allow the server to restart automatically if required.

3. After a few minutes, the server restarts automatically. Ensure that you restart the machine from the boot menu as
20410D­LON­HOST1. The computer will restart several times.

Task 2: Complete the Hyper­V role installation, and verify the settings

1. Sign in to LON­HOST1 by using the account Administrator with the password Pa$$word.

2. When the installation of the Hyper­V tools completes, click Close.

3. Open the Hyper­V Manager console, and then click LON­HOST1.

4. Edit the Hyper­V settings of LON­HOST1, and then configure the following settings:

o Keyboard: Use on the virtual machine

o Virtual Hard Disks: C:\Users\Public\Documents\Hyper­V\Virtual Hard Disks

Results: After completing this exercise, you should have installed the Hyper­V role onto a physical server.

Exercise 2: Configuring Virtual Networking

Scenario

After installing the Hyper­V role on the new server, you need to configure the virtual network. You need to create a network
that connects to the physical network and a private network that you can use only for communication between virtual
machines. You will use the private network when you configure the virtual machines for high availability. You also need to
configure a specific range of media access control (MAC) addresses for the virtual machines.

The main tasks for this exercise are as follows:

1. Configure the external network.

[Link] 37/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

2. Create a private network.

3. Create an internal network.

4. Configure the MAC address range.

Task 1: Configure the external network

1. Open the Hyper­V Manager console, and then click LON­HOST1.

2. Use the Virtual Switch Manager to create a new External virtual network switch with the following properties:

o Name: Switch for External Adapter

o External Network: Mapped to the host computer’s physical network adapter. (This varies depending on the host
computer.)

Task 2: Create a private network

• In the Hyper­V Manager console use the Virtual Switch Manager to create a new virtual switch with the following
properties:

o Name: Private Network

o Connection type: Private network

Task 3: Create an internal network

• Use the Virtual Switch Manager to create a new virtual switch with the following properties:

o Name: Internal Network

o Connection type: Internal network

Task 4: Configure the MAC address range

• Use the Virtual Switch Manager to configure the following MAC Address Range settings:

o Minimum: 00­15­5D­0F­AB­A0

o Maximum: 00­15­5D­0F­AB­EF

Results: After completing this exercise, you should have configured virtual switch options on a physically deployed
Windows Server 2012 server that is running the Hyper­V role.

[Link] 38/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Exercise 3: Creating and Configuring a Virtual Machine

Scenario

You have been asked to deploy two virtual machines to LON­HOST1. You have copied a sysprepped virtual hard disk file
that hosts a Windows Server 2012 installation.

To minimize disk space use at the cost of performance, you are going to create two differencing virtual hard disk files based
on the sysprepped virtual hard disk. You then will use these differencing virtual hard disk files as the virtual hard disk files for
the new virtual machines.

The main tasks for this exercise are as follows:

1. Create differencing virtual hard disks.

2. Create virtual machines.

3. Enable resource metering.

Task 1: Create differencing virtual hard disks

1. Use File Explorer to create the following two folders:

o E:\Program Files\Microsoft Learning\Base\LON­GUEST1

o E:\Program Files\Microsoft Learning\Base\LON­GUEST2

Note: The drive letter may depend upon the number of drives on the physical host computer.

2. In the Hyper­V Manager console, create a virtual hard disk with the following properties:

o Disk Format: VHD

o Disk Type: Differencing

o Name: LON­[Link]

o Location: E:\Program Files\Microsoft Learning\Base\LON­GUEST1\

o Parent Location: E:\Program Files\Microsoft Learning\Base\ Base14A­[Link]

3. Open Windows PowerShell, and then execute the following command:

New-VHD "E:\Program Files\Microsoft Learning\Base\LON-GUEST2\[Link]"


-ParentPath "E:\Program Files\Microsoft Learning\Base\ [Link]"

4. Inspect the disk at E:\Program Files\Microsoft Learning\Base\LON­GUEST2\LON­[Link].

[Link] 39/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

5. Verify that LON­[Link] is configured as a differencing virtual hard disk with E:\Program Files\Microsoft
Learning\Base\ Base14A­[Link] as a parent.

Task 2: Create virtual machines

1. On LON­HOST1, in the Hyper­V Manager console, in the Actions pane, click New, and then click Virtual Machine.

2. Create a virtual machine with the following properties:

o Name: LON­GUEST1

o Location: E:\Program Files\Microsoft Learning\Base\LON­GUEST1\

o Generation: Generation 1

o Memory: 1024 MB

o Use Dynamic Memory: Yes

o Networking: Private Network

o Connect Virtual Hard Disk: E:\Program Files\Microsoft Learning\Base\LON­GUEST1 \lon­[Link]

3. Open Windows PowerShell, and then execute the following command:

New-VM -Name LON-GUEST2 -MemoryStartupBytes 1024MB -VHDPath "E:\Program


Files\Microsoft Learning\Base\LON-GUEST2\[Link]" -SwitchName "Private
Network"

4. Use the Hyper­V Manager console to edit the settings of LON­GUEST2 by configuring the following:

o Automatic Start Action: Nothing

o Automatic Stop Action: Shut down the guest operating system

Task 3: Enable resource metering

• At the Windows PowerShell prompt, enter the following commands:

Enable-VMResourceMetering LON-GUEST1
Enable-VMResourceMetering LON-GUEST2

Results: After completing this exercise, you should have deployed two separate virtual machines by using a sysprepped
virtual hard disk file as a parent disk for two differencing virtual hard disks.

[Link] 40/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Exercise 4: Using Virtual Machine Checkpoints

Scenario

You are in the process of developing a strategy to mitigate the impact of incorrectly applied change requests. As a part of this
strategy development, you are testing the speed and functionality of virtual machine checkpoints to roll back to a previously
existing stable configuration.

In this exercise, you will deploy Windows Server 2012 in a virtual machine. You then will create a stable configuration for
that virtual machine, and create a virtual machine checkpoint. Finally, you will modify the configuration, and roll back to the
checkpoint.

The main tasks for this exercise are as follows:

1. Deploy Windows Server 2012 in a virtual machine.

2. Create a virtual machine checkpoint.

3. Modify the virtual machine.

4. Revert to the existing virtual machine checkpoint.

5. View resource metering data.

Task 1: Deploy Windows Server 2012 in a virtual machine

1. Use the Hyper­V Manager console to start LON­GUEST1.

2. Open the Virtual Machine Connection Window, and perform the following steps to deploy Windows Server 2012 on the
virtual machine:

o On the Settings page, click Next to accept the Region and Language settings.

o On the Settings page, click I accept.

o On the Settings page, enter the password Pa$$w0rd twice, and then click Finish.

3. Sign in to the virtual machine by using the account Administrator and the password Pa$$w0rd.

4. Reset the name of the virtual machine to LON­GUEST1, and then restart the virtual machine.

Task 2: Create a virtual machine checkpoint

1. Sign in to the LON­GUEST1 virtual machine, and then verify that the name of the computer is set to LON­GUEST1.

2. Create a checkpoint of LON­GUEST1, and name the checkpoint Before Change.

Task 3: Modify the virtual machine

[Link] 41/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

1. Sign in to the LON­GUEST1 virtual machine, and use the Server Manager console to change the computer’s name to
LON­Computer1.

2. Reboot the virtual machine.

3. Sign in to the LON­GUEST1 virtual machine, and then verify that the server name is set to LON­Computer1.

Task 4: Revert to the existing virtual machine checkpoint

1. Use the Virtual Machine Connection window to revert the virtual machine.

2. Verify that the Computer Name of the virtual machine now is set to LON­GUEST1.

Task 5: View resource metering data

1. On LON­HOST1, issue the following command:

Measure-VM LON-GUEST1

2. Note the average central processing unit (CPU), average random access memory (RAM), and total disk use figures, and
then close Windows PowerShell.

Results: After completing this exercise, you should have used virtual machine checkpoints to recover from a virtual
machine misconfiguration.

Revert the virtual machines

After you finish the lab, restart the computer in Windows Server 2012 by performing the following steps:

1. On the taskbar, click the Windows PowerShell icon.

2. In the Windows PowerShell window, enter the following command, and then press Enter:

Shutdown /r /t 5

3. From the Windows Boot Manager, select Windows Server 2012.

Lab Review Questions

Question: What type of virtual network switch would you create if you want to allow the virtual machine to
communicate with the LAN that is connected to the Hyper­V virtualization server?

[Link] 42/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Question: How can you ensure that no single virtual machine uses all of the available bandwidth that the Hyper­V
virtualization server provides?

Question: What Dynamic Memory configuration task was not possible on previous versions of Hyper­V, but which
you can now perform on a virtual machine that is hosted on the Hyper­V role on a Windows Server 2012 server?

Module Review and Takeaways

Review Questions
Question: In which situations should you use a fixed memory allocation instead of Dynamic Memory?

Question: In which situations must you use virtual hard disks with the new .vhdx format, instead of virtual hard disks
with the old .vhd format?

Question: You want to deploy a Windows Server 2012 Hyper­V virtual machine’s virtual hard disk on a file share.
What operating system must the file server be running to support this configuration?

Best Practices

When implementing server virtualization with Hyper­V, use the following best practices:

• Ensure that the processor on the computer that will run Hyper­V supports hardware assisted virtualization.

• Ensure that you provision a virtualization server with adequate RAM. Having multiple virtual machines paging the hard
disk drive because they have inadequate memory decreases performance for all virtual machines on the server.

• Monitor virtual machine performance carefully. A virtual machine that uses a disproportionate amount of server resources
can reduce the performance of all other virtual machines that the same virtualization server is hosting.

Common Issues and Troubleshooting Tips

Common Issue Troubleshooting Tip

Cannot deploy Hyper­V on an x64


platform.

Virtual machine does not use Dynamic


Memory.

Tools

You can use the following tools with Hyper­V to deploy and manage virtual machines.

Name of tool Used for Where to find it

Sysinternals disk2vhd tool Use to convert physical hard disks to virtual hard disk format. Microsoft TechNet website.

[Link] 43/44
24/3/2016 Module 13: Implementing Server Virtualization with Hyper­V

Course Evaluation

Your evaluation of this course will help Microsoft understand the quality of your learning experience.

Please work with your training provider to access the course evaluation form.

Microsoft will keep your answers to this survey private and confidential and will use your responses to improve your future
learning experience. Your open and honest feedback is valuable and appreciated.

[Link] 44/44

Common questions

Powered by AI

Dynamically expanding virtual hard disks offer flexibility by allocating only the space needed as data grows, which is beneficial when managing storage resources. However, they require maintenance operations like compaction to optimize performance and free up space, as they do not shrink when data is deleted. Maintenance can be performed using a compact operation via Windows PowerShell cmdlets or the Edit Virtual Hard Disk Wizard .

Differencing virtual hard disks allow changes to be recorded separately from the parent disk, reducing the space that multiple virtual disks consume. This results in performance improvement as less overall storage is needed, which is particularly effective with SSDs. Additionally, it allows multiple virtual hard disks to operate from a single parent disk, optimizing space usage and performance .

Synthetic network adapters offer enhanced performance features such as Virtual Machine Queue, IPsec task offloading, and Single-Root I/O Virtualization (SR-IOV). These features reduce CPU overhead and improve network efficiency. They are preferable in scenarios where high network throughput and performance are required and when guest operating systems support these advanced features .

NIC Teaming aggregates multiple network adapters into a single interface, thus increasing bandwidth and providing redundancy. This ensures continuous network availability even if one or more adapters fail. For virtual machines, NIC Teaming allows them to utilize this increased bandwidth and redundancy, critical for environments requiring high availability and performance .

The server must have a 64-bit processor that supports hardware-assisted virtualization, such as Intel VT or AMD-V, a BIOS level setting to enable hardware-assisted virtualization, and a Data Execution Prevention (DEP) feature, such as Intel XD bit or AMD NX bit .

Hyper-V supports three types of virtual switches: External, Internal, and Private. External switches connect virtual machines to a physical network, Internal switches allow communication between virtual machines and the host server without reaching the outside network, and Private switches only enable communication among virtual machines on the same host without any involvement of outside network or the host .

Hyper-V provides a hypervisor layer that has direct access to the host server’s hardware, allowing both the host operating system and all virtual machines to access the hardware through this layer. In contrast, Microsoft Virtual Server 2005 R2 uses the virtualization server’s operating system to provide indirect access to the server’s hardware .

Fixed virtual hard disks provide consistent performance because the disk size is pre-allocated, which reduces overhead during runtime operations. They also minimize fragmentation and help ensure predictable storage use. Conversely, dynamically expanding disks start small and grow as data is added, which can lead to fragmentation and varied performance due to space allocation during writes .

Checkpoints capture the state of a virtual machine at a specific point in time, which, if used unwisely, can lead to data consistency issues, particularly in production environments. However, they are recommended for domain controllers in test and development environments, provided they run Windows Server 2012 or R2 on compatible virtualization hosts .

Single-Root I/O Virtualization (SR-IOV) allows multiple virtual machines to efficiently share PCI Express hardware, reducing latency and bypassing the software switch layer for direct hardware access. It requires compatible hardware, special drivers, and BIOS settings to be enabled. SR-IOV necessitates network adapter and guest OS support .

You might also like