I'm trying to set the load balencing policy but just starting with the 'Get' first. the commmand line I'm trying to use is:
Get-VMHost -Name Serv1.withers.net | Get-VirtualSwitch -name vSwitch1 | Get-NicTeamingPolicy -loadbalancingpolicy
I get the following error message:
Get-NicTeamingPolicy : A parameter cannot be found that matches parameter name 'loadbalancingpolicy'.
Any idea's?
You will first have to 'get' the teaming policy.
Like this
Get-VMHost -Name Serv1 | Get-VirtualSwitch -name vSwitch1 | Get-NicTeamingPolicy | Set-NicTeamingPolicy -LoadBalancingPolicy LoadBalanceIP
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
That should be
Get-VMHost -Name Serv1.withers.net | Get-VirtualSwitch -name vSwitch1 |
Get-NicTeamingPolicy | Select LoadBalancingPolicy
In the Get-NicTeamingPolicy cmdlet there is no parameter called LoadBalancingPolicy. But the LoadBalancingPolicy is a property in the returned object.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Luc,
After the 'Select' I don't have the option of 'LoadBalancingPolicy'
I have a list such as, Debug, error action, errorvariable, etc.
Oh! Hang on! PowerGUI is lieing to me!
The Select, which is short for Select-Object, allows you to pick the properties from the object that you want to display.
Fully written that should be
Get-VMHost -Name Serv1.withers.net | Get-VirtualSwitch -name vSwitch1 | Get-NicTeamingPolicy | Select-Object -Property LoadBalancingPolicy
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
OK......
So to set it, what I'm I doing wrong with this?
Get-VMHost -Name Serv1 | Get-VirtualSwitch -name vSwitch1 | Set-NicTeamingPolicy -LoadBalancingPolicy LoadBalanceIP
You will first have to 'get' the teaming policy.
Like this
Get-VMHost -Name Serv1 | Get-VirtualSwitch -name vSwitch1 | Get-NicTeamingPolicy | Set-NicTeamingPolicy -LoadBalancingPolicy LoadBalanceIP
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Excellent! Thanks Luc!
Hi Stu ,
i have an similar scenario,
one esxi server running 3 identical os and having identical configuration,i want to test and implement Load balencing in such a way that,
want to bind all of the 3 vm , in case my one or 2 vm gets down ihave the 3rd vm to process the request.
can you please guide me with this as i am new to load balencing stuff.
--
Thanks
Svisen
Hi Svisen, I'm not sure I get the question.
Are you talking about teamed NICs on a switch ?
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Hi Lucd,
I want an test environment to be created with 3 vm of windows running on one server hosting esxi 5.0.
I have an application installed on all the 3 vm , each identical with application or simply an clone rather, and i have an application deployed on the virtual machine
now as i want that all the 3 vm should share an common IP ,so that when ever one or two server goes down the request should be processed by the 3rd server.
I dont was to use apache load balencing or OS clustering , i want to configure load balencing using ESXI features, to which i am unawre to how to do it .please guide am new to the clustering.
--thanks