Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


3.15.2 Modify Virtual Machine Configuration

Function

For the resources (CPUs, memory, and disk I/O) of the virtual server in the VMware vSphere environment, change the settings of the specified items.

In VMware vCenter Server 4.1 and earlier versions, the number of CPUs refers to the number of virtual processors. In VMware vCenter Server 5.0 and later versions, the number of CPUs refers to the product of the number of virtual sockets and the number of cores per socket. In version 11-11 and earlier, the number of cores per socket is always 1, so the number of CPUs is equal to the number of virtual sockets. However, starting from version 11-12, the number of cores per socket can be changed. To change the number of cores per socket, specify "true" for the option for setting the number of cores (the vmware.setCoresOption property).

Note that, as a result of the above, the display name of the vmware.cpuNum property has been changed. In version 11-11 and earlier, the display name was "Number of CPUs". In version 11-12 and later, the display name is "Number of CPU sockets".

This service template assumes the following servers:

· vCenter server

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

· vCenter control server

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

· Virtual server

This is a virtual server managed by the vCenter server and VMware vSphere ESXi (or VMware ESX Server).

The following provides an overview of the processing.

(1) Obtains a virtual server's power status.

(2) Verifies that the virtual server's power status is off.

If the power status is not off, the service template uses the user-response wait plugin to check whether the power is to be turned off.

A user with the Modify permission can specify an email destination, email message contents, timeout value, and information to be displayed in the window by the user-response wait plugin.

If the user selects "Shutdown" in the GUI of the user-response wait plugin, the service template shuts down the virtual server.

If the user selects "Cancel" or if a response timeout occurs, the service terminates abnormally without performing the operation on the virtual server.

When the virtual server is to be terminated, the service template waits for the amount of time (in seconds) specified in the VMware.checkPowerStateInterval property and performs an operation to verify that the power is off, which it does up to the number of times specified in the vmware.checkPowerStateCount property. If the default values are not suitable, specify values that are suitable for your environment.

(3) Modify the resources (number of CPUs, memory capacity) of the virtual server.

(4) For the CPU and memory of the virtual server, specify limits, reservation, and share levels. For the disks, specify share levels.

To cancel the limits, specify -1.

For limits, if you specify less than 100 MHz for the CPU or less than 100 MB for the memory, task execution will terminate abnormally. Specifying too low a limit might affect the startup of the OS or the execution of tasks. Specify appropriate limits for the resources according to the system requirements and usage of the OS.

For memory reservation, specify a value within the memory capacity allocated to the virtual server. Specifying a value higher than the allocated memory capacity causes task execution to terminate abnormally.

Specifying the disk share level without a virtual disk name specified changes the share levels of all the disks connected to the virtual server. Specifying the disk share level with a virtual disk name specified changes the share level of only the specified virtual disk.

Note that the maximum number of characters that you can specify for the virtual server name property (vmware.vmName) is 60.

Prerequisites

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

[Required product for the system]

JP1/Automatic Operation 12-00 or later

[Required products for the service template execution system]

(1) Required product for the vCenter server

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

(2) VMware vSphere ESXi (or VMware ESX Server) that manages virtual servers

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

(3) Required 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 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 system executing the service template]

(1)Prerequisite OS of 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)(for vCenter4.1 or later; not supported by vCenter4.0)

· 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) Required 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 of prerequisite products in the system executing the service template]

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

(2) Each virtual server name is unique among the vCenter servers.

(3) VMwareTools is installed on the target virtual server.

Cautions

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

(2) If you specify HTML tags in UserResponseplugin.dialogText, the permitted tags and attributes are the same as those for the user-response wait plugin. See the topics on the user-response wait plugin in this product manuals.

(3) When a value other than "true" is specified for the option for setting the number of cores (the vmware.setCoresOption property), set to 1 the number of cores per socket on the target virtual server. If the number of CPU sockets is changed for a virtual server on which the number of cores per socket has been set to a value other than 1, the following problems might occur:

- The virtual server does not start, because the number of CPUs is not a multiple of the number of cores.

- The virtual server starts, but the resources do not have the expected values.

(4) The values that can be specified for the number of CPU sockets (the vmware.cpuNum property), the number of cores per CPU socket (the vmware.cpuCoresPerSocket property), and memory capacity (the vmware.memoryMB property) vary depending of the version of the prerequisite products. Check the limits for these prerequisite products before specifying values for these properties.

(5) For memory reservation, specify a value within the memory capacity allocated to the virtual server. Specifying a value higher than the allocated memory capacity causes task execution to terminate abnormally.

(6) Specify limits for the CPU and memory according to the requirements and usage of the OS.

(7) You cannot reserve more CPU and memory resources than their limits.

(8) If multiple virtual disks are specified for the vmware.vHardDiskName property, tasks will terminate abnormally if a process of changing the share level of even one of these disks fails.

Execution privilege

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

System administrator role

Version

03.00.01

Tags

Modify 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

Virtual server information

Specify the specifications for the virtual server.

Y

Virtual server resource-configuration information

Specifies the configuration of the virtual server resources.

Y

User-response wait options

These are options for user responses when the virtual server is started. Modify as necessary.

N

Run-time options

These are properties related to checking the status when stopping the virtual server. Modify as necessary.

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

User-response wait options

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

User-response wait options

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

User-response wait options

UserResponsePlugin.mailSubject

Subject line

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

Input

Disabled

O

User-response wait options

UserResponsePlugin.mailBody

Email text

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

Input

Disabled

O

User-response wait options

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

User-response wait options

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

User-response wait options

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

User-response wait options

vmware.checkPowerStateCount

Power status check count

Specifies the number of times to check the power status when confirming that the virtual server is stopped. In combination with the power status checking interval, this determines the maximum wait time.

Input

Disabled

R

Run-time options

vmware.checkPowerStateInterval

Power status check interval

Specifies the interval in seconds for checking the power status when confirming that the virtual server is stopped.

Input

Disabled

R

Run-time options

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.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

Disabled

R

Virtual server information

vmware.cpuNum

Number of CPU sockets

Specify the number of CPU virtual sockets to assign to the virtual server. You must specify either CPU sockets or memory size property. The product of the number of CPU sockets and the number of cores per socket is the number of CPUs on a virtual server.

Input

Disabled

O

Virtual server information

vmware.setCoresOption

Option for setting the number of cores

When you set the number of cores per CPU sockets in a virtual server, specify "true". Unless you specify "true", the number of cores is not set. For details, see the notes in the detailed information of the service.

Input

Disabled

O

Virtual server information

vmware.numCoresPerSocket

Number of cores per socket

Specify the number of cores per CPU sockets to assign to the virtual server, if you specify "true" for the Option for setting the number of cores property. If you specify this property, you must also specify the number of CPU sockets. The product of the number of CPU sockets and the number of cores per socket is the number of CPUs on a virtual server.

Input

Disabled

O

Virtual server information

vmware.memoryMB

Memory size (MB)

Specify the amount of memory (in MB) to assign to the virtual server. You must specify either CPU sockets or memory size property.

Input

Disabled

O

Virtual server information

vmware.cpuSharesLevel

CPU shares level

Specifies the relative priority of CPU resources between virtual servers that have the same parent.

Input

Disabled

O

Virtual server resource-configuration information

vmware.cpuReservationMHz

CPU reservation (MHz)

Specifies, in megahertz, the CPU resources that are reserved by the virtual server.

Input

Disabled

O

Virtual server resource-configuration information

vmware.cpuLimitMHz

CPU limit (MHz)

Specifies, in megahertz, the maximum CPU resources that are to be used by the virtual server. If a value less than 100 MHz is specified, task execution terminates abnormally. However, specifying -1 cancels this restriction.

Input

Disabled

O

Virtual server resource-configuration information

vmware.memSharesLevel

Memory shares level

Specifies the relative priority of memory resources between virtual servers that have the same parent.

Input

Disabled

O

Virtual server resource-configuration information

vmware.memReservationMB

Memory reservation (MB)

Specifies, in megabyte, the Memory resources that are reserved by the virtual server.

Input

Disabled

O

--

vmware.memLimitMB

Memory limit (MB)

Specifies, in megabyte, the maximum memory resources that are to be used by the virtual server. If a value less than 100 MB is specified, task execution terminates abnormally. However, specifying -1 cancels this restriction.

Input

Disabled

O

Virtual server resource-configuration information

vmware.diskSharesLevel

Disk shares level

Specifies the relative priority of virtual servers for storage I/O resources.

Input

Disabled

O

Virtual server resource-configuration information

vmware.vHardDiskName

Virtual disk name

Specifies virtual disk where shares level is changed. Virtual disk is display name in VMware vCenter Server. To specify multiple virtual disks, specify by separating with a comma.

Input

Disabled

O

Virtual server resource-configuration information

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.vmName

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

vmware.cpuNum

Integer between 1 and 128 can be entered.

vmware.setCoresOption

Select one of the following values:

true,false

vmware.numCoresPerSocket

Integer between 1 and 128 can be entered.

vmware.memoryMB

Integer between 4 and 2147483647 can be entered.

vmware.cpuSharesLevel

Select one of the following values:

High,Normal,Low

vmware.cpuReservationMHz

An integer from 0 to 65535.

vmware.cpuLimitMHz

An integer from -1 to 65535.

vmware.memSharesLevel

Select one of the following values:

High,Normal,Low

vmware.memReservationMB

An integer from 0 to 2147483647.

vmware.memLimitMB

An integer from -1 to 2147483647.

vmware.diskSharesLevel

Select one of the following values:

High,Normal,Low

vmware.vHardDiskName

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

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

vsphereCheckResource

Pre-evaluation of virtual-server resource changes

Performs a pre-evaluation when changing CPU or memory resources for a virtual server that is managed by VMware vCenter Server.

Check the following item, and then retry the operation:

- Are the connection destination and authentication information correct?

2

vsphereCheckResourceConfig

Pre-evaluation of virtual server resource configuration changes

Performs a pre-evaluation when changing CPU, memory, or disk I/O resource configurations for a virtual server that is managed by VMware vCenter Server.

Check the following items, and then retry the operation:

- Are the connection destination and authentication information correct?

- Is the virtual-server resource limit too low?

- Does the amount of reserved resources exceed the limit?

- Have you forgotten to specify the shares level of the disk I/O?

3

vsphereCheckPower

Flow Plug-in

Checks the power status, and if the power status is not OFF, checks with the user.

--

3-1

Get power status of virtual server

Acquires the power status of the specified virtual server.

Eliminate the cause of the error, and then re-execute the service.

3-4

Compatible Plug-in

Checks whether the output character string contains PoweredOn.

Eliminate the cause of the error, and then re-execute the service.

3-5

Flow Plug-in

Checks with the user whether the virtual server's power is to be turned off.

--

3-5-1

User-response wait module

Checks with the user whether the power is to be turned off.

Eliminate the cause of the error, and then re-execute the service.

3-5-2

Branch by returncode plug-in

Checks whether the user-response wait plugin's return value is 1.

Eliminate the cause of the error, and then re-execute the service.

3-5-3

Abnormal-End Plug-in

Treats a jobnet as erroneous.

Eliminate the cause of the error, and then re-execute the service.

3-5-4

Shut down virtual server

Sets the power status of the specified virtual server to OFF.

Eliminate the cause of the error, and then re-execute the service.

4

judgeChangeResource

Compatible Plug-in

Determines whether a resource change of a virtual server is required.

Eliminate the cause of the error, and then re-execute the service.

5

vsphereChangeResource

Set virtual server resources

Changes the resources (CPU and memory) of a virtual server.

Check the following item:

- Are the connection destination and authentication information correct?

6

judgeChangeResourceConfig

Compatible Plug-in

Determines whether a resource-configuration change of a virtual server is required.

Eliminate the cause of the error, and then re-execute the service.

7

vsphereSetResourceConfig

Change virtual server resource configuration

Changes the configuration of virtual server resources (CPU, memory, disk I/O).

Check the following item:

- Are the connection destination and authentication information correct?

- Did you try to reserve an amount of memory that exceeds the amount allotted to VMware vSphere ESXi (or to VMware ESX Server)?

Also, in certain cases, this might have been changed if the CPU or memory was changed.