Hitachi

JP1 Version 12 JP1/Automatic Operation Service Template Reference


5.11.26 Retrieving log bundles

Function

This plug-in obtains a log bundle from the vCenter server or ESX server in a VMware vSphere environment, and then transfers and saves the log bundle to the vCenter control server. Optionally, the log bundles of both servers can also be obtained by running this plug-in only once.

To run this plug-in, the following servers are required:

- vCenter server

The server on which VMware vCenter Server is installed.

- ESX server

The server on which VMware vSphere ESXi is installed.

- vCenter control server (execution target server)

The server on which VMware vSphere PowerCLI is installed. This plug-in is transferred by this product to this server, and then run on this server.

In the script of this plug-in, a VMware vSphere PowerCLI commandlet (shown later) is run to obtain a log bundle of the target server. The following describes the commandlet to be run:

(1) Commandlet to obtain a log bundle from the ESX server (the ESX server name (VMware.vmHostName property) is specified)

Get-Log -Bundle

-VMHost "ESX-server-object"#

-DestinationPath "file-destination-folder-path (value of the common.outputFolderPath property)"

#: Object obtained from the ESX server name (value of the VMware.vmHostName property)

(2) Commandlet to obtain a log bundle from the vCenter server (the ESX server name (VMware.vmHostName property) is not specified or the VMware.logBundleTargetOption is set to true)

Get-Log -Bundle

-DestinationPath "file-destination-folder-path (value of the common.outputFolderPath property)"

For details about the Get-Log commandlet, see "Cmdlets Reference" in the vSphere PowerCLI documentation.

The commandlet saves the obtained log bundle in the folder specified for the common.outputFolderPath property.

If the specified folder does not exist, it is created.

The name of the obtained log bundle is as follows:

- Log bundle of the vCenter server

vcsupport-<UUID>.<extension>

- Log bundle of the ESX server

vmsupport-<UUID>.<extension>

Examples:

vcsupport-52030251-97e6-e5f2-042e-eee52079822b.tgz

vmsupport-5219d2ae-c328-c617-2525-09ed4a3111f0.tgz

esx-ed801a-2017-03-24--13.36-1080701.tgz

The <UUID> value changes each time the plug-in is run even if the plug-in is run on the same server.

The full path of the obtained log bundle is stored in the following property:

- Log bundle of the vCenter server

Log bundle path of the vCenter server (VMware.vCenterLogBundlePath property)

- Log bundle of the ESX server

Log bundle path of the ESX server (VMware.esxLogBundlePath property)

Use situation

This plug-in can be used to obtain a log bundle of VMware vCenter Server or VMware vSphere ESXi as troubleshooting information when a failure occurs in a VMware vSphere environment.

Prerequisites

For the most recent information about the prerequisite products for the system, the prerequisite products for the execution-target system, the 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-10 or later

[Prerequisite products for the execution-target system]

(1) Prerequisite product of vCenter server

- VMware vCenter Server 7.0, 6.7, 6.5, 6.0, 5.5, 5.1, 5.0

(2) Prerequisite product of ESX server

- VMware vSphere ESXi 7.0, 6.7, 6.5, 6.0, 5.5, 5.1, 5.0

[Conditions for using the execution-target server]

(1) A log bundle of VMware vSphere ESXi can be obtained when both of the following conditions are met:

- VMware vSphere ESXi is managed by VMware vCenter Server.

- VMware vSphere ESXi is connected to VMware vCenter Server.

[Prerequisite products for the execution-target 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

[Supported OSs for the execution-target 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

Cautions

(1) Do not specify character strings containing double quotation marks (") or single quotation marks (') for properties of this plug-in.

(2) If you simultaneously run multiple instances of this plug-in by specifying the same, non-existent, file destination folder for the common.outputFolderPath property, some instances might attempt to create the same folder simultaneously, causing the plug-in to terminate abnormally. In such a case, try again.

(3) If you simultaneously run multiple instances of this plug-in on the same vCenter server or ESX server, some instances might attempt to obtain a log bundle from the same server simultaneously, causing the plug-in to terminate abnormally. In such a case, try again.

Execution privilege

(1) Users connecting to the VMware vCenter Server are required to have the privileges of the system administrator role.

Version

02.11.00

Plug-in tags

Gather VM information,VMware vSphere

Plug-in name displayed in the task log

vsphereGetLogBundle

Return code

0: Normal

12: Error (mistake by user) Invalid property

23: Error (invalid environment) The environment requirements have not been met.

27: Error (Check with the task log regarding the error details.) Unidentified error

41: Error (error detected in the component) Property not entered (An error was detected in the component script.)

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

VMware.vCenterServerName

Host name of the vCenter server

Specify the host name or IP address of the destination vCenter server. IPv6 addresses are not supported.

--

Input

R

VMware.userName

User name for connecting to the VMware vCenter Server

Specify the user name for connecting to the VMware vCenter Server.

--

Input

R

VMware.password

Password for connecting to the VMware vCenter Server

Specify the password for connecting to the VMware vCenter Server.

--

Input

R

VMware.portNumber

Port number for connecting to the VMware vCenter server

Specify the number of the port for connecting to VMware vCenter Server (for the VMware vCenter Server Web service).

443

Input

O

VMware.protocol

Protocol for connecting to the VMware vCenter server

Specify either HTTP or HTTPS as the protocol for connecting to VMware vCenter Server.

https

Input

R

VMware.vmHostName

Host name of the ESX server

Specify the host name of the ESX server. If the specification is omitted, the log bundle is retrieved from vCenter server.

--

Input

O

VMware.logBundleTargetOption

Log bundle acquisition target option

When you obtain a log bundle from the ESX server, if you want to also obtain a log bundle from the vCenter server, specify "true". Unless you specify "true", the plug-in obtains a log bundle from only the ESX server.

True

Input

O

common.outputFolderPath

Destination folder path for file output

Specify the full path of the folder on the execution target server to which to output the log bundle retrieved from server.

--

Input

R

VMware.esxLogBundlePath

Path to the log bundle of the ESX server

Stores the full path of the log bundle retrieved from an ESX server.

--

Output

O

VMware.vCenterLogBundlePath

Path to the log bundle of the vCenter server

Stores the full path of the log bundle retrieved from vCenter server.

--

Output

O

common.returnValue

Return value for the plugin

The return value of this plugin stored.

--

Output

O