Unable to see qemu devices added to openbalena

Hello Michal,

Yes, both my VM and OpenBalena are running on the same host

Yes, I’m also able to SSH into the host machine from the VM using the IP address

No, I’m using the default openbalena.local, for now

Yes, I configured the host /etc/hosts file so that the urls point to 0.0.0.0. Other than that, I did not make any changes for DNS records

So I believe this comes down to DNS resolution. The openbalena.local records are populated over the local network of your host. But as the QEMU instance runs a user network, it is separated from it. For the same reason you can access the host from the VM but not the other way around. You have two possibilities:

  1. Set up bridge networking - this would put the VM into the same local network as the host but needs some more advanced setup (https://www.linux-kvm.org/page/Networking).
  2. Do not use the default openbalena.local and set up the domain with correct DNS records.
    To quickly test whether fixing the DNS would help you can do (within the VM) mount -o remount,rw /, add the record to /etc/hosts and reboot. Please note that this is only a quick test and it is not a supported setup in any way (and in fact the changes will go away after update).
    Please let us know whether this helps.

Thanks Michal, this seems to have fixed the issue, I’m able to see the device when I do balena devices.

I have another query, in the balena devices output there’s a dashboard URL, but when I try to access that, I’m getting a 503, how to resolve this?

Hi

When you are using balena CLI with balenaCloud, each device has a unique URL that you can use to see the web interface of balenaCloud. With OpenBalena there is no such web interface - see https://github.com/balena-io/open-balena/issues/63
The only way we have right now to communicate with the openBalena instance is using the CLI or the SDK.
Does that answer your question?

Thanks, that does answer my question.

Would adding a DNS resolution on my network level be sufficient for balenaOS to reach my openbalena server or do I have to do it on a device level?

Hi

You shouldn’t have to do anything with the DNS to do that.
Please take a look at https://www.balena.io/open/docs/getting-started/#Deploy-our-first-application

Here you will see how you can configure your balena CLI installation as well as the balenaOS downloads to make them both work with your openBalena instance instead of balenaCloud

Thanks for the link, I’ve followed that while trying setting up the openBalena server.

I’ve had an issue where my openBalena server was unable to see any qemu virtual devices (running a balenaOS configured to an app). This was resolved when I manually mounted the / as rw and then edited the /etc/hosts for DNS resolution. So, I was wondering if I have to do that for every device type

It depends on your network setup, but if that works it does point to it being required for your particular network. What were you required to add to the /etc/hosts file?

I mapped the CNAME entries to the ip address of my open balena server

Hi,

It appears that based on your network set-up you’ll need to follow those mount and /etc/hosts steps on each device type. I noticed in a previous note you mentioned adding DNS resolution to your network. Did you previously attempt to edit /etc/hosts on your host, or only in each virtual device?

John

My host’s /etc/hosts is already edited to resolve the DNS

Hi there,

Just wanted to ask if you’ve resolved your issue with the DNS

Yes, I already marked a response as the solution.