Your SlideShare is downloading. ×
Tech X Virtualization Tips
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Tech X Virtualization Tips

369
views

Published on

Published in: Technology

0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
369
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • Eliminate bottlenecks
  • Add benchmarks?
  • Transcript

    • 1. Virtualization Tips and Techniques Michael Otey Technical Director Windows IT Pro Magazine
    • 2. What this session covers
      • General Performance Tips
      • Virtual PC Tips
      • VMware Workstation Tips
      • Microsoft Virtual Server Tips
      • ESX Server Tips
    • 3. General Performance Tips
    • 4. Server and Desktop Performance
      • Add RAM to the host
        • RAM is the #1 limiting factor
        • Reserve 512 MB for the host
        • RAM per guest + 32MB
      • Add CPUs
        • One thread per VM
        • Multiple threads can be spread across CPUs
      • Use a fast disk subsystem
        • 7200 RPM, 10,000 better, 15,000 better
        • Multiple drives enable separation of host OS and VHDs
        • SAN for server consolidation
          • Multipath I/O
      • Add NICs
        • Spreads network traffic across NICs
    • 5. Laptop Hardware Performance
      • Add RAM
        • Up to the max
        • look for laptops supporting 4MB
      • Hard drive considerations
        • Fastest possible
          • Not 4500
          • 5400rpm, 7200rpm better
        • Multiple spindles
          • Separate host OS and VHDs
      • One to two active VMs at the most
    • 6. VM Memory Performance Tips
      • Reserve adequate RAM for the host
        • 512 MB
      • Reserve adequate RAM for guests
        • 256 is the minimum
      • Exclude VMs from AV scanning
      • Run VMs in full screen mode
        • Slight better performance in VMware
        • Noticeably better for VPC
      • Disable Windows Paging of Executive Components
        • HKEY_LOCAL_MACHINE SYSTEM CurrentControlSet Control Session Manager Memory Management DisablePagingExecutive
        • Change from 0 to 1
    • 7. VM Disk Performance
      • Make sure the host maintains at least 20GB of free space
      • Create VHDs on a different disk than the host OS
      • Use virtual SCSI hard disks
        • 20% faster than virtual IDE
      • For better performance use fixed sized virtual hard disks
        • No expansion
    • 8. VM Performance Tips
      • Install Virtual Machine Additions / VMware Tools
        • Enables moving more of the guest OS into the kernel
        • Host drag-and-drop (Desktop products)
        • Host time synchronization
        • Higher performance drivers
          • SVGA, Mouse
    • 9. VM Disk Defragmentation
      • Multi-level Defragmentation
        • Guest
          • Contained in VHD
          • Stores guest OS and file system
          • Regular maintenance
          • Third party defragmentation tools provide better results
            • Raxco, Diskeeper, Winternals
          • Make sure multiple guest don’t schedule this for the same time
        • VM
          • Compacts VHD – reclaims unused space
          • Guest must be powered of
          • VMWare
            • VM Settings > Tools > Defragment
          • VPC
            • VPC SP1 – Virtual Disk Precompacter
            • Connect Virtual Disk Precompactor.iso
            • %ProgramFiles%Microsoft Virtual PCVirtual Machine Additions
            • Run Precompact
        • Host
          • Stores all VM VHDs
          • Regular maintenance
          • Third party defragmentation tools provide better results
    • 10. Windows Guest OS Performance
      • Maximize hardware acceleration
        • Desktop Properties (Right-click Desktop, choose properties)
        • Settings > Advanced > Troubleshoot
        • Hardware Acceleration to Full
      • Turn off visual effects
        • Desktop Properties (Right-click Desktop, choose properties)
        • Appearance > Effects
        • Disable Use the following transition effect for menus and tooltips
        • Disable Show window contents when dragging
        • Disable Show Shadows under menus
      • Set menu delay
        • My ComputerHKEY_CURRENT_USERControl PanelDesktop
        • MenuShowDelay 400
      • Disable unnecessary pointer options
        • Mouse Control Panel
        • Disable Pointer trails, Shadow cursors
    • 11. Don’t Virtualize Everything
      • Not all hardware implementation are good candidates for virtualization
        • USB Devices
      • Not all workloads are good candidates for virtualization
        • Heavy disk I/O
        • Low latencies are always needed
    • 12. Microsoft Virtual PC 2004
    • 13. Differencing Disks
      • Shared base VHD image
      • Saves disk space
      • Do not change the parent (read–only)
    • 14. VPC VM Files
      • .vhd – Virtual hard disk & Differencing disk
      • .vmc – VM configuration file
      • .vud – Undi disk
      • .vsv - Save state file
    • 15. Differencing Disks
      • File > Virtual Hard Disk Wizard
      • Create a new virtual disk > Virtual Hard Disk
      • Select the location
      • Select Differencing
    • 16. Cloning VMs
      • Copy VM files directly
        • Edit the .vmc revove MAC address
        • Duplicate server name and SID
    • 17. Cloning VMs
      • Sysprep -XPSupportTools Deploy.cab
      • Create a new VM and install Windows
      • Run setupmgr.exe
        • Answer wizard settings (automate installation, generate system name, administrative password, network settings)
        • Creates sysprep.inf
      • Run sysprep.exe
        • Select Reseal
        • Generate SIDs
      • Remove original .VM
      • Copy VHD
      • Add new VM selecting VHD
    • 18. Virtual PC 2007
      • Currently in beta
        • http://www.microsoft.com/windows/virtualpc/default.mspx
      • Will remain free
      • 32-bit only
        • Can run on 64-bit as a 32-bit application
      • Supports Intel-VT and AMD-V
      • Support for Vista and the AERO UI
      • Virtual PC Express
        • Vista Enterprise, Vista Ultimate
        • Supports a single VM
    • 19. VMware Workstation 5.0
    • 20. VMware Workstation Files
      • .vmdk - Virtual Hard Disk
      • .vmx – VM configuration files
      • .vmx.bak - Backup configuration file
      • .vmsd – Snapshot metadata
      • .vmsn – Snapshot state file
      • .vmss – Suspended state file
      • .nram – Store the VM state
      • .log - Records VM activity
      • .vmtm – VM team configuration file
    • 21. Cloning a VM
      • VM > Clone…
        • Must be powered off
      • Select VM state
        • Current or snapshot
      • Select Clone type
        • Linked or full
    • 22. Creating a Clone Template
      • VM > Settings > Options > Advanced
      • Accessed by users with VM write permissions
    • 23. Creating a VM Team
      • Teams can span Linux, UNIX and Windows
      • Defines VM realtionships
        • VM start together, optional delay
        • Private LAN connections
      • Home > New Team
        • Team Name, location
        • Add VMs
    • 24. Linux and Windows File Sharing
      • Create a Linux VM
      • Use SAMBA to access the Windows files system
        • Part of most distributions (www.samba.org)
      • Windows System Message Block (SMB) protocol
        • Firewall ports
          • 137,138, 139, 445
    • 25. Microsoft Virtual Server 2005 R2
    • 26. VS2005 Files
      • vhd – Virtual hard disk & Differencing disk
      • .vmc – VM configuration file
      • .vud – Undo disk
      • .vsv - Save state file
    • 27. Accessing Virtual Server 2005
      • Web URL
        • http://localhost:1024/VirtualServer/VSWebApp.exe?view=1
      • Firewall
        • Port 1024 Administrative Interface
        • Port 5900 VM Remote Control
    • 28. Setting up a VM Cluster
      • Windows Server 2003 EE
      • 2-Node Cluster Only
      • VMs must be on single host or use iSCSI
      • VMs must use SCSI virtual disks
      • Virtual disk must be fixed
        • Undo feature must be disabled
      • Two virtual NICs
        • Heartbeat
        • public
    • 29. AutoStart Virtual Machines
      • Edit Configuration
    • 30. Automatically Shutdown Guest OS
      • Edit Configuration
        • General Properties
          • Action when server stops
          • Shut down guest OS
    • 31. Script to Backup VMs
      • Saves state and backs up:
        • virtual hard disks, undo disks, state, config
      Option Explicit On Error Resume Next Dim objFSO, objVirtualServer, objVM, objSaveTask, objVHD 'Connect to file system object. set objFSO=CreateObject("Scripting.FileSystemObject") 'Connect to Virtual Server. set objVirtualServer = CreateObject("VirtualServer.Application") 'Get virtual machine from command-line parameter. set objVM = objVirtualServer.FindVirtualMachine(WScript.Arguments(0)) 'Save state of the virtual machine. set objSaveTask = objVM.Save 'Loop waiting for task completion while not objSaveTask.isComplete WScript.Sleep 1000 wend
    • 32. Script to Backup VMs 'Copy virtual hard disks and undo disks. for each objVHD in objVM.HardDiskConnections If objFSO.FileExists(objVHD.HardDisk.file) Then 'Wscript.Echo objVHD.HardDisk.file & " " & WScript.Arguments(1) objFSO.CopyFile objVHD.HardDisk.file, WScript.Arguments(1) End If If objFSO.FileExists(objVHD.undoHardDisk.file) Then 'Wscript.Echo objVHD.undoHardDisk.file & " " & WScript.Arguments(1) objFSO.CopyFile objVHD.undoHardDisk.file, WScript.Arguments(1) End If Next 'Copy .vmc and .vsv files. objFSO.CopyFile objVM.File, WScript.Arguments(1) objFSO.CopyFile objVM.SavedStateFilePath, WScript.Arguments(1) 'Start the virtual machine. objVM.Startup
    • 33. VM Resource Allocation
    • 34. VS2005 Hardware Virtualization
      • Virtual Server 2005 R2 SP1 beta2
      • Processor must support virtualization
      • Enable Virtualization in the BIOS
      • Enable Virtualization in the VM
        • General Properties
      • Verify in Perfmon
        • Virtual Processors Object
        • HVM-VP counter = 1
    • 35. VMware Virtual Server 1.01
    • 36. VM Files
      • C:Virtual Machines<VM Name>
      • .vmdk - Virtual Hard Disk
      • .vmx – VM configuration files
      • .vmx.bak - Backup configuration file
      • .vmsd – Snapshot metadata
      • .vmsn – Snapshot state file
      • .vmss – Suspended state file
      • .nram – Store the VM state
      • .log - Records VM activity
      • .vmtm – VM team configuration file
    • 37. Accessing Virtual Server
      • Web URL
        • http://localhost:8333/vmware/en
      • Firewall
        • Management Interface
          • Port 8333 (8222 if SSL is disabled)
        • Virtual Server Console
          • Port 902
    • 38. Auto Start and Shutdown VMs
      • Right Click VM > Settings
      • Options
        • Startup/Shutdown
      • Must specify user account or Local System
    • 39. Install Guest OS from ISO
      • Fast diskless install
      • Right click VM
      • Settings
      • CD-ROM
      • Use ISO
      • Start VM
    • 40. Silent Install for VM Tools
      • Connect CD to windows.iso
        • %Program Files%VMwareVMware GSX Server
        • msiexec -i &quot;D:VMware Tools.msi&quot; ADDLOCAL=ALL /qn
    • 41. Configuring Virtual SMP Support
      • New Virtual Machine wizard
      • Custom
      • Select Guest (guest must have SMP capabilities)
      • Name the VM
      • Set Access Rights
      • Startup/Shutdown options
      • Processor options
    • 42. Migrating Virtual Machines
    • 43. Migrating Physical Machines
      • Microsoft Virtual Server Migration Toolkit http://www.microsoft.com/windowsserversystem/virtualserver/evaluation/vsmt.mspx
        • Requires ADS (Automated Deployment Services
        • P2V no V2P Migration
      • VMware Importer
        • Built-in to Workstation and Server
        • P2V no V2P
        • Imports VPC and VS2005 images
        • http://www.vmware.com/download/vmimporter/
      • VMware Converter (beta)
        • P2V & V2P
        • Two way conversion
          • Microsoft, Symantec BackpP Exec, Norton Ghost, VMware
        • Sector based
        • X86 and x64 support
        • http://www.vmware.com/products/beta/converter/
    • 44. Other Migration Strategies
      • PlateSpin
        • Mass migrations
        • Standalone Mmigration server
        • Oriented towared
      • DIY Migration
        • Backup and Restore
          • NTBackup
          • Ghost
    • 45. Application Virtualization
    • 46. Altris
      • Automatically Start Application Layers
        • File > Start Layer Automatically
      • Reset Layer
        • File > Reset Layer
    • 47. Application Virtualization
      • Don’t use this for AntiVirus or AntiSpyware
        • Not intend for any product that uses a file system driver
      • Don’t attempt to use this for VM products
        • This actually can work but its backward
    • 48. VM Best Practises
      • Build your VMs seprate from the host OS
      • Size you VHDs big enough
      • Used fixed VHds for better performance
      • Don’t put VMs on encrypted or compressed drives
      • Eliminate VMs from host AV scanning
    • 49. Virtualization in Vista
      • Virtual PC 2007 Express
      • Vista Enterprise Edition
      • Vista Ultimate Edition
      • One Active Instance
    • 50. Virtual Server 2005 on Vista
      • Must run IE as Administrator
      • Out-of-box link fails
      • Create desktop shortcut
        • &quot;C:Program FilesInternet Exploreriexplore.exe&quot; &quot;http://localhost/VirtualServer/vswebapp.exe?view=1&quot; 
        • Run As Administrator
    • 51. VM Management Products
      • VMware
        • VMware Infrastructure 3
          • ESX Server
          • VirtualCenter, VMotion
        • http:// www.vmware.com /products/vi/
        • Does not need AD
      • Microsoft
        • System Center Virtual Machine Manager
        • http://www.microsoft.com/ systemcenter/scvmm/default.mspx
        • Requires Active Directory
          • Security
        • Based on PowerShell
          • Scriptable
    • 52. Cool Free Tools
      • VirtuaIQ 525
        • 5 CPUs or 25 VMs
        • Web based
        • http://www.toutvirtual.com/solutions/viq_525.php
      • Virtual Floppy Drive
        • http://chitchat.at.infoseek.co.jp/vmware/vfd.html
      • Flexomizer Defrag
        • http://www.flexomizer.com/PermaLink,guid,ce99367e-158c-487a-879d-b32145cc1957.aspx
    • 53. VM Products
      • PlateSpin – PV2 & V2P
        • www.platespin.com
      • Leostream – P2V, Disk Synchronization
        • www.leatstream.com
      • Acronis True Image
        • www.acronis.com/enterprise/products/choose-trueimage
      • Microsoftr iSCSI Software iniator
        • http://www.microsoft.com/downloads/details.aspx?FamilyID=12cb3c1a-15d6-4585-b385-befd1319f825&DisplayLang=en
      • Microsoft Virtual Machine Additions for Vista
        • http://connect.microsoft.com
    • 54. Additional Resources
      • VMware Workstation Benchmarking Guidelines
        • http://www.vmware.com/pdf/WS55_Benchmarking_Guidelines.pdf
      • Virtual PC Guy’s Weblog
        • http://blogs.msdn.com/virtual_pc_guy/archive/tags/Virtual+PC+_2F00_+Server+Tips+_2700_n_2700_+Tricks/default.aspx
    • 55. Windows IT Pro Articles
      • Troubleshooter: Deciding Whether to Use a Virtual Machine with Exchange
        • InstantDoc 26205
      • Reader’s Choice Virtualization Software
        • InstantDoc 47336
      • Back up a virtual instance running in Microsoft Virtual Server 2005
        • InstantDoc 49656
      • What you need to know about the virtualization formats
        • InstantDoc 92862
      • Running SQL Server in a VM
        • InstantDoc 46018
      • Virtual Server 2005 Cluster Setup Kit
        • InstantDoc 45901
      • VMware Clsutering Recipe
        • InstantDoc 37599
    • 56. Windows IT Pro Product Reviews
      • VMware Workstation 4.5
        • InstantDoc 42271
      • VMware GSX Server 2.5
        • InstantDoc 39182
      • VMware VirtualCenter 1.1
        • InstantDoc 44976
      • VMware ESX Server 2.0
        • InstantDoc 48409
      • Virtual Server Face Off
        • InstantDoc 45253
    • 57. Thank You! Michael Otey [email_address]