qemu qemu PCI passthrough

While not bsd specific, I've got an issue I'm trying to solve. I used to use vbox years ago but became disenchanted by the very fragile xml metatdata overhead for managing guest instances, and the oracle forum tech support folks just made me even more annoyed.

So anyways, years ago I switched over to using qemu with the kvm module to virtualize a bunch of environments in my workstations and servers. I quickly became a staunch critic of libvirt, being suspicious of it, and seeing it as the same type hype/fluff that caused a lot of my issues with vbox. I perceive it as unnecessary bloat and complexity, when all I want to do it fire up a guest and access it via console or spice client.

I've recently been toying with the idea of replacing my very old ARM WIFI access point openWRT network firewall, and may implement my bastion host as a qemu VM on a server I have. To do this I want to do PCI passthrough of two dedicated ethernet ports to the guest so as not to contaminate them with general server traffic of the host. All the docs I can find online strongly push ya toward libvirt to do any sort of PCI passthrough. As stated previously, I don't want to use libvirt, but I'd prefer not to have to "emulate" ethernet NICs in the qemu environment either. Given the lousy state of qemu documentation, does anyone know authoritatively if I can do the passthrough without using libvirt, and if so, what does the qemu startup command look like WRT net devices?
 
Agreed. libvirt is unnecessary and annoying when looking for docs on correct Qemu usage.

One approach I would suggest if the docs are crap is to temporarily use libvirt to output the native qemu command evocation for future. Something like:

$ virsh domxml-to-native qemu-argv --domain vmname
 
I think you need IOMMU on host to pass thru PCI ?

PCI passthru on virsh seemed to be quite a pain. I gave up early.

Recently I chose to use bhyve to host OpenWRT VM on a Denverton Lanner mini server I built. I passed thru the Wifi Radio that was unsupported on FreeBSD.
It work great. AsiaRF AW7915-NPD Wifi6 with hostapd Access Point on 2.4 and 5GHZ simultaneously.
Installed luci-ssl because I like the pretty graphs it spits out.

No special grub stuff I just used the x86-64 EFI ext4 OpenWRT snapshot image and pointed bhyve to it.
 
yup...when I found that I'd have to do qemu e1000 emulated NICs I kind of shelved the project but was curious what the grey matter on this forum had to say. I had forgotten about the IOMMU req until mentioned above, and that negates my target server anyways since it is an older mobo.
 
Back
Top