先查看一下当前标准虚拟交换机与分布式交换机情况
~ # esxcfg-vswitch -l
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 128 5 128 1500 vmnic0,vmnic2
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 0 0 vmnic0,vmnic2
VMkernel 0 1 vmnic0,vmnic2
Management Network 0 1 vmnic0,vmnic2
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vmservice-vswitch 64 2 64 1500
PortGroup Name VLAN ID Used Ports Uplinks
vmservice-trend-pg 0 0
vmservice-vmknic-pg 0 1
DVS Name Num Ports Used Ports Configured Ports MTU Uplinks
dvSwitch 256 6 256 1500
DVPort ID In Use Client
2886 1 vmnic1
2887 0
423 1 ******.vmhost1.eth0
426 1 ******.vmhost2.eth0
409 1 ******.vmhost3.eth0
432 1 ******.vmhost4.eth0
给分布式交换机增加上联网卡
~ # esxcfg-vswitch -P vmnic1 dvSwitch -V 2886
从分布式交换机删除上联网卡
~ # esxcfg-vswitch -Q vmnic1 dvSwitch -V 2886
~ # esxcfg-vswitch -l
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 128 5 128 1500 vmnic0,vmnic2
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 0 0 vmnic0,vmnic2
VMkernel 0 1 vmnic0,vmnic2
Management Network 0 1 vmnic0,vmnic2
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vmservice-vswitch 64 2 64 1500
PortGroup Name VLAN ID Used Ports Uplinks
vmservice-trend-pg 0 0
vmservice-vmknic-pg 0 1
DVS Name Num Ports Used Ports Configured Ports MTU Uplinks
dvSwitch 256 6 256 1500 vmnic1
DVPort ID In Use Client
2886 1 vmnic1
2887 0
423 1 ******.vmhost1.eth0
426 1 ******.vmhost2.eth0
409 1 ******.vmhost3.eth0
432 1 ******.vmhost4.eth0
~ # esxcfg-vswitch -P vmnic3 dvSwitch -V 2887
~ # esxcfg-vswitch -l
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vSwitch0 128 5 128 1500 vmnic0,vmnic2
PortGroup Name VLAN ID Used Ports Uplinks
VM Network 0 0 vmnic0,vmnic2
VMkernel 0 1 vmnic0,vmnic2
Management Network 0 1 vmnic0,vmnic2
Switch Name Num Ports Used Ports Configured Ports MTU Uplinks
vmservice-vswitch 64 2 64 1500
PortGroup Name VLAN ID Used Ports Uplinks
vmservice-trend-pg 0 0
vmservice-vmknic-pg 0 1
DVS Name Num Ports Used Ports Configured Ports MTU Uplinks
dvSwitch 256 7 256 1500 vmnic3,vmnic1
DVPort ID In Use Client
2886 1 vmnic1
2887 1 vmnic3
423 1 ******.vmhost1.eth0
426 1 ******.vmhost2.eth0
409 1 ******.vmhost3.eth0
432 1 ******.vmhost4.eth0