Restart Virtual Machine: Service details

Ops Center Automator User Guide

Version
10.8.x
File Size
3.6 MB
Audience
anonymous
Part Number
MK-99AUT001-14

This service template restarts multiple virtual servers in a VMware vSphere environment.

The general steps for using this service template to restart a virtual machine are as follows:

  1. The status of a virtual server is obtained.
  2. If a virtual server's power status is on, the service template restarts the virtual server. If the virtual server's power status is off, the corresponding virtual server processing results in an error.
  3. An ICMP echo request is sent to verify that the virtual server is started.

    The specified group of virtual servers are turned off according to the number of seconds specified through the vmware.checkPowerStateInterval property and then verified to determine if the power is off, which it does up to the number of times specified through the vmware.checkPowerStateCount property. Therefore, the maximum wait time is the product of these two property values times two (in seconds). If the default values are not suitable, specify values that suit your environment.

Service Definition Properties

The following table lists the properties visible in the Service Definition window for the Restart 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
vmware.checkPowerStateCount Power status check count Specify the number of times the service tries to verify the power status to confirm that the virtual server has stopped and started. The maximum wait time is determined by this property and the property that defines the power status verification interval. 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 or started. R
common.icmpEchoTimeout Timeout period for ICMP echo requests Specify in milliseconds how long the service waits for a reply to an ICMP echo request sent to confirm startup of a virtual server. R

Service Definition and Submit Service Properties

The following table lists the properties visible in the Service Definition and Submit Service windows for the Restart 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
Note: Although some of the properties in the tables indicate that they can be omitted, they might be required when used in conjunction with some other property setting as indicated in the descriptions.

Prerequisites

The following conditions must be met:

  • 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.
  • The firewall of the target virtual server is set to allow for responses to ICMP (ECHO).

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

  • Adjust the ICMP echo timeout value (common.icmpEchoTimeout property) for the local environment.
  • Depending on the state of the system environment, the virtual server might successfully start, but the network connection verification might fail, possibly causing the task to end abnormally. Verify the task log to see if an error has occurred with the network connection verification (the component "Obtain the IP address of a virtual server" (vsphereGetVMIPaddress) or the component "Send ICMP echo request message" (osSendIcmp)). If an error has occurred in these components, verify whether the virtual server is started.
  • If many IP addresses (#1) are set for the NIC of the virtual server, an error might occur in the component "Send ICMP echo request message" and the task might end abnormally. Verify that the total length of the IP addresses set for the NIC is within 1,024 characters.

    #1: You can set the following addresses types. For example, if 64 or less addresses are set for IPv4 only, no problem occurs.

    • IPv4 (maximum length is 16 characters)
    • IPv4 (maximum length is 36 characters)
    • IPv4 and IPv6 set by DHCP