Hello. I would like to boot an OS installed physically on my SATA disk with bhyve and at the same time,passing thru my graphic card,but it seems that it does not work. I am booting from a raw disk which works fine.
-S \
-s 0,hostbridge \
-s 3,ahci-hd,/dev/da0,sectorsize=512 \
-s 10,virtio-net,tap1 \
-s 31,lpc \
When I add a passthru device to the same bhyve config (-S was there already) and the boot starts to fail:
-s 11,passthru,2/0/0 \
BdsDxe: failed to load Boot0001 "UEFI BHYVE SATA DISK BHYVE-9E55-9829-EEEE" from PciRoot(0x0)/Pci(0x3,0x0)/Sata(0x0,0xFFFF,0x0): Not Found
Removing the passthru device from this config and the virtual machine boots just fine again. I have this problem when I try to boot a Linux / Windows / Freebsd guest os installed physically on a SATA or USB disk (it makes no difference). So,I've created some cases to show you in a incontrovertible way that the passthrough of any device (I tried with my nvidia geforce RTX 2080 ti and /or with my USB renesas controller),interferes with the booting of any OS installed physically on the disks. it happens if I use virtio-blk and also ahci-hd. If I use virtio-blk I have an additional problem,in addition to the fact that the passthrough does not work,without passthrough,at some point the VM can't load the root partition,while using ahci-hd it can).
case 1)
bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H \
-s 0,hostbridge \
-s 1,virtio-blk,/dev/da1 \
-s 2:0,passthru,2/0/0 \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm1
= NO (da1 with freebsd 14 installed does not boot)
case 2)
bhyve -S -c sockets=1,cores=2,threads=2 -m 4G -w -H \
-s 0,hostbridge \
-s 1,virtio-blk,/dev/da1 \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm1
= yes.
case 3)
bhyve -s 0,hostbridge \
-s 1,virtio-blk,/dev/da1 \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm1
= yes
case 4)
bhyve -S -s 0,hostbridge \
-s 1,virtio-blk,/dev/da1 \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm1
= yes
case 5)
bhyve -S -s 0,hostbridge \
-s 1,virtio-blk,/dev/da1 \
-s 2:0,passthru,2/0/0 \
-s 31,lpc \
-l com1,stdio \
-l bootrom,/usr/local/share/uefi-firmware/BHYVE_BHF_CODE.fd \
vm1
= no
I don't use the nvidia graphic card on my freebsd system. I haven't installed any driver. I'm using the intel graphic chipset,instead (CoffeeLake-S GT2 [UHD Graphics 630]) ; that I have placed as default on the BIOS. When I boot a virtual machine in a raw format using the driver virtio-blk or ahci-hd,I can passthrough my graphic card. But if the installation of the OS has been done physically,it won't work. So,there should be some bug somewhere. Can u give me some documentation where I can read ? (when I use a virtual machine in raw format,I reserve the passthrough address with this command line : pptdevs="1/0/0 2/0/0 2/0/1 2/0/2 2/0/3" ; where 1 is the renesas usb controller and 2 is the RTX 2080 ti)