VM on second NIC fails to install

josti

Cadet
Joined
Nov 18, 2021
Messages
6
Hi,

I'm have a fresh install of Truenas on a pc.
I have 2 nics 1 is the Nic on the motherboard the other is a usbc to eth adapter.
I'm trying to set up 2 ubuntu VM's each connected to one of the VM's.
The VM connected to the motherboard NIC works great and I have no problems.
The second VM connected to the usbc nic keeps crashing during install of ubuntu.
I checked the crash report but can't find what's causing the crash.
I have also tried with a diffrent Nic (PCI-e 10Gb) but with the same results.
In the crashreport I see the Nic is correctly picked up.
I can finish the whole setup process but once it starts installing it always fails.
Does any of you have a suggestion as what might be causing this ?

Best regards,

Jos
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How are you presenting the USB adapter to the VM? If you're trying to use USB pass-through, I don't believe that's implemented in the bhyve hypervisor. If you're trying to use PCI pass-through, you have to ensure the host OS isn't using the on-board USB controller from boot. If you're just using VNET, the host OS doesn't have great support for USB Ethernet.
 

josti

Cadet
Joined
Nov 18, 2021
Messages
6
Hi,

Ok so USB is not the way to go I have the same problem with a PCIe nic however.
During OS setup network is working fine I get an ip assigned etc.

Jos
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
How many NICs does your system have? Are you trying to use a NIC the host is using? How are you passing through the PCI-E NIC to the VM?
 

josti

Cadet
Joined
Nov 18, 2021
Messages
6
Hi,

I have 2 Nic's 1 is on the motherboard and 1 is a add in card.
I had the the usb adapter attached for troubleshooting as I tought it might be the add in card that was the problem.
For the VM that fails I use the addin card and it's only used for that VM.
I'm not sure about the question how are you passing trough, I just select the NIC at the VM creation part.

best regards,

Jos
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
OK, there are certain things you have to do to make the NIC available to the VM beyond what's displayed in the GUI. (For reference, see https://wiki.freebsd.org/bhyve/pci_passthru.)

First, what is your full list of hardware? In particular, your CPU needs to support EPT and VT-d.
Next, find the PCI slot address of the NIC you want to pass through via pciconf -v -l. The slot address will be listed like xxx@pci0:a:b:c. The last 3 digits will be the slot address you need.
Finally, go to System->Tunables, and create a loader tunable pptdevs="a/b/c", where this is the PCI slot address from the previous step, changing the colons to forward slashes. To activate the loader tunable, reboot.
 

josti

Cadet
Joined
Nov 18, 2021
Messages
6
Hi,

ok clearly I was thinking to simple haha.
I'm using a ryzen 1600x not sure if it supports EPT and VT-d will have a look.
Thank you for the instructions very helpfull.

best regards,

jos
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Alternatively you need to pre-create all your bridge interfaces. Then you can map one VM to e.g. bridge0 and another one to bridge1. I'd recommend to go that route.

Ping me here if you want to try that - I can outline the process, then. Please add the interface names (e.g. igb0, igb1 or similar) that your system has got.

Kind regards
Patrick
 

josti

Cadet
Joined
Nov 18, 2021
Messages
6
OK, there are certain things you have to do to make the NIC available to the VM beyond what's displayed in the GUI. (For reference, see https://wiki.freebsd.org/bhyve/pci_passthru.)

First, what is your full list of hardware? In particular, your CPU needs to support EPT and VT-d.
Next, find the PCI slot address of the NIC you want to pass through via pciconf -v -l. The slot address will be listed like xxx@pci0:a:b:c. The last 3 digits will be the slot address you need.
Finally, go to System->Tunables, and create a loader tunable pptdevs="a/b/c", where this is the PCI slot address from the previous step, changing the colons to forward slashes. To activate the loader tunable, reboot.
Hi,

Ok so I found my hardware adress and want to add the tunable but I'm unsure how to proceed.
Could you perhaps explain a bit more clearly what to do here ?
My pc adress is 38:0:0:

best regards,

jos
 

josti

Cadet
Joined
Nov 18, 2021
Messages
6
Hi Patrick,

I currently have 3 interfaces :

igb0
1x0
ue0

ue0 is the interface i'd like to use for the new VM.

Best regards,

Jos
 
Top