Introduction to Virtualization
Total Page:16
File Type:pdf, Size:1020Kb
z Systems Introduction to Virtualization SHARE Orlando Linux and VM Program Romney White, IBM [email protected] z Systems Architecture and Technology © 2015 IBM Corporation Agenda ° Introduction to Virtualization – Concept – Server Virtualization Approaches – Hypervisor Implementation Methods – Why Virtualization Matters ° Virtualization on z Systems – Logical Partitions – Virtual Machines 2 z Systems Virtualization Technology © 2015 IBM Corporation Virtualization Concept Virtual Resources Proxies for real resources: same interfaces/functions, different attributes May be part of a physical resource or multiple physical resources Virtualization Creates virtual resources and "maps" them to real resources Primarily accomplished with software or firmware Resources Components with architecturally-defined interfaces/functions May be centralized or distributed - usually physical Examples: memory, disk drives, networks, servers Separates presentation of resources to users from actual resources Aggregates pools of resources for allocation to users as virtual resources 3 z Systems Virtualization Technology © 2015 IBM Corporation Server Virtualization Approaches Hardware Partitioning Bare-metal Hypervisor Hosted Hypervisor Apps ... Apps Apps ... Apps Apps ... Apps OS OS OS OS OS OS Adjustable partitions Hypervisor Hypervisor Partition Controller Host OS SMP Server SMP Server SMP Server Server is subdivided into fractions Hypervisor provides fine-grained Hypervisor uses OS services to each of which can run an OS timesharing of all resources do timesharing of all resources Physical partitioning Hypervisor software/firmware Hypervisor software runs on S/370™ SI-to-PP and PP-to-SI runs directly on server a host operating system Sun Domains, HP nPartitions z Systems LPAR and z/VM ® VMware GSX ® Logical partitioning POWER™ Hypervisor Microsoft Virtual Server IBM eServer™ pSeries ® LPAR VMware ESX Server HP Integrity VM HP vPartitions Xen Hypervisor KVM Characteristics: • Bare-metal hypervisors offer high efficiency and availability • Hosted hypervisors are useful for clients where host OS integration is important • Hardware partitioning is less flexible than hypervisor-based solutions 4 z Systems Virtualization Technology © 2015 IBM Corporation Hypervisor Implementation Methods Trap and Emulate Translate, Trap, and Emulate Virt Mach • VM runs in user mode Virt Mach • VM runs in user mode L • All privileged instructions L • Some IA-32 instructions must A cause traps A be replaced with trap ops ST ST PrivOp TrapOp L Trap Hypervisor PrivOp L Trap Hypervisor PrivOp emulation code emulation code ... ... Examples : CP-67, VM/370 Examples : VMware, Microsoft VS Benefits : Runs unmodified OS Benefits : Runs unmodified, translated OS Issues : Substantial overhead Issues : Substantial overhead Hypervisor Calls (“Paravirtualization”) Direct Hardware Virtualization Virt Mach • VM runs in normal modes Virt Mach • VM runs in normal modes L • OS in VM calls hypervisor L • Hardware does most of the A to access real resources A virtualization (SIE architecture) ST ST • Hypervisor provides control Hcall PrivOp Hypervisor L Call L Exit Hypervisor service service ... ... Examples : POWER Hypervisor, Xen Examples : z Systems LPAR, z/VM, Xen Benefits : High efficiency Benefits : High efficiency, runs unmodified OS Issues : OS must be modified to issue Hcalls Issues : Requires underlying hardware support 5 z Systems Virtualization Technology © 2015 IBM Corporation Server Virtualization Business Value Roles: Possible Benefits: Virtual Servers Consolidations High resource utilization Dynamic provisioning / hosting Great usage flexibility Workload management Enhanced workload QoS Workload isolation Virtualization High availability / security Software release migration Low cost of availability Mixed production and test Low management costs Physical Mixed OS types/releases Server Enhanced interoperability Reconfigurable clusters Legacy compatibility Low-cost backup servers Investment protection Virtualization can fill many roles and provide many benefits In the final analysis, its potential benefits take three forms: • Help reduce hardware costs – Help increase physical resource utilization – Small footprints • Can improve flexibility and responsiveness – Virtual resources can be adjusted dynamically to meet new or changing needs and to optimize service level achievement – Virtualization is a key enabler of on demand operating environments such as cloud • Can reduce management costs – Fewer physical servers to manage – Many common management tasks become much easier 6 z Systems Virtualization Technology © 2015 IBM Corporation z Systems Virtualization HiperSockets & Virtual Networking and Switching ° Multi-dimensional virtualization Web technology Sphere WebSphere Traditional SysAdmin – z Systems provides Test Apache OLTP and FTP Test Tools Batch logical (LPAR) and software (z/VM) Linux Linux CMS Linux WLM WLM Linux z/OS partitioning z/OS z/OS – PR/SM enables highly scalable virtual server z/VM Control Program z/VM hosting for LPAR and z/VM virtual machine I/O & Network environments Memory Memory Memory Memory – IRD coordinates allocation of CPU IFL Processors Processors and I/O resources among z/OS and L P A R L P A R L P A R L P A R non-z/OS ® LPARs* Intelligent Resource Director (IRD) Processor Resource / System Manager (PR/SM) * Excluding non-shared resources like Integrated Facility for Linux processors 7 z Systems Virtualization Technology © 2015 IBM Corporation LPAR Logical CPU Dispatching and Execution Control Logical CPU SIE: Start Interpretive Program “instruction” Execution Instruction stream Instructions Hardware Load Load, Store, Add, ... Store Problem state Instructions Instruction Add Execution Controls Hardware or Firmware High-Frequency Start Subchannel, SSCH Control Instructions that Test Subchannel, ... TSCH require virtualization Instruction SIE Interception Interpretation to hypervisor Low-Frequency LPAR Handling Control hypervisor LPAR CPU Virtualization Instructions that SIE require hypervisor E.g., Modify STATE Assists virtualization Subchannel Descriptor Physical CPU Instruction Execution Unit 8 z Systems Virtualization Technology © 2015 IBM Corporation LPAR Logical Processor Dispatching z/VM Logical z/OS Logical Partition z/VM Logical Partition Partition General General zIIP General General General zIIP Purpose Purpose zAAP Purpose Purpose Purpose zAAP IFL Logical IFL Logical Logical Logical Logical Logical Logical Logical Logical Logical Logical Processo r Processo r Processor Processor Processor Processo r Processor Processor Processor Processor Processo r JAVA General General General IFL IFL zAAP zIIP Virtual z/OS & z/OS & & DB2 Purpose Purpose Purpose Processor Virtual Virtual Virtual Processor Processor DB2 DB2 XML Virtual Virtual Virtual Processor Processor Processor Processor LPAR hypervisor dynamically dispatches: 1. General-purpose logical processors on general-purpose physical processors 2. zAAP logical processors on zAAP physical processors 3. zIIP logical processors on zIIP physical processors 4. IFL logical processors to IFL physical processors Shared Shared Shared Shared Shared Shared Shared Shared Shared Shared General General General General zAAP zAAP zIIP zIIP IFL IFL Purpose Purpose Purpose Purpose Physical Physical Physical Physical Physical Physical Physical Physical Physical Physical Processor Processor Processor Processor Processor Processor Processor Processor Processor Processor Shared IFL Shared General-Purpose Shared zAAP Shared zIIP Physical Processor Physical Processor Pool Physical Processor Physical Processor Pool Pool Pool 9 z Systems Virtualization Technology © 2015 IBM Corporation LPAR Memory Partitioning A collection of up to LPAR 1 LPAR 2 LPAR N 231 - or A 264 -bytes collection virtual of up to address 64 spaces 2 -bytes z/VM Virtual Machine z/OS or Linux High- virtual Each Physical Memory Space Performance Logical address virtual spaces machine Partition Physical Memory may have Spaces z/OS and its own Linux virtual exploit address multiple spaces such mapped virtual to this address common z/VM Hypervisor spaces logical partition Logical Partition Hypervisor address space = the real partition memory pages associated with a virtual address space; that is, the sets of dynamically-allocated physical memory pages necessary to run a z/OS task or a Linux process = the real partition memory pages associated with a virtual machine; that is, the sets of dynamically-allocated physical memory pages necessary to run a guest operating system in a virtual machine 10 z Systems Virtualization Technology © 2015 IBM Corporation LPAR Multiple Logical Channel Subsystems P P P P P P P P P P P A A A A A A A A A A A R R R R R R R R R R R T T T T T T T T T T T I I I I I I I I I I I T T T T T T T T T T T I I I I I I I I I I I O O O O O O O O O O O N N N N N N N N N N N CPU Logical Channel Logical Channel Logical Channel Logical Channel Subsystem- Subsystem Subsystem Subsystem Image 1 Image 2 Image 3 Image 4 z Systems Physical Channel Subsystem FICON Channel Path OSA Ethernet Adapter Transparently Shared by Transparently Shared By All Logical Partitions Logical Partitions Configured FICON Switch, to Channel Subsystem Switches, CU - Devices, etc Image N Network Links, etc. 11 z Systems Virtualization Technology © 2015 IBM Corporation LPAR High-Performance I/O Sharing Shared I/O Adapter Storage Controller Physical Adapter Subchannel Image For Interface (e.g., a Logical Logical Channel FICON channel path) Partition 1 Path Device