Date: February 28, 2012                                  Jim Moling, US Treasury

           < Read Me First - CLONEVM Version 2 - Quick Start Guide >

The CLONEVM package has been setup for "Generic" processing by default.  This
allows you to use your own naming conventions, or to put it another way, the
internal naming conventions are not enforced. So you can go ahead and clone the
system that you are currently logged onto as soon as you have completed the
setup/installation instructions that follow.

Please note that the installation has changed for Version 2 - there is now a 192
code disk as part of the VMCLONER virtual machine configuration.
________________________________________________________________________________

                 Basic Setup/Installation Instructions
________________________________________________________________________________

The following steps should get you going as quickly as possible:

1. Setup a new virtual machine called VMCLONER
   Logon to MAINT (or the virtual machine that you use to maintain the VM
   directory) and define an entry in the VM directory, which is based on the
   sample file VMCLONER $DIRECT$, which is as follows:

USER VMCLONER NEWSYS       256M    1024M ABCDEFG
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
*  V M C L O N E R  -  z / V M   C L O N I N G   U T I L I T Y
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
  OPTION MAINTCCW LNKS LNKE LNKNOPAS DEVMAINT
*
** Start CMS At Logon
*
  IPL CMS PARM AUTOCR
*
** Expanded Storage For 2nd Level VM Systems
*
  XSTORE 128M
*
** NIC To VSwitch For IP Access To 2nd Level VM Systems
*
* NICDEF 1C10 TYPE QDIO LAN SYSTEM SWITCH1C
*
** Local Terminals For 2nd Level VM Systems
*
  SPECIAL 020 3270
  SPECIAL 021 3270
  SPECIAL 022 3270
  SPECIAL 023 3270
  SPECIAL 024 3270
  SPECIAL 025 3270
*
** Virtual Console
*
  CONSOLE 009 3215 T
*
** RDR, PUN & PRT
*
  SPOOL 000C 2540 READER *
  SPOOL 000D 2540 PUNCH A
  SPOOL 000E 1403 A
*
** Mini-Disk Definition
*
  MDISK  191 3390   1385   015 610USR MR    ALL NEW NEW * VMC191
  MDISK  192 3390   1500   005 610USR MR    ALL NEW NEW * VMC192
*
** Links To Other Mini-Disks
*
  LINK MAINT 0190 0190 RR
  LINK MAINT 019D 019D RR
  LINK MAINT 019E 019E RR
*
  LINK MAINT 0402 0402 RR
  LINK MAINT 0401 0401 RR
  LINK MAINT 0405 0405 RR

Notes:

- The 191 and 192 MDISK statements need to be modified appropriately for your
  system environment, i.e. the volser (610USR) and the starting cylinders
  (1385 and 1500) minimally, and optionally the read/write passwords per your
  standards.

- The NICDEF statement provides an example for defining TCP/IP access to a 2nd
  level VM system via a virtual switch. Either modify this statement
  appropriately or remove/leave it commented.

- The SPECIAL statements provide a range of virtual terminals for dialing into a
  2nd level VM system. This can be used as an alternative to setting up TCP/IP
  access into the 2nd level system. Make sure that the addresses specified here
  also exist in the SYSTEM CONFIG file of the 2nd level VM system (in the
  Operator_Consoles address list). Either modify these statements if using or
  remove/leave them commented.

2. Activate the VM Directory using the DIRECTXA utility.
   For example, if you updated a file called USER DIRECT on Maint's C disk,
   then:

   - To check syntax, issue:      DIRECTXA USER DIRECT C ( EDIT

   - And to activate it, issue:   DIRECTXA USER DIRECT C

   Note: If you have a directory management utility such as DirMaint installed,
   then you would follow the proper procedures for adding and activating a new
   user called VMCLONER. Also, if you have an ESM like RACF, then you would
   need to take appropriate steps to authorize the VMCLONER userid.

3. Logon to VMCLONER and format the 191 & 192 minidisks.

   From the VM Logo Screen, enter userid & password, for example:

   Fill in your USERID and PASSWORD and press ENTER
   (Your password will not appear when you type it)
   USERID   ===> VMCLONER
   PASSWORD ===> ********

   After logon processing completes, enter the following commands:

   Enter: FORMAT 191 A

     Msg: DMSFOR603R FORMAT will erase all files on disk A(191).
          Do you wish to continue? Enter 1 (YES) or 0 (NO).

   Enter: 1

     Msg: DMSFOR605R Enter disk label:

   Enter: VMC191

     Msg: DMSFOR733I Formatting disk A
          DMSFOR732I 15 cylinders formatted on A(191)

   Enter: FORMAT 192 D

     Msg: DMSFOR603R FORMAT will erase all files on disk D(192).
          Do you wish to continue? Enter 1 (YES) or 0 (NO).

   Enter: 1

     Msg: DMSFOR605R Enter disk label:

   Enter: VMC192

     Msg: DMSFOR733I Formatting disk D
          DMSFOR732I 5 cylinders formatted on D(192)

4. Upload and Unpack the CLONEVM VMARC file to the 192 (D) disk on VMCLONER

   There are a number of ways to do this, such as using FTP, a terminal
   emulator (via IND$FILE) or the VM web browser CHARLOTTE (obtained from the
   IBM VM downloads page), to name a few. However you choose to upload it,
   just make sure that the CLONEVM archive file is uploaded in BINARY format.

   - After uploading, reblock the CLONEVM VMARC file using this pipeline:

     PIPE < CLONEVM VMARC A | FBLOCK 80 00 | > CLONEVM VMARC A F 80

   - Now you can unpack the files from the CLONEVM VMARC archive,
     do so by entering:

     VMARC UNPK CLONEVM VMARC A * * D

   Note: If you don't have the VMARC utility on your system, then you will
         need to install it first. It can be otbtained from IBM's VM download
         webpage. Follow installation instructions provided with the package.

5. Installing the VMCLONER sample files

   - VMCLONER $PROFILE - To use on the 191 (A) disk of VMCLONER, copy and rename
     it to the 192 (D) disk, i.e. issue command:

     COPYFILE VMCLONER $PROFILE D PROFILE EXEC A (OLDDATE REPLACE

     IPL the VMCLONER virtual machine to confirm that the profile works,
     i.e. issue command:

     IPL CMS PARM AUTOCR

   - VMCLONER $XEDIT$ - Rename to PROFILE XEDIT to use on the 192 (D) disk of
     VMCLONER (where it was unpacked to). This is optional but may be of
     interest to those who haven't already created their own XEDIT profile,
     i.e. issue command:

     RENAME VMCLONER $XEDIT$ D PROFILE XEDIT D

     You can edit a file, such as one of the profiles, in order to see how
     this profile affects the XEDIT session (if you don't like it, then modify
     it or just rename it back so it won't be used).

Once the above steps are completed, you should have the VMCLONER virtual
machine functional with all of the CLONEVM files unpacked and ready for
customization.
________________________________________________________________________

                     Generic Cloning Procedure
________________________________________________________________________

First, note that a set of sample files have been included in the package
based on cloning a system called TEST (all of the files with a file name
of TEST). You can view these files to see the results of cloning as well
as the first IPL process. Perhaps more important, the TEST files can be
used as a reference in the (hopefully unlikely) event that you run into
trouble while cloning or IPLing a system.

Now let's assume that you want to clone the active system that you are
currently logged onto. The following steps describe this scenario:

1) First, you need to determine the DASD requirements of your active system
   volumes and then select a set of corresponding spare (free) volumes.
   A utility rexx exec called DASD has been provided to assist in this
   process. A scenario for determining the DASD requirements follows:

   a) Display the system volumes for the active system:

   Cmd: dasd sys

   Response:
                              Total System DASD = 4
   ---------------------------------------------------------------------------
   Addr Volser  Model   Cyls    Bytes   | Addr Volser  Model   Cyls    Bytes
   ---- ------ ------- ------ --------- | ---- ------ ------- ------ ---------
   AC19 610RES 3390-9   10017   7.93 GB | AC2D 610USR 3390-3    3339   2.64 GB
   AC2E 610PAG 3390-3    3339   2.64 GB | AC2F 610SPL 3390-3    3339   2.64 GB

   Based on this, the source system consists of (1) 3390-9 and (3) 3390-3 DASD
   volumes (note that you will likely see more than just the system volumes
   displayed above when you execute this command - keeping it simple here).

   b) Next, search for spare DASD volumes. On our systems we designate spare
      volumes by setting the volser prefix to SP follwed by the DASD address.
      So to display spare volumes, we simply specify the SP prefix:

   Cmd: dasd sp*

   Response:
                       Total 'SP' Volser-Prefixed DASD = 4
   ---------------------------------------------------------------------------
   Addr Volser  Model   Cyls    Bytes   | Addr Volser  Model   Cyls    Bytes
   ---- ------ ------- ------ --------- | ---- ------ ------- ------ ---------
   A420 SPA420 3390-9   10017   7.93 GB | A421 SPA421 3390-3    3339   2.64 GB
   A422 SPA422 3390-3    3339   2.64 GB | A423 SPA423 3390-3    3339   2.64 GB

   As you can see, we happen to have just what we need, 1 3390-9 and 3 3390-3
   spare DASD volumes. These source & target volumes will need to be specified
   in the cloning parameter file, which you will be prompted for during the
   execution of the cloning process.

2) Verify your USER DIRECT and SYSTEM CONFIG file name & location.

   a) Verify the virtual machine used to maintain the VM Directory
      and the System Configuration files. The Default based on the
      shipped configuration from IBM is: MAINT

   b) Verify the location and name of the USER DIRECT file for your
      active system. Defaults based on the shipped configuration
      from IBM are:

      Directory Disk = 2CC minidisk of MAINT
      Directory Name = USER
      Directory Type = DIRECT

      Assuming that the USER DIRECT resides on an allocated disk, and
      that you are using the default file type of DIRECT, you can issue
      the following command to display a list of your directory files:

      Cmd: filel * DIRECT *

      Response:

      Filename Filetype Fm Format Lrecl    Records     Blocks   Date     Time
      USER     DIRECT   A1 F         80       2104         42  3/26/10  9:58:31
      TEST     DIRECT   Q1 F         80       9658        189  3/16/10 12:49:22
        .        .
        .        .
        .        .

      Let's assume that USER DIRECT A1 represents the active directory. In order
      to determine the minidisk address associated with file mode A1, issue the
      Query Disk command, for example:

      Cmd: Q DISK

      Response:

LABEL  VDEV M  STAT   CYL TYPE BLKSZ   FILES  BLKS USED-(%) BLKS LEFT  BLK TOTAL
VMC191 191  A   R/W    15 3390 4096       10        117-04       2583       2700
PKG192 192  D   R/W     5 3390 4096       17        130-14        770        900
ZVM191 193  O   R/W   100 3390 4096      133        424-02      17576      18000
VMUTIL 194  P   R/W    15 3390 4096      244       1163-43       1537       2700
VMC195 195  Q   R/W     5 3390 4096       29        549-61        351        900

      Therefore, in this example, the VM directory is USER DIRECT, and resides
      on minidisk 191, which is the first disk listed with a label of VMC191.

   c) Next, verify the location and name of the SYSTEM CONFIG file for your
      active system. Defaults based on the shipped configuration
      from IBM are:

      System Config Disk = CF1 minidisk of MAINT
      System Config Name = SYSTEM
      System Config Type = CONFIG

      Assuming that the SYSTEM CONFIG file resides on CF1, which is
      normally allocated to the system for CP access, you can access
      it in read mode via a command similar to the following:

      Cmd: Access CF1 M

      Response: DMSACP723I M (CF1) R/O

      Assuming that you are using the default file type of CONFIG, you
      can now issue the following command to display a list of all your
      system config files:

      Cmd: filel * CONFIG *

      Response:

      Filename Filetype Fm Format Lrecl    Records     Blocks   Date     Time
      SYSTEM   CONFIG   M1 F         80        499         10  3/26/10  9:58:58
      TEST     CONFIG   M1 F         80        499         10 12/01/09 21:02:17
        .        .
        .        .
        .        .

      Let's assume that SYSTEM CONFIG M1 represents the active system config
      file, which we already know resides on the CF1 minidisk.

3) Let's say that we want to clone a new system with a sysid of PROD.
   We now need to establish a new set of volsers for this new system.
   Let's use the sysid (PROD) as a prefix for the volsers, as follows:

    Type                Volser
   ------               ------
   SYSRES = PROD + RS = PRODRS
   USER   = PROD + U0 = PRODU0 (up to 10 volumes can be specified, if needed)
   PAGE   = PROD + P0 = PRODP0 (up to 10 volumes can be specified, if needed)
   SPOOL  = PROD + S0 = PRODS0 (up to 10 volumes can be specified, if needed)

   Warning: Don't specify more volumes than what's being used on the source
            system that you are cloning from for USER, PAGE & SPOOL - if you
            want to add additional volumes, do so AFTER cloning (in other
            words, the cloning process does not create new volumes for you!).

   Note: If you have a system that uses 3390-3's for the SYSRES + Work volumes,
         then you could specify the work volumes as follows:

   WORK   = PROD + W0 = PRODW0 (up to 10 volumes can be specified, if needed)

4) We now have all of the information that we need to clone a new system
   using the active system that you are logged onto as the source, to a
   set of spare target volumes, as follows:

               Source => Target
   -------------------   ------------------------------
   Addr Volser  Model    Addr Volser  Model  New Volser
   ---- ------ -------   ---- ------ ------- ----------
   AC19 610RES 3390-9 => A420 SPA420 3390-9 = PRODRS
   AC2D 610USR 3390-3 => A421 SPA421 3390-3 = PRODU1
   AC2E 610PAG 3390-3 => A422 SPA422 3390-3 = PRODP1
   AC2F 610SPL 3390-3 => A423 SPA423 3390-3 = PRODS1

   And we'll be using the following VM Directory & Configuration Files,
   which reside on minidisks that are owned by the MAINT userid:

   VM Directory File Name: USER
                File Type: DIRECT
                Mini-Disk: 191

   System Config File Name: SYSTEM
                 File Type: CONFIG
                 Mini-Disk: CF1

   This information needs to be specified in the cloning parameter file, which
   you will be prompted for during the execution of the cloning process.

5) The clone command can now be issued with the sysid as a parameter,
   as follows:

   Cmd: CLONEVM PROD

   All you have to do is follow the prompts and the cloning exec will create
   the new system.

6) To test the new system that you have cloned, execute the TESTIPL exec in
   similar fashion as the CLONEVM exec, by specifying the sysid (PROD in this
   case):

   Cmd: TESTIPL PROD

   Note: The PROD parameter is used to look for a cloning parameter file,
         in this case, PROD $PARMS$, which will be read in order to determine
         the volsers for the PROD system. These volumes should be unique to
         the new system, i.e. there should not be any other volumes with the
         same prefix.

   Follow the instructions that are displayed in order to properly
   IPL the new system and clear the spool space as you bring it up for
   the first time.
________________________________________________________________________

                       Contact Information
________________________________________________________________________

If you run into any problems or have questions and/or suggestions for
enhancements, please contact the author at one of the following email
addresses:

james.moling@fms.treas.gov
      - or -
jmoling@comcast.net

Hope you find this cloning utility to be as useful for you as I have!
