Mass provisioning of VM’s

We have a need to provision a bunch of Linux VM’s relatively quickly. We could do them by hand, but frankly, I’m too lazy to build 150 VM’s by hand. This is a very rough way to do it.

First you need a Customization Specification filled out for each server. It’s entirely scriptable, but I won’t be going into the details of that. This is what the Customization Specification looks like



I’m going to guess you know your environment well enough to recognize your DNS servers, your default gateway, subnet mask, the servers name, etc. Customize this file with the new settings you need. Once you have your new XML file, you’ll want to name it appropriately and import it into Virtual Center (I haven’t found a way to automate that yet.)

Since that’s done, you just need to fire up PowerShell (I’m using PowerShell on the same box as my Virtual Center.) This too is scriptable, but I haven’t written that script yet either. This is the rough framework you need to get started.

Connect-VIServer localhost (This connects you to the local VC.)
new-vm -name HandCodedVM1 -Template LINUX_TEMPLATE -OSCustomizationSpec HandCodedVM1 -VMHost HOST01 -Datastore OS01_NAS

Relatively easy to do, and it will save us a couple of days over doing it manually.