Automating VM deployments
In situations when there is a requirement to deploy many VMs in a short period of time, the process can be automated using PowerCLI scripts.
Note
PowerCLI is not the only way to automate deployments in vSphere. VMware provides an Application Program Interface (API) and Software Development Kit (SDK), which can be used in conjunction with several languages to automate a broad range of tasks in vSphere. More information is available at https://www.vmware.com/support/developer/vc-sdk/.
PowerCLI is a snap-in for Windows PowerShell to manage the vSphere environment. It allows administrators to automate any management tasks, including tasks related to guest OS and storage. The tool comes with over 300 cmdlets as well as documentation and examples. PowerCLI is free and can be downloaded from http://my.vmware.com.
Note
Make sure the version being installed is compatible with the vSphere and PowerShell versions in the environment.
Getting ready
Before creating and testing a VM...