Preparing the Ubuntu Host to Install vMX

 

To prepare the Ubuntu host system for installing vMX:

  1. Meet the minimum software and OS requirements described in Minimum Software Requirements for vMX. See Upgrading the Kernel and Upgrading to libvirt 1.2.19.

    If you are using Intel XL710 PCI-Express family cards, make sure you update the drivers. See Updating Drivers for the X710 NIC.

  2. Enable Intel VT-d in BIOS. (We recommend that you verify the process with the vendor because different systems have different methods to enable VT-d.)

    Refer to the procedure to enable VT-d available on the Intel Website.

  3. Disable KSM by setting KSM_ENABLED=0 in /etc/default/qemu-kvm.
  4. Disable APIC virtualization by editing the /etc/modprobe.d/qemu-system-x86.conf file and adding enable_apicv=0 to the line containing options kvm_intel.

    options kvm_intel nested=1 enable_apicv=0

  5. Restart the host to disable KSM and APIC virtualization.
  6. If you are using SR-IOV, you must perform this step.Note

    You must remove any previous installation with an external bridge in /etc/network/interfaces and revert to using the original management interface. Make sure that the ifconfig -a command does not show external bridges before you proceed with the installation.

    To determine whether an external bridge is displayed, use the ifconfig command to see the management interface. To confirm that this interface is used for an external bridge group, use the brctl show command to see whether the management interface is listed as an external bridge.

    Enable SR-IOV capability by turning on intel_iommu=on in the /etc/default/grub directory.

    GRUB_CMDLINE_LINUX_DEFAULT="intel_iommu=on"

    Append the intel_iommu=on string to any existing text for the GRUB_CMDLINE_LINUX_DEFAULT parameter.

    Run the update-grub command followed by the reboot command.

  7. For optimal performance, we recommend you configure the size of Huge Pages to be 1G on the host and make sure the NUMA node for the VFP has at least 16 1G Huge Pages. To configure the size of Huge Pages, add the following line in /etc/default/grub:

    GRUB_CMDLINE_LINUX="default_hugepagesz=1G hugepagesz=1G hugepages=number-of-huge-pages"

    The number of Huge Pages must be at least (16G * number-of-numa-sockets).

  8. Run the modprobe kvm-intel command before you install vMX.
Note

Starting in Junos OS 18.2 and later releases, Ubuntu 16.04.5 LTS and Linux 4.4.0-62-generic are supported.

To meet the minimum software and OS requirements, you might need to perform these tasks:

Upgrading the Kernel

Note

Upgrading Linux kernel in Ubuntu 16.04 version is not required.

Note

If you are using Ubuntu 14.04.1 LTS, which comes with 3.13.0-32-generic, you can skip this step. Ubuntu 14.04 comes with a lower version of kernel (Linux 3.13.0-24-generic) than the recommended version (Linux 3.13.0-32-generic).

To upgrade the kernel:

  1. Determine your version of the kernel.

  2. If your version differs from the version shown in step 1, run the following commands:

  3. Restart the system.

Upgrading to libvirt 1.2.19

Note

Ubuntu 16.04.5 supports Libvirt version is 1.3.1. Upgrading libvirt in Ubuntu 16.04 is not required.

Ubuntu 14.04 supports libvirt 1.2.2 (which works for VFP lite mode). If you are using the VFP performance mode or deploying multiple vMX instances using the VFP lite mode, you must upgrade to libvirt 1.2.19.

To upgrade libvirt:

  1. Make sure that you install all the packages listed in Minimum Software Requirements for vMX.

  2. Navigate to the /tmp directory using the cd /tmp command.

  3. Get the libvirt-1.2.19 source code by using the command

    wget http://libvirt.org/sources/libvirt-1.2.19.tar.gz.

  4. Uncompress and untar the file using the tar xzvf libvirt-1.2.19.tar.gz command.

  5. Navigate to the libvirt-1.2.19 directory using the cd libvirt-1.2.19 command.

  6. Stop libvirtd with the service libvirt-bin stop command.

  7. Run the ./configure --prefix=/usr --localstatedir=/ --with-numactl command.

  8. Run the make command.

  9. Run the make install command.

  10. Make sure that the libvirtd daemon is running. (Use the service libvirt-bin start command to start it again. If it does not start, use the /usr/sbin/libvirtd -d command.)

  11. Verify that the versions of libvirtd and virsh are 1.2.19.

    The system displays the code compilation log.

Note

If you cannot deploy vMX after upgrading libvirt, bring down the virbr0 bridge with the ifconfig virbr0 down command and delete the bridge with the brctl delbr virbr0 command.

Updating Drivers for the X710 NIC

If you are using Intel XL710 PCI-Express family NICs, make sure you update the drivers before you install vMX.

To update the drivers:

  1. Download the vMX software package as root and uncompress the package.
  2. Install the i40e driver from the installation directory.
  3. Install the latest i40evf driver from Intel.

    For example, the following commands download and install Version 1.4.15:

  4. Update initrd with the drivers.
  5. Activate the new driver.