Getting Started Writing a Hyper-V Extensible Switch Extension
A Hyper-V Extensible Switch extension is an NDIS filter or Windows Filtering Platform (WFP) filter that runs inside the Hyper-V Extensible Switch (also called the "Hyper-V virtual switch").
There are 3 classes of extensions: capture, filtering, and forwarding. All of them can be implemented as NDIS filter drivers. Filtering extensions can also be implemented as WFP filter drivers.
For an architectural overview for driver developers, see Overview of the Hyper-V Extensible Switch.
To create a Hyper-V Extensible Switch extension, follow these steps:
- Learn the extension architecture and programming model.
- Read the MSDN documentation for NDIS-based extensions, beginning with Hyper-V Extensible Switch. Capture, filtering, and forwarding extensions use the standard NDIS filtering API. The NDIS interfaces have been enhanced to provide configuration, notifications, and identification of virtual switches and virtual machines.
- Read the MSDN documentation for WFP-based extensions, beginning with Using Virtual Switch Filtering.
- Watch the following instructional videos on extensions.
- There are several PowerShell commands that can be used to manage extensions. These are listed in Managing Installed Hyper-V Extensible Switch Extensions.
- Set up your development environment.
- Install Microsoft Visual Studio Professional 2012.
- Download and install Windows Driver Kit 8.
- Study the sample extensions.
- Write your extension.
- You can use one of the samples as a starting point, port existing filter code, or write your extension from scratch.
- If you’re developing an NDIS extension, you can use the standard NDIS INF with a few changes as outlined in INF Requirements for Hyper-V Extensible Switch Extensions.
- Build your extension and unit-test it.
- You must use Visual Studio to build your extension.
- You can familiarize yourself with the extension build process by using Visual Studio to compile and run the sample extensions.
- Learn about the Windows certification (logo) process for getting an extension signed.
- An extension must pass the tests in the Windows Hardware Certification Kit (HCK).
- The requirements for an extension are listed under the Filter.Driver.vSwitchExtension.ExtensionRequirements in the Windows Hardware Certification Requirements - Filter Driver .
- Set up your Windows Hardware Certification Kit environment.
- Download and install the Windows Hardware Certification Kit.
- Run the WHCK tests for extensions:
- After your final extension passes WHCK certification, submit it to Microsoft.
- Your extension must be submitted as an MSI install package with a specific format to ensure that it can be tracked and deployed by management packages, such as System Center Virtual Machine Manager (SCVMM) 2012. The MSI format is defined in Extension Driver MSI Packaging Requirements.
- List your extension on WindowsServerCatalog.com.
- List a brief description of your extension on WindowsServerCatalog.com.
- Information on listing a certified extension on WindowsServerCatalog.com will be available soon.