Understanding Virtualization in Longhorn Server What
Transcription
Understanding Virtualization in Longhorn Server What
Understanding Virtualization in Longhorn Server Presented by Mark Minasi [email protected] Talk originally created by Michael Otey Technical Director Windows IT Pro Magazine What this session covers • • • • Virtual machine basics Virtualization scenarios Virtualization with Virtual Server 2005 R2 Virtualization with Windows Server Longhorn and the Hypervisor • Managing VMs with upcoming tools • FAQs about Windows Server Virtualization Virtual Possibilities • Create a set of uniform server builds, even on dissimilar hardware • Simplify disaster recovery • Reduce hardware costs • Reduce infrastructure costs • Simplify testing • Archive existing systems • Virtual "appliances" and easily-implemented demonstration software Understanding Virtual Machines Basic Ideas • Take an actual computer • Build software to allow it to create imaginary computers, "virtual machines" • After creating a virtual machine, it acts like a computer without an OS when booted • Install software on it just as you would on an actual machine Virtual Virtual Machine Virtualization Applications Applications Guest OS (Windows NT) Guest OS (Windows 2000) Virtual Machine Virtual Machine Physical Virtual Machine Manager Host Operating System System Hardware Applications Guest OS (Windows 2003) Virtual Machine Major Players • Microsoft Virtual Server 2005 R2, Microsoft Virtual PC 2007 • Longhorn Server "Hypervisor" • VMWare Workstation ($), VMWare Server, VMWare Player, VMWare ESX ($) • Xensource Xen This Isn't New! • Need in the early 80s for virtual machine managers for PC-DOS/MS-DOS apps • Very hard to do until 386 architecture arrived • The difference: a special "v86" mode • Exploited by Windows 386, DesqView, Windows 3, OS/2 2.x and even by Windows NT But It Stopped There… • So the 386 was excellent at creating bunches of imaginary 8086s • But not at creating imaginary 386es! • Rumors had it that a new chip, the 80486, could virtualize itself • But it never really happened; there wasn't a Pentium-class chip that could fully virtualize a Pentium-class chip So How Does Virtual PC Do It? • It should be impossible, then, to create virtual machine managers • But some smart folks figured it out • The original tool that eventually became Virtual PC actually emulated Pentiums on a Mac • Another group out of CMU figured another way But Virtual Machines are Limited… • VMMs make Pentium-type systems simulate more Pentiums • But while they work by emulating hardware, they do not emulate CPUs, as that would be far too slow • Thus, at some point the VMM has to hand instructions ("opcodes") over to the actual processor • Much of the issue lies also in the four Intel "rings" of privilege (3's the lowest, 0 most power) Problem and Solution • There are ten opcodes that can "get out of hand" VMM wise • Answer: new line of chips that include a new "ring -1" privilege • Intel: "Vanderpool" "VT" technology • AMD: "Pacifica" or "V" technology • AMD's implementation is a superset of Intel's • Not compatible, so VMMs must recognize and handle AMD and Intel changes, or just limit it self to the common capabilities More on V/VT • Bottom line: we finally have Pentiums that can fully virtualize Pentiums! • Intel manages VM memory in software, AMD does it in hardware • Adding the 10 opcodes and "ring -1" makes building VMWare, Virtual Server and Xen much easier, and makes the VMMs more reliable Virtualization Overview • Virtual Machine Guest Environment Where VMs Live • While not running, a VM is nothing more than a set of files representing – the hard disk(s) on a VM – the contents of RAM when "snapshotted" – configuration info • Microsoft stores this in a file with the extension ".vhd" • VMWare uses ".vmdk" VM Hard Disk Options • Virtual Hard Disks – Fixed – Dynamic • Virtual Hard Disk Features – Snapshots – Undo disks – Differencing Disks/"Cloning" VMs VM Networking Options • Virtual Networking – None – Internal – External (Bridged) – "Virtual subnets" Virtual Machine Additions • Installed after the guest OS – Typically from installed IS image – Improves VM performance • • • • • • • Enhanced SVGA video drivers Improved mouse support Drag-and-drop with the host Time synchronization MS name: "Virtual Machine Additions" VMWare name: "VMWare Tools" Can cause some real troubles when converting MS<->VMWare, so remove them beforehand! 64-bit Support • 64-bit host support – Windows Server SE and EE x64 • x64 eliminates physical memory restrictions • 64-bit Virtual Machine Manager – Larger kernel address space 64-Bit Benefit • 64 bit OSes are quite useful, but… • They present some compatibility issues • For example, x64 Windows does not run 16 bit apps (and you'd be surprised how many little apps are still 16 bit, including installers!) • Answer: create a VM with a 32-bit OS, and you can run that 16-bit app What About Licensing? • Typically software vendors want you to buy a license for every virtual machine or physical machine you install the software on • Microsoft offers preferential licensing options for people using their OS software on their virtualization platforms • Confusingly, MS forbids creating VMs from some of its OSes • Check your licenses before implementing! Virtual Server 2005 R2 • Features – 64-bit host support – Web-based management – New support for Linux distributions – Support for Microsoft clusters • Limitations – No 64-bit guest support – No guest audio – No guest USB VS2005 R2 MSCS Host Support • Support for Microsoft Clustering Services – Windows Server 2003 Enterprise Edition or Datacenter Edition • VS is MSCS clusteraware – Eliminates single point of failure – Automatic VM startup Virtual Server 2005 R2 SP1 • Intel-VT & AMD-V-Aware – Better performance – Better Linux interoperability • VSS Support (backups while running) • VHD Mounting on Host • Improved Backup & DR Windows Server 2003 R2 • Applies to any virtualization product running on Windows Server 2003 R2 • VM licensing changes – Windows Server 2003 Enterprise Edition R2 • Base OS • Four additional VM OS – Windows Server 2003 Datacenter Edition • Unlimited VMs – Even Vista Enterprise gets in the act! • SQL Server (Enterprise) offers unlimited VMs as well Interop 1: P2V • Take an existing physical server and make it run as a virtual server • Usually not very automatic, but it's possible and getting better – MS has a P2V wizard that works with Enterprise Server 2003 R2 – VMWare has the "VMWare Converter" in free and forpay versions • All P2V tools have improved immensely in the past 18 months • Good news coming soon in the MS world Interop 2: MS/VMWare • VMWare's free converter can change vmdk files to and from vhd files • In some cases Microsoft forbids this license-wise, although of course there's no physical barrier • This will all probably settle out eventually When Does Virtualization Make Sense? • • • • Server consolidation Lab and Deployment Testing Training Disaster Recovery Server Sprawl • New application = new (underutilized) server Application Application File/Print Application File/Print Database Database Application Application File/Print Application Application Application We can put multiple functions on a single box, but we tend not to Server Consolidation • Increase hardware utilization • Reduced costs – – – – Fewer systems Less power Less cooling Lower IT resources • Reduced Infrastructure – Fewer racks – Fewer switches Lab and Deployment Testing • Build a test virtual network infrastructure • Duplicate physical model – Same domain structure and system names – Virtual network clients • Reduced physical system requirements – No need for 1-1 physical systems • Virtual networking – Connects virtual systems – Isolated from production network Training • Present and reset training image – Just reset the VM – No need to reimage the systems – Network isolation Disaster Recovery • Fewer servers to manage and recover/restore – Reduces costs • Server VMs are hardware independent – Can be restored to other platforms – No need to match primary site and secondary site hardware • VMs are encapsulated – Faster – Can be replicated between sites – No need for bare-metal installs Disaster Recovery • Physical-to-VM recovery – Restore physical backup to running VM – Lower costs – no need for 1-to-1 physical servers • VM-to-VM recovery – Protects against operating system/application failure – Recover failed VM on another server Disaster Recovery • How's it done? • Remember, when inactive a VM is nothing more than a folder full of files • The only issue is how to get it backed up • You can just take the server down for a bit, but the better answer involves online backup • MS's answer (VS 2005 R2 SP1) is free, VMWare's isn't High Availability for Hosts Primary Site Recovery Site Virtual Server Host Clustering Primary Site Recovery Site Windows Server Longhorn Virtualization Windows Virtualization Platforms VM 2 VM 3 VM 1 “Parent”” Virtualization Platform and Management VM 2 “Child” VM 2 “Child” Virtual Server 2005 R2 Windows Server 2003 Hardware Virtual Hard Disks (VHD)) Windows Hypervisor Benefits • Better performance – Small hypervisor – Utilizes Processor virtualization • Intel-VT and AMD-V, full opcode support • Small host footprint – Combine with Windows Server Core – Headless Virtual Server Host • Managed using RDP, WinRS or whatever ESX Server vs. Windows Server • Monolithic hypervisor • Microkernel hypervisor – – – – – Simpler than a modern kernel – Still complex – larger hypervisor – Contains its own drivers model VM 1 (“Admin”) VM 2 Simple partitioning functionality Lightweight hypervisor No third-party code Drivers run within guests VM 1 (“Parent”) Virtualization Stack VM 3 Hypervisor Drivers Drivers Drivers Drivers Drivers Drivers VM 2 (“Child”) VM 3 (“Child”) Drivers Drivers Drivers Drivers Drivers Drivers Hypervisor Hardware Hardware Windows Server Virtualization VMware ESX Virtualization Windows Server & Xen-enabled Linux Provided by: OS Applications Applications Applications Windows virtualization MS/XenSource Longhorn Server Windows Kernel VSP VMBus Windows Server 2003, “Longhorn”” Windows Kernel VSC VMBus Windows hypervisor Server Hardware Xen-enabled Basic Linux Kernel Linux Kernel VSC Emulation VMBus ISV/IHV/OEM Virtual Server vs WSL Virtual Server 2005 R2 Windows Server Virtualization 32-bit VMs? Yes Yes 64-bit VMs? No Yes Multi-processor VMs? No Up to 8 processor VMs VM memory support? 3.6 GB per VM Up to 32 GB per VM No Yes Hot add memory/processors? Hot add storage/networking? No Yes Managed by System Center Virtual Machine Manager? Yes Yes Microsoft Cluster support? Yes Yes Scriptable/Extensible? Number of running VMs? User interface Yes, COM Yes, WMI 64 Limited only by hardware resources Web Interface MMC 3.0 Interface System Center VM Manager • Provides P2V • Uses historical MOM info to identify the best machines for P2Ving • "Intelligent Placement" assists in identifying which particular physical systems would best host a given VM • Optimizer helps you tune both a VM and its PM to get the best throughput • Maintains VHD repository • Totally PowerShell-able! Centralized Management for VS2005 & Windows Server By Resource Pool By VM State By Owner By Creation Date By Operating System Intelligent Virtual Server Placement Subset physical hosts to appropriate resource pool(s) Rank-ordered recommendations of physical hosts for placement of virtual machine. End User Provisioning Ability to control owned virtual machines Thumbnails of all owned virtual machines Virtualization FAQs • Do I need to license Guest OSes? – Guest OS must be licensed – Clients need CALs – The exception is Windows Server 2003 R2 Enterprise Edition, Datacenter Edition and Vista Enterprise • How does guest CPU licensing work? – Virtual CPUs count toward CPU license – Not physical host CPUs (!) Virtualization FAQs • Will host clustering be supported with the Windows Server Hypervisor? – Yes, WSL Hypervisor supports all of the features in Virtual Server 2005 R2 + • Is the Hypervisor included with Longhorn Server? – No. The Hypervisor is a separate download that will be available within 180 days of the windows Server Longhorn RTM Virtualization FAQs • Are Virtual Server VM images compatible with the Windows Server Hypervisor? – Yes. They use the same format, VHD • Will the Windows Server Hypervisor support 64-bit hosts and guests? – Yes. Unlike VS2005 the hypervisor provides x64 support for hosts and guest VMs. Microsoft Virtualization Infrastructure Applications Management Interoperability Licensing Virtual server 2005 R2, Windows Server Longhorn Hypervisor, Intel-VT & AMD-V SoftGrid, Rapid no-touch deployment System Center Virtual Machine Manager, P2V, Intelligent resource utilization Licensed .VHD format, XENSource Windows Server 2003 R2 EE & DE, Windows Vista Thank You! Mark Minasi [email protected] www.minasi.com Free tech newsletter and online forum there as well