[lxc-users] Adding a host block device to a container
Serge Hallyn
serge.hallyn at ubuntu.com
Tue Sep 1 14:25:17 UTC 2015
Quoting Peter Steele (pwsteele at gmail.com):
> On 08/31/2015 08:41 PM, Fajar A. Nugraha wrote:
> >Nope. lxc.cgroup allows you to create and access the block device,
> >but you still need to create the device node yourself.
> Fair enough. Then I guess I'll use mknod...
FWIW there is a lxc-device command that will do the mknod for you,
but it won't be persistent (iirc). Support for making that
persistent would be welcome. I think that would come in three small
pieces:
. have src/lxc/lxc_device optionally save the container configuration
when done.
. have do_add_remove_node() manipulate a new list of devices to be
created at container start.
. have src/lxc/conf.c:fill_autodev create devices which are in the new
list
More information about the lxc-users
mailing list