I'm not sure where to start. I have OpenWrt running in a ProxMox VM. I have a MediaTek MT7921AU usb WiFi adapter. The physical adapter is passed directly through to the VM. My phone and my table can connect with no issue. The entire VM reboots about 30 seconds after I connect my laptop. Are there any logs that survive a reboot? I'm at a loss on how to troubleshoot this issue.
"Passing through" fast USB devices into virtual machines does not work, as USB has no real (virtio) pass-through option (contrary to PCIe on hosts with an IOMMU). While this semi-emulation kind of works with slow-paced devices (e.g. NFC readers), it utterly fails with any USB devices (e.g. wireless cards) that depend on fast data transfers and timely (semi-realtime) responses. In some cases it may be possible to pass-through the whole USB host controller (on the PCIe) level through into the VM, while this approach would work, it may come with rather huge collateral damage (as all USB ports of this controller will then be passed through into the VM and are no longer available to the host).
tl;dr: you can't pass through USB WLAN cards into virtual machines, trying to do so will fail - spectacularly (crashes) or more subtly (weird failures, instability, etc.).
This is nothing that could be fixed at the OpenWrt side, it's a technical limitations of how USB works (and to a lesser extent the hypervisor).
Wow, I would have never figured that out. Passing the entire USB controller seems to have fixed the issue. Don't know if I'll use this as my permanent solution or not.
What's really weird is it's only when my laptop connects. I can have other devices connected all day without issue. I moved the syslogs to a persistent drive but couldn't find anything useful in them. Is that any additional logging I can turn to that might shed some light on what's happening?
This sounds like an issue with the driver for the wifi adapter. I would suggest to try another wifi adapter (check that the driver is available on OpenWrt before buying one).
I got the MediaTek Mt7921AU specifically because of its Linux compatibility based on this list. I suspect you are correct about drive issues, both my laptop and ProxMox have had updates since this process started and when I decided to try it again today it just worked, I'm currently typing this connected over WiFi to that card. I wish I had a more definitive explanation but I've been connected for the past 10 minutes, previously I'd get about 30 seconds before OpenWRT rebooted. I'll take the win and move on. I appreciate everyone's input.
Everything was rock solid yesterday. Around 3AM OpenWRT rebooted for some reason, and now when I connect I get the same rebooting after 30 seconds. It still only happens when I connect my laptop, other devices can connect just fine. At this point I have no idea what's going on.