Problem with PCI passthrough Broadcom wifi card to VM on Proxmox, please help!!

Problem with PCI passthrough Broadcom wifi card to VM on Proxmox, please help!!

* Hardware:

CPU: Intel® Core™ i7-9700K Processor

GPU: NITRO+ RX 580 8GB GDDR5

RAM: 32GB - 2 x Corsair Vengeance LPX CMK16GX4M1E3200C16 16GB DDR4 DRAM 3200MHz

Motherboard/Laptop model: Gigabyte Z390 AORUS PRO WiFi

Screen(s) Number: 1 screen - Philips 234E

Screen(s) Resolution: HD 1920 x 1080

Audio Codec: sorry I don't know, but I don't have problem with audio so far

Ethernet Card: only has ethernet port on motherboard, which is Intel® GbE LAN chip (10/100/1000 Mbit)

Wifi/BT Card:

This is where my problem lies (can't PCI passthrough the Broadcom wifi card). There are two:

  1. motherboard wifi/BT chip, which is: Intel® CNVi interface 802.11a/b/g/n/ac; BLUETOOTH 5 (motherboard spec - https://www.gigabyte.com/Motherboard/Z390-AORUS-PRO-WIFI-rev-10#sp)
  2. PCIe/x1: Broadcom BCM943602CS (3 antennas), I know this is not on the WiFi Compatibility list on the FAQ page, but I believe it should work as there are thousands of people in China are using this card in Hackintosh

* Software:

running a macOS Mojave version 10.14.5 on Proxmox VE 5.4-3. This Proxmox server has another VM which is Windows 10 Home edition.

https://i.redd.it/w8uaj0o3po531.jpg

* What guide/tool I followed:

I mainly follow these guides:

  1. Installing macOS Mojave 10.14 on Proxmox 5.4 (by Nicholas Sherlock) https://www.nicksherlock.com/2018/06/installing-macos-mojave-on-proxmox/
  2. My macOS Mojave / Proxmox setup (by Nicholas Sherlock) https://www.nicksherlock.com/2018/11/my-macos-vm-proxmox-setup/
  3. Proxmox help file - Qemu/KVM Virtual Machines https://pve.proxmox.com/wiki/Qemu/KVM_Virtual_Machines

Hi guys, I've been working on PCI passthrough a Broadcom wifi/bluetooth card to Mojave on Proxmox for 4 days already with little success, have been google-ing around, reading the Proxmox manual etc. Finally I have to seek help from you guys, greatly appreciate it if you can point me to the right direction, PLEASE......

As said, I can't get the Broadcom wifi/BT card PCI passthrough to the macOS-Mojave VM (well, actually it did passthrough successfully 2 times, with only Bluetooth working, wifi was not working. Then it won't passthrough anymore after restarting VM even I haven't changed anything, or even after rollback to a snapshot when the wifi card did passthrough successfully, it still didn't work)

I suspect the problem comes from the motherboard's onboard wifi/bluetooth chip. Do I need to somehow disable it? If yes, then how? It seems that BIOS setting does not have an option of disabling it.

Problem details:

First, the macOS Mojave does run ok currently, with some functions not available yet, such as this wifi/BT problem.

However, when I start the Mojave VM after rebooting the Proxmox computer (or just turn on the computer), the VM fails to start in the first attempt, with the error message below:

kvm: -device vfio-pci,host=04:00.0,id=hostpci0,bus=ich9-pcie-port-1,addr=0x0: vfio error: /sys/bus/pci/devices/0000:04:00.0: no such host device: No such file or directory 

where 04:00.0 is the Device ID of the Broadcom BCM943602CS card. Apparently it can't be passed through to the VM. However, I also PCI passthrough the GPU, one USB controller and one Samsung EVO Plus NVMe card to the VM successfully, hence the problem should not come come the Proxmox setting (my guess only....)

Fail to start VM in the first attempt after reboot Proxmox computer, but success if click 'Start' button again

Funny thing is, the VM will start successfully if I press the 'Start' button again without doing or changing anything, seems like Proxmox just ignore the device 04:00.0 and start the VM. However, in 2 odd scenerios the Broadcom card did passthrough successfully with only Bluetooth working but not wifi. I did successfully pair it with a UE Boom Bluetooth speaker, and audio did come out from the UE Boom successfully (you can see it in my mac system report >> Hardware >> Bluetooth). Now I can't make the Broadcom card passthrough work so you see the Manufacturer is "Ericsson" and Address is "00-00-00-00-00-00", but in those 2 times when it worked, I remember clearly the Manufacturer was "Broadcom" with a normal Address value.

https://i.redd.it/sgytpf6vpo531.png

* What files/config I am using:

Here’s my Mojave VM’s Proxmox configuration (basically copied from Nicholas Sherlock's setup, except the VM itself of course, and EXCEPT the vfio-pci.conf file, which I will explain below):

/etc/pve/nodes/pve/qemu-server/101.conf

args: -device isa-applesmc,osk="<<I delete the normal mac OSK key here>>" -smbios type=2 -cpu P$ balloon: 0 bios: ovmf boot: cdn bootdisk: sata0 cores: 4 cpu: Penryn efidisk0: local-zfs:vm-101-disk-0,size=128K hostpci0: 04:00,pcie=1 hostpci1: 01:00,x-vga=1,pcie=1 hostpci2: 00:14,pcie=1 hostpci3: 02:00,pcie=1 machine: q35 memory: 16384 name: macOS-mojave net0: vmxnet3=06:68:27:DC:76:32,bridge=vmbr0,firewall=1 numa: 0 ostype: other sata0: local-main:vm-101-disk-0,cache=unsafe,size=200G smbios1: uuid=cc433c53-a05c-47f7-a261-1a7705c7b1e7 sockets: 2 vga: none vmgenid: 18fa9f72-fa6d-4c75-9a45-b3d990251581 

where there hostpci0 to hostpci3 are:

  • hostpci0 04:00 - Broadcom BCM43602 wifi/bluetooth card, Vendor ID = 14e4:43ba
  • hostpci1 01:00.0 - RX580 GPU, Vendor ID = 1002:67df; 01:00.1 - Audio bus, Vendor ID = 1002:aaf0
  • hostpci2 00:14 - USB controller, Vendor ID = 8086:a36d
  • hostpci3 02:00 - Samsung 970 EVO Plus 1TB, Vendor ID = 144d:a808

/etc/modprobe.d/vfio-pci.conf

Currently I haven't put anything in the vfio-pci.conf file (i.e. a empty file). I don't entirely understand what the purpose/function of this file is, and I did try putting the following line in this file but it makes no difference. Although I am not 100% sure the steps I used was 100% correct. Appreciate it if someone can educate me here.

# 04:00.0 - Broadcom BCM43602 wifi/bluetooth card, Vendor ID = 14e4:43ba options vfio-pci ids=14e4:43ba 

After making changes of this vfio-pci.conf file, I did run "update-grub", "update-initramfs -k all -u", and then reboot Proxmox computer.

All other Proxmox configurations are copied from Nicholas Sherlock's setup, I put them below anyway.

/etc/default/grub

... GRUB_CMDLINE_LINUX_DEFAULT="quiet intel_iommu=on rootdelay=10" ... 

/etc/modules

vfio vfio_iommu_type1 vfio_pci vfio_virqfd 

/etc/modprobe.d/pve-blacklist.conf

blacklist nouveau blacklist nvidia blacklist nvidiafb blacklist snd_hda_codec_hdmi blacklist snd_hda_intel blacklist snd_hda_codec blacklist snd_hda_core blacklist radeon blacklist amdgpu 

/etc/modprobe.d/kvm.conf

options kvm ignore_msrs=Y 

/etc/modprobe.d/kvm-intel.conf

# Nested VM support (not used by macOS) options kvm-intel nested=Y 

--- END OF THIS POST ---

submitted by /u/samtsui70
[link] [comments]