Installation

Onload User Guide (UG1586)

Document ID
UG1586
Release Date
2023-07-31
Revision
1.2 English
  1. The docker run command will create a container named onload. The container is created from the centos:latest base image and a bash shell terminal will be started in the container.

    If MACVLAN driver support and namespace support are required, refer to MACVLAN Support below before creating the container.

    # docker run \
            --net=host \
            --device=/dev/onload \
            --device=/dev/onload_epoll \
            --name=onload \
            -it \
            -v /src/onload-201502.tgz:/tmp/onload-201502.tgz \
            centos:latest \
            /bin/bash

    The example above copies the onload-201502.tgz file from the /src directory on the host and placed this file into /tmp in the container root file system. All subsequent commands are run inside the container unless host is specified.

    Note: The directive --device=/dev/sfc_char is required when used with ef_vi.
  2. Install required OS tools/packages in the container:
    # yum install perl autoconf automake libtool tar gcc make net-tools ethtool

    Different docker base images might require additional OS packages installed.

  3. Unpack the tarball to build the onload-<version> sub-directory:
    # /usr/bin/tar -zxvf /tmp/onload-201502.tgz
    Note: It is not possible to use tools/utilities (such as tar) from the host file system on files in the container file system.
  4. Change directory to the onload-<version>/scripts directory:
    # cd /tmp/onload-201502/scripts
  5. Build the Onload user-level components in the container:
    # ./onload_build --user

    If the build process identifies any missing dependencies, return to step 2 to install missing components.

  6. Install the Onload user-level components in the container:
    # ./onload_install --userfiles --nobuild

    The following warning might appear at the end of the install process, but it is not necessary to reload the drivers:

    onload_install: To load the newly installed drivers run:  onload_tool reload
  7. Check Onload installation:
    # onload
    OpenOnload 201502
    Copyright 2006-2012 Solarflare Communications, 2002-2005 Level 5 Networks
    Built: Feb  5 2015 12:41:04 (release)
    Kernel module: 201502
    
    usage:
      onload [options] <command> <command-args>
    
    options:
      --profile=<profile>    -- comma sep list of config profile(s)
      --force-profiles       -- profile settings override environment
      --no-app-handler       -- do not use app-specific settings
      --app=<app-name>       -- identify application to run under onload
      --version              -- print version information
      -v                     -- verbose
      -h --help              -- this help message
  8. On the host, check that the container has been created and is running:
    # docker ps -a
    
    CONTAINER ID  IMAGE          COMMAND      CREATED        STATUS         PORTS   NAMES
    e2a12a635359  centos:latest "/bin/bash"  15 seconds ago  Up 14 seconds         onload
  9. Configure network interfaces.

    Configure network adapter interfaces in the host. Interfaces will also be visible and usable from the container:

    # ifconfig -a
  10. Onload is now installed and ready to use in the container.