- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I had the same issue, my portgroups reverted to originating instead of Route based on IP Hash.
I ran the following in powerCLI to fix the issue:
#Change vcenter.domain.net to your fqdn of your vcenter server.
Connect-VIServer -Server vcenter.domain.net
#Change hostname.domain.net to the fqdn of the host that you are updating.
$vmhost = 'hostname.domain.net'
#Update vSwitch0 to your vSwitch hat is experiencing the issue.
$portgroups = Get-VirtualPortGroup -VirtualSwitch vSwitch0 -VMHost $vmhost | select -ExpandProperty Name | sort
#loop through each portgroup on your vSwitch.
foreach ( $portgroup in $portgroups ) {
#This line will output the current portgroup
$portgroup
Write-Output ""
#get the teaming policy and place into policy1 variable.
$policy1 = Get-VirtualPortGroup -VirtualSwitch vSwitch0 -VMHost $vmhost -Name $portgroup | Get-NicTeamingPolicy
#List the current Policy, mainly used for review.
Write-Output "Load Balancing Policy: "
$policy1.LoadBalancingPolicy
#Set the policy to Route based on IP Hash.
$policy1 | Set-NicTeamingPolicy -LoadBalancingPolicy LoadBalanceIP -WhatIf #remove the -WhatIf when you are ready to run it.
Write-Output ""
Write-Output ""
}