Preparing the Ubuntu Host to Install vMX
To prepare the Ubuntu host system for installing vMX:
- 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.
- 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.
- Disable KSM by setting KSM_ENABLED=0 in
/etc/default/qemu-kvm
. - 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
- Restart the host to disable KSM and APIC virtualization.
- 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.
- 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).
- Run the modprobe kvm-intel command before you install vMX.
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
Upgrading Linux kernel in Ubuntu 16.04 version is not required.
If you are using Ubuntu 14.04.1 LTS, which comes with 3.19.0-80-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.19.0-80-generic). To downgrade the kernel version to Linux 3.13.0-32-generic, run the following command: GRUB_DEFAULT="Advanced options for Ubuntu>Ubuntu, with Linux 3.13.0-32-generic".
To upgrade the kernel:
Determine your version of the kernel.
uname -aLinux rbu-node-33 3.19.0-80-generic #57-Ubuntu SMP Tue Jul 15 03:51:08 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
If your version differs from the version shown in step 1, run the following commands:
apt-get install linux-firmware apt-get install linux-image-3.13.0.32-generic apt-get install linux-image-extra-3.13.0.32-generic apt-get install linux-headers-3.13.0.32-generic
Restart the system.
Upgrading to libvirt 1.2.19
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:
Make sure that you install all the packages listed in Minimum Software Requirements for vMX.
Navigate to the
/tmp
directory using the cd /tmp command.Get the libvirt-1.2.19 source code by using the command
wget http://libvirt.org/sources/libvirt-1.2.19.tar.gz.Uncompress and untar the file using the tar xzvf libvirt-1.2.19.tar.gz command.
Navigate to the
libvirt-1.2.19
directory using the cd libvirt-1.2.19 command.Stop libvirtd with the service libvirt-bin stop command.
Run the ./configure --prefix=/usr --localstatedir=/ --with-numactl command.
Run the make command.
Run the make install command.
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.)
root@vmx-server:~# ps aux | grep libvirtd root 1509 0.0 0.0 372564 16452 ? Sl 10:25 0:00 /usr/sbin/libvirtd -d
Verify that the versions of libvirtd and virsh are 1.2.19.
root@vmx-server:~# /usr/sbin/libvirtd --version libvirtd (libvirt) 1.2.19 root@vmx-server:~# /usr/bin/virsh --version 1.2.19 root@vmx-server:~#
The system displays the code compilation log.
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:
- Download the vMX software package as root and uncompress
the package.tar xzvf package-name
- Install the i40e driver from the installation directory.cd drivers/i40e-1.3.46/srcmake install
- Install the latest i40evf driver from Intel.
For example, the following commands download and install Version 1.4.15:
cd /tmpwget https://downloadmirror.intel.com/26003/eng/i40evf-1.4.15.tar.gztar zxvf i40evf-1.4.15.tar.gzcd i40evf-1.4.15/srcmake install - Update initrd with the drivers.update-initramfs -u -k 'uname -r'
- Activate the new driver.rmmod i40emodprobe i40e