Installing vMX on Contrail
Read this topic to understand how to install the virtual MX router in the Juniper Networks Contrail environment.
Installing vMX on Contrail
After preparing the OpenStack environment, we need to create nova flavors and glance images for the VCP and VFP VMs. Scripts create the flavors and images based on information provided in the startup configuration file.
Setting Up the vMX Configuration File
The parameters required to configure vMX are defined in the startup configuration file (vmx.conf).
To set up the configuration file:
Specifying vMX Configuration File Parameters
The parameters required to configure vMX are
defined in the startup configuration file (vmx.conf). The startup configuration file generates a file that is used to
create flavors. To create new flavors with different vcpus
or memory-mb
parameters, you must change the corresponding re-flavor-name
or pfe-flavor-name
parameter before
creating the new flavors.
To customize the configuration, perform these tasks:
Configuring the Host
To configure the host, navigate to HOST and specify the following parameters:
virtualization-type
—Mode of operation; must beopenstack
.cpu-pinning
—Specifies whether VCP and VFP are pinned to vCPU on host. By default,cpu-pinning
is on and we recommend this setting.compute
—(Optional) Names of the compute node on which to run vMX instances in a comma-separated list. If this parameter is specified, it must be a valid compute node. If this parameter is specified, vMX instance launched with flavors are only run on the specified compute nodes.If this parameter is not specified, the output of the
nova hypervisor-list
command provides the list of compute nodes on which to run vMX instances.
Configuring the VCP VM
To configure the VCP VM, you must provide the flavor name.
We recommend unique values for the re-flavor-name
parameter because OpenStack can create multiple entries with the
same name.
To configure the VCP VM, navigate to CONTROL_PLANE and specify the following parameters:
re-flavor-name
—Name of the nova flavor.vcpus
—Number of vCPUs for the VCP; minimum is 2.memory-mb
—Amount of memory for the VCP; minimum is 4 GB.
Configuring the VFP VM
To configure the VFP VM, you must provide the flavor name. Based on your requirements, you might want to change the memory and number of vCPUs. See Hardware Requirements for minimum hardware requirements.
To configure the VFP VM, navigate to FORWARDING_PLANE and specify the following parameters:
pfe-flavor-name
—Name of the nova flavor.memory-mb
—Amount of memory for the VFP; minimum is 12 GB (performance mode) and 4 GB (lite mode).vcpus
—Number of vCPUs for the VFP; minimum is 7 (performance mode) and 3 (lite mode).Note:If you specify less than 7 vCPUs, the VFP automatically switches to lite mode.
Creating OpenStack Flavors
To create flavors for the VCP and VFP, you must execute the script on the vMX startup configuration file (vmx.conf).
To create OpenStack flavors:
If you are running on a vRouter in DPDK mode, you must
enable Huge Pages for the VCP flavor with the nova flavor-key re-flavor-name set hw:mem_page_size=2048
command.
Installing vMX Images
To install the vMX software images for the VCP and VFP, you
can execute the vmx_osp_images.sh
script. The script adds
the VCP image in qcow2 format and the VFP file in vmdk format.
To install the VCP and VFP images:
For example, this command installs the VCP image as re-test from the /var/tmp/junos-vmx-x86-64-17.3R1.8.qcow2 file and the VFP image as fpc-test from the /var/tmp/vFPC-20170817.img file.
sh vmx_osp_images.sh re-test /var/tmp/junos-vmx-x86-64-17.3R1.8.qcow2
fpc-test /var/tmp/vFPC-20170817.img
To view the glance images, use the glance image-list
command.
Starting a vMX Instance
To start a vMX instance, perform these tasks:
Modifying the Initial Junos OS Configuration
When you start the vMX instance, the Junos OS configuration file found in scripts/openstack/vmx-templates/liberty/vmx_baseline.conf is loaded. If you need to change this configuration, make any changes in this file before starting the vMX.
If you create your own vmx_baseline.conf file or move the file, make sure that the scripts/openstack/vmx-templates/liberty/re.yaml references the correct path.
Launching the vMX Instance
To create and start the vMX instance:
You must shut down the vMX instance before you reboot host server using the request system halt command.
When you deploy a vMX instance with DPDK-enabled vRouter, the virtio interface (int interface) might be down if you restart vRouter service.
Workaround:
Define metadata tunable upfront during the deployment of the vMX instance. The support for the new tuanable is available from Junos OS Release 19.4 onwards.
Add the metadata variable in RE yaml file or in FPC yaml file. Example: For updating RE yaml file, navigate to package_location/vmx/openstack/vmx-components/vms/re.yaml and set the variable as shown below:
virtio_lockup_timeout: timeout-value
Example:
virtio_lockup_timeout: 10
In the example, lockup timeout value is set as 10 seconds. You can set the value in the range of 10 through 1000 seconds.