In Junos version 19.4R2 with new Agile licensing, VMX is not accepting the correct/proper Agile license (trial/production) keys via Junos CLI.
request system license add terminal
request system license add filename
root@vmx-v1> show system license License usage: Licenses Licenses Licenses Expiry Feature name used installed needed Licenses installed: none root@vmx-v1> request system license add terminal [Type ^D at a new line to end input, enter blank line between each license key] JUNOSxxxxxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxx error: license validation failed with safenet error: The given license code is invalid. Hence, it could not be added to the "no-net" license server. add license failed (1 errors) root@vmx-v1> request system license add JUNOSxxxxxxxxx.lic error: license validation failed with safenet error: The given license code is invalid. Hence, it could not be added to the "no-net" license server. add license failed (1 errors) root@vmx-v1> show chassis hardware Hardware inventory: Item Version Part number Serial number Description Chassis VM6006610490 VMX Midplane Routing Engine 0 RE-VMX CB 0 VMX SCB FPC 0 Virtual FPC CPU Rev. 1.0 RIOT-PERF BUILTIN MIC 0 Virtual PIC 0 BUILTIN BUILTIN Virtual root@vmx-v1> show version brief Hostname: vmx-v1 Model: vmx Junos: 19.4R2.6 JUNOS OS Kernel 64-bit [20200411.2b552dd_builder_stable_11] JUNOS OS libs [20200411.2b552dd_builder_stable_11] JUNOS OS runtime [20200411.2b552dd_builder_stable_11] JUNOS OS time zone information [20200411.2b552dd_builder_stable_11] JUNOS network stack and utilities [20200429.150822_builder_junos_194_r2] . . .
As a workaround, create the license file under /config/license folder(@VCP VM) and reboot the vMX.
Steps:
'start shell'
/config/license
.lic
'vi JUNOSxxxxxxxxx.lic'
JUNOSxxxxxxxxx.lic
JUNOSxxxxxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxx
'cat JUNOSxxxxxxxxx.lic'
'> request system reboot'
root@vmx-v1> show system license detail Licenses Licenses Licenses Licenses Expiry Feature name used installed needed available VMX-SCALE-PREMIUM 1 0 1 0 29 days Licenses installed: none Licensing Mode: Agile Licensing Standalone
root@vmx-v1> show system license License usage: Licenses Licenses Licenses Expiry Feature name used installed needed Licenses installed: none root@vmx-v1> start shell root@vmx-v1:~ # cd /config/license/ root@vmx-v1:/config/license # vi JUNOSxxxxxx.lic root@vmx-v1:/config/license # cat JUNOSxxxxxxxxx.lic JUNOSxxxxxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxxxx xxxx root@vmx-v1:/config/license # ls JUNOSxxxxxxxxx.lic licinfra_notify.sync safenet
root@vmx-v1:/config/license # exit
root@vmx-v1> request system reboot root@vmx-v1> show system license detail Licenses Licenses Licenses Licenses Expiry Feature name used installed needed available VMX-SCALE-PREMIUM 1 0 1 0 29 days Licenses installed: none Licensing Mode: Agile Licensing Standalone root@vmx-v1> show version brief Hostname: vmx-v1 Model: vmx Junos: 19.4R2.6 JUNOS OS Kernel 64-bit [20200411.2b552dd_builder_stable_11] . . .