Rename Erases Configs on vMX routers

Before posting something, READ the changelog, WATCH the videos, howto and provide following:
Your install is: Bare metal, ESXi, what CPU model, RAM, HD, what EVE version you have, output of the uname -a and any other info that might help us faster.

Moderator: mike

Post Reply
idc
Posts: 7
Joined: Wed Sep 30, 2020 8:44 pm

Rename Erases Configs on vMX routers

Post by idc » Wed Oct 21, 2020 7:38 pm

Hello,
I renamed my lab from Test to MPLS Core, and the routers all booted up minus their configs.
I see that a new directory looks to have been created as below, likely as a part of the renaming process:
root@eve-ng:/opt/unetlab/tmp# ls -al
total 280
drwxrwsr-x 4 root unl 4096 Oct 21 13:35 .
drwxr-xr-x 12 root root 4096 Oct 14 10:53 ..
drwxrwsr-x 3 root unl 4096 Oct 14 15:26 0
drwxrwsr-x 3 root unl 4096 Oct 21 13:35 1
-rw-rw-r-- 1 root unl 267264 Oct 14 14:24 index
root@eve-ng:/opt/unetlab/tmp#

There haven't been any other labs on this server, and the subdirectories are identical (7 vCp/vFP pairs for 14 separate nodes/subdirectories) so i believe that the original lab is there with a copy. I don't mind too much, it's just early stages, but the nodes in directory '0' don't seem to be accessible. At the very least I would like to clean it up, since it's a waste of space, at the most I would like to access it again so that I don't have to configure them with the base config all over again.
If this is expected behaviour, that would be all good, but again, the original directory for the router images is wasting space and is inaccessible by the application.

directory lists:
root@eve-ng:/opt/unetlab/tmp/0/e26d3faf-3290-4900-b9c3-c363beaf16aa# ls -al
total 64
drwxrwsr-x 16 root unl 4096 Oct 16 14:54 .
drwxrwsr-x 3 root unl 4096 Oct 14 15:26 ..
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 1
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 10
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 11
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 12
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 13
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 14
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 2
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 3
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 4
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 5
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 6
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 7
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 8
drwxrwsr-x 2 root unl 4096 Oct 21 13:33 9
root@eve-ng:/opt/unetlab/tmp/0/e26d3faf-3290-4900-b9c3-c363beaf16aa# cd ../../1/e26d3faf-3290-4900-b9c3-c363beaf16aa/
root@eve-ng:/opt/unetlab/tmp/1/e26d3faf-3290-4900-b9c3-c363beaf16aa# ls -al
total 64
drwxrwsr-x 16 root unl 4096 Oct 21 13:35 .
drwxrwsr-x 3 root unl 4096 Oct 21 13:35 ..
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 1
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 10
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 11
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 12
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 13
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 14
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 2
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 3
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 4
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 5
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 6
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 7
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 8
drwxrwsr-x 2 root unl 4096 Oct 21 15:02 9
root@eve-ng:/opt/unetlab/tmp/1/e26d3faf-3290-4900-b9c3-c363beaf16aa#

Any ideas?

edit: this is a brand new bare metal install, completed last week.

Thanks,
Ian.

Uldis (UD)
Posts: 5080
Joined: Wed Mar 15, 2017 4:44 pm
Location: London
Contact:

Re: Rename Erases Configs on vMX routers

Post by Uldis (UD) » Thu Oct 22, 2020 6:51 am

First I would give you clear what and how to clone full lab.
See doc attached. In next Pro I hope this will be GUI based
You copied from POD 0 to POD 1
POD is number assigned to the username.. Usually POD0 is admin...
You do not have the required permissions to view the files attached to this post.

idc
Posts: 7
Joined: Wed Sep 30, 2020 8:44 pm

Re: Rename Erases Configs on vMX routers

Post by idc » Thu Oct 22, 2020 2:07 pm

That makes sense, thanks for your reply.
I did change usernames, I wasn't aware of how that would affect things. I guess I can just log in as admin and or the user in POD 1 and delete the routers then, if I don't need them?

Could I share the lab in pod 0 with pod 1? or any other Pods or do I have to clone it? What works best?

Thanks,

Ian.

edit: I am going over the docs, I'll update if I find my answers there.

idc
Posts: 7
Joined: Wed Sep 30, 2020 8:44 pm

Re: Rename Erases Configs on vMX routers

Post by idc » Thu Oct 22, 2020 3:36 pm

So i logged in with the admin account, and moved the lab into the shared folder. Then I logged out and logged in as an user with admin privileges and launched the lab. So the admin account had configurations on the nodes, and the user account with admin privileges had blank configs. Would it be correct to assume that this is by design? It's fine if it is, just so i can understand how it's working.
Is there a way to share a lab and configs between users? If it's by cloning, that's fine, I'll just have to understand what that involves as well then.

I just wanted to say, we are just coming from the GNS3 world and this platform is pretty nice! I'm just trying to understand the user sharing and all the other ins and outs before i spend a lot of time converting our production configs into the lab topology. With GNS3 I've had to redo the process a few times when things got overwritten, etc. and I'm trying to avoid having to do it more than once.

idc
Posts: 7
Joined: Wed Sep 30, 2020 8:44 pm

Re: Rename Erases Configs on vMX routers

Post by idc » Thu Oct 22, 2020 10:44 pm

Hello,
I've been reading the docs, and searching online for a method, and it seems like the correct method is to export the configs and set them as startup configs for the copied/cloned lab. Now the issue I'm having is that the export config function isn't working on my Juniper routers. They are set as type vmx, and I'm logged in to a console window when I make the attempt. What happens is a few carriage returns and then the exit command is entered. I've tried to check the hostname to make sure it doesn't have an issue with matching the expect, and it seems to work in a regex program. I did have a little longer hostname, so i changed it to 'test' so that the prompt is 'root@test>" and 'root@test#~ #'. This didn't solve the issue. Any ideas on what might be happening here?

Thanks,
Ian.

idc
Posts: 7
Joined: Wed Sep 30, 2020 8:44 pm

Re: Rename Erases Configs on vMX routers

Post by idc » Thu Oct 22, 2020 11:34 pm

I fixed the export, I had the image directory names wrong. I'm now trying to export the configs and import them to another users lab.

idc
Posts: 7
Joined: Wed Sep 30, 2020 8:44 pm

Re: Rename Erases Configs on vMX routers

Post by idc » Thu Oct 22, 2020 11:45 pm

And then i read the doc you attached. Spells it out pretty well, lol.

Thanks
Ian.

idc
Posts: 7
Joined: Wed Sep 30, 2020 8:44 pm

Re: Rename Erases Configs on vMX routers

Post by idc » Fri Oct 23, 2020 12:04 am

Last post of the day.
When I set the startup-config it tries to mount /dev/cd0 but gets the following error:
root@:~ # mount -t cd9660 /dev/cd0 /mnt
g_vfs_done():cd0[READ(offset=32768, length=2048)]error = 6
mount_cd9660: /dev/cd0: Device not configured

I expect there isn't much that can be done, maybe dependent on the hardware?
Any thoughts?

Thanks,
Ian.

edit: this shows up at boot:
cd0 at ata1 bus 0 scbus1 target 0 lun 0
cd0: <QEMU QEMU DVD-ROM 2.5+> Removable CD-ROM SCSI device
cd0: Serial Number QM00003
cd0: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes)
cd0: Attempt to query device size failed: NOT READY, Medium not present

edit2:
the next few lines:
cd1 at ata1 bus 0 scbus1 target 1 lun 0
cd1: <QEMU QEMU DVD-ROM 2.5+> Removable CD-ROM SCSI device
Timecounter "TSC" frequency 1698090296 Hz quality 1000
cd1: Serial Number QM00004
cd1: 16.700MB/s transfers (WDMA2, ATAPI 12bytes, PIO 65534bytes)
cd1: 0MB (175 2048 byte sectors)

show that cd1 is present. I can manually mount it and load the juniper.conf startup-config file. Is there a way to force the script to use cd1?

Thanks,
Ian.

Post Reply