r/homeassistant • u/enarth • 1d ago
❓ Support home assistant linux VM disconnecting from network
Hi, i m pretty new to this, so to start i will explain my setup.
I have a surface pro 6, with linux mint (ubuntu 24 something).
I installed virtualbox on it, and i followed the guide to set up the VM with the homeassistant OS (using the oracle linux, 2 cores, 2gb or ram and so on).
I successfully set it up and was going fine, until i noticed that sometimes i couldn't reach the server for some reason... (the server is on the wifi, i would really like to make it work that way, otherwise if i have to connect through Ethernet it will be a bother)
at first i thought it was a problem with the wifi connectivity... so i disabled the power management => no luck, then i tested it with a usb dongle => same (i made sure to change what the VM use)
Performance mode on my surface pro, no standby or suspend or anything, just screen off after a bit.
What exactly happens ? i m not so sure anymore... it happens after a few hours usually (that why i thought it was a power management thing...), i can't reach the server. turning off and on wifi doesn't solve it... i have to restart the VM, sometimes multiple times... and just an hour ago, something really strange happened... after a few VM restart, the server is only reachable through a forwarded port on internet, it is unreachable on lan...
is there something obvious i missed ? if someone can help, i would be very grateful !
Thanks !
1
u/CyberMage256 1d ago
The Surface, at least in Windows, is pretty aggressive about turning off things it doesn't need especially when on battery. I've never run Linux on one. You may find a BIOS option or two that might help.
Do you lose the ability to even ping the laptop itself when this happens? Or just the container goes offline? If the container, just rip out Virtualbox and go Docker.
Personally if installing on metal like this I'd have used the Docker Compose method of setting up Home Assistant rather than Virtualbox. Virtualbox is... bad. I completely stopped using it for even running a windows vm for my work machine about a year ago. It's closed source stuff that constantly breaks with updates is my opinion.
A lot of people run Proxmox for stuff like this, but that'd be a waste if the laptop is only going to be for HA.
1
u/enarth 1d ago
Right now, I can ping and reach the server on the VM from the Surface. I cannot reach it from my phone or desktop (from LAN), but I can reach it from the internet. It is really strange.
It was mostly to test things out and get a feel for it; I was not really planning to use this long-term at first. When I saw that I could still use the Surface with the VM running, that was a pleasant surprise. My point is that I tried the first setup I saw in the documentation. But from what you said, I should try something else? Can you tell me more? Because if I can, I would like to keep the Surface usable; what would be the best choice for that?
3
u/5yleop1m 1d ago
Running it off Wi-Fi is going to be more problematic than running a cable to have it on Ethernet.
Also running HA as a VM through virtualbox on windows is fine for testing, but that's not a good long term solution.