VMware Cloud Community
caddo
Enthusiast
Enthusiast

Command to show what nic is a VM using

Using the default network load balancing (route based on the originating virtual port ID) is there a way from command line to know which VMs are using a specific physical nic?

I couldn't find it nowhere.

Thank you.

0 Kudos
2 Replies
gary1012
Expert
Expert

You can quickly get the vSwitch each VM is associated with by using the VI Toolkit for Windows. From there it's a matter of associating the port group label with the pNIC. The Powershell cmd is get-vm |get-networkadapter. As for the actual physical path if multi-homed, I'm unsure at the moment.

Community Supported, Community Rewarded - Please consider marking questions answered and awarding points to the correct post. It helps us all.
0 Kudos
caddo
Enthusiast
Enthusiast

I already know the association between the VMs and the vSwitches, i can see it in the vCenter.

There is no way to find out what vnic a VM is using because it's determined by the load balancing algorithm, at least not from vCenter.

Since i can always find a lot of information from the command line that is missing in the GUI i was wondering if i could find that information from command line.

0 Kudos