Export Lab Configuration
Posted: Thu Jun 08, 2017 12:12 pm
Is it possible to export the startup-config my existing labs? If yes, how? Thanks 

#### 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
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
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
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.
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.