best practices for creating vmware view golden master images

33
© 2009 VMware Inc. All rights reserved “Golden Master” Best Practices with View Matthew Honigford Technical Account Manager, VMware [email protected]

Upload: cshuntley3

Post on 21-Feb-2015

368 views

Category:

Documents


8 download

TRANSCRIPT

Page 1: Best Practices for Creating VMware View Golden Master Images

© 2009 VMware Inc. All rights reserved

“Golden Master” Best Practices with View

Matthew Honigford – Technical Account Manager, VMware

[email protected]

Page 2: Best Practices for Creating VMware View Golden Master Images

Guess the Outcome

Read 30% of Admin

GuideDeploy Manage

Page 3: Best Practices for Creating VMware View Golden Master Images

Best Practices for creating “Golden” images

Can be broken up into two main parts:

•Optimizing the VM within ESX

•Optimizing the Windows OS

Page 4: Best Practices for Creating VMware View Golden Master Images

Best Practices for creating “Golden” images

Optimizing the VM within ESX

Page 5: Best Practices for Creating VMware View Golden Master Images

Optimizing the VM within ESX

•Use Hardware Version 7

•Use as few vCPU’s as possible while still maintaining good user

experience

• Ensure average CPU usage is less than 70%

• Ensure %RDY counter is less than 10%

•Change the default SCSI controller

• Default for Windows XP is BusLogic

• Change to LSI Logic Parallel

• Download LSI_U320_W2003_IT_MID1011438.zip from www.lsi.com

• Create .flp file using WinImage or other disk imaging tool to create virtual floppy

Page 6: Best Practices for Creating VMware View Golden Master Images

Optimizing the VM within ESX

Disable Virtual Machine Logging

• Change Parameter through GUI (shown below) or modify .vmx file to reflect

logging = “FALSE”

Page 7: Best Practices for Creating VMware View Golden Master Images

Optimizing the VM within ESX

Disable Serial and Parallel Ports

• Edit Boot Options to boot into BIOS

• In BIOS, go to Advanced I/O Device Configuration and disable serial and

parallel ports. Press F10 to save changes and Exit

Page 8: Best Practices for Creating VMware View Golden Master Images

Optimizing the VM within ESX

•Align .VMDK to 64K block

• Use mbralign, fdisk in ESX service console, diskpart, or vOptimizer

• Since the ―free‖ option is diskpart…

• Once VM is created, mount .VMDK on another Windows System (Don’t format it or do

anything crazy to it)

• Open a command prompt and run

• diskpart select disk 1 (assuming you only have 1 .VMDK file already)

• diskpart create partition align=64

• Exit the command prompt and shut the VM down

• Remove the .VMDK (don’t delete it)

• Install Windows using standard method

• Press F6 to install driver from floppy, mount floppy image and load LSI logic

Driver (not required for Windows 7)

Page 9: Best Practices for Creating VMware View Golden Master Images

Best Practices for creating “Golden” images

Optimizing the Windows OS

Page 10: Best Practices for Creating VMware View Golden Master Images

Windows OS Optimizations

• Install VMware Tools

• Install Windows Patches, then turn OFF Automatic Update

•Disable Serial and Parallel ports in Device Manager (if they exist)

•Set Screensaver to “None” or “Blank”

•Disable System Sounds (Set Sound scheme to “None”)

• (Windows 7) Uninstall Tablet PC Components

Page 11: Best Practices for Creating VMware View Golden Master Images

Windows OS Optimizations

•Disable Windows Error Reporting

•Remove unnecessary boot applications (Quicktime, Real, Adobe

Acrobat Updater, etc.

•Remove unneeded Windows components (Outlook Express,

Messenger, Games, etc.)

•Disable unnecessary services

Page 12: Best Practices for Creating VMware View Golden Master Images

File System

•Disable NTFS “Last Accessed” option

• fsutil behavior set disablelastaccess 1 (Requires reboot)

•Disable Windows Prefetcher

• [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session

Manager\Memory Management\PrefetchParameters\EnablePrefetcher];

• Set the value to 0 (Disable)

•Disable System Restore

• Right Click ―My Computer‖ Properties, ―System Restore‖ tab and select

―Turn off System Restore‖

•Disable Indexing

• Double Click ―My Computer, Right click on C:\ Properties Click ―General‖

tab and clear ―Allow Indexing Service to Index…‖

Page 13: Best Practices for Creating VMware View Golden Master Images

More File System

•Disable Offline Files

•Disable scheduled or background Defrag

•Disable Windows Search

•Disable Windows Disk Optimizer

•Adjust the disk timeout value

• [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Disk]

• ―TimeOutValue‖=REG_DWORD:0×000000be(190)

•Use User Profile Hive Cleanup Service to help prevent profile

corruption

Page 14: Best Practices for Creating VMware View Golden Master Images

Power Settings

•Disable hibernation

•Change power settings to “High Performance” and disable sleep

timer

•Set HDD’s to “Never” turn off

• Open Control Panel Power Options Change Plan Settings Click

Change Advanced power settings set "Turn off hard disks after" setting to

Never

•Disable the Logon Screen Saver

• HKEY_USERS\.DEFAULT\Control Panel\Desktop

• Edit ScreenSaverActive and change value to 0

Page 15: Best Practices for Creating VMware View Golden Master Images

Disable Notifications

•Disable logging of informational Printing events

• Open ―Printers and Faxes‖, Click File Server Properties Advanced and

clear ―Log spooler informational events‖

•Disable Success Logging (login attempts, etc.)

• Only do this if security policy allows it

•Disable Toolbar Notifications

•Disable the Windows XP Tour Notifier

•Disable Balloon Tips

•Shrink Event Logs and enable circular logging (registry keys)

•Disable Desktop Cleanup Wizard

Page 16: Best Practices for Creating VMware View Golden Master Images

Internet Explorer

•Disable “Use Suggested Sites”

•Set home page to Intranet site, or blank, or something lightweight

•Change IE to prevent programs from suggesting a change of the

search provider

•Remove Webslice gallery and suggested sites from Toolbars on IE

•Add “trusted sites” as necessary

•Shrink the IE Temp File size

Page 17: Best Practices for Creating VMware View Golden Master Images

Common Applications

• Install Adobe Flash Player (turning off automatic updates)

• Install Adobe Reader and set to “Do not download or install updates

automatically”

•Turn Java Updater off

•Remove MS OneNote tray service (if installed)

•Turn off Outlook Cached Mode

•Remove the Language Bar

• Regsvr32.exe /u msutb.dll

Page 18: Best Practices for Creating VMware View Golden Master Images

General OS Environment

•Set Pagefile to static size

•Change the default Windows Theme to “Basic”

•Adjust visual effects for “Best Performance”

•Enable ClearType Fonts

•Turn off Windows Security Center

•Turn off Automatic Computer Maintenance

•Disable “Allow users to browse for troubleshooters”

•Disable “Allow troubleshooting to begin immediately when started”

Page 19: Best Practices for Creating VMware View Golden Master Images

Network Optimizations

•Disable NetBIOS over TCP/IP

•Disable IPv6

•Join Master Image to Domain (if using View Composer)

•Add any necessary DNS suffixes

•Add any necessary HOSTS entries for “custom” applications

•Disable Automatic Searching of Network Printers and Shares

Page 20: Best Practices for Creating VMware View Golden Master Images

When it’s all said and done, a few last steps

•Optimize the Registry

• RegScrub.exe – Registry Cleaner

• NTRegOpt.exe – Registry Optimizer, removing ―white‖ space in registry

•Run disk cleanup

•Defrag the HDD

•Delete all event logs

•Make the User profile the Default Profile

•Windows 7, ensure KMS server is enabled

•Make sure Floppy and CD-ROM drives are set to “Client Device” and

not set to “Connect at Power On”

Page 21: Best Practices for Creating VMware View Golden Master Images

View 4.0 Design Considerations

Page 22: Best Practices for Creating VMware View Golden Master Images

General View Best Practices

Validate size of User Data Disk

• Provisioning too little disk for UDD can be detrimental

• Outlook .OST will likely end up on UDD in Outlook cached mode (and UDDs are

difficult to resize)

Validate the cost and performance tradeoffs of Cached Outlook mode for VDI

• Adjust browser cache size to lowest useful setting

Exclude Java Message Bus folder from AV scanner

• C:\Program Files\VMware\VMware View\Server\MessageBus

Avoid running concurrent AV scans

• Full systems scans cause major performance impacts

• Stagger full systems scans (when full system scans are a corporate standard)

Page 23: Best Practices for Creating VMware View Golden Master Images

Pool Design: View VM Memory Considerations

VM Swap size and storage

VM Density

Windows pagefile

Memory for Apps

Balance between paging and

VM Swap file size

VM

Memory

Size

•VM Swap size = VM RAM

•Local vs. shared datastore

•Size of delta disk

•IOPS

•TPS Optimization

•Disk consumption

Page 24: Best Practices for Creating VMware View Golden Master Images

Pool Design: Pool Type Considerations

User installed

apps

• Will users need to install apps?

User initiated machine changes

• Are users modifying registry keys or environment variables?

Available disk

space

• Is disk space inexpensive or plentiful?

Pool Type

Common Pool Types:

•Persistent/non-persistent

•Linked clone/non-linked clone

Page 25: Best Practices for Creating VMware View Golden Master Images

VI Design: View Block—vCenter and Clusters

vCenter Servers

Cluster Hosts

Cluster Settings

• One VC per 2,000 (VI4.x)

desktops

• Max Eight ESX hosts per

cluster serving linked clones

• Leave room for failover and

maintenance

• Keep within DRS limits (1280)

• 100 (160 ESX 4 U1) VMs per

host for HA

vCenter and

Cluster

Design

Page 26: Best Practices for Creating VMware View Golden Master Images

Example View Block and Pod Architecture

Page 27: Best Practices for Creating VMware View Golden Master Images

VI Design: ESX Server Considerations

RAM• Density and

cost

pNICs

• VMs/pNIC/VLANs

• 1GBE vs. 10GBE

• Storage network (NFS/iSCSI)

Storage• Type/protocol

• Size and Quantity

• Performance

ESX Server

Considerations

Higher density DIMMs

increase price

10GBE cost dropping

NFS—Best performance

with jumbo frames

Local disk—good storage

location for vSwp files

iSCSI vendors

optimizing performance

Balance CPU and

memory needs

Blades have

emerged as ideal

platform for hosting

virtual desktops

1 Port group per VLAN ID

Page 28: Best Practices for Creating VMware View Golden Master Images

Storage Design: Sizing Considerations

Linked Clone Pool datastore size=

Replica VM VMDK size

+ (Desktop VM Memory Provisioned * 2)

+ (Parent VM VMDK * 25%)

+ Log File storage size

* Number of VMs per Datastore

+ Datastore free space allocation

10GB (Same as

Parent VM)

VM Swap and

Windows PF

Growth for delta

files

~100 MB

Max per LUN: 64

15% overheadConservative

Conservative

Page 29: Best Practices for Creating VMware View Golden Master Images

Operational Best Practices

Operations Common Sense

• Don’t reboot all VMs during operational hours

• Perform Refresh and Recompose operations on a schedule, during off-peak

times

• Track or limit user initiated changes, or plan on increasing cluster capacity over

time

User Application Virtualization to save on application licensing

costs

• Don’t include licensed apps in the base image whenever possible

Use an image build tool (i.e., MDT)

• Structured build process and predefined modules drives consistency, fewer

untracked changes

Keep master image metadata outside of View/VI

• Create and enforce strong naming conventions for Parent VMs and snapshots

Page 30: Best Practices for Creating VMware View Golden Master Images

Operational Best Practices

DHCP

• Adjust default lease time (MS DHCP) from 8 days to 1 hour

• Release DHCP script for floating pools that refresh on logoff

VLAN Usage

• Avoid ―overloading‖ VLANs used for View desktops to avoid running out of IP

addresses

This situation is difficult to troubleshoot

vCenter Management

• Do not allow a vCenter VM to manage the ESX host it’s running on

Page 31: Best Practices for Creating VMware View Golden Master Images

Recommendations

User Data and Persona Management

• Use folder redirection for My Documents

Easier to use existing file archival system, maintain multiple file versions

• Evaluate Profile Management Applications

Turn off Outlook Cached Mode

• VMs on same high speed network don’t benefit as much from cached mode

• Save on disk space and conserve storage IOPS

Never P2V a physical machine for a View master image

• It would be more efficient to build a VM from scratch

Page 32: Best Practices for Creating VMware View Golden Master Images

References

• http://www.emc.com/collateral/software/white-papers/h7168-performance-

optimization-windows-xp-vdi-wp.pdf

EMC Document on optimizing Windows XP

• http://www.creedtek.com/?p=37

Some Best Practices for tuning Windows 7

• www.VDI.COM

Independent online gathering of VDI gurus

• www.vmware.com

• VMware corporate web site. Collection of Best Practices guides, sizing guides,

and white papers

Page 33: Best Practices for Creating VMware View Golden Master Images

Q & A

Thank You!