VMware Cloud Community
Mike-S
Contributor
Contributor

Setting up Network Load Balancing via Command Line

Hi,

I am trying to create a script to automatically create virtual switches with port groups and set load balancing of IP hash for certain port groups. For example I have a virtual switch called vSwitch1, it has 2 port groups - DMZ (port Group) and Private (port Group). I want to set the load balancing on the DMZ port group to IP hash.

What command can I use to do this? I can set vSwitch1 to IP hash load balancing using the follwoing command:

# vimsh -n -e "hostsvc/net/vswitch_setpolicy --nicteaming-policy loadbalance_ip vSwitch1"

but I can't find any command just to set a particular port group. Anybody know?

Cheers

Reply
0 Kudos
1 Reply
lamw
Community Manager
Community Manager

This should be available in ESX 3.0 but I don't remember off hand, I know it's in ESX 3.5+

[root@himalaya root]# vmware-vim-cmd hostsvc/net/portgroup_set

Take a look at Scott's page for more details:

=========================================================================

William Lam

VMware vExpert 2009

VMware ESX/ESXi scripts and resources at:

Reply
0 Kudos