{"id":20074231,"url":"https://github.com/juniper/openjnpr-container-vmx","last_synced_at":"2025-10-18T23:28:19.745Z","repository":{"id":40601759,"uuid":"141690453","full_name":"Juniper/OpenJNPR-Container-vMX","owner":"Juniper","description":"OpenJNPR-Container-vMX","archived":false,"fork":false,"pushed_at":"2021-11-12T09:42:28.000Z","size":104,"stargazers_count":86,"open_issues_count":6,"forks_count":29,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-09T04:26:37.613Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Juniper.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-20T09:12:03.000Z","updated_at":"2024-09-23T16:33:24.000Z","dependencies_parsed_at":"2022-09-20T12:16:33.695Z","dependency_job_id":null,"html_url":"https://github.com/Juniper/OpenJNPR-Container-vMX","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2FOpenJNPR-Container-vMX","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2FOpenJNPR-Container-vMX/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2FOpenJNPR-Container-vMX/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Juniper%2FOpenJNPR-Container-vMX/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Juniper","download_url":"https://codeload.github.com/Juniper/OpenJNPR-Container-vMX/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252580026,"owners_count":21771252,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-13T14:49:59.393Z","updated_at":"2025-10-18T23:28:14.693Z","avatar_url":"https://github.com/Juniper.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# OpenJNPR-Container-vMX\n\n[![](https://images.microbadger.com/badges/version/juniper/openjnpr-container-vmx:bionic.svg)](https://microbadger.com/images/juniper/openjnpr-container-vmx:bionic \"Get your own version badge on microbadger.com\") [![](https://images.microbadger.com/badges/image/juniper/openjnpr-container-vmx:bionic.svg)](https://microbadger.com/images/juniper/openjnpr-container-vmx:bionic \"Get your own image badge on microbadger.com\") use with Juniper vMX 18.2 and newer\n\n[![](https://images.microbadger.com/badges/version/juniper/openjnpr-container-vmx:trusty.svg)](https://microbadger.com/images/juniper/openjnpr-container-vmx:trusty \"Get your own version badge on microbadger.com\") [![](https://images.microbadger.com/badges/image/juniper/openjnpr-container-vmx:trusty.svg)](https://microbadger.com/images/juniper/openjnpr-container-vmx:trusty \"Get your own image badge on microbadger.com\") use with Juniper vMX 17.4 up to 18.1\n\n- Apr 2021: Verfied to launch vMX 21.1R1.11\n- Jan 2021: Verfied to launch vMX 20.4R1.12\n\nFor 17.3 and older, please use [tag pre17.4](https://github.com/Juniper/OpenJNPR-Container-vMX/releases/tag/pre17.4).\n\nhttps://hub.docker.com/r/juniper/openjnpr-container-vmx/\n\nDocker container to launch Junos vMX 17.4 and newer versions on baremetal compute nodes. While the Junos control plane (VCP) runs on top of Qemu-kvm, the forwarding plane (VFP/RIOT) runs natively in the container:\n\n```                                          \n       +------------------------------+\n       |  +-------------+             |\n       |  |  Junos VCP  |             |\n       |  |  qcow2 VM   |             |\n       |  +-------------+             |\n       |  +-------------+  +--------+ |\n       |  | qemu-system |  |  riot  | |\n       |  +-------------+  +--------+ |\n       +------------------------------+\n```\n\n## Features\n\n- vMX runs in light mode via attached container network interfaces\n- Orchestration via docker-compose and manual launch via 'docker run'\n- Container waits for networking interfaces to be attached to container\n- Supports all Docker network plugins, including macvlan and overlays\n- vMX VCP (Junos control plane) runs on top of qemu within the container\n- Forwarding engine (riot) is downloaded from the VCP image at runtime and launched \n- vMX runs in light-mode (no SR-IOV support)\n- Virtual network names are learned at runtime from Docker (via socket) and used to provision the interface description via ephemeral DB\n- Management interface fxp0, root password and ssh public key for root and the user launching the container are learned at runtime and added to an Junos apply-group openjnpr-container-vmx\n- If no Junos configuration file is provided, the apply-group openjnpr-container-vmx is used\n- The virtual network list is sorted by network name at runtime (to work around the unpredictable order with docker-compose). This requires docker socket access from the container (provided via volume mount)\n- Auto-installation of provided license keys\n- Loading of optional Junos configuration file at startup \n- Auto-configuration of ssh and netconf\n- Assigned IP address to container becomes the IP address of fxp0 \n- Serial console and RIOT messages are available in the container console via [docker attach](https://docs.docker.com/engine/reference/commandline/attach/) and via [docker logs](https://docs.docker.com/engine/reference/commandline/logs/).\n- Load custom YANG schema, deviation and action script at startup\n\n## Minimum Requirements\n\n- Linux based compute node with a Linux kernel 4.4.0 and kvm hardware acceleration\n- CPU must be of family Ivy Bridge or newer (released 2013)\n- Container requires privileged mode (to access hugepages, required by riot)\n- Memory hugepages provisioned (1GB per vMX)\n- [Docker](https://www.docker.com/get-docker) 17.03 or newer (e.g. ubuntu package docker.io)\n- [docker-compose](https://docs.docker.com/compose/) (e.g. ubuntu package docker-compose)\n- junos-vmx-x86-64-17.4R1.16.qcow2 image, extracted from the vmx-bundle-*tgz file available at https://www.juniper.net/support/downloads/?p=vmx or as an eval download from https://www.juniper.net/us/en/dm/free-vmx-trial/ (registration required)\n\n## Getting Started\n\n### Required compute host packages\n\nIn order to build and launch the containers, the following packages must be installed. Example shown for ubuntu 18.04, adjust accordingly:\n\n```\n$ sudo apt-get update\n$ sudo apt-get install make git docker.io docker-compose\n```\n\n### Clone this repo\n\n```\n$ pwd\n/home/lab\n$ git clone https://github.com/Juniper/OpenJNPR-Container-vMX.git\n$ cd OpenJNPR-Container-vMX\n```\n\n### Download and extract Junos-vmx-x86-*.qcow2\n\nDownload and unpack the qcow2 image from a vmx-bundle-*.tgz file from  https://www.juniper.net/support/downloads/?p=vmx or as an eval download from https://www.juniper.net/us/en/dm/free-vmx-trial/ (registration required):\n\n```\n$ pwd\n/home/lab/OpenJNPR-Container-vMX\ntar zxf vmx-bundle-18.2R1.9.tgz\n$ mv vmx/images/junos-vmx-x86-64-18.2R1.9.qcow2 .\n$ rm -rf vmx\n```\n\nNo other file is required from the bundle, hence it is ok to remove the extracted files. \n\n### Adjust docker-compose.yml\n\nAdjust the environment variables IMAGE for vmx1 and vmx2 to match the qcow2 filename. \n\nIf the junos version is 18.2R1 or newer, make sure to use the container image juniper/openjnpr-container-vmx:bionic. For any Junos version 18.1 and older, use the container image juniper/openjnpr-container-vmx:trusty.\n\nIf left unchanged, the compoe file expects junos-vmx-x86-64-18.2R1.9.qcow2 and junos-vmx-x86-64-18.1R1.9.qcow2 to be present in the current directory.\n\n### riot worker cores\n\nIf many instances are launched, its recommended to distribute the cpu worker cores used by riot by setting WORKER_CORE to different\ncore numbers. The value given is the cpu number (not count).\n\n### Enable hugepages\n\nDefine at least 1024 x 2MB hugepages or 2 x 1GB hugepages via kernel options by adding \n\n```\nGRUB_CMDLINE_LINUX=\"default_hugepagesz=1G hugepagesz=1G hugepages=2\"\n```\n\nor\n\n```\nGRUB_CMDLINE_LINUX=\"hugepages=1024\"\n```\n\nto the file /etc/default/grub, followed by running update-grub and reboot:\n\n```\n$ sudo update-grub\n$ reboot\n```\n\nOnce the system is back, check the availability of hugepages (the example shown has 16x1GB pages reserved):\n\n```\n$ cat /proc/meminfo |grep Huge\nAnonHugePages:         0 kB\nShmemHugePages:        0 kB\nHugePages_Total:      16\nHugePages_Free:       16\nHugePages_Rsvd:        0\nHugePages_Surp:        0\nHugepagesize:    1048576 kB\n```\n\nNote: hugepages are no longer required. riot is launched with --no-huge \n\n### ssh public/private keypair\n\nCreate or check the presence of a ssh public/private, rsa based key pair, typically located in ~/.ssh/:\n\n```\n$ ls ~/.ssh/\nauthorized_keys  id_rsa  id_rsa.pub  known_hosts\n```\n\nThe content of the id_rsa.pub file will automatically be used to create a login user within the Junos configuraiton file at runtime, allowing you to ssh into the vMX instance without password. \n\nTo create a fresh keypair, use the following command and accept all defaults:\n\n```\n$ ssh-keygen -t rsa\n```\n\n### Custom YANG support\n\nPlace you custom YANG schema, deviation files and action script files in the same location\nas the config nd name them via these environment variables in your docker-comose.yml file:\n\n```\nYANG_SCHEMA=\"l2vpn.yang\"\nYANG_DEVIATION=\"l2vpn-dev.yang\"\nYANG_ACTION=\"l2vpn.slax\"\nYANG_PACKAGE=\"custom-l2vpn\"\n```\n\nThese files will be automatically added to the config drive together with an execution \nscript to activate them prior to loading and checking the provided Junos configuration.\n\n### Build the container\n\nThis step is optional, as pre-built containers will automatically be downloaded from Docker Hub. To build the containers locally, use 'make build', then check the binary containers via 'docker images':\n\n```\n$ make build\n...\nSuccessfully tagged juniper/openjnpr-container-vmx:bionic\n...\nSuccessfully tagged juniper/openjnpr-container-vmx:trusty\n\n$ docker images | head -3\nREPOSITORY                                      TAG                                        IMAGE ID            CREATED             SIZE\njuniper/openjnpr-container-vmx                  trusty                                     8436770a23eb        1 minute ago         597MB\njuniper/openjnpr-container-vmx                  bionic                                     7a85db4edd94        1 minute ago         428MB\n```\n\n### Launch the containers\n\nTime to launch the images. The vmx1 has a config file in the repo directory: [vmx1.conf](vmx.1conf), which only contains a single apply-group line. The group itself is auto-generated at runtime. vmx2 doesn't have a config file, hence the apply-group statement is auto-generated. This gives the user flexibility to use or not use the auto-generated configuration group.\nIMPORTANT: You must run make as non-root user. Otherwise the public key won't allow automatic access. \n\n```\n$ make up\n$ make up\ndocker-compose up -d\nCreating network \"openjnprcontainervmx_net-c\" with the default driver\nCreating network \"openjnprcontainervmx_net-b\" with the default driver\nCreating network \"openjnprcontainervmx_net-a\" with the default driver\nCreating network \"openjnprcontainervmx_mgmt\" with the default driver\nCreating openjnprcontainervmx_vmx2_1 ... done\nCreating openjnprcontainervmx_vmx1_1 ... done\n```\n\nIf all went well, you should see 2 running containers via 'docker ps':\n\n```\n$ docker ps\nCONTAINER ID        IMAGE                                   COMMAND                 CREATED             STATUS              PORTS                                                                         NAMES\n5feb4ed28608        juniper/openjnpr-container-vmx:trusty   \"/launch.sh\"            6 minutes ago       Up 6 minutes        0.0.0.0:32786-\u003e22/tcp, 0.0.0.0:32784-\u003e830/tcp                                 openjnpr-container-vmx_vmx2_1\n1ff00bcc723d        juniper/openjnpr-container-vmx:bionic   \"/launch.sh\"            6 minutes ago       Up 6 minutes        0.0.0.0:32789-\u003e22/tcp, 0.0.0.0:32788-\u003e830/tcp                                 openjnpr-container-vmx_vmx1_1\n```\n\nIf nothing is shown, then the containers likely terminated in error. Their logs are still available and provide details. The container names can be seen via 'docker ps -a' (show also terminated containers). Use 'docker logs \u003ccontainer\u003e' to get more info's. the log shown here is from a healthy container:\n\n```\n$ docker logs openjnprcontainervmx_vmx1_1\nJuniper Networks vMX Docker Light Container\n\nLinux cdbb818b9afc 4.15.0-29-generic #31-Ubuntu SMP Tue Jul 17 15:39:52 UTC 2018 x86_64\n\nCPU Model ................................ Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz\nCPU affinity of this container ........... 0-7\nKVM hardware virtualization extension .... yes\nTotal System Memory ...................... 62 GB\nFree Hugepages ........................... yes (16 x 1024 MB = 16384 MB)\nCheck for container privileged mode ...... yes\nCheck for sudo/root privileges ........... yes\nLoop mount filesystem capability ......... yes\ndocker access ............................ CONTAINER ID        IMAGE                                   COMMAND             CREATED             STATUS                  PORTS                                           NAMES\ncdbb818b9afc        juniper/openjnpr-container-vmx:bionic   \"/launch.sh\"        2 seconds ago       Up Less than a second   0.0.0.0:32913-\u003e22/tcp, 0.0.0.0:32912-\u003e830/tcp   openjnprcontainervmx_vmx1_1\nyes\n\nlcpu affinity ............................  0-7\n\nNUMA node(s):        1\nNUMA node0 CPU(s):   0-7\n\nsystem dependencies ok\n/u contains the following files:\nLICENSE\t\t\t\t  junos-vmx-x86-64-17.3R2.10.qcow2\nMakefile\t\t\t  junos-vmx-x86-64-17.4R1.16.qcow2\nREADME.md\t\t\t  junos-vmx-x86-64-18.1R1.9.qcow2\ndocker-compose.yml\t\t  junos-vmx-x86-64-18.1R2.5.qcow2\ndown.sh\t\t\t\t  junos-vmx-x86-64-18.2R1.9.qcow2\ngetpass.sh\t\t\t  license-eval.txt\nid_rsa.pub\t\t\t  regression\njunos-vmx-x86-64-16.1R7.7.qcow2   src\njunos-vmx-x86-64-17.3R1.10.qcow2  vmx1.conf\n/fix_network_order.sh: trying to fix network interface order via docker inspect myself ...\nMACS=02:42:ac:15:00:02 02:42:ac:14:00:02 02:42:ac:13:00:03 02:42:ac:12:00:02\n02:42:ac:15:00:02 eth0 == eth0\n02:42:ac:14:00:02 eth1 == eth1\n02:42:ac:13:00:03 eth3 -\u003e eth2\nFROM eth3 () TO eth2 ()\nActual changes:\ntx-checksumming: off\n\ttx-checksum-ip-generic: off\n\ttx-checksum-sctp: off\ntcp-segmentation-offload: off\n\ttx-tcp-segmentation: off [requested on]\n\ttx-tcp-ecn-segmentation: off [requested on]\n\ttx-tcp-mangleid-segmentation: off [requested on]\n\ttx-tcp6-segmentation: off [requested on]\nActual changes:\ntx-checksumming: off\n\ttx-checksum-ip-generic: off\n\ttx-checksum-sctp: off\ntcp-segmentation-offload: off\n\ttx-tcp-segmentation: off [requested on]\n\ttx-tcp-ecn-segmentation: off [requested on]\n\ttx-tcp-mangleid-segmentation: off [requested on]\n\ttx-tcp6-segmentation: off [requested on]\n02:42:ac:12:00:02 eth3 == eth3\nusing qcow2 image junos-vmx-x86-64-18.2R1.9.qcow2\nLICENSE=license-eval.txt\n168: eth0@if169: \u003cBROADCAST,MULTICAST,UP,LOWER_UP\u003e mtu 1500 qdisc noqueue state UP mode DEFAULT group default\n    link/ether 02:42:ac:15:00:02 brd ff:ff:ff:ff:ff:ff link-netnsid 0\nInterface  IPv6 address\nBridging  (/02:42:ac:15:00:02) with fxp0\nCurrent MAC:   02:42:ac:15:00:02 (unknown)\nPermanent MAC: 00:00:00:00:00:00 (XEROX CORPORATION)\nNew MAC:       28:c7:18:8a:06:7e (Altierre)\n-----------------------------------------------------------------------\nvMX openjnprcontainervmx_vmx1_1 (172.21.0.2) 18.2R1.9 root password deica3ootiojohsha5Eethae\n-----------------------------------------------------------------------\n\nbridge name\tbridge id\t\tSTP enabled\tinterfaces\nbr-ext\t\t8000.28c7188a067e\tno\t\teth0\n\t\t\t\t\t\t\tfxp0\nbr-int\t\t8000.f6cb09cbc6c5\tno\t\tem1\nCreating config drive /tmp/configdrive.qcow2\nMETADISK=/tmp/configdrive.qcow2 CONFIG=/tmp/vmx1.conf LICENSE=/u/license-eval.txt\nCreating config drive (configdrive.img) ...\nextracting licenses from /u/license-eval.txt\n  writing license file config_drive/config/license/E435890758.lic ...\nadding config file /tmp/vmx1.conf\n-rw-r--r-- 1 root root 458752 Jul 23 11:31 /tmp/configdrive.qcow2\nCreating empty /tmp/vmxhdd.img for VCP ...\nStarting PFE ...\nBooting VCP ...\nWaiting for VCP to boot... Consoles: serial port\nBIOS drive A: is disk0\nBIOS drive C: is disk1\nBIOS drive D: is disk2\nBIOS drive E: is disk3\nBIOS 639kB/1047424kB available memory\n\nFreeBSD/x86 bootstrap loader, Revision 1.1\n(builder@feyrith.juniper.net, Thu Jun 14 14:21:45 PDT 2018)\n-\n\nBooting from Junos volume ...\n|\n...\n```\n\nUse 'make ps' or ''./getpass.sh' to get the containers IP address and auto-generated root password (only required if the ssh id_rsa.pub key was missing):\n\n```\n./getpass.sh\nvMX openjnprcontainervmx_vmx1_1 (172.21.0.2) 18.2R1.9 deica3ootiojohsha5Eethae \t ...\nvMX openjnprcontainervmx_vmx2_1 (172.21.0.3) 18.1R1.9 eihaekahpeetungeekeerohr \t ...\n```\n\nThe '...' at the end of each line indicate, that the vMX aren't fully operational yet. Repeat above step until it says 'ready':\n\n```\n$ ./getpass.sh\nvMX openjnprcontainervmx_vmx1_1 (172.21.0.2) 18.2R1.9 deica3ootiojohsha5Eethae \t ready\nvMX openjnprcontainervmx_vmx2_1 (172.21.0.3) 18.1R1.9 eihaekahpeetungeekeerohr \t ready\n```\n\nThis takes typically less than 5 minutes.\nReady means the vMX is up and running and the forwarding engine is operational with interfaces attached. See section 'Troubleshooting' if it doesn't get ready.\n\nA successful tail of docker log output will show port status changed to up:\n\n```\n. . .\n\nRPIO: Accepted connection from localhost \u003c-\u003e localhost:3000\nRPIO: Accepted connection from localhost \u003c-\u003e localhost:3000\nRIOT: Received bandwidth config: b/w : 125000\n\nRIOT: Initializing policer for bank 0, bucket : 0 rate: 125000\n\nMETER: Low level srTCM config: \n\tCIR period = 12863, CIR bytes per period = 1\nRIOT: New policer index: 0\n\nRPIO: FIPS:handle_command:RIOT/RPIO received FIPS command \n\nriot_fips_ossl_kats_handler: FIPS:Filled Results:FIPS Self-tests for TDES-CBC Encrypt:PASSED\nFIPS Self-tests for TDES-CBC Decrypt:PASSED\nFIPS Self-tests for AES-CBC Encrypt:PASSED\nFIPS Self-tests for AES-CBC Decrypt:PASSED\nFIPS Self-tests for AES-GCM Encrypt:PASSED\nFIPS Self-tests for AES-GCM Decrypt:PASSED\nFIPS Self-tests for SHA-1:PASSED\nFIPS Self-tests for HMAC-SHA-1:PASSED\nFIPS Self-tests for SHA-2-256:PASSED\nFIPS Self-tests for HMAC-SHA-2-256:PASSED\nFIPS Self-tests for RSA Encrypt/Decrypt:PASSED\nFIPS Self-tests for RSA Sign/Verify:PASSED\n \nRPIO: FIPS:handle_command:RIOT/RPIO received FIPS command \n\nHOSTIF: Accepted connectionRUNTIME: Detected port 0 status changed to UP\n\nRUNTIME: Detected port 1 status changed to UP\n\nRUNTIME: Detected port 2 status changed to UP\n```\n\n\n### log into the vMX\n\nUse the IP address shown from the output of './getpass.sh' to log into the vMX:\n\n```\n$ ssh 172.21.0.2\nThe authenticity of host '172.21.0.2 (172.21.0.2)' can't be established.\nECDSA key fingerprint is SHA256:bMtOBbwBrgVcSGWc8FfNHj3Wwm029KBu/mByJWSCBp0.\nAre you sure you want to continue connecting (yes/no)? yes\nWarning: Permanently added '172.21.0.2' (ECDSA) to the list of known hosts.\n--- JUNOS 18.2R1.9 Kernel 64-bit  JNPR-11.0-20180614.6c3f819_buil\nmwiget@openjnprcontainervmx_vmx1_1\u003e show chassis fpc\n                     Temp  CPU Utilization (%)   CPU Utilization (%)  Memory    Utilization (%)\nSlot State            (C)  Total  Interrupt      1min   5min   15min  DRAM (MB) Heap     Buffer\n  0  Online           Testing   4         0        3      1      0    2047        7          0\n  1  Empty\n  2  Empty\n  3  Empty\n  4  Empty\n  5  Empty\n  6  Empty\n  7  Empty\n  8  Empty\n  9  Empty\n 10  Empty\n 11  Empty\n\nmwiget@openjnprcontainervmx_vmx1_1\u003e show interfaces descriptions\nInterface       Admin Link Description\nge-0/0/0        up    up   openjnprcontainervmx_net-a\nge-0/0/1        up    up   openjnprcontainervmx_net-b\nge-0/0/2        up    up   openjnprcontainervmx_net-c\nfxp0            up    up   openjnprcontainervmx_mgmt\n```\n\nThe interface descriptions are provided via ephemeral DB:\n\n```\nmwiget@openjnprcontainervmx_vmx1_1\u003e show ephemeral-configuration instance openjnpr-container-vmx-vfp0\n## Last changed: 2018-07-23 11:33:48 UTC\ninterfaces {\n    ge-0/0/0 {\n        description openjnprcontainervmx_net-a;\n    }\n    ge-0/0/1 {\n        description openjnprcontainervmx_net-b;\n    }\n    ge-0/0/2 {\n        description openjnprcontainervmx_net-c;\n    }\n    fxp0 {\n        description openjnprcontainervmx_mgmt;\n    }\n}\n```\n\nThe login and fxp0 configuration is provided via an apply-group. The actual passwords and keys are excluded from the output by omitting lines with the comment '## SECRET-DATA':\n\n```\nmwiget@openjnprcontainervmx_vmx1_1\u003e show configuration groups openjnpr-container-vmx | except SECRET\nsystem {\n    configuration-database {\n        ephemeral {\n            instance openjnpr-container-vmx-vfp0;\n        }\n    }\n    login {\n        user mwiget {\n            uid 2000;\n            class super-user;\n            authentication {\n            }\n        }\n    }\n    root-authentication {\n    }\n    host-name openjnprcontainervmx_vmx1_1;\n    services {\n        ssh {\n            client-alive-interval 30;\n        }\n        netconf {\n            ssh;\n        }\n    }\n    syslog {\n        file messages {\n            any notice;\n        }\n    }\n}\ninterfaces {\n    fxp0 {\n        unit 0 {\n            family inet {\n                address 172.21.0.2/16;\n            }\n        }\n    }\n}\nrouting-options {\n    static {\n        route 0.0.0.0/0 next-hop 172.21.0.1;\n    }\n}\n```\n\n### Terminate instances\n\n```\n$ make down\ndocker-compose down\nStopping openjnprcontainervmx_vmx1_1 ... done\nStopping openjnprcontainervmx_vmx2_1 ... done\nRemoving openjnprcontainervmx_vmx1_1 ... done\nRemoving openjnprcontainervmx_vmx2_1 ... done\nRemoving network openjnprcontainervmx_net-c\nRemoving network openjnprcontainervmx_net-b\nRemoving network openjnprcontainervmx_net-a\nRemoving network openjnprcontainervmx_mgmt\ndocker-compose -f regression/docker-compose.yml down\nRemoving network regression_net-c\nWARNING: Network regression_net-c not found.\nRemoving network regression_net-b\nWARNING: Network regression_net-b not found.\nRemoving network regression_net-a\nWARNING: Network regression_net-a not found.\nRemoving network regression_mgmt\nWARNING: Network regression_mgmt not found.\n```\n\n## Troubleshooting\n\n### Amensia mode (no config loaded)\n\nIf the vMX end up in Amnesia, most likely the kernel doesn't have the loop module loaded yet. Haven't found a workaround yet to this, other than loading that module on the Docker host via\n\n```\n$ sudo modprobe loop\n```\n\nBased on your linux distribution, it is possible to make this change persistent by placing the word 'loop' in the file /etc/modules.\n\nStop the containers, e.g. with 'docker-compose down' or 'make down' and launch them again.\n\n### check the container log for issues\n\n```\n$ docker logs openjnpr-container-vmx_vmx1_1\n```\n\nThen look for possible errors. A common one is when the provided junos configuration can't be committed. Search for 'Creating initial configuration' and see if there are any errors. \n\nYou can also log into the serial console of the router via\n\n``` \n$ make ps\n$ docker attach openjnpr-container-vmx_vmx1_1\n```\n\nHit enter and log in as root, using the password you can copy-paste from the output of 'make ps' command run before. To get out of the console session, hit ^P^Q.\n\n\n### No hugepages\n\nCheck if you have enough allocated hugepges left via\n\n```\n$ cat /proc/meminfo |grep Huge\nAnonHugePages:         0 kB\nShmemHugePages:        0 kB\nHugePages_Total:      16\nHugePages_Free:       16\nHugePages_Rsvd:        0\nHugePages_Surp:        0\nHugepagesize:    1048576 kB\n```\n\nThe actual amount in MB is Hugepagesize x HugePages_Free / 1024. In the example output that would be 16GB.\n\n### Distribute vmxt process on different cores\n\nPrior to 17.4, the launch script tries to randomize the cpu core assigned to the process vmxt (J-KERN). \nYou can limit the number of cores via the env variable NUMCPUS. The number of worker cores used by riot \nwill be NUMCPUS-3. \n\nWith 17.4, the process makes use of a configuration file in /etc/vmxt/init.conf to control the cpus used.\nThis file can be provided via the env variable VMXT at launch, pointing to a file that will be used if present.\nThis file doesn't seem to be used by 18.1 and newer versions.\n\n```\n$ cat vmxt.conf\nukern_cpu=\"2,4,6\"\n```\n\nand referenced via docker-compose (only VMXT shown):\n\n```\nenvironment:\n   - VMXT=vmxt.conf\n```\n\nThis will limit vmxt to use just cores 2,4 and 6.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Fopenjnpr-container-vmx","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjuniper%2Fopenjnpr-container-vmx","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjuniper%2Fopenjnpr-container-vmx/lists"}