What does seem to work for collecting VLAN info is to enable statistics on the vmnic level.. This seem to show all VLAN tags on the connected trunk. As a test I installed an ESXi 5.1U1 host, configured with a single NIC connected to a trunk port where only the a native VLAN were allowed along with a tagged one (VLAN5). No other VLANs are allowed on the pSwitch port.....
I then enabled the stats function on the vmnic.... (esxcli network nic vlan stats set -e true -n vmnic0)
I then pulled the stats from it to verify that only the native VLAN along with VLAN 5 are seen..
~ # esxcli network nic vlan stats get -n vmnic0
VLAN 0
Packets received: 140
Packets sent: 5
VLAN 5
Packets received: 727
Packets sent: 366
~ #
All good...
Then I configured the pSwitch port to be member of an additional VLAN.... VLAN 6. Didn't do anything on the host side..
Pulled the stats again..
~ # esxcli network nic vlan stats get -n vmnic0
VLAN 0
Packets received: 243
Packets sent: 8
VLAN 5
Packets received: 979
Packets sent: 431
VLAN 6
Packets received: 14
Packets sent: 0
~ #
Seems like the stat info is updated very fast in my quick test,.. Maybe this will help out in verifying VLANs available,..
/Rubeck