Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 6 Next »

UNDER CONSTRUCTION

TO DO:

  • update log output in other modes and here too
  • specify parameters and values are case sensitive (in all other modes too)
  • add a "clixmlsys" parameter as for "identityfile" and "identityfsys" so that this file will be used with "system" (service) account

Contents

Required parameters

ParameterValueExample
logfileFull path to the logfile that will be used to log the script outputlogfile=C:\Charon\myds20_shutdown.log
mode'opa0'mode=opa0
osEither Tru64 or VMSos=Tru64
servicename

CHARON instance service name.

(warning) When using expect, the service is stopped by the expect script either with a "power off" or the "F6" key.

If this operation does not succeed (cannot connect to console or "F6" key not enabled for example), it is then stopped using a Windows service command.

servicename=myds20
usernameDefines the remote username that will be used to connect to the console of the CHARON instance (if not already logged in)

For OpenVMS:

username=system

For Tru64:

username=root

password

Defines the password in clear text that will be used to connect to the console.

The password can be also stored in an encrypted clixml file as described below.

(warning) If password is sent then clixml (below) value must be set to "none"

password=12345
clixml

Defines the full path of the clixml file that contains the encrypted password (password parameter must then not be set).

To create this file, open a "cmd.exe " window and then run :

C:\Users\Administrator> cd C:\Charon

C:\Charon> powershell

PS C:\Charon> "<password>" | export-clixml <file>

Example:

PS C:\Charon> "12345" | export-clixml C:\Charon\myds20pwd.clixml
clixml=C:\Charon\myds20pwd.clixml
portDefines the port to access the console (same as the one defined in the configuration file).port=10003
promptDefines the prompt at the shell level of the guest operating system. Used by 'expect' to check that the connection did succeed.

prompt=myds20>

timelimitsecDefines the maximum number of seconds the script can run (default = 180 seconds). This value depends on the time needed to shutdown properly the operating systemtimelimitsec=600

Example

Configuration file

#-----------------------------------------

# myds20 Tru64 V5.1 machine

#-----------------------------------------

logfile=C:\Charon\myds20_shutdown.log

servicename=myds20

mode=opa0

os=Tru64

username=root

clixml=C:\Charon\myds20pwd.clixml

port=10003

prompt=#

timelimitsec=180

Script execution

Check mode

(info) When check mode is enabled, a pop-up window will be displayed to check the expect operations performed on the CHARON instance console.

c:\Charon>powershell -file charon_cleanshutdown.ps1 -config myds20tru64.ini -check

-->To update

Shutdown execution

c:\Charon>powershell -file charon_cleanshutdown.ps1 -config myds20tru64.ini

-->To update



  • No labels