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

    Set passthrough GPU as a primary graphics card for a VM

    Scheduled Pinned Locked Moved Compute
    18 Posts 6 Posters 1.0k Views 6 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.
    • A Online
      acebmxer
      last edited by

      I was able to get nvidia rtx 4070 passed through to a windows VM and Ubuntu server. Need to make sure you passing all the devices associated with the GPU, specifically the Audio controller on the GPU.

      These were on AMD systems.

      K 1 Reply Last reply Reply Quote 0
      • M Offline
        miltador
        last edited by

        Good to see some successes here, no luck for me with Intel N100 iGPU though 😕
        Both Linux and Windows.

        1 Reply Last reply Reply Quote 0
        • K Offline
          kubuntu-newbie @acebmxer
          last edited by

          @acebmxer in my case it appears to be a Wayland issue, using the wrong card. I was hoping that I could disable virtual gpu all together

          curious though that disabling virtual GPU just changes the device id in the vm from 1234:1111 to "cirrus" - that seems to be a bug in XCP-ng

          A 1 Reply Last reply Reply Quote 0
          • A Online
            acebmxer @kubuntu-newbie
            last edited by

            @kubuntu-newbie

            Yeah i didnt do anything with disabling the vgpu. Just a standard Win 11 or ubuntu VM and attached the nivdia gpu.

            1 Reply Last reply Reply Quote 0
            • olivierlambertO Offline
              olivierlambert Vates 🪐 Co-Founder CEO
              last edited by

              IIRC, Intel iGPU is very different than a discrete GPU from a system perspective, that might explain your problem.

              K 2 Replies Last reply Reply Quote 0
              • K Offline
                kubuntu-newbie @olivierlambert
                last edited by

                @olivierlambert
                it is still not clear to me how changing vga: std to vga: cirrus in platform parameter of a vm constitute turning off vga (this is what happens when you turn off vga in Xen Orchestra)

                manually setting vga to off in platform produces the same result as vga: cirrus, VM still sees "VGA compatible controller [0300]: Cirrus Logic GD 5446 [1013:00b8]"

                is there a way to completely turn off creating this virtual VGA in the VM?

                1 Reply Last reply Reply Quote 0
                • K Offline
                  kubuntu-newbie @olivierlambert
                  last edited by

                  @olivierlambert

                  and removing key vga from platform all together has the same result as switching to cirrus, there is still a virtual vga Cirrus Logic in the VM

                  1 Reply Last reply Reply Quote 0
                  • olivierlambertO Offline
                    olivierlambert Vates 🪐 Co-Founder CEO
                    last edited by

                    Because it's the default you cannot bypass. @Team-XAPI-Network could confirm

                    K 1 Reply Last reply Reply Quote 0
                    • K Offline
                      kubuntu-newbie @olivierlambert
                      last edited by

                      @olivierlambert

                      thank you! I did a little digging, but I could be looking at the wrong place, according to:

                      https://github.com/xcp-ng/qemu-dp/blob/master/qemu-options.hx

                      there is an option vga: none

                      DEF("vga", HAS_ARG, QEMU_OPTION_vga,
                      "-vga [std|cirrus|vmware|qxl|xenfb|tcx|cg3|virtio|none]\n"
                      " select video card type\n", QEMU_ARCH_ALL)
                      SRST
                      -vga type
                      ...
                      none
                      Disable VGA card.

                      I tried setting this manually via "xe vm-param-set platform:vga=none " and I still get Cirrus PCI device created in the VM

                      Is there something else that needs to be done to have no virtual VGA in the VM at all?

                      psafontP 1 Reply Last reply Reply Quote 0
                      • psafontP Offline
                        psafont Vates 🪐 XAPI & Network Team @kubuntu-newbie
                        last edited by psafont

                        @kubuntu-newbie I've looked at the code. The intel passthrough seems to not care about the value of the vga key in platform, and instead it expects the key igd_passthrough to be set to true.

                        https://github.com/xapi-project/xen-api/blob/9eb5f9f9f3c742c0c0b691098e1dafc02e40c856/ocaml/xapi/xapi_xenops.ml#L390

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