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

Open
AdrianFretwell opened this issue Dec 5, 2018 · 3 comments

Comments

@AdrianFretwell
Copy link

commented Dec 5, 2018

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

This comment has been minimized.

Copy link
Member

commented Dec 5, 2018

Thanks a lot for your feedback!

@stormi

This comment has been minimized.

Copy link
Member

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

This comment has been minimized.

Copy link

commented Feb 25, 2019

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.