[systemd-devel] nspawn: premounted /dev, /proc, /sys ?

Lennart Poettering lennart at poettering.net
Tue Feb 21 18:22:44 UTC 2017


On Mon, 09.01.17 23:02, Seraphime Kirkovski (kirkseraph at gmail.com) wrote:

> Hello systemd devs !
> 
> Having nspawn run containers with premounted /dev, /proc and /sys has 
> been on the TODO list for a while now. I'm willing to write a patch for 
> this as my recent usage of nspawn requires it in some sense.
> 
> Before starting, I would like to know if there isn't already someone 
> working on it in the community.
> 
> And more importantly I would like to know if an nspawn capable of 
> running containers with premounted and prepopulated /dev, /proc or /sys 
> would be an acceptable thing to have in upstream systemd. I'm asking 
> this because I saw recently 8274e40d8:
> 
> 	nspawn: reword notice when /dev is pre-mounted and populated 
> 	(#4971)
> 
> where a new error message suggests it is possible to use a premounted, 
> but not prepopulated /dev. I don't quite understand why using 
> a premounted, but unpopulated /dev would be useful, but the message let 
> me think that the opposite is probably undesired.

I think pre-mounting /dev, /proc and /sys should actually work fine
(at least on git), as long as you set them up properly, and in the
case of /dev populate them.

YMMV though if you enable userns, as then /proc and /sys should be
mounted from within the userns to get the right perms.

Lennart

-- 
Lennart Poettering, Red Hat


More information about the systemd-devel mailing list