Upgrade from Ubuntu 20.04 to 22.04 broke ZHA with Conbee II using kvm virsh

Hi all,
This post is to give a solution to a problem I’ve had, and many hours spend on fixing it. I googled the internet thin, and while I could find people with similar issues, I couldn’t find anyone with exactly my problem. This post is to help the next person searching a solution for this problem. :slight_smile:

My setup before things broke.

Errors I was getting:
(I unfortunately don’t have the full error log anymore :confused: )

  • ZHA giving the error “Failed to set up”
  • asyncio.exceptions.CancelledError
  • asyncio.exceptions.TimeoutError
  • Couldn’t start deCONZ = dresden elektronik deCONZ protocol: ConBee I/II, RaspBee I/II coordinator
  • ERROR (MainThread) [homeassistant.config_entries] Error setting up entry ConBee II for zha
  • Error setting up entry ConBee II for zha


  • I could see that ZHA would simply fail to start on integrations page.
  • I tried deleting ZHA integration, and then reboot. Home assistant would auto discover ZHA, and prompt setup. When I then attempted the setup, it would give me the error: “Failed to probe the usb device”

My virsh config: (virsh edit hassos)

<domain type='kvm'>
  <memory unit='KiB'>1572864</memory>
  <currentMemory unit='KiB'>1572864</currentMemory>
  <vcpu placement='static'>3</vcpu>
    <type arch='x86_64' machine='pc-i440fx-bionic'>hvm</type>
    <loader readonly='yes' type='pflash'>/usr/share/OVMF/OVMF_CODE.fd</loader>
    <boot dev='hd'/>
  <cpu mode='host-model' check='partial'/>
  <clock offset='utc'>
    <timer name='rtc' tickpolicy='catchup'/>
    <timer name='pit' tickpolicy='delay'/>
    <timer name='hpet' present='no'/>
    <suspend-to-mem enabled='no'/>
    <suspend-to-disk enabled='no'/>
    <disk type='file' device='disk'>
      <driver name='qemu' type='qcow2'/>
      <source file='/var/lib/libvirt/images/hassos-vm/hassos.qcow2'/>
      <target dev='vda' bus='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x04' function='0x0'/>
    <controller type='usb' index='0' model='ich9-ehci1'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x7'/>
    <controller type='usb' index='0' model='ich9-uhci1'>
      <master startport='0'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x0' multifunction='on'/>
    <controller type='usb' index='0' model='ich9-uhci2'>
      <master startport='2'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x1'/>
    <controller type='usb' index='0' model='ich9-uhci3'>
      <master startport='4'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x03' function='0x2'/>
    <controller type='pci' index='0' model='pci-root'/>
    <interface type='bridge'>
      <mac address='52:54:00:2e:45:91'/>
      <source bridge='br0'/>
      <model type='virtio'/>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x02' function='0x0'/>
    <serial type='pty'>
      <target type='isa-serial' port='0'>
        <model name='isa-serial'/>
    <console type='pty'>
      <target type='serial' port='0'/>
    <input type='mouse' bus='ps2'/>
    <input type='keyboard' bus='ps2'/>
    <hostdev mode='subsystem' type='usb' managed='no'>
        <vendor id='0x1cf1'/>
        <product id='0x0030'/>
      <address type='usb' bus='0' port='1'/>
    <memballoon model='virtio'>
      <address type='pci' domain='0x0000' bus='0x00' slot='0x05' function='0x0'/>

First shut off home assistant.

virsh shutdown hassos

(Where hassos if your VM’s name)

virsh edit hassos

Turns out I had to remove the following from my virsh config:

    <hostdev mode='subsystem' type='usb' managed='no'>
        <vendor id='0x1cf1'/>
        <product id='0x0030'/>
      <address type='usb' bus='0' port='1'/>

And instead paste this in its place:

    <serial type='dev'>
      <source path='/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2419374-if00'/>
      <target type='usb-serial' port='1'>
        <model name='usb-serial'/>
      <address type='usb' bus='0' port='4'/>

I could find the source path by running:

ls -l /dev/serial/by-id/ 

Now, start hassos again.

virsh start hassos. 

Then, SSH to your home assistant VM. I use the “SSH & Web Terminal” add-on.

Now check what the “source path” is called in home assistant, by running the following in home assistant VM terminal.

ls -l /dev/serial/by-id/ 

For me it was called:


Now edit:


And update the ZHA configuration to this new source path.
Mine looks like this:

"entry_id": "0292a6eeceb2792928417059c5498c34",
        "version": 3,
        "domain": "zha",
        "title": "ConBee II, s/n: DEXXXXX - dresden elektronik ingenieurtechnik GmbH",
        "data": {
          "radio_type": "deconz",
          "device": {
            "path": "/dev/serial/by-id/usb-QEMU_QEMU_USB_SERIAL_1-0000:00:03.7-4-if00-port0"

Now don’t restart, but shut off and on.

virsh shutdown hassos
virsh start hassos

That’s it, this fixed it for me!

Please let me know if this helped you, so I know whether or not making a post like this would be helpful in the future :slight_smile:


I had a similar issue after a power cut. I ended up moving ZigBee to a deCONZ docker container outside the HA VM.

I just bought a new ZigBee coordinator (a PoE version so I can avoid having to pass it to a VM), so probably won’t try this solution. But if I had seen this a few months ago, I certainly would have.

That’s just to say, I think it is very helpful to share, thanks a lot!

1 Like

Thanks for the tip.

I had been using a socat bridge between the host and the VM to work around this problem but that was quite brittle and annoying to keep working.

1 Like