Here is my scenario, I have a NAS built from my previous ryzen 3800x desktop setup with 32GB of memory and a couple SSDs and a NAS HDD. This is currently running debian server, running a bunch of VMs, mainly including:
Home Assistant OS (On the beta branch)
Home Assistant OS (On the dev branch)
Other VMs running software like plex etc. running debian on their own static IPs.
Usually always when I leave the house, the host server crashes for some reason or another. Essentially what I’m looking for is a solution that either is able to self-maintain itself or notify me with a button to update.
I essentially want what home assistant os does with its own updates system, where I can click a button and be confident that the system will stay active and when a crash occurs, I want the VM and host to self heal.
My only main requirement is I want to keep Home Assistant OS, and not run supervised etc. as this is the main use of my server. I also know from experience that plex is not easy to lift and shift so would probably need to be able to import the image (qcow2 I think) over and it keep my library, watch history etc.
I have been away from the linux server scene for a while now so any reccomendations of what works well is much appreaciated
Basically yes, I want HA-OS but with extendability.
I know that the OS is based on build root so something that ran in a similar way with the ability to import VMs and containers which can have their own static IPs and can be easily updated etc. is what I’m looking for.
My main concern is keeping the lights on (quite literally), so it might be a case that I just need to get a yellow or green and keep everything essential there and the non essentials (plex etc.) on the NAS
I would think getting to the root of this problem should be first on your list. Why does it crash when you leave the house? Is it a power issue, someone shutting it down or messing with the system?
Have you done any inquiries into it? Dug through logs? See if they have anything about the crash? Is it a power issue? I think your side stepping the problem, what if these random crashes continue after you’ve chosen a new configuration? You’ll be back at step 1? I would at least be interested in knowing why the machine randomly shuts down or crashes.
You can setup Debian to do auto-updates, either just critical ones or full system updates (not distro updates though).
If the crash is not too extreme an operating system should recover itself no problem. So there’s something going so wrong on your machine that it’s not even rebooting. You should really look into why you machine crashes first, else all the attempts to recover will inevitably end up with unrecoverable errors.
If you need to keep Home Assistant running at all costs but don’t want to investigate the host crashes too much I’d throw money at it: buy a Pi3 or 4 to run another exact copy of your HA assistant on and redirect all the traffic to it if your main machine goes down.
Some workstation motherboards and have built-in Watchdog functions. It’s software baked into motherboard firmware that automatically reboots the system if the OS experiences a freeze. It’s designed for unattended PCs, although I think it would be better to fix the underlying problem you’re experiencing.
I’ve been running Proxmox (Debian based hypervisor) for years and generally speaking, the only time the host OS has frozen is because of my own fault. Perhaps it’s worth a try? Importing your VM images would be straightforward since it’s KVM based.
As an aside, Plex is quite simple to ‘lift and shift’ depending on the platform. I’ve gone from bare metal macOS to bare metal Linux to FreeBSD jail and finally to Linux Docker, all while keeping the same database.
I am quite new to this, but I have been running Proxmox with HAOS in a VM for around 3 or 4 months and I have it in a place where on occasion I cut the power to the system by accident and it just boots again afterwards without complaining and start the VM’s I have set up to start on boot.
Just make sure you have set your machine to boot after power failure.
I figured out the issue with the crashing I believe. Turns out I was allocating too much memory to my VMs which explains why I was getting what I thought was a ‘soft’ crash but was actually the server running out of memory.
I have now reduced my NAS to a simpler setup, I did end up buying a home assistant green for the reliability of my main automations in my house.
I also replaced the other VMs with with HA OS VMs but this time with less memory and CPUs allocated. These are now dedicated to the area I use them for such as the Plex and Jellyfish add-ons and camera NVRs like the frigate add-on
I was going to suggest a pure sinewave inverter or UPS ( uninterrupted powersupply) for voltage issues or poor grounding.
The power grid demand during summers ( usually when I go for vacations) gets really high due to heavy air conditioning use across the region, high resistance due to heat and the backup coal and gas thermal plants get used to meet the sudden demand during afternoons.
i thought my server was over heating and switching off. but turns out it’s the voltage from the mains.