NAME

vmtemplate.pl - Convert virtual machine to a template and vice-versa.


SYNOPSIS

 vmtemplate.pl --url <web service URL> --username <server login name>
             --password <server login password> --vmname <virtual machine name>
             --operation <T|VM> [--pool <resource pool name>]
             [--host <host name>]


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:
  I<T> (convert virtual machine to template).
  I<VM> (convert template to virtual machine).

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. The value of the host option should be exactly same as defined in the VI client. For a stand-alone host , it can be omitted and the script selects the default.

T OPTIONS

vmname

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


EXAMPLES

Convert a virtual machine named 'VirtualABC' to a template :

    vmtemplate.pl --url https://192.168.111.52:443/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://192.168.111.52:443/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://192.168.111.52:443/sdk/webService
      --username administrator --password mypassword 
      --vmname VirtualABC --operation VM --pool Poolxyz


SUPPORTED PLATFORMS

All operations work with VMware VirtualCenter 2.0.1

No operation work when VMware ESX Server 3.0.1 directly accessed.