vm-bhyve problems with ethernet (realtek) pci passtrough

jdb

Member

Reaction score: 2
Messages: 48

Hey guys :)

I have problems with getting pci passtrough and vm-bhyve to work. Every time I start the VM the whole host system freezes and reboots (I think only when an ethernet cable is connected otherwise the VM simply won't start).


The VM only starts if I comment the passtrough line out.
Code:
#passthru0="21/0/0"

Information about the NIC:
pciconf -lv

Code:
re0@pci0:21:0:0:    class=0x020000 card=0x34687470 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet

Thanks in advance! :D
 
OP
OP
jdb

jdb

Member

Reaction score: 2
Messages: 48

Thanks for the fast answer yuripv :)

For some reason I didn't save the file or I forgot the "pptdevs" line in /boot/loader.conf.

Now the VM starts but crashes while booting Windows 10... :/

Edit: I'm gonna do a fresh install maybe that solves the problem...
 
OP
OP
jdb

jdb

Member

Reaction score: 2
Messages: 48

So after reinstalling Windows 10 the VM still crashes while booting :'‑(
 

yuripv

Active Member

Reaction score: 71
Messages: 172

At least it's VM now and not the host system :) do you get any output from bhyve?
 
OP
OP
jdb

jdb

Member

Reaction score: 2
Messages: 48

I never use the bhyve command. bhyve looks like it has more debugging features than vm-bhyve / vm

When I use vm console <vmname> then I get this output everytime:

Code:
Boot Failed. EFI DVD/CDROM
The windows logo shows up for a second and the VM crashes...

I also enabled
Code:
debug="yes"
in the VM config file.
 
OP
OP
jdb

jdb

Member

Reaction score: 2
Messages: 48

here is my config file

Code:
guest="windows"
uefi="yes"
#loader="default"
cpu=4
memory=16384M
debug="yes"
passthru0="21/0/0"
disk0_type="ahci-hd"
disk0_name="/dev/zvol/zroot/vm/<vmname>/<vmname>-disk0"
disk0_dev="custom"
#disk1_name="/usr/home/<username>/virtio-win-0.1.141.iso"
#disk1_type="ahci-cd"
#disk1_dev="custom"
graphics="yes"
xhci_mouse="yes"
graphics_listen="192.168.***.***"
graphics_port="5901"
graphics_res="1920x1080"
uuid="a494b05a-****-****-****-************"
 

SirDice

Administrator
Staff member
Administrator
Moderator

Reaction score: 7,409
Messages: 29,985

How did you configure pptdevs?
 
OP
OP
jdb

jdb

Member

Reaction score: 2
Messages: 48

Code:
pptdevs="21/0/0"
in /boot/loader.conf
Code:
vmm_load="YES"
vmm is also enabled and loaded in to kernel
 
OP
OP
jdb

jdb

Member

Reaction score: 2
Messages: 48

Yes I rebooted

Output of:
pciconf -lev
Code:
ppt0@pci0:21:0:0:    class=0x020000 card=0x34687470 chip=0x816810ec rev=0x06 hdr=0x00
    vendor     = 'Realtek Semiconductor Co., Ltd.'
    device     = 'RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller'
    class      = network
    subclass   = ethernet
ifconfig doesn't show re0 and it's not attached to if_re(4)

Output of:
vm passthru

Code:
DEVICE     BHYVE ID     READY        DESCRIPTION
ppt0       21/0/0       Yes          RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
 
Top