Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


5.11.43 Create virtual server

Function

Clones a virtual server's template in a VMware vSphere environment.

You can specify a data store used to store a virtual disk by specifying the virtual disk/data store mapping file path (VMware.diskMapFilePath property).

If this property is omitted, the configuration file of the virtual server and all virtual disks will be stored in the data store specified in the data store name (VMware.dataStoreName property).

Write the mapping file in a tab separated format as follows:

File format:

virtual-disk-name[tab-character]data-store-name-of-storage-location

...

...

If the data store name of the storage location of the virtual disk is omitted, the virtual disk will be stored in the data store that is the same as the one used for storing the configuration file of the virtual server.

For the virtual disk name, specify a value displayed in the Virtual Machine Property window of vSphere Client. (For example: Hard disk 1)

For the character encoding of the mapping file, use Shift_JIS or UTF-8 (BOM).

This plugin assumes the following servers:

• vCenter server

This is a server on which VMware vCenter Server is installed.

• ESX server

This is a server on which VMware vSphere ESXi is installed.

• vCenter control server (Execution target server)

This is a server on which VMware vSphere PowerCLI is installed. The plugin is transferred from JP1/AO to this server and then is executed.

• Virtual server

This is a virtual server managed by the vCenter server and VMware vSphere ESX.

You can set the data store name (VMware.diskMapFilePath property) as follows:

- Specify the name of the data store used to store the configuration file of the virtual server.

- If the virtual disk/data store mapping file path (VMware.diskMapFilePath property) is omitted, the virtual disk will be stored in the data store specified by this property.

You can set the virtual disk/data store mapping file path (VMware.diskMapFilePath property) as follows:

- Specify a full path of a mapping file on a vCenter control server (execution target server) that defines the relationship of the virtual disk and data store.

- If this property is omitted, the configuration file of a virtual server and all virtual disks will be stored in the data store specified in the data store name (VMware.dataStoreName property).

Use situation

You use this plugin to create a new virtual server in a VMware vSphere environment. When you combine this plugin with the following plugins, you can complete the procedure through initialization of the virtual server's OS.

• vSphereSetOsInfoWin

• vSphereSetOsInfoLin

Prerequisites

For the latest support information about [Required product in the System]/[Required products on the execution target system]/[Required products on the execution target server]/[Prerequisite product OS running in the execution target server], see the release notes.

[Required product in the System]

JP1/Automatic Operation 11-10 or later

[Required products on the execution target system]

(1) Prerequisite product of vCenter Server

• VMware vCenter Server 7.0, 6.7, 6.5, 6.0, 5.5, 5.1, 5.0

(2) Prerequisite product of ESX Server

• VMware vSphere ESXi 7.0, 6.7, 6.5, 6.0, 5.5, 5.1, 5.0

(3) Prerequisite OS running in the virtual servers

The following OSs are supported, based on the required products for the vCenter server and the required products for the VMware vSphere ESXi (or VMware ESX Server)/vCenter control server that manages the virtual server.

• Windows Server 2008 R2 Standard/Enterprise/Datacenter

• Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

• Windows Server 2016 Standard/Datacenter

• Windows Server 2019 Standard/Datacenter

• Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)

• Red Hat Enterprise Linux Server 7 (64-bit x86_64)

• Red Hat Enterprise Linux Server 8 (64-bit x86_64)

• CentOS 6 (64-bit x86_64)

• CentOS 7 (64-bit x86_64)

• CentOS 8 (64-bit x86_64)

[Usage conditions for required products in the execution target system]

(1) VMware vSphere ESXi is managed by VMware vCenter Server.

(2) Conditions for the settings on VMware vSphere ESXi

• A data store has been registered.

• A port group has been set up. In the case of a port group that is to be set up for a virtual server, specify a port group on the network using a standard virtual switch (vNetwork or vSphere standard switch).

• The template used for deployment has already been created.

• The template name must be unique.

• If the virtual server is stored in a resource pool, the resource pool, cluster, and vApp names must be unique.

The same name cannot be assigned to more than one resource pool, cluster, and vApp although their types are different, such as a cluster name that duplicates a vApp name or a cluster name that duplicates a resource group name.

• The VMware-related names listed below are case sensitive in VMware, but they are not case sensitive in vSphere Power CLI that is executed by this service.

For this reason, this service cannot be used in an environment where names can be used that are the same except for case differences.

• Template name

• Data store name

• Resource pool name

• Cluster name

• vApp name

(3) Conditions for the template used for deployment

• VMware Tools has already been installed.

• Remote commands are set to be executable. Administrative share is enabled in Windows, and SSH is enabled in Linux.

• NIC has been set up (a maximum of four).

• In Windows, the Administrator's password is empty.

• If a virtual server is to be defined as a template, this must be done while the virtual server is stopped.

• Acceptance of and reply to pings must be permitted.

• In Windows, sysprep is executed. Therefore, the number of times Windows has been initialized cannot have reached its maximum count (3).

(4) Conditions for virtual servers

• There is no duplication of the names of virtual servers under the management of the same vCenter.

[Required products on the execution target server]

• VMware vSphere PowerCLI 6.3 Release1, 6.0 Release3, 6.0 Release1, 5.8 Release1, 5.5 Release2, 5.5 Release1, 5.1 Release2, 5.0

• VMware PowerCLI 6.5 Release1

• VMware PowerCLI 6.5.1, 6.5.4

• VMware PowerCLI 10.1.0, 10.1.1, 11.3.0, 12.0.0, 12.1.0

[Prerequisite product OS running in 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

• Windows Server 2019 Standard/Datacenter

Cautions

(1) Do not use any other service to manipulate a virtual server while it is being deployed. If you do, deployment of the virtual server might fail. Do not manipulate the virtual server directly from a vCenter server.

(2) Do not specify in advance in a virtual server's template the information that is to be specified when the virtual server is created. If a computer name or host name and IP address are already set in the template, virtual server creation might fail. If virtual server creation fails (for example, static route processing results in an error), delete the virtual server, re-create a template in which no computer name, host name, or IP address is set, and then re-execute this plugin.

(3) A maximum of 60 characters can be specified in the virtual server name property (vmware.vmName).

(4) If you specify a data store not existing in the virtual disk/data store mapping file or if you specify a data store that cannot be read from the ESX server that is used to store the configuration file of virtual server, this plug-in will end with an error.

Execution privilege

(1) The user who will be connecting to VMware vCenter Server must have the following permissions:

System administrator role

Version

02.50.00

Plug-in tags

Add VM,VMware vSphere

Plug-in name displayed in the task log

vsphereCreateVM

Return code

0: Normal

23: Error (invalid environment) Required environment is invalid

27: Error (check task logs for the nature of error)

41: Error (error detected in plugin) Missing property (error detected in plugin script)

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

VMware.vCenterServerName

VMware vCenter server name

Specify the host name or IP address of the VMware vCenter server. You cannot specify an IPv6 address.

--

Input

R

VMware.userName

User name for VMware vCenter Server connection

Specify the user name to use when connecting to the VMware vCenter server.

--

Input

R

VMware.password

Password for VMware vCenter Server connection

Specify the password to use when connecting to the VMware vCenter server.

--

Input

R

VMware.portNumber

Port number for VMware vCenter Server connection

Specify the port number to use when connecting to the VMware vCenter server (specifically, the port number of the VMware vCenter server's Web service). If you omit this property, the default value of the VMware vCenter server applies.

443

Input

O

VMware.protocol

Protocol for VMware vCenter Server connection

Specify the protocol to use when connecting to the VMware vCenter server.

https

Input

R

VMware.vmHostName

ESX server name

Specify the ESX server name to be displayed in the Hosts and Clusters inventory view managed by VMware vCenter server.

--

Input

R

VMware.dataStoreName

Datastore name

Specify the name of the data store.

--

Input

R

VMware.templateName

Template name

Specify the name of the template on which the virtual server is to be based.

--

Input

R

VMware.vmName

Virtual server name

Specify the name of the virtual server. This name is used to represent the virtual server in VMware vCenter server. It is not used as a host name by the OS.

--

Input

R

VMware.resourcePoolName

Resource pool name

Specify the resource pool, vApp, or cluster where the virtual server will be provisioned.

--

Input

O

VMware.diskMapFilePath

Mapping file path for a virtual disk and datastore

Specify the full path of the mapping file between the virtual disk and datastore on the target server. If this property is omitted, the virtual server configuration file and all virtual disks are stored in the datastore specified by the datastore name.

--

Input

O

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

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O

common.osType

OS type

Work property that stores the OS type (Windows or Linux) of the template.

--

Output

O