When I encountered this problem in a few virtual machines, I wanted to write it as an article, this problem can often occur in virtual servers, I share the solution steps below
When the DHCP service is enabled but the DHCP server is temporarily or permanently unavailable, TCP/IP automatically assigns a Class B IP address in the range 169.254.0.0 to 169.254.255.255. In Windows, this process is called Automatic Private IP Addressing (APIPA).
If you prefer to assign static IP addresses to the machine, you must disable IP autoconfiguration. Disabling it prevents the system from assigning automatic private IPs (APIPA) when DHCP is unavailable.
- Identify the Interface with Autoconfiguration Enabled
Check which network interface has automatic IP configuration (APIPA) enabled.

- Find the Interface Index Number
Run the following command to list all network interfaces and their index numbers:
netsh interface ipv4 show interfaces

Our index is “10” in this example.
- Run the command below with changing the ‘10’ with your index number.
netsh interface ipv4 set interface 10 dadtransmits=0 store=persistent

Disabling and enabling the network card after the process can often solve it, but I recommend restarting the server.