With the 18.104.22.168 release of System Automation Application Manager, the capability to manage virtual guests on zEnterprise hardware has been introduced. This allows the SA Application Manager to start and stop virtual servers hosted inside the zEnterprise Ensemble.
As this functionality is not only available via the graphical interfaces but also for the command line, our team developed some sample scripts, written in PERL, to show several possibilities of eezcs scripting. You can also browse our manuals for detailed description of the new commands connect, lsnode, and nodereq.
Description: This script will accept one virtual server name (as it is shown in the zEnterprise HMC interface) and search for the mapping to a hostname in the domains known to the e2e manager. Once found the matching server is printed to STDOUT. If you want to adapt this script for later use, you should probably use it as a starting point for a general use method and instead return the name of the hostname to the caller.
Idea: Possibly you want to stop a VirtualServer, with the hostname available to you, you are able to exclude that node before stopping it.
Description: This script will accept one hypervisor name (as it is shown in the zEnterprise HMC interface) and search for all mappings to hostnames in the domains known to the e2e manager. At the end all matches are printed to STDOUT. If you want to adapt this script for later use, you should probably use it as a starting point for a general use method and instead return the names of the hostnames to the caller.
Idea: Use this script to determine all hostnames for preparation tasks prior to a hypervisor shutdown, or determine whether your applications are sufficiently spread over multiple hypervisors.
Description: This script will accept one hostname, a timeout (in seconds), and a resource name (fully qualified). It will then start to search for the hostname in the connected domains. On the first match, the node will be started in that domain. The script will wait until the node is online in the automation domain it connected to. Afterwards a resource (identified by the third parameter) will be started.
Idea: Tthis script can be used inside a large system bringup, managing the relationship from soft- to hardware.
Description: This script accepts one e2e resource reference or group name. It will start all servers necessary for this e2e resource, wait until they are operational and then start the e2e resource. This script uses a fixed timeout for each startWait operation of 10 minutes.
Idea: This script shows an example of a complete dependency, from hardware, to first-level-automation domain applications, to an end-to-end-reference.
Download the complete package from our Wiki
Feedback on any of the scripts, new ideas for scripts and questions about other tasks is very welcome in our forum