
Export Lab Configuration
Moderator: mike
-
- Posts: 35
- Joined: Sat Jun 03, 2017 3:18 pm
Export Lab Configuration
Is it possible to export the startup-config my existing labs? If yes, how? Thanks 

-
- Posts: 5179
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: Export Lab Configuration
Export is possible for startup cfg.
Watch video about configuration operation.
http://www.eve-ng.net/index.php/documen ... figuations
UD
Watch video about configuration operation.
http://www.eve-ng.net/index.php/documen ... figuations
UD
-
- Posts: 59
- Joined: Sun Mar 19, 2017 9:20 pm
Re: Export Lab Configuration
#### UPDATE - I logged into the devices as root and the config backs up - I did not realise this! I always setup a new lab user (super-user) and a ansible user (super-user with ssh-rsa key) so never login as root normally ###Uldis (UD) wrote: ↑Thu Jun 08, 2017 7:30 pmExport is possible for startup cfg.
Watch video about configuration operation.
http://www.eve-ng.net/index.php/documen ... figuations
UD

Still interesated in where the config is saved out to

Hi. Thought I would post here rather than start a new post. I've viewed the video above in the past and recently due to mixed results.
I am running 2.0.3-60 on bare metal, Dual quad core Xeon with 24GB RAM, the lab works perfectly.
I had managed to create some startup-configs using the EVE-NG function but then it stopped working (a while back). So I have cleared all the older ones and tried to get it working from scratch so to speak. The only device I can get to create a backup is a CSR (just a fresh node in the topology that had never existed before), All the rest of the nodes that support backups (vSRX, VMX, Cisco switch and vPCs) will not backup - all fail with error 16.
I dug around in the tmp directory and can see on the Juniper nodes that serveral files seemed to contain the old backups:
So I tried deleting the files that were older files that when opened in notepad++ were juniper configurations and end up with just:config.iso hda.qcow2 juniper.conf startup-config wrapper.txt
The vMX in question still runs fine and the nvram config is still intact - so I am a bit confused and stumped to what allows backups, where they go and what my issue is?hda.qcow2 wrapper.txt
I am not too worried at the moment as I don't use the EVE backup/start-config function yet and I have Ansible installed on Ubuntu to backup configs
Keep up the good work - EVE is fantastic

Some log output below:
Code: Select all
un 10 22:16:37 INFO: stopping fuser -n tcp -k -TERM 32783 > /dev/null 2>&1
Jun 10 22:16:26 Jun 10 22:16:26 ERROR: Failed to export config (16).
Jun 10 22:16:26 ERROR: timeout occurred.
Jun 10 22:16:26 ERROR: Failed to export (80060).
Jun 10 22:16:26 INFO: exporting /opt/unetlab/scripts/config_vsrx.py -a get -p 32783 -f /tmp/unl_cfg_15_osDyaY -t 15
Jun 10 22:13:37 INFO: starting /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 15 -t "OAK02-R1" -F /opt/qemu/bin/qemu-system-x86_64 -d 0 -- -nographic -device e1000,netdev=net0,mac=50:00:00:0f:00:00 -netdev tap,id=net0,ifname=vunl0_15_0,script=no -device e1000,netdev=net1,mac=50:00:00:0f:00:01 -netdev tap,id=net1,ifname=vunl0_15_1,script=no -device e1000,netdev=net2,mac=50:00:00:0f:00:02 -netdev tap,id=net2,ifname=vunl0_15_2,script=no -device e1000,netdev=net3,mac=50:00:00:0f:00:03 -netdev tap,id=net3,ifname=vunl0_15_3,script=no -smp 2 -m 2048 -name OAK02-R1 -uuid 7b69dd00-c7d0-4942-8a78-56a313ddae2a -hda hda.qcow2 -drive file=virtioa.qcow2,if=virtio,bus=0,unit=0,cache=none -machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic -nodefconfig -nodefaults -rtc base=utc > /opt/unetlab/tmp/0/49cc6933-e45f-433d-8aef-f0f97684bd65/15/wrapper.txt 2>&1 &
Jun 10 22:13:37 INFO: CWD is /opt/unetlab/tmp/0/49cc6933-e45f-433d-8aef-f0f97684bd65/15
Jun 10 22:13:37 INFO: tunctl -u unl0 -g root -t vunl0_15_3 2>&1
Jun 10 22:13:37 INFO: tunctl -u unl0 -g root -t vunl0_15_2 2>&1
Jun 10 22:13:37 INFO: tunctl -u unl0 -g root -t vunl0_15_1 2>&1
Jun 10 22:13:37 INFO: tunctl -u unl0 -g root -t vunl0_15_0 2>&1
Jun 10 22:08:19 INFO: stopping fuser -n tcp -k -TERM 32795 > /dev/null 2>&1
Jun 10 22:08:19 INFO: stopping fuser -n tcp -k -TERM 32796 > /dev/null 2>&1
Jun 10 22:08:18 INFO: stopping fuser -n tcp -k -TERM 32772 > /dev/null 2>&1
Jun 10 21:33:19 Jun 10 21:33:19 ERROR: Failed to export config (16).
Jun 10 21:33:19 ERROR: timeout occurred.
Jun 10 21:33:19 ERROR: Failed to export (80060).
Jun 10 21:33:19 INFO: exporting /opt/unetlab/scripts/config_vmx.py -a get -p 32772 -f /tmp/unl_cfg_4_fDn3Uf -t 15
Jun 10 21:11:28 INFO: starting /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 4 -t "vMX4" -F /opt/qemu/bin/qemu-system-x86_64 -d 0 -- -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:04:00:00 -netdev tap,id=net0,ifname=vunl0_4_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:04:00:01 -netdev tap,id=net1,ifname=vunl0_4_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:04:00:02 -netdev tap,id=net2,ifname=vunl0_4_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:04:00:03 -netdev tap,id=net3,ifname=vunl0_4_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:04:00:04 -netdev tap,id=net4,ifname=vunl0_4_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:04:00:05 -netdev tap,id=net5,ifname=vunl0_4_5,script=no -smp 1 -m 1024 -name vMX4 -uuid 55a09f26-5546-4701-88d9-1433d89e294b -hda hda.qcow2 -machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic > /opt/unetlab/tmp/0/49cc6933-e45f-433d-8aef-f0f97684bd65/4/wrapper.txt 2>&1 &
Jun 10 21:11:28 INFO: CWD is /opt/unetlab/tmp/0/49cc6933-e45f-433d-8aef-f0f97684bd65/4
Jun 10 21:11:28 INFO: tunctl -u unl0 -g root -t vunl0_4_5 2>&1
-
- Posts: 5179
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: Export Lab Configuration
all simple. Even node is booted from initial startup cfg, it does NOT mean you have saved it with wr into NVRAM.
for export running config you must be sure that you have done wr, or commit only after you can use export cfg.
Juniper specific is that export working from cli mode. cfg export supported on SRX, SRXNG, vMX, vMXNG, vQFX.
vPCS need give command save
UD
for export running config you must be sure that you have done wr, or commit only after you can use export cfg.
Juniper specific is that export working from cli mode. cfg export supported on SRX, SRXNG, vMX, vMXNG, vQFX.
vPCS need give command save
UD
-
- Posts: 59
- Joined: Sun Mar 19, 2017 9:20 pm
Re: Export Lab Configuration
Hi thanks.
For curiosity:
Where does the export config get written to?
Does the 'normal' nvram Juniper commited config get stored in the tmp directories node spectic hda.qcow2?
Cheers
OK - I get that your config is not going to be saved into nvram without a wr or commit, Also I get you can't export a config unless you have saved it using wr or commit. That as you say is simple.Uldis (UD) wrote: ↑Sun Jun 11, 2017 6:23 amall simple. Even node is booted from initial startup cfg, it does NOT mean you have saved it with wr into NVRAM.
Do you mean CLI mode BUT as root? My attempts to do a EVE export in cli mode (but none root user but still super user) fail? Looking at the python in retrospect it seems to hinge around the root access being avalaible to proxy the pull of the config?Juniper specific is that export working from cli mode.
For curiosity:
Where does the export config get written to?
Does the 'normal' nvram Juniper commited config get stored in the tmp directories node spectic hda.qcow2?
Cheers
-
- Posts: 5179
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: Export Lab Configuration
just tested SRXv works
root@vSRX-1> show version
Hostname: vSRX-1
Model: firefly-perimeter
JUNOS Software Release [12.1X47-D20.7]
Main requirement for node export cfg is: YOU MUST BE LOGGED IN !!
Export works from any cfg level, %, cli and edit.
cfg is exported to labname.unl file, coded format.
root@vSRX-1> show version
Hostname: vSRX-1
Model: firefly-perimeter
JUNOS Software Release [12.1X47-D20.7]
Main requirement for node export cfg is: YOU MUST BE LOGGED IN !!
Export works from any cfg level, %, cli and edit.
cfg is exported to labname.unl file, coded format.
You do not have the required permissions to view the files attached to this post.
-
- Posts: 59
- Joined: Sun Mar 19, 2017 9:20 pm
Re: Export Lab Configuration
Hi OK thanks - as mentioned in the previous post I got it working BUT ONLY LOGGED IN AS ROOT! As mentioned above I WAS logged in but NOT as root - get me? So in a round about way you have answerd my issue/question and clarified the previous issues above as your example clearly shows you logged in as ROOT - this isn't as clear as it could be in video and how tosUldis (UD) wrote: ↑Sun Jun 11, 2017 7:16 pmjust tested SRXv works
root@vSRX-1> show version
Hostname: vSRX-1
Model: firefly-perimeter
JUNOS Software Release [12.1X47-D20.7]
Main requirement for node export cfg is: YOU MUST BE LOGGED IN !!
Export works from any cfg level, %, cli and edit.
cfg is exported to labname.unl file, coded format.

Keep up the great work.
Cheers

-
- Posts: 5179
- Joined: Wed Mar 15, 2017 4:44 pm
- Location: London
- Contact:
Re: Export Lab Configuration
yes log as root is amust, because script it for root
-
- Posts: 59
- Joined: Sun Mar 19, 2017 9:20 pm
-
- Posts: 35
- Joined: Sat Jun 03, 2017 3:18 pm
Re: Export Lab Configuration
Where does the exported configs go if I do "More Actions --> Export All CFGs"?
Thanks,
venerzky
Thanks,
venerzky