VMware Communities
AnotherDummy
Contributor
Contributor

Obtaining Virtual Network Name, Type, and External Connection in Windows Workstation via CLI/script

I am running VMWare Workstation 16.2 Pro on Windows 10, and I have to create bridged Virtual Networks in the Virtual Network Editor to assign to external network devices.

I add multiple network adapters to a particular VM (Linux guest) and I need to get the PCI bus address that corresponds to each particular Windows Network device.

I can get the physical NIC (i.e.: port #) to "FriendlyName" (i.e.: "External Connection") mapping via PowerShell.

I can also get the "Virtual Network Name" (e.g.: vmnet17 or what it's renamed to) to VMWare MAC addresses for the configured VM, also via PowerShell (and the VM's .vmx file).

Once the VM is running, I can get the VMWare MACs to PCI addresses via a bash script.

However, I still need to map from the physical device (e.g. "FriendlyName", "Location", physical MAC, etc) to the "Virtual Network Name" as shown in the Virtual Network Editor".

The end objective will be to run a script for a VM that returns:

Physical NIC #1: PCI address = "0000:xx:..."
Physical NIC #2: PCI address = "0000:xx:..." 
etc.

for each assigned (custom bridged at least) Virtual Adapter.

So I have all the pieces except the parts from the "Virtual Network Editor."  I have tried vmrest (api/vmnet), but that doesn't provide any networks but the defaults.  It does not provide the custom networks I added.  I can't find what I need in the registry or C:\ProgramData\VMware\... config files.

Can anyone help me obtain that information via a script (CLI/API)?

 

Tags (3)
Reply
0 Kudos
1 Reply
AnotherDummy
Contributor
Contributor

Perhaps an easier way to ask is:

Once I've created custom networks using the Virtual Network Editor, how can I retrieve all the networks' parameters without using a GUI?

Reply
0 Kudos