Install openHAB 2 inside VM

Hi, I tried to install openHAB 2 inside two different virtual machines. It doesn`t work inside both.

My first attempt was to install it on a Ubuntu 18.04 VM for VMware Workstation. The second was for Oracle VM Virtual Box. The second installation is described here. Instead of Debian I used Ubuntu.

I tried at first the OpenHABian Installation für Linux instead off the Raspbian Installation. After that I tried the normal Linux Installation. Both doesn`t work.

The installations steps work but the application at least not. If I run sudo openhabian-config the configuration gets opened. I can change the Hostname or the Localization. Also it works. But I can run it under https://:8080. On each three variations the same problem. It seems to be installed, but not working.

Maybe it`s a general problem with VMs. Unfortunately sad. I don’t know if it’s the network in general, but I can’t change anything about the existing network. I’ve tried to see if it’s the port, but 8080 is open by default.

Has someone installed openhab in a VM and how did he proceed? What else must be taken into account?

Many VMs, by default, use a NATed network. You can set things up for a bridged network. That is what I do with VirtualBox for some testing but that process is outside the topic of this openHAB forum.

My main system runs in a Hyper-V VM and similar things apply although I did not set that one up.

1 Like

Mine too

Thanks. I don’t know what the problem exactly is. At home I tried it inside one VM and it works. So I am not sure, where the problem comes from. I tried it inside my university. Maybe a bigger problem because I can`t configure the network. On both VMs I used bridged instead of NATed network.

Since you are connected to an Access Network instead of a server one, perhaps the University IT is only permitting one address per device. That is fairly common.

I work in University IT. You should not need a smart HOME system in an Enterprise setting anyway.

I guess I was a bit too hasty after all. I used a VM where I already used for ROS. Everything worked there. I installed a new VM where I only wanted openHAB on it and it didn’t work. The VMs are configured the same way. So the network connection is bridged accordingly. Then it doesn’t work, as it did at the university. Then it’s probably not the network and not the VM configurations, but I probably have to correct something in the Ubuntu system. The only question is what. The installation steps of openHAB are still the same.

Unable to connect

Firefox can’t establish a connection to the server at localhost:8080.

The site could be temporarily unavailable or too busy. Try again in a few moments.
If you are unable to load any pages, check your computer’s network connection.
If your computer or network is protected by a firewall or proxy, make sure that Firefox is permitted to access the Web.

What about firewall settings in the VM?

I normaly do a stock Ubuntu server (headless) installation without any tweaks or custom settings. then setup Zulu and openHAB, ready to go.
Never had issues…

sudo ufw status
Status: inactive

On both VMs.

Hello @Michdo93,

can you describe a bit more what you are doing?

I have a Oracle VM (v6.1) running Ubuntu “Ubuntu 20.04.1 LTS” on Windows 10 and it all works like a charm.

Installation was done via package, and OH 2.5.10 by now is available via “localhost:8080” from within VB itself.
Now if you want to access OH from your host - you need to configure the network access of VM correctly. Check VM documentation of how to do it. For Oracle it is e.g. here.