Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


4.13.17 Shutdown Server

Function

This plug-in shuts down a server in a Windows or Linux environment.

This plug-in requires the following server:

- Execution-target server

A server on which this plug-in is executed

This plug-in shuts down (powers off) the server by using the appropriate shutdown command for the OS of the execution-target server.

Note the following when specifying properties:

(1) For the shutdown reason (the property Windows.shutdownReason), specify one of the codes listed below. To use your own codes, see the Microsoft support information.

Code Meaning

0:0 Reason other than those below (planned)

1:1 Hardware: Maintenance (planned)

1:2 Hardware: Installation (planned)

2:2 OS: Recovery (planned)

2:3 OS: Upgrading (planned)

2:4 OS: Reconfiguration (planned)

2:16 OS: Service pack (planned)

2:17 OS: Hot fix (planned)

2:18 OS: Security fix (planned)

4:1 Application: Maintenance (planned)

4:2 Application: Installation (planned)

5:19 Security problem (planned)

7:0 Legacy API shutdown (planned)

Use situation

This plug-in can be used to shut down the server, for example, when during a schedule power outage or when program update files are being applied.

Prerequisites

For the most recent information about the prerequisite products for the system, prerequisite products for the execution-target server, and the supported OSs for the execution-target server, see the Release Notes.

Prerequisite products for the system:

JP1/Automatic Operation 11-00 or later

Prerequisite products for the execution-target server:

None.

Supported OSs for the execution-target server:

(1) Windows Server 2008 R2 Standard/Enterprise/Datacenter

(2) Windows Server 2012 Standard/Datacenter, Windows Server 2012 R2 Standard/Datacenter

(3) Windows Server 2016 Standard/Datacenter

(4) Windows Server 2019 Standard/Datacenter

(5) Red Hat Enterprise Linux Server 6 (32-bit x86), Red Hat Enterprise Linux Server 6 (64-bit x86_64)

(6) Red Hat Enterprise Linux Server 7 (64-bit x86_64)

(7) Red Hat Enterprise Linux Server 8 (64-bit x86_64)

(8) CentOS 6 (64-bit x86_64)

(9) CentOS 7 (64-bit x86_64)

(10) CentOS 8 (64-bit x86_64)

(11) Oracle Linux 8 (64-bit x86_64)

Conditions for using the execution-target server:

None.

Cautions

(1) Regardless of the OS of the execution-target server, this plug-in forcibly shuts down the server even if other users are logged in. The data that other users are working on is not saved.

(2) Processing for this plug-in finishes when the OS shutdown command is executed on the execution-target server. As a result, this plug-in and the shutdown operation work asynchronously.

(3) There is a fixed wait time between the execution of the OS shutdown command on the execution-target server and the start of the shutdown processing. During this wait time, JP1/AO performs preprocessing for shutdown. The wait time varies depending on the OS of the execution-target server. If the OS is Windows, the wait time is 180 seconds. If the OS is Linux, the wait time is 1 second.

(4) If the OS of the execution-target server is Windows, when specifying properties, do not specify any string that includes a double quotation mark ("). If you specify such a string, this plug-in terminates abnormally.

(5) If the OS of the execution-target server is Windows, do not omit the property Windows.shutdownReason (shutdown reason) or the property Windows.shutdownReasonComment (comment for the shutdown reason). If you omit either of these properties, this plug-in terminates abnormally.

(6) If the OS of the execution-target server is Windows, the OS event log entries registered by this plug-in conform to the specifications of the shutdown command.

(7) If the OS of the execution-target server is Windows, this plug-in references the environment variable SystemRoot when calling shutdown.exe. For this reason, if the value of this environment variable was changed from the value set during OS installation, this plug-in might terminate abnormally.

(8) If an error occurs in this plug-in, take action according to the message output for the shutdown command in the task log.

Execution privilege

For Windows: Administrator privileges

For Linux: Root privileges

Version

02.01.00

Plug-in tags

Control OS,Windows,Linux

Plug-in name displayed in the task log

osShutdownServer

Return code

0: Normal

Other than 0: Error (Check the task log for details of the error): Abnormal termination of the shutdown command

Property list

The following table lists the properties:

Property key

Property name

Description

Default value

I/O type

Required

plugin.destinationHost

Host name of the execution target server

Specify the host name or IP address of the server on which this plugin will be executed. IPv6 addresses are not supported.

--

Input

R

Windows.shutdownReason

Shutdown Reason (Windows only)

If the OS of the execution-target server is Windows, specify the reason for shutdown in "x:y" format. If the OS is Windows, you cannot omit this setting. If the OS is Linux, this setting is ignored.

0:0

Input

O

Windows.shutdownReasonComment

Comment on Shutdown Reason (Windows only)

If the OS of the execution-target server is Windows, specify a comment consisting of a maximum of 511 characters, about the reason for shutdown. If the OS is Windows, you cannot omit this setting. If the OS is Linux, this setting is ignored.

Server shutdown was done by this product.

Input

O

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O