Home Assistant virtual machine cannot access Open Media Vault 5 server

Hello.
I am running HA as a VM on Open Media Vault 5, using the KVM plugin. (details here). Previously, I used to run it as a VM on OMV 4, using the Virtual Box plugin.

Everything works ok under OMV5 / KVM, except that it seems that the only thing that HA cannot access in the local network is the OMV server itself.

I know this because:

  • OMV integration no longer connects locally
  • NUT integration no longer connects locally
  • Motion Eye add-on can no longer save recordings locally on OMV samba shares
  • when I connect to Wireguard, I can access ALL my local resources EXCEPT the OMV samba shares and OMV interface

I am very puzzled by this, maybe someone had the same issue and can help. Thank you!

OK, I’ve learned in the meantime that if the VM in KVM was created using a Macvtap Bridge, like I did, it does not see the host machine. This is a limitation of Macvtap.

So instead, one needs to:

  • create a bridge in OMV>Network>Interfaces with STATIC IP - be careful, this will disconnect your OMV server; you do this by first deleting eno1 interface, NOT hitting SAVE, then create bridge with static IP and only then click SAVE
  • create the KVM virtual machine and choose bridge> then br0 in network

It took me a full day to identify the problem and the solution, so I hope this will be helpful for someone. :slight_smile:

2 Likes

Hello! Could you describe it in more detail? Somehow I haven’t succeeded so far. when you create the bride network at the interface do you select only one network there? With KVM, I can only create Macvtap bridge.

Hi. You need to forget about macvtap bridge and create a bridge in the OMV interface. You also must create a new VM because it is not possible to attach the OMV bridge to an existing virtual machine (at least I could not find a way).

So, in order to create an omv bridge:

  • go to omv > network interface
  • delete existing connection - eno0
  • DO NOT HIT SAVE!
  • Add>bridge
  • fill static ip, mask, gateway and dns
  • now hit save

Create a new VM and attach this bridge you created to it.

Here with pictures

Ohh. I was constantly trying to add a new network to the kvm/network tab.
But I looked into a successful god you are! : D
Thank You!

i tried, but it doesn’t work. What can I check?

I have the same Problem. Using this solution the boot stucks at “Wait until Kernel Time Synchronized Error” and then the Home Assistant CLI does not boot .

EDIT
After multiple attempts and trying various versions, I found out that the problem is the blocked internet access. So the VM cannot access Internet and do not have any IPs assigned.

I have tried to create a new VM and also create a VM with Ubuntu. Non of them worked. In all cases, the host system does not assign an IP to the VM and so the VM do not have any network access.

Can someone with a working set up post the network setup? I have no idea why this does not work …

I just solved my problem.

The solution was based on the following 2 articles:

I disable the netfilter, and now it works.

Create a file /etc/sysctl.d/bridge.conf with the following content:

net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0

Then create a second file /etc/udev/rules.d/99-bridge.rules with the following content:

ACTION=="add", SUBSYSTEM=="module", KERNEL=="br_netfilter", RUN+="/sbin/sysctl -p /etc/sysctl.d/bridge.conf"

Then reboot. Now it works pretty good.

FYI: If your OMV server is already in use and you connect via SSH, you may have to reboot OMV for the network changes to take effect and allow you to reconnect