400 likes | 625 Views
Computer Virtualization with Microsoft and VMware. Ottawa Windows Server User Group November 23, 2006. Introductions. Stephen Campbell, Marchview Consultants Garth Jones, Enhansoft Thanks to…. Agenda. What is this virtualization stuff anyway? VMware and Microsoft products
E N D
Computer Virtualization withMicrosoft and VMware Ottawa Windows Server User Group November 23, 2006
Introductions • Stephen Campbell, Marchview Consultants • Garth Jones, Enhansoft Thanks to…. Computer Virtualization with Microsoft and VMware
Agenda • What is this virtualization stuff anyway? • VMware and Microsoft products • Demo environments • Compare the products • Control the VM environment • Summary Computer Virtualization with Microsoft and VMware
What is Virtualization? • Welcome to the 1960’s • Fooling a program/system to think its running on its own hardware • Doesn’t know about other environments • Can’t interfere with other environments • Providing new hardware features • Disks that can remember/undo changes • NICs that think they’re switches • Memory tricks Computer Virtualization with Microsoft and VMware
VM1 VM2 Guest Disk NIC KVM USB CPU RAM Disk NIC KVM USB CPU RAM VMM Host O/S Host Disk NIC KVM USB CPU RAM How does it work? • Host (aka metal) • Guest (aka VM, Virtual Machine) • Application virtualization (SoftGrid, Citrix) Computer Virtualization with Microsoft and VMware
Hardware Revolution • Initially implemented in software. • The host environment switches resources among the virtual machines, and runs certain Ring 0 (Kernel) instructions • CPU Hardware virtualization 1 (2005) • Virtual Machine Monitor runs in its own ring • Ring 0 is virtualized • AMD-V (Opteron) • Intel VT, Pentium D 920+ • CPU Hardware virtualization 2 (2007) • Device virtualization Computer Virtualization with Microsoft and VMware
What would you use this stuff for? • Engineer/Developer • No, you can’t have $30K for a 64bit OS cluster at your desk • Let’s try that again, let’s try this other way • Let’s use a clone of that production server to prove its not a bug in our code • Q.A. • Let’s not spend three days restoring the 20 server/workstation environment to run that test again Computer Virtualization with Microsoft and VMware
What would you use this stuff for? • Demonstrations • Let’s bring the 4 servers (DC, SQL, App, Web) and two workstations (En, Fr) onto the plane in carry-on luggage • Production • Let’s not spend $8K for a 3% CPU server • Let’s not buy 100 servers for our business resumption site • Let’s not add a server to 300 branch offices • Let’s run a legacy DOS app on Vista Computer Virtualization with Microsoft and VMware
Controlling a VM Environment • Provision VMs • New, clone, import from physical computers • Control VMs • Start, stop, attach to console • Monitor VMs and Hosts • Balance loads across hosts • Establish VM and Host Permissions Computer Virtualization with Microsoft and VMware
Microsoft Product Line • Today • Virtual PC 2004 SP1 (Free) [VPC] • Virtual Server 2005 R2 (Free) [MSVS] • VM Importer • Soon • Virtual PC 2007 (Free) • Virtual Server 2005 R2 SP1 (Free) • Virtual Machine Manager • Softgrid Computer Virtualization with Microsoft and VMware
VMware Product Line • VMware Infrastructure 3 • VMware ESX Server 3.0.1 [ESX] • VMware Virtual Center 2.0.1 [VC] • VI Client • VMware Server 1.0.1 [VMS] • Other • VMTN Subscription • VMware Workstation 5.5.3 [VMW] • VMware Player 1.0.2 • VMware ACE 1.0.2 • VMware P2V, Importer and Converter • [Soon] VMware Lab Manager Computer Virtualization with Microsoft and VMware
Demo - Navigating • Let’s see a VM environment • Console Operations • Create a fresh new VM Computer Virtualization with Microsoft and VMware
Virtualized Memory (ESX) • Shared memory • Why store a DLL twice when once will do • Balloon memory • Let’s rob Peter to pay Paul • Moving running VMs • Let’s let the guest do a page fault during a transition to a new host • Snapshots/Saved State (All products) Computer Virtualization with Microsoft and VMware
Virtualized Networks • Host creates network switches • Local only • Attached to zero or more metal NICs • NAT, DHCP • VLANs (ESX) • Guests connect NICs to these switches • Can connect to new switches dynamically • Guests detect standard NIC hardware • VLance (AMD), VMXNet, Intel V21140 Computer Virtualization with Microsoft and VMware
Virtualized Networks Computer Virtualization with Microsoft and VMware
Virtualized Disks • Raw: Allows access to H/W disks • All other disk types are kept as host files • Fixed or Dynamic Growth • Split into 2G chunks • Undoable disks • Differencing (MS only) • Undo log • Multiple snapshots (VMW, ESX only) Computer Virtualization with Microsoft and VMware
Virtualized Disks Redo Master Commit/ Merge Base Redo Logs • Commit/Merge • Write Log back into base • Discard • Delete log of changes • Keep • Continue adding to log files Differencing (MS only) • Read-only master • Changes are kept in separate files • Can have difference of difference The VM sees one normal disk Computer Virtualization with Microsoft and VMware
Snapshots (VMW, ESX) Computer Virtualization with Microsoft and VMware
Virtualized Disks Computer Virtualization with Microsoft and VMware
Guest VM Helper Apps • VMware ToolsVirtual Machine Additions • Purpose • Improve performance/behaviour of KVM • Allow host to communicate with VM • Additional VM-specific drivers • VMXNet, Balloon memory Computer Virtualization with Microsoft and VMware
Provisioning VMs Quickly • Classic • ISO to provision a new fresh computer • Clone • Copy the VM/Disk, create a new VM, newsid, go • Sysprep a master disk • Create a master and clone that • Create a differencing disk based on the sysprep master and go • Use VMware templates (VC/ESX) Computer Virtualization with Microsoft and VMware
Our demo lab Computer Virtualization with Microsoft and VMware
Demo - Compare Provisioning • MSVS • Differencing Disks • SysPrep • VMS, VMW • Clone • SysPrep, NewSID • VC/ESX • Templates Computer Virtualization with Microsoft and VMware
Keeping your baseline current • MSVS • Create new master as difference of existing • Base new VM’s on the new differencing master • VMW/VMS • Reopen master VM and apply, and reseal • ESX • Convert template to VM, start then apply changes, convert back to template Computer Virtualization with Microsoft and VMware
Access Control • ESX: Unix file permissions to the VM • VC: Very granular administrative and operations roles • VMS: File permissions to the VMX (definition file) • MSVS: File permissions to the VMC file Computer Virtualization with Microsoft and VMware
Programmatic Control • MS was written from the ground up to have programmatic control. • Can do anything since the UI is really just a collection of those object manipulations • VM is getting better Computer Virtualization with Microsoft and VMware
MSVS Coding • Connect to a MSVS set objVS = createObject(“VirtualServer.Application”,strHost) • Connect to a VM set objVM = objVS.findVirtualMachine(strVM) • Stop a running VM if objVM.State=5 then objVM.Save Computer Virtualization with Microsoft and VMware
VMware Coding • Connect to a VMS Set objVS=createObject(“VmCOM.VmServerCtl”) Set objCP=createObject(“VmCOM.VmConnectParams”) objVS.connect objCP • Connect to a VM Set objVM=createObject(“VmCOM.VmCtl”) objVM.connect objCP,strVMXFileName • Stop a VM If objVM.ExecutionState=1 then objVM.stop VM_SHUTSOFT Computer Virtualization with Microsoft and VMware
Demo - Scripting • Provision a MSVS VM Computer Virtualization with Microsoft and VMware
Quirks • ESX • No USB in ESX VMs [two-factor authentication] • MSVS • No 64bit guests, 64bit host • MVS • 64bit guests require hardware virtualization (AMD-V, Intel VT) • General • Guest must be shut down to add/remove devices, deal with redo disks • 20 VM’s = 20 Microsoft Windows licences, but… Computer Virtualization with Microsoft and VMware
Other Cool Things • MOM Management Pack for MSVS provides cool management and monitoring • Windows Licensing in VMs • Buy one Windows Enterprise, run another 4 VMs (any Windows OS) on Microsoft or VMware hosts. • Buy one Windows Data Center, run as many VMs (any Windows OS) as you want on that iron • Buy Microsoft SA and you can run your lab for free • Buy Technet Plus and you can run your lab for 60 days Computer Virtualization with Microsoft and VMware
Performance Notes • There’s only so much to go around • Your main bottleneck is almost always disk • Write cache • RAID 1+0 better than RAID 5 • More smaller drives better than fewer bigger ones • Defragment the host and the guest partitions • Put the host page file on a separate physical disk • Allocate the entire VDisk size to empty/dedicated host disks Computer Virtualization with Microsoft and VMware
VM Appliances • Prebuilt VMs to perform specific tasks • VMware Community • Firewalls, Browsers, Monitors, etc • Mostly Linux • http://www.vmware.com/vmtn/appliances • Microsoft Community • Trial/Demo VHDs • http://www.microsoft.com/technet/try/vhd Computer Virtualization with Microsoft and VMware
Approximate Prices • VMware • ESX 3 Std $~3K/2CPUs+$.8K/yr maintenance • ESX 3 Ent $~5K/2CPUs+$1.2K/yr maintenance • VC 2 ~$4.5K+$1K/yr maintenance • WKS $189 • VMTN $299/year/person • Windows • Std ~$.6K • Ent ~$2K • Data Center ~$3K/CPU Computer Virtualization with Microsoft and VMware
Bottom Line • MSVS • Free • Host and Guests are Windows • Clunky Interface • Lots of R&D investment: stay tuned • VMS, VM Player • Free, Can transfer VMs among technologies • Good support for non-MS environments (Netware, Linux) • VMW • Great desktop experience, full snapshot • ESX • Ideal for common lab/QA, big iron production • Mature Computer Virtualization with Microsoft and VMware
Info • VMware • www.vmware.com • Forums, KBase, Appliances, Blogs • Microsoft • www.microsoft.com/virtualserver • www.microsoft.com/virtualpc • http://www.microsoft.com/technet/try/vhd • http://www.microsoft.com/technet/scriptcenter/scripts/default.mspx Computer Virtualization with Microsoft and VMware
MSVS Communities Blogs Virtual PC Guy's WebLog http://blogs.msdn.com/virtual_pc_guy/ John Howard Program Manager, Windows Virtualization http://blogs.technet.com/jhoward/ Garth Jones http://myitforum.com/cs2/blogs/gjones/default.aspx Utilities Virtual Server Documentation Script http://www.enhansoft.com/index_files/FreeTools.htm Virtual Server 2005 Management Pack http://www.microsoft.com/downloads/details.aspx?familyid=BF21F798-9B10-40DC-BCDD-4A8358CCE94D&displaylang=en Pre-built VHS for Quick testing http://myitforum.com/cs2/blogs/gjones/archive/2006/11/06/Need-to-do-some-quick-testing_2C00_-check-out-these-VHDs.aspx Computer Virtualization with Microsoft and VMware
MSVS Communities Tips Virtual Server 2005 performance tips http://support.microsoft.com/kb/903748 HOWTO: Squeeze Every Last Drop of Performance Out of Your Virtual PCs http://andrewconnell.com/blog/articles/SqeezePerformanceOutOfVirtualPCs.aspx http://myitforum.com/cs2/blogs/gjones/archive/2006/03/31/19568.aspx Unlimited VM with Datacenter http://www.microsoft.com/windowsserver2003/datacenter/dcprogram.mspx Reference Network http://blogs.technet.com/canitpro/archive/2006/03/06/421295.aspx Hardware Specs http://blogs.technet.com/canitpro/archive/2006/03/07/421360.aspx Computer Virtualization with Microsoft and VMware
Questions stephen.campbell@marchview.com garth@enhansoft.com Computer Virtualization with Microsoft and VMware