Your Browser is not longer supported

Please use Google Chrome, Mozilla Firefox or Microsoft Edge to view the page correctly
Loading...

{{viewport.spaceProperty.prod}}

Automating VM2000 and VM administration

&pagelevel(4)&pagelevel

VM2000 offers many different options for automating the administration of the virtual machines and the whole VM2000 system.


Routine tasks

Recurring tasks can be automated under VM2000 through:

  • S procedures (software product SDF-P)
    These extend the command language of BS2000 to a programming language. If used under a user ID in the monitor system with the appropriate privilege, S procedures can contain BS2000 and VM2000 commands. With the OPERATING privilege, they can also contain BS2000 operator commands.

    VM2000 supports administration via S procedures through:

    For an example of an S procedure under VM2000, see below. In this procedure, return codes and SHOW outputs in S variables are processed.

  • BS2000 procedures (non-S procedures)
    These can be called by the VM2000 or VM administrator with the BS2000 command /CALL-PROCEDURE or /ENTER-PROCEDURE from a privileged user task, see section "Operating the virtual machines (ADMIN dialog from user task)". These BS2000 procedures contain BS2000 and VM2000 commands. If they are used under a user ID with the OPERATING privilege, they can also contain BS2000 operator commands.

  • RUN files
    These can be called by the VM2000 administrator with /RUN from a BS2000 console in the monitor system.
    RUN files contain VM2000 commands and BS2000 operator commands.

  • VM2000 procedures
    These can be used by the VM2000 or VM administrator in the ADMIN dialog via $VMCONS, see "CALL-VM-PROCEDURE (Start a VM2000 procedure file)".
    VM2000 procedures contain VM2000 commands.

  • Persistent VM definitions
    A persistent VM definition is also available to a Server Unit after a reboot. With its help a persistent VM is set up again and restarted immediately when the corresponding specification is provided in the AUTO-IPL parameter. See section "Working with VM definitions".

  • Backup file for the VM2000 configuration
    You can back up the current VM2000 configuration to a file and restore the backed-up VM2000 configuration after the overall VM2000 system has been (re)started, see "Backing up and restoring the VM2000 configuration".


Monitoring with job variables

The routine monitoring of virtual machines, of main memory reconfigurations and of VM Migrations can be automated under VM2000 by using job variables (MONJVs), see "Monitoring a VM with job variables (MONJV)", "Monitoring a VM Migration with job variables (MONJV)" and "Reconfiguring main memory". You will find sample applications there.


Asynchronous events

The reaction to asynchronous events can be automated under VM2000. For this purpose, certain messages which are important for event-controlled automation are always output via routing code “9”.

Regardless of whether a VM2000 administrator exists (ADMIN dialog with monitor VM), the following messages are sent for the VM2000 administrator, always using routing code “9”.

VMS0021   VMS0024   VMS0025   VMS0026   VMS0027   VMS2011   VMS2023   VMS2033
VMS2037   VMS2050   VMS2051   VMS2052   VMS2053   VMS2100   VMS2104   VMS2411 -
VMS2422   VMS2424   VMS2425   VMS2430 - VMS2434   VMS2440 - VMS2444   VMS2450 -
VMS2452   VMS4065   VMS4066   VMS4075   VMS4077   VMS4094   VMS4095   VMS4342
VMS4343   VMS4344   VMS4510   VMS4511   VMS4512   VMS4514   VMS4515   VMS4551
VMS4552   VMS4553   VMS4554   VMS4555   VMS4556   VMS4557   VMS4558   VMS4559
VMS4560   VMS4561   VMS4562   VMS4563   VMS4564   VMS4620   VMS4621   VMS4910
VMS4912   VMS6002   VMS6003   VMS6018   VMS6020   VMS6021   VMS6023   VMS6094

The following products can receive these messages and react automatically to the events associated with them:

  • OMNIS-PROP, a special exit routine of the product OMNIS, see the “OMNIS” manual [12].

    OMNIS-PROP allows you to declare times, time intervals and system messages as events. When these events occur, OMNIS-PROP activates administration procedures which perform operator tasks. To use OMNIS-PROP, you must have some knowledge of Assembler.

  • PROP-XT, a software product used in data center automation, see the “PROP-XT” manual [15].

    PROP-XT allows programmed operating by means of administration procedures which were created with the convenient language resources of SDF-P.

    Administration procedures can thus implement via PROP-XT an event-driven VM2000 administration in parallel with the synchronous command processing in S procedures. $VMCONS or a logical console are set up as the administration object under PROP-XT. Via this connection, the asynchronous messages are received by VM2000 and assigned an automated reaction, see the example.

    Up to 15 VM administrators per VM can begin the ADMIN dialog with the VM from different privileged user tasks. Several PROP-XT administration procedures can thus be used in parallel with the conventional VM or VM2000 administration for the automation of VM2000 operation.

 

Example

The following S procedure shows the use of PROP-XT for VM2000 administration in conjunction with a reconfiguration of the main memory. For an analogous sample procedure using MONJV, see "Reconfiguring main memory".

/SET-PROC-OPT
/" **************************************************************"
/" ** PROCEDURE VMMEM FOR GUEST SYSTEMS WITH VM-ID=2 AND 3 ******"
/" **************************************************************"
/" ** THE PROCEDURE PERFORMS A MEMORY RECONFIGURATION.           "
/" ** THE ASYNCHRONOUS TERMINATION MESSAGES ARE PROCESSED        "
/" ** VIA PROP-XT.                                               "
/" ** IMPORTANT STEPS:                                           "
/" ** - ESTABLISH CONNECTION TO PROP-XT                          "
/" ** - CONNECTION TO VM2000 ESTABLISHED                         "
/" ** - CHECK CURRENT MEMORY SIZE                                "
/" ** - REDUCE MEMORY OF VM2                                     "
/" ** - HANDLE ASYNCHRONOUS END VIA PROP-XT                      "
/" ** - EXTEND MEMORY OF VM3                                     "
/" ** - HANDLE ASYNCHRONOUS END VIA PROP-XT                      "
/" ** - SHUT DOWN CONNECTION TO PROP-XT                          "
/" ** - DISCONNECTION FROM VM2000                                "
/" **************************************************************"
/" **************************************************************"
/DECLARE-VARIABLE NAME=SYSPOP(TYPE=STRUCTURE)
/DECLARE-VARIABLE NAME=SHVAS(TYPE=STRUCTURE),MULT-E=*LIST
/DECLARE-VARIABLE NAME=MIMEMSI(TYP=INT)
/DECLARE-VARIABLE NAME=TXT(TYPE=STRING,INIT-VALUE='OK')
/DECLARE-VARIABLE NAME=CONT(TYPE=BOOLEAN,INIT-VAL=TRUE)
/ASSIGN-SYSLST LST.VMMEM
/MODIFY-JOB-OPTIONS LOG=*PAR(LIST=Y)
/BEGIN-BLOCK
/START-SUBSYSTEM PROP-XT,SYNC=Y
/IF-CMD-ERROR;END-IF
/"** LOG ON TO PROP-XT *       "
/BEGIN-PROP-PROCESS VMMEM
/"** ESTABLISH CONNECTION                      "TO LOCAL UCON *
/START-PROP-OBJECT-MON OBJ-NAME=CONSOLE,OBJECT=*OPER/
 (OPERATOR-ROLE=SYSADM)
/IF (SYSPOP.MAINCODE <> '0000')
/ TXT = 'ERROR IN START-P-O-M CONSOLE ** RC: &(SYSPOP.MAINCODE)'
/ GOTO LABEL=ERROR
/END-IF
/"** LOG EVENTS TO PROP-XT                                            "
/"** VM2000 REPORTS EXECUTION OF THE COMMAND TO THE CONSOLE           "
/"** ASYNCHRONOUSLY WITH VMS4094 (POSITIVE ACKNOWLEDGMENT) OR VMS4095 "
/"** (NEGATIVE ACKNOWLEDGMENT). THEREFORE WAIT EXPLICITLY FOR THESE   "
/"** TWO MESSAGES  (THEREFORE: LOG ON AS EVENTS!).                    "
/START-PROP-EVENT-MON EV-NAME=VMS4094,SELECT-EV=*FROM-OBJ(/
 OBJ-NAME=CONSOLE,EVENT-DATA=*SYSTEM-MSG(MSG-ID=VMS4094))
/START-PROP-EVENT-MON EV-NAME=VMS4095,SELECT-EV=*FROM-OBJ(/
 OBJ-NAME=CONSOLE,EVENT-DATA=*SYSTEM-MSG(MSG-ID=VMS4095))
/BEGIN-VM-DIALOG VM-ID=1        "ESTABLISH CONNECTION TO VM2000  "
/"** CHECK CURRENT MEMORY SIZE             "
/EXEC-CMD (SHOW-VM-ATTR VM-ID=2,INF=*MEMORY),STRUCT-OUT=SHVAS
/IF (SHVAS#.MIN-MEM-SIZE = '*UNDEF')
/ TXT = 'MEMORY CONFIGURATION CURRENTLY NOT POSSIBLE FOR VM-ID=2'
/ GOTO LABEL=ERROR
/END-IF
/MIMEMSI=INT(SHVAS#.MIN-MEM-SIZE)
/IF (SHVAS#.MEM-SIZE = MIMEMSI)
/ TXT = 'CURRENT MEMORY SIZE IS MINIMUM MEMORY SIZE'
/ GOTO LABEL=ERROR
/END-IF
/"** CHECK MEMORY SIZE OF VM-ID=3 "
/EXEC-CMD (SHOW-VM-ATTR VM-ID=3,INF=*MEMORY),STRUCT-OUT=SHVAS
/IF (SHVAS#.MIN-MEM-SIZE = '*UNDEF')
/ TXT = 'MEMORY CONFIGURATION CURRENTLY NOT POSSIBLE FOR VM-ID=3'
/ GOTO LABEL=ERROR
/END-IF
/"** REDUCE MEMORY OF VM-ID=2 "
/REDUCE-VM-MEMORY VM-ID=2,NEW-MEM-SIZE=*MINIMUM
/IF-CMD-ERROR
/ TXT = 'ERROR IN REDUCE-VM VM-ID=2'
/ GOTO LABEL=ERROR
/END-IF
/"** SYSTEM MUST WAIT FOR VMS4094 OR VMS4095"
/WHILE (CONT=TRUE)
/ WAIT-F-PROP-EV EV-NAME=(VMS4094,VMS4095),TIME-LIM=300
/ IF (SYSPOP.MAINCODE <> '0000')
/ TXT = 'ERROR IN WAIT-PROP-EVENT (REDUCE-VM-MEMORY VM-ID=2'
/  SHOW-VARIABLE SYSPOP
/  GOTO LABEL=ERROR
/ END-IF
/ IF ((SYSPOP.EVENT-NAME = 'VMS4094') AND (SYSPOP.I0='2'))
/  CONT=FALSE
/ ELSE-IF ((SYSPOP.EVENT-NAME = 'VMS4095') AND (SYSPOP.I0 = '2'))
/  TXT = 'VMS4095 IN REDUCE-VM-MEMORY VM-ID=2'
/  GOTO LABEL=ERROR
/ END-IF
/END-WHILE
/"** EXTEND MEMORY OF VM3 ********"
/EXTEND-VM-MEMORY VM-ID=3,NEW-MEM-SIZE=*MAXIMUM
/CONT = TRUE
/WHILE (CONT=TRUE)
/ WAIT-F-PROP-EV EV-NAME=(VMS4094,VMS4095),TIME-LIM=300
/ IF (SYSPOP.MAINCODE <> '0000')
/  TXT = 'ERROR IN WAIT-PROP-EVENT (EXTEND-VM-MEMORY VM-ID=3)'
/  SHOW-VARIABLE SYSPOP
/  GOTO LABEL=ERROR
/ END-IF
/ IF ((SYSPOP.EVENT-NAME = 'VMS4094') AND (SYSPOP.I0='3'))
/  CONT=FALSE
/ ELSE-IF (SYSPOP.EVENT-NAME = 'VMS4095')
/  TXT = 'VMSVMS4095 IN EXTEND-VM-MEMORY VM-ID=3'
/  GOTO LABEL=ERROR
/ END-IF
/END-WHILE
/STOP-PROP-EV-MON (VMS4094,VMS4095)
/IF-CMD-ERROR; END-IF
/STOP-PROP-OBJ-MON CONSOLE    "SHUT DOWN CONNECTION TO UCON"
/IF-CMD-ERROR; END-IF
/"** NORMALES ENDE"
/END-BLOCK
/IF-BLOCK-ERROR         "HANDLE OTHER ERRORS"
/ TXT = 'OTHER ERRORS'
/ GOTO LABEL = ERROR
/END-IF
/ERROR:
/IF (TXT <> 'OK')
/ SEND-MSG TO=OPER,MSG='*** ERROR IN VMMEM: &TXT ***'
/END-IF
END-PROP-PROCESS      "SHUT DOWN CONNECTION TO PROP-XT"
/IF-CMD-ERROR
/END-IF
/END-VM-DIALOG VM-ID=1       "SHUT DOWN CONNECTION TO VM2000"
/IF-CMD-ERROR
/END-IF
/MOD-JOB-OPTIONS LOG=*PAR(LIST=NO)
/ASSIGN-SYSLST *PRIMARY
/EXIT-PROC