List all vswif interfaces:
/usr/sbin/esxcfg-vswif -l
Name Port Group IP Address Netmask Broadcast Enabled DHCP
vswif0 Service Console 192.168.5.5 255.255.255.0 192.168.5.255 true false
Delete a vswif interface:
/usr/sbin/esxcfg-vswif -d vswif0
Add a new vswif interface:
/usr/sbin/esxcfg-vswif -a -p"Service Console" -i192.168.5.5 -n255.255.255.0 vswif0
Command Options:
/usr/sbin/esxcfg-vswif
esxcfg-vswif []
-a|--add Add vswif, requires IP parameters.
Automatically enables interface.
-d|--del Delete vswif.
-l|--list List configured vswifs.
-e|--enable Enable this vswif interface.
-s|--disable Disable this vswif interface.
-p|--portgroup Set the portgroup name of the vswif.
-i|--ip or DHCP The IP address for this vswif or specify
DHCP to use DHCP for address.
-n|--netmask The IP netmask for this vswif.
-b|--broadcast The IP broadcast address for this vswif
(not required if netmask and ip are set).
-c|--check Check to see if a virtual NIC exists.
Program outputs a 1 if the given vswif
exists and is enabled, 0 otherwise.
-D|--disable-all Disable all vswif interfaces.
(WARNING: This may result in a loss of network
connectivity to the Service Console).
-E|--enable-all Enable all vswif interfaces and bring them up.
-A|--autoNet Setup one DHCP vswif per vSwitch.
-r|--restore Restore all vswifs from the configuration.
file (FOR INTERNAL USE ONLY).
-h|--help Show this message.
!!!WARNING!!!
Loss of network connectivity may result if invalid parameters are passed to
Add, Delete, Portgroup or IP operations.