Solution for running HAOS on VM or on Docker - basic stability issues/solutions

       Total Newbie still-

I promise I’ve searched, hopefully not incorrectly but here it is:
I started HA on Windows on a VM. Stability seemed fine, few drop offs here and there, BUT for some reason every day between 2-4pm HA would show “Lost connection. Reconnecting…” I learned quickly that I had to go into VM, stop it, wait for 2 seconds, click on the Green arrow and restart it, and then everything would work fine again. Slightly inconevenient, but I even began using Parsec to access the laptop if I wasn’t home to turn it on and off.
I switched to Docker 10 days ago. Now, HA stays running for anywhere between 1-20 mins w/o needing a kill cmd followed by a start cmd. I do have some duplicate entities I’ve been removing.
If anyone has any thoughts to share on either of these, I’m not married to either at the moment. Just wanted something slightly lower maintenance on the basic running of HA itself.
If this is posted somewhere and I searched incorrectly, my apologies and I’ll remove it immediately.
Thanks

Which VM solution were you trying? I’d wonder if you don’t have some db corruption going from the VM cycling. I’ve ran HA in Hyper-V, VMware player, and now Proxmox and haven’t come across any problems…not that it helps your situation.

2 Likes

Virtualbox VDI is the one I downloaded. That was the one that was listed as the easiest one for beginners…if that makes sense?

I’ve been running HAOS in a VM on my Synology NAS for a few years now, and it has never frozen up or dropped a connection.

Is Windows power saver killing your Virtualbox VM thinking that is is idle in the background???

1 Like

I turned all that off, but when I watched the video months ago to get HA up and running that way, the guy on the channel said he had the same issue but was able to integrate VM into HA and set an automatic restart? I’ve seen a few other videos set HA up the same way and I’ve not gotten a response when I’ve asked. I know it’s odd, but it’s also never missed a day. I can literally set a watch to it if I stay consistent

1 Like

It might be worth trying to migrate the VM to another virtualization platform. My limited experiences with Virtualbox over the years left me feeling that it was good as a tinkering platform, but not for use as a production server host…

1 Like

I’m looking into Hyper-V right now? That recommendation seems to come up fairly frequently since it’s native to Windows as it might offer more stability?

I believe there are problems using hyperv and USB pass thru for zwave and/or zigbee sticks - you’ll want this eventually.

I’ve been running in Docker on a Synology NAS for multiple houses for multiple years. It runs for months

If I was starting over, I’d likely get an Intel NUC (or equivalent), put proxmox on it and run docker - as that woks be a pro level system. Simpler would be the same setup using the HASS VM.

Just keep in mind Hyper-V doesn’t support any form of USB pass-through, so no USB device support like Z-wave or Zigbee dongles, etc.

1 Like

Ugh…That…stings a little…obviously there must be a way to integrate those two? I’m looking, not depending on you to provide how…just thanks for that heads up!

What version of Virtualbox are you running the VM on? I’m running 2 different HASS VMs (Prod and Development) on 2 Windows machine with Virtualbox and have had no issues for nearly 2 years. I’m running version 6.1.44 r156814 which I believe is the most recent update of 6.1. Never felt the need to update to 7.x and have seen some posts about it not yet being that stable. 6.1 is supported through the end of this year.

1 Like

There are some posts on this forum of options and workarounds; using an IP to USB device is a simple fix. A Raspberry PI running ser2net works fine.

1 Like

I’m currently running 7.0 but I do recall updating that maybe 2 months or so ago? So I was likely on a version of 6.x prior and was still doing the Stop/Start thing. Man, this is so odd! It’s my biggest pet peeve for obvious reasons and there’s really not much online about it so it has to be isolated

Yeah, I’m reading about it now, having ChatGPT doing some dumbing down for me, lol

I just realized that the Philips Hue bridge can act as a Zigbee gateway. I guess I missed that since I’ve had the USB for so long. That helps half the issue. Any secret Zwave gateways out there?

Not really. The Hue bring supports a specific version of ZigBee so not all devices work with it. The list of supported non-Hue devices is very short.

Before going down the rabbit hole too deep, I would try installing a fresh version of HA (can even run it alongside the current one). Don’t add anything to it, just do the install and initial setup and see if it exhibits the same issues.

Aside from that, going with VMware will probably be less of a headache than trying to get Hypver-V setup and external USB to network bridges.

The first post in this thread has general guidelines and my post has some additional info for setting up persistent USB passthrough.

2 Likes

Ok, thanks for that info as well! Well…lol…might go open a beer and not be surprised if it’s empty!

See my edit above.

Awesome! Thanks so much! Sincerely appreciate it

1 Like

Just stop trying to run ha in a windows vm. Buy a cheap computer and run haos, or proxmox plus haos, or linux plus docker. Basically anything but windows.

2 Likes