Benjamin Armstrong Program Manager Microsoft Corporation SVR318
SVR310 - Up-close and personal with Virtual Machines and SCVMM SVR314 - High Availability for physical and virtual environments with Windows Server 2008 SVR301 - How Windows Server 2008 Impacts IT Infrastructure CLI319 - Pulling Microsoft Virtualization Products Together to Create a Virtualized DataCenter
Microsoft virtualization roadmap Virtualization Architectures CPU virtualization Memory virtualization Device virtualization Networking Kernel Enlightenment Management XenSource Collaboration
Improve Utilization Consolidation increases hardware utilization Scales on MP/multi-core systems Lower Operational Costs Management tools reduce costs Workloads can be hardware agnostic Increase Availability For planned and unplanned downtime Building block for business continuity Increase Responsiveness Rapid and self provisioning of services
Microsoft Virtual Server 2005 R2 Virtual Server MOM Management Pack System Center Virtual Machine Manager Virtual Server 2005 R2 SP Microsoft Virtual Server 2005 R2 SP1 Beta Virtual Server MOM Management Pack R2 System Center: Virtual Machine Manager Beta 2006 Windows Server Virtualization Within 6 months of Windows Server 2008 Windows Server Virtualization Within 6 months of Windows Server
Improved performance and scalability 100% improvement on transactional workloads 64-bit (x64) host support for greater scalability High availability Host clustering for both planned and unplanned downtime Linux guest support Free
Intel Virtualization Technology / AMDV support Increased reliability and performance Much better experience when consolidating Linux VSS support Improved Backup and DR scenarios VHD Mounting on host
Hypervisor based solution for Windows Integrated virtualization “role” New IO sharing model for better performance Standards based management API Windows virtualization platform for partners
Production Server Consolidation Business Continuity Management Test and Development
Physical consolidation Improve and maximize hardware utilization Consolidate workloads onto fewer highly scalable and reliable enterprise class servers Reduce TCO Physical plant Reduce electrical costs for cooling and server power consumption Reduce datacenter physical footprint Server management Ease management and reduce operational costs by moving to a standardized platform Increase business agility by moving to dynamic platform Server consolidation is the fundamental driving force behind the virtualization of servers
Business continuity is a comprehensive process that includes Disaster and business recovery Business resumption and contingency planning For a global organization, this is particularly difficult as they provide “follow the sun” services Ensure continuity or uninterrupted provision of operations and services Reduce service interruptions Provide scalable, high-availability solutions Improve disaster and business recovery Provide robust enterprise management Business Continuity Management is the ability to minimize scheduled and unscheduled downtime
Physical consolidation Improve and maximize hardware utilization Consolidate workloads onto fewer servers Reduce TCO Physical plant Reduce electrical costs for cooling and server power consumption Reduce physical footprint Lifecycle management Reduce time to migrate new software from Dev to Test to Production Increase business agility by moving to a dynamic platform Streamline test and development efforts Reduce time provisioning test/development environments Rapid duplication of a production environment Maximizing test hardware, reducing costs, improving lifecycle management, and improving test coverage
Building a new platform for virtualization in Windows Designed to be flexible and extensible Designed for long term development Designed for use outside of pure virtualization scenarios
Virtualization poses many problems CPU, Memory, Devices, etc… Each problem has multiple potential solutions Pros and cons not always obvious Nor are they necessarily significant
Host OS VMM Guest 1Guest 2 VMM Guest 1Guest 2 Host OSVMM Guest 1Guest 2 Type-2 VMMType-1 VMM (Hypervisor) Hybrid VMM Examples: JVM CLR Examples: Virtual PC Virtual Server Examples: Windows Virtualization Hardware
Monolithic hypervisor Simpler than a modern kernel, but still complex Contains its own drivers model Microkernelized hypervisor Simple partitioning functionality No third-party code Drivers run within guests VM 1 (Admin) VM 1 (Admin) VM 3 Hardware Hypervisor VM 2 (“Child”) VM 2 (“Child”) VM 3 (“Child”) VM 3 (“Child”) Virtual- ization Stack VM 1 (Parent) Drivers Hypervisor VM 2 Hardware Drivers
Very thin layer of software Highly reliable Much smaller Trusted Computing Base (TCB) No built-in driver model Leverage the large base of Windows drivers Drivers run in a partition Will have a well-defined, published interface Allow others to create support for their OS’s as guests Hardware virtualization assists are required Intel Virtualization Technology AMDv
The hypervisor restricts itself to managing a minimum set of hardware Processors Local APICs Constant-rate system counter System physical address space Focus is on scheduling and isolation Hardware Windows hypervisor Parent Partition Server Core Apps OS 1OS 2 Apps Child Partition
Hardware Windows hypervisor Parent Partition Server Core Apps OS 1OS 2 Apps Child Partition In Windows virtualization, the parent partition manages the rest IHV drivers Processor power management Device hot add and removal New drivers are not required
Guests communicate with the hypervisor via hypercalls Hypervisor equivalent of a syscall Detected via CPUID Configured via MSR Simple format One input page, one output page Specify pages by physical address, then jump to known address
Higher level abstractions are available in Windows partitions WinHv.sys provides a C language wrapper Windows Server Core Virtualization Stack WMI Provider WinHv.sys Hardware Windows hypervisor VmBus.sys Windows WinHv.sys VmBus.sys
User mode code on x86 / x64 processors can be natively virtualized Kernel mode code is more problematic Emulation / Binary Translation Ring compression This is not possible on x64 due to lack of ring 1 and 2 Hardware virtualization support
Windows Server 2003 or XP Kernel VMM Kernel Mode User Mode Virtual Server Service IIS Virtual Server WebApp Provided by: Microsoft ISV OEM Virtual Server “Designed for Windows” Server Hardware Guest Kernel VMM Guest Applications Host OSGuest OS
Windows Server 2003 or XP Kernel VMM Kernel Mode User Mode Virtual Server Service IIS Virtual Server WebApp Provided by: Microsoft ISV OEM Virtual Server “Designed for Windows” Server Hardware Ring 1: Guest Kernel Windows (NT4, 2000, 2003) VM Additions Ring 0: Kernel Mode VMM Ring 3: User Mode Guest Applications Host OSGuest OS
Windows Server 2003 or XP Kernel VMM Kernel Mode User Mode Virtual Server Service IIS Virtual Server WebApp Provided by: Microsoft ISV OEM Virtual Server “Designed for Windows” Server Hardware Guest Applications Host OSGuest OS Guest Kernel
Parent Partition Child Partitions Kernel Mode User Mode Virtualization Service Providers (VSPs) Windows Kernel Server Core IHV Drivers Virtualization Service Clients (VSCs) Windows Kernel Enlightenments VMBus Windows hypervisor Virtualization Stack VM Worker Processes VM Service WMI Provider Applications “Designed for Windows” Server Hardware Provided by: Windows ISV OEM Windows Virtualization
Relatively easy due to MMU Memory block allocated by virtualization software and access to memory is then ‘swizzled’ through the MMU MMU operations inside virtualized environment now become very costly
Access to I/O is the performance ‘Achilles heel’ of virtual machines today Some approaches are: Device Emulation Device Abstraction Device Assignment
Virtual machine “sees” real hardware devices Each access to the “device” involves an intercept, sent to the parent virtual machine Performance is sub-optimal Compatibility with existing software can be perfect Microsoft provides emulations The hardware that is emulated is from ~1997, providing in-box compatibility with old OSes Requires a “monitor” partition that contains software for emulating the devices Physical devices can be shared among multiple guests
Windows Server 2003 or XP Kernel VMM Kernel Mode User Mode Virtual Server Service IIS Virtual Server WebApp Provided by: Microsoft ISV OEM Virtual Server “Designed for Windows” Server Hardware Ring 1: Guest Kernel Windows (NT4, 2000, 2003) VM Additions Ring 0: Kernel Mode VMM Ring 3: User Mode Guest Applications Host OSGuest OS
Uses abstract protocols to describe I/O Useful protocols already exist SCSI, iSCSI RNDIS RDP New device stack implementations in the secondary guests can be written that use these abstract protocols Protocol servers exist in a primary guest (parent), which is the partition that controls the physical devices Multiple secondary guests can share the services of a single hardware device Doesn’t require an emulator Doesn’t require a monitor partition
Virtual Device (VDev) A software module that provides a point of configuration and control over an I/O path for a partition Virtualization Service Provider (VSP) A server component (in a parent or other partition) that handles I/O requests Can pass I/O requests on to native services like a file system Can pass I/O requests directly to physical devices Can be in either kernel- or user-mode Virtualization Service Consumer (VSC) A client component (in a child partition) which serves as the bottom of an I/O stack within that partition Sends requests to a VSP VMBus A system for sending requests and data between virtual machines
A protocol for transferring data through a ring buffer A means of mapping a ring buffer into multiple partitions A definition for the format of the ring buffer A means of signaling that a ring buffer has gone non-empty A protocol for offering/discovering services A protocol for managing guest physical addresses A protocol for enumerating WDM device objects that represent a data channel A bus driver which implements all of those protocols A data transfer library which can be linked into a user-mode service or application A data transfer library which can be linked into a kernel-mode driver
Commands are placed in ring buffers Small data is placed in ring buffers Larger data is placed in pre-arranged pages shared between partitions Described by commands in ring buffers Largest data is mapped into another partition without copying
VMBus acts as a bus driver It can form the bottom of a device stack VSCs can be instantiated on top of VMBus (Names of components not finalized)
Parent Partition Child Partitions Kernel Mode User Mode Windows hypervisor Applications Provided by: Windows ISV OEM Windows Virtualization VMBus Windows File SystemVolumePartitionDisk Fast Path Filter (VSC) iSCSIprt Virtual Storage Miniport (VSC) Virtual Storage Provider (VSP) StorPort Hardware StorPort Miniport VM Worker Process Disk
How to get a network packet from the virtual machine to the wire Virtual Server uses a switched hub Simple, but not common Windows Server virtualization uses a full switch implementation Extensible through WMI interface
Windows kernel detects and communicates with hypervisor Avoids expensive calls and uses faster services provided by the hypervisor E.g. MMU Not ring compression Not kernel patching Windows uses a unified kernel All Windows kernels have enlightenments in place Windows Vista shipped with enlightenments
Virtual Server uses a single process space Virtual machines are separate threads Managed through COM API Windows Server virtualization uses a process per virtual machine Managed by a central service Use a WMI API
Config Component VMMS WMI Worker process State Machine IC Proxy RDP Encoder VDev Virtual Motherboard VID VSP Kernel Mode User Mode
VMMS WMI Responsibilities Controls all virtual machines WMI provider receives control commands from Management Console Creates one Worker Process for each VM instance Collaborates with Config component to configure VMs and VNSs – Virtual Network Switches Worker process to control VM Virtualization stack
Responsibilities Persistent configuration store for VMs and VNSs Key/value pairs Hierarchical organization Collaborates with VMMS Receives commands/send results Worker Process Communicates configuration changes Config Component Virtualization stack
Responsibilities Mediates communication with hypervisor Provides basic and advanced guest memory virtualization MMIO emulation, ROM emulation Provides instruction completion Collaborates with Hypervisor Makes requests to hypervisor by using the hypercall protocol VID Virtualization stack
Worker process State Machine IC Proxy RDP Encoder VDev Virtual Motherboard Instantiated for running or configuring one instance of a VM Contains VMB VDevs State Machine IC Proxy RDP Encoder Virtualization stack Worker process State Machine IC Proxy RDP Encoder VDev Virtual Motherboard
Microsoft and XenSource to develop Interoperable Virtualization Solutions Microsoft and XenSource will cooperate on the development of technology that will provide interoperability between Xen-enabled Linux and Microsoft’s hypervisor-based Windows Server virtualization By supporting heterogeneous environments, Microsoft is continuing its commitment to make Windows Server the most flexible virtualization solution
Parent Partition Kernel Mode User Mode Virtualization Service Providers (VSPs) Windows Kernel Longhorn Server Xen-enabled Linux Kernel VMBus Windows hypervisor “Designed for Windows” Server Hardware Xen-enabled Linux Guest Partition Applications Linux Virtualization Service Clients (VSCs) VMBus Virtualization Stack VM Service WMI Provider VM Worker Processes Hypercall Adapter Provided by: OS MS/XenSource ISV/IHV/OEM Windowsvirtualization
Windows virtualization information stem/virtualization/default.mspx Microsoft Virtualization Blogs Book Professional Microsoft Virtual Server
SVR310 - Up-close and personal with Virtual Machines and SCVMM SVR314 - High Availability for physical and virtual environments with Windows Server 2008 SVR301 - How Windows Server 2008 Impacts IT Infrastructure CLI319 - Pulling Microsoft Virtualization Products Together to Create a Virtualized DataCenter
© 2007 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.