This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
acelab:opennebula_sr-iov_vmm_driver [2013/09/25 14:56] dmacleod |
acelab:opennebula_sr-iov_vmm_driver [2021/12/09 16:42] (current) |
||
|---|---|---|---|
| Line 1: | Line 1: | ||
| ====== OpenNebula KVM SR-IOV Driver ====== | ====== OpenNebula KVM SR-IOV Driver ====== | ||
| - | With the recent | + | With the release of an OFED which supports SR-IOV on Infiniband HCAs it is now possible to use verbs from inside a VM. This VMM driver supports these Infiniband HCAs, and any other SR-IOV network device, in OpenNebula. |
| Demonstration Video: | Demonstration Video: | ||
| Line 17: | Line 17: | ||
| - The maximum number of VMs with SR-IOV interfaces that the host can support is limited by the number of VFs the root device exposes. Usually around 64. | - The maximum number of VMs with SR-IOV interfaces that the host can support is limited by the number of VFs the root device exposes. Usually around 64. | ||
| - To use this driver with Ethernet SR-IOV devices you will need to modify the VM context script and take into consideration MAC prefixes. ([[# | - To use this driver with Ethernet SR-IOV devices you will need to modify the VM context script and take into consideration MAC prefixes. ([[# | ||
| - | - Network isolation is only supported on Mellanox ConnectX-3 HCAs with OFED v2.0-3.0.0 and a patched version of the ovswitch VNM driver is required. ([[# | + | - Network isolation |
| - IPv6 has not been tested. | - IPv6 has not been tested. | ||
| ===== Testing Environment ===== | ===== Testing Environment ===== | ||
| - CentOS 6.4 | - CentOS 6.4 | ||
| - | - Mellanox OFED 2.0 | + | - Mellanox OFED 2.0-3.0.0 |
| - libvirt 0.10.2 | - libvirt 0.10.2 | ||
| - OpenNebula 4.2 | - OpenNebula 4.2 | ||
| - | |||
| ===== Installation ===== | ===== Installation ===== | ||
| Line 56: | Line 55: | ||
| 0x07 0x00 0x04 | 0x07 0x00 0x04 | ||
| - | 6. On VM hosts using this driver | + | 6. If using the driver |
| + | ls /sys/class/infiniband | ||
| + | You will see a list of Infiniband devices " | ||
| + | ls /sys/class/infiniband/mlx4_< | ||
| + | You will see a list of numbers representing | ||
| - | 7. On the head node restart OpenNebula. | + | Each interface which you have created a map for needs an additional file called "< |
| - | 8. Create a virtual network in OpenNebula. The “Bridge” field must contain “sriov_” prepended to the name of the file that contains the VF mapings, e.g. “sriov_ib0” | + | Example, |
| - | 9. Update the contextualisation scripts for the VMs with the code provided [[# | + | /// |
| + | | ||
| + | | ||
| - | 10. Create hosts to use the “kvm_sriov” driver. | + | 7. On VM hosts using this driver edit /// |
| + | |||
| + | 8. On the head node restart OpenNebula. | ||
| + | |||
| + | 9. Create a virtual network in OpenNebula. The “Bridge” field must contain “sriov_” prepended to the name of the file that contains the VF mapings, e.g. “sriov_ib0” | ||
| + | |||
| + | 10. Update the contextualisation scripts for the VMs with the code provided [[# | ||
| + | |||
| + | 11. Create hosts to use the “kvm_sriov” driver. | ||
| ===== Appendix ===== | ===== Appendix ===== | ||
| ==== Configuration Options ==== | ==== Configuration Options ==== | ||
| + | |VF_MAPS_PATH|The path where the driver must look for the VF map files| | ||
| + | |DUMMY_BRIDGE|The bridge to which the dummy interfaces will be connected to| | ||
| + | |DUMMY_MAC_PREFIX|The prefix used to differentiate SR-IOV devices from virtual devices| | ||
| + | |DRIVER_MODE|Either " | ||
| + | |HPC_MODE|Either " | ||
| ==== Libvirt “save” command ==== | ==== Libvirt “save” command ==== | ||
| Line 101: | Line 119: | ||
| The context script will need to be updated to support the Ethernet devices, however the changes are minimal and simple. | The context script will need to be updated to support the Ethernet devices, however the changes are minimal and simple. | ||
| + | |||
| + | ==== Huge Pages ==== | ||
| + | |||
| + | Enabling huge pages on KVM virtual machines will greatly improve memory performance. To enable huge pages on your VM hosts follow these instructions: | ||
| + | http:// | ||
| + | |||
| + | Huge page backed VMs will be enabled if " | ||
| + | ==== Network Isolation ==== | ||
| + | |||
| + | This driver supports network isolation on all virtual interfaces through the standard OpenNebula VNM drivers. Isolation on SR-IOV devices is only supported on Mellanox ConnectX-3 HCAs. The Infiniband isolation is implemented through a modified version of the " | ||
| + | |||
| + | To use Infiniband isolation the host and network must be set to use the Open vSwitch driver. The IB Pkey is set in the VLAN field when creating a network. Note, the Pkey must be specified in decimal. It will be converted into hexadecimal and a full key will be generated from it. | ||
| + | |||
| + | The driver assumes the IB fabric has been correctly configured with the requested partitions. If during deployment the requested pkey is not found the virtual function will be blocked. If you do not specify a pkey the default partition will be used. | ||
| ===== Driver ===== | ===== Driver ===== | ||
| Line 181: | Line 213: | ||
| MASK=$(get_mask) | MASK=$(get_mask) | ||
| GATEWAY=$(get_gateway) | GATEWAY=$(get_gateway) | ||
| - | echo " | ||
| gen_iface_conf > / | gen_iface_conf > / | ||
| fi | fi | ||