Forum Discussion
Assign IP Address for Windows Server 2025 VM on Hyper-V
You do not need a second virtual switch. One external Hyper-V switch can connect the host and VM to 172.16.1.0/24. Confirm the VM adapter is attached to that switch, the switch is bound to the correct physical NIC, and Allow management operating system to share this network adapter is enabled if the host uses that NIC. In the guest, verify 172.16.1.42, mask 255.255.255.0, gateway 172.16.1.5, and DNS, then confirm the address is unused. Test the guest address, host, and gateway in that order. Check the VM adapter’s VLAN setting; leave it untagged unless the physical switch requires a specific VLAN. Windows Firewall may block inbound ping, so also test outbound connectivity from the guest. If the gateway remains unreachable, inspect the physical switch for port security or MAC-address limits, because Hyper-V places the VM’s MAC behind the host port.
on the Hyper-V, if I issue ipconfig /all I get this output which indicated that the 172.16.1.41 IP is associated with Adapter #2
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