VMware Cloud Community
baksm
Contributor
Contributor
Jump to solution

Activate NICs in KickStart script

My Network configuration in ESX looks looks like that:

2 Vswitches with 2 NICs assigned to each vswitch and teamed, all NICs are active. How can I make both NICs on each vswitch active in Kickstart script. This is what I have so far:

  1. add nic on vSwitch0

/usr/sbin/esxcfg-vswitch -L vmnic1 vSwitch0

/usr/sbin/esxcfg-vswitch -A "VM Network" vSwitch0

  1. Create vSwitch1 with VMkernel and add vmnic2 and vmnic3

/usr/sbin/esxcfg-vswitch -a vSwitch1

/usr/sbin/esxcfg-vswitch -A VMkernel vSwitch1

/usr/sbin/esxcfg-vswitch -L vmnic2 vSwitch1

/usr/sbin/esxcfg-vswitch -L vmnic3 vSwitch1

/usr/sbin/esxcfg-vmknic -a VMkernel -i 10.1.6.156 -n 255.255.0.0

sleep 3

0 Kudos
1 Solution

Accepted Solutions
depping
Leadership
Leadership
Jump to solution

  1. 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\[0000\]\/teamPolicy\/maxActive = \”1\”/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \”2\”/g’ /tmp/esx.conf.bak >> /etc/vmware/esx.conf

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".

View solution in original post

0 Kudos
2 Replies
depping
Leadership
Leadership
Jump to solution

  1. 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\[0000\]\/teamPolicy\/maxActive = \”1\”/net\/vswitch\/child\[0001\]\/teamPolicy\/maxActive = \”2\”/g’ /tmp/esx.conf.bak >> /etc/vmware/esx.conf

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".

0 Kudos
depping
Leadership
Leadership
Jump to solution

and you can set different teaming options via:

/usr/bin/vimsh -n -e “hostsvc/net/vswitch_setpolicy –nicteaming-policy=loadbalance_ip vSwitch1″

Duncan

My virtualisation blog:

If you find this information useful, please award points for "correct" or "helpful".