Should FreeBSD port NetBSD's NVMM?

  • Thread starter Deleted member 63822
  • Start date

olli@

Daemon
Developer

Reaction score: 1,262
Messages: 1,140

Personally, my problem with bhyve is that it doesn’t support passing raw drives through, in particular, I want to use my BD-ROM drive inside a Linux guest. Bhyve doesn’t support this (you can pass a BD file system, but you cannot pass the raw drive so Linux programs can send SCSI commands to it). I was under the impression that it’s supposed to work with virtio-scsi, but it doesn’t. In theory I could pass the PCI device that holds the controller to which the BD-ROM drive is connected, but I can’t do that because that drive is not the only device on that PCI.

It does work fine with VirtualBox, though, so I’m using that one. The only issue with VirtualBox is that its USB support is rather weak, but I don’t need USB in that case, so it’s not a big deal.
 

tarkhil

Member

Reaction score: 6
Messages: 44

What the OP needs to ask himself is- What does NVMM do that Bhyve does not?
That is what I would ask myself if I was a developer.

We have Bhyve and Xen.
Why do we need more options? We have two perfectly functioning tools for Virtualization.
Well, on 12.2 I've got issues running Windows Server on AMD CPU, had to move to Intel box.
And Bhyve does not support (and looks like it's not going to) USB passthrough and CD-ROM mount/unmount on the fly. Sometimes it's disappointing.
 

Phishfry

Beastie's Twin

Reaction score: 2,747
Messages: 5,682

And Bhyve does not support (and looks like it's not going to) USB passthrough
I disagree. I have tested using four NEC USB3 controller cards passed thru to four different VM's.
So that gives me a mouse and keyboard for each VM. I also used some 4 port VLI USB3 cards and that allowed usb mass storage which hotplugs just like a regular machine. There was a 60 sec. delay in the CAM subsystem bringing up the device though.

Now where you will see problems is using the motherboard USB with pass-thru.
 

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

From here : https://wiki.freebsd.org/Xen

Known Limitations​


  • Suspend and Resume may not work
  • The console mouse may not work on the host
  • The FreeBSD kernel debugger may not work
  • MSI-X PV interrupts are not supported (FreeBSD)
  • ---> PCI devices with virtual functions work inconsistently (FreeBSD)
  • ---> PCI Passthrough is not supported (Xen/FreeBSD) ---> it talks about FreeBSD as a guest os ?
  • ARM64 is not supported
  • Loading vmm.ko will panic the Dom0, as may VirtualBox

eternal_noob
 

Hakaba

Active Member

Reaction score: 126
Messages: 242

OP miss an important point about adding new software vs improve existing one.

If you list the lack of bhyve/Xen, you need to list the lack of nvmm and compare both.

About the ARM64 limitation :

man nvmm >
The following backends are supported:
- x86-SVM, for x86 AMD CPUs
- x86-VMX, for x86 Intel CPUs

Actually, there is no ARM64 support in nvmm.
I do not find information about USB passthrough but at least the DragonFlyBSD documentation say :

DHCP & DNS​

A DHCP server can be run on the bridge interface to provide guests with auto IP address configuration. Similarly, a DNS service can be provided to guests.

TODO: dnsmasq

IPv6​

TODO...

Graphics​

TODO...

Audio​

TODO...

USB​

TODO...

PCI Passthrough​

TODO...
It smell like adding nnvm is not a piece of cake and maybe it is better to encourage improvement in Bhyve
I can have a wrong opinion because I am not a FreeBSD core developer, but as I am not an expert, I have to belive that FreeBSD teams do a great job and support them (and thanks them as a FreeBSD user :) ).
If nnvm is a better solution than bhyve, I am sure there is some discussion in 'obscure' mailling list about the opportinity to port nnvm into FreeBSD, no ?
 

bendany

New Member

Reaction score: 4
Messages: 19

Currently, bhyve still lack of some features, as others point out.
  • legacy BIOS support for installing old OSs,
  • improve compatibility (more guests)
  • emulate more devices.
  • improve current emulated devices.
  • more important, a framework to manager VM without extra packages. (vm-bhyve is nice although)
I suggest you could visit reviews.freebsd.org, and use the keyword bhyve to find any interested patches for bhyve, review them, let them merge to FreeBSD base. also fire your own patches/PR. core team and developers are willing review your code and commit them. one day bhyve is more mature and NVMM also more mature, we can port NVMM to FreeBSD at that time.
 

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

Currently, bhyve still lack of some features, as others point out.
  • legacy BIOS support for installing old OSs,
  • improve compatibility (more guests)
  • emulate more devices.
  • improve current emulated devices.
  • more important, a framework to manager VM without extra packages. (vm-bhyve is nice although)
I suggest you could visit reviews.freebsd.org, and use the keyword bhyve to find any interested patches for bhyve, review them, let them merge to FreeBSD base. also fire your own patches/PR. core team and developers are willing review your code and commit them. one day bhyve is more mature and NVMM also more mature, we can port NVMM to FreeBSD at that time.

do you know,if actually qemu-NVMM supports the GPU passthrough of the nvidia graphic cards ? I've planned to install DragonFLyBSD to check it out,even if there I don't see a good support as I've found here. Regarding NetBSD,I can't use it at all,since the two graphic cards I have aren't supported.
 

bendany

New Member

Reaction score: 4
Messages: 19

do you know,if actually qemu-NVMM supports the GPU passthrough of the nvidia graphic cards ? I've planned to install DragonFLyBSD to check it out,even if there I don't see a good support as I've found here. Regarding NetBSD,I can't use it at all,since the two graphic cards I have aren't supported.
Actually, some developers are working on video PCIe passthrough, patches are exists, intel IGD is working, others are on going. license is biggest issue when working with Linux staff.
 

covacat

Aspiring Daemon

Reaction score: 323
Messages: 659

Personally, my problem with bhyve is that it doesn’t support passing raw drives through, in particular, I want to use my BD-ROM drive inside a Linux guest. Bhyve doesn’t support this (you can pass a BD file system, but you cannot pass the raw drive so Linux programs can send SCSI commands to it). I was under the impression that it’s supposed to work with virtio-scsi, but it doesn’t. In theory I could pass the PCI device that holds the controller to which the BD-ROM drive is connected, but I can’t do that because that drive is not the only device on that PCI.

It does work fine with VirtualBox, though, so I’m using that one. The only issue with VirtualBox is that its USB support is rather weak, but I don’t need USB in that case, so it’s not a big deal.
isn't it possible to achieve that with istgt ?
 

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

Actually, some developers are working on video PCIe passthrough, patches are exists, intel IGD is working, others are on going. license is biggest issue when working with Linux staff.

I've found this :

I've sent a msg to the developer,but he never replied. I'm really interested to try it. If u are also interested,we are two and we can start trying to understand how it works. I'm totally new of open bsd,but I want to learn and try.
 

bendany

New Member

Reaction score: 4
Messages: 19

I've found this :

I've sent a msg to the developer,but he never replied. I'm really interested to try it. If u are also interested,we are two and we can start trying to understand how it works. I'm totally new of open bsd,but I want to learn and try.
PCI passthrough is functional on bhyve, LAN adapter, USB adapter, NVMe SSD etc are working fine. while VGA passthrough is more complex, without internal documentation, it is hard to make it working. especially for AMD/NVIDIA cards. The vga rom should be executed to initialize the card. That part involves EFI bootrom and others too.

here is some link you can have a look at


you can have a try.

Personally, I am not familiar with OpenBSD/NetBSD.
 

ziomario

Aspiring Daemon

Reaction score: 45
Messages: 616

man,I know almost well bhyve. I use it everyday. I've even cooperated with two developers and we have been able to enable the pass through for the high quality nvidia graphic cards. I'm becoming a nice expert user of bhyve. Anyway,I'm also looking for alternatives. and after having explored what is offered on the net,I found that only open bsd is enough mature to offer another alternative for the passthrough of the graphic card. At least,from what I'm reading on reddit. Yes,I'm not familiar with OpenBSD too,but In the next future probably I will jump there to learn something new.
 
Top