I am using openHAB1 since 2015 on a dedicated PC on top of Ubuntu 14.04 Server edition. The bindings I use are:
mqtt
pushover
astro
networkhealth
weather
persistence
I use the “executeCommandLine” function a lot in my rules.
I’d like to migrate to openHAB2 and virtualize the installation while I’m on it… I see a lot of comments about Docker but I am much more familiar with Virtualbox. The PC running the Virtualbox host would be powerful enough to handle the overhead.
Is it a bad idea to install openhab2 in a Virtualbox guest (the guest OS would be Ubuntu 16.04 Server edition)?? I am asking because it doesn’t look like a popular setup here.
Comparing Docker to Virtualbox is an apples to oranges comparison.
And since you use executeCommandLine a lot you have already been forced down the path of Virtualization rather than containerization so choose Virtualbox.
If you can make it so Virtualbox will start the VM as a service I see no reason why it would be a bad idea. It isn’t mentioned much around here as most who decide to virtualize it go all the way and install ESXi or Xen as the host OS.
Docker is great to get most of the isolation you get from virtualization and is in fact how I run my OH; a VM running Ubuntu Server running on ESXi 6.5 with OH running in Docker,. As you can see, it isn’t an either or situation. But the Docker images tend to be vastly stripped down bare bones operating systems so common commands and utilities simply won’t be available (e.g. you won’t have ping let alone python) and the networking can be isolated pretty thoroughly as well so that features like the Network binding’s dhcplisten feature won’t work. Thus executeCommandLine and Exec binding become almost useless. I get around this by setting up a python script that I already have running on some RPis for remote sensors that can receive an MQTT command and execute stuff for me.
As for your bindings:
mqtt will still work and be configured like you are used to
I don’t know much about pushover
astro is vastly different but still provides all the functionality you are use to
networkhealth is replaced with the Network binding which has a lot more capabilities, though some of those require running OH as root
which persistence? Regardless it should work the same unless you are using db4o in which case you will need to switch to something else
Be sure to follow the Migration Tutorial. It will get you setup with your current bindings and configs running on OH 2 and then provide advice for how to move those bindings you want and can to the 2.0 versions and take advantage of the new features of OH 2 in the process.