Antsle Forum

Welcome to our Antsle community! This forum is to connect all Antsle users to post experiences, make user-generated content available for the entire community and more. 

Please note: This forum is about discussing one specific issue at a time. No generalizations. No judgments. Please check the Forum Rules before posting. If you have specific questions about your Antsle and expect a response from our team directly, please continue to use the appropriate channels (email: [email protected]) so every inquiry is tracked. 

Forum breadcrumbs - You are here:ForumGeneral: GeneralRe-mapping pass-thru USB
Please or Register to create posts and topics.

Re-mapping pass-thru USB

Team.

When a lsusb device number changes, maybe a power cycle, unplug, or whatever causes this, if you have had the USB pass-thru enabled for the device there is seemingly no way to remove it.  I think it's a configuration file issue or something that can be corrected with virsh but that is unclear.

Even though the new device number is then listed in antMan you can't use it, it seems, because the old mapping persists.  This is the problem that I had.  I had an original device number of 0049, something I'm not sure what, caused that to change and I got an error when trying to start the antlet that the device didn't exist.  When I went to look at the listing it wasn't there to be removed from the listing of USB devices because it simply no longer existed.  I tried to select the new device number but that triggered a similar error about the old device number.

I dug around and found the old mapping in a QEMU XML file but changing it there didn't work either, not even removing that device altogether worked.

What is a method for either re-mapping or removing a USB pass-thru device when this type of issue occurs?  Thanks in advance.

Hi infobro:

Yes, we've seen this behavior before and we have created bug ticket for the issue.

In the meantime, you can reset the USB pass-through by editing the antlet's XML by using these commands:

For KVM antlets:
virsh edit antlet_name

For LXC antlets:
vc edit antlet_name

Remove the contents between <host dev...> and </hostdev>.

Here's an example of mine:
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<address bus='2' device='2'/>
</source>
</hostdev>
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<address bus='1' device='3'/>
</source>
</hostdev>

lancem has reacted to this post.
lancem

Daniel,

Thanks.  That's the goto move now, to be clear though, I had to remove that entire XML element <hostdev></hostdev> or I got a validation failure for the edit.  Thanks a bunch for that one.

Hi infobro,

Glad to hear that it was working for you.

Yes, I've had to use that edit on my antlets when having trouble with USB pass through.

infobro has reacted to this post.
infobro