Hi, im trying to run bhyve using cli and passing a gpu to the VM but I get an error:
So far what I tried:
Detect the card in question:
In my case there was 2 devices @pci0:7:0:1 @pci0:7:0:0
I added this 2 devices to the pptdevs list and the vmm_load (had to add this otherwise couldn't set the driver for the device it would complain "Device is busy") via web-ui freenas tunnables:
After reboot on the cli I run:
If I dont passthrough the device it works correctly, otherwise gives the error described on top
NOTES:
If you get "vm_reinit: Device busy" just "bhyvectl --destroy --vm=VMNAME"
In my case after installing ubuntu the vm couldn't find grubx64.efi just restarted the vm with the refind iso mounted "-s 5,ahci-cd,/pathTo/refind-cd-0.11.0.iso" and copied the contents from: /boot/efi/EFI/ubuntu to: /boot/efi/EFI/Boot
Any help or ideas on this matter would be appreciated.
Code:
Assertion failed: (error == 0), function modify_bar_registration, file /freenas-11-releng/freenas/_BE/os/usr.sbin/bhyve/pci_emul.c, line 491. Abort (core dumped)
So far what I tried:
Detect the card in question:
Code:
pciconf -v -l
In my case there was 2 devices @pci0:7:0:1 @pci0:7:0:0
I added this 2 devices to the pptdevs list and the vmm_load (had to add this otherwise couldn't set the driver for the device it would complain "Device is busy") via web-ui freenas tunnables:
Code:
Variable: pptdevs Value: 7/0/0 7/0/1 Type: Loader Variable: vmm_load Value: YES Type: Loader
After reboot on the cli I run:
Code:
devctl set driver pci0:7:0:0 ppt devctl set driver pci0:7:0:1 ppt ifconfig tap1 create sysctl net.link.tap.up_on_open=1 ifconfig bridge0 addm tap1 ifconfig tap1 up // (The S on bhyve command is necessary to hard wire memory I think) bhyve \ -APHS \ -c 4 \ -m 4096 \ -s 0:0,hostbridge \ -s 31,lpc \ -l com1,/dev/nmdm3A \ -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd \ -s 3,e1000,tap1 \ -s 29,fbuf,tcp=0.0.0.0:5903,w=1024,h=768,wait \ -s 30,xhci,tablet \ -s 7:0,passthru,7/0/0 \ -s 7:1,passthru,7/0/1 \ -s 4,ahci-hd,/dev/zvol/ssd/VMS2 \ VMGUI
If I dont passthrough the device it works correctly, otherwise gives the error described on top
NOTES:
If you get "vm_reinit: Device busy" just "bhyvectl --destroy --vm=VMNAME"
In my case after installing ubuntu the vm couldn't find grubx64.efi just restarted the vm with the refind iso mounted "-s 5,ahci-cd,/pathTo/refind-cd-0.11.0.iso" and copied the contents from: /boot/efi/EFI/ubuntu to: /boot/efi/EFI/Boot
Any help or ideas on this matter would be appreciated.
Last edited: