Cannot set static IP for host machine after adding Hyper-V role

Omid Shojaee 116 Reputation points

On Windows Server 2022 Datacenter edition, we have enabled Hyper-V role. Before that the Ethernet interface of the server had as the static IP address and it worked fine.

After enabling the role, the IPv4 settings of Ethernet interface is wiped out (the IPv4 is unchecked). There's a new interface named Hyper-V Virtual Ethernet Adapter and it is set to get the IP address from DHCP server. The issue is now we cannot use Remote Desktop and Server Manager to manage this server remotely because the IP address is not persistent across reboots.

And if we assign static IP (the same we had before) to the Hyper-V Virtual Ethernet Adapter, the network disconnects.

Server has 4 NICs but only one is plugged in.

A Windows technology providing a hypervisor-based virtualization solution enabling customers to consolidate workloads onto a single server.
2,530 questions
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Limitless Technology 39,341 Reputation points

    This can be likely happened after creating Virtual Switch , I will suggest you remove default virtual switch and create new Virtual switch with External as per below Microsoft article.

    Allow management operating system to share this network adapter -> Select this option if you want to allow the Hyper-V host to share the use of the virtual switch and NIC or NIC team with the virtual machine. With this enabled, the host can use any of the settings that you configure for the virtual switch like Quality of Service (QoS) settings, security settings, or other features of the Hyper-V virtual switch.


    --If the reply is helpful, please Upvote and Accept as answer--

    0 comments No comments