Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Hyper-v Configuration
Guide
Darshana Jayathilake
http://darshana.wordpress.com
Table of Contents
Server Virtualization ..................................................................................................................................... 2
Hyper-V ......................................................................................................................................................... 2
Hyper-V Licensing.......................................................................................................................................... 2
Install and Configure Hyper-V ....................................................................................................................... 3
Hyper-v prerequisites ............................................................................................................................... 3
Lab 01-Install and configure Hyper-V ....................................................................................................... 4
Lab 02-Create virtual network/s ............................................................................................................. 17
Available settings on virtual network manager ...................................................................................... 19
Virtual Machines on Hyper-V ...................................................................................................................... 20
Lab 03-Creat virtual machine and install the operating system ............................................................. 21
Lab 04-Edit hardware configuration of virtual machine ......................................................................... 27
Available Virtual processor settings on Hyper-V .................................................................................... 28
Hyper-v Virtual Machine snapshot ............................................................................................................. 29
What is a snapshot .................................................................................................................................. 29
Hyper-v Disk Types .................................................................................................................................. 33
Lab 04-Add VHD to virtual machine........................................................................................................ 34
Lab 05-Add differencing disk to the VM ................................................................................................. 38
Server Virtualization
Server virtualization is host/installed several virtual machines on a one/more physical server using
specially designed software which is called as Hypervisor.
Hyper-V
Hyper-v is a native Hypervisor which is designed by Microsoft for virtualization. We can run several
operating systems such as Windows, Linux on top of a Hyper-V platform. Hyper-v 3.0 is the current
version of the Hypervisor. Also Hyper-v is one of the server roles in Windows 2008 64bit, Windows
2008R2 and Windows 2012/R2.
Hyper-V Licensing
Hyper-v isa free software on Microsoft product portfolio, but user have to purchase running virtual
machines in the Hyper-v server (Microsoft Operating systems and other commercial operating systems).
When the user purchasing Widows server operating systems, he will get some free Windows server
operating system licenses with it. Table 1.0 summarizes the Hyper-v licensing with MS windows
2008/2008R2/2012
Hyper-v prerequisites
Hardware-enforced Data Execution Prevention (DEP) must be available and be enabled. Specifically, you
must enable the Intel XD bit (execute disable bit) or AMD NX bit (no execute bit).
*Using Intel processor identifier utility we can easily find the availability of the above mentioned
features.
http://www.intel.com/p/en_US/support/highlights/processors/toolspiu
Lab 01-Install and configure Hyper-V
Task Steps
Enable Power up server
VT/AMD-V or Go to the bios by pressing the relevant key such as F9/F10
XD/NX bit on Enable required features
the server
Install Set the boot option on the server (Boot from the DVD)
operating
system on the Insert Windows 2012R2 DVD to the DVD ROM
server
Click on next button
Click on Install now button
Select I accept the license terms check box and click on next
Select custom: Install windows only
Create a partition for the operating system. (Minimum 32GB)
Rename the Right click on my computer and select properties and change the host name
computer
*Computer rename also can be done through PowerShell and netdom command.
Ex
Powershell
Netdom command
NetDom RenameComputer %computername% /NewName:srv01
Click on Manage
Select Add roles and Features and click on next
Click on next
Click on next
*Virtual network switches creation will be explained in a separate chapter
Click on next
From this window user can customize the default location of the virtual hard disks
and configuration files. After this configuration all
Select Restart the destination server automatically if required and click on install
Lab 02-Create virtual network/s
Task Steps
Create virtual
Switch Open server manager>Open tools>Select Hyper-V Manager
Select the server name from the Hyper - V manager>Select Virtual switch manager
from actions panel
Setting Description
External Creates a connection to a physical network
adapter so that virtual machines can access a
physical network.
Using Hyper-V as a platform we can create multiple virtual machines on a single physical hardware
components (Server/Servers). Hyper-v supports different operating systems which are listed as bellows.
Windows XP
Windows Vista
Windows 7
Windows 8
Windows 8.1
CentOS 5.5-5.9
CentOS 6.0-6.4
Red Hat Enterprise Linux 5.5, 5.8, 5.9, 6.0, 6.3, 6.5
Specify the name for virtual hard disks and assign a capacity. And click on Next
Click on Finish
To power up the virtual machine, users can right click on the virtual machine and
click on Start or click on click on Start button on right hand side.
The user can click on Connect button or option and get the virtual machine in a
separate window
Lab 04-Edit hardware configuration of virtual machine
Task Steps
Add/Remove Open Hyper-V manager>right click on the virtual machine, which we want to change
virtual the settings>Select Settings
processors
from the
virtual
machine
Select Processor from the left side (Available features will be described) and change
the number of virtual processors on the virtual machine
Available Virtual processor settings on Hyper-V
Setting Description
No of virtual Using this setting we can assign a no of cores for the virtual machine. Maximum no
processors will be equal to the maximum number of cores on a physical server. (Ex 24 cores, 16
cores)
Virtual How much of processing power will be reserved for this virtual machine.
Machine Ex
Reserve
In this example, I have allocated one virtual process and virtual machine reserve
50%. This means the physical server will reserve half of one core in physical server
will be always allocated for this virtual machine.
Virtual As a default setting this will be listed as 100.This is the maximum amount of
Machine Limit processing power that VM can be used. 100 means this virtual machine can use the
100% of the allocated processor resources (1 core)
Relative This setting is used for prioritizing the virtual machine processing. In case of
weight processor demanding with two or more virtual machines, we can configure
prioritizing for the virtual machines.
Hyper-v Virtual Machine snapshot
What is a snapshot
Hyper-v snapshot taking process is a capture data, hardware configuration and state of the running
virtual machine. Snapshots are mostly used in a test and development environments and snapshots are
stored in a .avhd files. Also snapshot/s are cause to reduce the performance of the vm.
Task Steps
Create a Open Hyper-V manager > Select Hyper-v host > Right click on the virtual machine >
snapshot Select CheckPoint
From the snapshot/checkpoint pane we can see the available
checkpoints/snapshots for the virtual machine.
VHD & VHDX is the hard disk formats of the Microsoft virtual machines. If the user wants to have more
than 2TB size disk file, he should use VHDX file. Otherwise he can continue with the VHD file. Also there
are four disk types are available in the Hyper-v
Dynamic Disks
When we are creating dynamic disk, we can mention the maximum capacity. But the actual size will be
depend on how much data is being stored on that particular volume.
As an example if we create 200GB dynamic disk but data is using only 50GB of space, which will only
consume 50GB from your physical HDD.
Fixed Disks
In fixed disks, space will be allocated the disk space from physical disks at creation time. This is the
recommended disk type for the production use.
Differencing Disk
Differencing disks are based on a one parent disk and all the changes are writing to the separate VHD.
This is very useful for testing and lab environments. Users can use share the same VHD with os for
multiple virtual machines. Also this is not recommend for the production environment.
Lab 04-Add VHD to virtual machine
Add Right click on the virtual machine> select Settings>Select IDE Controller
dynamic/fixed >select Hard Drive>click on Add
disk to the
virtual machine
*We can select ISCI controller also.If we are adding IDE drive, vm should
be in a poweroff mode
Click on New
Click on Next
SelectVHD orVHDX disk format. This will depend on the disk capacity
Select the disk type Dynamically expanding or Fixed size
Click on Finish
Lab 05-Add differencing disk to the VM
Select Differencing disk>click on Next
Click on Finish
Export & Import Virtual machines
Hyper-V vm export and import facility helps us to move virtual machine from one hyper-v host to
another hyper-v host. Also some times this vms are usefull as a backup.User can export vm/s to external
media such as usb drive or network location
Hyper-v replication allows us to replicate virtual machine data to the Hyper-v host in a same site or DR
site without having any shared storage. With server 2012 R2 we can configure the replication frequency
as well.
Task Steps
Replication Open Hyper-V Manager on both source and destination Hyper-v host > Select
virtual machine Hyper-v host > Hyper-V Settings
to Hyper-v
Host
Select Enable this computer as a replica server check box > Select User
Kerberos(HTTP):check box > Select Allow replication from any authenticated
server
From source Hyper-V host > right click on vm > select Enable Replication
Click on Next
Click on Next(from this location, we can exclude the vnd from replication also)
Select the frequency for vm replication
Select Maintain only the latest recovery point > Click on Next
Select Send initial copy over the network > Select Start replication
immediately
Click on Finish
Check he re Right click on the vm > Select Replication
Select Start the replica virtual machine after failover > Click Failover. Virtual
machine in the destination will be started after triggering this process.
Reverse Open Hyper-v manager connect destination host > Right click on the VM > Select
replication Replication > Select Reverse Repliction
from
destination
Click on Next
Select the server > Click on Next