Automation technology can be a great help to VDI, where administrators need to perform a variety of "cookie cutter" tasks.
Virtual desktop infrastructure (VDI) administrators are tasked with creating, cloning and managing images of desktop operating environments that include both a desktop OS and some collection of tools, utilities and applications. Supporting those tools and programs usually involves detailed job or task analysis, then crafting collections of executables to match. Once the analysis and construction work is complete, much of what follows is a cookie-cutter type of operation, where one set of updates, patches or fixes usually takes care of a group of targeted users.
That's why VDI is uniquely well suited to employing automation tools for updates, deployment and distribution to the masses. So what exactly should you automate?
Which automation tools make sense for VDI?
Microsoft has a sizable collection of scripts for its Hyper-V environment (which includes both server and desktop automation elements) with the latest release of Windows Server 2012 R2. There are also Hyper-V cmdlets in Windows PowerShell, Microsoft's Script Center repository and much more online.
More on automation technology
Guide to automation for virtualization
Performing virtualization automation with PowerShell
Weighing automation tools for virtualization provisioning
Beyond Microsoft's PowerShell, there are lots of ways to exploit scripts to automate typical, routine administrative VDI tasks. VirtualizationAdmin.com includes a tutorial on automation with HP's Sizing Tool, Microsoft's App-V, VMware Workstation, Microsoft System Center and a variety of free Hyper-V resources.
What's to automate in a VDI environment?
The short answer might be "anything and everything," but more specifically, you should base your decision to automate on two things: frequency and repetition. The best things to automate are tasks or activities that get repeated on a regular basis, whether on-demand as needed, or routinely as part of some ongoing set of processes.
Another way to determine what's fair game for VDI automation is to look at the kinds of tasks for which scripts are available in automation repositories online. These also provide models to emulate or tools to use, depending on how automation is used in your workaday environment. Table 1 provides some recurring categories and activities that are worthy of VDI automation. In parentheses, you'll find links to automation tools for those tasks.
Table 1. Common VDI automation elements
|Hypervisor tasks||Managing Hyper-V and other similar hypervisors (Hyper-V Manager)|
|Finding virtualization hosts (Hyper-V servers)|
|Creating VMs||Building a Hyper-V VM (Data Center 2012)|
|Changing the parent virtual hard disk (Hyper-V server)|
|Creating VMs for VDI (Remote Desktop Services)|
|Managing VMs||Shutting down and exporting Hyper-V VMs (Windows Server 2012)|
|Exporting a VM for reuse (Hyper-V Program Manager)|
|Managing VM snapshots (creating, deleting a subtree; listing snapshots)|
|Updating/patching VMs (System Center Virtual Machine Manager 2012)|
|General Hyper-V VM tasks (start, stop, save, suspend, pause, shut down)|
|Resetting MAC addresses on VMs (Hyper-V servers)|
|Monitoring VMs||Reporting on VM hosts and instances (Data Center 2012)|
|Checking Hyper-V Service Event Logs (Windows Workstation)|
|Enumerating VMs and their properties (Hyper-V servers)|
Most of the routine, everyday tasks that fall under these umbrellas have already been automated in some form. There's always some work involved in tailoring VDI automation for your specific environment, but that usually involves a great deal less work than starting from scratch.
That's why I strongly urge you to investigate what's available in the script repositories before tackling automation tasks from the ground up. In most cases, you should be able to search on a specific task for a specific platform, such as "creating VMs for vSphere," and be able to find plenty of advice and examples from which you can start. This is an area where many have gone before and generously shared their experiences, so there's no reason why you shouldn't take advantage of what's already available as you automate your own VDI.