Automation: Configuration cloning/replication best practice


#1

What is best practice for cloning/replicating a fully configured VyOS instance, assumed I create a completely new VM from scratch of the latest ISO (1.2.0) and want it to be identically configured as a previous one?

  1. https://wiki.vyos.net/wiki/Configuration_scripting
  2. save / load

#2

deploy
preconfigure
remove hw-id’s from interfaces and ssh keys
save
power off

Machine ready for cloning


#3

Thanks maybe my descriptions was a bit misleading, I meant more:

  1. Pulling out the config of the current machine
  2. Boot a new one from the latest iso
  3. Apply config from 1. to new machine

Is it better to
a) extract the config file from 1. with save and load it into the new machine.
b) or to save the config commands via show config commands and apply them via scripting?

Advantages, disadvantages…?


#4

run show configuration commands

into text file.
Edit…

copy -> paste in new VyOS


#5

another question - why not in place upgrade?


#6

That would be the normal procedure, yes.

Just wanted to know how I can properly migrate over the config to a new clean baseline in case I run again into weird behaviors like this https://phabricator.vyos.net/T750 without always having the effort configuring everything from scratch again.


#7

Got it! i’m usually will load full config
and use show configuration commands to partially replicate some functionality