30 Sep 2015

Apply changes to virtual Port Profiles in SCVMM

If you use Logical Network / Logical Switch capabilities in SCVMM, and you hopefully do so ;-), then you might want to change virtual port profile / uplink port profile settings from time to time. Changes to the following properties can be made on the fly:

  • Security Settings
  • Bandwidth Settings (QoS)
  • Offload Settings (except SRIOV, which can’t be changed to an already deployed Logical Switch)
  • Uplink Port Profile load balancing / teaming mode

A common misunderstanding is that VMM will propagate the changes automatically to all vNICs. When you change parameters of one ore more of the settings above, those changes will not be propagated to the VM vNICs automatically. In the mean time, the vNIC or Logical Switch compliance state changes to “not compliant”.

How to propagate changes to all related objects?

For virtual Network Adapters

Get-SCVirtualMachine | Get-SCVirtualNetworkAdapter | where-object {$_.VirtualNetworkAdapterComplianceStatus -ne "Compliant"} | Repair-SCVirtualNetworkAdapter -RunAsynchronously

For host Logical Switch instances

 Get-SCVMhost | Get-SCVirtualNetwork  | where-object {$_.LogicalSwitchComplianceStatus -ne 'Compliant'} | Repair-SCVirtualNetwork -RunAsynchronously

Of course it might require a bit of research first, how and why the compliance state is not fulfilled, before firing of the commands above. Leaving out the repair-* CMDLETs prints out a list of the objects not in a compliant state and as well the reason for not being so.

Hope this helps to save some time.