3.9.7 Add Virtual Disk to Virtual Machine
Function
Adds disks to multiple virtual servers.
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.
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) Adds a virtual disk to the virtual server.
If there are multiple virtual servers, the service template adds to each virtual server a virtual disk that satisfies the specified conditions. This processing is performed in parallel.
Prerequisites
For the latest support information about [Required products for the service template execution system]/[Prerequisite product OS running in the system executing the service template], see the release notes.
In addition, the following OS and products use abbreviations. For the abbreviations of OS and products, see the "Preface".
[Required products for the service template execution system]
(1) Required product for the vCenter server
• VMware vCenter Server
(2) VMware vSphere ESXi that manages virtual servers.
(3) Required product for the vCenter control server
• VMware PowerCLI
[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/vCenter control server that manages the virtual server.
• Windows Server
• Red Hat Enterprise Linux Server
(2) Required OS for the vCenter control server
• Windows Server
[Usage conditions of prerequisite products in the system executing the service template]
(1) The virtual servers to be added to the virtual disk are off.
(2) VMware vSphere ESXi is managed by VMware vCenter Server.
(3) Each virtual server name is unique among the vCenter servers.
(4) VMwareTools is installed on the target virtual server.
Cautions
(1) This service template does not initialize the virtual disks added to the virtual servers. If necessary, log in to the OS on each virtual server and initialize its disk.
(2) Do not execute multiple instances of this service on the same virtual server.
(3) 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.
Execution privilege
(1)The user who will be connecting to VMware vCenter Server must have the following permissions:
System administrator role
Version
04.00.00
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 disk information |
Specify the information for the virtual disk to be added. |
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.foreachVmName |
Virtual server name(s) |
Specify the virtual server name or names. Specify server names as they appear in VMware vCenter Server, not by host name. Separate multiple virtual servers with commas. The maximum number of virtual servers you can specify is 99. |
Input |
Disabled |
R |
Virtual disk information |
vmware.dataStoreName |
Datastore name |
If Flat is selected as the virtual disk, specifies the datastore name on which the virtual disk is to be created. If RawVirtual or RawPhysical is selected as the virtual disk, then specifies the datastore name where the LUN mapping is to be saved. |
Input |
Disabled |
R |
Virtual disk information |
vmware.capacity |
Volume size (GB) |
Specify the volume size in GB. This property is mandatory when "Flat" is specified as the virtual disk type. This property is ignored when the virtual disk type is "RawVirtual" or "RawPhysical". |
Input |
Disabled |
O |
Virtual disk information |
vmware.vHardDiskType |
Virtual disk type |
Specify the type of the virtual disk as follows: Flat : the virtual disk is created on a VMFS RawPhysical : the virtual disk is configured using physical raw device mapping RawVirtual : the virtual disk is configured using virtual raw device mapping |
Input |
Disabled |
O |
Virtual disk information |
vmware.deviceName |
LUN device name |
Specify the type of the virtual disk as follows: Flat - the virtual disk is created on a VMFS, RawPhysical - the virtual disk is configured using physical raw device mapping, RawVirtual - the virtual disk is configured using virtual raw device mapping |
Input |
Disabled |
O |
Virtual disk information |
The following shows the list of the properties to be displayed in the "Task Details" window only:
Property key |
Property name |
Description |
I/O type |
Shared |
---|---|---|---|---|
common.taskResult |
Results of repeating tasks |
This property contains the results of each task (as "true" or "false"), in a comma-delimited format. |
Output |
Disabled |
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.foreachVmName |
A character string of no more than 1024 characters can be entered. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], ` or %. |
vmware.dataStoreName |
A maximum of 42 characters can be entered. Characters that can be used include alphanumeric characters and symbols. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, %. |
vmware.capacity |
Integer more than 1. |
vmware.vHardDiskType |
Select one of the following values: RawVirtual,RawPhysical,Flat |
vmware.deviceName |
A character string of no more than 255 characters can be entered. It cannot include <, >, |, ;, &, ', ", *, ?, [, ], `, or %. |
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 |
addVMdisk_vSphere |
Repeated Execution Plug-in |
Adds virtual disks to multiple virtual servers. |
Eliminate the cause of the error, and then re-execute the service. |