Bioveld

New Member
Joined
May 22, 2025
Messages
3
I have create a virtual machine to replace an old Dell server. The old server has 4 network adapters, to connect to a regular network/internet, a fire protection network, a process control network, and a modbus/radio network. I installed 3 additional network cards to create 4 adapters on the Windows 2022 server and assigned them, by IP address, to each of the networks. I then set up 4 virtual switches to match these adapters. Inside the virtual machine I can see 4 network adapters but the names/description do not match any of the virtual switches or have anything that can be identified with a particular virtual switch. I cannot tell which adapter on the virtual machine is related to a which of the 4 networks. I have tried manually to set up a static IP address on the virtual machine adapter but usually I find that it is not connected to that network. Is there any way to identify which network adapter in the virtual machine is related to a particular virtual switch or to see which network it is assigned to?
 

Solution
This is a common challenge with virtual network setups in Hyper-V, especially when dealing with multiple NICs and virtual switches. Hyper-V’s VM network adapter naming is unfortunately quite generic, which makes mapping tricky. Here’s how you can reliably identify which network adapter inside your VM corresponds to each Hyper-V virtual switch:

Step-by-Step: Mapping VM Adapters to Hyper-V Virtual Switches​

1. Label at the Host Level

  • In Hyper-V Manager (or PowerShell), give each virtual switch a clear, descriptive name (e.g., “LAN”, “Fire Protection”, “Process Control”, “Modbus”).
  • When attaching virtual NICs to your VM, note the order in which you add them. Hyper-V will enumerate these adapters in that...
This is a common challenge with virtual network setups in Hyper-V, especially when dealing with multiple NICs and virtual switches. Hyper-V’s VM network adapter naming is unfortunately quite generic, which makes mapping tricky. Here’s how you can reliably identify which network adapter inside your VM corresponds to each Hyper-V virtual switch:

Step-by-Step: Mapping VM Adapters to Hyper-V Virtual Switches​

1. Label at the Host Level

  • In Hyper-V Manager (or PowerShell), give each virtual switch a clear, descriptive name (e.g., “LAN”, “Fire Protection”, “Process Control”, “Modbus”).
  • When attaching virtual NICs to your VM, note the order in which you add them. Hyper-V will enumerate these adapters in that order inside the VM.

2. Identify MAC Addresses

  • On the Hyper-V Host:
  • Open VM settings, select each network adapter, and note the MAC address assigned by Hyper-V (it's displayed in the settings window).
  • Inside the VM:
  • Open Command Prompt and run:
    getmac /v /fo list
    or, in PowerShell:
    Get-NetAdapter | Format-Table -Property Name, MacAddress, Status
  • This gives you a list of adapters and their MAC addresses within Windows Server 2022 VM.

3. Match MAC Addresses

  • Match the MAC addresses from the VM with what’s shown in Hyper-V Manager. This tells you exactly which VM network adapter connects to which virtual switch.

4. Rename the Adapters for Clarity

  • Once you know which is which:
    In the VM, open Control Panel > Network and Sharing Center > Change adapter settings, right-click each adapter, and rename it to match its function (e.g., “LAN”, “Fire Protection”, etc..

Additional Tips​

  • Static MAC Addresses: Consider assigning static MAC addresses in Hyper-V for consistency across reboots.
  • Document the Mappings: Keep a record for future maintenance and troubleshooting.
  • Virtual Switch Manager: Double-check each switch’s physical adapter binding in the Hyper-V “Virtual Switch Manager”.

Summary Table Example

VM Adapter NameMAC Address (VM)MAC Address (Hyper-V)Virtual SwitchNetwork Function
Ethernet 1XX-XX-XX-XX-XX-01XX-XX-XX-XX-XX-01LAN SwitchLAN/Internet
Ethernet 2XX-XX-XX-XX-XX-02XX-XX-XX-XX-XX-02Fire ProtectionFire Protection Network
Ethernet 3XX-XX-XX-XX-XX-03XX-XX-XX-XX-XX-03Process ControlProcess Control Network
Ethernet 4XX-XX-XX-XX-XX-04XX-XX-XX-XX-XX-04ModbusModbus/Radio

If you need precise instructions (including PowerShell scripts) or want me to walk through your specific adapter settings from a config file, let me know! If you’ve uploaded relevant screenshots or configuration exports with your last upload, just say so and I’ll help analyze them directly.
 

Solution
This is a pretty common confusion when working with multiple virtual NICs in Hyper-V. Since the adapters inside the VM don’t clearly map to the virtual switches, it becomes hard to identify which network is which. A reliable way is to match the MAC addresses from the VM with the ones shown in Hyper-V Manager, as that directly tells you which adapter is connected to which switch. After that, renaming the adapters inside the VM makes things much easier to manage going forward.
 

That’s the right approach — matching MAC addresses is the most reliable way to map each VM NIC to its Hyper-V virtual switch.

Fastest way to identify each adapter​

On the Hyper-V host​

Run this in PowerShell:
Get-VMNetworkAdapter -VMName "YourVMName" | Select-Object Name, SwitchName, MacAddress
This shows:
  • Adapter name in Hyper-V
  • Virtual switch
  • MAC address

Inside the guest VM​

Run:
Get-NetAdapter | Select-Object Name, InterfaceDescription, MacAddress, Status
Now compare the MAC addresses from both sides.

Best practice after you identify them​

Rename the NICs inside the VM so they are obvious:
Code:
Rename-NetAdapter -Name "Ethernet" -NewName "LAN"
Rename-NetAdapter -Name "Ethernet 2" -NewName "Backup"
Rename-NetAdapter -Name "Ethernet 3" -NewName "Management"
That makes future admin much easier.

Even better: name them clearly in Hyper-V too​

On the host, rename the VM adapters to match their purpose:
Code:
Rename-VMNetworkAdapter -VMName "YourVMName" -Name "Network Adapter" -NewName "LAN"
Rename-VMNetworkAdapter -VMName "YourVMName" -Name "Network Adapter 2" -NewName "Backup"
Then check again:
Get-VMNetworkAdapter -VMName "YourVMName" | Select-Object Name, SwitchName, MacAddress

My recommended workflow​

  1. List VM adapters on the host.
  2. List adapters inside the guest.
  3. Match them by MAC address.
  4. Rename them on both sides.
  5. Document which switch is LAN, iSCSI, Backup, Mgmt, etc.

One important note​

If MAC spoofing, teaming, or synthetic/legacy adapters are involved, mapping can get more confusing, but the MAC comparison method still works best.
If you want, I can give you a single PowerShell script that outputs a clean host/guest NIC mapping table for a Hyper-V VM.
 

Back
Top