Persistent Serial Numbers? #910
-
Question: How do we keep serial sumbers of the network devices persistent with Netsim before and after restarting the lab? The SN is the primary key we're using to compare across two points in time. Here’s what I tried:
Any suggestions how else we could do this? |
Beta Was this translation helpful? Give feedback.
Replies: 7 comments 7 replies
-
Let's start with the basics:
As netlab rides on top of existing orchestration systems (= Vagrant), it makes sense to use whatever those systems can offer. Trying to go around them should be the absolute last resort. Now for the hard question: where do network device VMs get their serial numbers from and how could we influence that? I'm afraid the first part is device-specific and have no idea what to do with the second part of the question until we have a definitive answer to the first part. |
Beta Was this translation helpful? Give feedback.
-
... no idea whether this could work in your environment, but you could try to identify the devices by the management interface MAC address in case the serial number check fails. |
Beta Was this translation helpful? Give feedback.
-
I would say that a VM Serial Number is derived from SMBIOS Data, i.e. https://libvirt.org/formatdomain.html#smbios-system-information . @petercrocker can you try with that? |
Beta Was this translation helpful? Give feedback.
-
In case of Nokia SR OS, the license is tied to the VM UUID which can be configured as follows (in Containerlab): |
Beta Was this translation helpful? Give feedback.
-
Related to this subject, there is this option for Arista vEOS which I thought was worth sharing here: Override SN in Arista vEOS
|
Beta Was this translation helpful? Give feedback.
-
I think we came to a conclusion that this is a Mission Impossible. |
Beta Was this translation helpful? Give feedback.
-
As part of a project I am working on (more to come in a different discussion), I have found a solution that works for me: When you reboot your server, your lab will be down. I initially thought that was it, and I would need to perform It's written in the docs:
With this in mind, if someone restarts my server, there's no need to cry and scream for hours; I just need to: netlab up --snapshot And magically, the lab will go back to its initial state. I'm sure there are caveats depending on configuration changes, so it may not be exactly the initial state, but it could be close! I hope that helps :) |
Beta Was this translation helpful? Give feedback.
As part of a project I am working on (more to come in a different discussion), I have found a solution that works for me:
netlab up --snapshot
.When you reboot your server, your lab will be down. I initially thought that was it, and I would need to perform
netlab restart
, which would DELETE and RECREATE the lab. The problem was that I did not know about the commandnetlab up --snapshot
: it will restart the lab without deleting it, using thenetlab.snapshot.yml
file.It's written in the docs: