This is the first in a series of blog posts dedicated to SAP Landscape Virtualization Management (LVM) and aims to provide a quick overview of how you can customize SAP LVM to detect and manage custom instances on hosts within your SAP and non-SAP estate. Although the details provided show how this can be achieved in a UNIX environment, it can be easily adapted for the Windows platform.

SAP LVM can be setup to manage SAP instances and databases using the SAP Host Agent. This is standard with out-of-the-box SAP LVM Standard Edition and is free to all SAP customers owning at least one active SAP application license.

SAP LVM can be extended to manage custom instances such as SAP Replication Server (SRS), SAP Business Objects and other non-SAP products via the SAP Host Agent. If you know how to detect/identify a software component on a host (e.g. by a particular process running or existence of a particular file system or binary), then there’s a good chance you’ll be able to manage it with SAP LVM.

Custom instances are managed using scripts registered with the SAP Host Agent running on the server hosting the custom instance. If this has not been installed, you will be required to this before being able to manage the custom instance.

Generic Operations for Custom Instances

For each custom instance type that you want to manage within SAP LVM you must create a set of generic pre-defined operations as follows:

  • Detect
  • Monitor
  • Start/Stop
  • Validate
  • Attach/Detach
  • Getproperties

To operate a custom instance, the minimum requirement is to configure the detect, monitor and start/stop operations.

Scripts for Generic Operations

The generic operations are defined in text configuration files stored in the exe/operations.d subdirectory of the host agent file system on the managed host. Each generic operation configuration file must use the following naming convention:

  • Detect – acc_<custominstance-type>_list
  • Monitor – acc_<custominstance-type>_monitor
  • Start – acc_<custominstance-type>_start
  • Stop – acc_<custominstance-type>_stop
  • Validate – acc_<custominstance-type>_validate
  • Attach – acc_<custominstance-type>_attach
  • Detach – acc_<custominstance-type>_detach
  • Getproperties – acc__<custominstance-type>_getproperties

As previously mentioned, the minimum requirement is to configure the detect, monitor and start/stop configuration files. You must therefore have at minimum the first four listed files present in the exe/operations.d subdirectory of the host agent file system on the managed host.

Example for SRS – Overview

To illustrate the setup of a custom instance in SAP LVM, we will use the SAP Replication Server (SRS) as an example. SRS operations have not yet been included as standard with SAP LVM and must be setup as a custom instance.

For the setup, we need to create the configuration files described above and the underlying operating system scripts. The configuration files are text files that are registered with the SAP Host Agent; the operating system scripts contain the actual coding to perform the operations and can be written in any preferred scripting language applicable to your platform – e.g. Korn.

There should be one configuration file for each operating system script. Each configuration file should reference an operating system script that performs the corresponding operation.

The script communicates results of operations back to SAP LVM by echoing strings with pre-defined prefixes. Positive responses are reported back to SAP LVM by echoing a string starting with [RESULT]; negative responses are reported to SAP LVM by echoing a string starting with [ERROR]. All responses returned by the operating system scripts are visible in the SAP LVM log to aid debugging and provide an audit trail.

For this example, we will configure the following configuration files:

  • Detect – acc_SRS_list.conf
  • Monitor – acc_SRS_monitor.conf
  • Start – acc_SRS_start.conf
  • Stop – acc_SRS_stop.conf

For the script, we assume a file system named /sap/scripts (or similar) is used to house the scripts.


Example for SRS – Configuration

Included here are required configuration files for the detect, monitor and stop/start operations. The important parameters here are the “Name” and “Command”. The “Name” must be in the standard SAP LVM format discussed previously and the “Command” should specify the full path to the appropriate operating script.

Sample Configuration File for Detect Operation (acc_SRS_list.conf)

Sample Configuration File for Monitor Operation (acc_SRS_monitor.conf)

Sample Configuration File for Start Operation (acc_SRS_start.conf)

Sample Configuration File for Stop Operation (acc_SRS_stop.conf)

Example for SRS – Scripting

Included here are extracts from three Korn scripts for the detect, monitor and stop/start operations. Site specific validations and checks should be performed before this coding extract but this shows the important coding which performs the actual functions it is written for.

Sample Coding for Detect Operation (Custom_Instance_SRS_Detect.ksh)

Sample Coding for Monitor Operation (Custom_Instance_SRS_Monitor.ksh)

Sample Coding for Stop/Start Operations (Custom_Instance_SRS_Operate.ksh)

Useful Links

Configuring Custom Instances

If you’d like to learn more about the capabilities of SAP LVM or SAP LaMa or are considering your own deployment, drop us a line with no obligation