You can use ESXCLI to link and unlink uplink adapters.
When you create a virtual switch by using esxcli network vswitch standard add, all traffic on that virtual switch is initially confined to that virtual switch. All virtual machines connected to the virtual switch can talk to each other, but the virtual machines cannot connect to the network or to virtual machines on other hosts. A virtual machine also cannot connect to virtual machines connected to a different virtual switch on the same host.
Having a virtual switch that is not connected to the network might make sense if you want a group of virtual machines to be able to communicate with each other, but not with other hosts or with virtual machines on other hosts. In most cases, you set up the virtual switch to transfer data to external networks by attaching one or more uplink adapters to the virtual switch.
You can use the following commands to list, add, and remove uplink adapters. When you link by using ESXCLI, the physical NIC is added as a standby adapter by default. You can then modify the teaming policy to make the physical NIC active by running the command esxcli network vswitch standard policy failover set.
- List uplink adapters.
esxcli <conn_options> network vswitch standard list
The uplink adapters are returned in theUplink
item. - Add a new uplink adapter to a virtual switch.
esxcli <conn_options> network vswitch standard uplink add --uplink-name=vmnic15 --vswitch-name=vSwitch0
- Remove an uplink adapter from a virtual switch.
esxcli <conn_options> network vswitch standard uplink remove --uplink-name=vmnic15 --vswitch-name=vSwitch0