Alarm action in vCenter Server fails with error: "Script timed out, terminated error"
search cancel

Alarm action in vCenter Server fails with error: "Script timed out, terminated error"

book

Article ID: 342356

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

When PowerCLI script takes more time to complete, you experience these symptoms:

  • vCenter Server alarm action fails.
  • You see the error:

    Alarm 'New Alarm' did not complete script: A general system error

    occurred: Failed to run script: Script timed out, terminated

    error

Environment

  • VMware vCenter Server 5.5.x
  • VMware vCenter Server 5.0.x
  • VMware vCenter Server 5.1.x
  • VMware vCenter Server 6.0.x

Cause

This is an expected behavior. The default time out for PowerCLI script on vCenter Server is 5 minutes. vCenter Server terminates any PowerCLI script that takes more than 5 minutes to complete.

Resolution

To work around this issue, increase the time out duration for PowerCLI script on vCenterServer by adding the advanced parameter config.vpxd.userCommandTimeoutSecs with the required value.

To add the advanced parameter:

  1. Log in to vCenter Server through vSphere Client.
  2. Select Administration and click vCenter Server Settings.
  3. Select Advanced Settings in the settings list.
  4. Enter config.vpxd.userCommandTimeoutSecs in the Key field.
  5. Enter 600 in the Value field for increasing the time out duration to 10 minutes.

    Note: The Value for config.vpxd.userCommandTimeoutSecs is set in seconds.

  6. Click Add
  7. Click OK.

Note: Restarting vCenter Server is not required to apply the new setting.