Using DSC to deploy Hyper-V converged virtual network – Creating a host team (Part 1)

In yesterday’s article, I had introduced DSC resources that can be used to deploy a Hyper-V converged network. Starting today, we will see detailed walk-through for using each of these resources we published yesterday. Using these DSC resources, we will build the converged network configuration for what is shown below.

Here is a recap of the configuration needed.

  1. Create a host network team (today’s article).
  2. Create a VM switch using the host team.
  3. Create host VM adapters in the management OS to connect to the VM switch and assign VLANs and bandwidth settings.
  4.  Assign IP addresses and DNS addresses, as required.

let us start!

Creating a Host Network Team using cNetworkTeam DSC resource

If you have not downloaded the new DSC resource modules yet, you can do so from my Github repo or using the Install-Module cmdlet in WMF 5.0. To create a host network team, we will need the cNetworkTeam resource from the cWindowsOS module.

The cNetworkTeam resource has two mandatory properties. Using the Name property, you can specify the name of the host team. The TeamMembers property is used to specify all the network connections that should be a part of the host team.

The LoadBalancingAlgorigthm is set by default to HyperVPort. The other possible values are DynamicIPAddresses, MacAddresses, and TransportPorts. The TeamingMode is by default set to SwitchIndependent and can be modified to either LACP or Static.

In my scenario, to create a host team, I am using the following configuration script. Remember that you need to use the Import-DscResource dynamic keyword in the configuration to load the resources from the resource module.

Configuration HyperVConvergedNet {
   Import-DscResource -Module cWindowsOS -Name cNetworkTeam
   Node Localhost {
          cNetworkTeam NetworkTeam {
          Name = 'HostTeam'
          TeamingMode = 'SwitchIndependent'
          LoadBalancingAlgorithm = 'HyperVPort'
          TeamMembers = 'NIC1','NIC2'
          Ensure = 'Present'

When you apply this configuration, a host team gets created.

In tomorrow’s article, we will see how we can create a Hyper-V VM switch that is capable of converged networking using cVMSwitch DSC resource.

Share on:
comments powered by Disqus