You can use vicfg-vswitch to check, add, and remove port groups.
Network services connect to virtual switches through port groups. A port group allows you to group traffic and specify configuration options such as bandwidth limitations and VLAN tagging policies for each port in the port group. A virtual switch must have one port group assigned to it. You can assign additional port groups.
Specify one of the options listed in Connection Options for vCLI Host Management Commands in place of <conn_options>
.
- Check whether port groups are currently associated with a virtual switch.
vicfg-vswitch <conn_options> --check-pg <port_group> vSwitch1
The command returns 0 if the specified port group is associated with the virtual switch, and returns 1 otherwise. Usevicfg-vswitch --list
to list all port groups. - Add a port group.
vicfg-vswitch <conn_options> --add-pg <port_group_name> vSwitch1
- Delete one of the existing port groups.
vicfg-vswitch <conn_options> --del-pg <port_group_name> vSwitch1