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 12 Next »

Contents

Required parameters

ParameterValueExample
logfileFull path to the logfile that will be used to log the script output.logfile=C:\Charon\myds20vms_shutdown.log
waitbeforestopNumber of seconds to wait before stopping the service once the guest operating system no longer responds to 'ping'. If not set, default value = 60.waitbeforestop=10
servicenameCHARON instance service nameservicename=myds20vms
servernameServer name or IP addressservername=10.0.0.3
osVMS or Tru64os=VMS
modershmode=rsh
rshbinDefines the location of the "rsh.exe" program.rshbin=C:\bin\rsh.exe
usernameDefines the remote username that will be used to connect to the guest operating system via rsh.

username=system

Enabling remote connection on Tru64

To allow connections from the Windows server to the Tru64 guest system without having to specify a password, the Tru64 local account's .rhosts file has to be updated with the server name or IP address of the Windows system and the account used.

The .rhosts file contains a list of remote users who are not required to supply a login password when they use the local user account and execute the rcp, rlogin, and rsh commands (see "# man rhosts" for more).

(info) In the example below, a proxy will be created between the Windows 'administrator' account (the IP address of the Windows system is 10.0.0.1) and the Tru64 'root' account (the IP address of the Tru64 system is 10.0.0.2).

# vi $HOME/.rhosts

10.0.0.1 Administrator

Enabling remote connection on OpenVMS

Enable the REXEC and RSH service on OpenVMS by executing the TCPIP$CONFIG script (depending on the OpenVMS version, the script could also be called UCX$CONFIG):

VMS084> @sys$manager:tcpip$config

 

        Checking TCP/IP Services for OpenVMS configuration database files.

 

 

        HP TCP/IP Services for OpenVMS Configuration Menu

 

        Configuration options:

 

                 1  -  Core environment

                 2  -  Client components

                 3  -  Server components

                 4  -  Optional components

 

                 5  -  Shutdown HP TCP/IP Services for OpenVMS

                 6  -  Startup HP TCP/IP Services for OpenVMS

                 7  -  Run tests

 

                 A  -  Configure options 1 - 4

                [E] -  Exit configuration procedure

 

Enter configuration option: 2

 

        HP TCP/IP Services for OpenVMS Client Components Configuration Menu

 

        Configuration options:

 

                 1  -  DHCP Client      Disabled Stopped

                 2  -  FTP Client       Disabled Stopped

                 3  -  NFS Client       Disabled Stopped

                 4  -  REXEC and RSH    Disabled Stopped

                 5  -  RLOGIN           Disabled Stopped

                 6  -  SMTP             Disabled Stopped

                 7  -  SSH Client       Disabled Stopped

                 8  -  TELNET           Enabled  Started

                 9  -  TELNETSYM        Disabled Stopped

 

                 A  -  Configure options 1 - 9

                [E] -  Exit menu

 

Enter configuration option: 4

 

RSH Configuration

 

Service is defined in the SYSUAF.

Service is defined in the TCPIP$SERVICE database.

Service is not enabled.

Service is stopped.

 

        RSH configuration options:

 

                 1 - Enable service on this node

 

                 2 - Enable & Start service on this node

 

                [E] - Exit RSH configuration

 

Enter configuration option: 2

%TCPIP-I-INFO, image SYS$SYSTEM:TCPIP$RSH.EXE installed

%TCPIP-I-INFO, image SYS$SYSTEM:TCPIP$RCP.EXE installed

%TCPIP-I-INFO, logical names created

%%%%%%%%%%%  OPCOM   8-JUL-2016 01:28:23.22  %%%%%%%%%%%

Message from user INTERnet on VMS084

INTERnet ACP Activate RSH Server

 

%TCPIP-I-INFO, service enabled

%TCPIP-S-STARTDONE, TCPIP$RSH startup completed

Press <ENTER> key to continue ...

 

REXEC Configuration

 

Service is not defined in the SYSUAF.

Service is not defined in the TCPIP$SERVICE database.

Service is not enabled.

Service is stopped.

 

        REXEC configuration options:

 

                 1 - Enable service on this node

 

                 2 - Enable & Start service on this node

 

                [E] - Exit REXEC configuration

Enter configuration option: 2

...

        HP TCP/IP Services for OpenVMS Client Components Configuration Menu

 

        Configuration options:

 

                 1  -  DHCP Client      Disabled Stopped

                 2  -  FTP Client       Disabled Stopped

                 3  -  NFS Client       Disabled Stopped

                 4  -  REXEC and RSH    Enabled  Started

                 5  -  RLOGIN           Disabled Stopped

                 6  -  SMTP             Disabled Stopped

                 7  -  SSH Client       Disabled Stopped

                 8  -  TELNET           Enabled  Started

                 9  -  TELNETSYM        Disabled Stopped

 

                 A  -  Configure options 1 - 9

                [E] -  Exit menu

 

Enter configuration option: E

Check that the service is enabled:

VMS084> tcpip show service

 

Service             Port  Proto    Process          Address            State

 

RSH                  514  TCP      TCPIP$RSH        0.0.0.0             Enabled

SSH                   22  TCP      TCPIP$SSH        0.0.0.0             Enabled

TELNET                23  TCP      not defined      0.0.0.0             Enabled

To allow connection from the Windows server to the OpenVMS guest system without specifying a password, a proxy must be created between the Windows user that will execute the 'rsh' command and the OpenVMS user account:

(info) In the example below, a proxy will be created between the Windows 'administrator' account (the IP address of the Windows system is 10.0.0.1) and the OpenVMS 'system' account (the IP address of the OpenVMS system is 10.0.0.3)

VMS084> tcpip

TCPIP> add proxy system /remote=administrator /host=10.0.0.1

TCPIP> show proxy

 

VMS User_name     Type      User_ID    Group_ID   Host_name

 

SYSTEM            CD     ADMINISTRATOR            10.0.0.1

 

Example

Configuration file

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

# myds20 OpenVMS 8.4 machine

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

logfile=C:\Charon\myds20vms_shutdown.log

waitbeforestop=10

servername=10.0.0.3

servicename=myds20vms

os=VMS

mode=rsh

rshbin=C:\bin\rsh.exe

username=system

Script execution

Check mode

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

 

Name                           Value

----                           -----

mode                           rsh

servicename                    myds20vms

servername                     10.0.0.3

waitbeforestop                 10

os                             VMS

username                       system

rshbin                         C:\bin\rsh.exe

logfile                        C:\Charon\myds20vms_shutdown.log

 

20160808:132716:INFO :0: Using 'C:\Charon\myds20vms_shutdown.log' as log file / append

20160808:132716:INFO :0: Check mode enabled.

20160808:132716:INFO :0: 'rsh' will be used

20160808:132716:INFO :0: Service 'myds20vms' is Running (Display name: myds20vms)

20160808:132716:INFO :0: Testing server '10.0.0.3' response

20160808:132719:INFO :0: Invoking 'rsh' command and executing check command...

20160808:132719:INFO :0: Output results:

20160808:132719:INFO :0: RSH was successful

20160808:132719:INFO :0:

20160808:132719:INFO :0:

20160808:132719:INFO :0: Command successfully completed.

20160808:132719:INFO :0: Check mode, no connection test to be performed.

20160808:132719:INFO :0: Check mode, no wait / stop service.

20160808:132719:INFO :0: Check mode, the service myds20vms will not be stopped

20160808:132719:INFO :0: Service is Running

20160808:132719:INFO :0: Done.

Shutdown execution

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

 

Name                           Value

----                           -----

mode                           rsh

servicename                    myds20vms

servername                     10.0.0.3

waitbeforestop                 10

os                             VMS

username                       system

rshbin                         C:\bin\rsh.exe

logfile                        C:\Charon\myds20vms_shutdown.log

 

20160808:134256:INFO :0: Using 'C:\Charon\myds20vms_shutdown.log' as log file / append

20160808:134256:INFO :0: 'rsh' will be used

20160808:134256:INFO :0: Service 'myds20vms' is Running (Display name: myds20vms)

20160808:134256:INFO :0: Testing server '10.0.0.3' response

20160808:134259:INFO :0: Invoking 'rsh' command and executing shutdown...

20160808:134259:INFO :0: Output results:

20160808:134259:INFO :0: $   PURGE /KEEP=20 SYS$MANAGER:CHARON_SHUTDOWN.LOG

20160808:134259:INFO :0:

20160808:134259:INFO :0: $   RUN /DETACH SYS$SYSTEM:LOGINOUT.EXE /INPUT=SYS$MANAGER:CHARON_SHUTDOWN -

20160808:134259:INFO :0:

20160808:134259:INFO :0:         /OUTPUT=SYS$MANAGER:CHARON_SHUTDOWN.LOG /UIC=[1,4]

20160808:134259:INFO :0:

20160808:134259:INFO :0: %RUN-S-PROC_ID, identification of created process is 0000014A

20160808:134259:INFO :0:

20160808:134259:INFO :0: $ ENDIF

20160808:134259:INFO :0:

20160808:134259:INFO :0: $ EXIT

20160808:134259:INFO :0:

20160808:134259:INFO :0: $

20160808:134259:INFO :0:

20160808:134259:INFO :0: $ !

20160808:134259:INFO :0:

20160808:134259:INFO :0: $ ! Force any output to the standard output socket.

20160808:134259:INFO :0:

20160808:134259:INFO :0: $ ! Most useful when client is Un*x.

20160808:134259:INFO :0:

20160808:134259:INFO :0: $ !

20160808:134259:INFO :0:

20160808:134259:INFO :0: $    WRITE SYS$OUTPUT ""

20160808:134259:INFO :0:

20160808:134259:INFO :0:

20160808:134259:INFO :0:

20160808:134259:INFO :0: $

20160808:134259:INFO :0:

20160808:134259:INFO :0: $    IF (RSHD$ERROR .NES. RSHD$INPUT_OUTPUT)

20160808:134259:INFO :0:

20160808:134259:INFO :0: $    ENDIF

20160808:134259:INFO :0:

20160808:134259:INFO :0: $

20160808:134259:INFO :0:

20160808:134259:INFO :0: $ ! SS_NORMAL, RSH was succcessful, command should send its error over net.

20160808:134259:INFO :0:

20160808:134259:INFO :0: $    EXIT 1

20160808:134259:INFO :0: Command successfully completed.

20160808:134302:INFO :0: Testing connection to '10.0.0.3' = True

20160808:134325:INFO :0: Testing connection to '10.0.0.3' = False

20160808:134335:INFO :0: Sleeping for 10 seconds...

20160808:134345:INFO :0: Stopping service myds20vms

20160808:134345:INFO :0: Service is Stopped

20160808:134345:INFO :0: Done.

  • No labels