<html><head><meta http-equiv="content-type" content="text/html; charset=GB2312"><style>body { line-height: 1.5; }body { font-size: 14px; font-family: 'Microsoft YaHei UI'; color: rgb(0, 0, 0); line-height: 1.5; }</style></head><body>
<div><span></span>Sometimes, qemu cannot find correct usb device number</div><div>Reproduce steps:</div><div>1¡¢lsusb</div><div>Bus 001 Device 011: ID 090c:<span style="line-height: 1.5; background-color: transparent;">1000</span></div><div>1¡¢prepare usb device attach xml</div><div><hostdev managed="yes" mode="subsystem" type="usb"></div><div><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span><source></div><div><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span><span style="line-height: 1.5; background-color: transparent;"><vendor id="0x090c" /></span></div><div><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span><span style="line-height: 1.5; background-color: transparent;"><product id="0x1000" /></span></div><div><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span><span style="line-height: 1.5; background-color: transparent;"><</span><span style="line-height: 1.5; background-color: transparent;">address bus='001' device='011'/></span></div><div><span style="color: rgb(0, 0, 0); line-height: 1.5; background-color: rgba(0, 0, 0, 0);">    </span></source><address bus="1" port="1" type="usb" /></div><div></hostdev></div>
<div>2¡¢virsh attach-device vm usb.xml</div><div>error: internal error: Did not find USB device 090c:1000 bus:1 device 9</div><div><br></div><div>Question:</div><div>why the device number returned in qemu's error report is not what I wrote in xml£¬</div><div>what I mean is that if my dev number is really wrong, the returned error should also be the number I wrote£¬</div><div>commonly when using dongle</div><div><br></div><div>Look forward to your reply</div><hr style="width: 210px; height: 1px;" color="#b5c4df" size="1" align="left">
<div><span><div style="MARGIN: 10px; FONT-FAMILY: verdana; FONT-SIZE: 10pt"><div>yaohua.wu</div></div></span></div>
</body></html>