Fix Non-Compliant Virtual Network Adapters in VMM with SMA Runbook


Many do not know but besides keeping the compliance of vSwitches on Hyper-V hosts VMM also keeps compliance of the Virtual Network Adapters on VMs. You can easily find that information by opening the VMM console –> Fabric Pane –> Networking –> Logical Networks and in the ribbon menu instead of Fabric Resources choose Virtual Machines. There you will see all Virtual Network Adapters listed, to which machine they belong and their compliance status. When you right click on a non-compliant Virtual Network Adapter you have the option to Remediate it. On the backend that option actually executes a cmdlet Repair-SCVirtualNetworkAdapter. Non-compliant virtual network adapters can cause QoS and other Port Profile settings not to work. It will be cool in the future VMM to act or integrate with DSC (Desired State Configuration) on these drifts. At current state we can achieve similar thing with Service Management Automation. We simply create a Runbook that finds non-compliant adapters and make them compliant. We can schedule that runbook to run once, twice a day or as many times as you want. I am giving you this runbook so you can apply this practice to your environment. The runbook requires VMM Connection named “VmmConnection”. The inlinescript is executes on your SMA Runbook servers so you will need VMM cmdlets installed there. If you want to be executed on VMM Server itself just -PSComputerName $VmmServerName -PSCredential $VmmCredential at the closing bracket of the inlinescript.

The Runbook you can find in TechNet Gallery.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s