Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Starting a VM with USB passthrough results in Internal Server Error #108

Closed
AdrianFretwell opened this issue Dec 5, 2018 · 9 comments
Closed

Comments

@AdrianFretwell
Copy link

After attaching a USB device to a VM using the procedure detailed here https://github.com/xcp-ng/xcp/wiki/USB-Pass-Through. I see the following error when trying to start the VM:

[root@ahf-test1 ~]# xe vm-start uuid=03c084c3-6165-25a8-d983-3cd5b11816a0

The server failed to handle your request, due to an internal error.  The given message may give details useful for debugging the problem.
message: xenopsd internal error: Call to usb reset failed: Forkhelpers.Spawn_internal_error("usage: usb_reset.py attach [-h] -d DOMID -p PID [-r RESET_ONLY] device\nusb_reset.py attach: error: argument -r: expected one argument\n", "", _)

It looks like /opt/xensource/libexec/usb_reset.py is being passed the -r argument but no value for it. I assume RESET_ONLY is a constant.

I have found a work around for this but it is not a solution.

I have modified /opt/xensource/libexec/usb_reset.py to add a default for the -r argument if non is supplied:
Before:

    attach.add_argument("-r", dest="reset_only", type=int,
                        help="reset device only, for privileged mode")

After:

    attach.add_argument("-r", dest="reset_only", nargs='?', const=1, type=int,
                        help="reset device only, for privileged mode")

The underlying problem must be with whatever code calls usb_reset.py, but I can't work out where it is called from when a VM with USB is started.

Kind regards,
Adrian.

@olivierlambert
Copy link
Member

Thanks a lot for your feedback!

@stormi
Copy link
Member

stormi commented Dec 21, 2018

For future reference, forum thread about USB passthrough issues: https://xcp-ng.org/forum/topic/266/usb-passthrough-test-reports-in-7-5rc1

@dynodix
Copy link

dynodix commented Feb 25, 2019

Saved my day, altough I m testing USB performance using USB DVBT keys.

@stormi
Copy link
Member

stormi commented Nov 30, 2020

Is this bug still present in XCP-ng 8.2? We could probably contribute a fix upstream if it is.

@jeremfg
Copy link

jeremfg commented Jan 18, 2021

I'm having this issue in XCP-ng 8,2

However, it only happens once I try to pass through a GPU. If I have only USB, all is fine, but as soon as I also attempt to passthrough a PCI-E GPU the USB starts throwing this error. As if this was a combination of both type of passthrough used simultaneously that is causing the issue.

Further account of this behavior (in version 8.1) here => https://forum.level1techs.com/t/xcp-pci-passthrough-usb-passthrough-does-not-work-together/162110

@stormi
Copy link
Member

stormi commented Jan 19, 2021

Thanks for your report. This does not seem to be the same issue as that from the original poster though. Could you open a new one?

@jbmorgado
Copy link

jbmorgado commented Jun 22, 2021

I am still facing the same issue. USB dongle passthrough attempts give this same error. (And I am also passing through a GPU as mentioned)

@stormi
Copy link
Member

stormi commented Aug 9, 2021

Updated packages addressing this issue are available for testing on XCP-ng 8.2: https://xcp-ng.org/forum/post/41480

@stormi
Copy link
Member

stormi commented Dec 8, 2021

The update with the fix is now released to every XCP-ng 8.2 user: https://xcp-ng.org/blog/2021/12/08/december-2021-xcp-ng-updates/

@stormi stormi closed this as completed Dec 8, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants