… updated on Tuesday, February 15, 2022 14:37 UTC
Build Vagrant Boxes for Your Network Devices
One of the toughest hurdles to overcome when building your own virtual networking lab is the slog of downloading VM images for your favorite network devices and building Vagrant boxes1 in case you want to use them with Vagrant or netlab.
You can find box-building recipes on the Internet – codingpackets.com has a dozen of them – but they tend to be a bit convoluted and a smidge hard-to-follow the first time you’re trying to build the boxes (trust me, I’ve been there).
I finally had enough and built a simple scaffold for libvirt box-building. It takes the mundane parts out of the process:
- Starting a VM (you still have to download the disk image though)
- Killing the VM after you’re done with initial configuration
- Packing the VM disk as a Vagrant box and adding the desired metadata.
There are people out there who automated the whole process (example). I don’t want to be a perpetual maintainer of ever-changing quirks – you’ll still have to do a few bits on your own with the help of as-simple-as-they-can-get instructions.
The current netlab version can build Arista vEOS, Nexus 9300v, Cisco CSR, and Juniper vSRX boxes (you can always find the up-to-date list here). If you feel like contributing another box-building recipe please get in touch.
Other options:
- It seems like vrnetlab project automated building Docker containers for a number of platforms. You could build those, add them to netlab, and use the with containerlab platform.
- GNS3 is always an option for GUI enthusiasts.
Release History
- 2022-02-15
- netsim-tools release 1.1.3 added build recipes for Cisco CSR and Juniper vSRX.
-
Cisco Nexus 9300v, Arista vEOS, and Cumulus VX are available as a Vagrant box for VirtualBox. Cumulus VX is also available as a Vagrant box for libvirt. YMMV. ↩︎