Weird XAPI service looping (GPU passthrough)
-
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. -
I don't even know how this is possible but for some reason the
xen-cmdlinefile was empty. I've never touched that file. But I did have another xcpng pool that I checked itsxen-cmdlineand copied it to my other pool and restarted the XAPI service and BAM! passthrough is working. -
O olivierlambert marked this topic as a question on
-
O olivierlambert has marked this topic as solved on
-
Maybe a bad command that overwrote the file, anyway glad you managed to make it work!
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login