User Tools

Site Tools


acelab: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
acelab:opennebula_sr-iov_vmm_driver [2013/09/26 07:30]
dmacleod [Prerequisites and Limitations]
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 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.+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 22: Line 22:
  
   - 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 edit ///etc/libvirt/qemu.conf// and change the user and group to “root” then restart libvirtd.+6. If using the driver in "mlnx_ofed2" mode you need to specify the device and port number of the interface. To find the device ID execute:  
 +    ls /sys/class/infiniband 
 +You will see a list of Infiniband devices "mlx4_<x>". The device ID is the <x>. To find the port ID execute: 
 +    ls /sys/class/infiniband/mlx4_<x>/ports 
 +You will see a list of numbers representing the ports available on the device.
  
-7On the head node restart OpenNebula.+Each interface which you have created a map for needs an additional file called "<map_name>_ofed", eg"ib0_ofed". The file contains two lines specifying its associated device and port.
  
-8. Create a virtual network in OpenNebula. The “Bridge” field must contain “sriov_” prepended to the name of the file that contains the VF mapingse.g. “sriov_ib0”+Example,
  
-9. Update the contextualisation scripts for the VMs with the code provided [[#context_script_modification|here]].+///var/lib/one/remotes/vmm/kvm-sriov/vf_maps/ib0_ofed//: 
 +   device 0 
 +   port   1
  
-10. Create hosts to use the “kvm_sriov” driver.+7. On VM hosts using this driver edit ///etc/libvirt/qemu.conf// and change the user and group to “root” then restart libvirtd. 
 + 
 +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 [[#context_script_modification|here]]. 
 + 
 +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 "generic" or "mlnx_ofed2". Generic mode passes IP address to VMs through dummy interfaces. Mlnx_ofed2 mode encodes IP address in VF GUIDs| |DRIVER_MODE|Either "generic" or "mlnx_ofed2". Generic mode passes IP address to VMs through dummy interfaces. Mlnx_ofed2 mode encodes IP address in VF GUIDs|
-|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, [[#huge_pages|additional host configuration required]]). If a VM has as many vCPUs and the host has CPUs it is detected as a special case and the hosts NUMA architecture is passed to the VM. If a VM has as many vCPUs as a single NUMA node on the host the VM's CPUs will be pinned to a NUMA node.|+|HPC_MODE|Either "on" or "off"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, [[#huge_pages|additional host configuration required]]. If a VM has as many vCPUs and the host has CPUs it is detected as a special case and the hosts NUMA architecture is passed to the VM. If a VM has as many vCPUs as a single NUMA node on the host the VM's CPUs will be pinned to a NUMA node.|
 ==== Libvirt “save” command ==== ==== Libvirt “save” command ====
  
Line 111: Line 124:
 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://www.linux-kvm.com/content/get-performance-boost-backing-your-kvm-guest-hugetlbfs http://www.linux-kvm.com/content/get-performance-boost-backing-your-kvm-guest-hugetlbfs
 +
 +Huge page backed VMs will be enabled if "HPC_MODE" is set "on".
 ==== Network Isolation ==== ==== Network Isolation ====
  
Line 198: Line 213:
             MASK=$(get_mask)             MASK=$(get_mask)
             GATEWAY=$(get_gateway)             GATEWAY=$(get_gateway)
-            echo "Writing" 
             gen_iface_conf > /etc/sysconfig/network-scripts/ifcfg-${DEV}             gen_iface_conf > /etc/sysconfig/network-scripts/ifcfg-${DEV}
           fi           fi
/app/dokuwiki/data/attic/acelab/opennebula_sr-iov_vmm_driver.1380173459.txt.gz · Last modified: 2021/12/09 16:42 (external edit)