Adding and Deleting
Virtual Switches with vicfg-vswitch
You can add and
delete virtual switches by using the
--add|-a
and
--delete|-d
options.
Specify one of the options
listed in
Connection Options for vCLI Host Management Commands
in place of
<conn_options>
.
- Add a virtual switch.
After you have added a virtual switch, you can set switch attributes. See Setting Switch Attributes with vicfg-vswitch. You can also add one or more uplink adapters. See Linking and Unlinking Uplink Adapters with vicfg-vswitch.vicfg-vswitch <conn_options> --add vSwitch2 - Delete a virtual switch.
You cannot delete a virtual switch if any ports on the switch are still in use by VMkernel networks, virtual machines, orvicfg-vswitch <conn_options> --delete vSwitch1vswifs. Runvicfg-vswitch --listto determine whether a virtual switch is in use.