X722 LOM User Guide 12

Configuring SR-IOV on VMware ESXi

Configuring SR-IOV on VMware ESXi

This section uses VMware ESXi 6.5 as an example to describe how to configure SR-IOV on VMware.

Enabling SR-IOV

On VMware ESXi, you can enable SR-IOV for servers managed by a cluster and servers not managed by a cluster.

  • You can only use the CLI to enable SR-IOV for servers not managed by a cluster.
  • You can use the CLI or vSphere Client to enable SR-IOV for server managed by a cluster.

Prerequisites

The latest i40en driver has been installed.

Enabling SR-IOV on the CLI

  1. Use the ESXi host management port to log in to the shell as the root user over SSH.
  2. Run the following command to view the list of network devices that use the i40en driver:

    esxcli network nic list

    The command output is as follows:

    Name    PCI Device    Driver  Admin Status  Link Status  Speed  Duplex  MAC Address        MTU   Descreption
    vmnic0  0000:1a:00.0  i40en   up            up           10000  Full    c4:b8:b4:63:ba:3d  1500  Intel(R) Ethernet Connection X722 for 10GBASE-T
    vmnic1  0000:1a:00.1  i40en   up            up           10000  Full    c4:b8:b4:63:ba:3e  1500  Intel(R) Ethernet Connection X722 for 10GBASE-T
    vmnic2  0000:1a:00.2  i40en   up            Down         0      Half    c4:b8:b4:63:ba:3f  1500  Intel(R) Ethernet Connection X722 for 10GbE
    vmnic3  0000:1a:00.3  i40en   up            Down         0      Half    c4:b8:b4:63:ba:40  1500  Intel(R) Ethernet Connection X722 for 10GbE

  1. Enable SR-IOV.

    vmnic0, vmnic1, vmnic2, and vmnic3 are four network ports of the X722 NIC. According to the query result in 2, the PCI devices that use the i40en driver are sorted based on the BDF number (Bus:Device:Function) in ascending order. Two 10GE network ports of the X722 are in the first place and second place.

    Run the following command to set the number of VFs to be enabled on port 0 and port 1 of the X722. [num1] and [num2] indicates the number of VFs to be enabled for port 0 and port 1 respectively of the X722

    esxcfg-module i40en -s max_vfs=[num1],[num2],0,0

    For example, run the following command to enable two VFs for each PF of the X722:

    esxcfg-module i40en -s max_vfs=2,2,0,0

  2. Run the following command to reboot the system:

    reboot

  3. Run the following command to check whether the number of PCI devices (corresponding to the VFs) after SR-IOV is enabled is the same as the configuration:

    lspci | grep -i "virtual function"

    The command output is as follows:

    0000:1a:02.0 Network controller: Intel(R) Ethernet virtual Function 700 Series [PF_0.26.0_VF_0]
    0000:1a:02.1 Network controller: Intel(R) Ethernet virtual Function 700 Series [PF_0.26.0_VF_1]
    0000:1a:06.0 Network controller: Intel(R) Ethernet virtual Function 700 Series [PF_0.26.1_VF_0]
    0000:1a:06.1 Network controller: Intel(R) Ethernet virtual Function 700 Series [PF_0.26.1_VF_1]

Enabling SR-IOV by Using vSphere Client

  1. Use a browser and the vSphere Client IP address to log in to vSphere Client.

    Figure 4-69 Logging in to vSphere Client

  2. Select the host to be configured on the left navigation pane, click the Configure tab in the right pane, choose Networking > Physical adapters, select the vmnic0 port for SR-IOV configuration, and click Edit.

    Figure 4-70 Selecting the port to be configured

  3. Set Status to Enabled and Number of virtual functions to 8.

    Click OK.

    Figure 4-71 Configuring parameters

  4. Right-click the host where port SR-IOV has been configured and choose Maintenance Mode > Enter Maintenance Mode from the shortcut menu.

    In the displayed dialog box, click OK.

    Figure 4-72 Entering the maintenance mode

  5. Right-click the host where port SR-IOV has been configured and choose Power > Reboot from the shortcut menu.

    In the displayed dialog box, enter the reason for rebooting the system and click OK.

    Figure 4-73 Rebooting the system

  6. Right-click the host where port SR-IOV has been configured, choose Maintenance Mode > Exit Maintenance Mode from the shortcut menu to exit the maintenance mode.

    Figure 4-74 Exiting the maintenance mode

Creating VMs

  1. Right-click the host where an SR-IOV port is configured and choose New Virtual Machine to create a VM.

    Figure 4-75 creating a VM

  2. On the displayed screen, select a creation type and click NEXT.

    Figure 4-76 Selecting a creation type

  3. On the displayed screen, enter the VM name, select a location for the VM, and click NEXT.

    Figure 4-77 selecting a name and folder

  4. On the displayed screen, select a compute resource and click NEXT.

    Figure 4-78 selecting a compute resource

  5. On the displayed screen, select a storage device and click NEXT.

    Figure 4-79 selecting a storage

  6. On the displayed screen, select a VMware ESXi version that the VM needs to be compatible with and click NEXT.

    Figure 4-80 Selecting a compatible version

  7. On the displayed screen, select a guest OS type and version and click NEXT.

    Figure 4-81 select a guest OS type

  8. On the displayed screen, configure the VM hardware.

    New CD/DVD Drive specifies the OS image selection method. Set this parameter to Datastore ISO File.

    Figure 4-82 Configuring VM hardware

  9. Select Connect At Power On, click BROWSE to select an OS installation image, and click OK.

    Click NEXT.

    Figure 4-83 selecting an OS installation image

  10. On the displayed screen, click FINISH to complete VM configuration.

    Figure 4-84 Completing the VM configuration

  11. Select the created VM and click in the right pane to start the VM.

    Figure 4-85 starting the VM

  12. Click Launch Web Console to open the VM console.

    Figure 4-86 opening the VM console

  13. Select Web Console and click OK.

    Figure 4-87 Selecting Web Console

  14. On the displayed OS installation screen, perform operations by referring to OS Installation Guide.

    Figure 4-88 System installation window

Adding an SR-IOV Network Port

  1. Right-click a VM and choose Power > Power off.

    Figure 4-89 Powering off a VM

  2. Right-click a VM and choose Edit Settings.

    Figure 4-90 Selecting Edit Settings

  3. Choose ADD NEW DEVICE > Network Adapter.

    Figure 4-91 Adding a network port

  4. In the left navigation pane, choose VM Network and configure the parameters.

    • Set Adapter Type to SR-IOV passthrough.
    • Set Physical Function to the required SR-IOV passthrough network port.
    • Set MAC Address based on the actual situation.
    • In the Memory area, select Reserve All guest memory (All locked).
    • Retain the default values for other parameters.

    Click OK.

    Figure 4-92 Configuring parameters (1)
    Figure 4-93 Configuring parameters (2)

  5. Start the VM. Run the following command to find the device of the SR-IOV passthrough network port:

    lspci | grep -i Ethernet | grep -i virtual

    The command output is as follows:

    13:00.0 Ethernet controller: Intel Corporation Ethernet virtual Function 700 Series (rev 09)

  6. For details about how to install the VF driver, see 4.
Translation
Favorite
Download
Update Date:2024-12-27
Document ID:EDOC1100130520
Views:122252
Downloads:1691
Average rating:0.0Points

Digital Signature File

digtal sigature tool