https://www.cyberus-technology.de/products/hypervisor (Don't mind the English, we are not native speakers. :)
We used to have support for Intel GVT-g GPU virtualization as well, which was more of a software solution. This doesn't work with modern Intel GPUs anymore.
I am surprised the open source community has not built better gui tools, and no project, closed or open has made configuring pcie passthrough easy.
I have always wanted to be able to run Windows in a virtualized session with my GPU for gaming, and use my onboard APU for the Linux host, but the configuration is daunting, and many of the games I play today don’t work on linux thanks to anticheat or DRM.
This is the thing that isn't surprising.
In order to make a better GUI tool, you have to understand how the internals work. Then you don't care to use a GUI tool because you know how to use the command line or edit the configuration files. The people who want better GUI tools are the people who don't know how to make them.
In order to change this, the people who want GUI tools but don't know how to make them have to provide some incentive (typically money) to the people who know how to make them but don't want them, e.g. via donations or some kind of commercial agreement. And if they stand around and wonder why nobody else has fixed their problem for them instead of doing the thing that causes it to be fixed, an object at rest tends to remain at rest.
"GPU passthrough with libvirt qemu kvm" https://wiki.gentoo.org/wiki/GPU_passthrough_with_libvirt_qe...
"PCI passthrough via OVMF" https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF :
> The Open Virtual Machine Firmware (OVMF) is a project to enable UEFI support for virtual machines. Starting with Linux 3.9 and recent versions of QEMU, it is now possible to passthrough a graphics card, offering the virtual machine native graphics performance which is useful for graphic-intensive tasks
KVM-GPU-Passthrough: https://github.com/BigAnteater/KVM-GPU-Passthrough
Not saying I prefer one or the other, but it's worth bearing in mind where "the bar" is
E.g. virt-manager is built with glade XML and Python:
virt-manager/virt-manager//ui/createvm.ui: https://github.com/virt-manager/virt-manager/blob/main/ui/cr...
virt-manager/virt-manager//ui/gfxdetails.ui: https://github.com/virt-manager/virt-manager/blob/main/ui/gf...
virt-manager/virt-manager//ui/hoststorage.ui: https://github.com/virt-manager/virt-manager/blob/main/ui/ho...
virtManager/createvm.py: https://github.com/virt-manager/virt-manager/blob/main/virtM...
virtManager/device/addstorage.py: https://github.com/virt-manager/virt-manager/blob/main/virtM...
virtManager/device/gfxdetails.py: https://github.com/virt-manager/virt-manager/blob/main/virtM...
virtManager/addhardware.py:
DeviceController.TYPE_PCI
def populate_controller_model_combo(combo, controller_type):
https://github.com/virt-manager/virt-manager/blob/135cf17072... https://github.com/virt-manager/virt-manager/blob/135cf17072... for d in /sys/kernel/iommu_groups/*/devices/*; do
n=${d#*/iommu_groups/*}; n=${n%%/*}
printf 'IOMMU Group %s ' "$n"
lspci -nns "${d##*/}"
done;
iommu.sh gist:
https://gist.github.com/Roliga/d81418b0a55ca7682227d57af2778...iommu_groups.sh: https://github.com/drewmullen/pci-passthrough-ryzen/blob/mas... :
lspci -nns "${d##*/}"
"PCI passthrough via OVMF > 2. Setting up IOMMU > 2.2 Ensuring that the groups are valid": https://wiki.archlinux.org/title/PCI_passthrough_via_OVMF#En... :> An IOMMU group is the smallest set of physical devices that can be passed to a virtual machine. For instance, in the example above, both the GPU in 06:00.0 and its audio controller in 6:00.1 belong to IOMMU group 13 and can only be passed together. The frontal USB controller, however, has its own group (group 2) which is separate from both the USB expansion controller (group 10) and the rear USB controller (group 4), meaning that any of them could be passed to a virtual machine without affecting the others.
"Exporting your ROM": https://github.com/BigAnteater/KVM-GPU-Passthrough?tab=readm... :
lspci -vnn
find /sys/devices -name rom
# PATH_TO_ROM=
echo 1 > $PATH_TO_ROM
mkdir -p /var/lib/libvirt/vbios/
cat $PATH_TO_ROM >
/var/lib/libvirt/vbios/gpu.rom
echo 0 > $PATH_TO_ROM
"Attaching the GPU" [with `virsh`] https://clayfreeman.github.io/gpu-passthrough/#attaching-the... : <hostdev mode='subsystem' type='pci' managed='yes'>
<rom file='/path/to/gpu-dump.rom'/>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x0'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='pci' managed='yes'>
<source>
<address domain='0x0000' bus='0x01' slot='0x00' function='0x1'/>
</source>
</hostdev>
"Adding your GPU and USB devices to the VM" [with `virt-manager`]:
https://github.com/BigAnteater/KVM-GPU-Passthrough?tab=readm...> 1. Add every PCI device which has to do with your graphics card to the VM.
It’s basically the opposite for both. I use virt-manager because the GUI is simpler (and setting up virtualbox is a nightmare anyway).
Regardless, this feature is a step in the right direction. I’m wondering if distributions will pick it up or if it will ever be integrated upstream.
$ virsh net-dumpxml default6
<network>
<name>default6</name>
<uuid>73590ea2-eb15-4e67-b104-319721bdf302</uuid>
<forward mode='route'/>
<bridge name='virbr1' stp='on' delay='0'/>
<mac address='52:54:00:ff:a7:2d'/>
<domain name='default6'/>
<ip family='ipv6' address='2001:db8:ffff::1' prefix='48'>
</ip>
</network>
One can also use DHCPv6 if required.I'd be curious to hear the specific reasoning behind it.
virt-manager v4.0.0 (Ubuntu 22.04 amd64)
"QEMU/KVM" > "Details" (via double-click or context menu) > "Virtual Networks" tab > "+" (Add) button > "Create Virtual Network"/"Details" tab > Expand "IPv6 configuration" > check "Enable IPv6" > enter "Network" prefix and/or check "Enable DHCPv6" > enter "Start" and "End" addresses
I'm honestly surprised there aren't more alternatives. Especially since SPICE has gstreamer instegration. Gstreamer can natively do webrtc video and data back channel. Someone could hack together a webrtc broweser-based VM viewer and I suspect there's a lot of interest, potentially money making things you could crate.
Every time I need to run a virtual machine, I choose libvirt because it's more performant and easy to deal with than Virtualbox (no kernel module, etc.), but the GUI choices are pretty terrible. The "best" libvirt GUI is virt-manager and it's very, very buggy and lacking features (i.e. doesn't play nice with HiDPI screens, no way of configuring IPv6, etc.)
Many times I have caved and chosen VirtualBox simply because at least it feels nice to use, even if not as performant as libvirt/kvm. Not anymore!