5.11.20 Create a template
Function
This plugin creates a template from a virtual server in a VMware vSphere environment. After the template is created, the source virtual server is left undeleted.
If you want to change the data store that stores the template, specify the data store name.
If no data store name is specified, the template is stored in the same data store as the source virtual server.
This plugin requires the following servers:
- vCenter server
A server on which VMware vCenter Server is installed
- ESX server
A server on which VMware vSphere ESXi is installed
- vCenter control server (execution target server)
A server on which VMware vSphere PowerCLI is installed. The plugin is transferred to and executed on this server by JP1/AO.
- Virtual server
A virtual server managed by the vCenter server and VMware vSphere ESXi
The following describes the template location (VMware.destTemplateLocation property).
- Specify the location (data center, folder, or ESX server) in which the template is to be created.
- If you specify a data center or folder, the template host will be the same ESX server as the source virtual server. The template cannot be created on a different ESX server.
- If you specify an ESX server, the specified ESX server is used as the host, and the template is created in the data center that manages the ESX server.
The following describes the data store name (VMware.destTemplateDataStore property).
- Specify the name of the data store that stores the template.
- If the specification is omitted, the template is stored in the same data store as the virtual server from which the template is created.
Use situation
This plugin can be used to create a template from an existing virtual server.
Prerequisites
See the Release Notes for the latest support statuses of prerequisite products for the system, prerequisite products for the execution-target system, prerequisite products on the execution-target server, and the supported OSs for the prerequisite products for the execution-target server.
Prerequisite products for the system:
JP1/Automatic Operation 11-10 or later
Prerequisite products for the execution-target system:
(1) Prerequisite product for the vCenter server
- VMware vCenter Server 6.5, 6.0, 5.5, 5.1, 5.0
(2) Prerequisite product for VMware vSphere ESX to manage virtual servers
- VMware vSphere ESXi 6.5, 6.0, 5.5, 5.1, 5.0
Conditions for using the prerequisite products for the execution-target system:
(1) VMware vSphere ESX must be managed by VMware vCenter Server.
(2) Conditions for settings on VMware vCenter Server
- The name of the template location (data center, ESX server, or folder) must be unique.
- Virtual server names must be unique.
- The VMware-related names shown below are case sensitive in VMware, but the specified names are not case sensitive in the vSphere PowerCLI instance that is executed by this plugin.
Therefore, this plugin cannot be used in an environment in which duplicate names with different case letters are used.
- Virtual server name
- Template name
- Data center name
- Folder name
- Data store name
Prerequisite products on the execution-target server:
- VMware vSphere PowerCLI 6.3 Release1, 6.0 Release3, 6.0 Release1, 5.8 Release 1, 5.5 Release 2, 5.5 Release 1, 5.1 Release 2, 5.0
- VMware PowerCLI 6.5 Release1
- VMware PowerCLI 6.5.1
The PackageManagement must be installed.
Supported OSs for the prerequisite products for the execution-target server:
- Windows Server 2008 R2 Standard/Enterprise/Datacenter
- Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter
- Windows Server 2016 Standard/Datacenter
Cautions
(1) Do not specify a string containing a double-quotation mark (") or single quotation mark (') for a property of this plugin.
(2) If the data store that stores the template cannot be viewed from the template location, this plugin ends abnormally. In this case, specify a data store that can be viewed from the template location for the data store name (VMware.destTemplateDataStore property).
(3) If the data store name (VMware.destTemplateDataStore property) is specified when the version of VMware vSphere PowerCLI is 5.0, this plugin ends abnormally.
Execution privilege
(1) Users who connect to VMware vCenter Server must have system administrator permissions.
Version
02.11.00
Plug-in tags
Add VM Template,VMware vSphere
Plug-in name displayed in the task log
vsphereCreateTemplate
Return code
0: Normal
12: Error (Mistake by user) Invalid property
23: Error (Invalid environment) The environment requirements are not met.
27: Error (Check with the task log about the error details.) Unidentified error
41: Error (An error was detected in the component.) Property not entered (An error was detected in the component script.)
Property list
The following table lists the properties:
Property key |
Property name |
Description |
Default value |
I/O type |
Required |
---|---|---|---|---|---|
plugin.destinationHost |
Host name of the execution target server |
Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported. |
-- |
Input |
R |
VMware.vCenterServerName |
Host name of the vCenter server |
Specify the host name or IP address of the destination vCenter server. IPv6 addresses are not supported. |
-- |
Input |
R |
VMware.userName |
User name for connecting to the VMware vCenter Server |
Specify the user name for connecting to the VMware vCenter Server. |
-- |
Input |
R |
VMware.password |
Password for connecting to the VMware vCenter Server |
Specify the password for connecting to the VMware vCenter Server. |
-- |
Input |
R |
VMware.portNumber |
Port number for connecting to the VMware vCenter server |
Specify the number of the port for connecting to VMware vCenter Server (for the VMware vCenter Server Web service). |
443 |
Input |
O |
VMware.protocol |
Protocol for connecting to the VMware vCenter server |
Specify either HTTP or HTTPS as the protocol for connecting to VMware vCenter Server. |
https |
Input |
R |
VMware.srcVmName |
Creation-source virtual server name |
Specifies the name of the virtual server on which the template is created. Note that the name you specify is the display name for the virtual server in VMware vCenter Server, rather than the host name in the OS. |
-- |
Input |
R |
VMware.createTemplateName |
Template name |
Specifies the name of the template that you want to create. |
-- |
Input |
R |
VMware.destTemplateLocation |
Template creation location |
Specifies the location (datacenter, folder, or ESX server) where the template will be created. |
-- |
Input |
R |
VMware.destTemplateDataStore |
Datastore name |
Specifies the name of the datastore in which to store the template. If the specification is omitted, the template is created in the same datastore on the virtual server where the template is created. |
-- |
Input |
O |
common.returnValue |
Return value for the plugin |
The return value of this plugin stored. |
-- |
Output |
O |