Skip to content

Instantly share code, notes, and snippets.

@tlhakhan
Created June 8, 2021 22:56
Show Gist options
  • Save tlhakhan/d5120d7cf284a61d0fe99bb6c4821eba to your computer and use it in GitHub Desktop.
Save tlhakhan/d5120d7cf284a61d0fe99bb6c4821eba to your computer and use it in GitHub Desktop.
Persist vusb to mac address mapping
[root@vs-1:~] esxcli network nic list
Name PCI Device Driver Admin Status Link Status Speed Duplex MAC Address MTU Description
------ ------------ ------ ------------ ----------- ----- ------ ----------------- ---- ------------------------------------------------
vmnic0 0000:00:1f.6 ne1000 Up Up 1000 Full 94:c6:91:a5:40:79 1500 Intel Corporation Ethernet Connection (6) I219-V
vusb0 Pseudo uether Up Up 1000 Full 00:50:b6:1b:f2:79 1500 ASIX Elec. Corp. AX88179
vusb1 Pseudo uether Up Up 1000 Full 00:50:b6:ea:b8:42 1500 ASIX Elec. Corp. AX88179
vusb2 Pseudo uether Up Up 1000 Full 00:50:b6:1e:dc:72 1500 ASIX Elec. Corp. AX88179
[root@vs-1:~] esxcli network nic list | grep vusb | awk '{print $1"_mac="$8}'
vusb0_mac=00:50:b6:1b:f2:79
vusb1_mac=00:50:b6:ea:b8:42
vusb2_mac=00:50:b6:1e:dc:72
[root@vs-1:~] esxcli network nic list | grep vusb | awk '{print $1"_mac="$8}' | xargs -n3
vusb0_mac=00:50:b6:1b:f2:79 vusb1_mac=00:50:b6:ea:b8:42 vusb2_mac=00:50:b6:1e:dc:72
[root@vs-1:~] esxcli system module parameters set -m vmkusb_nic_fling -p "vusb0_mac=00:50:b6:1b:f2:79 vusb1_mac=00:50:b6:ea:b8:42 vusb2_mac=00:50:b6:1e:dc:72"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment