[systemd-devel] systemd-nspawn: access to disk devices does not work on centos 7/systemd 219

Mailing List SVR lists at svrinformatica.it
Wed Jan 16 00:42:13 UTC 2019


Hi,

I'm quite new to systemd-nspawn,

I configured a systemd container based on ubuntu bionic using debootstrap.

I can start the container from a bionic host (systemd 237) with a 
command like this one

systemd-nspawn -b -D bionic-devel 
--capability=CAP_SYS_TIME,CAP_SYS_RAWIO --bind=/dev/sda

and inside the container I have read/write permissions on /dev/sda, for 
example cat /dev/sda works fine.

If I start the same container from Arch Linux (systemd 240) it works the 
same way: /dev/sda is accessibile,

but if I start this container from centos 7 (systemd 219) I cannot read 
/dev/sda

cat /dev/sda
cat: /dev/sda: Operation not permitted

I tryed to disable selinux with no luck and I cannot see nothing 
relevant in the logs,

can the problem be related to the old systemd version? Any idea on how 
to debug this issue?

thanks!


More information about the systemd-devel mailing list