Virtualization, containers or raw metal

I have just started down the path of using Openhab as the basis of my home automation and, so far, it’s looking promising. I installed it in a Hyper-V VM to test and all seems to run pretty well, at least in the few days I have had it installed.

The Windows host is something of a preference since am also running Blue Iris. I’m not too interested (at least in this post) in debating the merits of Windows as the host (that research continues elsewhere). But I am very interested in coming to a conclusion soon about how to install Openhab.

I have familiarity with Docker, too, so the most natural choices, for me, might be Hyper-V, Docker or a direct installation on the host. As I look further into this, I’d be interested to know if there are any particular red flags of which I should be aware, particularly with virtualization or containers.

In case it’s relevant, I’d currently expect my HA needs to be reasonably straightforward (Kasa devices, Hue, etc), at least in the short term. Obviously, that may change over time.

Thank you.

If you don’t have any requirement for pass through usb devices. I’d probably run docker containers in a linux vm running on your windows machine.

Personally I run docker containers on an Ubuntu bare metal. But I use a zwave usb stick.

Thank you. I’m reasonably familiar with general reasons why passthrough might be useful, but don’t think I have any such requirements. That said, from the HA perspective what categories of device might require this? Is the implication that this would only be necessary where a platform requires a physical device at the hub, rather than addressable via the LAN? I see Zigbee referenced in this context but not sure what else is out there (before I jump into containers, which is likely to be my choice too :)). Thank you again.

Are there any problems making a usb stick work in docker (running on bare metal)? I have plans to do this and was under the impression that this should mostly just work.

Yes it’s fine.

The biggest usb users here are Zigbee and zwave sticks that appear as serial ports that can be passed through to hyper-v. That is what I am currently doing with zwave but my son set that part up. I am using a Debian vm. Running Docker within the vm should also be possible. In my experience generally Docker on Linux is better behaved than on Windows.

1 Like

Docker on windows is IMO almost unusable. Especially for Linux stuff. I preferred a hyper-v Ubuntu machine with docker. Or a bare metal Ubuntu with dicker (where all my home automation lives)

I’ve been running my instance of OH on a VM (ESXi) since I found the project when it was on version 1.8. I have two USB controllers connected, Z-Wave Stick and X10 Controller. Not had any issues at all and getting great performance.

As I already had ESXi running on a server it made sense to go down the VM route, although I did look at using a Rpi at one stage.

1 Like

Hi,

I use OH within a LXC Container, which is managed within a proxmox distribution. Different services and tools are seperated in further containers. This allows easy backups and configurations, even when something gets broken.
I use pass-through for a zigbee usb device.

Best regards
Chris

3 Likes

Can you expand on this a little? I use this for my WordPress development work and have not had any issues at all, over a year or two (Windows host, Linux containers). Is your comment related to OpenHab support specifically?

Thank you.

I know I had Kubernetes permission issues on Windows working with an online course that works properly on Mac and Linux. Kubernetes is part of the Docker Windows install now.

The biggest issue you might encounter is giving the VM and container access to USB devices. That shouldn’t be unsurmountable though.

Personally I run openHAB on ESXi in an Ubuntu 18.4 VM using Docker. I had no trouble passing my USB devices to the VM personally (at least not since I first set it up when VMWare ESXi 6.0 installed a new USB driver which didn’t work that well) but I know others have had a lot of trouble on stuff like Synology and Qnap.

I can only imagine trying to pass a COM port to a Linux container might be a challenge if you were to try to run OH using Docker for Windows.

Pretty much anything that doesn’t use IP networking: KNX, 433MHz devices, Zigbee, Zwave, X10, etc. These all require a USB dongle to access from openHAB directly.

It depends on the host. If you are running regular old Linux, there should be not problem. If you are one something exotic like Synology or Qnap I’ve seen lots of people have problems.

There is a pretty large contingent of users here that run on VMs. There is also a large group who run OH in Docker or some other container flavor. And there is a large overlap between those two groups.

2 Likes

I’ve said I’m not running openhab via vm and docker…I run it in ubuntu with docker. That has no issues. I pass through a zwave usb stick into the container with no issues.

About windows, this my personal opinion, I have over the past year tried windowsd docker a number of times. My main issue is that for somnething windows I’d want a windows container, and for everything else linux. Plex is a prime example…I would want a windows plex container…but then all my supporting services (tautulli, some HA containers) would be linux. Docker for windows doesn’t like this. Also most containers are written from a linux point of view, and so finding containers for common services written for windows is difficult. This is what leads me to create one large ubuntu vm with 20gb of ram, and run all my linux docker in there. And in th eend for windows I ran plex on the bare metal.