Hi all,
I am not able to access USB as storage device in the lxc container.
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.
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.
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.
Host OS:
IR800-GOS-1:~# lsusb
Bus 001 Device 003: ID 8644:800b
Bus 001 Device 001: ID 1d6b:0002
Bus 002 Device 001: ID 1d6b:0001
IR800-GOS-1:~#
Lxc app container:
root@ir800-lxc:/mnt/usb# ls -la /dev/bus/usb/001/003
*crwx-*----- 1 root root 189, 2 Feb 3 01:44
/dev/bus/usb/001/003
----------libvirt xml snippet ------------
<hostdev mode='subsystem' type='usb' managed='yes'>
<source>
<vendor id='0x8644'/>
<product id='0x800b'/>
</source>
</hostdev>
-----------------------------
while changing the mode from subsystem to capabilities, it issues error for
validating against the schema.
---------------while changing the hostdev mode='capabilities'----------
virsh # edit n01_1
*error: XML document failed to validate against schema: Unable to validate
doc against /usr/share/libvirt/schemas/domain.rng*
Extra element devices in interleave
Element domain failed to validate content
Failed. Try again? [y,n,i,f,?]:
error: XML document failed to validate against schema: Unable to validate
doc against /usr/share/libvirt/schemas/domain.rng
--------------------------------------------
Regards,
*Ravi*