Losing internet connection on virtual box

I have installed HA on virtual box on my iMac. Working great, except for I keep losing my internet connection. If I type net info in the terminal it will show no ipv4 address and supervisor_internet is false. Doing host reboot fixes the issue for a few hours and then it is gone again. I have turned off logout for the osx user, I have set it to not sleep when the screen turns off, what else am I missing?
Thanks.

Fixed IP or DHCP?
NAT behind IP of MAC or bridged network card?

I personally advise DHCP (with IP reservation) and definitely bridge mode for virtualbox

I have IP reservation on the router and using bridged wifi adapter.

Good, so that is not the issue then…

What about the host? Fixed IP??
Maybe an option to time it, and compare it to the DHCP renew time?

I don’t have a mac, so can’t offer you much more info…

When you say the host, do you the mac? Also, has a reserved address on the router. I don’t know much about networking, not sure how to check the DHCP renew time, is that an OS setting or router setting?

DHCP server setting ( so within your router).

Even when the IP is reserved, it is still required to renew it after the lease time has expired…
It is just that the reservation ensures it will get the same IP address…

Hmm not sure, my router doesn’t seem to give me that info anywhere. If it were related to the renewal, what would the fix be? Can try and see.

Every DHCP has an expiring time
From W10:
image
Accessing/changing it is something else :thinking:

Easy to bypass if you make the IP static :wink:
(and leave the reservation so nothing else can use that IP)

Following these instructions fixed my issue Home Assistant not contactable after approx 24hrs using Hass.io on VirtualBox · Issue #545 · home-assistant/operating-system · GitHub

Good (and confirms my suspicion regarding dhcp lease time :wink:)