Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


3.16.2 Clone Virtual Machine

Function

Creates a clone of a virtual server in the VMware vSphere environment

This service template assumes the following servers as prerequisites:

- vCenter server

Server where VMware vCenter Server is installed

- vCenter control server

Server where VMware vSphere PowerCLI is installed

- Virtual server to be cloned

Virtual server managed by vCenter server or VMware vSphere ESXi (or VMware ESX Server)

- Clone

Clone of the virtual server to be cloned. The clone name is the name of the virtual server clone.

An outline of the processing is as follows:

(1) The power status of the virtual server to be cloned is obtained.

(2) It is confirmed that the power status of the virtual server is OFF.

If the power status is not OFF, the User-Response Wait Plugin is executed to confirm whether to turn the power OFF.

The e-mail destination/message text, timeout, and display contents in the User-Response Wait Plugin can be set by a user with the Modify permission.

If the user selects "Shutdown" for the wait-for-user response, the virtual server is shut down.

If the user selects "Cancel" or if a timeout occurs while waiting for a user response, the server ends abnormally without operating the virtual server.

Before shutting down the virtual server, the system waits the number of seconds specified in the power status confirmation frequency property (vmware.checkPowerStateInterval) to confirm that the power has been turned OFF and repeats that until it is confirmed or repeats according to the number of times specified in the power status confirmation retries property (vmware.checkPowerStateCount). Adjust the value of each property according to the actual environment.

(3) The virtual server to be cloned is used to create a clone.

When creating a clone, a set of parameters (ESX server, resource pool, data store, and virtual disk format) can be specified.

If no resource pool is specified, the clone is created directly under the destination ESX server where the clone is to be created.

The maximum length of the virtual server name property (vmware.vmName) and clone name property (vmware.cloneName) is 60 characters.

Prerequisites

For the latest support information about [Required product in the System]/[Prerequisite products in the system executing the service template]/[Prerequisite product OS running in the system executing the service template], see the release notes.

[Required product in the System]

JP1/Automatic Operation 12-00 or later

[Prerequisite products in the system executing the service template]

(1) Prerequisite product for the vCenter server

- VMware vCenter Server 7.0, 6.7, 6.5, 6.0, 5.5, 5.1, 5.0, 4.1, 4.0

(2) VMware vSphere ESXi (or VMware ESX Server) managing the virtual servers

- VMware vSphere ESXi 7.0, 6.7, 6.5, 6.0, 5.5, 5.1, 5.0 or VMware ESX Server 4.0, 4.1

(3) Prerequisite product for the vCenter control server

- VMware vSphere PowerCLI 6.3 Release1, 6.0 Release3, 6.0 Release1, 5.8 Release1, 5.5 Release2, 5.5 Release1, 5.1 Releae2, 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 system executing the service template]

(1) Prerequisite OS for the virtual server

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)

(2) Prerequisite OS for the vCenter control 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

[Usage conditions for the required products for the service template execution system]

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

(2) There is no duplicate clone name under the same vCenter. There is no clone name that is the same as an existing virtual server name.

(3) There is no duplicate data store name under the same vCenter.

(4) VMware Tools is installed in the virtual server to be cloned.

(5) The version of VMware vSphere ESXi (or VMware ESX Server) managing the virtual server to be cloned matches that of VMware vSphere ESXi (or VMware ESX Server) managing the cloning destination.

Cautions

(1) Do not execute this service for multiple instances of the same virtual server at the same time.

(2) Do not use a different service to operate the virtual server source or destination of cloning during cloning. Also, do not operate the virtual servers directly from the vCenter server. The service might fail.

(3) HTML tags can be specified in the additional information property (UserResponseplugin.dialogText) in the window for entering a response. The property accepts the same tags and attributes as those available in the User-Response Wait Plugin. For more details, see the appropriate topic related to "User-Response Wait Plugin" in this product manual.

(4) vApp cannot be specified as the destination of cloning.

(5) Do not start the created clone. To start a created clone, it is necessary to delete or restore the cloned virtual server.

Execution privilege

(1) The user connecting to VMware vCenter Server must have system administrator role permissions.

Version

03.00.00

Tags

Clone VM,VMware vSphere

Property list

The following shows the list of the property groups set in the property:

Property group

Description

Initial display

Virtual system environment information

Specify the VMware vCenter Server information.

Y

Information about a virtual server as the cloning source

Specify the information of a virtual server as the cloning source.

Y

Information about a virtual server as the cloning destination

Specify the information about the cloning destination.

Y

Option that allows waiting for a user response

This is an option that allows you to wait for a user response if the virtual server is up and running. Change the option as appropriate.

N

Runtime option

This is a property related to the status confirmation performed when stopping a virtual server. Change the option as appropriate.

N

The following shows the list of the properties to be displayed in the "Service Definition" window:

(Legend)

R: The property must be specified.

O: The property can be omitted. However, the property might be mandatory depending on what is specified for other properties. See the Description of each property.

Property key

Property name

Description

I/O type

Shared

Required

Property group

vmware.targetHost

Host name of VMware vCenter control server

Specify the host name or IP address of the server (a server with vSphere PowerCLI installed) that will be used to control VMware vCenter. You cannot specify an IPv6 address.

Input

Disabled

R

Virtual system environment information

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

Disabled

R

Virtual system environment information

vmware.userName

User name for VMware vCenter Server connection

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

Input

Disabled

R

Virtual system environment information

vmware.password

Password for VMware vCenter Server connection

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

Input

Disabled

R

Virtual system environment information

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.

Input

Disabled

O

Virtual system environment information

vmware.protocol

Protocol for VMware vCenter Server connection

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

Input

Disabled

R

Virtual system environment information

UserResponsePlugin.toAddress

TO addresses

Specify the email addresses to enter in the TO field of notification emails sent when the service is waiting for a user response. Separate multiple addresses with commas. Example: mailA,mailB

Input

Disabled

O

Option that allows waiting for a user response

UserResponsePlugin.ccAddress

CC addresses

Specify the email addresses to enter in the CC field of notification emails sent when the service is waiting for a user response. Separate multiple addresses with commas. Example: mailA,mailB

Input

Disabled

O

Option that allows waiting for a user response

UserResponsePlugin.bccAddress

BCC addresses

Specify the email addresses to enter in the BCC field of notification emails sent when the service is waiting for a user response. Separate multiple addresses with commas. Example: mailA,mailB

Input

Disabled

O

Option that allows waiting for a user response

UserResponsePlugin.mailSubject

Subject line

Specify the subject line of notification emails sent when the service is waiting for a user response.

Input

Disabled

O

Option that allows waiting for a user response

UserResponsePlugin.mailBody

Email text

Specify the body text of notification emails sent when the service is waiting for a user response.

Input

Disabled

O

Option that allows waiting for a user response

UserResponsePlugin.encodeType

Encoding

Specify the encoding of notification emails sent when the service is waiting for a user response. The encodings you can specify are us-ascii, iso-2022-jp, shift_jis, euc-jp, and utf-8. If you omit this property, utf-8 is set.

Input

Disabled

O

Option that allows waiting for a user response

UserResponsePlugin.dialogText

Additional dialog box text

Enter additional text to appear in the response input dialog box, in text or HTML format. Supported HTML tags are anchor tags, bold tags, break tags, font tags, italics tags, and underline tags.

Input

Disabled

O

Option that allows waiting for a user response

UserResponsePlugin.responseTimeOut

Response timeout time (minutes)

Specify how long (in minutes) the service waits for a user response before timing out. In the event of a response timeout, the service will terminate abnormally.

Input

Disabled

R

Option that allows waiting for a user response

vmware.checkPowerStateCount

Number of power status confirmation retries

Specify the number of times the service attempts to check the power status to confirm that the virtual server has started. The maximum wait time is determined by this property and the property that defines the power status check interval.

Input

Disabled

R

Runtime option

vmware.checkPowerStateInterval

Frequency of power status confirmation retries

Specify the interval at which the service attempts to acquire the power status to confirm that the virtual server has started.

Input

Disabled

R

Runtime option

The following shows the list of the properties to be displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Property name

Description

I/O type

Shared

Required

Property group

vmware.cloneName

Clone name

Specifies the name of a clone (This is the display name of a clone under VMware vCenter Server. It is not a host name under the OS.)

Input

Disabled

R

Information about a virtual server as the cloning destination

vmware.vmName

Virtual server name

Specify the name of a virtual server as the cloning source. (This is the display name of a virtual server under VMware vCenter Server. It is not a host name under the OS.)

Input

Disabled

R

Information about a virtual server as the cloning source

vmware.vmHostName

ESX server name

Specify the ESX server name displayed in the Hosts and Clusters inventory view managed by VMware vCenter Server, which serves as the cloning destination.

Input

Disabled

R

Information about a virtual server as the cloning destination

vmware.dataStoreName

Datastore name

Specify the name of a data store as the cloning destination.

Input

Disabled

R

Information about a virtual server as the cloning destination

vmware.resourcePoolName

Resource pool name

Specify a resource pool or cluster as the cloning destination.

Input

Disabled

O

Information about a virtual server as the cloning destination

vmware.diskFormat

Virtual disk format

Specifies format of the virtual disk of the clone to be created. Specify "Default" when the format is the same as the virtual disk of the virtual server of the clone source, "Thin" when committing it on demand, or "Thick" when committing it in full size.

Input

Disabled

R

Information about a virtual server as the cloning destination

The following shows the restrictions on inputs to the properties displayed in the "Service Definition" window:

Property key

Characters that can be input

vmware.targetHost

A maximum of 256 characters can be entered. Characters that can be used include alphanumeric characters, as well as . and -.

vmware.vCenterServerName

A maximum of 256 characters can be entered. Characters that can be used include alphanumeric characters, as well as . and -.

vmware.userName

A maximum of 512 characters can be entered. Characters that can be used include alphanumeric characters and symbols. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, /, :, =, , , +, %.

vmware.password

A maximum of 127 characters can be entered. Characters that can be used include alphanumeric characters and symbols. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, %.

vmware.portNumber

Integer between 1 and 65535 can be entered.

vmware.protocol

Select one of the following values:

http,https

UserResponsePlugin.toAddress

A maximum of 1024 characters can be entered. Characters that can be used include alphanumeric characters and symbols.

UserResponsePlugin.ccAddress

A maximum of 1024 characters can be entered. Characters that can be used include alphanumeric characters and symbols.

UserResponsePlugin.bccAddress

A maximum of 1024 characters can be entered. Characters that can be used include alphanumeric characters and symbols.

UserResponsePlugin.mailSubject

A character string of no more than 256 characters can be entered.

UserResponsePlugin.mailBody

A character string of no more than 1024 characters can be entered.

UserResponsePlugin.encodeType

Select one of the following values:

us-ascii,iso-2022-jp,shift_jis,euc-jp,utf-8

UserResponsePlugin.dialogText

A character string of no more than 512 characters can be entered.

UserResponsePlugin.responseTimeOut

Integer between 1 and 9999 can be entered.

vmware.checkPowerStateCount

Integer between 1 and 3600 can be entered.

vmware.checkPowerStateInterval

Integer between 1 and 60 can be entered.

The following shows the restrictions on inputs to the property displayed on the "Service Definition" window and the "Submit Service" window:

Property key

Characters that can be input

vmware.cloneName

This is a character string of up to 60 characters. < > | ; & ' " * ? [ ] ` , and % are not allowed.

vmware.vmName

A character string of no more than 60 characters can be entered. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, , and %.

vmware.vmHostName

A maximum of 256 characters can be entered. Characters that can be used include alphanumeric characters, as well as . and -.

vmware.dataStoreName

A maximum of 42 characters can be entered. Characters that can be used include alphanumeric characters and symbols. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, %.

vmware.resourcePoolName

A character string of no more than 60 characters can be entered. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], ` and %.

vmware.diskFormat

Select one of the following values:

Default,Thin,Thick

Flow specification details

The following table shows the detailed specification of the flow:

Hierarchy

Display name

Plug-in

Plug-in name

Description

Error recovery method

1

vsphereGetPower

Get power status of virtual server

Obtains the power status of the virtual server in the VMware vSphere environment.

Remove the cause of the error, and then execute the service again.

2

vsphereCheckPower

Flow Plug-in

Checks the power status, and if the status is not OFF, reports it to the user.

--

2-3

Compatible Plug-in

Determines whether the output character string matches "PoweredOn".

After removing the cause of the error, run the service again.

2-4

Flow Plug-in

Checks whether or not to turn the power to OFF.

--

2-4-1

User-Response Wait Plug-in

Checks whether or not to turn the power to OFF.

After removing the cause of the error, run the service again.

2-4-2

Judge ReturnCode Plug-in

Determines whether timeout has occurred in the component where Cancel has been selected or in the component waiting for a user response.

After removing the cause of the error, run the service again.

2-4-3

Abnormal-End Plug-in

Makes the jobnet an error.

Check the power supply state of the virtual server and execute the service again.

2-4-4

Shut down a virtual server

In the VMware vSphere environment, shuts down the virtual server and then sets the power supply state to OFF.

After removing the cause of the error, run the service again.

3

vsphereCreateClone

Creating a virtual server clone

Creates a clone of a virtual server in the VMware vSphere environment.

Remove the cause of the error, and then execute the service again.