Forum Discussion
Assigning IP address for Hyper-V VM Windows Server 2025
I am building my first Windows Server 2025 VM on HyperV and trying to assign an IP address to the VM. I want the VM's to be like an actual server so I created an external vswitch. The original IP address for the server was 172.16.1.41 with a gateway of 172.16.1.5. When I activated the Hyper-V role, that IP was associated with the switch as described in the setup. I created my VM and successfully installed Windows Server 2025. However, when I try to assign the IP for the new VM, 172.16.1.42/255.255.255.0 and the Gateway is 172.16.1.5, I am not able to ping from the new VM. The IPCONFIG /ALL is below for both the Hyper-V and the new VM. There are 4 ethernet adapters on the physical server. The Virtual Switch created in the configuration is using Adapter 1. Should it be using Adapter 2 as shown on the Ethernet Adapter Slot4?
Hyper-V Server
Ethernet adapter vEthernet (Virtual Switch):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : D4-04-E6-0E-A2-87
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::a334:5bd:24d:d2b3%19(Preferred)
Autoconfiguration IPv4 Address. . : 169.254.142.53(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 416548070
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2D-D9-50-A2-D4-04-E6-0E-A2-87
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Slot4 Port 1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom 5719 1GbE RJ45 4-port OCP Ethernet Adapter #2
Physical Address. . . . . . . . . : D4-04-E6-0E-A2-86
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::b50d:7748:f233:237c%3(Preferred)
IPv4 Address. . . . . . . . . . . : 172.16.1.41(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.1.5
DHCPv6 IAID . . . . . . . . . . . : 181667046
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2D-D9-50-A2-D4-04-E6-0E-A2-87
DNS Servers . . . . . . . . . . . : ::1
172.16.1.41
66.187.177.13
66.187.178.13
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : IBM USB Remote NDIS Network Device
Physical Address. . . . . . . . . : 3A-68-DD-C6-88-1F
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::6d32:f1e6:7c0f:dd5d%9(Preferred)
IPv4 Address. . . . . . . . . . . : 169.254.95.120(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 473589981
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2D-D9-50-A2-D4-04-E6-0E-A2-87
NetBIOS over Tcpip. . . . . . . . : Enabled
New VM
Ethernet adapter vEthernet (Virtual Switch):
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Hyper-V Virtual Ethernet Adapter
Physical Address. . . . . . . . . : D4-04-E6-0E-A2-87
DHCP Enabled. . . . . . . . . . . : Yes
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::a334:5bd:24d:d2b3%19(Preferred)
Autoconfiguration IPv4 Address. . : 169.254.142.53(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.0.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 416548070
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2D-D9-50-A2-D4-04-E6-0E-A2-87
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Slot4 Port 1:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : Broadcom 5719 1GbE RJ45 4-port OCP Ethernet Adapter #2
Physical Address. . . . . . . . . : D4-04-E6-0E-A2-86
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::b50d:7748:f233:237c%3(Preferred)
IPv4 Address. . . . . . . . . . . : 172.16.1.41(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 172.16.1.5
DHCPv6 IAID . . . . . . . . . . . : 181667046
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2D-D9-50-A2-D4-04-E6-0E-A2-87
DNS Servers . . . . . . . . . . . : ::1
172.16.1.41
66.187.177.13
66.187.178.13
NetBIOS over Tcpip. . . . . . . . : Enabled
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
Description . . . . . . . . . . . : IBM USB Remote NDIS Network Device
Physical Address. . . . . . . . . : 3A-68-DD-C6-88-1F
DHCP Enabled. . . . . . . . . . . : No
Autoconfiguration Enabled . . . . : Yes
Link-local IPv6 Address . . . . . : fe80::6d32:f1e6:7c0f:dd5d%9(Preferred)
IPv4 Address. . . . . . . . . . . : 169.254.95.120(Preferred)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
DHCPv6 IAID . . . . . . . . . . . : 473589981
DHCPv6 Client DUID. . . . . . . . : 00-01-00-01-2D-D9-50-A2-D4-04-E6-0E-A2-87
NetBIOS over Tcpip. . . . . . . . : Enabled
1 Reply
The two IP configurations you pasted are identical, including their MAC addresses, so they do not yet show a separate guest adapter configured as 172.16.1.42. Also, the host's vEthernet interface has a 169.254 address while 172.16.1.41 remains on Slot4 Port 1. Start by running hostname and ipconfig /all inside the VM through its console, then check that its Network Adapter is connected to the intended external switch. In Virtual Switch Manager, identify the physical adapter actually connected to your 172.16.1.0/24 network; the labels 'Adapter 1' and 'Adapter 2' alone cannot establish which port is correct. Configure the guest's unique address, mask, gateway, and appropriate DNS there. If sharing the uplink with the host, review the management-OS adapter configuration too. Make switch changes from local or out-of-band access because connectivity can drop. Finally test gateway reachability; a failed ping alone does not prove that all traffic is blocked.