The VMX is Juniper’s latest product in it’s virtual products portfolio. Official page is https://www.juniper.net/us/en/products-services/routing/mx-series/vmx/.
Update: Juniper Virtual MX (vMX) 14.2R5.3 Phase 2 (RE and MPC on different VMs).
At the time of this article, VMX is not released yet, but it can be obtained for beta testing through sales channel so you can request to IMG image which is qcow2 QEMU file format for usage with KVM hypervisor.
The virtual MX deployment had two phases:
Phase 1 based on Junos 14.1 having the Routing Engine and the virtual PFE in the same virtual machine (with a note that releases above 14.1R4 need a tweak to enable the local PFE instead of using a separate VM)
Phase 2 based on Junos 14.2 splitting the RE and PFE in different virtual machines and using an IP connection between them for communication.
I’m going to provide a short tutorial for deploying Phase 1 vMX running 14.1R4.9 with the tweak to enable the local virtual PFE (in the same VM).
To install the virtual MX router under VMWare ESXi hypervisor, we need to convert the qcow2 img vmx image, that it is shipped at this time, to vmdk disk format (vmware specific).
Converting vMX qcow2 / img disk to VMWare vmdk format
Copy the IMG vmx disk file on a QEMU installed system and run the following command to convert to vmdk:
# qemu-img convert -f qcow2 -O vmdk jinstall-vmx-14.1R4.9-domestic.img VMX-P6-14.1R4.9.vmdk
Setting the VMWare ESXi host to import the newly created VMDK disk
Once the VMDK disk is created, it needs to be copied to the ESXi host. Since this will be virtual machine disk that will get imported, we need to set up a special directory to reflect the VM name. In my case, I use it as P6 router, so I will make a /vmfs/volumes/datastore1/VMX-P6-14.1R4 directory for this vMX and copy the VMX-P6-14.1R4.9.vmdk disk inside it.
Creating the vMX virtual machine in vsphere client
In this step, it is required to create a new virtual machine and follow the next steps:
– Use a “Custom” configuration.
– Provide the name of the VM: “VMX-P6-14.1R4″ in my case.
– Select resource pool or use the default.
– Select the destination datastore for VM files.
– Select “Virtual Machine Version: 8″
– Select “Other” and “Other (64-bit)” operating system.
– Select at least 2 CPUs for the VM (one virtual socket and 2 cores per virtual socket in my case).
– Select 1 GB RAM memory.
– Add 4 NICs with E1000 adapter.
– Select “LSA Logic SAS” adapter.
– Chose “Use an existing virtual disk”.
– Browse the ESXi localstore holding the above VMDK disk file.
Note: At this stage it is important to know that vMX has 4 interfaces: em0, em1, em2 and em3. VMX will map em2 to ge-0/0/0, em3 to ge-0/0/1 and so on until ge-0/0/9 so the 3rd interface assigned to the virtual machine (em2) should be connected to the ESXi vSwitch that connects to the management LAN to provide access.
First steps to set up the vMX running 14.1R4.9 Junos
Using the vSphere client, power on and open the vMX console and wait for it to provide the login prompt. Login as “root” and you will be logged to the BSD shell.
Use “cli” command to go into Junos CLI and “conf” to start the configuration.
Issuing the “run show chassis fpc pic-status” from Junos configuration mode, you will see that the Virtual PFE is in “Present” state, not “Online” as it should. After a few minutes it will go into “Offline” state.
This is because vMX based on 14.1R4+ will try to connect to a remote PFE (different virtual machine) using IP subnet 172.16.0.1/16 on em1 interface used for RE and distributed PFE communication, but I do not have a distributed PFE so I want to use local PFE. To enable it, add vm_local_rpio=”1″ line to /boot/loader.conf and save the file. This will take effect after next reboot.
While still in configuration mode, we need to enable ge-0/0/0 interface to hook into traffic coming on the 3rd interface (em2). To do so, ge-0/0/0 interface needs static mac assignment as the mac of em2 interface. Also ge-0/0/0 will need an IP address from the management LAN.
The next step is to set a root password because without it, Junos will not allow any commits.
Now reboot vMX with “run request system reboot” and confirmation.
After reboot, the virtual PFE will be “Online” and it will bring up ge-0/0/0 to ge-0/0/9 interfaces and the vMX will be accessible via ssh:
$ ssh 10.1.1.156 The authenticity of host '10.1.1.156 (10.1.1.156)' can't be established. ECDSA key fingerprint is 6d:b1:01:0b:af:0f:ea:26:ba:6b:a0:66:ad:80:ce:8a. No matching host key fingerprint found in DNS. Are you sure you want to continue connecting (yes/no)? yes Warning: Permanently added '10.1.1.156' (ECDSA) to the list of known hosts. Password: Password: --- JUNOS 14.1R4.9 built 2015-02-01 01:53:57 UTC root@% root@% cli root> show chassis fpc pic-status Slot 0 Online Virtual FPC PIC 0 Online Virtual 10x1GE PIC root> show interfaces ge* terse Interface Admin Link Proto Local Remote ge-0/0/0 up up ge-0/0/0.0 up up inet 10.1.1.156/24 multiservice ge-0/0/1 up up ge-0/0/2 up up ge-0/0/3 up up ge-0/0/4 up up ge-0/0/5 up up ge-0/0/6 up up ge-0/0/7 up up ge-0/0/8 up up ge-0/0/9 up up root> show interfaces em* terse Interface Admin Link Proto Local Remote em1 up up em1.0 up up inet 172.16.0.1/16 inet6 fe80::20c:29ff:fe2a:c1b7/64 em2 up up em3 up up root> show interfaces fxp* terse Interface Admin Link Proto Local Remote fxp0 up up
Let’s discuss the above output:
– Virtual FPC0 (the local virtual PFE is online).
– 1 there are 4 interfaces assigned to the vMX virtual machine and they are mapped in the following manner:
1st NIC – fxp0 – management interface hooked directly into the Routing Engine
2nd NIC – em0
3rd NIC – em1 – Used for RE to distributed PFE communication
4th NIC – em2 – ge-0/0/0
13th NIC – em11 – ge-0/0/9
I used ge-0/0/0 here for the management lan and not fxp0 interface to make the interface mapping more visible, but fxp0 interface should be used for management, so let’s fix that:
 root> configure Entering configuration mode  root# delete interfaces ge-0/0/0  root# set interfaces fxp0.0 family inet address 10.1.1.156/24  root# set system host-name P6  root# commit commit complete  root@P6#
At this point, virtual MX is set up, has a hostname P6, uses 1st interface as fxp0 as an RE interface, 2nd interface as em0 (not clear to me atm what it is used for), 3rd interface as em1 used for RE / PFE communication, 4th -to 13th interfaces as em2-em11 hooked into the PFE mapped as ge-0/0/0 to ge-0/0/9 interfaces once these ge* interfaces are configured to used the mac addresses of the corresponding em2+ interfaces.
vMX is intended to have feature parity with the Juniper’s physical MX 3D router and I have tested to work:
– BGP RR, iBGP, eBGP, multipath, Add-path.
– LDP, RSVP, IGP TE, RSVP-TE, CSPF, VPLS, L3VPN, L2VPN, EVPN.
– virtual bridges.
Flowspec I havent tested.
[Admin Edit]: I have created following forum for vMX related discussions: https://forum.ivorde.com/juniper-virtual-mx-vmx-f146.html