VMware vSphere ESXi
Following steps have to be performed to check the VLAN tag:
Open SSH session to the ESXi host where the Virtual Machine is running.
Execute command esxcfg-vswitch -l and note down the DVPort ID:
In this case Windows10 Virtual Machine is connected on DVPort 384.
Run the command net-dvs -l | less.
Type the following string to search for DVPort 384 in the output:
/port 384:
And search for key com.vmware.vswitch.port.vlan which will give the VLAN tag:
**NOTE: Above steps can also be performed for a VMkernel adapter.