Remove NIC from VSwitch via Command Line/Putty

0
image

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.

  1. Putty to the machine in question
  2. 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

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.