Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Mar 2025 14:21:48 +0000
From:      Shamim Shahriar <shamim.shahriar@gmail.com>
To:        freebsd-virtualization@freebsd.org
Subject:   GPU Passthrough with FreeBSD 14.2 bhyve and NVidia Quadro RTX 6000/8000
Message-ID:  <CAOyJeZTtM80ceqdZffNXef4LVoEA3GBYRrn508pS0y12yT8dOQ@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
--000000000000c8f694063117538d
Content-Type: text/plain; charset="UTF-8"

Good afternoon everyone.

I am trying to have VMs with GPU passthrough. The setup is a Dell server
with NVidia Quadro RTX 6000/8000 installed already. I have checked the
device IDs and put pptdevs in place

# cat /boot/loader.conf
pptdevs="18/0/0 19/0/0"
pptdevs2="72/0/0 73/0/0"

this is showing the GPUs as pptdev on the pciconf

ppt0@pci0:18:0:0:       class=0x030200 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1e78 subvendor=0x10de subdevice=0x13d8
    vendor     = 'NVIDIA Corporation'
    device     = 'TU102GL [Quadro RTX 6000/8000]'
    class      = display
    subclass   = 3D
ppt1@pci0:19:0:0:       class=0x030200 rev=0xa1 hdr=0x00 vendor=0x10de
device=0x1e78 subvendor=0x10de subdevice=0x13d8
    vendor     = 'NVIDIA Corporation'
    device     = 'TU102GL [Quadro RTX 6000/8000]'
    class      = display
    subclass   = 3D

as I am using vm-bhyve, I have put the configuration as below

# cat /mnt/VMs/jagadish/jagadish.conf
loader="uefi"
cpu=16
memory=128G
xhci_mouse="yes"
debug="true"

graphics="yes"
graphics_listen="127.0.0.1"
graphics_port="5920"
graphics_res="1024x768"
graphics_wait="no"
#graphics_vga="io"

network0_type="virtio-net"
network0_switch="swUNI"
network0_mac="58:9c:fc:06:3f:af"

disk0_type="nvme"
disk0_name="jagadish-disk0.img"
#disk0_size="128G"

uuid="966e909b-1293-11ef-a9a4-e4434bfe34de"

passthru0="19/0/0=6:0"

bhyve_options="-A -H -P"
#END

however, when I start the vm (for OS installation to start with), it shows
it is running but I am unable to access the VNC for a while, then when I
finally manage to connect via VNC, there is nothing on the screen, just
blank dark screen

the vm-bhyve.log shows

Mar 24 13:59:26: initialising
Mar 24 13:59:26:  [loader: uefi]
Mar 24 13:59:26:  [cpu: 16]
Mar 24 13:59:26:  [memory: 128G]
Mar 24 13:59:26:  [hostbridge: standard]
Mar 24 13:59:26:  [com ports: com1]
Mar 24 13:59:26:  [uuid: 966e909b-1293-11ef-a9a4-e4434bfe34de]
Mar 24 13:59:26:  [debug mode: true]
Mar 24 13:59:26:  [primary disk: jagadish-disk0.img]
Mar 24 13:59:26:  [primary disk dev: file]
Mar 24 13:59:26: initialising network device tap0
Mar 24 13:59:26: adding tap0 -> vm-swUNI (swUNI addm)
Mar 24 13:59:26: bring up tap0 -> vm-swUNI (swUNI addm)
Mar 24 13:59:26: booting
Mar 24 13:59:26:  [bhyve options: -c 16 -m 128G -AHPw -l
bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -A -H -P -U
966e909b-1293-11ef-a9a4-e4434bfe34de -u -S]
Mar 24 13:59:26:  [bhyve devices: -s 0,hostbridge -s 31,lpc -s
4:0,nvme,/mnt/VMs/jagadish/jagadish-disk0.img -s
5:0,virtio-net,tap0,mac=58:9c:fc:06:3f:af -s 6:0,passthru,19/0/0 -s
7:0,fbuf,tcp=127.0.0.1:5920,w=1024,h=768 -s 8:0,xhci,tablet]
Mar 24 13:59:26:  [bhyve console: -l com1,/dev/nmdm-jagadish.1A]
Mar 24 13:59:26:  [bhyve iso device: -s
3:0,ahci-cd,/mnt/VMs/.iso/lubuntu-24.04.1-desktop-amd64.iso,ro]
Mar 24 13:59:26: starting bhyve (run 1)

based on what I can see, and a little out of desparation, I decided to run
the installer in the foreground, and below is what I got

# vm install -f jagadish FreeBSD-14.2-RELEASE-amd64-disc1.iso
Starting jagadish
  * found guest in /mnt/VMs/jagadish
  * booting...
fbuf frame buffer base: 0x112245400000 [sz 16777216]

it stays there for as long as I wait until I poweroff the vm.

tried with Debian installer,
# vm install -f jagadish debian-12.5.0-amd64-netinst.iso
Starting jagadish
  * found guest in /mnt/VMs/jagadish
  * booting...
fbuf frame buffer base: 0x2747e2400000 [sz 16777216]


ideally I need to install Debian for my user base on these GPU based
systems. But even that is proving to be impossible since the installer does
not move any further from where it is.

Any thoughts/ideas/suggestions what I else I can try to make this work?
Anything that you have tried that worked? have I missed something?

Would appreciate any and all thoughts/suggestions

best regards
SS

--000000000000c8f694063117538d
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Good afternoon everyone.<br><br>I am trying to have VMs wi=
th GPU passthrough. The setup is a Dell server with NVidia Quadro RTX 6000/=
8000 installed already. I have checked the device IDs and put pptdevs in pl=
ace<br><br># cat /boot/loader.conf<br>pptdevs=3D&quot;18/0/0 19/0/0&quot;<b=
r>pptdevs2=3D&quot;72/0/0 73/0/0&quot;<br><br>this is showing the GPUs as p=
ptdev on the pciconf<br><br>ppt0@pci0:18:0:0: =C2=A0 =C2=A0 =C2=A0 class=3D=
0x030200 rev=3D0xa1 hdr=3D0x00 vendor=3D0x10de device=3D0x1e78 subvendor=3D=
0x10de subdevice=3D0x13d8<br>=C2=A0 =C2=A0 vendor =C2=A0 =C2=A0 =3D &#39;NV=
IDIA Corporation&#39;<br>=C2=A0 =C2=A0 device =C2=A0 =C2=A0 =3D &#39;TU102G=
L [Quadro RTX 6000/8000]&#39;<br>=C2=A0 =C2=A0 class =C2=A0 =C2=A0 =C2=A0=
=3D display<br>=C2=A0 =C2=A0 subclass =C2=A0 =3D 3D<br>ppt1@pci0:19:0:0: =
=C2=A0 =C2=A0 =C2=A0 class=3D0x030200 rev=3D0xa1 hdr=3D0x00 vendor=3D0x10de=
 device=3D0x1e78 subvendor=3D0x10de subdevice=3D0x13d8<br>=C2=A0 =C2=A0 ven=
dor =C2=A0 =C2=A0 =3D &#39;NVIDIA Corporation&#39;<br>=C2=A0 =C2=A0 device =
=C2=A0 =C2=A0 =3D &#39;TU102GL [Quadro RTX 6000/8000]&#39;<br>=C2=A0 =C2=A0=
 class =C2=A0 =C2=A0 =C2=A0=3D display<br>=C2=A0 =C2=A0 subclass =C2=A0 =3D=
 3D<br><br>as I am using vm-bhyve, I have put the configuration as below<br=
><br># cat /mnt/VMs/jagadish/jagadish.conf<br>loader=3D&quot;uefi&quot;<br>=
cpu=3D16<br>memory=3D128G<br>xhci_mouse=3D&quot;yes&quot;<br>debug=3D&quot;=
true&quot;<br><br>graphics=3D&quot;yes&quot;<br>graphics_listen=3D&quot;127=
.0.0.1&quot;<br>graphics_port=3D&quot;5920&quot;<br>graphics_res=3D&quot;10=
24x768&quot;<br>graphics_wait=3D&quot;no&quot;<br>#graphics_vga=3D&quot;io&=
quot;<br><br>network0_type=3D&quot;virtio-net&quot;<br>network0_switch=3D&q=
uot;swUNI&quot;<br>network0_mac=3D&quot;58:9c:fc:06:3f:af&quot;<br><br>disk=
0_type=3D&quot;nvme&quot;<br>disk0_name=3D&quot;jagadish-disk0.img&quot;<br=
>#disk0_size=3D&quot;128G&quot;<br><br>uuid=3D&quot;966e909b-1293-11ef-a9a4=
-e4434bfe34de&quot;<br><br>passthru0=3D&quot;19/0/0=3D6:0&quot;<br><br>bhyv=
e_options=3D&quot;-A -H -P&quot;<br>#END<br><br>however, when I start the v=
m (for OS installation to start with), it shows it is running but I am unab=
le to access the VNC for a while, then when I finally manage to connect via=
 VNC, there is nothing on the screen, just blank dark screen<br><br>the vm-=
bhyve.log shows<br><br>Mar 24 13:59:26: initialising<br>Mar 24 13:59:26: =
=C2=A0[loader: uefi]<br>Mar 24 13:59:26: =C2=A0[cpu: 16]<br>Mar 24 13:59:26=
: =C2=A0[memory: 128G]<br>Mar 24 13:59:26: =C2=A0[hostbridge: standard]<br>=
Mar 24 13:59:26: =C2=A0[com ports: com1]<br>Mar 24 13:59:26: =C2=A0[uuid: 9=
66e909b-1293-11ef-a9a4-e4434bfe34de]<br>Mar 24 13:59:26: =C2=A0[debug mode:=
 true]<br>Mar 24 13:59:26: =C2=A0[primary disk: jagadish-disk0.img]<br>Mar =
24 13:59:26: =C2=A0[primary disk dev: file]<br>Mar 24 13:59:26: initialisin=
g network device tap0<br>Mar 24 13:59:26: adding tap0 -&gt; vm-swUNI (swUNI=
 addm)<br>Mar 24 13:59:26: bring up tap0 -&gt; vm-swUNI (swUNI addm)<br>Mar=
 24 13:59:26: booting<br>Mar 24 13:59:26: =C2=A0[bhyve options: -c 16 -m 12=
8G -AHPw -l bootrom,/usr/local/share/uefi-firmware/BHYVE_UEFI.fd -A -H -P -=
U 966e909b-1293-11ef-a9a4-e4434bfe34de -u -S]<br>Mar 24 13:59:26: =C2=A0[bh=
yve devices: -s 0,hostbridge -s 31,lpc -s 4:0,nvme,/mnt/VMs/jagadish/jagadi=
sh-disk0.img -s 5:0,virtio-net,tap0,mac=3D58:9c:fc:06:3f:af -s 6:0,passthru=
,19/0/0 -s 7:0,fbuf,tcp=3D<a href=3D"http://127.0.0.1:5920">127.0.0.1:5920<=
/a>,w=3D1024,h=3D768 -s 8:0,xhci,tablet]<br>Mar 24 13:59:26: =C2=A0[bhyve c=
onsole: -l com1,/dev/nmdm-jagadish.1A]<br>Mar 24 13:59:26: =C2=A0[bhyve iso=
 device: -s 3:0,ahci-cd,/mnt/VMs/.iso/lubuntu-24.04.1-desktop-amd64.iso,ro]=
<br>Mar 24 13:59:26: starting bhyve (run 1)<br><br>based on what I can see,=
 and a little out of desparation, I decided to run the installer in the for=
eground, and below is what I got<br><br># vm install -f jagadish FreeBSD-14=
.2-RELEASE-amd64-disc1.iso<br>Starting jagadish<br>=C2=A0 * found guest in =
/mnt/VMs/jagadish<br>=C2=A0 * booting...<br>fbuf frame buffer base: 0x11224=
5400000 [sz 16777216]<br><br>it stays there for as long as I wait until I p=
oweroff the vm.<br><br>tried with Debian installer, <br># vm install -f jag=
adish debian-12.5.0-amd64-netinst.iso<br>Starting jagadish<br>=C2=A0 * foun=
d guest in /mnt/VMs/jagadish<br>=C2=A0 * booting...<br>fbuf frame buffer ba=
se: 0x2747e2400000 [sz 16777216]<br><br><br>ideally I need to install Debia=
n for my user base on these GPU based systems. But even that is proving to =
be impossible since the installer does not move any further from where it i=
s.<br><br>Any thoughts/ideas/suggestions what I else I can try to make this=
 work? Anything that you have tried that worked? have I missed something?<b=
r><br>Would appreciate any and all thoughts/suggestions<br><br>best regards=
<br><div>SS</div></div>

--000000000000c8f694063117538d--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOyJeZTtM80ceqdZffNXef4LVoEA3GBYRrn508pS0y12yT8dOQ>