1 # This file is part of systemd.
3 # systemd is free software; you can redistribute it and/or modify it
4 # under the terms of the GNU Lesser General Public License as published by
5 # the Free Software Foundation; either version 2.1 of the License, or
6 # (at your option) any later version.
9 Description=Container %i
10 Documentation=man:systemd-nspawn(1)
11 PartOf=machines.target
12 Before=machines.target
16 ExecStart=@bindir@/systemd-nspawn --quiet --keep-unit --boot --link-journal=try-guest --network-veth -U --settings=override --machine=%i
19 RestartForceExitStatus=133
25 # Enforce a strict device policy, similar to the one nspawn configures
26 # when it allocates its own scope unit. Make sure to keep these
27 # policies in sync if you change them!
29 DeviceAllow=/dev/net/tun rwm
30 DeviceAllow=char-pts rw
32 # nspawn itself needs access to /dev/loop-control and /dev/loop, to
33 # implement the --image= option. Add these here, too.
34 DeviceAllow=/dev/loop-control rw
35 DeviceAllow=block-loop rw
36 DeviceAllow=block-blkext rw
39 WantedBy=machines.target