So, really "not working" is not very useful information!
I still not able to understand what exactly not working
1. open console is not related to the script .. you can have open console without any issues (actually is recommended you can see what the script do in real time )
2. one of my note is to be sure the node is up and running before do export config.
The reason is very simple, the script is heavily related to timeouts. The idea is to be sure you see for example routeros login screen before click export config.
Also this is important since depend on your eve-ng resources (like cpu/ram) .. with more resources eve-ng nodes will but faster and vice versa .. will boot slower which directly effect the timeouts in question.
3. For import (aka add config on startup) .. This is active only once (this is not related to the script .. there is a lock file in the lab if the node is already configured ! ).
You can try to stop the node, wipe it and then start it in order the import start-config work.
for more info
https://www.eve-ng.net/wp-content/uploa ... 1-2022.pdf
10.3.4 Boot nodes from exported config set
It will be very useful if you can provide logs from /opt/unetlab/data/Logs/unl_wrapper.txt
for example
export:
Dec 09 21:39:51 INFO: exporting /opt/unetlab/scripts/config_mikrotik.py -a get -p 32770 -f /tmp/unl_cfg_2_2EoMGD -t 45
Dec 09 21:39:51 DEBUG: lab saved
import: (startup-config on wipe node):
Dec 09 21:40:55 INFO: importing nohup /opt/unetlab/scripts/config_mikrotik.py -a put -p 32769 -f /opt/unetlab/tmp/0/4a00d157-781c-41ae-a30d-1ba1a6efab4a/1/startup-config -t 300 > /dev/null 2>&1 &
here is example if 'admin' user password is set (my fix is to make 3 times login retries .. in order to not loop the script in login process ):
Dec 09 21:45:15 INFO: exporting /opt/unetlab/scripts/config_mikrotik.py -a get -p 32779 -f /tmp/unl_cfg_11_xSetlJ -t 45
Dec 09 21:45:15 ERROR: Failed to export (80060).
Dec 09 21:45:15 ERROR: Failed to login via console login prompt after 3 login retries `admin pwd reset: /user/set admin password=""`
Dec 09 21:45:15 Dec 09 21:45:15 ERROR: Failed to export config (16).
NOTE: this script have additional custom parameters however it is not easy task to be implemented since eve-ng cli.php parameters are hardcoded !!
Will be good idea if eve-ng add a setting for custom scripts (free text ?!)for such operations, with that eve-ng team will be offloaded of work for node os specifics and users will be able to add their own ...
NOTE2: I did not test it for eve-ng pro version only for community edition .. I don't think there is differences for node configuration import/export scripts but I'm not sure as well !
NOTE3: I'm a single person ( aka only I work on this script ) and I do not have a time for testing , I think the script work without any issues, I test it with different scenarios, what can be a problem with the script .. if script try to export really huge routeros configuration !! I did not test that for sure .. no idea what will be the result
Regards,