Installing IBM i licenses in Skytap

IBM i VM licenses are generally tied to the serial number of the hardware host and must be renewed each year. If you migrated an IBM i LPAR into Skytap, use this procedure to install an IBM i license and to create a LICKEY scheduled job which runs once per day to verify that a valid license is installed on the VM.

Prerequisites

Python 3 must be installed on the IBM i LPAR.

Create the IBMPULL.SH script

  1. From the green screen of the IBM i VM, login as QSECOFR. Make sure networking is enabled and that you can access the internet.
  2. Type STRTCPSVR SERVER(*SSHD) to start SSH.
  3. From a command windows on your local computer, sign into your IBM i VM using SSH: ssh QSECOFR@ipaddress
  4. In the SSH session, type bash to start a bash instance.
  5. Use an editor such as NANO to create IBMPULL.SH in the root directory of the IBM i VM. For example, type nano /IBMPULL.SH.
  6. Paste in the contents of the IBMPULL.SH script:

     #!/bin/bash//QOpenSys/pkgs/bin/curl --fail -o tmp_ibmi_license_management.py http://169.254.169.254/skytap?ibmi_script_update=1
     if [ $? == 0 ]; then
     /QOpenSys/pkgs/bin/python3 -m py_compile tmp_ibmi_license_management.py
     if [ $? == 0 ]; then
     mv tmp_ibmi_license_management.py ibmi_license_management.py
     chmod +x ibmi_license_management.py
     ./ibmi_license_management.py
     else
     echo "Failed to compile new script." && exit 1
     fi
     else 
     echo "Failed to download new script." && exit 1
     fi
     echo "This is done!"
    
  7. Type history -c to clear the command history, and then type exit twice to sign out.

Create a LICKEY user

Create a LICKEY user to run the license-verification script.

Type the following command:

CRTUSRPRF USRPRF(LICKEY) PASSWORD(*NONE) INLMNU(*SIGNOFF) LMTCPB(*YES) SPCAUT(*ALLOBJ) DSPSGNINF(*NO) LMTDEVSSN(1)

Create a LICKEY scheduled job to validate the IBM i license

Configure Advanced Job Scheduler to run the LICKEY script once each day. You can do this in an SRA session or using a 5250 emulator.

To create the LICKEY job:
  1. Type WRKJOBJS to open job scheduler.
  2. Create new job called LICKEY with the following parameters:
    • Frequency: *DAILY
    • Interval: 1
    • User: LICKEY
    • Schedule times: 0:02 (or any time of your choosing in UTC).
  3. Press Enter to confirm the job.
  4. Choose option 8, and then add these commands to the job:
    • Seq: 10
    • Command: QSH CMD(‘/IBMPULL.SH’)
  5. Choose option 6 to release and reset the job.
  6. Use option 7 to immediately execute the job to test it.

    The job can take a long time to complete, depending on the EC and any running processes on the VM. For a very low EC VM, the job can take 20 minutes.

Troubleshooting the LICKEY job

The LICKEY job calls the ibmi_license_management.py script, which has a debug option.

  • Type ibmi_license_management.py debug to run the script with verbose progress output.
  • Contact Skytap Support with the output if you are experiencing an error and need assistance.