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

    Weird XAPI service looping (GPU passthrough)

    Scheduled Pinned Locked Moved Solved XCP-ng
    3 Posts 2 Posters 25 Views 2 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.
    • T Offline
      TITUS MAXIMUS
      last edited by

      I have been trying to pass through my GPU on XCPNG 8.3 for a while now. When I have my nvidia GPU installed the XAPI crashes and constantly tries to start over and over. When I don't have the GPU connected the XAPI service runs fine. I do have IOMMU and virtualization enabled.

      XAPI Logs:

      ct  1 20:09:21 xcp-ng-01 message-switch[2733]: main: [ info|message-switch] Session xapi:15696 cleaning up
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [error||0 ||forkexecd] execve failed: Unix.Unix_error(Unix.ENOEXEC, "execve", "/opt/xensource/libexec/xen-cmdline")
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.616Z||2731|About to bind to /var//run/nonpersistent/forkexecd//fd_8db15b9d-6f4d-2fe6-823c-ff710db962b0\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.616Z||2731|bound, listening\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.620Z||17064|Child here!\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.625Z||17065|Grandchild here!\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.625Z||17065|Started: state.cmdargs = [/opt/xensource/libexec/xen-cmdline;--get-dom0;xen-pciback.hide]\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.625Z||17065|Started: state.env = [PATH=/sbin:/usr/sbin:/bin:/usr/bin]\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.626Z||17065|Selecting in handle_comms_no_fd_sock2\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Done\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|fd sock\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Selecting in handle_comms_with_fd_sock2\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Done\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|fd sock2\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Received fd named: 4207af65-3d99-3f64-4464-86cf6c96672e - duping to 1 (from 8)\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Selecting in handle_comms_with_fd_sock2\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Done\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|fd sock2\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Received fd named: 4a8a3659-34d4-1763-11a6-9296cc393b61 - duping to 2 (from 8)\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.627Z||17065|Selecting in handle_comms_with_fd_sock2\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.628Z||17065|Done\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.628Z||17065|comms sock\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.628Z||17065|Exec\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.628Z||17065|Finished...\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.628Z||17065|Args after replacement = [/opt/xensource/libexec/xen-cmdline;--get-dom0;xen-pciback.hide]\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.628Z||17065|I've received the following fds: [2;1]\x0A\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [ warn||0 ||forkexecd] 20251002T01:09:24.653Z||17066|Caught unexpected exception: Unix.Unix_error(Unix.ENOEXEC, "execve", "/opt/xensource/libexec/xen-cmdline")\x0A
      Oct  1 20:09:24 xcp-ng-01 forkexecd: [error||0 ||forkexecd] 17066 (/opt/xensource/libexec/xen-cmdline --get-dom0 xen-pciback.hide) exited with code 126
      Oct  1 20:09:24 xcp-ng-01 systemd[1]: xapi.service: main process exited, code=exited, status=2/INVALIDARGUMENT
      Oct  1 20:09:24 xcp-ng-01 xapi-init[17069]: Stopping xapi: [  OK  ]
      Oct  1 20:09:24 xcp-ng-01 systemd[1]: Unit xapi.service entered failed state.
      Oct  1 20:09:24 xcp-ng-01 systemd[1]: xapi.service failed.
      Oct  1 20:09:25 xcp-ng-01 systemd[1]: xapi.service holdoff time over, scheduling restart.
      Oct  1 20:09:25 xcp-ng-01 systemd[1]: Cannot add dependency job for unit lvm2-activation.service, ignoring: Unit is masked.
      Oct  1 20:09:25 xcp-ng-01 systemd[1]: Cannot add dependency job for unit lvm2-activation-early.service, ignoring: Unit is masked.
      
      1 Reply Last reply Reply Quote 0
      • T Offline
        TITUS MAXIMUS
        last edited by

        I don't even know how this is possible but for some reason the xen-cmdline file was empty. I've never touched that file. But I did have another xcpng pool that I checked its xen-cmdline and copied it to my other pool and restarted the XAPI service and BAM! passthrough is working.

        1 Reply Last reply Reply Quote 3
        • olivierlambertO olivierlambert marked this topic as a question
        • olivierlambertO olivierlambert has marked this topic as solved
        • olivierlambertO Online
          olivierlambert Vates 🪐 Co-Founder CEO
          last edited by

          Maybe a bad command that overwrote the file, anyway glad you managed to make it work!

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