Description

How to convert a QFX device like qfx5120-32c from a flex version to a standard release


Symptoms

Converting QFX Series Devices from Junos OS with Enhanced Automation to Standard Junos OS

Example : Converting qfx5120-32c Junos: 22.2R3-S2.8 flex to to 22.2R3-S6

 

Model: qfx5120-32c

Junos: 22.2R3-S2.8 flex

 

Solution

Converting a QFX5120-32C from "Junos Flex" to "Junos Classic" involves installing a standard Junos OS image that doesn't include the specific "Flex" (or "Switch Automation Enhancements") features.

 

A "flex" image (often identified in file names with a -flex suffix, such as jinstall-qfx-5-flex-x.tgz) is identical to standard images but with Veriexec disabled. 

 

show version detail no-forwarding

Model: qfx5120-32c

Junos: 23.4R2-S2.1 flex

JUNOS OS Kernel 64-bit FLEX [20240604.39c9257_builder_stable_12_234]

JUNOS OS libs [20240604.39c9257_builder_stable_12_234]

JUNOS OS runtime [20240604.39c9257_builder_stable_12_234]

JUNOS OS time zone information [20240604.39c9257_builder_stable_12_234]

[...]

JUNOS Host Software [3.14.52-rt50-WR7.0.0.9_ovp:3.1.0]

JUNOS Host qfx-5e host-control package [23.4R2-S2.1]

JUNOS Host qfx-5e host-platform package [23.4R2-S2.1]

JUNOS Host qfx-5e control-plane flex package [23.4R2-S2.1]

JUNOS Host qfx-5e platform package [23.4R2-S2.1]

JUNOS Host qfx-5e base package [23.4R2-S2.1]

JUNOS Host qfx-5e data-plane package [23.4R2-S2.1]

Junos for Automation Enhancement

 

 

Junos Flex vs. Junos Classic

  • Junos Classic: This refers to the standard Junos OS image
  • Junos Flex (Switch Automation Enhancements): Juniper introduced "Flex" images on some QFX platforms to provide enhanced automation features, often including support for things like Puppet, Chef, and other extensions. These images are built on the standard Junos OS but have additional components.

Installing a fresh jinstall image typically overwrites or removes these components.

 

Key Constraints
•    No Automatic Rollback: You cannot use the request system software rollback command to switch between image categories (e.g., Flex to Standard).
•    Manual Reinstallation: You must manually download and install the standard software package (the version without the -flex suffix).

- While Junos typically preserves /config and /var, switching categories is a major system change. It is critical to backup your configuration before proceeding. 

 

To go back to "Classic" (meaning a standard Junos image), you essentially need to perform a software upgrade with a "jinstall" image that doesn't have those extra components.

 

Reversion Procedure
1.    Download Standard Package: Get the official jinstall package for your platform from the Juniper Support site (e.g., jinstall-qfx-5-x.tgz).
2.    Upload to Device: Copy the file to the /var/tmp directory on the switch.
3.    Perform Installation: Run the installation command with the reboot option:
request system software add /var/tmp/jinstall-qfx-5-x.tgz reboot.
4.    Verify Secure Boot: After rebooting, the system will re-enable Veriexec, meaning it will again block any custom or unsigned third-party scripts that were permitted on the Flex image. 

 

 

root@d06-40> request system software add /var/tmp/jinstall-host-qfx-5e-x86-64-22.2R3-S6.5-secure-signed.tgz 

Size: 1618214123, Last changed: Jun 04 09:59:39

/var/tmp

 

 

Reboot -----

 

End result:

{master:0}

 

root@QFX5120> show version
localre:

--------------------------------------------------------------------------

Hostname: d06-40
Model: qfx5120-32c
Junos: 22.2R3-S6.5
JUNOS OS Kernel 64-bit  [20241015.5586108_builder_stable_12_222]
JUNOS OS libs [20241015.5586108_builder_stable_12_222]
JUNOS OS runtime [20241015.5586108_builder_stable_12_222]
JUNOS OS time zone information [20241015.5586108_builder

 

 

Format Install Method

You can install the image on the switch using a USB boot device and follow the process known as "Format Install"

Total Disk Erasure: This method wipes the entire internal storage of the switch to ensure the new operating system has a clean environment.
To ensure a smooth transition, we must verify that a full configuration backup is stored off-box. Once the Standard version is installed, we will need to manually re-apply the configuration to restore network services.

[EX/QFX] Procedure to format install QFX5K/EX4600 device using a USB
https://supportportal.juniper.net/s/article/EX-QFX-Procedure-to-format-install-QFX5K-device-using-a-USB

 

 

•Enhanced Automation user Partitioning:

When running enhanced automation a dedicated 1 GB user partition is automatically set up, this is used for storing custom binaries and packages, which persists through software upgrades. 

The user partition is not overwritten when you upgrade or downgrade the software to an OS image that does not contain the automation enhancements.

https://www.juniper.net/documentation/us/en/software/junos/automation-scripting/topics/concept/junos-flex-overview.html

What Happens to the Flex Partition?
The 1 GB user partition created by the Flex image is not automatically deleted when you switch back to standard. Any custom binaries or scripts stored there will remain on the disk, but the standard Junos image will refuse to execute them due to the re-enabling of Veriexec security. 

 

Modification History

2025-06-04 : Article Created

Related Information

https://www.juniper.net/documentation/us/en/software/junos/automation-scripting/topics/concept/junos-flex-overview.html