For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

Cory_O's avatar
Cory_O
Icon for Cirrus rankCirrus
Nov 25, 2025
Solved

UCS Encryption Question

Good day!   In order to run a platform migration with a UCS restore from a FIPS licensed platform (physical to virtual), you need to make some modifications to the UCS file.  This requires decrypti...
  • MoFaz's avatar
    Dec 01, 2025

    Hi Cory,

    Not sure if your issue was solved and if anyone has reached out to you. I'm here to provide some answers and hopefully, it answers yours.

    If you’re planning a platform migration or recovery involving a FIPS-licensed BIG-IP (for example, moving from physical to virtual), you’ll likely need to extract, modify, and restore a UCS (User Configuration Set) file. There’s a lot of confusion around encryption requirements and the right way to handle UCS files on FIPS platforms, so here’s a comprehensive guide based on F5’s official documentation and best practices.

    Do You Need to Re-Encrypt the UCS File for FIPS Restore?

    Short answer:
    No, you do not need to manually re-encrypt a UCS file to restore it on a FIPS-licensed platform. The restore process depends on how the UCS was originally created:

    • If the UCS was created with a passphrase (encrypted), you must provide that passphrase during the restore.
    • If the UCS was created without a passphrase (unencrypted), you can restore it without a passphrase.

    Important:
    On FIPS platforms, you cannot create a new UCS without specifying a passphrase, but you can restore an unencrypted UCS if you have one from another system.

    References:

    How Should You Encrypt or Re-Encrypt a UCS File?

    Do not use manual GPG commands to encrypt or re-encrypt a UCS file for F5 restore. The correct and supported way is to use the BIG-IP command line:

    tmsh save sys ucs <filename> passphrase <your_passphrase>

    • This command ensures the UCS is encrypted in the format expected by BIG-IP.
    • If you’ve extracted and modified a UCS (for example, to edit configuration files), repackage it as a tar.gz, then use the above command to re-encrypt it on a BIG-IP system.

    Why not use GPG directly?
    Manual GPG encryption (even with the correct cipher) does not produce a UCS file that BIG-IP can restore. Attempting to restore such a file will result in errors like “Unexpected Error: UCS loading process failed.” (K5437K13537502)

    Step-by-Step: How to Restore a UCS on a FIPS-licensed BIG-IP

    1. If you need to modify the UCS:
      • Extract the UCS file:
      • mkdir /tmp/ucs_extract
      • tar -xzvf /var/local/ucs/<yourfile>.ucs -C /tmp/ucs_extract
      • Make your changes to the configuration files as needed.
      • Repackage the UCS:
      • cd /tmp/ucs_extract
      • tar -czvf /var/local/ucs/<newfile>.ucs *
      • (Optional) If you want to encrypt the UCS, use the tmsh command below.

    2. To encrypt (or re-encrypt) the UCS:
      • On the BIG-IP CLI, run:
      • tmsh save sys ucs /var/local/ucs/<finalfile>.ucs passphrase <your_passphrase>
      • This will create a UCS file encrypted with your passphrase.

    3. To restore the UCS:
      • On the target BIG-IP, copy the UCS file to /var/local/ucs/ (or /shared/).
      • Run the restore command:
      • tmsh load sys ucs <finalfile>.ucs
      • If the UCS is encrypted, you’ll be prompted for the passphrase.
      • If you’re migrating between platforms (e.g., hardware to VE), you may need to use the platform-migrate option:
      • tmsh load sys ucs <finalfile>.ucs platform-migrate

    4. Troubleshooting:
      • If you see errors like “Unexpected Error: UCS loading process failed,” ensure the UCS is properly compressed and, if needed, repackage it as a tar.gz and rename it with a .ucs extension before restoring (K13537502).
      • If you get passphrase errors, double-check that you’re using the same passphrase used during UCS creation.

    Summary Table

    Scenario

    UCS Encrypted?

    Restore Possible?

    Required Action

    UCS created with passphrase

    Yes

    Yes

    Provide passphrase at restore

    UCS created without passphrase

    No

    Yes

    No passphrase needed at restore

    Manually GPG-encrypted UCS

    Yes

    No

    Not supported; use tmsh to encrypt

    Modified UCS, need to re-encrypt

    Yes

    Yes

    Use tmsh save sys ucs ... passphrase ...

     

    Cheers, 

    Mo