DaemonForums  

Go Back   DaemonForums > FreeBSD > FreeBSD General

FreeBSD General Other questions regarding FreeBSD which do not fit in any of the categories below.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 4th February 2022
marietto2021 marietto2021 is offline
New User
 
Join Date: Jul 2021
Posts: 8
Default Booting a physically installed OS in bhyve won't work with the passthru enabled

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.

Code:
        -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:

Code:
        -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)

Code:
 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)

Code:
 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)

Code:
  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)

Code:
  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)

Code:
  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)
Reply With Quote
Reply

Tags
bhyve, nvidia, passthru, sata, usb devices

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD The vmm(4) hypervisor has been enabled jggimi News 6 15th December 2016 01:23 PM
behyve passthru Nivekg FreeBSD General 0 28th April 2016 05:07 AM
BHyVe - The BSD HyperVisor vermaden News 1 15th November 2011 03:00 PM
Trouble with ftp with pf enabled kasse FreeBSD General 8 24th August 2008 11:25 PM
Problem using pkg with pf enabled aleunix FreeBSD Security 2 25th July 2008 11:43 PM


All times are GMT. The time now is 09:32 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick