User Tools

Site Tools


opennebula_sr-iov_vmm_driver

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
opennebula_sr-iov_vmm_driver [2013/05/15 14:38]
nthorne [Installation]
opennebula_sr-iov_vmm_driver [2021/12/09 16:42] (current)
Line 13: Line 13:
   - A virtual bridge is required. The VM will attach interfaces to this bridge but the OS will not use them. They are only required to pass IP address information into the VM. The bridge does not require any external connectivity, it just needs to exist.   - A virtual bridge is required. The VM will attach interfaces to this bridge but the OS will not use them. They are only required to pass IP address information into the VM. The bridge does not require any external connectivity, it just needs to exist.
   - VF usage tracking is implemented in the ///tmp// file system. During a fatal host error the VF usage tracking might become out of sync with actual VF usage. You will have to manually recover. ([[opennebula_sr-iov_vmm_driver#vf_usage_tracking|More info]])   - VF usage tracking is implemented in the ///tmp// file system. During a fatal host error the VF usage tracking might become out of sync with actual VF usage. You will have to manually recover. ([[opennebula_sr-iov_vmm_driver#vf_usage_tracking|More info]])
-  - A modified context script is required to decode the SR-IOV interface information inside the VM. Examples are given for Infiniband and Ethernet.+  - A modified context script is required to decode the SR-IOV interface information inside the VM. Examples are given for Infiniband.
   - IPv6 has not been tested.   - IPv6 has not been tested.
 ===== Testing Environment ===== ===== Testing Environment =====
Line 26: Line 26:
  
  
-1. Extract kvm-srivo.tar.gz to ///var/lib/one/remotes/vmm/kvm-sriov//+1. Extract {{:kvm-sriov.tar.gz|kvm-sriov.tar.gz}} to ///var/lib/one/remotes/vmm/kvm-sriov//
  
 2. Edit ///etc/one/oned.conf// and add: 2. Edit ///etc/one/oned.conf// and add:
Line 89: Line 89:
     3     3
  
-===== Files =====+===== Driver =====
  
-  * SR-IOV KVM Driver +  * {{:kvm-sriov.tar.gz|SR-IOV KVM Driver}}
-  * Infiniband Context Script +
-  * Ethernet Context Script+
  
 +==== Context Script Modification ====
 +
 +
 +Edit the //00-network// script (in our case: /srv/one-context.d/00-network). Update the gen_network_configuration() and gen_iface_conf() functions.
 +
 +  gen_iface_conf() {
 +    cat <<EOT
 +    DEVICE=$DEV
 +    BOOTPROTO=none
 +    ONBOOT=yes
 +    ####################
 +    # Update this      #
 +    ####################
 +    TYPE=$TYPE
 +    #-------------------
 +    NETMASK=$MASK
 +    IPADDR=$IP
 +    EOT
 +      if [ -n "$GATEWAY" ]; then
 +        echo "GATEWAY=$GATEWAY"
 +      fi
 +      echo ""
 +  }
 +
 +  gen_network_configuration()
 +  {
 +    IFACES=`get_interfaces`
 +    for i in $IFACES; do
 +        MAC=`get_mac $i`
 +        ###################################
 +        # Update this                     #
 +        ###################################
 +        ib_vf=$(echo "$MAC" | cut -c 1-2)
 +        ib_pos=$(echo "$MAC" | cut -c 5)
 +        if  [ "$ib_vf" == "AA" ]; then
 +          DEV="ib"$ib_pos
 +          UPCASE_DEV=`upcase $DEV`
 +          TYPE="Infiniband"
 +        else
 +          DEV=`get_dev $i`
 +          UPCASE_DEV=`upcase $DEV`
 +          TYPE="Ethernet"
 +        fi
 +        #-----------------------------------
 +        IP=$(get_ip)
 +        NETWORK=$(get_network)
 +        MASK=$(get_mask)
 +        GATEWAY=$(get_gateway)
 +        ####################################
 +        # Update this                      #
 +        ####################################
 +        if  [ "$ib_vf" == "AA" ]; then
 +          gen_iface_conf > /etc/sysconfig/network-scripts/ifcfg-ib$ib_pos
 +        else
 +          gen_iface_conf > /etc/sysconfig/network-scripts/ifcfg-${DEV}
 +        fi
 +        #-----------------------------------
 +    done
 +  }
 +  
 +Take note of:
 +  - "$ib_vf" == "AA". This means that the script is expecting AA and the MAC prefic for SR-IOV devices.
 +  - gen_iface_conf > /etc/sysconfig/network-scripts/ifcfg-ib$ib_pos. The ifcfg file is being generated for Infiniand.
/app/dokuwiki/data/attic/opennebula_sr-iov_vmm_driver.1368621512.txt.gz · Last modified: 2021/12/09 16:42 (external edit)