Setting up Adguard Home together with VM over Bridge

Hello everyone,
I would like to set up AdGuard Home and a virtual machine with Home Assistant OS on my TrueNAS system, but I’m not sure how to do so. The VM blocks port 53, which AdGuard needs. AdGuard runs without a VM, and a VM runs without AdGuard; however, both together do not run. I have read a lot about bridges, but, as I am a complete novice with TrueNAS, I need support on how to run AdGuard and VMs in parallel with bridges. So far I created a bridge as vSwitch and changed the NIC of my VM with HAOS to the bridge. HAOS recieved then a new IP. But I still cant get Adguard running. I removed Adguard from Apps and tried to reinstall, but then get an error:

 Error: Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 515, in run
    await self.future
  File "/usr/lib/python3/dist-packages/middlewared/job.py", line 562, in __run_body
    rv = await self.middleware.run_in_thread(self.method, *args)
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 622, in run_in_thread
    return await self.run_in_executor(io_thread_pool_executor, method, *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/main.py", line 619, in run_in_executor
    return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/service/crud_service.py", line 294, in nf
    rv = func(*args, **kwargs)
         ^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/api/base/decorator.py", line 101, in wrapped
    result = func(*args)
             ^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py", line 148, in do_create
    return self.create_internal(job, app_name, version, data['values'], complete_app_details)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py", line 193, in create_internal
    raise e from None
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/crud.py", line 186, in create_internal
    compose_action(app_name, version, 'up', force_recreate=True, remove_orphans=True)
  File "/usr/lib/python3/dist-packages/middlewared/plugins/apps/compose_utils.py", line 61, in compose_action
    raise CallError(err_msg)
middlewared.service_exception.CallError: [EFAULT] Failed 'up' action for 'adguard-home' app. Please check /var/log/app_lifecycle.log for more details

The file app_lifecycle.log is empty. If I check Host Network in the installation window, the installation passes without error but Adguard Home starts and stops instantly.

Perhaps one of you could help me. I would be very grateful.

My bad, i missunderstood your post.
If you’re using the incus backend to run the vm you have to use

sudo incus network set incusbr0 raw.dnsmasq="port=5354"

so that incus doesn’t use port 53

Wow, thank you so much for this quick answer! It works great with your tip! For my understanding, I have one more question: Do I need the bridge at all, or is it enough to go your way? My understanding is that the VMs now use port 5354 instead of port 53. Even without a bridge?

The learning curve in Truena’s Scale is steep, but it’s a lot of fun to experiment with and the community is amazing! Thank you.

If your vm needs access to data on your host via nfs or smb you need the bridge. Otherwise the vm is isolated from the host and can’t access any data from it.

1 Like

I can’t remember where but i think i saw a post or video guide on youtube that said, that if you use your own brige and not the buildin incus bridge you don’t have to switch the incus port.