XCP-ng
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    GPU Passthrough

    Scheduled Pinned Locked Moved Management
    16 Posts 2 Posters 172 Views 1 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • tjkreidlT Offline
      tjkreidl Ambassador @gb.123
      last edited by

      @gb.123 Ah, OK. then the more powerful GP is the RTX4060, right? If so, use it for the passthrough. Also, on some CPUs you have to do a BIOS setting to allow this to work, because of memory limitations, but only on probably much older systems, if I recall correctly.

      G 1 Reply Last reply Reply Quote 0
      • G Offline
        gb.123 @tjkreidl
        last edited by

        @tjkreidl

        Still struggling to make it work. Simple passthrough is 'hanging' the VM and the VM gets stuck at splash screen.

        Trying to figure out what to do

        Do you know if I need to put the card in attach pci or just select it in the gpu section or both ?

        tjkreidlT 1 Reply Last reply Reply Quote 0
        • tjkreidlT Offline
          tjkreidl Ambassador @gb.123
          last edited by tjkreidl

          @gb.123 YOu are trying to do passthrough to a specific VM? I don't think that used to be supported, but maybe is now.
          Are NVIDIA drivers installed on the VM, as needed?
          Sorry, it's been a while since doing this so I'm digging back into my memory.
          Also, is IOMMU supported and enabled in the BIOS?
          Also, check this out and see if it may be of some help:
          https://www.youtube.com/watch?v=_JPmxmxqhds

          G 1 Reply Last reply Reply Quote 0
          • G Offline
            gb.123
            last edited by

            @olivierlambert

            Can you please confirm if I need to attach PCI AND select the GPU in the upper section or either should work ?

            tjkreidlT 1 Reply Last reply Reply Quote 0
            • tjkreidlT Offline
              tjkreidl Ambassador @gb.123
              last edited by tjkreidl

              @gb.123 You need to do both. After adding the PCI device, you might also need to specifically enable "passthrough" for that device within the VM's settings. It may do it automatically when you add it.
              Make sure the appropriate NVIDIA driver is also installed on the the VM.

              G 1 Reply Last reply Reply Quote 0
              • G Offline
                gb.123 @tjkreidl
                last edited by

                @tjkreidl

                You are trying to do passthrough to a specific VM? I don't think that used to be supported, but maybe is now.

                Yes. 1 Card -> 1 VM. Nvidia opened the passthrough lock in 2021. (Before that it was locked)

                Are NVIDIA drivers installed on the VM, as needed?

                I am installing them(tried the open one), but they are causing issues.

                Also, is IOMMU supported and enabled in the BIOS?

                Yes

                1 Reply Last reply Reply Quote 0
                • G Offline
                  gb.123 @tjkreidl
                  last edited by

                  @tjkreidl said in GPU Passthrough:

                  After adding the PCI device, you might also need to specifically enable "passthrough" for that device within the VM's settings. It may do it automatically when you add it.

                  This is one of my confusions. It is not automatically adding it. Whether I should select it or leave it blank is the confusion.

                  1 Reply Last reply Reply Quote 0
                  • G Offline
                    gb.123
                    last edited by

                    @tjkreidl

                    Once I install graphics drivers (nvidia) and allow pci passthrough of the graphics card, i get:

                    NVRM: cpuidInfoAMD Unrecognised AMD processor in cpuInfoAMD
                    

                    and the VM refuses to boot

                    If I remove the drivers or detach the card, then the VM boots

                    tjkreidlT 1 Reply Last reply Reply Quote 0
                    • tjkreidlT Offline
                      tjkreidl Ambassador @gb.123
                      last edited by

                      @gb.123 Are you sure you have the correct drivers installed? Also, check if the GPU is compatible with AMD CPUs -- I only had Intel CPUs, so am not sure if that's an issue or not.

                      G 1 Reply Last reply Reply Quote 0
                      • G Offline
                        gb.123 @tjkreidl
                        last edited by

                        @tjkreidl

                        Thanks so much for your response !
                        I agree with you that the drivers may be a problem. I am starting again from scratch and re-installing everything.
                        Though a question does remain that whether we need to use both options (Attach PCI + GPU Selection) or either option for GPU pass through. Maybe someone in @vates-tech-support can clarify exactly what the option in Xen Orchestra means.

                        From what I know, the GPU option in the upper menu wasn't there a few version before. Seems to be a new entry.

                        tjkreidlT 1 Reply Last reply Reply Quote 0
                        • tjkreidlT Offline
                          tjkreidl Ambassador @gb.123
                          last edited by

                          @gb.123 I'm sure you can also find some NVIDIA "hoe to" guides that might be helpful. As mentioned before, I've only done server passthrough so that all VMs would get access,
                          so sorry I can't provide more specifics. You can always try with one or the other option and add the other if it still doesn't work. I'm pretty sure, though, that you do need both enabled.
                          Keep us posted!

                          G 1 Reply Last reply Reply Quote 0
                          • G Offline
                            gb.123 @tjkreidl
                            last edited by

                            @tjkreidl
                            Thanks once again for your help and guidance!
                            I have seen/read many 'how to' videos/docs. The problem was not the method I was using. I managed to get this working albeit there is a bug in XCG-ng I suppose.

                            1. If USB Keyboard & Mouse is passed-through along-with GPU:
                              The GPU gets stuck in D3 state (Classic GPU reset problem)

                            2. If no vUSB is passed but GPU is passed through:
                              The GPU works correctly and resets correctly

                            tjkreidlT 1 Reply Last reply Reply Quote 0
                            • tjkreidlT Offline
                              tjkreidl Ambassador @gb.123
                              last edited by

                              @gb.123 Interesting -- alert the XCP-ng team to take a closer look, if they haven't seen this already.

                              1 Reply Last reply Reply Quote 0
                              • First post
                                Last post