HOWTO: Setup OpenWRT Virtual Machine on OPNsense and use it to manage a WiFi AP

Started by zan, May 15, 2023, 07:42:26 PM

Previous topic - Next topic


Hello,

I use AX210 and follow the instruction until Enable the wifi in Openwrt but failed

In console the error as follow

[  112.163462] ACPI: \: failed to evaluate _DSM (0x1001)
[  112.166825] ACPI: \: failed to evaluate _DSM (0x1001)
[  112.170185] ACPI: \: failed to evaluate _DSM (0x1001)
[  112.173361] ACPI: \: failed to evaluate _DSM (0x1001)
[  112.180405] br-lan: port 2(wlan0) entered blocking state
[  112.184179] br-lan: port 2(wlan0) entered disabled state
[  112.187673] device wlan0 entered promiscuous mode
[  112.194680] device wlan0 left promiscuous mode
[  112.197859] br-lan: port 2(wlan0) entered disabled state


what i need to do?

Hi, Im new to the forum but was very interested in this how-to, thank you for sharing! I've followed the instructions, but I'm running into issues with the passthrough itself. When I start the openwrt VM I get the following:

[tt][tt]Dec 04 12:53:02: initialising
Dec 04 12:53:02:  [loader: uefi]
Dec 04 12:53:02:  [cpu: 2]
Dec 04 12:53:02:  [memory: 512M]
Dec 04 12:53:02:  [hostbridge: standard]
Dec 04 12:53:02:  [com ports: com1]
Dec 04 12:53:02:  [uuid: 7e2f71e0-9262-11ee-97d3-e89363092a98]
Dec 04 12:53:02:  [debug mode: no]
Dec 04 12:53:02:  [primary disk: openwrt-22.03.5-x86-64-generic-ext4-combined-efi.img]
Dec 04 12:53:02:  [primary disk dev: file]
Dec 04 12:53:02: initialising network device tap0
Dec 04 12:53:02: adding tap0 -> bridge0 (public addm)
Dec 04 12:53:02: bring up tap0 -> bridge0 (public addm)
Dec 04 12:53:02: booting
Dec 04 12:53:02:  [bhyve options: -c 2 -m 512M -Hwl bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -U 7e2f71e0-9262-11ee-97d3-e89363092a98 -u -S]
Dec 04 12:53:02:  [bhyve devices: -s 0,hostbridge -s 31,lpc -s 4:0,virtio-blk,/home/vm/openwrt/openwrt-22.03.5-x86-64-generic-ext4-combined-efi.img -s 5:0,virtio-net,tap0,mac=58:9c:fc:04:4d:b5 -s 07.0,passthru,2/0/0]
Dec 04 12:53:02:  [bhyve console: -l com1,stdio]
Dec 04 12:53:02: starting bhyve (run 1)
Dec 04 12:53:03: bhyve exited with status 4
Dec 04 12:53:03: destroying network device tap0
Dec 04 12:53:03: stopped[/tt][/tt]


If I remove the passthru then openwrt starts, so it seems to be an issue with the passthrough. I set and enabled all of the tunables and have set the devctl to use ppt0 as described. I have tried a few formats of passthrough, some sites I've seen to use 2/0/0=7:0, whereas some show 2/0/0=07.0 but both give me the same status 4 error.

Another user had the same status 4 error, and vmm_load = "YES" resolved it for them but I still have the same problem in my case. Are there any other tricks or tips for getting the wifi device passthrough to work? The specific device I am trying to pass to openwrt is 'QCA986x/988x 802.11ac Wireless Network Adapter'.

I also enabled debug and have these other logs:
bhyve: PCI device at 2/0/0 is not using the ppt(4) driver
device emulation initialization error: Device busy


Would appreciate any and all feedback, thank you!

Quote from: eplatt on December 04, 2023, 11:43:36 PM
bhyve: PCI device at 2/0/0 is not using the ppt(4) driver
device emulation initialization error: Device busy


Would appreciate any and all feedback, thank you!

The passthrough still doesn't work, probably incorrect PCI device.
Can you show me the output of "vm passthru"?

I finaly came to openwrt to enable wifi but i got problem he got enabled then disabled. only stable is 2.4 at 20hz channel 1.... other settings not actualy working including 5ghz.   i use ax200 and log show this


[ 1415.152247] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.157666] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.158785] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.159630] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.161892] br-lan: port 2(wlan0) entered blocking state
[ 1415.162785] br-lan: port 2(wlan0) entered disabled state
[ 1415.163731] device wlan0 entered promiscuous mode
[ 1422.884452] device wlan0 left promiscuous mode
[ 1422.887188] br-lan: port 2(wlan0) entered disabled state

to add that i can make only one interface wifi, second when i create it is like i clone it, whatever i change on second he change on first. also only 2.4 work 5ghz not working also im testing whitout any ssid password

Quote from: bubobih on August 20, 2024, 07:20:01 PM
I finaly came to openwrt to enable wifi but i got problem he got enabled then disabled. only stable is 2.4 at 20hz channel 1.... other settings not actualy working including 5ghz.   i use ax200 and log show this


[ 1415.152247] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.157666] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.158785] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.159630] ACPI: \: failed to evaluate _DSM (0x1001)
[ 1415.161892] br-lan: port 2(wlan0) entered blocking state
[ 1415.162785] br-lan: port 2(wlan0) entered disabled state
[ 1415.163731] device wlan0 entered promiscuous mode
[ 1422.884452] device wlan0 left promiscuous mode
[ 1422.887188] br-lan: port 2(wlan0) entered disabled state

openwrt not working at all as is shoud be. im thinking can we make mikrotikos working as openwrt? im not sure but im think they support ax200 intel.

Does anyone else have an issue with the passthru device causing the VM to lockup?