UnchartedBull
Dabbler
- Joined
- Oct 17, 2016
- Messages
- 24
Hi,
I'm currently trying to passthrough my USB3.0 PCI Hub to my HASSio VM to finally connect the Zigbee stick directly to HomeAssistant. I did some searching around on how to do that and got something that kind of works together. The big problem here is, that hassio can't connect to the network if I start the VM via the CLI (as root user). If I start the VM via the UI it works just fine though. The PCI passthrough is working fine and I can connect to the machine via VNC and interact normally, except no network connection.
I saw in the logs that a NIC_ATTACH was happening:
So i was wondering, whether and how I need to do that if I start the VM from the cli. My other guess would be that the UI uses a different user to start the VMs. If I knew that user I could try starting the VM with it and see if something changes.
It would also be super helpful to know, whether I can adjust the command that is used to start the VM via the UI, maybe I can just inject my snippet there and see if that works.
Here is how I got to the current point (if this helps):
- Created VM via UI and installed everything
- Disabled PCI bridge via loader.conf
- Found bhyve command used by the UI:
- Added the -S option and
- Executed that script as root
- If I connect to the hassio install via vnc I can see connected USB devices (to that PCI adapter) via the hardware info.
Would be great if someone could help.
Thanks!
I'm currently trying to passthrough my USB3.0 PCI Hub to my HASSio VM to finally connect the Zigbee stick directly to HomeAssistant. I did some searching around on how to do that and got something that kind of works together. The big problem here is, that hassio can't connect to the network if I start the VM via the CLI (as root user). If I start the VM via the UI it works just fine though. The PCI passthrough is working fine and I can connect to the machine via VNC and interact normally, except no network connection.
I saw in the logs that a NIC_ATTACH was happening:
Code:
[2020/06/23 17:57:54] (DEBUG) VMService.vm_6.run():179 - ====> NIC_ATTACH: alc0 [2020/06/23 17:57:54] (DEBUG) VMService.vm_6.run():293 - Starting bhyve: bhyve -A -H -w -c 2 -m 1300 -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm6A -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s 29,fbuf,vncserver,tcp=192.168.x.x:6011,w=1024,h=768,, -s 30,xhci,tablet -s 4,e1000,tap3,mac=00:a0:98:5a:xx:xx -s 3:0,ahci,hd:/dev/zvol/hassio/system 6_HassIO
So i was wondering, whether and how I need to do that if I start the VM from the cli. My other guess would be that the UI uses a different user to start the VMs. If I knew that user I could try starting the VM with it and see if something changes.
It would also be super helpful to know, whether I can adjust the command that is used to start the VM via the UI, maybe I can just inject my snippet there and see if that works.
Here is how I got to the current point (if this helps):
- Created VM via UI and installed everything
- Disabled PCI bridge via loader.conf
- Found bhyve command used by the UI:
Starting bhyve: bhyve -A -H -w -c 2 -m 1300 -s 0:0,hostbridge -s 31,lpc -l com1,/dev/nmdm6A -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -s 29,fbuf,vncserver,tcp=192.168.x.x:6011,w=1024,h=768,, -s 30,xhci,tablet -s 4,e1000,tap3,mac=00:a0:98:5a:xx:xx -s 3:0,ahci,hd:/dev/zvol/hassio/system 6_HassIO
- Added the -S option and
-s 1:0,passthru,5/0/0
right behind hostbridge- Executed that script as root
- If I connect to the hassio install via vnc I can see connected USB devices (to that PCI adapter) via the hardware info.
Would be great if someone could help.
Thanks!