srl-labs / containerlab

container-based networking labs
https://containerlab.dev
BSD 3-Clause "New" or "Revised" License
1.56k stars 266 forks source link

Support licenses for vMX kind #1180

Open jk2lx opened 1 year ago

jk2lx commented 1 year ago

Allow the specification of license files for the vMX kind so that no manual license loading is necessary after a vMX reload.

hellt commented 1 year ago

Hi @jk2lx Which command (or file path) one uses to make a license active on a vmx?

jk2lx commented 1 year ago

In Junos operational mode one can apply the license from a file or paste it into the terminal:

  1. request system license add [filename]
  2. request system license add terminal[enter] [license data][enter] [ctrl-d]

Afaik there is no way to enable the license directly in the Junos configuration.

steiler commented 1 year ago

This would be the netconf rpc.

<rpc>
<request-license-add>
<key-data> key </key-data>
</request-license-add>
</rpc>
steiler commented 1 year ago

Hi @jk2lx, in #1274 I've implemented the request-license-add rpc. I'm also able to validate that it arrives and is properly interpreted by the node. However, I don't have access to a license. Would you mind giving the PR code a try and providing feedback?!

This is the actual binary generated via the gh actions for that PR branch. https://github.com/srl-labs/containerlab/suites/11277165560/artifacts/578278317

If you can download and execute it with a vr-vmx instance and a license file and provide feedback, that would be great.

Thanks

steiler commented 1 year ago

A second option seems to be, to utilize a bind mount as described here:

https://supportportal.juniper.net/s/article/vMX-is-not-accepting-the-correct-license-keys-release-19-4R2?language=en_US