Virtualization for DHCP and File Sharing
Virtualization for DHCP and File Sharing
Contents:
Module Overview
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 HyperV® 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 HyperV 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 HyperV role that Windows Server 2012 and Windows
Server 2012 R2 introduce.
Objectives
• Implement HyperV.
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 HyperV
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:
• 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 HyperV. These virtual machines are guests, while the computer that is running HyperV 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.
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 HyperV
This is a simplified example. In realworld environments, you must make adequate preparations before colocating virtual
machines. You have to ensure that the hardwareresource needs of all the virtual machines that the virtualization server is
hosting do not exceed the server’s hardware resources.
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.
• 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 selfservice 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 selfservice
portals with VMM and Microsoft System Center 2012 Service Manager.
[Link] 3/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
Windows Azure is a cloudbased 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.
Cloudbased 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.
Cloudbased virtual machines, programs, and services can be useful when you have to provide proofofconcept solutions for
proposed projects. Rather than purchase test hardware and deploy a proofofconcept solution to it, you can deploy a cloud
based virtual machine quickly, and then deploy the proofofconcept solution to that. Then, once you validate the proofof
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 proofofconcept solution, which you may opt to discard if
the project is not approved.
On cloudbased 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 cloudbased database server, and then host the database there.
For a successful cloudbased strategy, you must determine which services and programs are more economical to deploy on a
cloudbased 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 HyperV
Client HyperV
You can install the HyperV 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 HyperV, the HyperV feature in Windows 8 and Windows 8.1 operating systems, has slightly different processor
requirements than HyperV 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 HyperV on Windows Server 2012 and Windows Server 2012 R2, which does not require SLAT.
The Client HyperV role on Windows 8 and Windows 8.1 supports many of the features that are available with HyperV on
Windows Server 2012. However, it does not support Windows Server 2012 features such as virtual machine migration.
Additionally, Client HyperV 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.
In enterprise environments, Client HyperV 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
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 HyperV role.
• Ensuring regular backups occur for all client computers that are hosted on a single server.
[Link] 5/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
• 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 multitouch. To use RemoteFX, the HyperV 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 HyperV host, they must be identical.
Presentation Virtualization
• 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.
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 HyperV
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.
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 (AppV) uses the Microsoft Application
Virtualization Desktop Client, which is installed on the client. AppV is available as part of the Microsoft Desktop
Optimization Pack, and is not a native Windows Server 2012 role or feature.
• App Isolation. AppV 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 AppV 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 AppV 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.
Just as AppV 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 HyperV
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 AppV 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 AppV to another computer.
Understanding how HyperV works and how virtual machines function is critical to deploying server virtualization
effectively in a Windows Server 2012 network environment. This lesson discusses HyperV, and the hardware requirements
for deploying HyperV 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:
What Is HyperV?
HyperV 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 softwarevirtualization
[Link] 8/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
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 HyperV 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 HyperV 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 HyperV Manager console.
You can install the HyperV 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 HyperV 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 HyperV.
The server on which you plan to install the HyperV role must meet the following hardware requirements:
• The server must have an x64 platform that supports hardwareassisted virtualization and Data Execution Prevention (DEP).
• The server must have enough CPU capacity to meet the requirements of the guest virtual machines.
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 A virtual machine hosted on HyperV 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 HyperV
• 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), solidstate
drives (SSD), hybridSSD, 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 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 standalone computer you can configure various BIOSrelated parameters, and
similarly, on a virtual machine, you can configure some of the same parameters, including:
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.
• 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 HyperV
• 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.
• 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 “HyperV Virtual Fibre
Channel Overview” at [Link]
[Link] 11/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
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
virtualizationaware 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 virtualhardware devices found on
generation 1 virtual machines, and use only synthetic devices. BIOSbased 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 Preboot 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 sidebyside on the same HyperV 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 (64bit), and newer 64bit 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]
In the first release of HyperV 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 underallocate or overallocate 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 HyperV
Therefore, by using Dynamic Memory, you no longer have to guess how much memory a virtual machine requires. Instead,
you can configure HyperV 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 HyperV 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 SetVMMemory Windows PowerShell cmdlet.
Additional Reading: For more information about HyperV Dynamic Memory, refer to “HyperV Dynamic Memory
Overview” at [Link]
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 HyperV
Virtual machine guest operating systems that are supported by HyperV and that can use Integration Services include:
• CentOS 6.06.2
• CentOS 5.55.7
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 HyperV 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 operatingsystem drivers, either manually or automatically, and can enable the following virtual machine
integration components:
• Operating system shutdown. Allows the server running HyperV 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 HyperV to write data to the registry of the virtual machine.
[Link] 14/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
• Heartbeat. Allows HyperV 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.
HyperV 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 copyandpaste 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 HyperV 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 HyperV 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.
• HyperV host level. On the HyperV host level, you configure Enhanced Session Mode Policy, which controls if the
HyperV host allows enhanced session mode connections to virtual machines that are running on this server. It is
configured in HyperV 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 HyperV
Machine Connection attempts to use enhanced session mode when establishing connections with virtual machines. It is
configured in HyperV 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.
You can use virtual machine start and stop actions to ensure that critical virtual machines always start automatically
whenever a server that is running HyperV 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.
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 HyperV 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 HyperV 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 HyperV
starts. You can configure a startup delay to ensure that multiple virtual machines do not attempt to start up at once.
You can configure the following options in the Automatic Stop Actions window:
[Link] 16/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
• 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 HyperV 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 SetVM with the AutomaticStartAction and AutomaticStopAction parameters.
Resource metering allows you to track the resource use of virtual machines that are hosted on Windows Server 2012 servers
that have the HyperV role installed.
Resource metering provides you with a way to measure the following parameters on individual HyperV virtual machines:
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 HyperV
resource metering tasks from a Windows PowerShell commandline interface by using the following cmdlets:
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 HyperV, refer to “HyperV Resource
Metering Overview” at [Link]
The HyperV role in Windows Server 2012 R2 includes a large number of improvements and new features that were not
available in Windows Server 2012.
The HyperV 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 HyperV.
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 HyperV
Virtual machine generation You can use this feature to provide support for generation 1 and generation 2 virtual machines.
The following table lists improved features in Windows Server 2012 R2 HyperV.
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 HyperV.
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 HyperV 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 HyperV in Windows Server 2012 R2” at
[Link]
HyperV 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:
• Explain how to deploy differencing virtual hard disks to reduce storage needs.
[Link] 19/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
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:
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 HyperV 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 HyperV
• 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.
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 HyperV 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 “HyperV Virtual Hard Disk
Format Overview” at [Link]
You can connect virtual hard disks to virtual machines by using two different virtual storagecontroller 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.
• 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 HyperV
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 scaleout 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 8kilobyte (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 HyperV, see refer to
[Link]
When you configure a virtual hard disk, you can choose between several different disk types, including fixed, dynamic, and
directattached storage.
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 nonsolidstate 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 HyperV
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.
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 NewVHD Windows PowerShell cmdlet, with
the Fixed parameter.
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 NewVHD Windows PowerShell cmdlet with the
Dynamic parameter.
[Link] 23/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
Directattached Storage
Virtual machines can access a physical disk drive by using directattached storage, also termed passthrough disks. You can
use directattached 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.
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 HyperV 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 dropdown menu, select the disk that you want to
use as directattached storage.
Note: If you connect directattached 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?
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:
[Link] 24/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
Converting a Disk
When you convert a virtual hard disk, the contents of the existing virtual hard disk are copied to a newlycreated 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 HyperV 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.
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:
• 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 HyperV
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 HyperV 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 HyperV Manager console or by using the NewVHD Windows
PowerShell cmdlet.
To create a differencing virtual hard disk using the HyperV Manager console, perform the following procedure:
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 NewVHD 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:
[Link] 26/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
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 HyperV 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 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, HyperV 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.
When you create a checkpoint, HyperV 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,
HyperV 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, HyperV discards the data. HyperV in Windows Server 2012 reclaims this space
[Link] 27/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
• If you delete the secondmost recent checkpoint, HyperV 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.
HyperV 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 HyperV 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:
[Link] 28/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
• Explain how to manage a virtual machine media access control (MAC) address pool.
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 HyperV Manager console.
HyperV 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 “HyperV Virtual Switch Overview” at
[Link]
[Link] 29/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
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 HyperV virtual switches and network adapters. To use VLANs with HyperV 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 HyperV, 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.
HyperV 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 HyperV hosts when connected to compatible network equipment.
You might implement VLANs with HyperV 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 intranode 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.
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 HyperV
• Microsoft Windows Filtering Platform. This extension allows the filtering of data that is traversing across the virtual
switch.
Virtual switch extensions enable thirdparty vendors to create virtual switches that you can add to HyperV 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.
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.
Intrusion detection or firewall Filter and modify TCP/IP packets, monitor or authorize connections, filter IPsec traffic, and filter
remote procedure calls.
Consult thirdparty vendor catalogs to determine which virtual switches are available to run on the HyperV platform.
Additional Reading: For more information about virtual switch extensions, refer to “HyperV Virtual Switch
Overview” at [Link]
[Link] 31/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
Unless you specify a static MAC address, HyperV 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 HyperV 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 HyperV ensures that duplicate MAC addresses are not assigned to
different virtual machines. However, when you have multiple servers that are running HyperV 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:
MAC addresses are in hexadecimal format. When configuring ranges for multiple HyperV 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
HyperV hosts.
[Link] 32/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
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
• Bandwidth Management. You allocate a minimum and a maximum bandwidth for the adapter. HyperV 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 HyperV 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 HyperV
situations:
• You want to support a network bootinstallation 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 (SRIOV) for legacy network
adapters. The next topic covers these 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 calculationintensive 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.
• SRIOV. Singleroot I/O virtualization (SRIOV) 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. SRIOV 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 HyperV
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 HyperV host and HyperV 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 SRIOV.
Enable virtual machine NIC Teaming for virtual machines on the Advanced Features page of the virtual network adapter in
HyperV manager. You can also enable NIC Teaming for virtual machines by using the SetVMNetworkAdapter 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.
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 HyperV
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
Lab Setup
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 20410DLONHOST1.
2. Sign in to LONHOST1 with the Administrator account and the password Pa$$w0rd.
Scenario
The first step in migrating to a virtualized environment for the branch office is installing the HyperV role on a new Windows
Server 2012 server.
[Link] 36/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
1. In Server Manager, click Local Server, and then configure the following network settings:
o IP Address: [Link]
2. Use the Add Roles and Features Wizard to add the HyperV role to LONHOST1 with the following options:
3. After a few minutes, the server restarts automatically. Ensure that you restart the machine from the boot menu as
20410DLONHOST1. The computer will restart several times.
Task 2: Complete the HyperV role installation, and verify the settings
1. Sign in to LONHOST1 by using the account Administrator with the password Pa$$word.
4. Edit the HyperV settings of LONHOST1, and then configure the following settings:
Results: After completing this exercise, you should have installed the HyperV role onto a physical server.
Scenario
After installing the HyperV 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.
[Link] 37/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
2. Use the Virtual Switch Manager to create a new External virtual network switch with the following properties:
o External Network: Mapped to the host computer’s physical network adapter. (This varies depending on the host
computer.)
• In the HyperV Manager console use the Virtual Switch Manager to create a new virtual switch with the following
properties:
• Use the Virtual Switch Manager to create a new virtual switch with the following properties:
• Use the Virtual Switch Manager to configure the following MAC Address Range settings:
o Minimum: 00155D0FABA0
o Maximum: 00155D0FABEF
Results: After completing this exercise, you should have configured virtual switch options on a physically deployed
Windows Server 2012 server that is running the HyperV role.
[Link] 38/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
Scenario
You have been asked to deploy two virtual machines to LONHOST1. 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.
Note: The drive letter may depend upon the number of drives on the physical host computer.
2. In the HyperV Manager console, create a virtual hard disk with the following properties:
o Name: LON[Link]
[Link] 39/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
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.
1. On LONHOST1, in the HyperV Manager console, in the Actions pane, click New, and then click Virtual Machine.
o Name: LONGUEST1
o Generation: Generation 1
o Memory: 1024 MB
4. Use the HyperV Manager console to edit the settings of LONGUEST2 by configuring the following:
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 HyperV
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.
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, 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 LONGUEST1, and then restart the virtual machine.
1. Sign in to the LONGUEST1 virtual machine, and then verify that the name of the computer is set to LONGUEST1.
[Link] 41/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
1. Sign in to the LONGUEST1 virtual machine, and use the Server Manager console to change the computer’s name to
LONComputer1.
3. Sign in to the LONGUEST1 virtual machine, and then verify that the server name is set to LONComputer1.
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 LONGUEST1.
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.
After you finish the lab, restart the computer in Windows Server 2012 by performing the following steps:
2. In the Windows PowerShell window, enter the following command, and then press Enter:
Shutdown /r /t 5
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 HyperV virtualization server?
[Link] 42/44
24/3/2016 Module 13: Implementing Server Virtualization with HyperV
Question: How can you ensure that no single virtual machine uses all of the available bandwidth that the HyperV
virtualization server provides?
Question: What Dynamic Memory configuration task was not possible on previous versions of HyperV, but which
you can now perform on a virtual machine that is hosted on the HyperV role on a Windows Server 2012 server?
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 HyperV 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 HyperV, use the following best practices:
• Ensure that the processor on the computer that will run HyperV 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.
Tools
You can use the following tools with HyperV to deploy and manage virtual machines.
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 HyperV
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
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 .