Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Display output example from the "vmlist" command:

Status
colourYellow
titleTODO

Note

If the script has been initialized and a new virtual machine is added, it must be edited for the case related to the new configuration file to be added otherwise the "Invalid parameter" case will be displayed (this does not prevent the script from running).

...

(lightbulb) In this example, "ssh" is used to display the guest "uptime" for a Tru64 UNIX guest and "rsh" is used to write the boot time of an OpenVMS guestthe rp7400 HP-UX system.

(warning) The last 2 lines containing the RETVAL variable are mandatory.

Example:

#!/bin/sh
#
case "$1"
in
  
  /charoncharonRP7400/plutorp7400.cfg)
    
ssh -o ConnectTimeout=2 pluto5 rp7400 "uptime|cut -f1 -d','" 2>/dev/null
    
RETVAL=$?
    
;;
  
/charon/myds20vms.cfg)
    
rsh -l system ds20vms 'write sys$output "Booted ",f$getsyi("boottime")' #rsh rp7400 "uptime|cut -f1 -d','" 2>/dev/null
    
RETVAL=$?
        ;;
  *)
    
echo "Invalid parameter '$1'"
    
RETVAL=1
    
;;
esac
echo "==RETVAL=${RETVAL}=="
exit ${RETVAL}

...