esxcfg-vswitch [options] [vswitch[:ports]]
-a|--add Add a new virtual switch.
[--dvswitch --uuid=<16 hexadecimal digits>
--impl-class=
--version=]
Use --dvswitch to add a DVSwitch instead.
(FOR INTERNAL USE ONLY).
Use --uuid to specify the UUID for the DVSwitch
(FOR INTERNAL USE ONLY).
Use --impl-class to change implementation class
from the default "etherswitch" class
(FOR INTERNAL USE ONLY).
Use --version to change dvswitch version
(FOR INTERNAL USE ONLY).
-d|--delete Delete the virtual switch.
[--dvswitch ] Use --dvswitch to delete a DVSwitch instead.
(FOR INTERNAL USE ONLY).
-l|--list List all the virtual switches.
-L|--link=pnic Set pnic as an uplink for the vswitch.
-U|--unlink=pnic Remove pnic from the uplinks for the vswitch.
-R|--restore-uplinks Restore uplinks for all vswitches from config file.
(FOR INTERNAL USE ONLY).
-M|--add-pg-uplink=uplink Add an uplink to the list of uplinks for a portgroup
-N|--del-pg-uplink=uplink Delete an uplink from the list of uplinks for a portgroup
-P|--add-dvp-uplink=uplink Add an uplink to a DVPort on a DVSwitch.
Must specify DVPort Id.
-Q|--del-dvp-uplink=uplink Delete an uplink from a DVPort on a DVSwitch.
Must specify DVPort Id.
-V|--dvp=dvport Specify a DVPort Id for the operation.
-p|--pg=portgroup Specify a portgroup for operation
Use ALL to set VLAN IDs on all portgroups
-v|--vlan=id Set vlan id for portgroup specified by -p
0 would disable the vlan
-c|--check Check to see if a virtual switch exists.
Program outputs a 1 if it exists, 0 otherwise.
-A|--add-pg=name Add a new portgroup to the virtual switch.
-D|--del-pg=name Delete the portgroup from the virtual switch.
-C|--check-pg=name Check to see if a portgroup exists. Program
outputs a 1 if it exists, 0 otherwise.
-B|--set-cdp Set the CDP status for a given virtual switch.
To set pass one of "down", "listen", "advertise", "both".
-b|--get-cdp Print the current CDP setting for this switch.
-X|--set-maxactive Set the max active uplinks for this switch.
-x|--get-maxactive Print the max active uplinks for this switch.
-m|--mtu=MTU Set MTU for the vswitch/DVSwitch. This affects all the nics attached on the vswitch.
-r|--restore Restore all virtual switches from the configuration file
(FOR INTERNAL USE ONLY).
-y|--activate-ens Activate ENS on the virtual switch.
-Y|--deactivate-ens Deactivate ENS on the virtual switch.
-z|--reassociate-ens Reassociate uplinks
(FOR INTERNAL USE ONLY).
-h|--help Show this message.
Note:
esxcfg-vswitch does not support creation, modification or deletion of opaque switch.
However, they will be listed during -l|--list option.