vmtemplate.pl - Converts a virtual machine to a template and template back to virtual machine.
vmtemplate.pl --operation <T|VM> [options]
This command provides an interface for converting an existing virtual machine to a template and vice versa.
Required. Operation to be performed. Must be one of the following:
T – Convert virtual machine to template.
VM – Convert template to virtual machine.
Required. The name of the virtual machine which is to be converted to a template.
Required. The name of the virtual machine which is to be re-associated with a host and a resource pool.
Required. Resource pool to associate with the virtual machine.
Optional. The target host on which the virtual machine is intended to run.
Convert a virtual machine named 'VirtualABC' to a template :
vmtemplate.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --vmname VirtualABC --operation T
Convert a template to virtual machine named 'VirtualABC'. Let 'Poolxyz' be the resource pool to be associated with this virtual machine and 'BlueHost' be the host on which the virtual machine is intended to run:
vmtemplate.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --vmname VirtualABC --operation VM --pool Poolxyz --host BlueHost
Convert a template to virtual machine named 'VirtualABC'. Let 'Poolxyz' be the resource pool to be associated with this virtual machine and no host specified (default host will be selected in this case):
vmtemplate.pl --url https://<ipaddress>:<port>/sdk/webService --username administrator --password mypassword --vmname VirtualABC --operation VM --pool Poolxyz