Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update in powershell commands to generate the crypted password

Anchor
TOC
TOC
Include Page
KBCOMMON:KB-CSSstyle
KBCOMMON:KB-CSSstyle

...

UNDER CONSTRUCTION

...

Contents

Table of Contents
excludeContents
stylesquare

Required parameters

...

Parameters

logfile

...

Optional full path to the logfile that will be used to log the script output

...

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.

...

For OpenVMS: username=system

For Tru64: username=root

...

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"

...

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

(warning) The clixml file is bound to the user and system where it is created! It will not be valid for another user or another system.

...

Defines the full path of the clixml file that contains the encrypted password (password parameter must then not be set) for the "system" account. Used in case of integration with Windows shutdown.

(info) If not specified, clixml is used or the combination of username/password (see above)

(warning) The clixml file has to be created as "system" user using "psexec" utility. It is bound to the "system" user and the system where it is created! It will not be valid for another user or another system.

...

. If not specified a file name and path will be chosen based on session log file (one file per script execution). The file name is usually based on the configuration_name followed by "-SHUTDOWN-" and date/time.

Example:
logfile=C:\Charon\myds20_shutdown.log

windowsevent

Defines which message levels will create a new entry in the Windows Application Events (Source="CHARON")

Can be either "none" or any combination of S, W and E. 'S' for Success, 'W' for Warning and 'E' for Error. Default is 'SE' so Success and Error only.

Example:
windowsevent=SWE

mode

opa0

Example:
mode=opa0

Div
classpagebreak


os

Either Tru64 or VMS

Example:
os=Tru64

servicename

CHARON instance service name.

(warning) When using "opa0" mode, the service is stopped by 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.

Example:
servicename=myds20

username

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

Example / OpenVMS:
username=system

Example / 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 file as described below.

(warning) If password is used then cryptedpass (below) value must be set to "none" or left empty.

Example:
password=12345

cryptedpass

Full path to the text file containing the encrypted password. To create this file, open a command window "cmd.exe" and enter the following command:

C:\Users\Spock> powershell
PS C:\Users\Spock> ConvertTo-SecureString -String '<password>' -AsPlainText -Force
| ConvertFrom-SecureString | Out-File '<file full path>'

(warning) Please note the password encryption is based on current user credentials

(info) The parameter can be set to "none" or simply commented if not used.

Example:
cryptedpass=C:\Charon\myds20pwd.txt

Div
classpagebreak


cryptedpsys

Full path to the text file containing the encrypted password that will be used as "system" user (during Windows server shutdown). To create this file, open a command window "cmd.exe", run "psexec -i -s cmd.exe" ((info) psexec is provided in the kit) and run "powershell" from the newly opened window. At the PowerShell prompt, enter the following command:

C:\Users\Spock> powershell
PS C:\Users\Spock> ConvertTo-SecureString -String '<password>' -AsPlainText -Force
| ConvertFrom-SecureString | Out-File '<file full path>'

(lightbulb) Use a different name for the output file as the one user for "cryptedpass"

(info) The parameter can be set to "none" or simply commented if not used.

Example:
cryptedpsys=C:\Charon\myds20pwd_sys.txt

port

Defines the port to access the console (same as the one defined in the configuration file).

Example:
port=10003

prompt

Defines the prompt at the shell level of the guest operating system. Used to check the user is connected.

Notes:

  • If the prompt contain spaces, it is necessary to add them in the configuration file
  • The prompt must not contain any escape character.

Example:
prompt=myds20>

timelimitsec

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

Example:
timelimitsec=600

windowwidth and windowheight

Optional parameters used to resize the window when running with service user ("system" account).

Useful during Windows shutdown to check operations executed.

Width = 132 and Height = 32 by default. BufferHeight set 2000 lines by default.

Example:
windowwidth=120
windowheight

...

=50

Include Page
KBCOMMON:KB-GoToTop
KBCOMMON:KB-GoToTop

...

Div

...

class

...

pagebreak

...


Examples

...

Configuration file

#-----------------------------------------
# myds20 Tru64 V5.1 machine
#-----------------------------------------
windowwidth=132
windowheight=50

logfile

servicename=

C:\Charon\pluto_shutdown.log
waitbeforestop=10servicename=pluto
os=

pluto
os=Tru64
username=root
mode=opa0

clixml

cryptedpass=C:\Charon\pluto_

tru64.clixml
clixmlsys=C:\Charon\pluto_tru64sys.clixml
clixml=none
password=charon0

pwd.txt
port=

10004

10005
prompt=

pluto#

pluto5#
timelimitsec=180

Include Page
KBCOMMON:KB-GoToTop
KBCOMMON:KB-GoToTop

...

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

Shutdown execution - VMS example

Div
classcommandline

c:\Windows\system32>C:\charon\charon_cleanshutdown.ps1 -config C:\charon\myds20vms.ini

Charon clean shutdown

Name            Value
----            -----
clixmlsys       C:\Charon\myds20vmssys.clixml
waitbeforestop  10
windowwidth     132
servicename     ds20vms
username        system
prompt          VMS084>
windowheight    50
timelimitsec    180
os              VMS
mode            opa0
clixml          C:\Charon\myds20vms.clixml
port            10003
logfile         C:\Charon\myds20vms_shutdown.log

16:48:09 [INFO ] Using 'C:\Charon\myds20vms_shutdown.log' as log file / append
16:48:09 [INFO ] Execution date : 27-avr.-2020 16:48:09
16:48:09 [INFO ] Script version : 27-Apr-20 V2.0 (MD5: 4BA97792A105C9E0E484850B88B866F8 )
16:48:09 [INFO ] Powershell version : 5.1.14409.1018
16:48:09 [INFO ] Computer name : WIN2008BM
16:48:09 [INFO ] Username : Administrateur
16:48:09 [INFO ] Windows version : Microsoft Windows Server 2008 R2 Standard
16:48:09 [INFO ] Administrator mode : True
16:48:09 [INFO ]
16:48:09 [INFO ] 'opa0' will be used
16:48:09 [INFO ] Service 'ds20vms' is Running (Display name: ds20vms)
16:48:09 [INFO ] Using 'C:\Charon\myds20vms.clixml' as credentials file.
16:48:09 [INFO ] No putty session active.
16:48:09 [INFO ] Connecting to OPA0 console, port 10003
16:48:09 [INFO ] Sending CRLF...
16:48:09 [INFO ] Time limit: 16:51:09. Seconds remaining: 180
16:48:12 [RCVD ]
16:48:12 [RCVD ] Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4
16:48:12 [RCVD ]
16:48:12 [RCVD ] Username:
16:48:12 [INFO ] Got: [Username: ]
16:48:12 [INFO ] Sending VMS username...
16:48:12 [INFO ] Username sent
16:48:12 [INFO ] Time limit: 16:51:09. Seconds remaining: 176
16:48:16 [RCVD ] system
16:48:16 [RCVD ] Password:
16:48:16 [INFO ] Got: [Password: ]
16:48:16 [INFO ] Sending password, try #1 of 3
16:48:16 [INFO ] Password sent
16:48:18 [INFO ] Time limit: 16:51:09. Seconds remaining: 171
16:48:21 [RCVD ]
16:48:21 [RCVD ] %LOGIN-S-LOGOPRCON, login allowed from OPA0:
16:48:21 [RCVD ] Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4
16:48:21 [RCVD ] Last interactive login on Monday, 27-APR-2020 15:46:31.39
16:48:21 [RCVD ] Last non-interactive login on Thursday, 2-APR-2020 08:18:02.76[c\Z
16:48:21 [INFO ] Got: [ Last non-interactive login on Thursday, 2-APR-2020 08:18:02.76[c\Z]
16:48:22 [INFO ] Case unknown: [ Last non-interactive login on Thursday, 2-APR-2020 08:18:02.76[c\Z]. Retrying...
16:48:24 [INFO ] Time limit: 16:51:09. Seconds remaining: 165
16:48:27 [RCVD ] [0c
16:48:27 [INFO ] Got: [[0c]
16:48:27 [INFO ] Case unknown: [[0c]. Retrying...
16:48:29 [INFO ] Time limit: 16:51:09. Seconds remaining: 160
16:48:33 [RCVD ]
16:48:33 [RCVD ] %SET-W-NOTSET, error modifying OPA0:
16:48:33 [RCVD ] -SET-I-UNKTERM, unknown terminal type
16:48:33 [RCVD ] VMS084>
16:48:33 [INFO ] Got: [ VMS084> ]
16:48:33 [INFO ] Found prompt.
16:48:33 [INFO ] Sending VMS shutdown...
16:48:33 [INFO ] Command sent
16:48:38 [INFO ] Time limit: 16:51:09. Seconds remaining: 151
16:48:42 [RCVD ] @SYS$MANAGER:CHARON_SHUTDOWN.COM
16:48:42 [RCVD ] $ PURGE /KEEP=20 SYS$MANAGER:CHARON_SHUTDOWN.LOG
16:48:42 [RCVD ] $ RUN /DETACH SYS$SYSTEM:LOGINOUT.EXE /INPUT=SYS$MANAGER:CHARON_SHUTDOWN -
16:48:42 [RCVD ] /OUTPUT=SYS$MANAGER:CHARON_SHUTDOWN.LOG /UIC=[1,4]
16:48:42 [RCVD ] %RUN-S-PROC_ID, identification of created process is 0000011F
16:48:42 [RCVD ] $ ENDIF
16:48:42 [RCVD ] $ ENDIF
16:48:42 [RCVD ] $ EXIT
16:48:42 [RCVD ] VMS084>
16:48:42 [RCVD ]
16:48:42 [RCVD ]
16:48:42 [RCVD ] SHUTDOWN -- Perform an Orderly System Shutdown
16:48:42 [RCVD ] on node VMS084
16:48:42 [RCVD ]
16:48:42 [RCVD ] %SHUTDOWN-I-OPERATOR, this terminal is now an operator's console
16:48:42 [RCVD ] %SHUTDOWN-I-DISLOGINS, interactive logins will now be disabled
16:48:42 [RCVD ] %SET-I-INTSET, login interactive limit = 0, current interactive value = 1
16:48:42 [RCVD ] %SHUTDOWN-I-STOPQUEUES, the queues on this node will now be stopped
16:48:42 [RCVD ] %%%%%%%%%%% OPCOM 27-APR-2020 15:47:36.02 %%%%%%%%%%%
16:48:42 [RCVD ] Message from user SYSTEM on VMS084
16:48:42 [RCVD ] %JBC-E-OPENERR, error opening SYS$COMMON:[SYSEXE]QMAN$MASTER.DAT;
16:48:42 [RCVD ]

... (truncated)

16:48:42 [RCVD ]
16:48:42 [RCVD ] VMS084>
16:48:42 [INFO ] Got: [ VMS084> ]
16:48:42


Div
classcommandline

cPS C:\Windows\system32>C:\charon\charon_cleanshutdown.ps1 -config C:\charon\pluto_tru64.ini -check

Charon clean shutdown


Name            Value
----            -----

clixmlsys       cryptedpass     C:\Charon\pluto_tru64syspwd.clixml
waitbeforestop  10
windowwidth     132
servicename     pluto
username        root
prompt          pluto#
windowheight    50 txt
guestsystem     192.168.152.147
mode            opa0
os              Tru64
port            10005
prompt          pluto5#
servicename     pluto
timelimitsec    180
os              Tru64
mode            opa0
clixml          C:\Charon\pluto_tru64.clixml
port            10004
logfile         C:\Charon\pluto_shutdown.log16:37:38 username        root
18:14:03 [INFO ] Using 'C:\Charon\pluto_shutdown.log' as log file / append
16:37:38 [INFO ] Execution date : 27-avr.-2020 16:37:38
16:37:38 [INFO ] Script version : 27-Apr-20 V2.0 (MD5: 4BA97792A105C9E0E484850B88B866F8 )
16:37:38 \Program Files\CHARON\Virtual Machines\pluto\pluto-SHUTDOWN-2020-06-02-18-14-03-000000000.log' as log
file / one log file per script execution
18:14:03 [INFO ] Defined symbolic link 'C:\Program Files\CHARON\Virtual Machines\pluto\pluto-SHUTDOWN.log'
18:14:03 [INFO ] Using 'C:\charon\pluto_tru64.ini' as configuration file
18:14:03 [INFO ] Execution date : 02-Jun-2020 18:14:03
18:14:03 [INFO ] Script version : 02-Jun-20 V2.1 (MD5: ED6D76E7CCC3F0016C34D88BADE4EC1A )
18:14:03 [INFO ] Powershell version : 5.1.1440918362.1018752
1618:3714:38 03 [INFO ] Computer name : WIN2008BMWIN10-MAIN
1618:3714:38 03 [INFO ] Username : Administrateurbruno
1618:3714:38 03 [INFO ] Windows version : Microsoft Windows Server 2008 R2 Standard
16:37:38 10 Pro
18:14:03 [INFO ] Administrator mode : True
1618:3714:38 03 [INFO ] Windows shutdown scripts:
1618:3714:38 03 [INFO ] Check mode enabled.
16:37:38 [INFO ] 'opa0' will be used
16:37:38 [INFO ] Service 'pluto' is Running (Display name: pluto)
16:37:38 [INFO ] Using 'C:\Charon\pluto_tru64.clixml' as credentials file.
16:37:38 [INFO ] Killing putty sessions...
16:37:39 [INFO ] Done.
16:37:39 [INFO ] Connecting to OPA0 console, port 10004
16:37:39 [INFO ] Sending CRLF...
16:37:39 [INFO ] Time limit: 16:40:39. Seconds remaining: 180
16:37:43 [RCVD ]
16:37:43 [RCVD ] #####################
16:37:43 [RCVD ] # pluto demo system #
16:37:43 [RCVD ] #####################
16:37:43 [RCVD ]
16:37:43 [RCVD ] HP Tru64 UNIX V5.1B (Rev. 2650) (pluto) console
16:37:43 [RCVD ]
16:37:43 [RCVD ] login:
16:37:43 [RCVD ]
16:37:43 [RCVD ] #####################
16:37:43 [RCVD ] # pluto demo system #
16:37:43 [RCVD ] #####################
16:37:43 [RCVD ]
16:37:43 [RCVD ] HP Tru64 UNIX V5.1B (Rev. 2650) (pluto) console
16:37:43 [RCVD ]
16:37:43 [RCVD ] login:
16:37:43 [INFO ] Got: [login: ]
16:37:43 [INFO ] Sending Tru64 username...
16:37:43 [INFO ] Username sent
16:37:43 [INFO ] Time limit: 16:40:39. Seconds remaining: 176
16:37:46 [RCVD ] root
16:37:46 [RCVD ] Password:
16:37:46 [INFO ] Got: [Password:]
16:37:46 [INFO ] Sending password, try #1 of 3
16:37:46 [INFO ] Password sent
16:37:48 [INFO ] Time limit: 16:40:39. Seconds remaining: 171
16:37:52 [RCVD ]
16:37:52 [RCVD ] Last login: Mon Apr 27 16:33:20 CEST 2020 on console
16:37:52 [RCVD ] HP Tru64 UNIX V5.1B (Rev. 2650); Thu Sep 12 12:04:06 CEST 2013
16:37:52 [RCVD ] Compaq Tru64 UNIX V5.1B (Rev. 2650); Thu Sep 12 11:11:39 CEST 2013
16:37:52 [RCVD ]
16:37:52 [RCVD ] The installation software has successfully installed your system.
16:37:52 [RCVD ]
16:37:52 [RCVD ] There are logfiles that contain a record of your installation. These are:
16:37:52 [RCVD ]
16:37:52 [RCVD ] /var/adm/smlogs/install.cdf - configuration description file
16:37:52 [RCVD ] /var/adm/smlogs/install.log - general log file
16:37:52 [RCVD ] /var/adm/smlogs/install.FS.log - file system creation logs
16:37:52 [RCVD ] /var/adm/smlogs/setld.log - log for the setld(8) utility
16:37:52 [RCVD ] /var/adm/smlogs/fverify.log - verification log file
16:37:52 [RCVD ]
16:37:52 [RCVD ]
16:37:52 [RCVD ] You have new mail.
16:37:52 [RCVD ] pluto#
16:37:52 [INFO ] Got: [pluto# ]
16:37:52 [INFO ] Found prompt.
16:37:52 [INFO ] Check mode enabled: sending test command...
16:37:52 [INFO ] Command sent
16:37:57 [INFO ] Time limit: 16:40:39. Seconds remaining: 162
16:38:01 [RCVD ] /usr/bin/uname -a;echo RESULT=$?
16:38:01 [RCVD ] OSF1 pluto V5.1 2650 alpha
16:38:01 [RCVD ] RESULT=0
16:38:01 [INFO ] Remote command succeeded
16:38:01 [RCVD ] pluto# pluto#
16:38:01 [RCVD ] pluto#
16:38:01 [INFO ] Got: [pluto# ]
16:38:01 [INFO ] Check mode enabled: prompt found, login out...
16:38:01 [INFO ] Done.
16:38:01 [INFO ] Check mode enabled: the service pluto will not be stopped
16:38:01 [INFO ] Service pluto is Running
16:38:01 [INFO ] Script ended.

(question) RCVD messages correspond to the received data from the OPA0 console.

...

Shutdown execution - Tru64 example

Div
classcommandline

c:\Windows\system32>C:\charon\charon_cleanshutdown.ps1 -config C:\charon\pluto_tru64.ini

Charon clean shutdown

Name            Value
----            -----
clixmlsys       C:\Charon\pluto_tru64sys.clixml
waitbeforestop  10
windowwidth     132
servicename     pluto
username        root
prompt          pluto#
windowheight    50
timelimitsec    180
os              Tru64
mode            opa0
clixml          C:\Charon\pluto_tru64.clixml
port            10004
logfile         C:\Charon\pluto_shutdown.log

16:40:51 [INFO ] Using 'C:\Charon\pluto_shutdown.log' as log file / append
16:40:51 [INFO ] Execution date : 27-avr.-2020 16:40:51
16:40:51 [INFO ] Script version : 27-Apr-20 V2.0 (MD5: 4BA97792A105C9E0E484850B88B866F8 )
16:40:51 [INFO ] Powershell version : 5.1.14409.1018
16:40:51 [INFO ] Computer name : WIN2008BM
16:40:51 [INFO ] Username : Administrateur
16:40:51 [INFO ] Windows version : Microsoft Windows Server 2008 R2 Standard
16:40:51 [INFO ] Administrator mode : True
16:40:51 [INFO ]
16:40:51 [INFO ] 'opa0' will be used
16:40:51 [INFO ] Service 'pluto' is Running (Display name: pluto)
16:40:51 [INFO ] Using 'C:\Charon\pluto_tru64.clixml' as credentials file.
16:40:51 [INFO ] No putty session active.
16:40:51 [INFO ] Connecting to OPA0 console, port 10004
16:40:51 [INFO ] Sending CRLF...
16:40:51 [INFO ] Time limit: 16:43:51. Seconds remaining: 180
16:40:55 [RCVD ]
16:40:55 [RCVD ] #####################
16:40:55 [RCVD ] # pluto demo system #
16:40:55 [RCVD ] #####################
16:40:55 [RCVD ]
16:40:55 [RCVD ] HP Tru64 UNIX V5.1B (Rev. 2650) (pluto) console
16:40:55 [RCVD ]
16:40:55 [RCVD ] login:
16:40:55 [RCVD ]
16:40:55 [RCVD ] #####################
16:40:55 [RCVD ] # pluto demo system #
16:40:55 [RCVD ] #####################
16:40:55 [RCVD ]
16:40:55 [RCVD ] HP Tru64 UNIX V5.1B (Rev. 2650) (pluto) console
16:40:55 [RCVD ]
16:40:55 [RCVD ] login:
16:40:55 [INFO ] Got: [login: ]
16:40:55 [INFO ] Sending Tru64 username...
16:40:55 [INFO ] Username sent
16:40:55 [INFO ] Time limit: 16:43:51. Seconds remaining: 176
16:40:58 [RCVD ] root
16:40:58 [RCVD ] Password:
16:40:58 [INFO ] Got: [Password:]
16:40:58 [INFO ] Sending password, try #1 of 3
16:40:58 [INFO ] Password sent
16:41:00 [INFO ] Time limit: 16:43:51. Seconds remaining: 171
16:41:04 [RCVD ]
16:41:04 [RCVD ] Last login: Mon Apr 27 16:38:22 CEST 2020 on console
16:41:04 [RCVD ] HP Tru64 UNIX V5.1B (Rev. 2650); Thu Sep 12 12:04:06 CEST 2013
16:41:04 [RCVD ] Compaq Tru64 UNIX V5.1B (Rev. 2650); Thu Sep 12 11:11:39 CEST 2013
16:41:04 [RCVD ]
16:41:04 [RCVD ] The installation software has successfully installed your system.
16:41:04 [RCVD ]
16:41:04 [RCVD ] There are logfiles that contain a record of your installation. These are:
16:41:04 [RCVD ]
16:41:04 [RCVD ] /var/adm/smlogs/install.cdf - configuration description file
16:41:04 [RCVD ] /var/adm/smlogs/install.log - general log file
16:41:04 [RCVD ] /var/adm/smlogs/install.FS.log - file system creation logs
16:41:04 [RCVD ] /var/adm/smlogs/setld.log - log for the setld(8) utility
16:41:04 [RCVD ] /var/adm/smlogs/fverify.log - verification log file
16:41:04 [RCVD ]
16:41:04 [RCVD ]
16:41:04 [RCVD ] You have new mail.
16:41:04 [RCVD ] pluto#
16:41:04 [INFO ] Got: [pluto# ]
16:41:04 [INFO ] Found prompt.
16:41:04 [INFO ] Send Tru64 shutdown...
16:41:04 [INFO ] Command sent
16:41:09 [INFO ] Time limit: 16:43:51. Seconds remaining: 162
16:41:13 [RCVD ] /sbin/init 0;echo RESULT=$?
16:41:13 [RCVD ] RESULT=0
16:41:13 [INFO ] Remote command succeeded
16:41:13 [RCVD ] pluto# pluto#
16:41:13 [RCVD ] pluto#
16:41:13 [INFO ] Got: [pluto# ]
16:41:13 [INFO ] Found prompt, waiting for shutdown to start...
16:41:18 [INFO ] Time limit: 16:43:51. Seconds remaining: 153
16:41:21 [RCVD ]
16:41:21 [RCVD ] INIT: New run level: 0
16:41:21 [RCVD ] The system is coming down. Please wait...
16:41:21 [RCVD ] Logins disabled
16:41:21 [RCVD ]
16:41:21 [INFO ] Got: [Logins disabled]
16:41:21 [INFO ] Shutdown in progress...
16:41:23 [INFO ] Time limit: 16:43:51. Seconds remaining: 148
16:41:27 [RCVD ] LAT stopped.
16:41:27 [RCVD ]
16:41:27 [INFO ] Got: [LAT stopped.]
16:41:27 [INFO ] Case unknown: [LAT stopped.]. Retrying...
16:41:29 [INFO ] Time limit: 16:43:51. Seconds remaining: 142
16:41:32 [RCVD ] Unmounting NFS filesystems
16:41:32 [RCVD ]
16:41:32 [INFO ] Got: [Unmounting NFS filesystems]
16:41:32 [INFO ] Case unknown: [Unmounting NFS filesystems]. Retrying...
16:41:34 [INFO ] Time limit: 16:43:51. Seconds remaining: 137
16:41:38 [RCVD ]
16:41:38 [RCVD ] Halting processes ...
16:41:38 [RCVD ]
16:41:38 [INFO ] Got: [Halting processes ...]
16:41:38 [INFO ] Halting processes ...
16:41:38 [INFO ] Time limit: 16:43:51. Seconds remaining: 133
16:41:41 [RCVD ] The system is down.
16:41:41 [RCVD ]
16:41:42 [INFO ] Got: [The system is down.]
16:41:42 [INFO ] The system is down.
16:41:42 [INFO ] Time limit: 16:43:51. Seconds remaining: 130
16:41:45 [INFO ] Timeout #1...
16:41:47 [INFO ] Time limit: 16:43:51. Seconds remaining: 124
16:41:51 [RCVD ] /proc: Invalid argument
16:41:51 [RCVD ] ....Halt completed....
16:41:51 [RCVD ] syncing disks... done
16:41:51 [RCVD ] CPU 0: Halting... (transferring to monitor)
16:41:51 [RCVD ]
16:41:51 [RCVD ] halted CPU 0
16:41:51 [RCVD ]
16:41:51 [RCVD ] halt code = 5
16:41:51 [RCVD ] HALT instruction executed
16:41:51 [RCVD ] PC = ffffffff0048a5f0
16:41:51 [RCVD ] P00>>>
16:41:51 [INFO ] Got: [P00>>>]
16:41:51 [INFO ] Sending 'power off'...
16:41:52 [INFO ] Service pluto is stopped
16:41:52 [INFO ] Script ended.

(question) RCVD messages correspond to the received data from the OPA0 console.

- Hide execution : False
18:14:03 [INFO ] - Maximum duration : 7 minutes 30 seconds
18:14:03 [INFO ] - Exec position#1 : c:\charon\myds20vms.ini
18:14:03 [INFO ] - Exec position#2 : c:\charon\pluto_tru64.ini (!)
18:14:03 [INFO ]
18:14:03 [INFO ] Check mode enabled.
18:14:03 [INFO ] 'opa0' will be used
18:14:03 [INFO ] Service 'pluto' is Running (Display name: pluto)
18:14:03 [INFO ] Using crypted password stored in 'C:\Charon\pluto_pwd.txt'.
18:14:03 [INFO ] No putty session active.
18:14:03 [INFO ] Connecting to OPA0 console, port 10005
18:14:03 [INFO ] Sending CRLF...
18:14:03 [INFO ] Time limit: 18:17:03. Seconds remaining: 180
18:14:06 [RCVD ]
18:14:06 [RCVD ] pluto5#
18:14:06 [RCVD ] pluto5#
18:14:06 [INFO ] Got: [pluto5# ]
18:14:06 [INFO ] Found prompt.
18:14:06 [INFO ] Check mode enabled: sending test command...
18:14:06 [INFO ] Command sent
18:14:11 [INFO ] Time limit: 18:17:03. Seconds remaining: 171
18:14:15 [RCVD ] /usr/bin/uname -a;echo RESULT=$?
18:14:15 [RCVD ] OSF1 pluto5 V5.1 2650 alpha
18:14:15 [RCVD ] RESULT=0
18:14:15 [INFO ] Remote command succeeded
18:14:15 [RCVD ] pluto5# pluto5#
18:14:15 [RCVD ] pluto5#
18:14:15 [INFO ] Got: [pluto5# ]
18:14:15 [INFO ] Check mode enabled: prompt found, disconnecting...
18:14:15 [INFO ] Check mode enabled: the service pluto will not be stopped
18:14:15 [INFO ] Service pluto is Running
18:14:15 [INFO ] Script ended.

(question) RCVD messages correspond to the received data from the OPA0 console.

Include Page
KBCOMMON:KB-GoToTop
KBCOMMON:KB-GoToTop

Div
classpagebreak


Shutdown execution - Tru64 example


Div
classcommandline

PS C:\Windows\system32>C:\charon\charon_cleanshutdown.ps1 -config C:\charon\pluto_tru64.ini

Charon clean shutdown


Name            Value
----            -----


cryptedpass     C:\Charon\pluto_pwd.txt
guestsystem     192.168.152.147
mode            opa0
os              Tru64
port            10005
prompt          pluto5#
servicename     pluto
timelimitsec    180
username        root


18:19:17 [INFO ] Using 'C:\Program Files\CHARON\Virtual Machines\pluto\pluto-SHUTDOWN-2020-06-02-18-19-17-000000000.log' as logfile / one log file per script execution
18:19:17 [INFO ] Defined symbolic link 'C:\Program Files\CHARON\Virtual Machines\pluto\pluto-SHUTDOWN.log'
18:19:17 [INFO ] Using 'C:\charon\pluto_tru64.ini' as configuration file
18:19:17 [INFO ] Execution date : 02-Jun-2020 18:19:17
18:19:17 [INFO ] Script version : 02-Jun-20 V2.1 (MD5: ED6D76E7CCC3F0016C34D88BADE4EC1A )
18:19:17 [INFO ] Powershell version : 5.1.18362.752
18:19:17 [INFO ] Computer name : WIN10-MAIN
18:19:17 [INFO ] Username : bruno
18:19:17 [INFO ] Windows version : Microsoft Windows 10 Pro
18:19:17 [INFO ] Administrator mode : True
18:19:17 [INFO ] Windows shutdown scripts:
18:19:17 [INFO ] - Hide execution : False
18:19:17 [INFO ] - Maximum duration : 7 minutes 30 seconds
18:19:17 [INFO ] - Exec position#1 : c:\charon\myds20vms.ini
18:19:17 [INFO ] - Exec position#2 : c:\charon\pluto_tru64.ini (!)
18:19:17 [INFO ]
18:19:17 [INFO ] 'opa0' will be used
18:19:17 [INFO ] Service 'pluto' is Running (Display name: pluto)
18:19:17 [INFO ] Using crypted password stored in 'C:\Charon\pluto_pwd.txt'.
18:19:17 [INFO ] No putty session active.
18:19:17 [INFO ] Connecting to OPA0 console, port 10005
18:19:17 [INFO ] Sending CRLF...
18:19:17 [INFO ] Time limit: 18:22:17. Seconds remaining: 180
18:19:21 [RCVD ]
18:19:21 [RCVD ] pluto5#
18:19:21 [RCVD ] pluto5#
18:19:21 [INFO ] Got: [pluto5# ]
18:19:21 [INFO ] Found prompt.
18:19:21 [INFO ] Send Tru64 shutdown...
18:19:21 [INFO ] Command sent
18:19:26 [INFO ] Time limit: 18:22:17. Seconds remaining: 171
18:19:29 [RCVD ] /sbin/init 0;echo RESULT=$?
18:19:29 [RCVD ] RESULT=0
18:19:29 [INFO ] Remote command succeeded
18:19:29 [RCVD ] pluto5# pluto5#
18:19:29 [RCVD ] pluto5#
18:19:29 [INFO ] Got: [pluto5# ]
18:19:29 [INFO ] Found prompt, waiting for shutdown to start or complete...
18:19:34 [INFO ] Time limit: 18:22:17. Seconds remaining: 163
18:19:38 [RCVD ]
18:19:38 [RCVD ] INIT: New run level: 0
18:19:38 [RCVD ] The system is coming down. Please wait...
18:19:38 [RCVD ] Logins disabled
18:19:38 [RCVD ] Stopping Zabbix agent...
18:19:38 [RCVD ]
18:19:38 [INFO ] Got: [Stopping Zabbix agent...]
18:19:38 [INFO ] Case unknown: [Stopping Zabbix agent...]. Retrying...
18:19:40 [INFO ] Time limit: 18:22:17. Seconds remaining: 157
18:19:43 [RCVD ] Zabbix agent stopped.
18:19:43 [RCVD ]
18:19:43 [INFO ] Got: [Zabbix agent stopped.]
18:19:43 [INFO ] Case unknown: [Zabbix agent stopped.]. Retrying...
18:19:45 [INFO ] Time limit: 18:22:17. Seconds remaining: 152
18:19:49 [RCVD ] LAT stopped.
18:19:49 [RCVD ] Unmounting NFS filesystems
18:19:49 [RCVD ] The interface tu0, does not exist.
18:19:49 [RCVD ]
18:19:49 [RCVD ] Halting processes ...
18:19:49 [RCVD ]
18:19:49 [INFO ] Got: [Halting processes ...]
18:19:49 [INFO ] Halting processes ...
18:19:49 [INFO ] Time limit: 18:22:17. Seconds remaining: 148
18:19:52 [INFO ] Timeout #1...
18:19:54 [INFO ] Time limit: 18:22:17. Seconds remaining: 143
18:19:58 [RCVD ] The system is down.
18:19:58 [RCVD ]
18:19:58 [INFO ] Got: [The system is down.]
18:19:58 [INFO ] The system is down.
18:19:58 [INFO ] Time limit: 18:22:17. Seconds remaining: 139
18:20:01 [INFO ] Timeout #1...
18:20:03 [INFO ] Time limit: 18:22:17. Seconds remaining: 134
18:20:07 [RCVD ] /proc: Invalid argument
18:20:07 [RCVD ] ....Halt completed....
18:20:07 [RCVD ] syncing disks... done
18:20:07 [RCVD ] CPU 0: Halting... (transferring to monitor)
18:20:07 [RCVD ]
18:20:07 [RCVD ] halted CPU 1
18:20:07 [RCVD ]
18:20:07 [RCVD ]
18:20:07 [RCVD ] halted CPU 0
18:20:07 [RCVD ]
18:20:07 [RCVD ] halt code = 5
18:20:07 [RCVD ] HALT instruction executed
18:20:07 [RCVD ] PC = fffffc00006bde70
18:20:07 [RCVD ] P00>>>
18:20:07 [INFO ] Got: [P00>>>]
18:20:07 [INFO ] Sending 'power off'...
18:20:08 [INFO ] Service pluto is stopped
18:20:08 [INFO ] Script ended.

(question) RCVD messages correspond to the received data from the OPA0 console.

Shutdown execution - VMS example


Div
classcommandline

PS C:\Windows\system32>C:\charon\charon_cleanshutdown.ps1 -config C:\charon\myds20vms.ini

Charon clean shutdown

Name            Value
----            -----


cryptedpass     C:\Charon\myds20vms_cryptpass.txt
mode            opa0
os              VMS
port            10007
prompt          VMS084>
servicename     ds20vms
timelimitsec    180
username        system
waitbeforestop  10
windowheight    50
windowwidth     132


18:24:38 [INFO ] Using 'C:\Program Files\CHARON\Virtual Machines\ds20vms\ds20vms-SHUTDOWN-2020-06-02-18-24-38-000000000.log' as
log file / one log file per script execution
18:24:38 [INFO ] Defined symbolic link 'C:\Program Files\CHARON\Virtual Machines\ds20vms\ds20vms-SHUTDOWN.log'
18:24:38 [INFO ] Using 'C:\charon\myds20vms.ini' as configuration file
18:24:38 [INFO ] Execution date : 02-Jun-2020 18:24:38
18:24:38 [INFO ] Script version : 02-Jun-20 V2.1 (MD5: ED6D76E7CCC3F0016C34D88BADE4EC1A )
18:24:38 [INFO ] Powershell version : 5.1.18362.752
18:24:38 [INFO ] Computer name : WIN10-MAIN
18:24:38 [INFO ] Username : bruno
18:24:38 [INFO ] Windows version : Microsoft Windows 10 Pro
18:24:38 [INFO ] Administrator mode : True
18:24:38 [INFO ] Windows shutdown scripts:
18:24:38 [INFO ] - Hide execution : False
18:24:38 [INFO ] - Maximum duration : 7 minutes 30 seconds
18:24:38 [INFO ] - Exec position#1 : c:\charon\myds20vms.ini (!)
18:24:38 [INFO ] - Exec position#2 : c:\charon\pluto_tru64.ini
18:24:38 [INFO ]
18:24:38 [INFO ] 'opa0' will be used
18:24:38 [INFO ] Service 'ds20vms' is Running (Display name: ds20vms)
18:24:38 [INFO ] Using crypted password stored in 'C:\Charon\myds20vms_cryptpass.txt'.
18:24:38 [INFO ] No putty session active.
18:24:38 [INFO ] Connecting to OPA0 console, port 10007
18:24:38 [INFO ] Sending CRLF...
18:24:38 [INFO ] Time limit: 18:27:38. Seconds remaining: 180
18:24:42 [RCVD ]
18:24:42 [RCVD ]
18:24:42 [RCVD ] Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4
18:24:42 [RCVD ]
18:24:42 [RCVD ] Username:
18:24:42 [INFO ] Got: [Username: ]
18:24:42 [INFO ] Sending VMS username...
18:24:42 [INFO ] Username sent
18:24:42 [INFO ] Time limit: 18:27:38. Seconds remaining: 176
18:24:45 [RCVD ] system
18:24:45 [RCVD ] Password:
18:24:45 [INFO ] Got: [Password: ]
18:24:45 [INFO ] Sending password, try #1 of 3
18:24:45 [INFO ] Password sent
18:24:47 [INFO ] Time limit: 18:27:38. Seconds remaining: 171
18:24:51 [RCVD ]
18:24:51 [RCVD ] Welcome to OpenVMS (TM) Alpha Operating System, Version V8.4
18:24:51 [RCVD ] Last interactive login on Tuesday, 2-JUN-2020 17:23:59.38
18:24:51 [RCVD ] Last non-interactive login on Friday, 15-MAY-2020 11:34:51.97[c\Z
18:24:51 [INFO ] Got: [ Last non-interactive login on Friday, 15-MAY-2020 11:34:51.97[c\Z]
18:24:51 [INFO ] Case unknown: [ Last non-interactive login on Friday, 15-MAY-2020 11:34:51.97[c\Z]. Retrying...
18:24:53 [INFO ] Time limit: 18:27:38. Seconds remaining: 165
18:24:56 [RCVD ] [0c
18:24:56 [INFO ] Got: [[0c]
18:24:56 [INFO ] Case unknown: [[0c]. Retrying...
18:24:58 [INFO ] Time limit: 18:27:38. Seconds remaining: 160
18:25:02 [RCVD ]
18:25:02 [RCVD ] %SET-W-NOTSET, error modifying OPA0:
18:25:02 [RCVD ] -SET-I-UNKTERM, unknown terminal type[c\Z
18:25:02 [INFO ] Got: [-SET-I-UNKTERM, unknown terminal type[c\Z]
18:25:02 [INFO ] Case unknown: [-SET-I-UNKTERM, unknown terminal type[c\Z]. Retrying...
18:25:04 [INFO ] Time limit: 18:27:38. Seconds remaining: 154
18:25:07 [RCVD ] [0c
18:25:07 [INFO ] Got: [[0c]
18:25:07 [INFO ] Case unknown: [[0c]. Retrying...
18:25:09 [INFO ] Time limit: 18:27:38. Seconds remaining: 149
18:25:13 [RCVD ]
18:25:13 [RCVD ] %SET-W-NOTSET, error modifying OPA0:
18:25:13 [RCVD ] -SET-I-UNKTERM, unknown terminal type
18:25:13 [RCVD ] VMS084>
18:25:13 [INFO ] Got: [ VMS084> ]
18:25:13 [INFO ] Found prompt.
18:25:13 [INFO ] Sending VMS shutdown...
18:25:13 [INFO ] Command sent
18:25:18 [INFO ] Time limit: 18:27:38. Seconds remaining: 140
18:25:21 [RCVD ] @SYS$MANAGER:CHARON_SHUTDOWN.COM
18:25:21 [RCVD ] $ PURGE /KEEP=20 SYS$MANAGER:CHARON_SHUTDOWN.LOG
18:25:21 [RCVD ] $ RUN /DETACH SYS$SYSTEM:LOGINOUT.EXE /INPUT=SYS$MANAGER:CHARON_SHUTDOWN -
18:25:21 [RCVD ] /OUTPUT=SYS$MANAGER:CHARON_SHUTDOWN.LOG /UIC=[1,4]
18:25:21 [RCVD ] %RUN-S-PROC_ID, identification of created process is 00000125
18:25:21 [RCVD ] $ ENDIF
18:25:21 [RCVD ] $ ENDIF
18:25:21 [RCVD ] $ EXIT
18:25:21 [RCVD ] VMS084>
18:25:21 [RCVD ]
18:25:21 [RCVD ]
18:25:21 [RCVD ] SHUTDOWN -- Perform an Orderly System Shutdown
18:25:21 [RCVD ] on node VMS084
18:25:21 [RCVD ]
18:25:21 [RCVD ]
18:25:21 [RCVD ] %SHUTDOWN-I-OPERATOR, this terminal is now an operator's console
18:25:21 [RCVD ] %SHUTDOWN-I-DISLOGINS, interactive logins will now be disabled
18:25:21 [RCVD ] %SET-I-INTSET, login interactive limit = 0, current interactive value = 1
18:25:21 [RCVD ] %SHUTDOWN-I-STOPQUEUES, the queues on this node will now be stopped
18:25:21 [RCVD ]
18:25:21 [RCVD ] SHUTDOWN message on VMS084 from user SYSTEM at VMS084 Batch 17:25:30
18:25:21 [RCVD ] VMS084 will shut down in 0 minutes; back up LATER. Please log off node VMS084.
18:25:21 [RCVD ] SHUTDOWN
18:25:21 [RCVD ]

... (truncated)
18:25:22 [RCVD ] %%%%%%%%%%% OPCOM 2-JUN-2020 17:25:33.68 %%%%%%%%%%%
18:25:22 [RCVD ] Message from user SYSTEM on VMS084
18:25:22 [RCVD ] %SECSRV-I-SERVERSHUTDOWN, security server shutting down
18:25:22 [RCVD ]
18:25:22 [RCVD ] VMS084>
18:25:22 [INFO ] Got: [ VMS084> ]
18:25:22 [INFO ] Found prompt, waiting for shutdown to start or complete...

16

18:

48

25:

47

27 [INFO ] Time limit:

16

18:

51

27:

09

38. Seconds remaining:

142

131

16

18:

48

25:

51

30 [RCVD ]

16

18:

48

25:

51 16:48:51

30 [RCVD ] SYSTEM SHUTDOWN COMPLETE



18:25:30 [RCVD ]
18:25:30 [RCVD ]
18:25:30 [RCVD ]

16

18:

48

25:

51

30 [RCVD ] halted CPU 0

16

18:

48

25:

51

30 [RCVD ]

16

18:

48

25:

51

30 [RCVD ] halt code = 5

16

18:

48

25:

51

30 [RCVD ] HALT instruction executed

16

18:

48

25:

51

30 [RCVD ] PC = ffffffff8008fa84

16

18:

48

25:

51

30 [RCVD ] P00>>>

16

18:

48

25:

51

30 [INFO ] Got: [P00>>>]

16

18:

48

25:

51

30 [INFO ] Sending 'power off'...

16

18:

48

25:

52

31 [INFO ] Service ds20vms is stopped

16

18:

48

25:

52

31 [INFO ] Script ended.


(question) RCVD messages correspond to the received data from the OPA0 console.

Include Page
KBCOMMON:KB-GoToTop
KBCOMMON:KB-GoToTop