You want to learn what virtualization is all about? I’ll talk about high level concepts, tips and tricks and best practices. You will learn all that and even why Azure might be an interesting choice when we talk developer virtualization. Concepts like Sysprep, Differencing drives, snapshot intrigue you? I’ll let you know all about them and more! Come join me to explore all that virtualization as to offer
2. Etienne Tremblay Associate Director Microsoft Technologies at Fujitsu MVP ALM .NET Montreal User Group Leader section ALM Email: etienne.tremblay@live.ca Twitter: @tegaaa
3.
4.
5. Questions Who uses virtualization today? Which product do you use? Devs or IT? What do you use virtualization for?
6. Agenda What is virtualization? Different virtualization products Licensing… Why is virtualization important to you! Key concepts Scenarios Let’s get started (demos) What about Azure? Tips, Tricks and best practices Don’t forget these… Let’s finish (demos)
12. Popular virtualization products Microsoft Virtual PC 2007 SP1 (free) Microsoft Virtual Server 2005 R2 SP1 (free) Microsoft Windows Virtual PC (Windows 7) (free) Microsoft Hyper-V (free with Windows 2008(R2)) Microsoft App-V ($) VMWare Player (free) VMWare Workstation 7 ($) (trial 30 days) VMWare Server 2 (free) VMWare ESX ($) Parallels (mac) ($) (trial 15 days) Xen (unix) Oracle VirtualBox(free)
13. Microsoft licensing 101 … I’m NOT a licensing expert. Talk to a rep for that! One license per VM and per application installed like any other PC Windows Server 2008 R2 Enterprise *gives* you 4 free licenses to run VMs in Hyper-V on the same server Check out WindowsXPMode… a free copy of Windows XP running on Windows 7 Pro and Ultimate. …Get MSDN/TechNet it’s way easier
14. Why is virtualization important to you! Better control over you development and testing environments Quick development team ramp up with gold developer workstation and build server image Easier recovery plan Easy setup of multiple testing environment for our customers (integration, pre-prod, etc.) Training workstation and server VMs Multiple VMs running on the same developer machine to simulate different tiers
23. Pros and cons Pros Portable Reutilization of existing assets (developer workstation) Developers have more control over their VMs (also a con…) Cons Performance issues can be a problem (running all on the same disk for example, better with multiple disks) Each developer need to manage their VMs (Patch, AV, etc.). We can mitigate with MedV/Gold Images
25. Pros and cons Pros Faster if the central server is faster Centralization of the management of hardware and patching Cons Obviously less portable Need continuous connectivity to host/web Need of a big central server
27. Pros and cons Pros All hardware taken into account (memory, disk, video, etc.) Fast (same as a regular PC) Can have multiple boot partition by having multiple virtual disk We can even combine scenario 1 & 2 & 3 Cons Marginal loss in disk speed Each developer need to manage their VMs (Patch, AV, etc.). Need to reboot to access another partition Only works with Windows 7/Windows 2008 R2 to create Windows 7/Windows 2008 R2 partitions.
29. Lets get started with virtualization Preparation HAV (Hardware Assisted Virtualization) setting in the BIOS ISOs of the OSs you will use (Windows XP, 7, 2008, etc.) Demos Creation of a new VM Differencing Drives Undo disks/Snapshots Integration Services (or equivalent) Sysprep (Windows XP, Windows Vista+) Networking/Loopback adapter
40. How to create a bootable Windows Installation USB key You need a 4G+ USB key Start a command windows and execute diskpart Copy the content of the Windows DVD on the key Choose the USB at boot and you are good to go LIST DISK (trouvervotre clé USB dans la list et noter le #) SELECT DISK <# de votre clé USB> CLEAN CREATE PARTITION PRIMARY SELECT PARTITION 1 ACTIVE FORMAT FS=NTFS LABEL=“<Win7/Win8R2>” QUICK ASSIGN EXIT
41. How to setup Boot from VHD Add an entry in the Windows Bootloader menu Reboot (you should see this) but if you select the New partition it will fail. Use the DVD or USB Windows 7/Windows 2008 R2 Boot Disk At the setup welcome screen press Shift-F10 C:gt;bcdedit /copy {current} /d "My New VHD Option“ C:gt;bcdedit /set {guid} device vhd=[driveletter:]lt;directory>lt;vhd filename>C:gt;bcdedit /set {guid} osdevicevhd=[driverletter:]lt;directory>lt;vhd filename>C:gt;bcdedit /set {guid} detecthal on
42. How to setup Boot from VHD Start Diskpart Create and attach the VHD Exit the command window and continue the setup and select the vhd on the partition screen. You might get a warning just ignore it and continue. create vdisk file=“[drive]:lt;machine>.vhd" type=expandable maximum=50000 select vdisk file=“[Drive]:lt;machine>.vhd"attach vdisk
43. Best practices Create Gold image VMs Keep them up to date (update every 3 months) Generalize them (sysprep) Use Undo/Snapshot as much as possible One thing to keep in mind with snapshot is they are time based so if you hadn’t activated windows when you revert you might have too. If you know you’ll snapshot and your VM is attached to a domain, make sure you turn off the “Domain Member: Maximum machine account password age”
44. Best practices Use fixed disk as much as possible to help with performance Delegate the Team Development VM creation task to one person and make sure he keeps it up to date with the latest tools the team uses Great productivity gain Everyone starts with the same environment Activate HAV in your laptop BIOS
45. Don’t forget these… VMs are “real” computer so threat them as such (AV, Patch, etc.) Try to use VMs on a second hard disk even a USB disk is better then the same as the OS. USB 3 will rock! Don’t forget to backup!!! If it’s performance you are looking for, maybe virtualization not for you If you don’t want to impact you company network set your VM networking to offline or NAT or loopbak Think about using all the features (Diff disk, Undo, Snapshot, etc.) Don’t forget about licensing…
47. Lets get started with virtualization Preparation HAV (Hardware Assisted Virtualization) setting in the BIOS ISOs of the OSs you will use (Windows XP, 7, 2008, etc.) Demos Creation of a new VM Differencing Drives Undo disks/Snapshots Integration Services (or equivalent) Sysprep (Windows XP, Windows Vista+) Networking/Loopback adapter (hdwwiz.exe)
48. Links VMWare Server and Workstation www.vmware.com Windows Virtual PC www.microsoft.com/virtualpc Test yourBIOS if HAV issupported http://www.microsoft.com/downloads/details.aspx?FamilyID=0ee2a17f-8538-4619-8d1c-05d27e11adb2&displaylang=en Windows Server 2003 Service Pack 2 32-bit Deployment Tools http://www.microsoft.com/downloads/details.aspx?familyid=96A35011-FD83-419D-939B-9A772EA2DF90&displaylang=en Hyper-V http://www.microsoft.com/windowsserver2008/en/us/hyperv-main.aspx ALM Rangers VM Factory http://rangersvsvmfactory.codeplex.com/ MDT (Microsoft Deployment Toolkit) http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=25175