forked from containers/qm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathqm.container
45 lines (39 loc) · 983 Bytes
/
qm.container
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
[Install]
WantedBy=default.target
[Service]
AllowedCPUs=1
CPUWeight=50
Delegate=true
IOWeight=50
ManagedOOMSwap=kill
MemorySwapMax=0
# Containers within the qm y default set OOMScoreAdj to 750
OOMScoreAdjust=500
Restart=always
Slice=QM.slice
Environment=ROOTFS=/usr/lib/qm/rootfs
Environment=RWETCFS=/etc/qm
Environment=RWVARFS=/var/qm
LimitNOFILE=65536
TasksMax=50%
[Container]
AddCapability=all
# Comment DropCapability this will allow FFI Tools to surpass their defaults.
DropCapability=sys_resource
AddDevice=-/dev/kvm
AddDevice=-/dev/fuse
ContainerName=qm
Exec=/sbin/init
Network=host
PodmanArgs=--pids-limit=-1 --security-opt label=nested --security-opt unmask=all
ReadOnly=true
Rootfs=${ROOTFS}
# FIXME: QM is failing to start if SecurityLabelNested is enabled.
# Add back as soon podman 4.7 is released.
# SecurityLabelNested=true
SecurityLabelFileType=qm_file_t
SecurityLabelLevel=s0
SecurityLabelType=qm_t
Timezone=local
Volume=${RWETCFS}:/etc
Volume=${RWVARFS}:/var