Home Assistan Supervised and KVM

  • Hello,

    A few weeks ago, I decided to give up my old QNAP NAS (very inefficient for me) and use an old PC to configure software NAS. I chose OMV - it is simple, efficient, easily configurable and best suited to my needs. Among other things, I need to install Home Assistant Supervised. The simplest solution is HAOS on VM in KVM-plugin. It's simple, but I ran into a problem that I've been struggling with for a few days. I am using Conbee II stick with HA and even though I set USB passtrough and it is visible in HA, Zigbee2MQTT can't use it. Error messages appear in the logs. I've tried HAOS in VM in Proxmox, VirtualBox in Debian before - it works everywhere. Only in KVM on OMV there is a problem. Same error ocures not only form me - and there is even a solution described here: https://community.home-assista…/conbee-ii-and-kvm/333560 It's about adding an alias in the xml configuration:


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


    But it doesn't work for me at all. Maybe someone has an idea how to solve such problem?

  • votdev

    Hat das Thema freigeschaltet.
    • Offizieller Beitrag

    But it doesn't work for me at all. Maybe someone has an idea how to solve such problem?

    Their code is adding a serial device that just happens to be a usb to serial device. That is very different than what the plugin is doing. I will look to see what adding a serial device would take.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    Can you post the output of:


    sudo virt-xml YOUR_VM_NAME --add-device --serial /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DEXXXXXXX-if00

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • The original code is:

    Code
        <serial type="dev">
          <source path="/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DEXXXXXXX-if00"/>
          <target type="usb-serial" port="1">
            <model name="usb-serial"/>
          </target>
          <alias name="serial1"/>
          <address type="usb" bus="0" port="4"/>
        </serial>

    With alias line:

    Code
    <alias name="serial1"/>

    But after saving such a configuration and reopening, this line is gone. I don't understand it, but I guess that there is some validation mechanism that removes the line. I edit configuration with the virsh edit command.

    I haven't used virt-manager, I'm not familiar with this tool - I'm a newbie in linux systems.

  • Can you post the output of:


    sudo virt-xml YOUR_VM_NAME --add-device --serial /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DEXXXXXXX-if00

    Output:


    Code
    ERROR    unsupported configuration: unknown type presented to host for character device: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2451933-if00
    • Offizieller Beitrag

    ERROR unsupported configuration: unknown type presented to host for character device: /dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2451933-if00

    This is probably why it rejected your edit. What is the output of: find /dev/serial

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    This affects unraid's kvm VMs as well since it is using libvirt too. What is the output of: lsusb

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Code
    lsusb
    Bus 004 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 002 Device 004: ID 04f3:0103 Elan Microelectronics Corp. ActiveJet K-2024 Multimedia Keyboard
    Bus 002 Device 010: ID 1cf1:0030 Dresden Elektronik ZigBee gateway [ConBee II]
    Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
    Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    • Offizieller Beitrag

    Try adding:


    Code
        <serial type="dev">
          <source path="/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2451933-if00"/>
          <target type="usb-serial" port="1">
            <model name="usb-serial"/>
          </target>
          <alias name="serial1"/>
          <address type="usb" bus="2" port="10"/>
        </serial>

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • After turning on the system today, the port assignments were different:



    So I changed the code accordingly (if I understood correctly what it means):



    Code
    <serial
    type="dev">
       <source path="/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2451933-if00"/>
       <target type="usb-serial" port="1">
         <model name="usb-serial"/>
       </target>
       <alias name="serial1"/>
       <address type="usb" bus="1" port="3"/>
    </serial>



    However, when I try to save the configuration, I get an error:


    error: XML error: Missing USB bus 1

    Failed. Try again? [y,n,i,f,?]:


    What make no sense for me.

    • Offizieller Beitrag

    After turning on the system today, the port assignments were different

    That is the problem with using bus and port for usb passthrough. Nothing I can do to fix that.


    owever, when I try to save the configuration, I get an error:

    No idea why. I assume lsusb is showing it on bus 1, port3.

    I found a bug description identical to my case: libvirt bug Maybe this will lead to a solution.

    That bug is over a year old and applies to libvirt 7.x. You should have libvirt 8.x installed. Not sure you will see any solutions from it. From my searching last night, it does seem to be limited to this adapter though or at least I haven't seen other issues with other zigbee adapters. I don't have any or use them. So, I am very limited in what I can do.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Thank you very much for your help and support. Looks like I'll have to go back to an earlier solution: Proxmox + OMV + HAOS - it worked.

    Unless there is some solution that will allow me to run VirtualBox (PHP VirtualBox) on OMV? Is it possible?

    • Offizieller Beitrag

    Proxmox + OMV + HAOS - it worked.

    Proxmox does use kvm but doesn't use libvirt.

    Unless there is some solution that will allow me to run VirtualBox (PHP VirtualBox) on OMV? Is it possible?

    Virtualbox from the virtualbox repos should still work. No idea what the state of phpvirtualbox is. It had been dead for a long time last I looked. There is nothing stopping you from using pure kvm/qemu like proxmox does. You just won't be able to manage it from the kvm plugin.

    <serial type="dev"> <source path="/dev/serial/by-id/usb-dresden_elektronik_ingenieurtechnik_GmbH_ConBee_II_DE2451933-if00"/> <target type="usb-serial" port="1"> <model name="usb-serial"/> </target> <alias name="serial1"/> <address type="usb" bus="1" port="3"/> </serial>

    Did you try removing the <address type="usb" bus="1" port="3"/> section? This is the only part that would change after every reboot.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Zitat

    Virtualbox from the virtualbox repos should still work. No idea what the state of phpvirtualbox is. It had been dead for a long time last I looked

    PHPVirtualBox came to my mind because of web-browser VM managing. I don't know if the standard VrtualBox has the ability to be managed via a browser


    Zitat

    There is nothing stopping you from using pure kvm/qemu like proxmox does

    I'm afraid I don't know how to do that. Can you paste a link describing the installation and configuration process, please? Can I also manage it, e.g. via Cockpit?


    Zitat

    Did you try removing the <address type="usb" bus="1" port="3"/> section? This is the only part that would change after every reboot.

    I just checked - it didn't change anything, still the same error.

    • Offizieller Beitrag

    I don't know if the standard VrtualBox has the ability to be managed via a browser

    Nope, it can't.


    Can you paste a link describing the installation and configuration process, please? Can I also manage it, e.g. via Cockpit?

    If you install the kvm plugin, everything you need will be installed. You would just have to run qemu commands. Lots of the guides on internet for that. Cockpit uses libvirt too. So, it won't help. Might be easier to just run HA on an RPi.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

    • Offizieller Beitrag

    I found yet another solution: OMV_Debian_VirtualBox

    That works too. But I don't know if some system component update won't cause problems in the future.

    I didn't translate it. So not sure what it is recommending. The biggest problem with virtualbox is kernel support - its modules usually won't compile on the latest kernel until it has been out for a while.


    You could run HA in docker last I heard.

    omv 7.0.4-2 sandworm | 64 bit | 6.5 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.10 | compose 7.1.2 | k8s 7.0-6 | cputemp 7.0 | mergerfs 7.0.3


    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • I need HA Supervised version, but it is impossible with docker installation. But... I just realized one thing - perhaps the simplest. HA Supervided can be installed directly on Debian - it's a supported installation. OMV is on Debian as well. Maybe instead of messing with KVM, try installing HA directly on the OMV? HA needs docker and some dependencies. It is described here. How do you think it will work? If so, this will be the simplest solution :)




    EDIT:

    I checked - it works! I installed OMV on VirtualBox for a test, and then Home Assistant Supervised according to the link provided earlier. The only problem was the lack of the apparmor package. I installed it and everything works. Or so it seems to me. I'll try a normal, not virtual, installation tomorrow.

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!