I am testing a script ot do an automated install of ESX V3.50 Update 2. I am having a problem getting 2 NIC's to be active on the same vswitch. I can get both NIC's to be added to the vswitch but I can only get 1 NIC to show up being active. The other nic always ends up in Standby mode. I have searched the forums and I cannot figure out how to make ths work. I am using vmware-vim-cmd.. Both NIC's are attached to vSwitch1. vmnic3 is active and vmnic2 is in standy
This is the command I am entering:
vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic2,vmnic3 vSwitch1
I get an error message back stating "A specified parameter was not correct". Anybody know what I am doing wrong?
http://www.yellow-bricks.com/2008/06/27/scripted-install/
# Active and standby setup and maxActive from 1 to 2
mv /etc/vmware/esx.conf /tmp/esx.conf.bak
/bin/sed -e 's/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \"1\"/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \"2\"/g' /tmp/esx.conf.bak >> /etc/vmware/esx.conf
Duncan
My virtualisation blog:
If you find this information useful, please award points for "correct" or "helpful".
I'm also having the same issues. I'm pretty sure this is a bug in vmware-vim-cmd. I'm using the latest esx 3.5 U2 release (13-08-08). Attached is a copy of my vSwitch0 setup from the VI client, and here is my console output. As you can see, if I try to set the current 'active'vmnic, it works without error. As soon as I try the inactive, it fails. Even trying to set these both together it fails (which is the correct commandline usage)
root@esxserver01 root# vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic0 vSwitch0
root@esxserver01 root# vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic3 vSwitch0
(vmodl.fault.InvalidArgument) {
dynamicType = ,
invalidProperty = ,
msg = "A specified parameter was not correct.
"
}
root@esxserver01 root# vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic3,vmnic0 vSwitch0
(vmodl.fault.InvalidArgument) {
dynamicType = ,
invalidProperty = ,
msg = "A specified parameter was not correct.
"
}
root@esxserver01 root#
Open to ideas?
PS setting these active via the GUI works correctly, but no good for scripted installs!
It's not you guys. that's a current restriction from the commandline. but this can be solved by editing your esx.conf from the commandline. check the scripted installer I published a while ago, just below "# Active and standby setup and maxActive from 1 to 2" you can find the code to enable more than 1 active nics.
Duncan
My virtualisation blog:
If you find this information useful, please award points for "correct" or "helpful".
Hi Ducan,
Hmmm seems that a lot of people think it should work as I do. Can you explain how this option should work and be used?
I also can't seem to find the the scripted installer you published, are you able to link me?
Thanks heaps!
http://www.yellow-bricks.com/2008/06/27/scripted-install/
# Active and standby setup and maxActive from 1 to 2
mv /etc/vmware/esx.conf /tmp/esx.conf.bak
/bin/sed -e 's/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \"1\"/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \"2\"/g' /tmp/esx.conf.bak >> /etc/vmware/esx.conf
Duncan
My virtualisation blog:
If you find this information useful, please award points for "correct" or "helpful".
Duncan you are the best!! Based on your post I got it to work in my Kick Start script.
This is what I had to do in my Kick Start file:
mv /etc/vmware/esx.conf /tmp/esx.conf.bak
/bin/sed -e 's:/net\/vswitch/child\[0002]/teamPolicy/maxActive = "1":/net/vswitch/child\[0002]/teamPolicy/maxActive = "2":g' /tmp/esx.conf.bak >> /etc/vmware/esx.conf
vmware-vim-cmd hostsvc/net/refresh
vmware-vim-cmd internalsvc/refresh_network
vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic2,vmnic3 vSwitch2
Thank you again very much!!!!!
I'm a little confused by this.
I've been building out a scripted install for ESX3.5 U2 in preparation for our upgrade since the 110268 build came out. I'm using the --nicorderpolicy options of vswitch_setpolicy and portgroup_set on multiple vSwitches and it appears to be working exactly as expected. Here's the setup of one of my virtual machine vSwitches:
/usr/sbin/esxcfg-vswitch -a vSwitch2
/usr/sbin/esxcfg-vswitch -L vmnic4 vSwitch2
/usr/sbin/esxcfg-vswitch -L vmnic6 vSwitch2
/usr/sbin/esxcfg-vswitch -L vmnic8 vSwitch2
/usr/sbin/esxcfg-vswitch -A "vlan1-1" vSwitch2
/usr/sbin/esxcfg-vswitch -p "vlan1-1" -v 1 vSwitch2
/usr/sbin/esxcfg-vswitch -A "vlan125-1" vSwitch2
/usr/sbin/esxcfg-vswitch -p "vlan125-1" -v 125 vSwitch2
/usr/sbin/esxcfg-vswitch -A "vlan330-1" vSwitch2
/usr/sbin/esxcfg-vswitch -p "vlan330-1" -v 330 vSwitch2
/usr/sbin/esxcfg-vswitch -A "vlan401-1" vSwitch2
/usr/sbin/esxcfg-vswitch -p "vlan401-1" -v 401 vSwitch2
/usr/sbin/esxcfg-vswitch -A "vlan402-1" vSwitch2
/usr/sbin/esxcfg-vswitch -p "vlan402-1" -v 402 vSwitch2
/usr/sbin/esxcfg-vswitch -A "vlan410-1" vSwitch2
/usr/sbin/esxcfg-vswitch -p "vlan410-1" -v 410 vSwitch2
/usr/bin/vmware-vim-cmd hostsvc/net/refresh
/usr/bin/vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic4,vmnic6 --nicorderpolicy-standby=vmnic8 --nicteaming-policy=loadbalance_ip vSwitch2
Is the esx.conf workaround only required if you want to set all available NICs active? I'm certainly able to set multiple active NICs using vmware-vim-cmd, but I do have dedicated standby NIC in every instance.
My scripted install was actually for ESX V3.50 Update 1. Never tried it on ESX V3.50 Update 2. At the time of the original posting ESX Update 2 was not baked enough. I'm still running ESX V3.50 Update 1 at this time. Will probably upgrade to ESX V3.50 Update 2 sometime this month.
/usr/bin/vmware-vim-cmd hostsvc/net/refresh
/usr/bin/vmware-vim-cmd hostsvc/net/vswitch_setpolicy --nicorderpolicy-active=vmnic4,vmnic6 --nicorderpolicy-standby=vmnic8 --nicteaming-policy=loadbalance_ip vSwitch2
Is the esx.conf workaround only required if you want to set all available NICs active? I'm certainly able to set multiple active NICs using vmware-vim-cmd, but I do have dedicated standby NIC in every instance.
Correct, it's only when wanting to set everything active. The "nicorderpolicy-standby" apparently is mandatory.
@ Duncan
Regarding the following line:
/bin/sed -e 's/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \"1\"/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \"2\"/g' /tmp/esx.conf.bak >> /etc/vmware/esx.conf
Is there a reason (and does it make a difference) why you append to /etc/vmware/esx.conf as opposed to replacing it?
Cheers,
KFM
Edit: Ah bugger, I shouldn't take things out of context. I totally missed the mv /etc/vmware/esx.conf /tmp/esx.conf.bak line - my bad, sorry!
I am using ESX 3.5 U2 and having the same problem.
I resolved the problem by doing this. No esx.conf change required for this workaround.
esxcfg-vswitch --add vSwitch1
esxcfg-vswitch --add-pg="TEMP" vSwitch1
esxcfg-vswitch --pg="TEMP" --add-pg-uplink vmnic1 vSwitch1
esxcfg-vswitch --pg="TEMP" --add-pg-uplink vmnic3 vSwitch1
esxcfg-vswitch --link vmnic1 vSwitch1
esxcfg-vswitch --link vmnic3 vSwitch1
esxcfg-vswitch -D "TEMP" vSwitch1
