From: Lennart Poettering Date: Sat, 3 Oct 2015 09:23:52 +0000 (+0200) Subject: nspawn: fix --image= when nspawn is run as service X-Git-Tag: v227~26^2~4 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=988a47964283b6a72f5ce117f287ebeb12e26d2d;p=thirdparty%2Fsystemd.git nspawn: fix --image= when nspawn is run as service nspawn needs access to /dev/loop to implement --image=, hence grant that in the service file. Fixes #1446. --- diff --git a/units/systemd-nspawn@.service.in b/units/systemd-nspawn@.service.in index 6b86e0a7f77..03349931d9d 100644 --- a/units/systemd-nspawn@.service.in +++ b/units/systemd-nspawn@.service.in @@ -35,5 +35,10 @@ DeviceAllow=/dev/net/tun rwm DeviceAllow=/dev/pts/ptmx rw DeviceAllow=char-pts rw +# nspawn itself needs access to /dev/loop-control and /dev/loop, to +# implement the --image= option. Add these here, too. +DeviceAllow=/dev/loop-control rw +DeviceAllow=block-loop rw + [Install] WantedBy=machines.target