0% found this document useful (0 votes)
31 views74 pages

Server 2019 Hyper V

Uploaded by

dereckvan01
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)
31 views74 pages

Server 2019 Hyper V

Uploaded by

dereckvan01
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
You are on page 1/ 74

Implementing Virtualization

with Hyper-V
Objectives
• Install the Hyper-V server role
• Create and use virtual machines
• Manage and configure virtual machines
• Work with Virtual Hard disks
• Configure Virtual Networks

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Installing Hyper-V (1 of 5)
• Virtualization terms:
– Virtual machine (VM) - the virtual environment that
emulates a physical computer’s hardware and BIOS
– Guest OS - an OS installed in a VM in the same way you
install an OS on a physical computer
– Host computer - physical computer on which VMs run
– Virtualization software - software for creating and managing
VMs and creating the virtual environment in which a guest
OS is installed

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Installing Hyper-V (2 of 5)
• Virtualization terms (continued):
– Hypervisor - creates and monitors the virtual hardware
environment
▪ There are two types of hypervisors: Type 1 and Type 2
– Virtual disk - consists of files on the host computer that
represent a virtual machine’s hard disk
– Virtual network - network configuration created by
virtualization software and used by VMs for physical and
virtual network communication
– Checkpoint - a partial copy of a VM made at a particular
moment

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Installing Hyper-V (3 of 5)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Installing Hyper-V (4 of 5)
• System requirements to install and use Hyper-V:
– Windows Server 2022 Standard or Datacenter Edition installed
– A 1.4 GHz or faster 64-bit CPU with virtualization extensions
– A CPU that supports Data Execution Prevention (DEP) and
second-level address translation (SLAT)
▪ SLAT is called EPT on Intel processors and NPT on AMD
processors
– Virtualization support must be turned on in the BIOS
– Enough free disk space to hold the OS you’re going to install
as a VM
– Enough RAM to equal the minimum amount required for
Windows Server 2019 plus the OS to install on VM

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Installing Hyper-V (5 of 5)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Installing the Hyper-V Role and
Management Tools
• When you install the Hyper-V role from Server Manager, you are
prompted to install the management tools
– Which you should do if you will be managing Hyper-V from the
same server that is running Hyper-V
• To install Hyper-V from PowerShell, use the cmdlet:
– Install-WindowsFeature Hyper-V –IncludeManagementTools
• If you will be managing Hyper-V remotely, you can install just the
management tools on the management computer using the
cmdlet:
– Install-WindowsFeature RSAT-Hyper-V-Tools

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Hyper-V Licensing
• Windows Server 2019 with Hyper-V includes licenses for
virtual instances of Windows Server 2016 with the Standard
and Datacenter editions:
– Standard Edition includes two licenses for a virtual
instance of Windows Server 2019
– Datacenter Edition includes licenses for unlimited virtual
instances of Windows Server 2019

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating Virtual Machines in
Hyper-V (1 of 2)
• In Hyper-V Manager, all tasks related to creating and managing
virtual machines are listed in the Actions pane
• Hyper-V VMs consist of these files stored on the Hyper-V server:
– Configuration file
– Virtual hard disk files
• In addition, you might also find the following types of files
associated with a VM:
– Differencing or checkpoint files
– Saved state files

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating Virtual Machines in
Hyper-V (2 of 2)
• The process of creating a VM:
1. Start the New Virtual Machine Wizard in Hyper-V Manager
2. Give the new VM a descriptive name
3. Choose a location for the VM
4. Choose a generation 1 or generation 2 VM
5. Assign the amount of memory the VM requires
6. Configure networking
7. Create a virtual hard disk
8. Install an OS

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Basic Virtual Machine Management
with Hyper-V Manager (1 of 4)
• A running VM does not require using Hyper-V Manager
• You do need Hyper-V Manager to configure and manage a
VM’s properties
– Or access it locally
• Connect to a VM by using any of the following:
– Right-click the VM and click Connect
– Double-click the VM
– Select the VM and double-click its screenshot
– Select the VM and click Connect in the Action menu

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Basic Virtual Machine Management
with Hyper-V Manager (2 of 4)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Basic Virtual Machine Management
with Hyper-V Manager (3 of 4)
• The Virtual Machine Connection console has the following toolbar
icons:
– Ctrl + Alt + Delete - sends that keystroke to the VM
– Start - starts the VM
– Turn Off - turns off the VM
– Shut Down - sends a signal to the OS to perform a shutdown
– Save - saves the VM’s state
– Pause - pauses the VM
– Reset - resets the VM
– Checkpoint - creates a checkpoint of a VM
– Revert (reverts to a VM’s checkpoint)
– Enhanced session (changes the session mode to enhanced)
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Basic Virtual Machine Management
with Hyper-V Manager (4 of 4)
• Some tasks you can perform with other menus:
– File - Access the VM’s settings and exit the VM
– Action - Perform all the actions on the toolbar
– Media - Specify .iso file options
– Clipboard - copy a screenshot of the VM to the Clipboard
– View - toggle the display of the toolbar
– Help - Get help on various topics related to the Virtual
Machine Connection console

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Advanced VM Creation Methods (1 of 3)
• VMs can be created by using other methods besides the
New Virtual Machine Wizard:
– Importing an exported VM
– Copying the virtual disk
– Converting a physical machine to a virtual machine

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Advanced VM Creation Methods (2 of 3)
• Exporting VMs
– VMs can be exported and then imported to create one or
more VMs
– This feature allows you to back up a VM without shutting it
down first
▪ You can export a VM while it’s running
– After a VM is exported, it can be moved to archival storage
as a backup, imported on another server running Hyper-V,
or imported on the same server
– To export a VM using PowerShell, use the Export-VM
VMName -Path C:\ExportVMs cmdlet replacing VMName
and C:\ExportVMs with the name of the VM to export and
the path where the files should be exported
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Advanced VM Creation Methods (3 of 3)
• Importing VMs
– You can import a VM that hasn’t been exported first
– If your Hyper-V host suffers a hardware or software failure
you can move the hard disk containing VMs to another
host and import them in place
– Three options for the type of import:
▪ Register the virtual machine in-place
▪ Restore the virtual machine
▪ Copy the virtual machine
– To import a VM using PowerShell, use the Import-VM -
ImportType -Path PathtoVM cmdlet where -ImportType
is either -Register to register the VM in place or -Copy to
restore the VM and use the existing unique ID
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Copying a Virtual Disk (1 of 2)
• The result of a copy is similar to an export/import, but the
procedure is different:
1. Copy the virtual hard disk from an existing VM to a new
folder or rename the copied file
2. Create a VM with the New Virtual Machine Wizard, but
in the Connect Virtual Hard Disk window, select the
“Use an existing virtual hard disk” option
• The only real difference between this method and the
export/import method is that in this method, you must
create the virtual machine and can change the VM name
and configuration in the New Virtual Machine Wizard

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Copying a Virtual Disk (2 of 2)
• Converting a Physical Machine to a Virtual Machine
– Hyper-V has no built-in tools to create a VM from a
physical computer
– Other tools available to do this:
▪ Microsoft System Center Virtual Machine Manager
(SCVMM)
▪ A free utility called disk2vhd that can be downloaded
– Runs on the physical server and creates a virtual
hard disk file from the disk on the physical server

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Generation 1 and Generation 2
VMs (1 of 2)
• When creating a new VM, you have the option of creating a
generation 1 or generation 2 V
• Generation 2 VMs have enhanced capabilities and support for
newer standards:
– Unified Extensible Firmware Interface (UEFI) firmware instead
of traditional PC BIOS
– Device support
– Network boot with IPv6
– VHDX-only support
– GPT boot
– Disk expansion
– Reduced attack surface
– Secure boot
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Generation 1 and Generation 2
VMs (2 of 2)
• Converting a generation 1 VM to a generation 2 is possible, but:
– You can’t use a generation 2 VM on Hyper-V versions before
Windows Server 2012 R2
– Generation 2 VMs only support Windows 8 or Windows Server
2012 and later guest OSs

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Managing Virtual Machines
• Additional features you can use to manage and configure
the virtual environment:
– Virtual machine hardware settings
– Integration Services
– Checkpoints
– Automatic start and stop actions
– Enhanced Session mode

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (1 of 12)
• BIOS and Firmware Settings
– The BIOS settings for a generation 1 VM enable you to
change the order in which the VM’s BIOS searches for
boot devices
▪ Click a device in the Startup order list box and click the
up or down arrows to change its order
– On a generation 2 VM, the hardware category is Firmware
instead of BIOS
▪ You can enable the Secure Boot feature and set the
boot order

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (2 of 12)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (3 of 12)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (4 of 12)
• Security
– In the Security settings of a VM, you can enable or
disable Secure Boot (generation 2 VMs only) and
enable encryption support

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (5 of 12)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (6 of 12)
• Memory Allocation
– When you create a VM, you can configure the amount
of memory it’s allocated from the host computer
– You can change the amount at any time later
– The amount of memory you allocate must take into
account other VMs running simultaneously, and enough
memory left over for the host server
– Windows Server 2019 running Hyper-V needs about
800 MB RAM plus 32 MB for each running VM that has
been assigned up to 1 GB RAM

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (7 of 12)
• Dynamic Memory
– Dynamic Memory - a Hyper-V feature that allows an
administrator to set startup, minimum, and maximum
memory allocation values for each VM
– Hyper-V adjusts the memory allocation for a VM up or
down, based on its actual memory needs
▪ Between the minimum and maximum value you specify
– Dynamic Memory isn’t enabled by default
▪ You enable it by choosing Memory in the VM’s settings

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (8 of 12)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (9 of 12)
• Hot Add Memory
– Hot add and remove memory - the addition of memory or
removal of memory while the VM is running
– This feature is supported only on VMs running Windows
10 or Windows Server 2016 guest OSs and some
distributions of Linux
– The VM configuration version must be version 8 or higher,
so VMs created in earlier versions of Hyper-V will not
support this feature until you upgrade the configuration

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (10 of 12)
• Smart Paging
– Smart paging - a Hyper-V feature that uses a file on the
host computer for temporary memory storage when a
sudden surge in memory requirements exceeds the
physical amount of memory available
▪ Works with Dynamic Memory
– No configuration is needed for smart paging other than its
location on the host
▪ Which is C:\ProgramData\Microsoft\Windows\Hyper-V
by default

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (11 of 12)
• Virtual Processor Settings
– Virtual processor - the virtual representation of a physical
processor or processor core residing on the host that can
be assigned to a virtual machine
– You can adjust how many virtual processors are assigned
to the VM
▪ Up to the total number of physical processors or
processor cores installed on the host computer
– The “Resource control” section specifies how host
resources are allocated to the VM

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Virtual Machine Hardware
Settings (12 of 12)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Integration Services (1 of 3)
• Integration Services - provides enhanced drivers for the
guest OS and improves performance and functionality for:
– IDE and SCSI storage devices
– Network interfaces
– Mouse and video devices
• The storage controller and network interface drivers included
in Integration Services are called synthetic drivers and are
optimized for use in Hyper-V
• Emulated drivers (referred to as legacy drivers) are used
when Integration Services is not installed

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Integration Services (2 of 3)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Integration Services (3 of 3)
• Integration Services offers additional services:
– Operating system shutdown
– Time synchronization
– Data exchange
– Heartbeat
– Backup (volume checkpoint)
– Guest services

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Checkpoints (1 of 5)
• Checkpoints can be used to revert a VM to a previous state
• Starting with Windows Server 2016, Hyper-V now has two types of
checkpoint:
– Standard checkpoint – original type of checkpoint that captures
the state of a virtual machine, including the running state
▪ Standard checkpoints should only be used in development
and testing, not on production VMs
– Production checkpoint - supported for production virtual
machines and uses backup technology in the guest OS to
create the checkpoint
▪ Production checkpoints do not save the running state of a
virtual machine, but they can be created while the VM is
running

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Checkpoints (2 of 5)
• Managing Checkpoints
– You can create up to 50 checkpoints per VM
– When you create a checkpoint, either two or three files are
created:
▪ Configuration file
▪ Automatic virtual hard disk
▪ Saved state file
– Be aware of some issues with checkpoint storage:
– Checkpoints are stored on the host system’s volume by default
so you might want to relocate the folder to a different disk
– After a checkpoint is created for a VM, you can’t change the
checkpoint location for that VM
– You should always use Hyper-V Manager to delete checkpoints
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Checkpoints (3 of 5)
• Managing Checkpoints
– Be aware of some issues with checkpoint storage (continued):
– If you create a standard checkpoint while a VM is running, the
amount of space required for the checkpoint includes the amount
of memory allocated to the VM
– Checkpoints decrease a VM’s disk performance
– Checkpoints must be deleted before expanding a disk
– Checkpoints can’t be used with pass-through or differencing disks

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Checkpoints (4 of 5)
• Reverting to and Applying Checkpoints
– Two ways to use a saved checkpoint:
▪ Revert - returns the VM to its state when the most recent
checkpoint was taken
▪ Apply - allows you to select the checkpoint to apply

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Checkpoints (5 of 5)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Automatic Start and Stop Actions (1 of 3)
• Use automatic start and stop actions to specify how a VM should
behave when the host computer starts and shuts down
• Options for automatic start actions:
– Nothing
– Automatically start if it was running when the service stopped
– Always start this virtual machine automatically
– Startup delay
• Options for automatic stop actions:
– Save the virtual machine state
– Turn off the virtual machine
– Shut down the guest operating system

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Automatic Start and Stop Actions (2 of 3)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Automatic Start and Stop Actions (3 of 3)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Enhanced Session Mode (1 of 4)
• Enhanced Session mode - a feature that improves interaction
and device redirection between the host computer and the VM
Connection console
• An enhanced session offers:
– Audio redirection
– Printer redirection
– USB devices and smart cards
– Drives
– Some plug-and-play devices
– Display configuration
– Copy and paste of Clipboard data, files, and folders

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Enhanced Session Mode (2 of 4)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Enhanced Session Mode (3 of 4)
• Enabling Enhanced Session Mode
– To use Enhanced Session mode, you must enable it in
Hyper-V Manager and on the guest OS
– Verify the following:
▪ Remote Desktop Services must be running on the guest
OS
▪ You must log on to the guest OS with an account that’s a
member of the local Administrators or remote Desktop
Users group
• To enable Enhanced Session mode using PowerShell, use the
Set-VMHost -EnableEnhancedSessionMode $true cmdlet on
the Hyper-V host
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Enhanced Session Mode (4 of 4)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Hyper-V Virtual Machine Movement

• To get the most out of VMs using multiple Hyper-V hosts, you
need to be able to move VMs and VM storage quickly and easily
from one host to another with limited service disruption
• Several methods of doing this
• Hyper-V replica
• Live Migration
• Quick Migration
• Storage Migration
• VM import / export
Hyper-V Replica

• A replica periodically replicas changes in a VM to a mirror VM on


another Hyper-V host
• The source and destination server must be running the same version
of Windows Server
• Steps to configure replication:
• Enable replication on the Hyper-V server to receive the replicated VMs
• Select the authentication method
• Specify the servers that can replicate to this server and storage locations
• Configure firewall rules to allow replication
- Create a new inbound firewall rule on the replication server that enables the
predefined Hyper-V Replica HTTP listener (TCP-IN) rule,

• Configure each VM you want to replicate


Hyper-V Live Migration

• Live migration is a feature that enables an administrator to move


a VM from one Hyper-V server to another
• Before you can use live migrations:
• Two or more servers running Hyper-V
• The same processor manufacturer – both servers must be
running intel or AMD for example
• The name of the virtual switches must be the same
• VM’s to be migrated must be using virtual hard disks and no
passthrough disks
• Needs to be enabled on your Hyper-V Server
Working with Virtual Hard Disks
• Virtual hard disks can be one of three types:
– Fixed size - recommended when the VM needs to run
disk-intensive applications
– Dynamically expanding - somewhat slower than fixed-
size disks but unless the VM is running disk-intensive
applications, dynamically expanding disks are a good
choice
– Differencing - uses a parent/child relationship where the
parent is a dynamically expanding or fixed disk and the
child is a differencing disk

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating and Modifying Virtual
Disks (1 of 5)
• Virtual disks can be created when a VM is created or with the
New Virtual Hard Disk Wizard
• You will need to choose the format from the following options:
– VHD – original virtual disk format and provides backward
compatibility
– VHDX – default option, supporting virtual disks up to 64 TB
– VHD Set – a shared virtual hard disk used with VM cluster
configurations when multiple VMs have access to the same
virtual hard disk for fault tolerance and load-balancing
applications
• You will also need to choose the disk type and specify a name for
the virtual disk file and the location on the host where it is stored

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating and Modifying Virtual
Disks (2 of 5)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating and Modifying Virtual
Disks (3 of 5)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating and Modifying Virtual
Disks (4 of 5)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating and Modifying Virtual
Disks (5 of 5)
• Virtual disks can be created when a VM is created or with the
New Virtual Hard Disk Wizard
– Are created in a default location unless you specify a
different path
• You can modify certain aspects of a virtual disk in the Edit Virtual
Hard Disk Wizard:
– Compact
– Convert
– Expand
– Merge
– Reconnect

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Pass-Through Disks (1 of 2)
• Pass-through disk - a physical disk attached to the host that’s
placed offline so that it can be used by a VM instead of or in
addition to a virtual disk
• A pass-through disk has modest performance advantages
over virtual disks
– But it lacks the flexibility of virtual disks
• An advantage of pass-through disks over VHD disks:
– VHD disks are limited to 2 TB

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Pass-Through Disks (2 of 2)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
External Virtual Switches (1 of 3)
• External virtual switch - binds a virtual switch to one of the
host’s physical network adapters
– Allows VMs to access a LAN connected to the host
• Only one external switch can be created per physical
network adapter
• You use an external virtual switch when external computers
must have direct access to the VM
– Or when the VM must have access to external network
resources
• Having more than one physical NIC installed on the host
computer is recommended
– If you’re using external virtual switches
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
External Virtual Switches (2 of 3)
• You can dedicate one of the NICs to host communication
and the other NIC can be bound to external virtual switches
• When a NIC is designated for use in an external virtual
switch, Windows binds the Hyper-V Extensible Virtual
Switch protocol to the physical NIC and unbinds all other
protocols

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
External Virtual Switches (3 of 3)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Internal Virtual Switches (1 of 2)
• Internal virtual switch - allows virtual machines and the
host computer to communicate with one another but doesn’t
give VMs access to the physical network
– An internal switch isn’t bound to any of the host’s
physical NICs
• A virtual switch is created, but it’s internal to Hyper-V and
can’t be seen on the host computer
• The new virtual NIC attempts to get an address via DHCP,
but because it doesn’t have a connection to the physical
network, it’s assigned an APIPA address
• Used when devices on the physical network don’t need
direct access to the VMs and vice versa
© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Internal Virtual Switches (2 of 2)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Private Virtual Switches (1 of 2)
• Private virtual switch - similar to an internal switch except
that the VMs connected to the private virtual switch can’t
communicate with the host computer
• Creating a private virtual switch doesn’t create a network
connection on the host computer
• A private virtual switch is used when you want to isolate the
VMs connected to the network from all outside communication
– You might use this setup as a domain testing environment
or a development network

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Private Virtual Switches (2 of 2)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Communicating between Hyper-V
Switches (1 of 2)
• What if you want to isolate VMs in their own private network,
but you want them to be able to access other private
networks or an external network?
• You can do this in two different ways:
– Create an external and a private virtual switch, then
configure one VM with two NICs
– Create an internal virtual switch and enable routing on
the host machine so that it routes between the internal
and physical switches

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Communicating between Hyper-V
Switches (2 of 2)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating a Virtual Switch (1 of 3)
• Create a virtual switch in Hyper-V Manager by clicking Virtual
Switch Manager in the Actions pane
– You can edit an existing virtual switch or create a new one
– Choose External, Internal, or Private and click Create
• In the Virtual Switch Properties window, give the virtual switch
a name
• You will have the following options for configuring the switch:
– Connection type
– VLAN ID

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating a Virtual Switch (2 of 3)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Creating a Virtual Switch (3 of 3)

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.
Adding and Removing Virtual
Network Interface Cards(1 of 2)
• Once you have your virtual switches created, you can
configure the VM’s to connect to them
• You need to create at least one virtual network interface card
(vNIC) on a VM.
• A vNIC is created when you create a VM and you have the
option to attach it to a virtual switch.
• You can also add vNIC’s to a VM after it is created

© 2018 Cengage. May not be copied, scanned, or duplicated, in whole or in part, except for use as permitted in a license distributed with a
certain product or service or otherwise on a password-protected website for classroom use.

You might also like