• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

UnixArena

  • Home
  • kubernetes
  • DevOps
    • Terraform
    • Jenkins
    • Docker
    • Openshift
      • OKD
    • Ansible engine
    • Ansible Tower
      • AWX
    • Puppet
  • Cloud
    • Azure
    • AWS
    • Openstack
    • Docker
  • VMware
    • vCloud Director
    • VMware-Guests
    • Vcenter Appliance 5.5
    • vC OPS
    • VMware SDDC
    • VMware vSphere 5.x
      • vSphere Network
      • vSphere DS
      • vShield Suite
    • VMware vSphere 6.0
    • VSAN
    • VMware Free Tools
  • Backup
    • Vembu BDR
    • Veeam
    • Nakivo
    • Azure Backup
    • Altaro VMBackup
    • Spinbackup
  • Tutorials
    • Openstack Tutorial
    • Openstack Beginner’s Guide
    • VXVM-Training
    • ZFS-Tutorials
    • NetApp cDot
    • LVM
    • Cisco UCS
    • LDOM
    • Oracle VM for x86
  • Linux
    • How to Articles
    • Q&A
    • Networking
    • RHEL7
  • DevOps Instructor-led Training
  • Contact

VMware vSphere – How to identify Distributed Switch ID / Portgroupkey ?

July 18, 2019 By Cloud_Devops Leave a Comment

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.

Filed Under: VMware vSphere, VMware vSphere 6.5, vSphere Network Tagged With: vDS, VMware vSphere

Reader Interactions

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Primary Sidebar

Follow UnixArena

  • Facebook
  • LinkedIn
  • Twitter

Copyright © 2025 · UnixArena ·

Go to mobile version