Sometimes You need to list MAC addresses loged on host’s vSwitches to eliminate VM’s MAC address duplicates.
- Create a shell script:
- Copy and past the code listed below:
- Change the file’s permissions
- Run the script
Simple, but useful! 🙂
… but this is not the only one possible method 🙂
One thought on “Part 1 – How to list vSwitch “MAC Address table” on ESXi host?”
Great stuff. just a small fix to list all vswitches regardless of the length of their names.
#for VSWITCH in `vsish -e ls /net/portsets/ | cut -c 1-8`
for VSWITCH in `vsish -e ls /net/portsets/ | cut -d ‘/’ -f1`