Populate Arista cEOS Serial Number with Containerlab
How to populate the serial number on Arista cEOS containers with Containerlab.
cEOS Container Has No Serial
If the show version
output on your Arista cEOS container is missing the serial number like so:
Arista cEOSLab
Hardware version:
Serial number:
Hardware MAC address: 001c.7381.fbc9
System MAC address: 001c.7381.fbc9
Here’s how you can implement a fix with Containerlab.
Create a file named
ceos-config
and populate it with your desired serial number:SERIALNUMBER=123654789
Instruct your relevant
kind
to mount the config file to the container:topology: kinds: ceos: image: ceos:4.30.5M extras: ceos-copy-to-flash: - path/to/ceos-config nodes: # etc
Redeploy your topology:
containerlab deploy -t your_topology_file --reconfigure
Verify the changes via
show version
:Arista cEOSLab Hardware version: Serial number: 123654789 Hardware MAC address: 001c.7381.fbc9 System MAC address: 001c.7381.fbc9
Parting Thoughts
This can come in handy if you’re developing textfsm templates, experimenting with NAPALM, testing with the next generation of Nautobot Device Onboarding App, or any other scenario where you need a device to have a serial number.
Cheers to the Containerlab team for having stellar documentation and functionality! And a big shoutout to Arista for making great networking products.