Configuring SR-IOV for the MZ912
The MZ912 supports the SR-IOV feature. This section describes how to configure SR-IOV for two MZ912 NICs (82599 chips) in SLES 11 SP1 Xen. Before the configuration, ensure that Virtualization Technology and Intel® VT-d are enabled in the BIOS.
- Log in to the OS as user root and install the MZ912 driver 82599_sles11sp1xen_3.11.33.tar.gz.
- Go to /boot/grub/menu.lst, change the system boot sequence so that the system boots from Xen, and enable I/O Memory Management Unit (IOMMU). See Figure 4-49.
- Open the modprobe.conf file in /etc/, and set the number of VFs to be created for each network port. See Figure 4-50 and Figure 4-51.
You do not need to create VFs in Linux by default. If you create VFs by modifying the modprobe.conf file, you can create a maximum of 63 VFs for each network port. The following assumes that you need to create eight VFs for each network port.
In the information shown in Figure 4-50, ixgbe max_vfs=0,0,8,8 indicates that no VF is created for the first and second network ports on the PCI bus, and eight VFs for the third and fourth network ports.
Figure 4-51 shows the lspci command output after VFs are successfully created.
- Modify the modprobe.conf file in /etc/ as follows: Add blacklist ixgbevf to the file so that the ixgbevf driver cannot be automatically loaded during VF creation, and change the value of max_loop in this file to 128.
The default value of max_loop is 8, which indicates that four VFs can be created for each network port. Changing the value of max_loop to 128 indicates that a maximum of 64 VFs can be created for each network port, as shown in Figure 4-52.
- Go to /boot/grub/menu.lst and modify parameters in this file to hide the PCI bus numbers for the created VFs.
SLES 11 includes the Xen 4.0 open-source hypervisor. Xen 4.0 requires SR-IOV-compatible Intel 82599 Ethernet NIC-based VFs not to be claimed by the Xen Domain-0 if VFs are intended to be assigned to VMs. VF bus numbers, devices, and function numbers are required for hiding VFs from Xen Domain-0.
Figure 4-53 Hiding the PCI bus numbers for the created VFs - When the system is operating properly, run the modprobe pciback command to load the VF PCI driver. Then you can assign VFs to VMs. As shown in Figure 4-54, even bus numbers belong to network port 0, and odd bus numbers belong to network port 1.
The VM installation procedure applies to different systems. As long as the system supports the virtualization technology, you can create VMs with the following procedure. For VF creation, the environment parameter configuration varies according to the NIC type. You need to set environment parameters by following instructions of the NIC vendor.
- Run the virt-manager command on the system terminal to open the Virtual Machine Manager window. See Figure 4-55.
- Click Create a new virtual machine and set VM creation parameters. The Summary window provides a summary of the parameter settings, as shown in Figure 4-56.
Set and check installation options carefully when installing VMs:
Set Virtualization Method to Fully Virtualized.
If you set Disks to install the OS from an image file, install the OS from the DVD-ROM drive when creating the first VM. After the OS is installed, a file named disk.raw is generated. Then you can create other VMs by using this file, which saves time.
- After a VM is created, run the xm list and xm pci-attach vm1 0b:10.0 commands to assign the created VF to the VM. See Figure 4-57.
- Install the VF driver 82599_linux_ixgbevf_2.7.12.tar.gz, and set up a bridge so that the host and VM can communicate with each other. Run the scp command to copy the VF driver package from the host to the VM. Decompress the VF driver package and install the driver. Then run the ifconfig –a command on the VM to view the VF. If the VF driver is not installed, the network port cannot be seen on the VM although the lspci command displays the VF, as shown in Figure 4-58.