OH 2.4 Successful Install on Intel NUC as Virtual Machine

Last month I installed openHABian on a Raspberry Pi, and began to learn about openHAB and what it can do. Neat things, especially the rules and scripts. Having read online about the problems with running this on the RPi… I decided before I get too far, I would look into a new install on the Intel NUC headless. Everything I will do is via SSH to the NUC.

So this week my purchase arrived, and here is my success story.

I went with the Intel NUC 8i5 (quad-core) with 256 GB SSD and 16 GB RAM.

After using a thumb-drive to update the NUC BIOS (from v44 to the latest version 56)… I installed via bootable thumb-drive Ubuntu 18.04.2 LTS as the Operating System. This NUK provides full virtualization support, which is something I wanted to learn as well.

Once the OS was up and running and updated, I installed KVM as the Hypervisor on the Host Machine. This allowed me to create the first VM (Virtual Machine) for my openHAB system. It is really cool that this one little NUC can have its own static IP address for the “Host Machine” as well as each “Guest Machine”.

I used ‘virt-install’ to create the “openHAB2” Guest Machine, and assigned it 2 GB RAM and 25 GB
SSD storage.

Once the Guest Machine was created, I installed the same Ubuntu 18.04.2 LTS as the Operating System. I needed to use VNC-Viewer on my iMac Desktop to perform the Ubuntu OS installation steps. Once the Guest Machine OS was up and running, then via SSH, I used ‘sudo git clone https://github.com/openhab/openhabian.git /opt/openhabian’ to install openHABian, used ‘sudo openhabian-config’ to configure everything for openHAB.

Then installed JAVA, using ‘sudo apt install openjdk-8-jre-headless’ , which gave me openjdk version “1.8.0_191”. Then started openHAB using ‘sudo /bin/systemctl start openhab2.service’…

and opened my browser… and wonderful… it worked!

Since I’m running openHAB2 in its own VM, I connected back to the Host Machine to set up the openHAB VM to autostart every time,using ‘virsh autostart openHAB2’ .

Then I created a SNAPSHOT of the openHAB2 Virtual Machine disk image using ‘virsh snapshot-info --domain openHAB2 --snapshotname snapshot_openHAB2’ . This is a very nice feature of using Virtual Machines and allows me to mess up the openHAB2 system and recover without any worry. I’ve made great progress so far and with several SNAPSHOTS, I don’t worry about trying things in my sitemap and things and items and if openHAB2 breaks… no worry… re-install previous SNAPSHOT. Nice!

Thanks to many of you on this Forum for your excellent help to get me this far with learning openHAB2 and Virtual Machines. Very very nice!


Thanks for the post, I am considering exactly the same setup.
What I would add to this is dockerising openhab and some other services, making it even more mainteinable as you can easily backup individual application. But it might be overkill if you do not want to mess with it. However great if you want to learn docker virtualization, I just love it now