Update of Notify Switches

In order to setup NLB on some virtual machines, we found the following KB (which is very interesting by the way) http://kb.vmware.com/kb/1556 which list the specific setup to follow in order to have a fully-functionnal Unicast NLB on VMware.

To list back the specific setup, there is :

  • All members of the NLB cluster must be running on the same ESX host.
  • All members of the NLB cluster must be connected to the single portgroup on the virtual switch
  • VMotion for unicast NLB virtual machines is not supported (unless you want to migrate ALL NLB members to a different ESX host)
  • The Security Policy Forged Transmit on the Portgroup is set to  Accept
  • The transmission of RARP Packet is prevented on the Portgroup/Virtual Switch

The last point deals with the Notify Switches PortGroup parameters on No.

In our case, we created a dedicated PortGroup for theses NLB VM in order to not impact others virtual machines.

In order to configure Notify Switches to No, we can use this little OneLiner (which can also be used in order to change other parameter of a PortGroup)

Get-VMHost -Location "cluster_esx" | ?{$_.Connectionstate -match "Connected|Maintenance"} | Get-View | ?{$_.Config.Network | %{$_.portGroup} | ?{$_.key -imatch "nlb"}} | %{$_.ConfigManager} | %{$_.NetworkSystem} | %{(Get-View $_).UpdatePortGroup("PG NLB", (New-Object VMware.Vim.HostPortGroupSpec -Property @{Name="PG NLB"; VlanId=69; VswitchName="vSwitch0"; Policy=(New-Object VMware.Vim.HostNetworkPolicy -Property @{nicTeaming=(New-Object VMware.Vim.HostNicTeamingPolicy -Property @{notifySwitches=$false})})}))}

One comment

  1. This is how i did it in the end:

    $PG_Policy = Get-VMHost | Where {$_.ConnectionState -eq ‘Maintenance’} | Get-VirtualPortgroup | WHERE {$_.Name -imatch ‘NLB’} | Get-NicTeamingPolicy

    $PG_Policy | Set-NicTeamingPolicy -NotifySwitches $false

    There is no host-filtering other than that the host has to be in maintenance mode. This will deactivate “NotifySwitches” on all PortGroups (not vSwitches) with “NLB” in their name.

Leave a Reply

Required fields are marked *.