3. Server Manager Interface
Hyper-V Pool
Hyper-V
server pool
Right click for
server tools and
Hyper-V Manager
Quick glance at
each host’s status
Performance
counters expose
host performance
Roles and
Features
Best Practices
Analyzer
9. Virtual
Switches
12
• Installed at time of installation of Hyper-V role or,
• Installed and managed through Virtual Network Manager
• Three types
– External Virtual Network
– Internal Virtual Network
– Private Virtual Network
• Layer 2 device
– Dynamically “Learns” Port to MAC Mappings
– Does not implement Layer 3
• VLAN options available (covered in Advanced Networking)
10. External Virtual
Switch
• Allows a guest VM to
communicate to other VMs
and to systems outside of the
host.
• Recommended to have a
dedicated physical Network
Adapter.
• Each VM communicates
through a virtual adapter.
13
Virtual Switch
VM1 VM2
Physical
NIC
Virtual
Adapters
11. • The physical NIC communicates with the
virtual switch using the Hyper-V
Extensible Virtual Switch protocol.
• All other protocols are disabled,
including IPv4.
14
External Virtual
Switch
Virtual Switch Protocol
Virtual Switch
VM1 VM2
Physical
NIC
12. External Virtual
Switch
• The option to allow the management
OS to share the network adapter was
added in Windows 2008 R2.
• When you enable this option you are
creating a vEthernet adapter that
shows up in ncpa.cpl.
• The virtual NIC name will consist of
‘vEthernet’ plus the vSwitch name.
• Windows 2008 non-R2 shared the
network adapter, and the only way to
“unchecked” the setting was to
disable the Virtual Network adapter.
15
With Allow management OS
to share…
13. External Virtual Switch
16
With Allow management OS to share…
• The virtual NIC that was created
for the management OS will
include the typical protocol
bindings.
• The physical NIC still only includes
the Hyper-V Virtual Switch
protocol.
Virtual NIC
Physical NIC
14. Internal
Network • Allows a VM to communicate to
the Parent Partition (the host
OS) and other VMs on the same
host.
• A vEthernet adapter is created
on the parent.
• Not bound to a physical NIC
• Communication to outside the
parent partition has to use NAT.
18
Not externally connected
Virtual Switch
VM1 VM2
Host
OS
15. Private Network • Allows VMs to only communicate
to VMs on the same host.
• Host is not able to communicate
with the VM directly.
• Used to isolate virtual machines
from network traffic in the
management operating system
and external networks.
• Private Networks do not show up
in the Network Connections of
the Parent Partition.
20
Virtual Switch
VM1 VM2
16. Virtual Switch Summary
22
Virtual Switch
VM1 VM2
Physical
NIC
Host • Physical NIC uses Hyper-V Virtual
Switch protocol.
• vEthernet is created for the host OS.
Virtual Switch
VM1 VM2
Physical
NIC
Virtual Switch
VM1 VM2
Host
Virtual Switch
VM1 VM2
External w/
Management
Connection
Enabled
External
Internal
Private
• Physical NIC uses Hyper-V Virtual
Switch protocol.
• Management OS has no connection
to the VMs.
• No external connection (except
through NAT).
• vEthernet is created for the host OS.
• No external network connection.
• No network connection to the host
OS.
17. Virtual Network
Adapters
• Attached to a virtual
machine in the VM
Settings console
• Two types
– Legacy Network Adapter
– Network Adapter
• VLAN options available
(covered in Advanced
Networking)
23
Virtual Switch
VM
Virtual Network
Adapter
18. Legacy Network
Adapter
• Emulated network adapter
– Emulation happens in the hypervisor layer
– Does not use the VSC or VMBus
– Slower than a synthetic adapter
• Looks like a Intel/DEC 21140 Fast
Ethernet Adapter (100mbps)
• Works with most operating systems
without installing a driver because
the driver is included with most
operating systems
• Supports PXE Boot
• Not supported in Windows 2003
x64, Windows XP x64
24
19. Network Adapter
• Synthetic Driver
– Uses VSP to VSC communication over
the VMBus
• Microsoft Hyper-V Network
Adapter.
• Looks like a 10Gbps connection
on the status menu
– Where supported (XP shows a slower
speed)
• Features added in Windows
Server 2008 R2
– Jumbo Frame Support
– TCP Chimney Support
• Features in Server 2012
– TCP Chimney Support removed
– SRIOV
– Extensible Switches
25
24. Virtual Machine Storage Options
• VHD Files
– Located on Host system
– Located Remote from the system (iSCSI, FC)
– NAS technically works – but not supported
• Pass-Through disk
– Located on Host system
– Located Remote from the system (iSCSI, FC)
• iSCSI
– Guests can use the MS Software iSCSI Initiator to attach to iSCSI LUNs
31
25. Virtual Hard Disk (VHD)
• A self contained single file
• Easy to migrate from one machine to another
• Five types of VHDs
– Fixed Hard Disk
– Dynamically expanding hard disk
– Differencing hard disk
– Automatic virtual hard disk (Snapshots)
– Undo hard disk (not used by Hyper-V)
• Must be stored on a NTFS file system to provide the security
access controls VHDs require
• Maximum size: 2040GB / Minimum size: 8MB
• Maximum size for .vhdx is 64Tb, can be stored on NTFS or ReFS
32
26. Snapshots and Automatic VHDs
• When the first snapshot is created, automatic VHDs are used
• Automatic VHDs are the same as differencing disks except
– The child disks use the .avhd file extension
– The file name for the child disks are automatically generated
– With Windows 2008 R2, .avhd files are always located with the parent
VHD files
• Automatic VHD file name layout
– If original file was Test.vhd
– Test_<Snapshot GUID>.avhd
– Ex: Test_353176B1-1CC1-4369-8C28-78DAB08D9978.avhd
• When a snapshot is deleted, it will merge with the parent
partition
– Only merges when the VM is shutdown.
43
28. Snapshots
• Captures a point in time configuration and state of a virtual
machine
• Ability to reload any existing snapshot within a matter of
seconds
• Useful in scenarios where incremental changes need to be
made with the ability to rollback to a previous state
• Designed for use in test and development environments
• Has nothing to do with VSS Snapshots
– Different technologies
45
29. Snapshot Best Practices
• DO NOT USE SNAPSHOTS IN PRODUCTION ENVIRONMENTS
• Not supported in any environment for Domain Controllers
• When using with database products, like SQL or Exchange, a
snapshot doesn’t provide a consistent data recovery point
• Only use the Hyper-V Manager to manage snapshots
• Do not use as a substitute for a backup
• Do not use on clustered VMs
47
30. Snapshots – Look out for….
• When deleting snapshots, the merge operation takes place
when the VM is powered off
– This has caused downtime in the past on large merge operations
– One of the many reasons not to use for production environments
• Changing the parent disk will invalidate the entire snapshot
chain
– To recover, restore the parent disk from a previous backup
– Do not mount the parent disk. If you need to look at it, make a copy
• If you restore a snapshot of a domain controller you are
almost guaranteed to have a USN Rollback scenario in a
multiple domain controller environment
• Be mindful of snapshots in recovery scenarios
48
Outline of Using the Hyper-V Management Console Instructor Demo
Show how to get to the Hyper-V Management Console
Administrator Tools > Hyper-V Manager
Start>Run: virtmgmt.msc (c:\program files\hyper-v\virtmgmt.msc)
NOTE: MMC for virtmgmt.msc was not included in the system32 directory and therefore you will get a UAC prompt if UAC is enabled
Go over standard MMC 3.0 interface
Add/remove an additional Hyper-V Server to the console
Show right click menu
Virtual Machine Pane
Name
State
CPU
Memory
Uptime
Status (save state or snapshot)
Snapshots
Details
NOTE: Refresh rate is 1/sec when highlighted, 1/5sec when not highlighted
New Virtual Machine
Go through wizard
New Hard Disk
wizard
New Floppy Disk
wizard
Import / Export of VM
Note: Export only available on non-running VMs
Note: Older versions allow an export of config data only
Import – go over options
New GUID
Use Existing
Hyper-V Settings
Virtual Network Manager
Go in detail during Networking section
Edit Disk / Inspect Disk
Go in detail during VHD Management
Stop Service
Note – sometimes you can’t restart… (changes to start service)
Do not use on cluster!!!
VM Action Pane
Connect
VMConnect Interface
Toolbar
File > Settings (not in detail)
Action
Note – same as toolbar except Int. Services
Media
Clipboard
Type Clipboard Text
Capture Screen (Screenshot)
NOTE: if you do copy/past often, use RDP
View / Help
Settings Interface
Add Hardware
BIOS
Num Lock
Start Order
Memory
Proc
#
Others in Advanced
IDE
Add
HDD
Controller > ide location
File location
Other options covered later
Scsi
Network (brief)
Com (rarely used)
Note: can be used for live debug
Diskette
Name
Integration Service (brief)
Snapshot location
Auto start action
Auto stop action
Controls
Start
Off
Etc
Note: view changes depending on what state the vm is in.
Snapshot (covered in detail later)
Go over the Hyper-V Manager files
programdata files
symlinks
Slide Objective:
Instructor Notes:
Slide Objective:
Instructor Notes:
Go to http://www.virtuatopia.com/index.php/Understanding_and_Configuring_Hyper-V_Virtual_Networks
External Virtual Network
Virtual machines connected to an external virtual network are given access to the external network via a physical network adapter installed in the host system. Virtual machines are also able to communicate with both the parent partition and other virtual machines running on the same virtual network.
Internal Virtual Network
Virtual machines connected to an internal virtual network have access to both the parent partition and other virtual machines attached to the same virtual network. Hyper-V Internal Virtual Networks do not require a physical network adapter and no access to external networks is provided.
Private Virtual Network
Virtual machines connected to a private virtual network have access only to other virtual machines attached to the same virtual network. Hyper-V private virtual networks do not require a physical network adapter and no access to the parent partition or external network is provided.
Slide Objective:
Instructor Notes: ***Labs 2 stop at 3****
A differencing disk is a virtual hard disk you use to isolate changes to a virtual hard disk or the guest operating system by storing them in a separate file. A differencing disk is similar to the Undo Disks feature because both offer a way to isolate changes in case you want to reverse them.
Use http://www.virtuatopia.com/index.php/Creating_and_Managing_Hyper-V_Snapshots
Slide Objective:
Instructor Notes: Have students pair up, use one system. This requires the use of a shared NTFS disk and will cause confusion and maybe corruption if both students try to do this lab separately.
Source: http://lse.sourceforge.net/numa/faq/
http://msdn.microsoft.com/en-us/library/ms178144.aspx
Minimize/eliminate front-bus contention to surpass scalability limits of SMP architecture
Performance penalty for accessing foreign node memory
Application needs to be NUMA-aware to take advantage the node-locality design
What does NUMA stand for?NUMA stands for Non-Uniform Memory Access.
OK, So what does Non-Uniform Memory Access really mean to me?Non-Uniform Memory Access means that it will take longer to access some regions of memory than others. This is due to the fact that some regions of memory are on physically different busses from other regions. For a more visual description, please refer to the section on NUMA architecture implementations. Also, see the real-world analogy for the NUMA architecture. This can result in some programs that are not NUMA-aware performing poorly. It also introduces the concept of local and remote memory.
What is the difference between NUMA and SMP?The NUMA architecture was designed to surpass the scalability limits of the SMP architecture. With SMP, which stands for Symmetric Multi-Processing, all memory access are posted to the same shared memory bus. This works fine for a relatively small number of CPUs, but the problem with the shared bus appears when you have dozens, even hundreds, of CPUs competing for access to the shared memory bus. NUMA alleviates these bottlenecks by limiting the number of CPUs on any one memory bus, and connecting the various nodes by means of a high speed interconnect.
What is the difference between NUMA and ccNUMA?The difference is almost nonexistent at this point. ccNUMA stands for Cache-Coherent NUMA, but NUMA and ccNUMA have really come to be synonymous. The applications for non-cache coherent NUMA machines are almost non-existent, and they are a real pain to program for, so unless specifically stated otherwise, NUMA actually means ccNUMA.
What is a node?One of the problems with describing NUMA is that there are many different ways to implement this technology. This has led to a plethora of "definintions" for node. A fairly technically correct and also fairly ugly definition of a node is: a region of memory in which every byte has the same distance from each CPU. A more common definition is: a block of memory and the CPUs, I/O, etc. physically on the same bus as the memory. Some architectures do not have memory, CPUs, and I/O all on the same physical bus, so the second definition does not truly hold. In many cases, the less technical definition should be sufficient, but often the technical definition is more correct.
What is meant by local and remote memory?The terms local memory and remote memory are typically used in reference to a currently running process. That said, local memory is typically defined to be the memory that is on the same node as the CPU currently running the process. Any memory that does not belong to the node on which the process is currently running is then, by that definition, remote.Local and remote memory can also be used in reference to things other than the currently running process. When in interrupt context, there technically is no currently executing process, but memory on the node containing the CPU handling the interrupt is still called local memory. Also, you could use local and remote memory in terms of a disk. For example if there was a disk (attatched to node 1) doing a DMA, the memory it is reading or writing would be called remote if it were located on another node (ie: node 0).
What do you mean by distance?NUMA-based architectures necessarily introduce a notion of distance between system components (ie: CPUs, memory, I/O busses, etc). The metric used to determine a distance varies, but hops is a popular metric, along with latency and bandwidth. These terms all mean essentially the same thing that they do when used in a networking context (mostly because a NUMA machine is not all that different from a very tightly coupled cluster). So when used to describe a node, we could say that a particular range of memory is 2 hops (busses) from CPUs 0..3 and SCSI Controller 0. Thus, CPUs 0..3 and the SCSI Controller are a part of the same node.
Could you give a real-world analogy of the NUMA architecture to help understand all these terms?Imagine that you are baking a cake. You have a group of ingredients (=memory pages) that you need to complete the recipe(=process). Some of the ingredients you may have in your cabinet(=local memory), but some of the ingredients you might not have, and have to ask a neighbor for(=remote memory). The general idea is to try and have as many of the ingredients in your own cabinet as possible, since this reduces your time and effort in making the cake.You also have to remember that your cabinets can only hold a fixed amount of ingredients(=physical nodal memory). If you try and buy more, but you have no room to store it, you may have to ask your neighbor to keep it in his/her cabinet until you need it(=local memory full, so allocate pages remotely).A bit of a strange example, I'll admit, but I think it works. If you have a better analogy, I'm all ears! ;)
Why should I use NUMA? What are the benefits of NUMA?The main benefit of NUMA is, as mentioned above, scalability. It is extremely difficult to scale SMP past 8-12 CPUs. At that number of CPUs, the memory bus is under heavy contention. NUMA is one way of reducing the number of CPUs competing for access to a shared memory bus. This is accomplished by having several memory busses and only having a small number of CPUs on each of those busses. There are other ways of building massively multiprocessor machines, but this is a NUMA FAQ, so we'll leave the discussion of other methods to other FAQs.
What are the peculiarities of NUMA?CPU and/or node caches can result in NUMA effects. For example, the CPUs on a particular node will have a higher bandwidth and/or a lower latency to access the memory and CPUs on that same node. Due to this, you can see things like lock starvation under high contention. This is because if CPU x in the node requests a lock already held by another CPU y in the node, it's request will tend to beat out a request from a remote CPU z.
What are some alternatives to NUMA?Also, splitting memory up and (possibly arbitrarily) assigning it to groups of CPUs can give some performance benefits similar to actual NUMA. A setup like this would be like a regular NUMA machine where the line between local and remote memory is blurred, since all the memory is actually on the same bus. The PowerPC Regatta system is an example of this.You can achieve some NUMA-like performance by using clusters as well. A cluster is very similar to a NUMA machine, where each individual machine in the cluster becomes a node in our virtual NUMA machine. The only real difference is the nodal latency. In a clustered environment, the latency and bandwidth on the internodal links are likely to be much worse.
The Child partition exposes the following data
OSMajorVersion - The major version number of the guest operating system.
OSMinorVersion - The minor version number of the guest operating system.
OSBuildNumber - The build number of the guest operating system.
OSVersion – The version of the guest operating system (e.g, 5.0.2195).
OSPlatformId – The guest operating system platform (Win9x, NT4 or later)
CSDVersion – The latest Service Pack installed in the guest operating system.
ServicePackMajor – The major version number of the latest Service Pack installed in the guest operating system.
ServicePackMinor - The minor version number of the latest Service Pack installed in the guest operating system.
SuiteMask – The product suites available on the system.
ProductType – The product type installed on the system (Workstation, Server, DC)
OSName – The name set in HKLM\Software\Microsoft\Windows NT\CurrentVersion\ProductName.
ProcessorArchitecture – A processor architecture identifier (Intel, Itanium, AMD, unknown)
FullyQualifiedDomainName - The fully qualified DNS name that uniquely identifies the guest operating system. This name is a combination of the DNS host name and the DNS domain name. If this is a node in a cluster, then it is the fully qualified DNS name of the cluster virtual server
The parent partition provides the values in HKLM\Software\Microsoft\Virtual Machine\Guest\Parameters to the child partition. These include:
HostName -The domain name system (DNS) name set in the parent partition operating system. If the system is a cluster node, then this is the DNS name of the cluster virtual server.
PhysicalHostName - The non-fully qualified name set in the parent partition operating system.
PhysicalHostNameFullyQualified - The fully qualified name set in the parent partition operating system.
VirtualMachineName - The name of the virtual machine used by the virtualization stack.
WSB / Hyper-V VSS Covered in detail in backup section
http://blogs.technet.com/b/askcore/archive/2008/08/20/how-to-enable-windows-server-backup-support-for-the-hyper-v-vss-writer.aspx
Allows you to add or remove memory on the fly.
Slide Objective:
Instructor Notes:
Slide Objective:
Instructor Notes: Have students pair up, use one system. This requires the use of a shared NTFS disk and will cause confusion and maybe corruption if both students try to do this lab separately.