Top
Systemwalker Runbook Automation Reference Guide
Systemwalker

3.9.21 Stop VM host forcibly

Description

Forces VMhost to stop

Options

Basic Options

(1) hostname

The host name or IP address of the vCenter Server.

If the host name or IP address is omitted, an argument error will occur.

The maximum length of the host name or IP address is 1,024 characters. An argument error occurs if this limit is exceeded.

(2) vmhost

This is the ESX server name of the relevant operating VM host.

ESX Server name can have multiple specifications.

If the ESX Server name is omitted, an argument error will occur.

The upper limit for ESX Server names is 100. An argument error occurs if this limit is exceeded.

ESX Server name multiple specifications are in CSV format. Refer to "3.17 Notes on Specifying Multiple Input Parameters" for examples of multiple specifications.

Advanced Options

(1) vmusername

The user name for executing operations on the vCenter Server.

If input of the execution username is omitted, an argument error will occur. However, if both the execution username and password are omitted, the configuration management database (CMDB) will be searched based on the specified host name or IP address, and Systemwalker Runbook Automation automatically sets the acquired user linked to the VMware vCenter Server as the value.

The maximum length of the execution user name is 1,024 characters. An argument error occurs if this limit is exceeded.

(2) vmpassword

The password for executing operations on the vCenter Server.

If input of the password required for execution is omitted, an argument error will occur. However, if both the execution username and password are omitted, the configuration management database (CMDB) will be searched based on the specified host name or IP address, and Systemwalker Runbook Automation automatically sets the acquired password linked to the VMware vCenter Server as the value.

The maximum length of the password required for execution is 1,024 characters. An argument error occurs if this limit is exceeded.

(3) multiplicity

Specify the execution concurrency level of the VM host if multiple ESX Servers are specified for the "vmhost" option.

Values from 1 through 100 can be specified.

If a value is specified that exceeds the number of server names on the VM host, the number of server names on the VM host is used.

If this option is omitted, 10 is used as the default.

If a large value is specified for this option, there may be a burden on the vCenter Server.

(4) operationmode

Specify the operating mode of the operation component if multiple ESX Server names are specified for the "vmhost" option.

This option is not case sensitive, and the following values can be used:

Ÿ continue: Executes the processing till the last VM host specified

Ÿ abort: Suspends the processing at the VM host where an error is detected

The default value is "continue".

If "abort" is specified, and more than 2 multiple operations are specified, processes on the operating server are stopped at the error detection stage and then cancelled.

If there is one ESX Server name, any value specified in this option will be ignored.

(5) timeout

This is the completion timeout (in seconds) for executing the operation component.

Values between 300 and 86400 (1 day) can be specified.

Example: If the completion timeout is 10 minutes: 600

If the operation component has not finished executing when the specified time has passed, the processing for the operation component will be interrupted with return value 201.

(6) retry

This is the retry count for executing the operation component.

Specify the number of retry attempts to be used when the operation component terminates with return value 161. Values between 0 and 5 can be specified.

If the operation component terminates with a return value other than "161" as a result of being re-executed from a retry, the execution of the operation component will terminate even if the specified number of retries has not been reached. The return value for the operation component will be the value from the last time the operation component was executed.

Example: To retry twice: 2

(7) retry_interval

This is the retry interval (in seconds) for the operation component.

Specify the time to wait before a retry is attempted if the operation component terminates with return value 161. Values between 1 and 14400 can be specified.

Example: To retry at 300 second intervals: 300

If the specification of the timeout, retry and retry_interval is omitted, and a value beyond the limits of the above-mentioned is input, the value specified with the operation components definition file becomes effective. Refer to "2.5 Definition File for Operation Components" for details.

Return Values

Icon

Name

Return value

Description

Success

0

Successfully stopped VM host.

Failure

42

PowerShell could not be executed. There is a problem in vCenter Server's PowerShell execution environment.

161

Failed to connect to or operate the vCenter Server. Retry if a retry count has been specified. However, if multiple ESX Server names are specified, there is no retry.

171

An authentication error occurred in the communications process with the vCenter Server.

180

Multiple operations failed. For return values for operations on each server, check "Return code" in "vmhost_vmstop_result" output information.

189

An error occurred in the communication process with the server (file transfer infrastructure) when an operation component executed an operation to a server that has an agent installed. In this case, the error code for the file transfer infrastructure is output to the standard error output results. Refer to "3.21 Detailed Code of File Transfer Infrastructure" for information on error codes.

197

An invalid content is specified.

-

-

201

The execution of the operation component has timed out.

202

The operation component has not been executed due to a problem with the settings for executing the operation component.

203

The operation component has not been executed normally. There is a problem with the environment for the Management Server.

205

The operation component has not been executed. There is a problem with the input information specification of the operation component.

206

The operation component has not been executed normally. There is a problem with the output information specification of the operation component.

207

The operation component has not been executed. The operation component may not have been registered on the Management Server.

208

The Automated Operation Process has been canceled because the Automated Operation Process was recovered while the operation component was executing.

Output Information

Variable

Description

message

  • If one ESX Server name is specified to the vmhost

    Set the message to display operation result.

  • If multiple ESX Server names are specified for the vmhost

    When all VM host operations are successful, set the following message:

    The operation component was successful.

    When a part or all of the VM host operations failed, the failed VM host information is output in the same format as vmhost_stop_result.

vmhost_stop_result

Set the execution result for the specified VM host.

vmhost_stop_list

Set list of servers which successfully operated on the VM host in CSV format.

vmhost_stop_fault_list

Set list of servers which failed to operate on the VM host in CSV format.

returnCode

Sets return values.

Output format for vmhost_stop_result is as follows:

[hostname], [return values], [output information], [message]


Nothing is output to [output information].

The following is output to [message]:

<Example>

If "esx1, esx2, esx3" are specified for VM host and forced stopping of the virtual server on esx3 fails:

"vmhost",Return_code,"Output","Message"
"esx1",0,"","Success"
"esx2",0,"","Success"
"esx3",161,"","2012/03/01 16:00:00 Get-VMHost VMHost with name 'esx3' was not found, using the specified filter(s)."


In the case of the above example, the following is output to 'message':

<Example>

"hostname",Return_code,"Output","Message"
"esx3",161,"","2012/03/01 16:00:00 Get-VMHost VMHost with name 'esx3' was not found, using the specified filter(s)."

Notes