Help with HAOS install on Ubuntu 22.04

I’m trying to install HA OS in an Ubuntu 22.04 server. I’m generally following the instructions in this post: Install Home Assistant OS with KVM on Ubuntu headless (CLI only). The VM is running, but it appears to have network issues – it cannot resolve hostnames and gives errors like this in the journalctl log:

Feb 08 18:33:59 homeassistant dockerd[469]: time="2024-02-08T18:33:59.942331930Z" level=error msg="[resolver] failed to query DNS server: 8.8.4.4:53, query: ;.\tIN\t NS" error="read udp 172.30.32.3:38999->8.8.4.4:53: i/o timeout"

I have set up a bridge on my Ubuntu machine:

brctl show br1
bridge name	bridge id		STP enabled	interfaces
br1		8000.4a4dd4afdf26	yes	

and specified that on the virt-install command line:

virt-install --import --name hass --memory 4096 --vcpus 4 --cpu host --disk haos_ova-11.5.qcow2,format=qcow2,bus=virtio --network bridge=br1,model=virtio --osinfo detect=on,require=off --graphics none --noautoconsole --boot uefi

Can anyone help me figure out what is going on? I’m no network expert, and suspect I just did something wrong in the bridge setup.

This is my bridge setup in NetworkManager:

cat /etc/NetworkManager/system-connections/bridge-br1.nmconnection 
[connection]
id=bridge-br1
uuid=d6308cdb-fce6-48d5-81c1-6b153d225ce7
type=bridge
interface-name=br1

[bridge]

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

[proxy]
cat /etc/NetworkManager/system-connections/bridge-slave-wlp3s0-1.nmconnection
[connection]
id=bridge-slave-wlp3s0-1
uuid=d95cba2b-52af-4d4d-9c4d-da3cd5bbcfaf
type=ethernet
interface-name=wlp3s0
master=br1
slave-type=bridge

[ethernet]

[bridge-port]

So br1 is to interface wlp3s0, which is my wireless network interface.

I did follow the instructions to edit /etc/docker/daemon.json (located in a different place on my Ubuntu system due to use of snap), to tell docker about the bridge:

cat /var/snap/docker/current/etc/docker/daemon.json 
{
	"bridge": "br1"
}

Can someone please give me a hand with this?

Thanks. – Eric

Bridging doesn’t work with Wireless devices, because a WIFI protocol limitation:
https://wiki.libvirt.org/Networking.html#bridged-networking-aka-shared-physical-device

There are workarounds, but I can’t help you with it:
https://jamielinux.com/docs/libvirt-networking-handbook/bridged-network.html

This topics (KVM, bridging, HAOS) are new for me. I found your post trying to solve a problem with a fresh installation of HAOS over KVM and a bridged network that doesn’t work. After reading in some tutorials about the WIFI limitation, I feel helpful and I can add some light to your problem.