Professional Documents
Culture Documents
Linux Virtual Serv
Linux Virtual Serv
Linux Virtual Serv
ronald@beekelaar.com
Version: 30-Oct-2006
Copyright 2005-2006 Beekelaar Consultancy
Objectives
Understand architecture of Virtual Server 2005 Understand how Virtual Server works Explain key scenarios for Virtual Server Future functionality
Virtualization background:
Microsoft MVP for Virtual Machine Technology Whitepaper at microsoft.com: "Virtual PC for Developers" Manage all Virtual PC / Virtual Server labs at TechEd Europe and IT Forum Europe Create and optimize many VMs
Contact:
Session hours
Schedule: 09.30 11.00: Presentation
Microsoft strategy
Vision of virtualization
Long term, workloads will be increasingly dynamic Virtualization is a key enabling technology to achieve this
Support
By Microsoft PSS
See - www.microsoft.com/windowsserversystem/cer
Exchange Server 2003 - Only on Virtual Server 2005 R2 or later (KB 320220) Certificate Server - Only with Win2003 SP1 or later guest and host (KB 897614) KB 897613 - Microsoft supports Windows Server System software running within a Microsoft Virtual Server environment subject to the Microsoft Support Lifecycle policy ... KB 897614 - The following Windows Server System software is not supported within a Microsoft Virtual Server environment: Speech Server, ISA Server, Sharepoint Portal Server. KB 897615 - For Microsoft customers who do not have a Premier-level support agreement, Microsoft will require the issue to be reproduced independently from the non-Microsoft hardware virtualization software. KB 917437 - Microsoft support for Linux guest operating systems is currently limited to the following list of qualified and tested operating systems: [9 Linux distributions]
Limitations
Product versions
Product
Virtual PC 2004 Virtual Server 2005 Virtual PC 2004 SP1 Virtual Server 2005 R2 Virtual PC 2004 Express Virtual Server 2005 R2 SP1 Virtual PC 2007 Windows Virtualization
Release Hosts
Oct 2003
Win2000 Pro SP4 Win XP Pro (Tablet, SP1) Win XP Pro Win2003 SBS Win2003 (SE, EE, Data) Same as Virtual PC 2004 + Win2003 SE Same as Virtual Server 2005 + Win XP Pro SP2 (non prod) + Win2003 (SP1, R2) + Win XP / Win2003 x64
Guests **
MS-DOS 6.22 * / OS/2 Win 95, 98, 98SE, ME * Win NT4 SP6a (wrkstn) * Win2000 Pro SP4 Win XP (Tablet, SP1) Win NT4 SP6a (server) * Win2000 Server Win2003 (SE, EE, Web) Same as Virtual PC 2004 + Win XP SP2 Same as Virtual Server 2005 + Win XP Pro SP2 + Win2003 (SP1, R2) + Linux (9x distro's) - Apr 2006
Same as Virtual PC 2004 SP1 + But can only run a single VM + With Vista Enterprise / only for Software Assurance customers +Intel VT and AMD Virtualization processor support +Volume Shadow Copy Service support +Intel VT and AMD Virtualization processor support +Vista support (Host and Guest) Implement Windows Hypervisor New virtualization model, requires VT/Virtualization hardware Code name "Viridian"
* Currently at end of support lifecycle ** See http://vpc.visualwin.com for a list of 1300+ (!) OS that run in Virtual PC / Virtual Server 7 See KB 867572 for a list of supported OS in Virtual Server 2005 R2
Pricing
Product
Virtual PC 2004 Virtual Server 2005 Standard Edition Virtual Server 2005 Enterprise Edition Virtual Server 2005 R2 Standard Edition Virtual Server 2005 R2 Enterprise Edition Virtual Server 2005 R2 Enterprise Edition * Virtual PC 2007 Windows Virtualization
* Virtual Server 2005 Standard Edition is no longer available
Price (US)
After 12-Jul-2006:
Reasons:
Accelerate proof-of-concept test efforts Rapidly deploy workloads (AD / SQL / BizTalk, etc) Ease migration to Longhorn virtualization
Licensing
Windows server licenses
10
See - www.microsoft.com/licensing/resources/volbrief.mspx
Licensing
Hosting licenses
Before 3-Apr-2006:
After 3-Apr-2006:
11
Specifications
Host
CPU
VS2005 Standard Edition: max 4 CPUs (1 or 2 cores) VS2005 Enterprise Edition: max 32 CPUs (1 or 2 cores)
Memory: max 64 GB CPU: max 1 Memory: max 3.6 GB Network adapters: max 4 - unlimited bandwidth ! USB: no
Guest
12
Virtual PC 2004:
Multithreaded
Single CD ROM drive NAT support Network per host (loopback) adapter
Only in VS2005:
Only in VPC2004:
SCSI disk (in VM) COM API Remote Management Run as service
13
Performance
Increased performance
x64 hosts: Win2003 and WinXP Virtual Machine clustering
Scalability
Availability
Failover VM on same host Uses Shared SCSI (or iSCSI) in guest Move VS2005 to other host Planned and unplanned downtime Requires script - http://go.microsoft.com/fwlink/?LinkId=55644
14
15
Virtual Disk Precompactor.iso Supports hyperthreading on host Reserve space for save state file (.vsv) Open Windows Firewall ports at install
Architecture
Virtual Machine Monitor (VMM)
VMM switches context between those processes Computer runs either host context or VMM context
16
Architecture
Host
Admin Web Site IIS
Ring 3
Provided by
Windows
Guest (VM)
Guest Applications
Ring 3
Ring 1
VM Additions
Win2003 or WinXP
Kernel
Hardware
17
VMM.sys
CPU virtualization
Execution modes
Binary translation
Translate guest instruction code to host instruction code Always possible, but slow Guest OS runs in user-mode directly on CPU - fast ! When a priviliged operation is required, a trap occurs, and VMM handles operation in kernel mode Some kernel-mode read operations are allowed in ring 3 ! Most guest OS code can run direct-mode execution (fast), but some parts require binary translation (slow)
Direct-mode execution
Conclusion:
18
CPU virtualization
Role of VM Additions
Issue:
Rules:
Use only binary translation Unless OS-specific VM Additions, running in guest, indicates what kernel-mode code is safe for direct-mode execution
19
VM Additions
Versions
Build Release
10.21 13.40 13.187 13.206 13.306 13.518 13.531
with Virtual PC 5.2 with Virtual PC 2004 (download) with VS2005 with Virtual PC 2004 SP1 with VS2005 SP1 beta (download) with VS2005 R2 with VS2005 R2 SP1 beta1 (download - Connect)
Notes
(Called Virtual PC Additions)
13.552
13.705 13.706
20
VM Additions
Linux
Adds:
Distributions (9x)
21
Usage Scenarios
Production server consolidation
Consolidate low-utilization workloads Legacy OS (NT4) and application re-hosting Resource partitioning (limit resources per VM) Workload deployment and provisioning OS and application patching (swap VMs) Isolation / sandboxing
Workload mobility Rapid provisioning of multiple virtual machines Undo-disk and save state helpful
22
Usage Scenario
Production server consolidation
Consolidate workloads
Infrastructure applications Branch office and datacenter workloads Low-utilization workloads Efficient use of available hardware resources
NT4 guest applications on Win2003 host
23
Partition resources
Usage Scenario
Business continuity management
Workload deployment
Quickly switch pre-configured VM (vhd-files) For disaster recovery Eliminate unscheduled downtime
Deploy and test patches off-production, and swap Eliminate scheduled downtime Isolate OS environments for untrusted applications Prevent malicious code from affecting others
Isolation / sandboxing
24
Usage Scenario
Dynamic datacenter
Workload mobility
Package up entire OS environment and move to other location Flexible deployment of workloads
25
Usage Scenario
Development and test
Provide multiple VMs for testing quickly Use save state to start up quickly Recreate reported issues Avoid use of production network Use undo-disk to rollback to known state
Provision multiple VMs with variations Use difference-disks for easy provisioning
26
Usage Scenario
Other server consolidation
Workload
Branch office and department applications
Enterprise applications File and print Database E-mail
Microsoft products
Win2003 and Virtual Server 2005
Sample scenario
Enterprise customer migrates Windows NT 4.0 applications from 1,000 standalone servers to 50 centralized, 4-way, rack-mount systems Medium-sized customer moves enterprise resource planning suite onto 8-way systems running Windows Server 2003 and WSRM Small business consolidates file and print servers by using network attached storage (NAS) Enterprise customer consolidates databases on highly scalable IA-64 systems Medium-sized business consolidates email servers using Exchange Server on scalability cluster
Windows Storage Server Win2003 and SQL Server 2005 Win2003 and Exchange Server 2003
Web
27
Configuration
Memory
CPU
28
Networking
Pre-defined vnc-files:
29
Disks
Data store in virtual hard disk (.vhd) files File format is the same:
Virtual PC 2004 Virtual Server 2005 Windows Virtualization (future) IDE (VPC2004): 130,557 MB (= 127.5 GB) IDE (VS2005): 130,048 MB (= 127.0 GB) SCSI (VS2005): 2,088,960 MB (= 2040.0 GB)
Max sizes
30
Disks
VHD Format
www.microsoft.com/windowsserversystem/virtualserver/ techinfo/vhdspec.mspx 45 vendors signed up (April 2006) Virtual Hard Disk Format Specification
Introductions Overview of Virtual Hard Disk Types Virtual hard disk Footer Format Dynamically expanding .VHD Header Format Block Allocation Table and Data Blocks Implementing a Dynamically expanding .VHD Mapping a Disk Sector to a Sector in the Block Splitting virtual hard disks Implementing a Differencing virtual hard disk CHS Calculation
From 17-Oct-2006:
31
Differencing disks
Read
Write 3
Create 1 2 3 4
Delete
Link to parent
File-a.doc File-b.doc 32
Disks
Read/write zero-filled files
Write
Write
Read
000 000 000 000
1 2 3 4
1 2 3 4 5
1112 ...
1 2 3 4 File-a.doc 33
4 Pagefile.sys
2. Startup VM
Found new hardware: Adaptec AIC-7870 PCI SCSI Adapter Needs Win2003 CD for aic78xx.sys (56 KB)
Now you can boot as SCSI, but this is a slow SCSI driver.
34
Open Device Manager Right-click Adaptec / Update Driver Install from a specific location / Have Disk Browse to C:\Program Files\Virtual Machine Additions Installs SCSI driver: Microsoft Virtual Machine PCI SCSI
4. In VS console:
Swith boot disk from IDE to SCSI adapter Virtual PC can still boot from disk as IDE
35
Clustering
36
Clustering
Guest to Guest
iSCSI connection
Host to Host
SAN or iSCSI connection
Cluster storage
Cluster storage
37
Clustering
Virtual Machine (Guest) Clustering
38
Clustering
Virtual Server Host Clustering
39
Clustering
Virtual Server Host Clustering
Benefits
Hardware upgrades Software updates on host Steps: Saves state VM1 - failover - restore state in VM2 Steps: (Oops) - failover - startup VM2
40
Clustering
Virtual Server Host Clustering
Deploy
Uses iSCSI or SCSI/Fibre Channel to shared storage Note: Disable Cluster service when installing VS2005
Or multiple VMs in same Resource Group Implemented as Physical Disk resource Containing vmc-file, vhd-file and vsv-file
41
Backup of VM
Three methods:
- Inside VM, run backup application
- Needs: Virtual Server 2005 R2 SP1 - On host, run backup application - Copy 'open' vhd files - uses VSS and VS Writer
42
VS Writer ensures vhd-file is in consistent state Do NOT use without Virtual Server 2005 R2 SP1
Best practices
Performance
Use multiple physical disks Use SCSI host disks Defragment host disk Use NTFS
43
Best practices
Performance
VM configuration
Guest configuration
44
Best practices
Operations
Run Sysprep, or Newsid (sysinternals.com) Do not include save state (.vsv) file
Use script for UPS
45
Best practices
Operations
46
Future
Virtual Server 2005 R2 SP1
Features
Intel VT and AMD Virtualization support Volume Shadow Copy (VSS) support Additional Linux VM Additions Active Directory integration and management Vista as Guest support Also...
Host clustering whitepaper included Default vhd capacity is 127 GB (was 16 GB) Virtual SCSI fix for Linux 2.6.x guests VHD mount tool
47
Future
Virtual Server 2005 R2 SP1
Windows installation is 2x-3x faster Non-Windows guests (Linux, Netware) run faster
Available
Beta 1: May 2006 - Cool name: VS2K5R2SP1B1 Beta 2: Aug 2006 Final release: ~Feb 2007
48
Available
49
Resource optimization
Identify consolidation candidates Fast P2V Optimum workload placement on host computers Central library of virtualization components Running VMs, offline VMs, vhd-files, vnc-files Self-service provisioning Templates: create standardize VMs Automatic placement on suitable host computer Distributed storage infrastructure - uses DFS Host provisioning
Rapid provisioning
50
Future
VMM arrangements
Type-2 VMM Hybrid VMM Type-1 VMM Hypervisor
Guest 1
VMM Hardware
51
Windows Virtualization
Thin layer of software, underneath "host OS" Parent partition - manages child partitions Child partition - any number of OS, managed by parent Runs in root partition (= parent partition) Provides virtualization of devices WMI interface for management Hardware sharing architecture Need "viridian" drivers in guest
Virtualization Stack
52
Windows Virtualization
Support for Server Core as parent OS Multiple snapshots Live virtual machine migration Same set of emulated hardware
Hot "add": processor, memory, network, disk Storage: speed dynamic, persistence uncertain
53
Architecture
Host
Admin Web Site IIS
Ring 3
Provided by
Windows
Guest (VM)
Guest Applications
Ring 3
Ring 1
VM Additions
Win2003 or WinXP
Kernel
Hardware
54
VMM.sys
Windows Virtualization
Parent partition Child partition
Provided by
Windows Win Virtualizaton Others
VSPs
VSCs
VMBus
Windows Hypervisor Hardware
55
Enlightments
Competition
OS virtualization
VMware
Xen
Parallels
56
Competition
Application virtualization
Virtuozzo
Softricity
57
Competition
VMware - "virtualize everything"
Products
VMware Server
Free 64-bit VMs, but limited to memory 3.6 GB per VM No integration with VMotion EULA does not allow performance comparison Faster than VS2005
ESX server
Big differences:
58
Competition
VMware - ESX 3.0
Three versions
59
Competition
VMware - additional costs
Extra
SMP support
MS: In future, included in Windows Virtualization Planned migration of VMs (1 second downtime) MS: Planned and unplanned migration through clustering Management: provisioning and ESX monitoring MS: Integrate with VS pack for MOM, and SMS Convert physical to virtual - not free MS: VSMT is free
VMotion
VCenter
P2V
60
Reference information
Weblogs
Scripts
TechNet
www.microsoft.com/technet/scriptcenter/scripts/vs/default.mspx
61
More information
Whitepapers
www.microsoft.com/licensing/resources/volbrief.mspx
http://go.microsoft.com/fwlink/?LinkId=55646
http://go.microsoft.com/fwlink/?LinkId=55644
www.microsoft.com/technet/prodtechnol/virtualserver/deploy/ cvs2005.mspx
62
More information
Software
www.microsoft.com/windowsserversystem/virtualserver/software/ default.mspx
Download VSMT
63