Containerlabs setting: suppress-startup-config does not work with Arista vEOS.
vEOS does have support for ztp and it would be nice having support for ztp in vEOS by default when running with supress-startup-config.
I dont know the best approach if it is a option to either build the image in 2 different modes. One with ztp enabled or disabled or having this be done on bootup somehow.
I have managed to get ztp working by modifying the Makefile and launch-script like this:
First modify the Makefile and swap out the docker-pre-build so it configures a zerotouch-config file with Disabled=False.
# File: vrnetlab/veos/Makefile
docker-pre-build:
# checking if ZTP config contains a string (DISABLE=False) in the file /zerotouch-config
# if it does, we don't need to write this file
@echo Checking ZTP status
ZTPOFF=$(shell docker run --rm -it -e LIBGUESTFS_DEBUG=0 -v $$(pwd):/work cmattoon/guestfish --ro -a $(IMAGE) -m /dev/sda2 cat /zerotouch-config 2> /dev/null || echo "false"); \
echo "$@: ZTPOFF is $$ZTPOFF" && \
if [ "$$ZTPOFF" != "DISABLE=False" ]; then \
echo "Enabling ZTP" && docker run --rm -it -e LIBGUESTFS_DEBUG=0 -v $$(pwd):/work cmattoon/guestfish -a $(IMAGE) -m /dev/sda2 write /zerotouch-config "DISABLE=False"; \
fi
Then modify the docker/launch.py script to not do any initial config.
I just commented out the following lines in the function bootstrap_spin on line 71->76
# File: vrnetlab/veos/docker/launch.py
# Omitted lines ...
def bootstrap_spin(self):
# Omitted lines ...
# self.logger.debug("matched login prompt")
# self.logger.debug("trying to log in with 'admin'")
# self.wait_write("admin", wait=None)
# run main config!
# self.bootstrap_config()
# Omitted lines ..
Containerlabs setting: suppress-startup-config does not work with Arista vEOS.
vEOS does have support for ztp and it would be nice having support for ztp in vEOS by default when running with supress-startup-config.
I dont know the best approach if it is a option to either build the image in 2 different modes. One with ztp enabled or disabled or having this be done on bootup somehow.
I have managed to get ztp working by modifying the Makefile and launch-script like this:
First modify the Makefile and swap out the docker-pre-build so it configures a zerotouch-config file with Disabled=False.
Then modify the docker/launch.py script to not do any initial config.
I just commented out the following lines in the function bootstrap_spin on line 71->76