Skip to contentSkip to conversation

host PCI (-X) device assigned to a container

DISCUSSION Mihamina Rakotomandimby 2 participants 2 messages Oct 14, 2010 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Manao ahoana, Hello, Bonjour,

I would like to directly use a PCI device from a caontainer. For example, this one:
http://www.sangoma.com/products/hardware_products/transcoding/overview.html

I saw that using libvirt I can do it
(http://libvirt.org/formatdomain.html#elementsUSB), but how to do it in "lxc.conf"?
I suppose (not really sure) that using "lxc.cgroup.devices.allow" is a tip, but once the PCI device plugged, how to guess the numbers & letters to set up?

Misaotra, Thanks, Merci.

Signature · 3 lines
       Architecte Informatique chez Blueline/Gulfsat:
    Administration Systeme, Recherche & Developpement
                                    +261 34 56 000 19
#2 lore raw
In reply to a message not in the archive

14.10.2010 14:24, Mihamina Rakotomandimby пишет:

Quoted 3 lines

I suppose (not really sure) that using "lxc.cgroup.devices.allow" is a tip, but once the PCI device plugged, how to guess the numbers & letters to set up?

You could setup udev on host system to launch scripts to place the relevant device files into some directory and configure a bind-mount of that directory to /dev within the container's mount namespace. Container's devices.allow should also be managed by udev scripts on host system. And device unplugging events should trigger some udev script to perform reverse actions.
_______________________________________________
Containers mailing list [email protected]
https://lists.linux-foundation.org/mailman/listinfo/containers