Reassign a vswif to a new vmnic
Posted by Chris on November 3, 2009
The VMware host in my lab is a Dell GX620 running ESX3.51 U2. It has three NIC’s:
The embedded Broadcom BCM5751 Gigabit Adapter (vmnic0)
3Com 3C905C-TX 10/100 Adapter (vmnic1)
Intel 8254N Dual Port Gigabit Adapter (vmnic2 and vmnic3)
The 3C905 isn’t entirely VMware compatible. It can be used as a service console connection but will not function as a virtual machine uplink on a vSwitch. It will always show disconnected.
I want to reassign the service console vswif to the 3Com adapter, keep the same IP address and move the service console port group to a new vSwitch.

VMware doesn’t like having two service console connections with different IP addresses in the same subnet, so I have two options.
1. Create a service console connection in a different subnet and access the host from that subnet using the VIclient.
2. Enter the commands directly on the host console.
I recommend option two. Keep in mind that this process temporarily disrupts network communications to the host via the service console IP.
After obtaining physical access to the host’s console (or network access via a DRAC or ILO), log in and su - to establish root.
Remove vswif0 from vSwitch0
esxcfg-vswif -d vswif0 –ip=192.168.68.35 –netmask=255.255.255.0 –portgroup=SCX
Remove the SCX port group from vSwitch0
esxcfg-vswitch –del-pg=SCX vSwitch0
Create a new vSwitch for the service console;
esxcfg-vswitch -a vSwitch3
Assign the 3Com adapter to the newly created vSwitch
esxcfg-vswitch -L vmnic1 vSwitch3
Add the SCX port group to vSwitch3
esxcfg-vswitch -A SCX vSwitch3
Add vswif0 to the SCX port group and assign the IP address and subnet mask
esxcfg-vswif –add –ip=192.168.68.35 –netmask=255.255.255.0 –Portgroup=SC2 vswif0
Restart the VMware management service
service mgmt-vmware restart
Here’s vSwitch0, still connected to vmnic0 but minus the service console

And here’s the new vSwitch3 with the service console reassigned to vmnic1
