VMware vSphere Distributed Switch (VDS) provides a centralized interface to manage the virtual machine’s network for the entire datacenter. Unlike vSphere Standard Switch (VSS), Distributed Switch (VDS) shows the network as an aggregated resource. In VMware vSphere 6.7, VMware vCenter Server instance can support up to 128 VDS and each VDS can manage up to 500 hosts. This article will walk you through how to identify distributed switch ID/ Object ID using “govmami” CLI utility.
If you are not familiar with a “govmami” tool, please check out how to configure it.
1. Login to the server in which “govmami” tool is configured.
2. To list the available vSphere datacenter, execute the following command.
$ ./govc ls /UA1 /UA2 $
3. To list the distributed switch on specific data center, use the following command.
$ ./govc find /UA1 -type DistributedVirtualSwitch /UA1/network/UA1_Networks/Virtual Distributed/VDS_IAAS_UA1 /UA1/network/UA1_Networks/Virtual Distributed/VDS_PAAS_UA1
4. To get the distributed switch port group info, run the following command. Here you can find the DVS UID, Portgroupkey and configured vlanID
$./govc dvs.portgroup.info -dc=UA1 VDS_IAAS_UA1 PortgroupKey: dvportgroup-90 DvsUuid: 08 b2 28 50 b1 e5 9b 02-72 81 e0 73 fc b0 e9 c7 VlanId: 609 PortKey: 1000 PortgroupKey: dvportgroup-10621 DvsUuid: 08 b2 28 50 b1 e5 9b 02-72 81 e0 73 fc b0 e9 c7 VlanId: 349 PortKey: 10000
“govmomi” binary also can perform the following actions on DVS.
- dvs.add
- dvs.create
- dvs.portgroup.add
- dvs.portgroup.change
- dvs.portgroup.info
Hope this article is informative to you.
Leave a Reply