Using Virtualization to Improve Testing Anil Desai IEEE
- Slides: 45
Using Virtualization to Improve Testing Anil Desai IEEE Computer Society, Austin Chapter April 18 th, 2007
Speaker Information � Anil Desai ◦ Independent consultant (Austin, TX) ◦ Author of virtualization books and articles �Managing / Scripting Microsoft Virtual Server �Search. Server. Virtualization. com �The Definitive Guide to Virtual Platform Management ◦ Info: http: //Anil. Desai. net or Anil@Anil. Desai. net
Presentation Overview I. An Overview of Virtualization Technology II. Virtualization Features & Scenarios III. Virtualization Benefits for Dev/Test IV. Comparing Virtualization Approaches V. Using Virtualization Features for Dev/ Test VI. Managing and Optimizing Virtualization
An Overview of Virtualization Technology
What is Virtualization? � Virtualization abstracts the underlying physical structure of various technologies ◦ Examples: �Storage virtualization �Network virtualization � Server virtualization ◦ Creates multiple isolated environments ◦ Allows multiple OS’s and workloads to run on the same physical hardware ◦ Solves the problem of tight coupling between OS’s and hardware
Virtualization Architecture
Benefits of Virtualization Simplified administration Hardware independence/portability Increased hardware utilization Server consolidation Decreased provisioning times Improved security Virtualization Features Software Development Testing / Quality Assurance Product evaluations / demonstrations Training Disaster Recovery Virtualization Scenarios
Emulated Hardware Platform Component Specifications Chipset Intel 440 BX CPU Based on the host CPU (single CPU only) BIOS AMI BIOS Video S 3 Trio 32/64 with 4 MB of video memory Memory Up to 3. 6 GB Input Devices PS/2 Mouse and Keyboard Floppy Drives Up to two 1. 44 MB 3. 5” floppy drives Communications Ports 2 Serial Port 1 Parallel Port IDE Controllers Two channels, each of which supports up to two devices each (up to four IDE total devices) SCSI Controllers Up to four Adaptec 2940 SCSI Controllers (each supports up to 7 devices; 28 devices total) Network Interfaces Up to four Intel 21140 10/100 Mb network interface cards
Understanding Virtual Hard Disks
Virtual Network Overview
Virtual Network Examples
Virtualization Features & Scenarios
Deployment Steps Planning • Determining hardware requirements • Coordination with business leaders Purchasing • Hardware selection • Approvals processes • Budgeting Physical Deployment • Finding rack space • Physical "racking" • Network and power connections Server Configuration • OS Settings • Application installation • Network Settings
Server Consolidation
Load-Balancing
Training / Test Labs
Virtualization Candidates � Getting Started ◦ Migrate existing apps / physical machines ◦ Create new virtual machines from scratch � Virtualization may not work well for: ◦ Resource-intensive applications �VMs may have RAM/CPU/SMP limitations ◦ Performance testing ◦ Hardware compatibility testing ◦ Specific hardware requirements �USB �Custom hardware devices
Physical-to-Virtual (P 2 V) � Conversion of an existing physical machine into a virtual machine ◦ Operating system, settings, and all data
Virtualization Benefits for Development / Testing
Technical Benefits for Dev/Test � Simplified Administration � Duplicating / recreating intermittent problems � Quick Deployment � Portability (Moving / Copying VMs) ◦ For troubleshooting and recreating defects ◦ Load-balancing � Standardized hardware configuration � State management for virtual machines
Development/Testing-Related Scenarios � Setting up a complex test lab ◦ Testing multi-tier applications ◦ Isolated networks ◦ Simulating multiple clients � Rapid setup and tear-down of test environments ◦ Consistent configurations ◦ Ability to easily roll-back changes ◦ Automation of VM setup and software installation
Virtual Machine Roll-Backs � Can revert virtual machines to their initial state � Can create “snapshots” after changes ◦ Can roll back to a particular snapshots
Estimating VM Resource Requirements Number of VMs Estimated memory per VM Estimated disk space per VM Resource usage estimates VM Name CPU Memory Disk Network Web. App 01 Low Medium High Web. App 02 Low High Low Win. XPTest Low Medium Low File. Server 01 Low Medium High
Determining VM Placement Approach: Categorize VMs based on resource utilization Combine VMs that have “compatible” workloads Workload CPU Util. Memory Util. Disk Util. Network Util. Public Web Server Low Low High Web Application Server Medium Low Medium Middle-Tier Server (CRM Application) Medium High Low Database Server (CRM Application) High Medium
Comparing Virtualization Solutions
Virtualization Approach Overview Applications • Server applications • Office productivity applications Operating System • Device Drivers • Services Hardware • CPU, Memory, Disk, Network hardware • Other peripherals
Server-Level Virtualization Example Virtual Machines Virtualization Layer • Supported guest OS's • Windows XP, Windows Server 2003, Linux, etc. • Microsoft Virtual Server 2005 R 2 Operating System • Windows Server 2003 R 2 • Device Drivers Hardware • CPU, Memory, Disk, Network • Peripherals
Virtualization Options Application-Layer Virtualization • Citrix, Microsoft Soft. Grid, Terminal Services Server Virtualization • VMware Server, Microsoft Virtual Server Hardware-Level Virtualization • VMware ESX Server, XEN, Microsoft Hypervisor (“Viridian”) Desktop Virtualization • Virtual PC 2007, VMware Workstation, Parallels Workstation
Virtual Server vs. Virtual. PC Improved performance (multi-threaded) Web-Based Administration Scripting and automation support (COM API) Improved security Advanced networking Manageability SCSI Device Support Reliability/availability features (clustering) Virtual Server 2005 Optimized for one or a few concurrent VMs (single-threaded) Simplified administration Sound card emulation Easier file sharing Automatic client desktop resizing Virtual. PC
Selecting the Best Approach Workload Virtualization Recommendation Notes Datacenter Server Consolidation Hardware-Level or Server-Level Performance is a key factor Server applications are typically complex Software Development and Testing Environments Server-Level Manageability is a key requirement. Users must be able to change hardware settings and OS levels. Sharing End-User Productivity Applications Application-Level or Remote Application Execution Scalability is important. Applications are less complex.
Using Virtualization for Development and Testing
Setting up a Test Lab � Create overall test plans and requirements ◦ OS and version requirements ◦ Service Packs / updates, etc. ◦ Hardware configurations for VMs �CPU, Memory, Disk Space, Network configuration � Create a naming convention for VMs � Create base images � Create network address conventions ◦ IP address ranges and subnets ◦ Support for multi-tier applications ◦ Multiple networks (host-only, routed, NATs, etc. )
Designing Base VM Images � Goals: ◦ Minimize the number of base images ◦ Include as much functionality as possible Base Client • Windows XP Professional Ed. , SP 2 • Backup Agents • Anti-malware utilities • Security settings Base Server • Windows Server 2003 R 2 • Backup Agents • Anti-malware utilities • Security settings Database Server • All Base Server Components, plus: • SQL Server 2005 SP 1 • Database security configuration
Disk Hierarchy Example Windows Server 2003 R 2 SQL Server 2000 SP 4 SQL Server 2005 SP 2 Web Server (IIS 6. 0 enabled) Web Server with SQLExpress database
Deploying Software � Media-based deployments ◦ Automatic mounting of ISOs � Network-based installations ◦ Automated OS Deployment �Image-based or PXE Booting ◦ Application Deployment �OS Startup Scripts and Network shares � Third-party software distribution tools
Creating Application Stacks Presentation Servers Application Servers Data Access Layers Database Servers Operating System / Network Services
Automating Virtualization � Common operations can be scripted or automated � Test Lab Management Applications ◦ Web-based ◦ Client-based
Virtual Server COM API
Managing & Optimizing Virtualization
VM Maintenance � Establish a base library of images ◦ Ensures consistency ◦ Helps in troubleshooting ◦ Prepare VMs for duplication (Sys. Prep) � Create a Library of ISO files � Manage virtual machines as if they were physical machines ◦ Security updates �Automatic Updates (if supported in Guest OS) �Microsoft Baseline Security Analyzer (MBSA) �Windows Server Update Services (SUS) ◦ Patches ◦ Corporate security standards � Configure anti-spyware / anti-malware exceptions ◦ *. vhd, *. vud, *. vsv, *. iso
Managing Performance � Profile your applications ◦ Windows System Monitor ◦ ◦ ◦ �Counter Logs Event Viewer Task Manager Windows Management Instrumentation (WMI) Microsoft Operations Manager (MOM) Systems Management Server (SMS) � Monitoring Approach: ◦ Host Server: Aggregate performance data ◦ Guest OS: Detailed resource usage
VM Backup and Recovery � Backup and Recovery ◦ Option 1: �Shut down/save state of the VM �Copy all required files. �Resume the VM ◦ Option 2: �Use Backup Agents within the Guest OS. � Automating backups: ◦ Build scripts/applications to automate virtual machine backup and recovery: � 1) Save state of the virtual machine � 2) Copy all related files � 3) Resume the virtual machine
Implementing Host-Level Backups � Backup VM files from the host file system � Host-Level Backup Options: Cold Backups • Stop VM & copy files • Can be scripted • Longest downtime Warm Backups • Pause VM & copy files • Minimal downtime Hot Backups • Backup while VM is running • File system snapshots • Can be risky
For More Information �Resources from Anil Desai ◦ Web Site (http: //Anil. Desai. net) ◦ E-Mail: Anil@Anil. Desai. net ◦ Keystone Learning Course: “Microsoft SQL Server 2005: Implementation and Maintenance (Exam 70 -431)” ◦ The Rational Guide to Managing Microsoft Virtual Server 2005 ◦ The Rational Guide to Scripting Microsoft Virtual Server 2005
Summary / Conclusion Q & A, Discussion
- Binary translation vmware
- Surge current protection using superconductors
- Wa akhiru da'wahum anil
- Anil jegga
- Anil hassan
- Cics training
- Anil jagasia
- Likisi
- Anil khamis
- Blood relation definition
- Dr anil kakunje
- Data points
- Anil vachani
- Product operators
- Sunderlal bahuguna quotes malayalam
- Anil sultan
- Paila dean
- Introducing neeta anil said
- Dr anil choudhary
- Calister
- Dr. adrian anil
- Basant kurre ias
- Jagdish kakodkar
- Go direkt
- Anil chawla law associates llp
- Dr anil kulkarni
- Kintranet
- Domain testing
- Motivational overview of logic based testing
- Data flow testing strategies in software testing
- Positive testing and negative testing
- Static testing and dynamic testing
- Globalization testing
- Neighborhood integration testing
- Decision table testing in software testing
- Control structure testing in software engineering
- Decision table testing in software testing
- Decision table for triangle problem
- Apa yang dimaksud dengan black box testing
- Black-box testing disebut juga sebagai behavioral testing
- Extended decision table
- Rigorous testing in software testing
- Testing blindness in software testing
- Component testing is a black box testing
- Domain example
- Dr shraddha desai