<div dir="ltr"><div><div>Hi all,<br><br></div>I am not able to access USB as storage device in the lxc container.<br></div><div>Having tried to pass the usb device with the product and vendor id, not able to see the device mounted in the lxc file system.<br><br></div><div>However, they are seen as char devices in the container at the location. There is no issue of ACL, as the capabilities restrictions have been dropped.<br><br></div><div>Has anyone successfully mounted the storage device in the libvirt.  Having gone through the libvirt documentation, couldnt find further information of enabling the usb as storage device.  Any pointers towards that would be useful.<br><br></div><div><br></div><div>Host OS:<br><br><div style="margin-left:40px">IR800-GOS-1:~# lsusb<br>Bus 001 Device 003: ID 8644:800b<br>Bus 001 Device 001: ID 1d6b:0002<br>Bus 002 Device 001: ID 1d6b:0001<br>IR800-GOS-1:~# <br></div><br></div><div>Lxc app container:<br><br><div style="margin-left:40px">root@ir800-lxc:/mnt/usb# ls -la  /dev/bus/usb/001/003 <br><b>crwx-</b>-----    1 root     root      189,   2 Feb  3 01:44 /dev/bus/usb/001/003<br><br></div></div><div><br><br></div>----------libvirt xml snippet ------------<br><br><div>    <hostdev mode='subsystem' type='usb' managed='yes'><br>      <source>                                        <br>        <vendor id='0x8644'/>                   <br>        <product id='0x800b'/>                                  <br>      </source>               <br>    </hostdev>         <br><br>-----------------------------<br></div><div>while changing the mode from subsystem to capabilities, it issues error for validating against the schema.<br><br></div><div><div><div>---------------while changing the hostdev mode='capabilities'----------<br><br></div><div>virsh # edit n01_1<br><b>error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng</b><br>Extra element devices in interleave<br>Element domain failed to validate content<br><br>Failed. Try again? [y,n,i,f,?]: <br>error: XML document failed to validate against schema: Unable to validate doc against /usr/share/libvirt/schemas/domain.rng<br><br>--------------------------------------------<br><br><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><font face="georgia, serif" color="#444444"><span style="font-family:arial,helvetica,sans-serif">Regards,</span></font><font face="georgia, serif" color="#444444"><font face="georgia, serif" color="#444444"><i><b><br></b></i></font><i><b>Ravi</b></i></font><br><font size="1"><span style="font-family:tahoma,sans-serif"><span style="color:rgb(0,0,153)"></span></span></font></div></div></div>
</div></div></div></div>