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
Back
Top