Need static IP for AdGuard's DHCP server on Hyper-V VM

I need to set up static IP address for my hass.io system. I cannot use USB and I cannot remove SD card. I used vhdx file to set it up on my hyper-v system.

Is there any way for me to set it up? If not, I cannot use AdGuard’s DHCP server.

I was on same boat, so I configured on my router MAC reservation, so hassio on my esxi server always gets same ip

Thank you for your reply.

I have my HA configured on the router and it always has the same IP address. The problem is that when I try to configure DHCP server on AdGuard, it detects that I do not have the static IP address configured and it does not allow me to enable DHCP server. I have to have static IP address.

Same behavior and restrictions on my Side…

Need to set static IP in vhdx version, which always crashes if using nmcli or even predefined network file…

In the end, I gave up and removed AdGuard.

EDIT: Since Supervisor 2020.12 and newer network settings can be edited in the Supervisor UI web frontend, click change next to ip address then select static, review all values and click save.

I’ve just managed to successfully set this up, here’s what I did -

See Step 1 in the add-on installation instructions. From there, there is a link to setting a static IP address:

https://github.com/home-assistant/operating-system/blob/70c41b5690544e430aaca281256354e2e6774c4e/Documentation/network.md#using-nmcli-to-set-a-static-ipv4-address

If it doesn’t go straight to it, scroll down to the section where it explains using NMCLI to configure this. I just connected directly to my server using the Hyper-V manager, once the connection window comes up press enter a few times and you’ll get the login screen, use root as the username, there is no password.

You’ll need to set your HassOS’s IP, DNS and Gateway address. Remember the DNS will need to be an EXTERNAL address (eg 1.1.1.1) not the HassOS/HomeAssistant VM’s address, as it (ADGuard) will not be available when HomeAssistant boots.

Set this up BEFORE changing the DNS server on your DHCP server (eg your router).

Configuring a reservation on your DHCP server will not work.

Hope this helps.

PS however it seems my host can’t use the AdGuard DNS (even once it’s up and running…) so my host too now has a static up/dns etc. Which is probably good practice anyway!