This service template adds disks to multiple virtual servers.
The general steps for using this service template to add a virtual disk to a virtual machine are as follows:
- The power status of a virtual server is obtained.
- Verifies that the power status is off.
- If the power status is not off, the service template uses the User-Response Wait Plug-in to determine whether to turn off the power.
- A user with the Modify permission can specify an email destination, email message contents, timeout value, and information to be visible in the window by the User-Response Wait Plug-in.
- If the user selects Shutdown in the UI of the User-Response Wait plug-in, the service template shuts down the virtual server.
- If the user selects Cancel or if a response timeout occurs, the service ends abnormally without running the procedure on the virtual server.
When the virtual server is being ended, the service template waits for the time (in seconds) specified in the VMware.checkPowerStateInterval property and verifies 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 suit your environment.
- 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.
Service Definition Properties
The following table lists the properties visible in the Service Definition window for the Add Virtual Disk to Virtual Machine service template.
Property Key | Property Name | Description | Required or optional |
---|---|---|---|
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. | R |
vmware.vCenterServerName | VMware vCenter server name | Specify the host name or IP address of the VMware vCenter server. You cannot specify an IPv6 address. | R |
vmware.userName | User name for VMware vCenter Server connection | Specify the user name to use when connecting to the VMware vCenter server. | R |
vmware.password | Password for VMware vCenter Server connection | Specify the password to use when connecting to the VMware vCenter server. | 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. | O |
vmware.protocol | Protocol for VMware vCenter Server connection | Specify the protocol to use when connecting to the VMware vCenter server. | R |
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 | O |
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 | O |
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 | O |
UserResponsePlugin.mailSubject | Subject line | Specify the subject line of notification emails sent when the service is waiting for a user response. | O |
UserResponsePlugin.mailBody | Email text | Specify the body text of notification emails sent when the service is waiting for a user response. | O |
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. | O |
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. | O |
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 end abnormally. | R |
vmware.checkPowerStateCount | Power status check count | Specifies the number of times to verify the power status when confirming that the virtual server is stopped. In combination with the power status verification interval, this determines the maximum wait time. | R |
vmware.checkPowerStateInterval | Power status check interval | Specifies the interval in seconds for verifying the power status when confirming that the virtual server is stopped. | R |
Service Definition and Submit Service Properties
The following table lists the properties visible in the Service Definition and Submit Service windows for the Add Virtual Disk to Virtual Machine service template.
Property Key | Property Name | Description | Required or optional |
---|---|---|---|
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. | R |
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. | R |
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". | O |
vmware.vHardDiskType | Virtual disk type | Specify the type of the virtual disk as follows:
|
O |
vmware.deviceName | LUN device name | Specify the type of the virtual disk as follows:
|
O |
Prerequisites
The following conditions must be met:
- The virtual servers to be added to the virtual disk are off.
- VMware vSphere ESXi (or VMware ESX Server) is managed by VMware vCenter Server.
- Each virtual server name is unique among the vCenter servers.
- VMwareTools is installed on the target virtual server.
Server requirements
To use this service template, the following servers are needed:
- 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 ESX.
Software requirements
One of the following is required:
- VMware vSphere PowerCLI 6.3 Release1, 6.0 Release3, 6.0 Release1
- VMware PowerCLI 6.5 Release1
- VMware PowerCLI 6.5.1, 6.5.4
- VMware PowerCLI 10.1.0, 10.1.1
Usage guidelines
- This service template does not initialize the virtual disks added to the virtual servers. If necessary, log on to the OS on each virtual server and initialize the disk.
- Do not run multiple instances of this service on the same virtual server.
- If you specify HTML tags in UserResponseplugin.dialogText, the permitted tags and attributes are the same as those for the User-Response Wait Plug-in.