Remove NIC from VSwitch via Command Line/Putty
So – this is a random one. Have a host that belonged to another VCenter and you need to remove a NIC from a distributed switch? This can be fun. I found that the easiest way to do this is via command line.
- Putty to the machine in question
- Type “esxcli network vswitch dvs vmware list” to list the VSwitches and the vmnic’s associated with them. This will provide you with an output that looks something like this:
3. So using the info above, to remove VMNIC2 from this DVS, you would use the following command:
“esxcfg-vswitch -Q NICNAME -V PORTID DVSName“
so in the case of the image above, that command would look like :
“esxcfg-vswitch -Q vmnic2 -V 95915 SuperAwesomeDVS“