OMV6 - KVM GPU passthrough. How to?

  • Hi folks,

    I'm running OMV6 with KVM. I have a Lubuntu 22.04 VM running nicely, but want to use the PC's GPU to display the VM GUI. I have a Gigabyte Z370 Motherboard with an i5-8600 plus an Nvidia GT710 GPU, so effectively have two graphics options - onboard and the Nvidia. I'd like to be able to configure the system so that the VM video went to one GPU and the OMV terminal screen was on the other.

    How would I go about configuring this? I haven't been able to find a good guide/instructions.

    (If I have posted this in the wrong section of the forum - sorry. Please let me know where I should have put this. Thanks)

    Ken

    • Offizieller Beitrag

    I would use Virtual Machine Manager to add the pci device to the VM or follow one of these guides. I understand that they aren't specific to OMV but they don't really need to be. And not all steps will need to be done.


    https://www.heiko-sieger.info/…kvm-with-vga-passthrough/

    https://mathiashueber.com/wind…e-gpu-passthrough-ubuntu/

    https://drakeor.com/2022/02/16/kvm-gpu-passthrough-tutorial/

    https://askubuntu.com/question…2-04-gpu-passthrough-qemu

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

  • Sorry if I resume this discussion, have you found a solution? I ask you because I would like to switch from Proxmo + OMV in VM to OMV + KVM, since I have no big claims for virtualition otherwise only occasionally some tests of some linux distros

  • Hi mira67 , yes I got it going and it was useful for a time.


    The instructions from Aaron ( ryecoaaron) helped to point me in the right direction, and from there I did quite a lot of trial and error to make the system work well. Making the changes to add IOMMU to GRUB was vital and disabling the default NVIDIA and Neveau drivers important, but I also found a useful extra step which took a little bit of experimenting. On the same LAN, (my home network) I installed a Ubuntu VM on my iMac, installed VMM (Virtual Machine Manager) on that, and using that I was remotely able to log into my OMV server and control the assigning of PCI express and USB resources on the OMV machine. It was easier and more reliable to make the changes that way than I was able to manage by editing the KVM config file through the OMV's own KVM management screens.


    I tried a bunch of combinations with different virtualized Linux distros (Ubuntu, Pop_OS!, elementary OS etc), and they were good, but not exactly how I wanted to work. I also tried Proxmox with OMV on top - and I also tried OMV with Proxmox kernel and am currently settled on OMV on bare metal with ZFS using the standard Linux kernels and no VMs utilizing the GPU passthrough on the server. Instead I decided to use a separate raspberry pi 4 with a screen and keyboard to play audio and browse and operate as a terminal.


    For the "passthrough solution", it ended up that my biggest difficulty wasn't passing the video through to the NVIDIA graphics card, but it was the audio. I was using a USB sound card (Behringer UCA 222) and no matter what sound engine (pulse or pipewire) I used on the VM, the sound passing from the guest through the host was really fickle and completely messed up after distro updates (after I had extensively tweaked bitrates and the like) - so I gave up. It seems that there's no way to prioritize the sending of the audio packets over the USB, so it becomes very broken and distorted as other things assume priority.


    Given the nature of OMV being based on Debian, I almost came to the conclusion that a simpler method (and better for the kind of solution I was trying to build) would have been to install a Debian based desktop distro with a good hypervisor kernel and run OMV as a virtualized system on that. Even better would be if the OMV functions could be installed directly into the Debian or Ubuntu desktop as an "OMV server app"... but that would open another "Pandora's box of worms" altogether. ;)

    • Offizieller Beitrag

    I was remotely able to log into my OMV server and control the assigning of PCI express and USB resources on the OMV machine. It was easier and more reliable to make the changes that way than I was able to manage by editing the KVM config file through the OMV's own KVM management screens.

    While use the vm manager as well, I fail to see how it is easier or more reliable. I have made sure that for usb, the kvm plugin and the vm manager are creating the same xml. And the kvm plugin doesn't do pci passthrough. So please explain more on why you think this.

    Given the nature of OMV being based on Debian, I almost came to the conclusion that a simpler method (and better for the kind of solution I was trying to build) would have been to install a Debian based desktop distro with a good hypervisor kernel and run OMV as a virtualized system on that. Even better would be if the OMV functions could be installed directly into the Debian or Ubuntu desktop as an "OMV server app"... but that would open another "Pandora's box of worms" altogether

    OMV is meant to be a server. A VM with a gpu passed through so you can still "sit" at the box and use it like a desktop doesn't make sense to me. Are you trying to avoid having two machines? Or do you not want to use rdp from the RPi? Even with VMware, what you are trying to accomplish is very difficult and not worth the pain.

    omv 7.1.0-2 sandworm | 64 bit | 6.8 proxmox kernel

    plugins :: omvextrasorg 7.0 | kvm 7.0.13 | compose 7.2 | k8s 7.1.0-3 | cputemp 7.0.1 | mergerfs 7.0.5 | scripts 7.0.1


    omv-extras.org plugins source code and issue tracker - github - changelogs


    Please try ctrl-shift-R and read this before posting a question.

    Please put your OMV system details in your signature.
    Please don't PM for support... Too many PMs!

Jetzt mitmachen!

Sie haben noch kein Benutzerkonto auf unserer Seite? Registrieren Sie sich kostenlos und nehmen Sie an unserer Community teil!