Zigbee

Add Zigbee Dongle to Home Assistant VM (Raspberry Pi 5)

Introduction

This guide shows how to pass through the SONOFF Zigbee 3.0 USB Dongle Plus to a Home Assistant OS (HAOS) virtual machine running on Raspberry Pi 5 using KVM/libvirt. This allows you to use Zigbee devices directly within your virtualized Home Assistant setup.

Why Pass Through USB Devices to Virtual Machines?

When running Home Assistant OS (HAOS) in a virtualized environment on Raspberry Pi 5, smart home automation requires direct hardware access for wireless communication protocols like Zigbee that depend on dedicated USB dongles.

Our technology stack includes the Raspberry Pi 5 hardware layer, Raspberry Pi OS host, QEMU/KVM hypervisor, libvirt management daemon, and HAOS guest OS. By default, the guest VM cannot directly access USB devices connected to the host system due to hypervisor isolation.

USB passthrough solves this by “passing” a physical USB device from the host directly to the virtual machine, essential for Zigbee coordinators like the SONOFF Zigbee 3.0 USB Dongle Plus.

If setting up a new HAOS VM with the dongle already connected, you can include passthrough during virt-install using --hostdev 003.002. However, when adding hardware to an existing setup, you’ll need to modify the running VM configuration using libvirt’s XML system.