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/26 07:27] dmacleod [Huge Pages] |
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 ===== | ||
| Line 73: | Line 86: | ||
| |DUMMY_MAC_PREFIX|The prefix used to differentiate SR-IOV devices from virtual devices| | |DUMMY_MAC_PREFIX|The prefix used to differentiate SR-IOV devices from virtual devices| | ||
| |DRIVER_MODE|Either " | |DRIVER_MODE|Either " | ||
| - | |HPC_MODE|HPC mode improves the performance of VMs. The host's CPU is passed through to the VM, may break migration. The memory backing for the VM is set to huge pages, [[# | + | |HPC_MODE|Either " |
| ==== Libvirt “save” command ==== | ==== Libvirt “save” command ==== | ||
| Line 110: | Line 123: | ||
| Enabling huge pages on KVM virtual machines will greatly improve memory performance. To enable huge pages on your VM hosts follow these instructions: | Enabling huge pages on KVM virtual machines will greatly improve memory performance. To enable huge pages on your VM hosts follow these instructions: | ||
| - | |||
| http:// | http:// | ||
| + | |||
| + | Huge page backed VMs will be enabled if " | ||
| ==== Network Isolation ==== | ==== Network Isolation ==== | ||
| Line 199: | Line 213: | ||
| MASK=$(get_mask) | MASK=$(get_mask) | ||
| GATEWAY=$(get_gateway) | GATEWAY=$(get_gateway) | ||
| - | echo " | ||
| gen_iface_conf > / | gen_iface_conf > / | ||
| fi | fi | ||