Creating Virtual Machines and Virtual Machine Templates
To create a virtual machine, you use the Folder.CreateVM_Task method. The method takes a VirtualMachineConfigSpec data object as input argument. VirtualMachineConfigSpec allows you to specify the attributes of the virtual machine you are creating.
If you need several identical virtual machines, you can convert an existing virtual machine to a template and create multiple copies (clones) from the template. You can also create multiple virtual machines by cloning an existing virtual machine directly.