Home Assistant going to sleep in VirtualBox VM

Setup:

  • HP Laptop
  • Windows 11
  • VirtualBox VM

For the most part, this installation is working just fine, however, if I don’t interact with HA for ~20 minutes, it’s like the VM goes into a sleep mode.

HA becomes inaccessible via the app and the browser. I can remote into the laptop (indicating the connection is still good) and I can clearly see the VM still running.

There’s nothing on the CLI indicating it’s got no network connection and checking logs after a restart doesn’t show any issues.

After shutting down the VM and starting it up again, it works fine - until I leave it again.

I have looked at the power management settings for the network adapters (as suggested in another post) and even with the setting disabled (see below) the behaviour remains the same.

I have an identical setup running via VirtualBox on a Macbook Air (for over a year now) and I never once had any of these issues.

Having exactly the same problem… with virtualbox on Ubuntu Jammy Jellyfish on a Surface Pro 1 and a Dell XPS 13. Hoping someone has some suggestions for us.

Having a similar problem. If I leave VirtualBox manager open, the VM continues to run. If I close the VirtualBox manager but leave the HA VM running in a separate window - after a few minutes - it stops responding. If I open the VirtualBox Manager again, the VM responds.

I’ll be honest, I didn’t “solve” this problem myself, but for whatever reason, the VM stopped going to sleep at some point. I don’t know if there was a patch somewhere that fixed it (I update VBox with every release) or if Windows had and update that resolved it.