For deployment, we need at least 2 virtual machines and downloaded archives of the vMX itself.

First, let’s create the necessary vlans and bridges (the process itself is up to you):

  • vpc11 - private link betwen vCP and vFP - must be dedicated per each vMX clutser
  • vmbr33 - management network (out of band)
  • vmbr34 - data network

Deploy vCP

  • net0 - fxp0 management interface
  • net1 - link between vCP and vFP
cd /root/junos/vmxvcp-20.4R2.7

qm create 1001 --name=vmx-city17-pe1-vcp0 --memory=2048 --sockets=2 --cores=1 --balloon=0 \
  --machine pc-q35-8.0 --serial0=socket --scsihw=virtio-scsi-pci --cpu=host --ostype=l26 \
  --net0=virtio,bridge=vmbr33 --net1=virtio,bridge=vpc11

qm importdisk 1001 virtioa.qcow2 local-lvm
qm importdisk 1001 virtiob.qcow2 local-lvm

mv virtioc.qcow2 virtioc.img
qm importdisk 1001 virtioc.img local-lvm

qm set 1001 --scsi0 local-lvm:vm-1001-disk-0
qm set 1001 --scsi1 local-lvm:vm-1001-disk-1
qm set 1001 --scsi2 local-lvm:vm-1001-disk-2

qm set 1001 --boot order=scsi0

Deploy vFP

  • net0 - named in system as ext - management interface - not used, so disabled
  • net1 - link between vCP and vFP
  • net2 and more - traffic interfaces (in my case xe-0/0/*)
cd /root/junos/vmxvfp-20.4R2.7

qm create 1002 --name=vmx-city17-pe1-vfp0 --memory=4096 --sockets=2 --cores=2 --balloon=0 \
  --machine pc-q35-8.0 --scsihw=virtio-scsi-pci --cpu=host --serial0=socket --ostype=l26 \
  --net0=virtio,bridge=vmbr33,link_down=1 --net1=virtio,bridge=vpc11 --net2=virtio,bridge=vmbr34 

mv virtioa.qcow2 virtioa.img
qm importdisk 1002 virtioa.img local-lvm

qm set 1002 --ide0 local-lvm:vm-1002-disk-0
qm set 1002 --boot order=ide0

Startup configurtion

For the fist boot of VM’s - need around 2-5 minutes.

It can be configured automatically via ZTP, but that’s for another time. Now we will do everything manually.

Configure after boot:

delete interfaces
delete chassis
delete protocols
delete system processes

set system host-name vmx-city17-pe1

set system services ssh root-login allow
set system root-authentication plain-text-password

set chassis fpc 0 lite-mode
set chassis fpc 0 pic 0 tunnel-services bandwidth 10g
set chassis fpc 0 pic 0 interface-type xe
set chassis fpc 0 pic 0 number-of-ports 8

set system management-instance
set interfaces fxp0 unit 0 family inet address 172.17.172.55/24
set routing-instances mgmt_junos routing-options static route 0.0.0.0/0 next-hop 172.17.172.1

commit

Without this command - you cannot show FPC in chassis command:

set chassis fpc 0 lite-mode

Check connectivity between vCP and vFP

From vCP to vFP:

root> ping 128.0.0.16 routing-instance __juniper_private1__

From vFP to vCP:

root@qemux86-64:~# ping 128.0.0.1

Result

root@vmx-city17-pe1> show chassis hardware
Hardware inventory:
Item             Version  Part number  Serial number     Description
Chassis                                VM1111111111      VMX
Midplane
Routing Engine 0                                         RE-VMX
CB 0                                                     VMX SCB
FPC 0                     BUILTIN      BUILTIN           Virtual FPC
  CPU            Rev. 1.0 RIOT-LITE    BUILTIN
  MIC 0                                                  Virtual
    PIC 0                 BUILTIN      BUILTIN           Virtual

root@vmx-city17-pe1> show interfaces xe-* terse
Interface               Admin Link Proto    Local                 Remote
xe-0/0/0                up    up
xe-0/0/0.16386          up    up
xe-0/0/1                up    down
xe-0/0/1.16386          up    down
xe-0/0/2                up    down
xe-0/0/2.16386          up    down
xe-0/0/3                up    down
xe-0/0/3.16386          up    down
xe-0/0/4                up    down
xe-0/0/4.16386          up    down
xe-0/0/5                up    down
xe-0/0/5.16386          up    down
xe-0/0/6                up    down
xe-0/0/6.16386          up    down
xe-0/0/7                up    down
xe-0/0/7.16386          up    down