Skip to main content
Hyper-V sFlow Configuration
A
Written by Alex Patnick
Updated this week

Prerequisites:

  • Microsoft Hyper-V

  • Host sFlow extension installation files - download here

Configuration Steps:

To enable sFlow statistics collection in a Hyper-V environment, there are two main configuration steps:

  • Installing the Host sFlow switch extension on each Hyper-V server you wish to monitor

  • Enable the sFlow Traffic Monitoring extension on each virtual switch

In order to allow the packets to reach the sensor, firewall ports may need to be opened. The sFlow data is sent via UDP on port 6343. The source address of the sFlow packets will be the address of the Hyper-V server and the target address will be the address specified in the collector parameter in the configuration. It is possible to change the default port from 6343, but this will also require changing the sflow_port parameter in the network sensor configuration file.

Host sFlow Extension Installation

  1. Run the MSI to install the extension.

  2. Accept the license agreement and select a folder for installation

  3. In the sampling parameters screen, disable the parameter to configure using DNS-SD and in the sFlow collector field, enter the address of the Faddom Server or sensor you wish to collect the traffic.
    This cannot be set to localhost or to one of the local IP addresses of the Hyper-V server.

    mceclip0.png


  4. Complete the installation of the extension.

Enabling the sFlow Traffic Monitor extension

After installing the switch extension, it needs to be enabled on the virtual switches. This can be done through Hyper-V Manager. Note that only switches connected to an External network can be monitored using sFlow.

  1. Open the Virtual Switch Manager

  2. For each switch, you would like to monitor, click on the + icon and select Extensions.

  3. Under Switch extensions select the sFlow Traffic Monitoring extension and enable it.

  4. Click Apply to save the changes. You may get a warning that the pending changes may disrupt network connectivity. Enabling the sFlow extension should not disrupt any connectivity on the server.

    mceclip1.png

Changing the sFlow configuration

After the initial setup of the host sFlow extension, changes can be made to its configuration in the registry. The following parameters are relevant for the Faddom installation:

  • collector – The IP address of the system to which the sFlow will be sent (the Faddom Sensor)

  • samplingRate – Determines the number of packets that will be sampled to send over sFlow. I.E. a sampling rate of 20 means that only 1 in 20 packets will be sent over sFlow.

Steps:

  1. Open the Registry Editor (regedit.exe)

  2. Navigate to the key HKLM\SYSTEM\CurrentControlSet\Services\hsflowd\Parameters

    image.png
  3. Make necessary changes to the parameters.

  4. Restart the Host sFlow Agent service in Windows services for the changes to take effect.

Host sFlow is a third-party tool and if you can find the Windows documentation for it here.

Did this answer your question?