Objective
This article describes how to assign SR-IOV enabled Network Interface Cards (NICs) to Virtual Machines (VMs) for maximum performance by using the Single Route I/O Virtualization (SR-IOV) capabilities of XenServer 6.1.0.Note: SR-IOV is supported only with SR-IOV enabled NICs listed on the XenServer Hardware Compatibility List (HCL) and only when used in conjunction with a Windows Server 2008 guest operating system.
Single Root I/O Virtualization (SR-IOV) is a PCI device virtualization technology that allows a single PCI device to appear as multiple PCI devices on the physical PCI bus. The actual physical device is known as a Physical Function (PF) while the others are known as Virtual Functions (VF). The purpose of this is for the hypervisor to directly assign one or more of these VFs to a VM using SR-IOV technology: the guest can then use the VF as any other directly assigned PCI device.
Assigning one or more VFs to a VM allows the VM to directly exploit the hardware. When configured, each VM behaves as though it is using the NIC directly, reducing processing overhead and improving performance.
WARNING! If your VM has an SR-IOV VF, functions that require VM mobility are not possible. For example, Live Migration, Workload Balancing, Rolling Pool Upgrade, High Availability and Disaster Recovery, cannot be used. This is because the VM is directly tied to the physical SR-IOV enabled NIC VF. In addition, VM network traffic sent via an SR-IOV VF bypasses the vSwitch, so it is not possible to create Access Control Lists (ACL) or view Quality of Service (Qos).
Instructions
To enable SR-IOV on Intel NICs:
WARNING! Customers must not attempt to boot a SR-IOV enabled VM before carrying out the following steps.-
For Intel 1GBe NICs edit /etc/modprobe.d/igb and uncomment the line that includes:
#options igb max_vfs=7,7,7,7
-
For Intel 10GBe NICs edit /etc/modprobe.d/ixgbe and uncomment the line that includes:
#options ixgbe max_vfs=40,40
To assign an SR-IOV enabled NIC VF to a Virtual Machine on XenServer 6.1.0:
-
Open a local command shell on your XenServer host.
-
Run the command lspci to display a list of the Virtual Functions (VF).
For example:
07:10.0 Ethernet controller: Intel Corporation 82559 Ethernet Controller Virtual Function (rev 01)
In this example, 07:10.0 is the bus:device.function address of the VF.
-
Assign the required VF to the target VM by running the following commands:
xe vm-param-set other-config:pci=0/0000:<bus:device.function> uuid=<vm-uuid>
-
Start the VM, and install the appropriate VF driver for your specific hardware.
Note: You can assign multiple VFs to a single VM, however the same VF cannot be shared across multiple VMs.