CenturionStudio.it - Fotolia

How do I use SR-IOV for Hyper-V VMs?

Single Root I/O Virtualization, or SR-IOV, can help reduce latency and increase I/O throughput when enabled for Hyper-V VMs.

Many virtual administrators are still unfamiliar with Single Root I/O Virtualization Microsoft introduced in Windows Server 2012 Hyper-V. The SR-IOV specification was designed by PCI-SIG to allow a PCI device to appear as multiple physical devices, which, in turn, helps reduce the latency and increase I/O throughput. In simple terms, SR-IOV-capable PCI devices can present multiple virtual channels to SR-IOV capable drivers for direct communication.

Technically, there are two functions implemented by SR-IOV: physical functions (PFs) and virtual functions (VFs). There are a number of PCI devices available in which the PFs have been implemented, but Microsoft Hyper-V provides SR-IOV support only for networking. In other words, Microsoft Hyper-V provides VFs to allow VMs to communicate to the physical network adapters directly.

There are two drivers implemented by Microsoft Hyper-V to enable the SR-IOV function: the PF Miniport Driver running in the Hyper-V parent partition and the VF Miniport Driver running in each guest. The PF and VF relationship is very similar to the VSP-VSC design in Hyper-V, with one exception. In the case of the VSP-VSC design, a VSC component running in a VM talks to the corresponding VSP running in the Hyper-V parent partition via the VMBus communication channel, whereas, in the case of the PF-VF architecture, the VF in a VM talks to VF implemented in the SR-IOV-capable network adapters. The VF miniport driver running in a guest can directly read and write to VFs implemented in SR-IOV-capable network adapters. However, the PF Miniport Driver, which is implemented in the Hyper-V parent partition, is responsible for handling and terminating these requests as and when needed.

Since the VMs can communicate directly with the physical network adapters, organizations may benefit from increasing I/O throughput, reducing CPU utilization on Hyper-V hosts for processing network traffic, and reducing network latency by enabling direct communication. Before you can use SR-IOV for a Hyper-V VM, you will need to meet the following prerequisites:

  • The SR-IOV functionality is currently only available to Windows 8 and Windows Server 2012 guests.
  • Hyper-V must be running on a Windows Server 2012 or later operating system.
  • You must have an SR-IOV-capable physical network adapter that implements the PFs and can understand the VFs' requests coming from the VMs.
  • You must have an external virtual switch that can understand the SR-IOV traffic.
  • The server's motherboard chipset must also support SR-IOV.

Enabling SR-IOV is a two-step approach. First, you need to make sure that your external virtual network switch, which is mapped to a physical network adapter, can understand the SR-IOV traffic by enabling the checkbox from the virtual switch manager. Once the SR-IOV is enabled on the external virtual switch, you can enable SR-IOV on the supported guests by checking the "Enable SR-IOV" checkbox found under the "Hardware Acceleration" setting page on the VM's properties.

It is also worth mentioning that SR-IOV is supported by both Microsoft Hyper-V and VMware vSphere. While Microsoft Hyper-V supports SR-IOV for Windows VMs only, VMware vSphere provides SR-IOV support for both Windows and Linux guests. It is important to note that an SR-IOV-enabled VM can participate in Hyper-V live migration, but SR-IOV-enabled VMs running on VMware vSphere will lack features like vMotion.

Dig Deeper on IT systems management and monitoring

Software Quality
App Architecture
Cloud Computing
SearchAWS
TheServerSide.com
  • Why WebAssembly? Top 11 Wasm benefits

    Latency and lag time plague web applications that run JavaScript in the browser. Here are 11 reasons why WebAssembly has the ...

  • Why Java in 2023?

    Has there ever been a better time to be a Java programmer? From new Spring releases to active JUGs, the Java platform is ...

  • How developers can avoid remote work scams

    Software developers can find good remote programming jobs, but some job offers are too good to be true. Follow these tips to spot...

Data Center
Close