NAME

vmtemplate.pl - Converts a virtual machine to a template and template back to virtual machine.


SYNOPSIS

 vmtemplate.pl --operation <T|VM> [options]


DESCRIPTION

This VI Perl command-line utility provides an interface for converting an existing virtual machine to a template and vice versa.


OPTIONS

GENERAL OPTIONS

operation

Required. Operation to be performed. Must be one of the following:

  <T> (convert virtual machine to template)
  <VM> (convert template to virtual machine)

T OPTIONS

vmname

Required. The name of the virtual machine which is to be converted to a template.

VM OPTIONS

vmname

Required. The name of the virtual machine which is to be re-associated with a host and a resource pool.

pool

Required. Resource pool to associate with the virtual machine.

host

Optional. The target host on which the virtual machine is intended to run.


EXAMPLES

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


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter Server.

No operation works when VMware ESX Server is accessed directly.