Page 1 of 1

[HowTo's] Juniper vMX(17) is missing ge-* interfaces

Posted: Fri Apr 28, 2017 9:40 pm
by fuller
Hello Everybody,

as title says this thread is dedicated to my struggle with vMX and maybe can help me to figure some things out. I will keep format of HowTo's cause I like it and it works :). I starts with images which are actually working for me and maybe I will help somebody.

Adding Juniper vMX images (Junos < 14.1R4)
FILE: vMX.vdi
Once the image is ready I need to copy it to EVE-NG and convert:

Code: Select all

/opt/qemu/bin/qemu-img convert -f vdi -O qcow2 vMX.vdi hda.qcow2
Creating the EVE-NG specific image, we first create a directory, and make sure that the directory is prefixed with the name vmx:

Code: Select all

mkdir -p /opt/unetlab/addons/qemu/vmx-14.1R1.10
mv hda.qcow2 /opt/unetlab/addons/qemu/vmx-14.1R1.10
Now clean up and fix permissions:

Code: Select all

rm -rf vMX.vdi
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Credentials:
Username: root
Password: <blank>


Adding Juniper vMX images (15.1F3 > Junos > 14.1R4)
FILE: vmx-14.1R8.6.tgz
Extract image (*.img) from downloaded archive. Upload the image to the EVE-NG master node. Login as root using SSH protocol convert the disk to the qcow2 format:

Code: Select all

/opt/qemu/bin/qemu-img convert -f qcow2 -O qcow2 jinstall64-vmx-14.1R8.6-domestic.img hda.qcow2
Creating the EVE-NG specific image, we first create a directory, and make sure that the directory is prefixed with the name vmx:

Code: Select all

mv hda.qcow2 /opt/unetlab/addons/qemu/vmx-14.1R8.6
Clean and fix permissions:

Code: Select all

rm -f jinstall64-vmx-14.1R8.6-domestic.img
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Credentials:
Username: root
Password: <blank>

vFP and vCP in Single VM

To run VFP and VCP in single VM you have to added one line[vm_local_rpio="1"] to /boot/loader.conf

Code: Select all

login: root
root@% clear

root@% echo 'vm_local_rpio="1"' >> /boot/loader.conf
root@% grep rpio /boot/loader.conf
vm_local_rpio="1"

root@% reboot
Verification

Code: Select all

root@% cli
root> show version | match "model|junos:"
root> show chassis fpc pic-status
  Slot 0   Online       Virtual FPC
    PIC 0  Online       Virtual 10x1GE PIC
root> show interfaces ge-* terse

So far so good but I'm stuck with newer version of vMX routers, see post below.

Workstation/version: Intel 6700k with 16GB dedicated to EVE-NG 2.0.3-60

Re: [HowTo's] Juniper vMX

Posted: Mon May 01, 2017 10:06 pm
by fuller
Setup:
Hardware : Intel Core i7-6700K (1 CPU / 8 Core,VT-X : Enabled ), 16GB RAM assign to EVE-NG
EVE-NG 2.0.3-60 running in : VMware Workstation Pro 12.5.5

Adding Juniper vMX images (Junos > 15.1F3)

FILE: vmx-bundle-17.1R1.8.tgz (vCP: junos-vmx-x86-64-17.1R1.8.qcow2 / vFC: vFPC-20170216.img)

vCP
Extract image (*.qcow2) from downloaded archive(*.tgz). Upload the downloaded image to the EVE-NG master node. Login as root using SSH protocol rename the disk to the qcow2 format:

Code: Select all

/opt/qemu/bin/qemu-img convert -f qcow2 -O qcow2 junos-vmx-x86-64-17.1R1.8.qcow2 hda.qcow2   
Creating the EVE-NG specific image, we first create a directory, and make sure that the directory is prefixed with the name vmxvcp:

Code: Select all

mkdir -p /opt/unetlab/addons/qemu/vmxvcp-17.1R1.8
mv hda.qcow2 /opt/unetlab/addons/qemu/vmxvcp-17.1R1.8
Clean and fix permissions:

Code: Select all

rm -f junos-vmx-x86-64-17.1R1.8.qcow2
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Credentials:
Username: root
Password: <blank>

vPF
Extract image (*.img) from downloaded archive(*.tgz). Upload the downloaded image to the EVE-NG master node. Login as root using SSH protocol convert the disk to the qcow2 format:

Code: Select all

/opt/qemu/bin/qemu-img convert -f raw -O qcow2 vFPC-20170216.img hda.qcow2
Creating the EVE-NG specific image, we first create a directory, and make sure that the directory is prefixed with the name vmxvfp:

Code: Select all

mkdir -p /opt/unetlab/addons/qemu/vmxvfp-17.1R1.8
mv hda.qcow2 /opt/unetlab/addons/qemu/vmxvfp-17.1R1.8
Clean and fix permissions:

Code: Select all

rm -f vFPC-20170216.img
/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Credentials:
Username: root
Password: root


Image
Both VMs were booted, but I DON'T see ge-* interfaces.

unl_wrapper.txt

Code: Select all

May 01 23:26:16 INFO: starting /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 2 -t "vMX-VFP" -F /opt/qemu/bin/qemu-system-x86_64 -d 0 --  -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00 -netdev tap,id=net0,ifname=vunl0_2_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01 -netdev tap,id=net1,ifname=vunl0_2_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02 -netdev tap,id=net2,ifname=vunl0_2_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03 -netdev tap,id=net3,ifname=vunl0_2_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04 -netdev tap,id=net4,ifname=vunl0_2_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05 -netdev tap,id=net5,ifname=vunl0_2_5,script=no -device virtio-net-pci,netdev=net6,mac=50:00:00:02:00:06 -netdev tap,id=net6,ifname=vunl0_2_6,script=no -device virtio-net-pci,netdev=net7,mac=50:00:00:02:00:07 -netdev tap,id=net7,ifname=vunl0_2_7,script=no -device virtio-net-pci,netdev=net8,mac=50:00:00:02:00:08 -netdev tap,id=net8,ifname=vunl0_2_8,script=no -device virtio-net-pci,netdev=net9,mac=50:00:00:02:00:09 -netdev tap,id=net9,ifname=vunl0_2_9,script=no -device virtio-net-pci,netdev=net10,mac=50:00:00:02:00:0a -netdev tap,id=net10,ifname=vunl0_2_10,script=no -device virtio-net-pci,netdev=net11,mac=50:00:00:02:00:0b -netdev tap,id=net11,ifname=vunl0_2_11,script=no -smp 4 -m 8192 -name vMX-VFP -uuid 2e0ad46a-25f9-43f5-b24d-438f6725c11c -hda hda.qcow2 -machine type=pc-
May 01 23:26:16 INFO: starting /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 1 -t "vMX-VCP" -F /opt/qemu/bin/qemu-system-x86_64 -d 0 --  -nographic -device e1000,netdev=net0,mac=50:00:00:01:00:00 -netdev tap,id=net0,ifname=vunl0_1_0,script=no -device e1000,netdev=net1,mac=50:00:00:01:00:01 -netdev tap,id=net1,ifname=vunl0_1_1,script=no -smp 2 -m 2048 -name vMX-VCP -uuid 844bab4b-a265-4a5f-b6d9-a714c39b5bde -hda hda.qcow2 -machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic > /opt/unetlab/tmp/0/806f95ac-835c-4cb7-b506-2927c520938f/1/wrapper.txt 2>&1 &
vCP verification

Code: Select all

root> show interfaces terse 
Interface               Admin Link Proto    Local                 Remote
cbp0                    up    up
demux0                  up    up
dsc                     up    up
em0                     up    up
em1                     up    up
esi                     up    up
gre                     up    up
ipip                    up    up
irb                     up    up
lo0                     up    up
lo0.16384               up    up   inet     127.0.0.1           --> 0/0
lo0.16385               up    up   inet     128.0.0.1           --> 0/0
                                            128.0.0.4           --> 0/0
                                   inet6    fe80::200:f:fc00:0
lsi                     up    up
mtun                    up    up
pimd                    up    up
pime                    up    up
pip0                    up    up
pp0                     up    up
rbeb                    up    up
tap                     up    up
vtep                    up    up        
                                        
root> show chassis fpc 
error: Unrecognized command (chassis-control)

root> ping 128.0.0.16 routing-instance __juniper_private1__ 
PING 128.0.0.16 (128.0.0.16): 56 data bytes
ping: sendto: No route to host
ping: sendto: No route to host
ping: sendto: No route to host
^C
--- 128.0.0.16 ping statistics ---
3 packets transmitted, 0 packets received, 100% packet loss

root> show arp vpn __juniper_private1__ 

It's not working as I expected, but I gave it another try, I added(HDDs) to vCP.
FILE: vmx-bundle-17.1R1.8.tgz (vCP: junos-vmx-x86-64-17.1R1.8.qcow2; vmxhdd.img; metadata-usb-re.img / vFC: vFPC-20170216.img)

Code: Select all

/opt/qemu/bin/qemu-img convert -f qcow2 -O qcow2 /opt/unetlab/addons/qemu/vmxvcp-17.1R1.8/vmxhdd.img /opt/unetlab/addons/qemu/vmxvcp-17.1R1.8/hdb.qcow2
/opt/qemu/bin/qemu-img convert -f raw -O qcow2 /opt/unetlab/addons/qemu/vmxvcp-17.1R1.8/metadata-usb-re.img /opt/unetlab/addons/qemu/vmxvcp-17.1R1.8/hdc.qcow2      

Code: Select all

/opt/unetlab/wrappers/unl_wrapper -a fixpermissions
Image
After adding vmxhdd.img(hdb) & metadata-usb-re.img(hdc) vCP have not even booted.

unl_wrapper.txt

Code: Select all

May 01 23:58:44 INFO: starting /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 2 -t "vMX-VFP" -F /opt/qemu/bin/qemu-system-x86_64 -d 0 --  -nographic -device virtio-net-pci,netdev=net0,mac=50:00:00:02:00:00 -netdev tap,id=net0,ifname=vunl0_2_0,script=no -device virtio-net-pci,netdev=net1,mac=50:00:00:02:00:01 -netdev tap,id=net1,ifname=vunl0_2_1,script=no -device virtio-net-pci,netdev=net2,mac=50:00:00:02:00:02 -netdev tap,id=net2,ifname=vunl0_2_2,script=no -device virtio-net-pci,netdev=net3,mac=50:00:00:02:00:03 -netdev tap,id=net3,ifname=vunl0_2_3,script=no -device virtio-net-pci,netdev=net4,mac=50:00:00:02:00:04 -netdev tap,id=net4,ifname=vunl0_2_4,script=no -device virtio-net-pci,netdev=net5,mac=50:00:00:02:00:05 -netdev tap,id=net5,ifname=vunl0_2_5,script=no -device virtio-net-pci,netdev=net6,mac=50:00:00:02:00:06 -netdev tap,id=net6,ifname=vunl0_2_6,script=no -device virtio-net-pci,netdev=net7,mac=50:00:00:02:00:07 -netdev tap,id=net7,ifname=vunl0_2_7,script=no -device virtio-net-pci,netdev=net8,mac=50:00:00:02:00:08 -netdev tap,id=net8,ifname=vunl0_2_8,script=no -device virtio-net-pci,netdev=net9,mac=50:00:00:02:00:09 -netdev tap,id=net9,ifname=vunl0_2_9,script=no -device virtio-net-pci,netdev=net10,mac=50:00:00:02:00:0a -netdev tap,id=net10,ifname=vunl0_2_10,script=no -device virtio-net-pci,netdev=net11,mac=50:00:00:02:00:0b -netdev tap,id=net11,ifname=vunl0_2_11,script=no -smp 4 -m 8192 -name vMX-VFP -uuid 2e0ad46a-25f9-43f5-b24d-438f6725c11c -hda hda.qcow2 -machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic > /opt/unetlab/tmp/0/806f95ac-835c-4cb7-b506-2927c520938f/2/wrapper.txt 2>&1 &
May 01 23:58:44 INFO: starting /opt/unetlab/wrappers/qemu_wrapper -T 0 -D 1 -t "vMX-VCP" -F /opt/qemu/bin/qemu-system-x86_64 -d 0 --  -nographic -device e1000,netdev=net0,mac=50:00:00:01:00:00 -netdev tap,id=net0,ifname=vunl0_1_0,script=no -device e1000,netdev=net1,mac=50:00:00:01:00:01 -netdev tap,id=net1,ifname=vunl0_1_1,script=no -smp 2 -m 2048 -name vMX-VCP -uuid 844bab4b-a265-4a5f-b6d9-a714c39b5bde -hda hda.qcow2 -hdb hdb.qcow2 -hdc hdc.qcow2 -machine type=pc-1.0,accel=kvm -serial mon:stdio -nographic > /opt/unetlab/tmp/0/806f95ac-835c-4cb7-b506-2927c520938f/1/wrapper.txt 2>&1 &
At this moment I would be really thankful, to get those ge-* in my vMX.

Re: [HowTo's] Juniper vMX(17) is missing ge-* interfaces

Posted: Tue May 02, 2017 10:30 pm
by Uldis (UD)

Re: [HowTo's] Juniper vMX(17) is missing ge-* interfaces

Posted: Fri May 05, 2017 10:08 pm
by fuller
Uldis (UD) wrote:
Tue May 02, 2017 10:30 pm
Oh sir:)

here you are:

http://www.eve-ng.net/index.php/documen ... -16-x-17-x
gj Uldis as always and big thanks for that guide, unfortunately did not help right a way. It helped to confirm I'm on right track.

First thing was to find out why that bloody machine(vMX-17) doesnt boot up. Something inside EVE-NG had broken down and after I deleted images from "/opt/unetlab/tmp/0/<lab_id>" it started to boot up, but not interfaces, grrr. Lesson learned and your guide just came out, perfect so I deployed new EVE-NG, ... and you can guess, yep no interface ge-*, no change. Why not try diff release so I tested 15.1F6.9 / 16.2R1.6 and they have ge-* interfaces, that's weird. First thoughts, 6GB RAM not enough memory? and YES, older version of vMX satisfied just with 6GB for vFP but releases vMX-17+ need to 8GB+ to run correctly.

I would say the vmxvfp.php need little update

Code: Select all

$p['ram'] = 8192;
Btw in that HowTo what do u mean with
Default username is admin without password.
Did you wanted to type
vCP: root / <blank>
vFP: root / root

Re: [HowTo's] Juniper vMX(17) is missing ge-* interfaces

Posted: Sun May 07, 2017 9:40 am
by Uldis (UD)
Correct how to is here

http://www.eve-ng.net/index.php/documen ... -16-x-17-x

Juniper recommendation for lab environment is:
VCP CPUx1, 2G RAM
VFP CPUx3, 4G RAM

Tested with such settings 17.1 and works great

Re: [HowTo's] Juniper vMX(17) is missing ge-* interfaces

Posted: Tue May 09, 2017 12:27 am
by gangadar1234
bTW..how much time it takes for you boot. I have configured the same way as "how To", however the ge interface doesn't show up.
I am running this on esxi server with 16 core @ 2.09ghz and 64gb ram.

is there are any tweaks that needs to be done in order to make it faster ?

Re: [HowTo's] Juniper vMX(17) is missing ge-* interfaces

Posted: Tue May 09, 2017 10:55 pm
by fuller
Uldis (UD) wrote:
Sun May 07, 2017 9:40 am
Correct how to is here

http://www.eve-ng.net/index.php/documen ... -16-x-17-x

Juniper recommendation for lab environment is:
VCP CPUx1, 2G RAM
VFP CPUx3, 4G RAM

Tested with such settings 17.1 and works great
yep, Uldis good catch, vMX17.1 with assigned vCP CPUx1, 2G RAM / vFP CPUx3, 4G RAM works like charm, I was able to boot in 6mins(~4,5GHz). After 15+mins on the current default values(vCP CPUx2, 2G RAM / vFP CPUx4, 6G RAM)[vmxvfp.php] I ended with:

Code: Select all

root> show chassis fpc pic-status    
Slot 0   Offline      Virtual FPC 
gangadar1234 wrote:
Tue May 09, 2017 12:27 am
bTW..how much time it takes for you boot. I have configured the same way as "how To", however the ge interface doesn't show up.
I am running this on esxi server with 16 core @ 2.09ghz and 64gb ram.

is there are any tweaks that needs to be done in order to make it faster ?
vMXs arent the fastest booted device overhere, @slime_cat had some idea here but I would say everything under 10min is ok.

Re: [HowTo's] Juniper vMX(17) is missing ge-* interfaces

Posted: Wed May 10, 2017 9:02 pm
by Uldis (UD)
default values will be fixed in next release