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.
Thanks for the update. So as best as I can tell, the correct nic is being used for the physical connection to the network. There are 4 on the server and I am using 1. In the standard hardware configurations and in Hyper-V, they are the same. The Hyper-V server was originally configured with the 172.16.1.41 IP. After creating the External V-Switch, the IP address for the server is now 169.254.95.120. I remember reading that this would occur during installation and the IP would transfer to the Virtual Switch. I am able to ping 172.16.1.41 and 169.254.95.120 successfully, however, I don't see it in a 172.16.1.41 in the Hyper-V configuration anywhere. I do know the physical switch has no port security or mac limitations at this time. When I start 172.16.1.42, the VM Starts without issue. However, I cannot ping either of the other addresses.