Script Template Vm’s Creation on Esxi V5 (cloning)

This script does the following:

  • List of the current machine’s name based/stored on the target destination.
  • Ask for the name of the new machine.
  • Type of machines (Windows 2003 / Centos / etc…)
  • Create the image based on the template’s machines.
  • Register the vm into the Vsphere inventory.
  • Asking you if you wish to start or not once created.

To use this one on your Esx(i), edit the file and replace some variables:

  • Datastore source (where the template’s machines are available and stored)


  • Datastore as target (where the target ‘s vm would be created).


  • Source image name (templates) Folder’s name of your template.


– Memory set of the vms (ie: I have set 1GB for any type of vm created.)


Download the script.

I have recently found this Howto from the vmware’s community, this might help to review my script and add the choice with Datastore to wish to generate the clone.


Leave a Reply