230 likes | 610 Views
The slide deck from my presentation on automating VMware View using PowerShell and PowerCLI.
E N D
Three Simple Things…View Automation By Sean Massey Network Administrator Diocese of Green Bay
About the Diocese of Green Bay • Located in Green Bay • Covers 16 counties in Northeast Wisconsin • 157 Parishes • 57 Schools • Over 300,000 registered Catholics
About Diocese IT • Primarily Responsible for about 200 Users: • Provide limited support to parishes and schools We have to do all this with only FOUR people!
VMware View • Implemented VMware View in Summer of 2011 • Almost 100% Non-Persistent environment • Planning to replace XenApp with View 5.2 Pool details • 16 Desktop Pools • 7 Parent VMs
Automating VMware View View PowerCLICmdlets • Introduced with View 4.5 • Good for basic automation • Limits to functionality • Must be run on a Connection Server
Automating VMware View Scripting without View PowerCLIcmdlets • View data repository is LDAP • A lot of flexibility, but test carefully Warning – This is not supported by VMware!
Automating VMware View Other Command Line Tools • SVI-Config • View Composer command line tool • Vdmadmin • View Administrator command-line tool More limited and specific than other tools
Where, Automation, Where? Things We’ve Automated: • Recompose Desktop Pool Operations • Remediating Desktops with the wrong snapshot • Zero Touch Windows Updates of Linked-Clone Parent VMs
Script Prerequisites • PowerCLI • View PowerCLICmdlets (can only be run on Connection Server) • Quest Active Directory Cmdlets • Job Scheduling Tool Desktop Update script has other prerequisites
Recompose Automation • Why we scripted Recompose Operations • Accuracy • Reduce time spent on scheduling activities • Benefits • Better Coordination • Save Time
Recompose Automation • How It Works • Create Snapshot Path /snapshot1/snapshot2/snapshotcurrent • Get all pools that use that use the ParentVM • Check to see if there is enough space to clone a Replica to a Replica Volume • Schedule the recompose operation • Update-AutomaticLinkedClonePool • Send-LinkedCloneRecompose
Desktops with Wrong Images • Occasions where the ParentVM snapshot (image) does not update during recompose. • This creates additional replicas • Hard to track down in Web Interface • Have to look at each pool -> Inventory -> View Composer Details
Desktops with Wrong Images • Identify Desktops that don’t use Pool Snapshot • Does not use View PowerCLI • SVIVmSnapshotMOID • Generate and email report • Option to Auto-Remediate desktops • -Remediate switch • pae-vmstate field
Zero Touch Windows Updates • Normal Patch Tuesday Procedure • Script will automate that entire process for one or all ParentVMs • Can be used to deploy any updates that are pushed through Windows Server Update Services
Zero Touch Windows Updates • Prerequisites • Windows Update PowerShell Modulehttp://gallery.technet.microsoft.com/scriptcenter/2d191bcd-3308-4edd-9de2-88dff796b0bc • VMware VIX • 32-bit PowerShell Instance • Local Update Publisher for updates to Adobe Flash and Javahttp://localupdatepubl.sourceforge.net/ All Prerequisites for this are FREE.
Zero Touch Windows Updates • Had issues with the Wait-VMTools command during reboots • Use a custom function to return tools status • Do-Until Loop to process tools status during reboot operations • Do{$RebootToolStatus=Get-VMwareToolsStatus –VM $vm}Until ($RebootToolStatus –eq“toolsOK”) No Demo for this one.
Learning More • #vBrownBag “Automating All the Things” Podcast • Wednesday nights at 7:30 PM Central • http://professionalvmware.com/vbrownbag-automate-all-the-things-training-schedule/ • PowerCLI Sessions start on 10/2/2013 • 10/2/13 – Intro to PowerCLI with Josh Atwell • 10/9/13 – PowerCLI for the infrastructure manager with Alan Renouf • 10/23/13 – PowerCLI for the VMware administrator with Alan Renouf • 10/30/13 – PowerCLI for the VDI geek with Andre Leibovici • 11/13/13 – PowerCLI futures with Alan Renouf
Learning More • Twitter/Blogs • Alan Renouf (@alanrenouf) • Blog: virtu-al.net • Luc Dekens (@LucD22) • Blog: lucd.info • Josh Atwell (@Josh_Atwell) • Blog: vTesseract.com • Andre Liebovici (@andreleibovici) • Blog: myvirtualcloud.net • VMware PowerCLI Community
For More Information… • Blog - seanmassey.net • More details on these scripts • Github- github.com/seanpmassey/ViewPowerCLI • Twitter - @seanpmassey
Thank You to the Reviewers • Troy Thompson • Josh Atwell • Tim Antonowicz • Interested in presenting? VMUG Mentorship • http://blog.scottlowe.org/2013/09/18/putting-the-user-back-in-vmware-user-group/