Skip to content

Commit 27ecf36

Browse files
committed
docs/systemd: describe device rules
Signed-off-by: Kir Kolyshkin <[email protected]>
1 parent 9677d42 commit 27ecf36

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

docs/systemd.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,27 @@ The following tables summarize which properties are translated.
104104
For documentation on systemd unit resource properties, see
105105
`systemd.resource-control(5)` man page.
106106

107+
### Device access rules
108+
109+
Runc translates device access rules from the runtime spec to systemd properties
110+
(`DevicePolicy` and `DeviceAllow`). Not all rules and rulesets are supported.
111+
For example, the following can not be translated:
112+
- blacklist-style rulesets;
113+
- major-wildcard rules (meaning "all devices with the given minor number").
114+
115+
NOTE that systemd v240 or later is highly recommended, since older versions
116+
have limited ways to interpret `DeviceAllow` rules. When using systemd older
117+
than v240, the following limitations exist:
118+
119+
- it is not possible to add a rule for a device that does not have an
120+
equivalent `/dev/{char,block}/<MAJOR>:<minor>` file on the host
121+
(for example, this is the case for NVidia devices);
122+
- adding a wildcard rule with the set major number and the unset minor number
123+
(meaning "all devices with the given major number") results in adding a set
124+
of individual rules for existing devices with the given major number,
125+
meaning that any devices that will appear after the container start won't
126+
be accessible.
127+
107128
### Auxiliary properties
108129

109130
Auxiliary properties of a systemd unit (as shown by `systemctl show

0 commit comments

Comments
 (0)