VMware Cloud Community
jvm2016
Hot Shot
Hot Shot
Jump to solution

setting load balancing of dpg as "route based on physical nic load"_powercli.

Hi Luc ,

could yu check following code to set load balancing at  distributed port group level to "route based on physical nic load"

$dvsw=Read-Host "PROVIDE THE Vds NAME"

$pgs=Get-VDPortgroup -VDSwitch $dvsw

foreach($pg in $pgs)

{

Get-VDPortgroup -VDSwitch $dvsw | get-vduplinkteamingpolicy | % {

write-output " teaming policy on $($_.vdportgroup) is $($_.loadbalancingpolicy)"

}

}

for some weired reasons its printing output thrice also what line to be added in above to change this to "route based on physical node" as there is no proper argument in set-nicteaming command.

pastedImage_0.png

1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Try like this

$dvsw=Read-Host "PROVIDE THE Vds NAME"

$pgs=Get-VDPortgroup -VDSwitch $dvsw

foreach($pg in $pgs)

{

    Get-VDUplinkTeamingPolicy -VDPortgroup $pg | Set-VDUplinkTeamingPolicy -LoadBalancingPolicy LoadBalanceLoadBased |   % {

        write-output " teaming policy on $($_.vdportgroup) is $($_.loadbalancingpolicy)"

    }

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

4 Replies
LucD
Leadership
Leadership
Jump to solution

Try like this

$dvsw=Read-Host "PROVIDE THE Vds NAME"

$pgs=Get-VDPortgroup -VDSwitch $dvsw

foreach($pg in $pgs)

{

    Get-VDUplinkTeamingPolicy -VDPortgroup $pg | Set-VDUplinkTeamingPolicy -LoadBalancingPolicy LoadBalanceLoadBased |   % {

        write-output " teaming policy on $($_.vdportgroup) is $($_.loadbalancingpolicy)"

    }

}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

jvm2016
Hot Shot
Hot Shot
Jump to solution

Thanks Luc.it worked but no where this thing mentioned in comannd,

below is the  -loadbalancingpolicy parameter in command.do i need to update powercli though its on 6.5 release1 4624819.

pastedImage_0.png

Thanks for your help.

0 Kudos
LucD
Leadership
Leadership
Jump to solution

You could upgrade to 6.5.3, but I suspect this an omission in the documentation, not a problem with the cmdlet.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
jvm2016
Hot Shot
Hot Shot
Jump to solution

Thanks Luc.Iam checking this.

0 Kudos