Transcript Module 1
JumpStart: Server Virtualization with Windows Server Hyper-V and System Center Corey Hynes Symon Perriman Lead Architect & President Senior Technical Evangelist holSystems | @holSystems Microsoft | @SymonPerriman Course Topics – Day 1 Windows Server 2012 R2 01 | Evaluating the Environment for Virtualization 02 | Installing and Configuring the Hyper-V Server Role 03 | Creating and Managing Virtual Hard Disks, Virtual Machines, and Checkpoints 04 | Creating and Configuring Virtual Machine Networks 05 | Virtual Machine Movement and Hyper-V Replica 06 | Implementing Failover Clustering with Hyper-V Course Topics – Day 2 System Center 2012 R2 07 | Installing and Configuring System Center 2012 R2 Virtual Machine Manager 08 | Managing Network and Storage Infrastructure in VMM 09 | Configuring and Managing the VMM Library 10 | Creating and Managing VMs Using VMM 11 | Managing Clouds in VMM 12 | Managing Services in VMM and App Controller 13 | Protecting and Monitoring Virtualization Infrastructure Meet the Presenters Corey Hynes Lead Architect & President, HOLSystems Background Corey has been a core infrastructure architect and consultant in the field for over 15 years. His primary focus is operating system virtualization, management and deployment. Corey has been working with Hyper-V, XenDesktop and VMware extensively since they were introduced and he is currently a member of the Windows 8 TAP program. He is the author of over 100 labs across multiple product lines, and is the lead author of the Windows Server 2012 hands-on labs currently available on TechNet. Corey is also the owner and lead technical architect for holSystems, an online VM hosting engine for training and demo providers which hosts thousands of VM instances in a custom, thin-provisioning engine, and is the platform used for hands-on labs, instructor-led labs, and on-demand virtual labs worldwide. Contact • @holsystems Meet the Presenters Symon Perriman Senior Technical Evangelist, Microsoft Background As Microsoft’s corporate Senior Technical Evangelist covering Private Cloud, Virtualization & System Center, Symon is a recognized industry expert in datacenter management, cloud, virtualization, high-availability, and others. Previously he spent four years as a Program Manager on the Server Clustering & High-Availability engineering team and has been working in the technology industry since 2002. Symon holds several patents and industry certifications, including Microsoft Certified Trainer (MCT), MCSE Private Cloud, and VMware Certified Professional (VCP). In 2013 he co-authored the book, “Introduction to System Center 2012 R2 for IT Professionals” (O’Reilly) and is a graduate from Duke University with degrees in Computer Science, Economics and Film & Digital Studies. Contact • @SymonPerriman Course Expectations • Target Audience • This course is intended for IT professionals who are responsible for designing, implementing, managing, and maintaining a virtualization infrastructure or are interested in learning about current Microsoft Virtualization technologies. The secondary audience for this course includes IT decision makers who will determine which virtualization product to implement in their data centers. • Suggested Prerequisites/Supporting Material • 5-day Course: 20409A: Server Virtualization with Windows Server Hyper-V and System Center • Exam: 74-409: Server Virtualization with Windows Server Hyper-V and System Center Microsoft Virtual Academy Module 1 Evaluating the Environment for Virtualization Module Overview • Overview of Microsoft Virtualization • Overview of System Center 2012 R2 Components • Evaluating the Current Environment for Virtualization • Extending Virtualization to the Cloud Lesson 1: Overview of Microsoft Virtualization • Challenges of Traditional Computing Environments • What Is Server Virtualization? • What Is Network Virtualization? • Key Technologies Challenges of Traditional Computing Environments • Traditional challenges: • Space - Housing business equipment • Power - Providing affordable power to run the server, storage and network equipment • Cooling- Maintaining safe operating temperatures for equipment • Resilience - Building robust and highly available solutions and offering a means to recover data • Flexibility – Providing the time to deliver or upgrade infrastructure and or applications • Resources – Maintaining staff-to-system ratios and meeting training challenges What Is Server Virtualization? • Server virtualization: • You can create and run multiple computer operating systems on a single physical computer • Host servers share resources with all the virtual machines • Virtualization challenges: • Limited number of compute resources • Server virtualization features: • Hyper-V server virtualization feature allow full utilization of physical resource and provide advanced technology to make a more robust, available and dynamic server computing environment. What Is Server Virtualization? Type I Hypervisor Windows virtual machine Windows virtual machine Linux virtual machine Linux virtual machine Paravirtualization drivers and tools Hypervisor (VMware vSphere, Citrix XenServer, Microsoft Hyper-V Host – Physical hardware What Is Server Virtualization? Type II Hypervisor Windows virtual machine Windows virtual machine Linux virtual machine Linux virtual machine Paravirtualization drivers and tools Hypervisor (Microsoft Virtual Server, VMware workstation) Host – Operating system Host – Physical hardware What Is Network Virtualization? Blue virtual machine Red virtual machine Blue network Red network virtualization Physical server Physical network Switches Servers Server virtualization runs multiple virtual servers on a physical server Network virtualization runs multiple virtual networks on a physical network Key Technologies Automation Orchestrator vCenter Orchestrator Service Mgmt. Service Manager vCloud Automation Center Protection Monitoring Data Protection Manager System Center 2012 R2 Operations Manager vSphere Data Protection vCloud Suite vCenter&Ops Mgmt. Suite vCenter Self-Service App Controller vCloud Director VM Management Virtual Machine Manager vCenter Server Hypervisor Hyper-V vSphere Hypervisor Key Technologies - Licensing Automation Service Mgmt. Protection Monitoring Self-Service VM Management Hypervisor Orchestrator System Center 2012 R2 Licensing Standar Datacente r 2 2 d Service Manager # of Physical CPUs per License Data Protection Manager 2 + Host Unlimited # of Managed OSE’s per License Yes Yes Operations Manager Includes all SC Mgmt. Components Includes SQL Server for Mgmt. Server Use Yes App Controller Open No Level (NL) & Software Assurance (L&SA) 2 year Pricing Yes $1,323 $3,607 Virtual Machine Manager Windows Server 2012 R2 Inc. Hyper-V Hyper-V Server 2012 R2 = Free Download vCenter Orchestrator vCloud Suite Licensing Std. Adv. Ent. 1 1 1 vCloud Automation Center # of Physical CPUs per License vSphere Data Protection Unlimited VMs on Hosts # of Managed OSE’s per License vCenter OpsYesMgmt. Suite Yes Yes Includes vSphere 5.1 Enterprise Plus No vCloud No Director Includes vCenter 5.5 No Includes all required No No No database vSphere licenses5.5 Standalone Per CPU Pricing (Excl. S&S): Standard = $995 Retail Pricing $4,99 $7,49 $11,49 Enterprise $2,875 per CPU=(No 5 5 5 Enterprise Plus = $3,495 S&S) vCenter Server vSphere Hypervisor Lesson 2: Overview of System Center 2012 R2 • Using Microsoft System Center 2012 R2 to Manage a Data Center • Overview of VMM • Overview of App Controller Using System Center to Manage a Data Center Manage virtual environment (VMM, App Controller) Enable business Continuity (Data Protection Manager) Manage physical and virtual components (VMM) Data center Monitor and report (Operations Manager) Automation (Orchestrator, Service Manager) Delegate administration and self service (App Controller, Data Protection Manager) Overview of VMM VMM features include: Bare-metal deployment of hosts • Host and cluster creation • Host groups • Cross-platform management • Storage configuration/network configuration • Intelligent placement/dynamic optimization • Power optimization • PRO • P2V • Overview of App Controller • App controller overview • A browser-based console used for providing delegated access to manage private and public cloud services and virtual machines • App Controller can connect to: • Multiple VMM instances • Multiple Windows Azure subscriptions • Service Provider Foundation Lesson 3: Evaluating the Current Environment for Virtualization • Evaluation Factors • Overview of Virtualization Solution Accelerators • Assessment Features of MAP Evaluation Factors • When evaluating server virtualization, consider the following: Project Scope • Hardware requirements • Compatibility • Applications and services • Supportability • Licensing • Availability requirements • Overview of Virtualization Solution Accelerators • Microsoft Assessment and Planning Toolkit (MAP) • Third-party tools (import maps output) • Infrastructure planning and design guides (IPD) Assessment Features of the MAP Toolkit 50 • Discovery • Hardware configuration • Servers • Infrastructure (Shared storage and network) • Virtual Server Consolidation Wizard • Private cloud fast track • MAP will scan vSphere hosts, and VMs and produce spreadsheet & report on conversion candidates Ready to Migrate 40 Virtual Machines • Inventory 45 35 30 Ready to migrate after recommended changes 25 20 15 Cannot Migrate 10 5 0 MICROSOFT VIRTUAL MACHINE CONVERTER Lesson 4: Extending Virtualization to the Cloud • What is Windows Azure? • Windows Azure Services • Virtual Machines in Windows Azure • Extending Your Data Center What is Windows Azure? Windows Azure is the public cloud offering from Microsoft Windows Azure delivers the following service models: PaaS • IaaS • SaaS • Windows Azure Services • Windows Azure Services: • Compute • • Data Services • • Data management, HDInsight, business analytics, backup, recovery manager. App Service • • Websites, virtual machines, mobile, and cloud services Media services, messaging, BizTalk services, identity, caching Network • Virtual network, Traffic manager Virtual Machines in Windows Azure • Virtual machines in Windows Azure are: • Built from scratch • Deployed from templates including Windows, Ubintu, CentOS • Have preinstalled applications such as SQL, SharePoint, BizTalk, Visual Studio • Can be customized and built from user templates • Built on premises VHDs and then imported Extending Your Data Center • Extending your datacenter • Windows Azure Virtual Network • Windows Azure Pack Microsoft Virtual Academy Module 2 Installing and Configuring the Hyper-V Role Module Overview • Installing the Hyper-V Role • Managing Hyper-V • Configuring Hyper-V Settings • Hyper-V Host Storage and Networking Lesson 1: Installing the Hyper-V Server Role • Server Platforms That Provide Hyper-V • Hyper-V and Virtual Machine Scalability • Hyper-V Architecture • Considerations for Disk and Storage • Considerations for Networking • Considerations for High Availability • Changes on the Host after Installing the Hyper-V Role Server Platforms That Provide Hyper-V • Windows Server 2012 and newer Windows Server operating systems: • • • Include Hyper-V and other roles GUI and command-line management Licensed per processor, includes virtualization rights • Standard edition: two virtual machines with each Windows Server operating system • Enterprise edition: unlimited virtual machines with each Windows Server operating system • Hyper-V Server 2012 and newer: • • • Includes only the Hyper-V role Command-line management only (if managed locally) Free, virtual machines must be licensed separately • Windows 8 and newer Windows client 64-bit operating systems: • Client Hyper-V, does not include server-level features such as high availability or live migration Hyper-V and Virtual Machine Scalability System Server Resource Logical processors 320 Physical memory 4 TB Virtual processors per server 2,048 Virtual processors per virtual machine Virtual machine Failover cluster Windows Server 2012 R2 64 Memory per virtual machine 1 TB Running virtual machines per server 1,024 Virtual disk size 64 TB Nodes per failover cluster Running virtual machines per cluster 64 8,000 Considerations for Disk and Storage • Hyper-V hosts can use • DAS • SAN • NAS (SMB 3.0) • Network shared folders (SMB 3.0) • Virtual Machines require storage for • Virtual hard disk files • Configuration • Checkpoints • Saved state Considerations for Networking • Hyper-V host should have multiple NICs • Dedicated NIC for Hyper-V management • At least one NIC for virtual machine networks • Two NICs for shared storage • Dedicated NIC for failover clustering (private network) • At least one NIC for live migration • Use fast NICs • NIC teaming for redundancy and throughput • Bandwidth management Considerations for High Availability • Hyper-V host-based failover clustering • Virtual machines are highly available • Virtual machine-based failover clustering • Cluster roles in virtual machines are highly available • Virtual machine-based NLB • Highly available and scale out web-based applications • Application-specific clustering • Applications are highly available Changes on the Host after Installing the Hyper-V Role • Hyper-V is installed as A server role • Server Manager, Install-WindowsFeature, dism.exe • Restart required after installation • Hypervisor is added and starts automatically • Windows Server is moved into parent partition • Hyper-V management tools • Additional services • Performance Monitor counters • Applications and Services logs • Hyper-V Administrators group • Windows Firewall rules Lesson 2: Managing Hyper-V • Overview of the Hyper-V Manager Console • Adding the Hyper-V Manager Console • Using Windows PowerShell to Manage Hyper-V • Managing Hyper-V in a Workgroup Environment • Hyper-V Best Practices Analyzer • Hyper-V Security Model Overview of the Hyper-V Manager Console Hyper-V servers Listing of virtual machines Hyper-V server actions Virtual machine actions Adding the Hyper-V Manager Console • Used for configuring Hyper-V • Also on Hyper-V Server • If adding the Hyper-V role by using Server Manager, Hyper-V Manager console is added automatically • Hyper-V Management Tool is a feature that you must enable Windows Server - Add feature • Windows 8 - Turn on Windows Feature • • Install RSAT and turn on Windows Feature (Windows 7) • If Hyper-V Manager console cannot run on a device • RDP Using Windows PowerShell to Manage Hyper-V • Hyper-V module installed with Hyper-V role • Hyper-V can be managed entirely in Windows PowerShell • Get-Command -Module Hyper-V • Get-Help <cmdlet>, Get-Command *part* • Verb-Noun cmdlet name syntax • Get-, Set-, Disable-, Enable-, New-, Add-, … • Get-VMHost -ServerName LON-DC1, LON-SVR1 • Get-VM -HostName LON-HOST1 | Save-VM • Start-VM -Name *DC* -HostName LON-HOST1 • Get-VMHost -HostName LON-HOST1 | ft • Windows PowerShell ISE Managing Hyper-V in a Workgroup Environment • Hyper-V can be a workgroup member • This has no effect on virtual machines running on the Hyper-V host • Domain membership simplifies management • To enable remote management in a workgroup • Enable Hyper-V firewall rules (Server Core only) • Create a local user with the same username and password • Add a local user to Hyper-V Administrators group • Grant administrative rights remotely to local users • Connect to the Hyper-V host in Hyper-V console • Use HVRemote to simplify configuration Hyper-V Best Practices Analyzer • Best Practices are guidelines for typical deployment • Hyper-V BPA includes over 110 rules including: • Hyper-V should be the only enabled role • Server Core is recommended for Hyper-V servers • Domain membership is recommended for Hyper-V • BPA is available in Server Manager and Windows PowerShell Can scan one or multiple roles locally or remotely • Can filter scan results • • Compliance scan returns one of three levels: • Error, Warning, Information Hyper-V Security Model • Authorization Manager controls Hyper-V security • Challenging to use, not suitable for complex security rules • Depreciated, but still available in Windows Server 2012 R2 • Many administrators use VMM • Simple Authorization is used on Server 2012 R2 • Hyper-V Administrators local and domain groups—are empty by default • Members have full access to Hyper-V • Hyper-V Administrators group is incorporated into Authorization Manager Lesson 3: Configuring Hyper-V Settings • Overview of Hyper-V Settings • What Is NUMA? • What Is RemoteFX? • What Is Enhanced Session Mode? • What Are Resource Pools? Overview of Hyper-V Settings What Is NUMA? • NUMA Enables host to scale up CPUs and memory • Partitions CPUs and memory into NUMA nodes • Allocation and latency depends on relative CPU location • • Hyper-V presents NUMA topology to virtual machines Guest operating system can make decisions on how to use resources • Can minimize cross-node memory access • • NUMA spanning enabled at host level Virtual NUMA topology can be configured at virtual machine level • By default, virtual NUMA aligns with physical NUMA • What Is RemoteFX? • Provides a remote desktop experience that may be equivalent to a physical desktop environment • System Requirements • • • GPU Second level address translation RD Virtualization Host role service • RemoteFX 3D Video Adapter virtual machine hardware • RemoteFX features: • • • • • RemoteFX for WAN RemoteFX Adaptive Graphics RemoteFX Media Streaming RemoteFX Multi-Touch RemoteFX USB Redirection What Is Enhanced Session Mode? • Remote Desktop over VMBus • Full Remote Desktop capabilities • Shared clipboard • Printers, smart cards, USB devices redirection • Folder redirection • Enabled at Hyper-V host • Guest operating system required Windows Server 2012 R2 • Windows 8.1 • Remote Desktop users • support What Is Enhanced Session Mode? Virtual Machine Management Service Virtual machine connect Applications Applications Applications Virtual Machine Worker Process Basic Experience Video / Keyboard / Mouse Driver VMBus VMBus Hypervisor What Is Enhanced Session Mode? Virtual Machine Management Service Virtual machine connect Virtual Machine Worker Process Enhanced session mode Applications Applications Applications Remote Desktop Services VMBus VMBus Hypervisor What Are Resource Pools? • Resource pools are logical containers • Layer of abstraction between virtual machine and hardware • • Virtual machine configured to use the pool Virtual machine can use any resource from the configured pool • Helpful when moving virtual machines • Resource pools can be used for chargeback • Different resource pool types • Processor, Memory, Ethernet, VHD • Resource pools configured by Windows PowerShell • • Get-VMResourcePool New-VMResourcePool -Name "Contoso Network" ResourcePoolType Ethernet Lesson 4: Hyper-V Host Storage and Networking • Overview of Storage Spaces • Overview of Disk Deduplication • What Is Offloaded Data Transfer? • What Is SMB 3.0? • Hyper-V over SMB • Overview of Network Teaming Demystifying Storage Appliances • What’s in a storage appliance? • x86/x64 Processors SAS • Memory “Back” • Network Adapters • Storage HBAs “Front” Multiple physical interfaces; Pools disks, presents LUNs, Simple, Mirrored, Parity etc. Multiple physical interfaces; Pools disks, presents LUNs, Simple, Mirrored, Parity etc. Presents interfaces: iSCSI, FC, FCoE, NFS, SMB Presents interfaces: iSCSI, FC, FCoE, NFS, SMB Clustered Ethernet: 1Gb/10Gb FC: 1/2/4/8/16 Gb Deploy two or more for a Scale Out CA Solution Servers Servers Servers Servers Servers Servers Servers Servers Windows Server 2012 R2 File Server and Spaces SAS Windows Server 2012 Spaces Windows Server 2012 File Server Multiple physical interfaces; Pools disks, presents LUNs, Simple, Mirrored, etc. Multiple physical interfaces; Pools disks, presents LUNs, Simple, Mirrored, etc. Presents interfaces: iSCSI, NFS, SMB Presents interfaces: iSCSI, NFS, SMB Clustered SMB3/Ethernet: 1Gb/10Gb 40Gb/56 Gb RDMA Deploy two or more for a Scale Out CA Solution Servers Servers Servers Servers Servers Servers Servers Servers New Designs: Cluster in a Box 1/10G E or Infiniband 1/10G E or Infiniband Network Network Availability • At least one node and storage always available, despite failure or replacement of any component • Dual power domains Simplicity • Pre-wired, internal interconnects between nodes, controllers, and storage x8 PCIe Server A CPU Server Enclosure 1/10G Ethernet cluster connect (through midplane) x8 PCIe Server B CPU x8 PCIe x8 PCIe Storage Controller x4 SAS SAS Expander x4 SAS (through midplane) x4 SAS (through midplane) Storage Controller DataOn – DNS B ports 9220 SAS A ports 0 1 … 23 x4 SAS Expander Flexibility • • • PCIe slots for flexible LAN options External SAS ports for JBOD expansion Office-level power, cooling, and acoustics to fit under a desk External JBOD SAS Expander 0 1 … 23 B ports SAS Expander A ports http://www.dataonstorage.com Additional JBODs … Familiar Enterprise-Grade Capabilities Traditional Storage Windows File Server Cluster with FC/iSCSI Storage Array with Storage Spaces • Storage Tiering • Storage Tiering (new with R2) • Data deduplication • Data deduplication (enhanced in R2) • RAID resiliency groups • Flexible resiliency options (enhanced in R2) • Pooling of disks • Pooling of disks • High availability • High availability • Persistent write-back cache • Persistent write-back cache (new with R2) • Copy offload • SMB copy offload • Snapshots • Snapshots Storage Tiering Cold data Can “ Hard Disk Drives Overview of Storage Spaces • Storage pools – collection of physical disks • Storage Spaces – virtual disks on storage spaces Windows virtualized storage Storage Spaces Storage Pool Storage Spaces Storage Pool Storage Spaces Storage Pool (Shared) SAS, SATA or USB Physical storage • Storage Spaces features • Resiliency and integrity on standard disks • Continuous availability and CSV integration • Optimal storage use and storage tiering • Multitenancy and isolation Overview of Disk Deduplication • Identifies and removes duplications within data • Without compromising data integrity • To store more data on less space • After data is stored (post-process) • Requires NTFS file system • Failover clustering and shared storage supported • CSV support added in R2 • Can significantly decrease space for VHD library • R2 adds support for live VHD deduplication for VDI • • VHDs must be accessed on an SMB 3.0 network share Deduplication of virtual machines that use local storage not supported What Is Offloaded Data Transfer? • Traditional data copy model • Server issues read request to SAN • Data is read and transferred into memory • Data is transferred and written from memory to SAN • Issues: CPU and memory utilization, increased traffic • Offload-enabled data copy model • Server issues read request and SAN returns token • Server issues write request to SAN using token • SAN completes data copy and confirms completion • Benefits: Increased performance, reduced utilization • SAN must support Offloaded Data Transfer What Is Offloaded Data Transfer? Token Offload read Offload write Token Storage array Actual data transfer Intelligent Storage Array Storage array What Is SMB 3.0? • SMB is network file sharing protocol • SMB protocol versions are backward compatible • SMB 3.0 features in Windows Server 2012 (R2) • SMB Transparent Failover • SMB Scale Out • SMB Multichannel • SMB Direct (SMB over RDMA) • SMB Encryption • VSS for SMB file shares • Managing SMB file shares by Windows PowerShell • SMB 3.0 is used only if both sides support it Hyper-V over SMB • Hyper-V data files stored on network shares • Virtual machine configuration, VHD files, checkpoints • Hyper-V supports file shares over SMB 3.0 or newer • File Server and Hyper-V must be separate servers • • They must be members of the same Active Directory Running virtual machine data files can be deduplicated (VDI) • Reliability, availability, and performance as a SAN • Uses SMB 3.0 features • Benefits • Easier provisioning and management • Uses existing infrastructure Microsoft Virtual Academy Module 3 Creating and Managing Virtual Hard Disks, Virtual Machines, and Checkpoints Module Overview • Creating and Configuring Virtual Hard Disks • Creating and Configuring Virtual Machines • Installing and Importing Virtual Machines • Managing Virtual Machine Checkpoints • Monitoring Hyper-V Lesson 1: Creating and Configuring Virtual Hard Disks • What Are the Storage Options for Virtual Machines? • Overview of the Hyper-V Virtual Hard Disk Formats • Fixed Size and Dynamically Expanding Virtual Hard Disks • Differencing Virtual Hard Disks • Directly Attached Storage • Virtual Hard Disk Sharing and Quality of Service Management • Hyper-V Considerations for Virtual Hard Disk Storage What Are the Storage Options for Virtual Machines? • Virtual hard disk and directly attached disks • Support two storage controller types: IDE SCSI Only for Generation 1 virtual machines For Generation 1 and Generation 2 virtual machines Two controllers—Two devices per IDE controller Four controllers—64 devices per SCSI controller Virtual machine starts from IDE Only Generation 2 starts from SCSI Cannot modify devices while virtual machine is running Can modify devices when virtual machine is running • Fixed size, dynamically expanding or differencing disk files • Directly attached disks—local, or on iSCSI or Fibre Channel SAN Overview of the Hyper-V Virtual Hard Disk Formats • .vhd • Up to 2,048 GB in size • .vhdx • Up to 64 TB in size • Internal log for enhanced resiliency • User defined metadata • Large disk sector support • Larger sector size (improved performance) • Default format in Windows Server 2012 R2 • Can convert between both formats • .vhdx recommended, if not used on older versions of Hyper-V Fixed Size and Dynamically Expanding Virtual Hard Disks Fixed size Dynamically expanding Allocates all storage • Larger initial size • Creation takes time (without Windows Offloaded Data Transfers) Allocates space as needed • Smaller initial size • Created faster Minimize fragmentation Can cause fragmentation Cannot over-commit Can over-commit Better performance (older Hyper-V) Comparable performance (Windows Server 2012) Use in production Use in testing and development Differencing Virtual Hard Disks • Stores changes from the parent disk • • • • Parent disk should not change Differencing disk isolate changes Multiple differencing disks can use same parent Increases overhead (lower performance) • Can be used for standardized base images • Should avoid in production Create Read Modify Delete 3 1234 123 4 File A File B 1 23 4 File C xxxx 12 34 File D Grow Read-Only Directly Attached Storage • Virtual machine directly accesses physical disk • Internal or LUN attached to Hyper-V server • • Disk must be offline before it can be used LUN on iSCSI or Fibre Channel SAN • Pass-through disk considerations • Best performance • Unlimited size, lowest CPU utilization • No checkpoints or differencing virtual hard disks • No portability and encapsulation • Not included in Hyper-V backup Virtual Hard Disk Sharing and Quality of Service Management • Provides shared storage for virtual machines • Used as shared SAS disk by virtual machines • Virtual hard disk must be using VHDX format • • Must be connected to virtual SCSI controller Must be stored on failover cluster • CSV • Scale-out file server with SMB 3.0 • Separation between infrastructure and virtual machines • Storage QoS restrict disk throughput • Configured per virtual hard disk • Dynamically configurable while virtual machine is running Hyper-V Considerations for Virtual Hard Disk Storage • Virtual hard disks consume large amounts of space • Can increase over time, implement monitoring • Use multiple physical disks for better throughput • Use redundant storage spaces • SSD dramatically increases performance • SMB 3.0 file share • Use SAN for storing virtual hard disks • Specialized, redundant, fast • Shared storage for failover clustering • Exclude VHDs from antivirus scanning Lesson 2: Creating and Configuring Virtual Machines • What Are the Components of a Generation 1 Virtual Machine? • Overview of Generation 2 Virtual Machines • Configuring Virtual Machine Settings • What Is Dynamic Memory? • What Is Smart Paging? • Overview of Integration Services • Using a Virtual Fibre Channel Adapter What Are the Components of a Generation 1 Virtual Machine? • Virtual machine has virtual hardware devices • Only devices that Hyper-V supports can be used • Virtual hardware can be: • Emulated – available during boot • Synthetic – available in supported operating systems • SR-IOV – available in supported operating systems • Prior to Windows Server 2012 R2, only Generation 1 virtual machines were available Overview of Generation 2 Virtual Machines • Emulated devices are removed • UEFI firmware instead of BIOS • Secure boot • Boots from SCSI controller • PXE boot uses a standard network adapter • Faster boot and operating system installation • Can run side by side with Generation 1 • Generation 1 must be used for legacy systems • Supported guest operating systems • Windows Server 2012 and Windows Server 2012 R2 • 64-bit versions of Windows 8 and Windows 8.1 Configuring Virtual Machine Settings • Only limited options are available during creation Many more options are available after the virtual machine is created • Configuration options depend on the generation of the virtual machine • • Most settings can be configured only if turned off Adding or removing hardware components • Configuring memory, processor, disk settings • Few settings are configurable while virtual machine is running • • • • Connecting a network adapter to a virtual switch Adding a virtual hard disk to a SCSI controller Enable or disable Integration Services • Use Hyper-V Manager or Windows PowerShell • Set-VM, Add-VMHardDiskDrive, Add-VMNetworkAdapter What Is Dynamic Memory? • More efficient use of available physical memory • Shared resource that can be reallocated automatically • Demand, available memory, and virtual machine memory settings • Dynamic memory settings • Startup RAM • • Minimum RAM • • Can be increased while virtual machine is running Memory buffer • • Can be decreased while virtual machine is running Maximum RAM • • Operating system typically requires more memory when started Percentage of extra memory to reserve for a virtual machine Memory weight • Prioritizes memory allocation when physical memory is low What Is Dynamic Memory? Finance virtual machine 8 GB Sales virtual machine Engineering virtual machine 6 GB 4 GB 2 GB T=0 T = 15 T = 30 Total System Memory Memory in Use by virtual machines Physical Memory Used 8 GB 3 GB 37.5 % Virtual Machines Memory Settings What Is Dynamic Memory? Finance virtual machine 8 GB Sales virtual machine Engineering virtual machine 6 GB 4 GB 2 GB T=0 T = 15 T = 30 Total System Memory Memory in Use by virtual machines 8 GB 6 GB Physical Memory Used 75 % Virtual Machines Memory Settings What Is Dynamic Memory? Finance virtual machine 8 GB Sales virtual machine Engineering virtual machine Service virtual machine 6 GB Engineering reaches max allocation 4 GB 2 GB T=0 T = 15 T = 30 Total System Memory Memory in Use by virtual machines Physical Memory Used 8 GB 7,5 GB 94 % Virtual Machines Memory Settings What Is Smart Paging? • Memory Management technique that uses physical disk resources as temporary memory Ensures that a virtual machine can always restart • Used during virtual machine restart only • • • • • Temporarily degrades virtual machine performance • • If Hyper-V is low on memory, and The virtual machine has more startup than minimum RAM, and Memory cannot be reclaimed from other virtual machines Used only for a limited time, and then removed Not used when a virtual machine started from the Off state • Virtual machine operating system paging is always preferred What Is Smart Paging? Finance virtual machine Sales virtual machine Engineering virtual machine Service virtual machine 8 GB Virtual Machines Memory Settings 6 GB 4 GB 2 GB T=0 T = 15 Total System Memory T = 30 8 GB • Sales virtual machine and Service virtual machine can be restarted only if Smart Paging is used Overview of Integration Services • Makes a guest operating system aware that it is running on a virtual machine • Many operating systems include integration services Install the latest integration services • VMBus and synthetic devices support • Time synchronization, mouse release, VSS • • Managed as virtual machine settings Overview of Integration Services Without Integration Services With Integration Services Using a Virtual Fibre Channel Adapter • Access to Fibre Channel SAN storage from virtual machine Hyper-V server has Fibre Channel HBA • Use Virtual SAN Manager to configure a virtual SAN • • • Virtual Fibre Channel adapter maps to the physical HBAs Virtual Fibre Channel adapter connects to the Virtual SAN • Storage hardware must support N_Port ID virtualization • Virtual machine can have four virtual Fibre Channel adapters Supported Not supported Virtual machine live migration Boot from Fibre Channel SAN Virtual machine failover cluster Checkpoints MPIO - multiple paths to SAN Host-based backup Live migration of SAN data Lesson 3: Installing and Importing Virtual Machines • Virtual Machine Installation Methods • Importing Virtual Machines • Virtualizing a Physical Computer • The Virtual Machine Connection Application • Overview of Enhanced Session Mode Virtual Machine Installation Methods • Install from a bootable CD/DVD-ROM • Single virtual machine can only use physical media at one time • Install from an .iso file • Multiple virtual machines can use .iso file • Install from a network-based installation server • Generation 1 – legacy network adapter required • Copy virtual hard disk file with operating system installed Similar to computer cloning • Virtual hard disk should first be generalized • • Use differencing virtual hard disks Parent virtual hard disk should first be generalized • Parent virtual hard disk must not change • Importing Virtual Machines • You can import a virtual machine without first exporting it Only virtual machine data files are needed • Over 40 different types of issues detected, such as: • • • • Missing parent virtual hard disk Virtual switch not available Virtual machine has more processors than available • Import process: • • • • • Creates a copy of the virtual machine configuration file Validates hardware configuration settings Compiles a list of incompatibilities Displays incompatibilities and asks for new settings Removes the configuration file copy • Cannot start older saved states and checkpoints Virtualizing a Physical Computer • Converting a physical computer to a virtual machine • Hyper-V does not include P2V functionality • Hyper-V can copy content of data disks • Configure disk in New Virtual Hard Disk Wizard • Copy entire disk, not volume or partition • Supported only for data, system disks are not supported • Disk2vhd • Creates virtual hard disks • Uses VSS • Captured system has same identity • Add virtual hard disk to virtual machine Virtualizing a Physical Computer The Virtual Machine Connection Application • Connects to virtual machines on local and remote Hyper-V Port 2179 used (can be modified in the registry) • Connection allowed by Windows Firewall • Installed as part of Hyper-V role or RSAT feature • • Single users can connect to virtual machines • Remote Desktop in virtual machines is not used • Hyper-V Administrators can connect to virtual machines You can restrict access to virtual machines • Revoke-VMConnectAccess cmdlet • Overview of Enhanced Session Mode • Remote Desktop connection to a virtual machine • Virtual machine can be without network connectivity • Devices can be redirected • • • • Printers, drives, smart cards, audio, other PnP devices Shared clipboard, enhanced copy Folder redirection RDS component is used • • User must sign in to virtual machine Remote Desktop Users group membership required • Enabled at Hyper-V virtual machine connection and virtual machine level • Guest operating system support required Windows Server 2012 R2 or Windows 8.1 • Available only when the virtual machine is running • Lesson 4: Managing Virtual Machine Checkpoints • What Are Virtual Machine Checkpoints? • Implementing Hyper-V Checkpoints • Overview of Checkpoints at File Level • Exporting Virtual Machines and Checkpoints • Issues with Checkpoints in Distributed Environments • Checkpoints and Virtual Machine Generation ID What Are Virtual Machine Checkpoints? • Checkpoint is a point-in-time virtual machine state • • • Can be taken if virtual machine is not in Paused state Contains virtual machine configuration, memory and disk state Does not affect the running state of a virtual machine • Primarily used for testing and development • • • Can cause issues in distributed production environment Create differencing disk – decrease performance • Cannot be created for directly attached disks Used by Hyper-V Replica or in VDI deployments Implementing Hyper-V Checkpoints • When created, a checkpoint cannot be modified • Only viewed, applied, exported, renamed, or deleted • Checkpoint creation steps: 1. 2. 3. 4. 5. Pause virtual machine Create differencing disk for each disk that virtual machine is using Create a copy of virtual machine configuration Resume virtual machine Copy virtual machine memory to disk • Checkpoint consists of • Configuration file (*.xml) • Saved state file (*.vsv) • Memory content (*.bin) • Differencing disks (*.avhd) Overview of Checkpoints at File Level Snapshot .vhd .avhd Apply (create branch) Apply (= delete Now) Delete (= merge) Delete (= delete) Exporting Virtual Machines and Checkpoints • Exporting a virtual machine is not required • You can copy virtual machine files • Exporting virtual machine consolidate its files • If differencing drives are used, the entire hierarchy is exported • • Exporting multiple virtual machines increases total size When exporting a virtual machine, all its checkpoints are exported • Exporting a checkpoint exports only a single state • Differencing disks in checkpoint hierarchy are merged • Live export – you can export while a virtual machine is running • Update integration services after import • Discard memory content and saved state from different architecture or pre-Windows 2012 Hyper-V Issues with Checkpoints in Distributed Environments • Applying a checkpoint takes a virtual machine back to a previous state • Can have serious implications and result in corruption • Vector-clock synchronizations are impacted • Distributed applications depending on increasing logical clock • AD DS, DFS Replication, SQL Server replication • • Applying checkpoint rolls back the logical clock Members of replica set to not converge to the same state Cryptography - reducing entropy of the random data • Distributed applications using vector clock algorithms have no awareness of running in a virtual environment • Removes changes in virtual machine as if they never happened • • User data is lost, passwords are reverted • Regardless of whether they were already synchronized or replicated Issues with Checkpoints in Distributed Environments DC2 DC1 T1 Create Checkpoint USN: 100 ID: A RID Pool: 500 - 1000 Time +100 users Only 50 T2 T3 users are replicated to both domain controllers. Others are either on first or second USN: 200 domain controller. 100 users (RID 500-599) have ID: A Replication to DC2: USN >100 RID Pool: 600 - 1000 duplicated SIDs. Apply T1 Checkpoint DC1(A) @USN = 200 USN: 100 ID: A RID Pool: 500 - 1000 +150 users USN: 250 T4 ID: A RID Pool: 650 - 1000 Replication to DC2: USNs >200 DC1(A) @USN = 250 Checkpoints and Virtual Machine Generation ID • Designed to address issues of reverting to a past state 64-bit integer, tied to a virtual machine configuration • Generation ID passed to a virtual machine in the BIOS • • • Application can compare current and previous values If values differ, then something happened to virtual machine • Hypervisor must support virtual machine generation ID • Operating system in virtual machine must be generation ID-aware Virtual machine generation ID change Does not change Virtual machine starts from checkpoint Virtual machine is live-migrated Virtual machine restored from backup Virtual machine is paused or resumed Virtual machine is migrated Virtual machine is restarted Virtual machine is imported Hyper-V server is restarted Checkpoints and Virtual Machine Generation ID Checkpoints and Virtual Machine Generation ID Checkpoints and Virtual Machine Generation ID Lesson 5: Monitoring Hyper-V • Overview of Performance Monitoring • Monitoring a Hyper-V Host • Monitoring Virtual Machines • Resource Metering in Hyper-V Overview of Performance Monitoring • Monitors operating system and applications using system resources • Provides up-to-date information on performance • Health of the IT infrastructure • • Planning for future requirements • • Compare current activity with the baseline Whether current performance is sufficient Identifying issues • • Detecting problems Proactive (real-time) and reactive (historical data) • Windows Server 2012 R2 includes several tools • Operations Manager centralizes monitoring, alerting, and reporting for the enterprise Overview of Performance Monitoring Task Manager provides local, real-time performance data • Helps to identify and resolve performance-related issues Overview of Performance Monitoring Resource Monitor provides in-depth real-time performance data • CPU, Memory, Disk, Network Overview of Performance Monitoring Event Viewer shows events that relate to server activity • Collected locally and remotely • Filtering, custom views, attaching tasks to the events Overview of Performance Monitoring Reliability Monitor provides an historical view of server reliability and associated events Overview of Performance Monitoring Performance Monitor provides real-time monitoring and viewing of historical data gathered by data collector sets • Additional performance objects added with server roles Monitoring a Hyper-V Host • Only Performance Monitor can monitor Hyper-V • Many Hyper-V performance objects added • Other tools monitor only their virtual environment • Parent partition is also considered a virtual machine • Memory, disk and network monitored the same • \Logical Disk(*)\Avg. Disk sec/Read and /Write • \Memory\Available Mbytes • \Network Interface(*)\Bytes Total/sec • Processor utilization based on available resources • Hyper-V allocates resources to each virtual machine • \Processor(*)\% Processor Time shows relative utilization • \Hyper-V Hypervisor Logical Processor(_Total)\% Total Run Time should be used Monitoring Virtual Machines • Virtual machine tools monitor the virtual environment Heavy utilization in virtual machine does not mean that Hyper-V host is heavy utilized (and vice versa) • Available resources adjusted based on server load • • Memory and disk counters are the same as on the server • Hyper-V performance counters should be used Hyper-V Hypervisor\Virtual Processors • Hyper-V Hypervisor Logical Processor \% Guest Run Time • Hyper-V Virtual Network Adapter(*)\Bytes/sec • • Limit the processor resources that the virtual machine can use Resource Metering in Hyper-V • Track resources used by virtual machine or pool • Processor, disk, memory, network • Can be used for charge back • Resource metering data follows a virtual machine • Configure by using Windows PowerShell • Enable-VMResourceMetering, Measure-VM • • • • • Average CPU usage Average physical memory usage Minimum/maximum memory usage Maximum amount of disk space allocated to a virtual machine Total incoming/outgoing network traffic for a network adapter • Graphical reporting is not included • Basic reporting in Windows PowerShell Microsoft Virtual Academy Module 4 Creating and Configuring Virtual Machine Networks Module Overview • Creating and Using Hyper-V Virtual Switches • Advanced Hyper-V Networking Features • Configuring and Using Hyper-V Network Virtualization Lesson 1: Creating and Using Hyper-V Virtual Switches • Overview of the Hyper-V Virtual Switch • Types of Virtual Switches • What Is VLAN Tagging? Overview of the Hyper-V Virtual Switch • Software implemented layer two switch • Connects virtual machines to virtual and physical networks • Parent partition is also A virtual machine • Extensible, has advanced features, can be replaced • Policy enforcement, isolation, traffic shaping, protection • Managed by Hyper-V Manager and Windows PowerShell • Get-VMSwitch • Parent partition can have multiple virtual NICs • Can be connected to different virtual switches • Can have different bandwidth limitations Overview of the Hyper-V Virtual Switch Overview of the Hyper-V Virtual Switch Overview of the Hyper-V Virtual Switch Types of Virtual Switches • Parent has physical network adapter(s) • Each virtual machine (and parent) has virtual network adapter(s) • Each virtual network adapter is connected to a virtual switch • Type of virtual switch is: • External – connects to a physical or wireless adapter • Internal – parent and virtual machine connections only • Private – virtual machine connections only • Configuration • Use Virtual Switch Manager to create virtual switches • Use virtual machine settings to connect a virtual network adapter to a switch Types of Virtual Switches Private Virtual machine Parent App App Virtual machine App Parent App Internal Virtual machine App Virtual machine Parent App NAT Virtual machine Virtual App machine App App External Virtual machine Parent - Physical network adapter - Virtual network adapter - Virtual switch App IP App IP Virtual machine IP No IP App Types of Virtual Switches Types of Virtual Switches Types of Virtual Switches Types of Virtual Switches Types of Virtual Switches Types of Virtual Switches Types of Virtual Switches What Is VLAN Tagging? • Used to isolate network traffic for nodes that are connected to the same physical network • VLANs are used by Hyper-V to Isolate Hyper-V server management networks • Isolate virtual machines that are connected to external virtual switches • Isolate virtual machines on a single Hyper-V server • • VLAN ID can be configured on Virtual machine network adapter • External and Internal virtual switch • • VLAN is limited to a single physical subnet • VLAN ID has 12 bits (up to 4,094 VLAN IDs) Lesson 2: Advanced Hyper-V Networking Features • Virtual Switch Expanded Functionality • Virtual Switch Extensibility • What Is SR-IOV? • What Is Dynamic Virtual Machine Queue? • Network Adapter Advanced Features • NIC Teaming in Virtual Machines Virtual Switch Expanded Functionality • ARP/Neighbor Discovery Poisoning protection • Protects against ARP and Neighbor Discovery spoofing • DHCP Guard protection • Protects against rogue DHCP server in virtual machine • Port ACLs • Enables isolation by allowing/denying traffic • Trunk mode to a virtual machine • Trunk mode forwards traffic from multiple VLANs • Network traffic monitoring • Bandwidth limit and burst support Virtual Switch Extensibility • Extensible • NDIS filter drivers • WFP callout drivers • Extensions • Ingress • Forwarding • Egress • Monitoring • Virtual switch can be replaced Virtual machine Virtual machine NIC Parent partition Host NIC Virtual machine Virtual machine NIC Hyper-V virtual switch Extension protocol Capture extensions WFP extensions Filtering extensions Forwarding extension Extension miniport Physical NIC What Is SR-IOV? • Requires support in network adapter • Provides Direct Memory Access to virtual machines • • • • Increases network throughput Reduces network latency Reduces CPU overhead on the Hyper-V server Virtual machine bypasses virtual switch • Supports Live Migration • Even when different SRIOV adapters are used Parent partition Virtual switch Routing VLAN Filtering Virtual machine Virtual NIC VMBUS Virtual Function Physical SR-IOV Physical NIC NIC Network with SR-IOV Network I/OI/O without SR-IOV What Is Dynamic Virtual Machine Queue? • Network adapter uses receive queues to route traffic to the appropriate virtual machine Physical network adapter must support VMQ • Dynamically use multiple CPUs when processing virtual machine network traffic • DMA reduces CPU overhead on Hyper-V server • Beneficial when virtual machines receive lot of network traffic • • VMQ is automatically configured and tuned • Based on processor networking and CPU load • VMQ is enabled by default on a virtual network adapter • Used only if the physical network adapter supports VMQ Network Adapter Advanced Features • Same features available for all virtual network adapters • Features are implemented in Hyper-V virtual switch NIC Teaming in Virtual Machines • Provides redundancy and aggregates bandwidth • Can be used at the operating system and virtual machine level • Multiple physical network adapters in an NIC team • • If a physical adapter fails, virtual switch has connectivity Multiple virtual network adapters in an NIC team • If a virtual switch fails, virtual machine has connectivity • Particularly important when SR-IOV is used SR-IOV traffic bypasses the virtual switch • Intended and optimized to support teaming of SR-IOV • • May be used with any virtual network interface • Virtual machine must have multiple network adapters Connected to different virtual switches • MAC address spoofing must be enabled • Lesson 3: Configuring & Using Hyper-V Network Virtualization • Providing Multitenant Network Isolation • What Is Network Virtualization? • Benefits of Network Virtualization • What Is Network Virtualization Generic Routing Encapsulation? • What Are Network Virtualization Policies? Providing Multitenant Network Isolation • Multiple isolated networks on the same infrastructure • VLANs are often used • Limited scalability (maximum of 4094 VLANs) • VLANs cannot span multiple subnets • Challenging to reconfigure when adding or moving virtual machine Switch VLAN ID Virtual machines Switch Providing Multitenant Network Isolation Private VLANs • Addresses some VLAN scalability issues • Reduces number of IP subnets and VLANs • Virtual switch can limit virtual machines to the same VLAN • Port ACLs • Challenging to manage and update ACLs Hyper-V virtual switch supports private VLANs and port ACLs • The solution is Software Defined Networking Network virtualization is an implementation of Software Defined Networking • Hyper-V enables network virtualization • What Is Network Virtualization? Blue virtual machine Red virtual machine Physical server Server virtualization • • Multiple virtual machines on a same physical server Each virtual machine is isolated from others Blue network Red network Physical network Network virtualization • • Multiple virtual networks on a same physical network Each virtual network is isolated from others Benefits of Network Virtualization • Flexible virtual machine placement • Multitenant network isolation without VLANs • IP address reuse • Live migration across subnets • Is compatible with existing network infrastructure • Transparent moving of virtual machines to shared IaaS cloud • Can be configured using Windows PowerShell • Can also use System Center 2012 R2 Virtual Machine Manager What Is Network Virtualization Generic Routing Encapsulation? 192.168.2.22 10.1.1.11 GRE MAC 192.168.5.55 Key=5001 10.1.1.12 192.168.2.22 10.1.1.11 GRE MAC 192.168.5.55 Key=6001 10.1.1.12 192.168.2.22 (Provider address ) 10.1.1.11 (Customer address) 10.1.1.11 10.1.1.11 10.1.1.12 • • 10.1.1.11 (Customer address) 10.1.1.11 10.1.1.11 10.1.1.12 192.168.5.55 192.168.5.55 (Provider address) 10.1.1.12 (Customer address) 10.1.1.12 10.1.1.11 10.1.1.12 10.1.1.12 (Customer address ) 10.1.1.12 10.1.1.11 10.1.1.12 Customer address space based on virtual machine configuration Provider address space based on physical network • Not visible to the virtual machines What Are Network Virtualization Policies? • Define customer address-provider address mappings Specify on which Hyper-V server virtual machines are running • Hyper-V implements policies by translating incoming and outgoing packets • If a virtual machine is moved, policies are modified • • Virtual machine configuration stays the same Policy Settings Blue Yonder Airlines SQL 10.1.1.1 WEB 10.1.1.2 Woodgrove Bank SQL 10.1.1.1 WEB 10.1.1.2 Provider Address Space Blue Yonder Airlines Customer Address Provider Address 10.1.1.1 192.168.1.10 10.1.1.2 198.168.1.12 Data Center Network 192.168.1.10 Hyper-V Host 1 192.168.1.12 Hyper-V Host 2 Woodgrove Bank Customer Address Provider Address 10.1.1.1 192.168.1.10 10.1.1.2 192.168.1.12 SQL SQL WEB WEB 10.1.1.1 10.1.1.1 10.1.1.2 10.1.1.2 Customer Address Spaces Microsoft Virtual Academy Module 5 Virtual Machine Movement and Hyper-V Replica Module Overview • Providing High Availability and Redundancy for Virtualization • Implementing Virtual Machine Movement • Implementing and Managing Hyper-V Replica Lesson 1: Providing High Availability and Redundancy for Virtualization • Why Is High Availability Important? • Redundancy in Windows Server 2012 R2 and Hyper-V Why Is High Availability Important? • Server downtime is unavoidable • Servers are not always available • Software or hardware maintenance or upgrade • Application and operating system updates • Component failure, power outages, natural disasters • Critical services must be constantly available • Running in virtual machines Availability Downtime (per year) • When fails or unavailable • It must be serviced elsewhere • Goal of high availability • Make services available • Even when failure occurs 99% 3.7 days 99.9% 8.8 hours 99.99% 53 minutes 99.999% 5.3 minutes Redundancy in Windows Server 2012 R2 and HyperV Disaster recovery • Hyper-V Replica for asynchronous replication • CSV integration with storage arrays for synchronous replication Application / Service failover • Non-cluster aware apps: Hyper-V app monitoring • Virtual machine guest cluster: iSCSI, Fibre Channel, .vhdx sharing • Virtual machine guest teaming of SR-IOV NICS I/O redundancy • NLB and NIC Teaming • Storage multi-path IO • Multichannel SMB Physical server failure Hardware failure • Live migration for planned downtime • Failover clustering for unplanned downtime • Windows hardware error architecture • Reliability, availability, serviceability Lesson 2: Implementing Virtual Machine Movement • Virtual Machine Moving Options • How Storage Migration Works • Overview of the Move Wizard • Live Migration of Non-clustered Virtual Machines Virtual Machine Moving Options • Virtual machine and storage migration • Includes from Windows Server 2012 to Windows Server 2012 R2 • Quick migration – requires failover clustering • Live migration requires only network connectivity • Improved performance in Windows Server 2012 R2 • Hyper-V Replica • Asynchronously replicate virtual machines • Configure replication frequency and extended replication • Exporting and Importing of a virtual machine • Exporting while virtual machine is running • Can import virtual machine without prior export How Storage Migration Works 1. Read/Write to source virtual hard disk Hyper-V server 2. Virtual hard disk is copied to destination Virtual machine Virtual hard disk stack 3. Writes are mirrored to source and destination virtual hard disks 1 2 5 Virtual hard disk 3 Virtual hard disk Compares with Storage vMotion 4 Virtual machine is running uninterrupted during the migration process 4. After virtual hard disk is synchronized, virtual machine switches to copied virtual hard disk Overview of the Move Wizard • Used for moving virtual machine or its storage • While virtual machine is running • Live migration or storage migration • • • • All virtual machine data can be moved to same location • • • Or you can specify location for each data item Or you can move only virtual hard disk Virtual machine data items • • Alternatively, use Windows PowerShell cmdlets Move-VM or Move-VMStorage Storage migration is enabled by default (two at the same time) Live migration must be enabled before moving virtual machine Virtual hard disks, current configuration, checkpoints, smart paging You can move only the virtual machine or also include data items Live Migration of Non-clustered Virtual Machines Compares with vMotion • Referred as a “shared nothing” live migration • Virtual machine data can be local or on an SMB share • Local: storage migration to move to target Hyper-V host • SMB: leave data on the SMB 3.0 share • In both cases virtual machine is moved • Storage migration and virtual machine move • Storage is migrated • Virtual machine memory is moved • Source storage is deleted • Live migration speed is affected by • Virtual machine memory size and modifications • Bandwidth between source and destination Hyper-V hosts Live Migration of Non-clustered Virtual Machines • Virtual machine memory is moved in iterations • Source is active and can be modifying memory • Modified memory pages are sent after initial copy • Repeats over newly modified pages • Final copy iteration takes less than TCP timeout • New MAC address is send to network switches Virtual machine memory State Configuration Virtual machine memory Source Hyper-V host Destination Hyper-V host Lesson 3: Implementing and Managing Hyper-V Replica • Prerequisites for Hyper-V Replica • Overview of Hyper-V Replica • Enabling a Virtual Machine for Replication • Hyper-V Replication Health • Test Failover, Planned Failover, and Failover • Hyper-V Replica Resynchronization Prerequisites for Hyper-V Replica • Windows Server 2012 with Hyper-V role • Hyper-V Replica is part of the Hyper-V role • At least two servers, usually in different sites • Sufficient storage to host virtual machines • Local and replicated virtual machines • Connectivity between primary and replica sites • Windows firewall configured to allow replication • Hyper-V Replica HTTP and Hyper-V Replica HTTPS • X.509v3 certificate for mutual authentication • If certificate authentication is used • Otherwise, Hyper-V hosts must be in the same AD DS forest Overview of Hyper-V Replica • Hyper-V Replica has the following components: • Replication engine • • Change tracking module • • Provides a secure and efficient channel to transfer data Hyper-V Replica Broker server role • • Keeps track of the write operations in the virtual machine Network module • • Manages replication configuration and handles initial replication, delta replication, failover, and test-failover Provides seamless replication while a virtual machine is running on different failover cluster nodes Management tools • Hyper-V Manager, Windows PowerShell, Failover Cluster Manager Overview of Hyper-V Replica Enabling a Virtual Machine for Replication • Replication is enabled per virtual machine • Enable Replication Wizard • • • • • • Replica server Connection parameters Choose replication VHDs Chose replication frequency Configure additional recovery points Choose initial replication method • Failover TCP/IP Settings Virtual machine • Preconfigure IP address for replica virtual machine • Requires integration services • Should be configured on both the primary and replica server Hyper-V Replication Health • Normal • Less than 20% replication cycles are missed • Last synchronization point was less than an hour ago • Average latency is less than the configured limit • Warning • • • • • Greater than 20% of replication cycles have been missed More than hour since the last send replica Initial replication has not been completed Failover initiated, but not ‘reverse replication’ Primary virtual machine replication is paused • Critical • Replica paused on the replica virtual machine • Primary server unable to send the replica data Test Failover, Planned Failover, and Failover • Test failover • Non-disruptive testing, with zero downtime • New virtual machine created in recovery site • • • From the replica checkpoint Turned off and not connected Stop Test Failover • Planned failover • Initiated at primary virtual machine which is turned off • Sends data that has not been replicated • Fail over to replica server • Start the replica virtual machine • Reverse the replication after primary site is restored Test Failover, Planned Failover, and Failover • Failover • Initiated at replica virtual machine • • • Primary virtual machine has failed (turned off or unavailable) Data loss can occur Reverse the replication after primary site is recovered • Other replication-related actions • Pause Replication and Resume Replication • View Replication Health • Extend Replication • Remove Recovery Points • Remove Replication Hyper-V Replica Resynchronization • When normal replication process is interrupted • Change tracking issues on primary server • Replication issues with tracking logs • Problems linking virtual hard disk with parent • Time travel – virtual machine restored from backup • Reverse replication after failover process • Processor, storage, and network intensive • Configured on primary virtual machine • Manual, automatic, or during scheduled time • If more than 6 hours, perform full initial replication Microsoft Virtual Academy Module 6 Implementing Failover Clustering with Hyper-V Module Overview • Configuring and Using Shared Storage • Implementing and Managing Failover Clustering with Hyper-V Lesson 1: Configuring and Using Shared Storage • Storing A Virtual Machine on an SMB 3.0 Shared Folder • Using Scale-Out File Server • Shared Storage for Clustering • Using Virtual Hard Disk Sharing as Shared Storage Storing A Virtual Machine on an SMB 3.0 Shared Folder • Hyper-V supports SMB 3.0 or newer • Hyper-V uses file share is used as cluster shared storage • Continuously available shares are recommended • All virtual machine storage can be on an SMB share • Configuration, virtual hard disks, checkpoints • SMB Share – Applications profile should be used • No access-based enumeration or share caching • Full permissions on NTFS folder and SMB share • Hyper-V administrators • Computer account of Hyper-V host • Hyper-V cluster computer account, if Hyper-V clustered Using Scale-Out File Server • File server role cluster can work in two modes: • Scale-out file server cluster • File server cluster for general use • Benefits of scale-out file server cluster: • Active-Active file shares • Increased bandwidth CHKDSK with zero downtime • CSV cache • Simple management • Automatic scale-out rebalancing • • • Clients redirected to the best node for access to a share Avoids unnecessary traffic redirection Using Virtual Hard Disk Sharing as Shared Storage • A failover cluster runs inside virtual machines • A shared virtual disk used as a shared storage • Virtual machines do not need access to iSCSI or FC SAN • Presented as virtual SAS disk • Can be used only for data • Requirements for shared virtual disk • Virtual hard disk must be in .vhdx format • Connected by using a virtual SCSI adapter • Stored on a scale-out file server or CSV • Supported operating systems in a virtual machine • Windows Server 2012 or Windows Server 2012 R2 Lesson 2: Implementing & Managing Failover Clustering with Hyper-V • Overview of Failover Cluster • Configuring Highly Available Virtual Machines • Virtual Machine Monitoring • What Is the Hyper-V Replica Broker Role? • What Is CAU? • What is Live Migration? Overview of Failover Cluster • Up to 64 physical servers and 6,000 VMs • Built-n hardware and software validation • Shared storage using SMB, iSCSI, Fibre Channel, Fibre Channel over Ethernet (FCoE) or Serial-Attached SCSI (SAS) Compares with VMware HA Configuring Highly Available Virtual Machines • High Availability Wizard • Virtual machine storage is on shared storage • CSV or SMB 3.0 continuously available share • Virtual machine startup priority • Higher priority is started before lower priority • No auto start, must restart manually after failover • Preferred owners • Virtual machine will start on preferred Hyper-V host • Start on possible owner only preferred owners are unavailable • If preferred and possible owners are unavailable, virtual machine will move to other failover cluster node, but not start Configuring Highly Available Virtual Machines • AntiAffinityClassNames • Clustered roles in same AntiAffinityClassNames avoid same cluster node • Prevents virtual machines from running on the same node • Configured in Windows PowerShell or System Center 2012 Virtual Machine Manager • Options to modify failover and failback settings • Number of times to restart a clustered role • Prevent failback of the clustered role to preferred node • Virtual machine Policies settings • Virtual machine Heartbeat monitoring • Requires integration services in virtual machine Virtual Machine Monitoring Compares with VMware App HA • Application health detection in virtual machine • Monitor services through Service Control Manager • Configure service recovery to take no action Monitor events in System, Application, or Security logs • Windows Server 2012 or newer required • • Configurable recovery actions • Restart service • Restart virtual machine • Fail over virtual machine • Virtual machine network and storage protection • Failure of virtual hard disk or lost network connectivity • Virtual machine moved to different cluster node What Is the Hyper-V Replica Broker Role? ServerA Server1 ServerB ServerC Server2 Replic a broke Server3 r Failover cluster 1 Failover cluster 2 What is Live Migration? on the host to perform compression • Compressed memory sent across the network faster • Operates on networks with less than 10 gigabit bandwidth available • Enables a 2X improvement in Live Migration performance MEMORY • Utilizes available CPU resources Modified memory pages Configuration Memory content data IP connection iSCSI, FC or SMB Storage Microsoft Virtual Academy End of Day 1 Course Summary Summary What have we learned about Hyper-V? Host & Virtual Machine Configuration with inbox tools Resilient Hyper-V Infrastructure with Failover Clustering Virtual Machine Migration, Backup & Replication What will we learn about System Center? Resources Hyper-V Overview - http://technet.microsoft.com/library/hh831531 Competitive Advantages of Hyper-V - http://download.microsoft.com/download/E/8/E/E8ECBD78-F07A-4A6F9401-AA1760ED6985/Competitive-Advantages-of-Windows-Server-Hyper-V-over-VMware-vSphere.pdf Technical Documentation | Virtual Machine Manager: http://www.microsoft.com/enus/download/details.aspx?id=6346 Technical Documentation | App Controller: http://www.microsoft.com/en-us/download/details.aspx?id=29694 Technical Documentation | Operations Manager: http://www.microsoft.com/enus/download/details.aspx?id=29256 Technical Documentation | Data Protection Manager: http://www.microsoft.com/enus/download/details.aspx?id=29698 Technical Documentation | Service Manager: http://www.microsoft.com/en-us/download/details.aspx?id=27850 Technical Documentation | Orchestrator: http://www.microsoft.com/en-us/download/details.aspx?id=29258 Cloud Services Process Pack Download: http://www.microsoft.com/en-us/download/details.aspx?id=36497 Microsoft Virtual Machine Converter Download: http://www.microsoft.com/enus/download/details.aspx?id=34591 System Center PowerShell Deployment Toolkit: http://gallery.technet.microsoft.com/PowerShell-Deployment797b3c6d Next Steps Come back tomorrow! Download evaluation software http://aka.ms/CampEval Learn more http://aka.ms/CampMVAWS http://aka.ms/CampMVASC http://www.microsoft.com/learning/en-us/course.aspx?ID=20409A&Locale=en-us Get certified http://www.microsoft.com/learning/en-us/exam.aspx?id=74-409