[lxc-users] Libvirt with containers and passthrough of /dev/uio0

Serge Hallyn serge.hallyn at ubuntu.com
Mon Oct 20 21:51:07 UTC 2014


Quoting Anjali Kulkarni (anjali at juniper.net):
> Hi,
> 
> I am trying to define a container using libvirt, and I need to allow access of the device /dev/uio0 on the host on the container as well. That is, I have the following line in the container config file:
> 
> lxc.mount.entry = /dev/uio0 dev/uio0 none bind,create=file
> lxc.cgroup.devices.allow = c 249:1 rwm
> 
> And I want to add the above via the libvirt XML file for the container.
> 
> I tried something like:
> 
>     <filesystem accessmode="passthrough" type="mount">
>       <source file="/dev/uio0" />
>       <target dir="/dev/uio0" />
>     </filesystem>
> 
> But it gave me error:
> 
> root# virsh -c lxc:/// define lxc_v.xml
> error: Failed to define domain from lxc_v.xml
> error: missing source information for device /dev/uio0
> 
> Can someone pls help, how I can add the /dev/uio0 to the xml file?

Look under 'block / character devices' at 54% into
http://libvirt.org/formatdomain.html .

If that doesn't work you'll need to go to the libvirt mailing list, but
the page suggests it should work.

-serge


More information about the lxc-users mailing list