'name': 'Cloud Hypervisor',
'service_extra_in': [
files('virtchd.service.extra.in'),
+ systemd_service_limitnofile_extra_in,
],
}
[Service]
KillMode=process
-# Raise hard limits to match behaviour of systemd >= 240.
-# During startup, daemon will set soft limit to match hard limit
-# per systemd recommendations
-LimitNOFILE=1024:524288
# The cgroups pids controller can limit the number of tasks started by
# the daemon, which can limit the number of domains for some hypervisors.
# A conservative default of 8 tasks per guest results in a TasksMax of
virt_daemon_units += {
'service': 'virtlockd',
'service_in': files('virtlockd.service.in'),
+ 'service_extra_in': [
+ systemd_service_limitnofile_extra_in,
+ ],
'name': 'locking',
'sockets': [ 'main', 'admin' ],
'socket_in': files('virtlockd.socket.in'),
# cause the machine to be fenced (rebooted), so make
# sure we discourage OOM killer
OOMScoreAdjust=-900
-# Raise hard limits to match behaviour of systemd >= 240.
-# During startup, daemon will set soft limit to match hard limit
-# per systemd recommendations
-LimitNOFILE=1024:524288
[Install]
WantedBy=multi-user.target
virt_daemon_units += {
'service': 'virtlogd',
'service_in': files('virtlogd.service.in'),
+ 'service_extra_in': [
+ systemd_service_limitnofile_extra_in,
+ ],
'name': 'logging',
'sockets': [ 'main', 'admin' ],
'socket_in': files('virtlogd.socket.in'),
# cause the machine to be fenced (rebooted), so make
# sure we discourage OOM killer
OOMScoreAdjust=-900
-# Raise hard limits to match behaviour of systemd >= 240.
-# During startup, daemon will set soft limit to match hard limit
-# per systemd recommendations
-LimitNOFILE=1024:524288
[Install]
WantedBy=multi-user.target
'name': 'LXC',
'service_extra_in': [
files('virtlxcd.service.extra.in'),
+ systemd_service_limitnofile_extra_in,
],
}
[Service]
KillMode=process
-# Raise hard limits to match behaviour of systemd >= 240.
-# During startup, daemon will set soft limit to match hard limit
-# per systemd recommendations
-LimitNOFILE=1024:524288
# The cgroups pids controller can limit the number of tasks started by
# the daemon, which can limit the number of domains for some hypervisors.
# A conservative default of 8 tasks per guest results in a TasksMax of
# guest unit files to install
guest_unit_files = []
+# systemd_*_extra_in:
+# snippets that are shared by multiple units
+# can be used in service_extra_in/socket_extra_in (see below)
+systemd_service_limitnofile_extra_in = files('virtd.service.limitnofile.extra.in')
+
# virt_daemon_units:
# generate libvirt daemon systemd unit files
# * service - name of the service (required)
'name': 'QEMU',
'service_extra_in': [
files('virtqemud.service.extra.in'),
+ systemd_service_limitnofile_extra_in,
],
}
[Service]
KillMode=process
-# Raise hard limits to match behaviour of systemd >= 240.
-# During startup, daemon will set soft limit to match hard limit
-# per systemd recommendations
-LimitNOFILE=1024:524288
# The cgroups pids controller can limit the number of tasks started by
# the daemon, which can limit the number of domains for some hypervisors.
# A conservative default of 8 tasks per guest results in a TasksMax of
ExecReload=/bin/kill -HUP $MAINPID
KillMode=process
Restart=on-failure
-# Raise hard limits to match behaviour of systemd >= 240.
-# During startup, daemon will set soft limit to match hard limit
-# per systemd recommendations
-LimitNOFILE=1024:524288
# The cgroups pids controller can limit the number of tasks started by
# the daemon, which can limit the number of domains for some hypervisors.
# A conservative default of 8 tasks per guest results in a TasksMax of
virt_daemon_units += {
'service': 'libvirtd',
'service_in': files('libvirtd.service.in'),
+ 'service_extra_in': [
+ systemd_service_limitnofile_extra_in,
+ ],
'name': 'legacy monolithic',
'sockets': [ 'main', 'ro', 'admin', 'tcp', 'tls' ],
'socket_in': files('libvirtd.socket.in'),
--- /dev/null
+[Service]
+# Raise hard limits to match behaviour of systemd >= 240.
+# During startup, daemon will set soft limit to match hard limit
+# per systemd recommendations
+LimitNOFILE=1024:524288