Adding license PIDs to OVA images

You can add license product IDs to OVA images by modifying the packaged OVA file, rather than from the Cloud Pak System Software user interface.

Procedure

  1. Verify the order in which the files are stored in the .ova file. Run the following command:
    tar -tf <ova_file>.ova
    When you package the .ova file, you must do it in the same order to allow streaming.
  2. Create an empty directory and extract the .ova file. Run the following command:
    mkdir t
    cd t
    tar -xvf <ova_file>.ova
  3. Look for an XML file in the OVA image. Open the file and update the following line with your own values for the productId and licenseType parameters:
    <rmpatt:productGUID productId="5724-N72" partnumber="D59E2LL" licenseType="Server" 
    guid="1ba2f27984b34249b6f2f1ae2d2d0582" />
  4. Obtain the sha1 value of the XML file. Run the following command:
    openssl sha1 <file_name>.xml
    The output looks like the following example:
    SHA1(<file_name>.xml)= ae66647a2bef8e9c5e22306323e7ae5a435235a3
    
  5. Open the .mf file in the OVA image, find the line that contains <file_name>.xml and replace the existing sha1 value with the one in the previous step. For example, ae66647a2bef8e9c5e22306323e7ae5a435235a3.
  6. Repackage the OVA image. Use the tar command, and specify each file in the correct order as in the initial file. For example:
    tar --disable-copyfile -cvf <new_ova_file>.ova DB2_EXP_V97_RHEL.ovf en-US-bundle.msg RHEL62-64.vmdk RHEL62-64-flat.vmdk DB2.vmdk DB2-flat.vmdk DB2-home.vmdk DB2-home-flat.vmdk DB2-data.vmdk DB2-data-flat.vmdk DB2_EXP_C.xml DB2_EXP.xml DB2_EXP_Primary_C.xml DB2_EXP_Primary.xml DB2_EXP_Standby_C.xml DB2_EXP_Standby.xml database-icon-1-left-16px.gif database-icon-1-left-22px.gif database-icon-2-right-16px.gif database-icon-2-right-22px.gif DB2_EXP_V97_RHEL.mf
    Note: The previous information is provided as an example. You must use your own names for the OVA files, files from the package. XML file, and .mf file. Use the --disable-copyfile option on OSX only, as it adds extra hidden files. Do not use this option on Linux.
  7. You can now import the OVA file on your system. Copy the OVA file to your server into the /root directory or a subdirectory of it. To specify it for the URL, use the file: format. For example, file:/root/ovas/mynew.ova.