Pass a usb device to ZVM?

Is this possible? I can’t find an option anywhere. Does anyone have a workaround? Even something hacky will do until official support comes.

I need to pass my zigbee dongle to Home Assistant OS.

1 Like

Sorry, it’s not supported yet.

Do you know if it’s on the list to be implemented soon?

USB pass through and auto starting a ZVM are the features that I really need

1 Like

Hello, I will give feedback to the product manager soon. I’m sorry that we are a small team and cannot meet everyone’s needs at the first time, but we will speed up and I will tell you any updates!

Hello I have seen people successfully completing this, perhaps you could try it?

1 Like

This worked, thanks.

1 Like

Marvelous!

It gets easier:

Connect to the ZimaOS server using ssh with the root account

type lsusb and identify your key


Bus 001 Device 003: ID 1a86:55d4 QinHeng Electronics SONOFF Zigbee 3.0 USB Dongle Plus V2

The 1a86:55d4 is the Vendor ID:Product ID (VID:PID).

Create the file /tmp/usb-sonoff.xml and fill it with the following information

<hostdev mode='subsystem' type='usb'>

<source>

<vendor id='0x1a86'/>

<product id='0x55d4'/>

</source>

</hostdev>

Next, add the key to the virtual machine

virsh attach-device your_vm_name --file /tmp/usb-sonoff.xml --persistent

Restart your VM and you’ll see Zigbee integration in Home assistant

10 Likes

that actually worked for my UPS. Thanks

Worked for me too. Thanks leglen38

This didn’t seem to work for me, after following the instructions I get

“error:failed to connect to the hypervisor”

“error: cannot create user runtime directory ‘/DATA/.cache/libvirt’: Permission denied"

I was following through trying to get an external HDD to show up in ZVM. I substituted the vendor/product id but kept everything else the same.

Yes, this method is correct and currently the cleanest way to pass a USB device to a ZVM on ZimaOS.

Using lsusb to identify the VID:PID and attaching it with virsh attach-device is the proper libvirt approach.

Two small additions for stability:

  1. If the device disconnects/reconnects, re-attach may be required unless it’s defined persistently in the VM XML.
  2. For best reliability, you can permanently add the <hostdev> block directly into the VM definition via:
virsh edit your_vm_name

Then paste the <hostdev> section inside the <devices> block.

This avoids using /tmp and survives reboots cleanly.

Good share, much simpler than earlier workaround methods.

1 Like